From 88a8086ab3f09f3b47164f3df156f54f7cd1a6fb Mon Sep 17 00:00:00 2001 From: Nathan Flurry Date: Sat, 20 Jul 2024 01:41:07 -0700 Subject: [PATCH] chore: add back loading config --- Cargo.lock | 13 +- rivet-toolchain/Cargo.toml | 2 +- .../src/tasks/check_requirements.rs | 28 + rivet-toolchain/src/tasks/deploy/backend.rs | 86 +- .../src/tasks/deploy/game_server.rs | 2 +- rivet-toolchain/src/tasks/deploy/mod.rs | 2 + rivet-toolchain/src/util/docker/push.rs | 13 +- rivet-toolchain/src/util/mod.rs | 2 + rivet-toolchain/src/util/net/upload.rs | 153 +- rivet-toolchain/src/util/task/mod.rs | 2 + rivet-toolchain/src/util/term.rs | 130 + sdks/rust/.openapi-generator/FILES | 54 +- sdks/rust/README.md | 31 +- .../AdminClustersCreateDatacenterRequest.md | 1 + sdks/rust/docs/AdminClustersPoolUpdate.md | 16 + .../AdminClustersUpdateDatacenterRequest.md | 8 +- ...> CloudGamesCreateServiceTokenResponse.md} | 5 +- sdks/rust/docs/CloudGamesTokensApi.md | 31 + ...esBillingPlan.md => EeBillingGameUsage.md} | 5 +- ...roupsBillingGroup.md => EeBillingGroup.md} | 2 +- ...sBillingPlanConfig.md => EeBillingPlan.md} | 3 +- ...egionConfig.md => EeBillingRegionUsage.md} | 4 +- sdks/rust/docs/EeBillingSubscription.md | 12 + sdks/rust/docs/EeCloudGamesBillingApi.md | 3 +- .../docs/EeCloudGamesBillingGetResponse.md | 5 +- .../EeCloudGamesBillingUpdatePlanRequest.md | 2 +- sdks/rust/docs/EeCloudGroupsBillingApi.md | 31 + .../EeCloudGroupsBillingGetBillingResponse.md | 2 +- ...oudGroupsBillingGetBillingUsageResponse.md | 11 + .../docs/ServersCreateServerNetworkRequest.md | 12 + .../docs/ServersCreateServerPortRequest.md | 13 + sdks/rust/docs/ServersCreateServerRequest.md | 18 + sdks/rust/docs/ServersCreateServerResponse.md | 11 + .../rust/docs/ServersDestroyServerResponse.md | 11 + sdks/rust/docs/ServersGetServerResponse.md | 11 + sdks/rust/docs/ServersNetwork.md | 12 + sdks/rust/docs/ServersNetworkMode.md | 10 + sdks/rust/docs/ServersPort.md | 15 + sdks/rust/docs/ServersPortProtocol.md | 10 + sdks/rust/docs/ServersPortRouting.md | 12 + sdks/rust/docs/ServersResources.md | 12 + sdks/rust/docs/ServersServer.md | 23 + sdks/rust/docs/ServersServersApi.md | 102 + sdks/rust/src/apis/admin_api.rs | 78 +- sdks/rust/src/apis/admin_clusters_api.rs | 169 +- .../apis/admin_clusters_datacenters_api.rs | 274 +- .../src/apis/admin_clusters_servers_api.rs | 356 ++- .../apis/auth_identity_access_token_api.rs | 94 +- sdks/rust/src/apis/auth_identity_email_api.rs | 186 +- sdks/rust/src/apis/auth_tokens_api.rs | 93 +- sdks/rust/src/apis/cloud_api.rs | 87 +- sdks/rust/src/apis/cloud_auth_api.rs | 87 +- sdks/rust/src/apis/cloud_devices_links_api.rs | 248 +- sdks/rust/src/apis/cloud_games_api.rs | 705 +++--- sdks/rust/src/apis/cloud_games_avatars_api.rs | 272 +- sdks/rust/src/apis/cloud_games_builds_api.rs | 185 +- sdks/rust/src/apis/cloud_games_cdn_api.rs | 185 +- .../src/apis/cloud_games_matchmaker_api.rs | 380 ++- .../cloud_games_namespaces_analytics_api.rs | 97 +- .../src/apis/cloud_games_namespaces_api.rs | 1470 +++++------ .../apis/cloud_games_namespaces_logs_api.rs | 196 +- sdks/rust/src/apis/cloud_games_tokens_api.rs | 139 +- .../rust/src/apis/cloud_games_versions_api.rs | 364 ++- sdks/rust/src/apis/cloud_groups_api.rs | 93 +- sdks/rust/src/apis/cloud_logs_api.rs | 92 +- sdks/rust/src/apis/cloud_tiers_api.rs | 87 +- sdks/rust/src/apis/cloud_uploads_api.rs | 92 +- sdks/rust/src/apis/configuration.rs | 54 +- .../src/apis/ee_cloud_backend_projects_api.rs | 368 ++- .../ee_cloud_backend_projects_envs_api.rs | 1284 ++++------ .../src/apis/ee_cloud_games_billing_api.rs | 182 +- ...ee_cloud_games_namespaces_analytics_api.rs | 98 +- .../src/apis/ee_cloud_games_projects_api.rs | 179 +- .../src/apis/ee_cloud_groups_billing_api.rs | 243 +- sdks/rust/src/apis/group_api.rs | 1547 +++++------- sdks/rust/src/apis/group_invites_api.rs | 263 +- sdks/rust/src/apis/group_join_requests_api.rs | 181 +- sdks/rust/src/apis/identity_activities_api.rs | 83 +- sdks/rust/src/apis/identity_api.rs | 2227 +++++++---------- sdks/rust/src/apis/identity_events_api.rs | 83 +- sdks/rust/src/apis/identity_links_api.rs | 348 ++- sdks/rust/src/apis/job_run_api.rs | 75 +- sdks/rust/src/apis/kv_api.rs | 630 ++--- sdks/rust/src/apis/matchmaker_lobbies_api.rs | 697 +++--- sdks/rust/src/apis/matchmaker_players_api.rs | 263 +- sdks/rust/src/apis/matchmaker_regions_api.rs | 87 +- sdks/rust/src/apis/mod.rs | 131 +- sdks/rust/src/apis/portal_games_api.rs | 88 +- .../src/apis/provision_datacenters_api.rs | 81 +- sdks/rust/src/apis/provision_servers_api.rs | 80 +- sdks/rust/src/apis/servers_servers_api.rs | 154 ++ sdks/rust/src/lib.rs | 2 +- .../admin_clusters_build_delivery_method.rs | 36 +- .../rust/src/models/admin_clusters_cluster.rs | 39 +- .../admin_clusters_create_cluster_request.rs | 27 +- .../admin_clusters_create_cluster_response.rs | 19 +- ...dmin_clusters_create_datacenter_request.rs | 54 +- ...min_clusters_create_datacenter_response.rs | 19 +- .../src/models/admin_clusters_datacenter.rs | 78 +- .../src/models/admin_clusters_hardware.rs | 19 +- .../admin_clusters_list_clusters_response.rs | 21 +- ...dmin_clusters_list_datacenters_response.rs | 21 +- .../admin_clusters_list_servers_response.rs | 21 +- sdks/rust/src/models/admin_clusters_pool.rs | 58 +- .../src/models/admin_clusters_pool_type.rs | 42 +- .../src/models/admin_clusters_pool_update.rs | 43 + .../src/models/admin_clusters_provider.rs | 30 +- sdks/rust/src/models/admin_clusters_server.rs | 27 +- ...dmin_clusters_update_datacenter_request.rs | 42 +- sdks/rust/src/models/admin_login_request.rs | 19 +- sdks/rust/src/models/admin_login_response.rs | 19 +- sdks/rust/src/models/auth_complete_status.rs | 57 +- ...plete_access_token_verification_request.rs | 21 +- ...ity_complete_email_verification_request.rs | 32 +- ...ty_complete_email_verification_response.rs | 21 +- ...entity_start_email_verification_request.rs | 33 +- ...ntity_start_email_verification_response.rs | 19 +- .../auth_refresh_identity_token_request.rs | 21 +- .../auth_refresh_identity_token_response.rs | 41 +- sdks/rust/src/models/captcha_config.rs | 28 +- .../src/models/captcha_config_hcaptcha.rs | 20 +- .../src/models/captcha_config_turnstile.rs | 20 +- sdks/rust/src/models/cloud_auth_agent.rs | 28 +- .../src/models/cloud_auth_agent_game_cloud.rs | 20 +- .../src/models/cloud_auth_agent_identity.rs | 20 +- .../rust/src/models/cloud_bootstrap_access.rs | 36 +- .../src/models/cloud_bootstrap_captcha.rs | 19 +- .../cloud_bootstrap_captcha_turnstile.rs | 19 +- .../src/models/cloud_bootstrap_cluster.rs | 33 +- .../src/models/cloud_bootstrap_domains.rs | 40 +- .../models/cloud_bootstrap_login_methods.rs | 27 +- .../src/models/cloud_bootstrap_origins.rs | 20 +- .../src/models/cloud_bootstrap_response.rs | 57 +- sdks/rust/src/models/cloud_build_summary.rs | 67 +- sdks/rust/src/models/cloud_cdn_auth_type.rs | 33 +- .../models/cloud_cdn_namespace_auth_user.rs | 22 +- .../src/models/cloud_cdn_namespace_config.rs | 51 +- .../src/models/cloud_cdn_namespace_domain.rs | 56 +- ...dn_namespace_domain_verification_method.rs | 28 +- ...mespace_domain_verification_method_http.rs | 19 +- ...dn_namespace_domain_verification_status.rs | 39 +- .../rust/src/models/cloud_cdn_site_summary.rs | 67 +- .../src/models/cloud_custom_avatar_summary.rs | 68 +- ...ud_devices_complete_device_link_request.rs | 32 +- .../cloud_devices_get_device_link_response.rs | 27 +- ...ud_devices_prepare_device_link_response.rs | 37 +- sdks/rust/src/models/cloud_game_full.rs | 110 +- .../src/models/cloud_game_lobby_expenses.rs | 42 +- .../models/cloud_games_build_compression.rs | 36 +- .../rust/src/models/cloud_games_build_kind.rs | 36 +- ...cloud_games_create_cloud_token_response.rs | 21 +- .../cloud_games_create_game_build_request.rs | 59 +- .../cloud_games_create_game_build_response.rs | 45 +- ...loud_games_create_game_cdn_site_request.rs | 34 +- ...oud_games_create_game_cdn_site_response.rs | 37 +- .../models/cloud_games_create_game_request.rs | 40 +- .../cloud_games_create_game_response.rs | 19 +- ...cloud_games_create_game_version_request.rs | 32 +- ...loud_games_create_game_version_response.rs | 19 +- ...oud_games_create_service_token_response.rs | 29 + ..._games_delete_matchmaker_lobby_response.rs | 21 +- .../cloud_games_export_lobby_logs_request.rs | 19 +- .../cloud_games_export_lobby_logs_response.rs | 21 +- ...export_matchmaker_lobby_history_request.rs | 31 +- ...xport_matchmaker_lobby_history_response.rs | 21 +- ...ames_game_banner_upload_prepare_request.rs | 39 +- ...mes_game_banner_upload_prepare_response.rs | 30 +- ..._games_game_logo_upload_prepare_request.rs | 39 +- ...games_game_logo_upload_prepare_response.rs | 30 +- .../cloud_games_get_game_by_id_response.rs | 30 +- ...d_games_get_game_version_by_id_response.rs | 21 +- .../models/cloud_games_get_games_response.rs | 41 +- .../cloud_games_get_lobby_logs_response.rs | 41 +- .../cloud_games_list_game_builds_response.rs | 21 +- ...loud_games_list_game_cdn_sites_response.rs | 23 +- ...games_list_game_custom_avatars_response.rs | 23 +- .../rust/src/models/cloud_games_log_stream.rs | 36 +- ...namespaces_add_namespace_domain_request.rs | 21 +- ...amespaces_create_game_namespace_request.rs | 41 +- ...mespaces_create_game_namespace_response.rs | 19 +- ...ame_namespace_token_development_request.rs | 38 +- ...me_namespace_token_development_response.rs | 21 +- ...te_game_namespace_token_public_response.rs | 21 +- ..._get_analytics_matchmaker_live_response.rs | 23 +- ...paces_get_game_namespace_by_id_response.rs | 23 +- ...game_namespace_version_history_response.rs | 23 +- ...namespaces_get_namespace_lobby_response.rs | 56 +- ...cloud_games_namespaces_inspect_response.rs | 21 +- ...espaces_list_namespace_lobbies_response.rs | 23 +- ...ces_set_namespace_cdn_auth_type_request.rs | 21 +- ...le_namespace_domain_public_auth_request.rs | 21 +- ...ame_namespace_matchmaker_config_request.rs | 34 +- ...s_update_game_namespace_version_request.rs | 19 +- ..._update_namespace_cdn_auth_user_request.rs | 31 +- ...ame_namespace_matchmaker_config_request.rs | 34 +- ...me_namespace_matchmaker_config_response.rs | 23 +- ...espaces_validate_game_namespace_request.rs | 34 +- ...spaces_validate_game_namespace_response.rs | 23 +- ...ame_namespace_token_development_request.rs | 32 +- ...me_namespace_token_development_response.rs | 23 +- ...es_prepare_custom_avatar_upload_request.rs | 39 +- ...s_prepare_custom_avatar_upload_response.rs | 30 +- ...oud_games_reserve_version_name_response.rs | 23 +- .../cloud_games_validate_game_request.rs | 31 +- .../cloud_games_validate_game_response.rs | 21 +- ...oud_games_validate_game_version_request.rs | 32 +- ...ud_games_validate_game_version_response.rs | 23 +- .../cloud_get_ray_perf_logs_response.rs | 21 +- .../models/cloud_get_region_tiers_response.rs | 21 +- .../src/models/cloud_group_bank_source.rs | 31 +- .../rust/src/models/cloud_inspect_response.rs | 21 +- .../models/cloud_lobby_summary_analytics.rs | 137 +- .../src/models/cloud_logs_lobby_status.rs | 28 +- .../models/cloud_logs_lobby_status_stopped.rs | 40 +- .../src/models/cloud_logs_lobby_summary.rs | 79 +- sdks/rust/src/models/cloud_logs_perf_mark.rs | 44 +- sdks/rust/src/models/cloud_logs_perf_span.rs | 46 +- .../cloud_matchmaker_development_port.rs | 36 +- .../cloud_matchmaker_namespace_config.rs | 71 +- .../rust/src/models/cloud_namespace_config.rs | 49 +- sdks/rust/src/models/cloud_namespace_full.rs | 65 +- .../src/models/cloud_namespace_summary.rs | 58 +- .../src/models/cloud_namespace_version.rs | 44 +- sdks/rust/src/models/cloud_region_summary.rs | 67 +- sdks/rust/src/models/cloud_region_tier.rs | 89 +- .../src/models/cloud_region_tier_expenses.rs | 67 +- sdks/rust/src/models/cloud_svc_metrics.rs | 48 +- sdks/rust/src/models/cloud_svc_perf.rs | 68 +- .../rust/src/models/cloud_universal_region.rs | 189 +- .../models/cloud_validate_group_request.rs | 21 +- .../models/cloud_validate_group_response.rs | 21 +- .../src/models/cloud_version_cdn_config.rs | 54 +- ...d_version_cdn_custom_headers_middleware.rs | 21 +- .../src/models/cloud_version_cdn_header.rs | 24 +- .../models/cloud_version_cdn_middleware.rs | 21 +- .../cloud_version_cdn_middleware_kind.rs | 21 +- .../src/models/cloud_version_cdn_route.rs | 41 +- sdks/rust/src/models/cloud_version_config.rs | 54 +- .../src/models/cloud_version_engine_config.rs | 45 +- .../cloud_version_engine_unreal_config.rs | 21 +- sdks/rust/src/models/cloud_version_full.rs | 49 +- .../models/cloud_version_identity_config.rs | 51 +- .../cloud_version_identity_custom_avatar.rs | 19 +- ...ud_version_identity_custom_display_name.rs | 21 +- .../cloud_version_matchmaker_captcha.rs | 47 +- ...oud_version_matchmaker_captcha_hcaptcha.rs | 38 +- ...rsion_matchmaker_captcha_hcaptcha_level.rs | 45 +- ...ud_version_matchmaker_captcha_turnstile.rs | 28 +- .../models/cloud_version_matchmaker_config.rs | 91 +- .../cloud_version_matchmaker_game_mode.rs | 87 +- ...ud_version_matchmaker_game_mode_actions.rs | 34 +- ...sion_matchmaker_game_mode_create_config.rs | 67 +- ...ersion_matchmaker_game_mode_find_config.rs | 40 +- ...tchmaker_game_mode_identity_requirement.rs | 39 +- ...atchmaker_game_mode_idle_lobbies_config.rs | 25 +- ...ersion_matchmaker_game_mode_join_config.rs | 40 +- ...oud_version_matchmaker_game_mode_region.rs | 28 +- ...ion_matchmaker_game_mode_runtime_docker.rs | 75 +- ...atchmaker_game_mode_runtime_docker_port.rs | 62 +- ...atchmaker_game_mode_verification_config.rs | 28 +- .../cloud_version_matchmaker_lobby_group.rs | 69 +- ...chmaker_lobby_group_idle_lobbies_config.rs | 35 +- ...d_version_matchmaker_lobby_group_region.rs | 39 +- ..._version_matchmaker_lobby_group_runtime.rs | 20 +- ...n_matchmaker_lobby_group_runtime_docker.rs | 50 +- ...aker_lobby_group_runtime_docker_env_var.rs | 25 +- ...chmaker_lobby_group_runtime_docker_port.rs | 47 +- .../cloud_version_matchmaker_network_mode.rs | 33 +- .../cloud_version_matchmaker_port_protocol.rs | 51 +- .../cloud_version_matchmaker_port_range.rs | 29 +- .../cloud_version_matchmaker_proxy_kind.rs | 33 +- sdks/rust/src/models/cloud_version_summary.rs | 42 +- .../rust/src/models/ee_backend_environment.rs | 57 +- .../models/ee_backend_neon_project_config.rs | 31 +- sdks/rust/src/models/ee_backend_project.rs | 57 +- sdks/rust/src/models/ee_backend_tier.rs | 36 +- .../src/models/ee_backend_update_variable.rs | 34 +- sdks/rust/src/models/ee_backend_variable.rs | 28 +- sdks/rust/src/models/ee_billing_game_usage.rs | 31 + sdks/rust/src/models/ee_billing_group.rs | 41 + sdks/rust/src/models/ee_billing_plan.rs | 42 + .../src/models/ee_billing_region_usage.rs | 32 + .../src/models/ee_billing_subscription.rs | 33 + .../ee_cloud_analytics_variant_query.rs | 120 +- ...avg_play_duration_by_game_mode_data_set.rs | 37 +- ...ud_avg_play_duration_by_region_data_set.rs | 37 +- .../ee_cloud_avg_play_duration_data_set.rs | 24 +- ...e_cloud_backend_projects_create_request.rs | 32 +- ..._cloud_backend_projects_create_response.rs | 19 +- ...ud_backend_projects_envs_create_request.rs | 41 +- ...d_backend_projects_envs_create_response.rs | 19 +- ...ud_backend_projects_envs_deploy_request.rs | 19 +- ...d_backend_projects_envs_deploy_response.rs | 21 +- ...ckend_projects_envs_get_config_response.rs | 30 +- ...ckend_projects_envs_get_db_url_response.rs | 19 +- ...ckend_projects_envs_get_events_response.rs | 32 +- ...loud_backend_projects_envs_get_response.rs | 30 +- ...nd_projects_envs_get_variables_response.rs | 30 +- ...oud_backend_projects_envs_list_response.rs | 30 +- ...nd_projects_envs_prepare_deploy_request.rs | 23 +- ...d_projects_envs_prepare_deploy_response.rs | 30 +- ...end_projects_envs_update_config_request.rs | 23 +- ..._projects_envs_update_variables_request.rs | 21 +- ..._backend_projects_envs_validate_request.rs | 31 +- ...backend_projects_envs_validate_response.rs | 23 +- .../ee_cloud_backend_projects_get_response.rs | 30 +- ...ee_cloud_backend_projects_list_response.rs | 30 +- ...cloud_backend_projects_validate_request.rs | 21 +- ...loud_backend_projects_validate_response.rs | 23 +- ...destroyed_lobbies_by_exit_code_data_set.rs | 37 +- ...d_destroyed_lobbies_by_failure_data_set.rs | 37 +- .../ee_cloud_failed_lobbies_data_set.rs | 27 +- ...billing_dynamic_servers_capacity_region.rs | 29 - ..._dynamic_servers_capacity_region_config.rs | 26 - .../ee_cloud_games_billing_get_response.rs | 30 +- .../src/models/ee_cloud_games_billing_plan.rs | 28 - .../ee_cloud_games_billing_plan_config.rs | 28 - ...cloud_games_billing_update_plan_request.rs | 23 +- ...games_namespaces_get_analytics_response.rs | 21 +- .../ee_cloud_games_projects_get_response.rs | 19 +- .../ee_cloud_games_projects_link_request.rs | 19 +- ...ng_create_stripe_portal_session_request.rs | 21 +- ...g_create_stripe_portal_session_response.rs | 21 +- ...oud_groups_billing_get_billing_response.rs | 30 +- ...oups_billing_get_billing_usage_response.rs | 28 + .../models/ee_cloud_groups_billing_group.rs | 45 - ...ps_billing_stripe_portal_session_intent.rs | 36 +- ...cloud_lobby_count_by_game_mode_data_set.rs | 44 +- ...ee_cloud_lobby_count_by_region_data_set.rs | 44 +- .../models/ee_cloud_lobby_count_data_set.rs | 51 +- .../ee_cloud_lobby_ready_time_data_set.rs | 24 +- .../ee_cloud_matchmaker_overview_data_set.rs | 27 +- .../ee_cloud_namespace_analytics_data_set.rs | 148 +- ...e_cloud_new_lobbies_per_second_data_set.rs | 27 +- ...e_cloud_new_players_per_second_data_set.rs | 27 +- ...loud_player_count_by_game_mode_data_set.rs | 44 +- ...e_cloud_player_count_by_region_data_set.rs | 44 +- .../models/ee_cloud_player_count_data_set.rs | 37 +- sdks/rust/src/models/error_body.rs | 52 +- sdks/rust/src/models/game_handle.rs | 53 +- .../src/models/game_leaderboard_category.rs | 22 +- sdks/rust/src/models/game_platform_link.rs | 29 +- sdks/rust/src/models/game_profile.rs | 128 +- sdks/rust/src/models/game_stat.rs | 30 +- .../models/game_stat_aggregation_method.rs | 45 +- sdks/rust/src/models/game_stat_config.rs | 100 +- .../src/models/game_stat_format_method.rs | 63 +- .../src/models/game_stat_sorting_method.rs | 33 +- sdks/rust/src/models/game_stat_summary.rs | 31 +- sdks/rust/src/models/game_summary.rs | 80 +- sdks/rust/src/models/geo_coord.rs | 28 +- sdks/rust/src/models/geo_distance.rs | 25 +- .../src/models/global_event_notification.rs | 44 +- sdks/rust/src/models/group_banned_identity.rs | 30 +- .../models/group_consume_invite_response.rs | 19 +- .../src/models/group_create_invite_request.rs | 31 +- .../models/group_create_invite_response.rs | 21 +- sdks/rust/src/models/group_create_request.rs | 21 +- sdks/rust/src/models/group_create_response.rs | 19 +- sdks/rust/src/models/group_external_links.rs | 22 +- .../src/models/group_get_bans_response.rs | 40 +- .../src/models/group_get_invite_response.rs | 21 +- .../group_get_join_requests_response.rs | 40 +- .../src/models/group_get_members_response.rs | 40 +- .../src/models/group_get_profile_response.rs | 30 +- .../src/models/group_get_summary_response.rs | 21 +- sdks/rust/src/models/group_handle.rs | 56 +- sdks/rust/src/models/group_join_request.rs | 30 +- .../models/group_list_suggested_response.rs | 32 +- sdks/rust/src/models/group_member.rs | 22 +- .../group_prepare_avatar_upload_request.rs | 39 +- .../group_prepare_avatar_upload_response.rs | 30 +- sdks/rust/src/models/group_profile.rs | 127 +- sdks/rust/src/models/group_publicity.rs | 33 +- .../group_resolve_join_request_request.rs | 19 +- sdks/rust/src/models/group_search_response.rs | 29 +- sdks/rust/src/models/group_summary.rs | 95 +- .../group_transfer_ownership_request.rs | 23 +- .../models/group_update_profile_request.rs | 37 +- .../models/group_validate_profile_request.rs | 37 +- .../models/group_validate_profile_response.rs | 21 +- .../identity_access_token_linked_account.rs | 20 +- .../identity_cancel_game_link_request.rs | 23 +- .../identity_complete_game_link_request.rs | 23 +- sdks/rust/src/models/identity_dev_state.rs | 39 +- .../models/identity_email_linked_account.rs | 22 +- .../src/models/identity_external_links.rs | 32 +- .../rust/src/models/identity_game_activity.rs | 56 +- .../src/models/identity_game_link_status.rs | 42 +- .../identity_get_game_link_new_identity.rs | 41 +- .../models/identity_get_game_link_response.rs | 50 +- .../models/identity_get_handles_response.rs | 30 +- .../models/identity_get_profile_response.rs | 30 +- .../models/identity_get_summaries_response.rs | 30 +- sdks/rust/src/models/identity_global_event.rs | 36 +- .../identity_global_event_identity_update.rs | 21 +- .../src/models/identity_global_event_kind.rs | 30 +- ...tity_global_event_matchmaker_lobby_join.rs | 37 +- .../identity_global_event_notification.rs | 49 +- sdks/rust/src/models/identity_group.rs | 22 +- sdks/rust/src/models/identity_handle.rs | 71 +- .../src/models/identity_linked_account.rs | 28 +- .../identity_list_activities_response.rs | 51 +- .../identity_list_followers_response.rs | 36 +- .../identity_list_following_response.rs | 36 +- .../models/identity_list_friends_response.rs | 36 +- .../identity_list_mutual_friends_response.rs | 29 +- ...identity_list_recent_followers_response.rs | 36 +- .../identity_prepare_avatar_upload_request.rs | 39 +- ...identity_prepare_avatar_upload_response.rs | 30 +- .../identity_prepare_game_link_response.rs | 41 +- sdks/rust/src/models/identity_presence.rs | 36 +- sdks/rust/src/models/identity_profile.rs | 180 +- .../src/models/identity_report_request.rs | 19 +- .../src/models/identity_search_response.rs | 29 +- .../identity_set_game_activity_request.rs | 23 +- .../rust/src/models/identity_setup_request.rs | 26 +- .../src/models/identity_setup_response.rs | 48 +- .../identity_signup_for_beta_request.rs | 50 +- sdks/rust/src/models/identity_status.rs | 39 +- sdks/rust/src/models/identity_summary.rs | 96 +- .../models/identity_update_game_activity.rs | 50 +- .../models/identity_update_profile_request.rs | 37 +- .../models/identity_update_status_request.rs | 19 +- .../identity_validate_profile_response.rs | 19 +- .../models/identity_watch_events_response.rs | 30 +- sdks/rust/src/models/kv_entry.rs | 38 +- sdks/rust/src/models/kv_get_batch_response.rs | 30 +- sdks/rust/src/models/kv_get_response.rs | 40 +- sdks/rust/src/models/kv_list_response.rs | 19 +- sdks/rust/src/models/kv_put_batch_request.rs | 27 +- sdks/rust/src/models/kv_put_entry.rs | 29 +- sdks/rust/src/models/kv_put_request.rs | 37 +- .../matchmaker_create_lobby_response.rs | 37 +- .../matchmaker_custom_lobby_publicity.rs | 36 +- .../models/matchmaker_find_lobby_response.rs | 37 +- .../src/models/matchmaker_game_mode_info.rs | 22 +- .../models/matchmaker_game_mode_statistics.rs | 30 +- .../matchmaker_get_statistics_response.rs | 34 +- sdks/rust/src/models/matchmaker_join_lobby.rs | 47 +- .../models/matchmaker_join_lobby_response.rs | 37 +- .../rust/src/models/matchmaker_join_player.rs | 22 +- sdks/rust/src/models/matchmaker_join_port.rs | 51 +- .../src/models/matchmaker_join_port_range.rs | 29 +- .../rust/src/models/matchmaker_join_region.rs | 32 +- .../matchmaker_list_lobbies_response.rs | 37 +- .../matchmaker_list_regions_response.rs | 19 +- .../matchmaker_lobbies_create_request.rs | 73 +- .../models/matchmaker_lobbies_find_request.rs | 65 +- .../models/matchmaker_lobbies_join_request.rs | 38 +- .../matchmaker_lobbies_set_closed_request.rs | 19 +- sdks/rust/src/models/matchmaker_lobby_info.rs | 77 +- .../matchmaker_players_connected_request.rs | 19 +- .../rust/src/models/matchmaker_region_info.rs | 58 +- .../models/matchmaker_region_statistics.rs | 19 +- sdks/rust/src/models/mod.rs | 52 +- .../portal_get_game_profile_response.rs | 30 +- .../portal_get_suggested_games_response.rs | 32 +- ..._notification_register_firebase_service.rs | 19 +- .../portal_notification_register_service.rs | 19 +- .../portal_notification_unregister_service.rs | 30 +- .../provision_datacenters_get_tls_response.rs | 30 +- .../provision_servers_get_info_response.rs | 51 +- .../servers_create_server_network_request.rs | 31 + .../servers_create_server_port_request.rs | 34 + .../models/servers_create_server_request.rs | 51 + .../models/servers_create_server_response.rs | 28 + .../models/servers_destroy_server_response.rs | 28 + .../src/models/servers_get_server_response.rs | 28 + sdks/rust/src/models/servers_network.rs | 31 + sdks/rust/src/models/servers_network_mode.rs | 39 + sdks/rust/src/models/servers_port.rs | 40 + sdks/rust/src/models/servers_port_protocol.rs | 48 + sdks/rust/src/models/servers_port_routing.rs | 31 + sdks/rust/src/models/servers_resources.rs | 33 + sdks/rust/src/models/servers_server.rs | 65 + sdks/rust/src/models/upload_prepare_file.rs | 40 +- .../src/models/upload_presigned_request.rs | 53 +- sdks/rust/src/models/validation_error.rs | 22 +- sdks/rust/src/models/watch_response.rs | 22 +- 480 files changed, 15554 insertions(+), 15265 deletions(-) create mode 100644 rivet-toolchain/src/tasks/check_requirements.rs create mode 100644 rivet-toolchain/src/util/term.rs create mode 100644 sdks/rust/docs/AdminClustersPoolUpdate.md rename sdks/rust/docs/{EeCloudGamesBillingDynamicServersCapacityRegion.md => CloudGamesCreateServiceTokenResponse.md} (63%) rename sdks/rust/docs/{EeCloudGamesBillingPlan.md => EeBillingGameUsage.md} (59%) rename sdks/rust/docs/{EeCloudGroupsBillingGroup.md => EeBillingGroup.md} (95%) rename sdks/rust/docs/{EeCloudGamesBillingPlanConfig.md => EeBillingPlan.md} (57%) rename sdks/rust/docs/{EeCloudGamesBillingDynamicServersCapacityRegionConfig.md => EeBillingRegionUsage.md} (79%) create mode 100644 sdks/rust/docs/EeBillingSubscription.md create mode 100644 sdks/rust/docs/EeCloudGroupsBillingGetBillingUsageResponse.md create mode 100644 sdks/rust/docs/ServersCreateServerNetworkRequest.md create mode 100644 sdks/rust/docs/ServersCreateServerPortRequest.md create mode 100644 sdks/rust/docs/ServersCreateServerRequest.md create mode 100644 sdks/rust/docs/ServersCreateServerResponse.md create mode 100644 sdks/rust/docs/ServersDestroyServerResponse.md create mode 100644 sdks/rust/docs/ServersGetServerResponse.md create mode 100644 sdks/rust/docs/ServersNetwork.md create mode 100644 sdks/rust/docs/ServersNetworkMode.md create mode 100644 sdks/rust/docs/ServersPort.md create mode 100644 sdks/rust/docs/ServersPortProtocol.md create mode 100644 sdks/rust/docs/ServersPortRouting.md create mode 100644 sdks/rust/docs/ServersResources.md create mode 100644 sdks/rust/docs/ServersServer.md create mode 100644 sdks/rust/docs/ServersServersApi.md create mode 100644 sdks/rust/src/apis/servers_servers_api.rs create mode 100644 sdks/rust/src/models/admin_clusters_pool_update.rs create mode 100644 sdks/rust/src/models/cloud_games_create_service_token_response.rs create mode 100644 sdks/rust/src/models/ee_billing_game_usage.rs create mode 100644 sdks/rust/src/models/ee_billing_group.rs create mode 100644 sdks/rust/src/models/ee_billing_plan.rs create mode 100644 sdks/rust/src/models/ee_billing_region_usage.rs create mode 100644 sdks/rust/src/models/ee_billing_subscription.rs delete mode 100644 sdks/rust/src/models/ee_cloud_games_billing_dynamic_servers_capacity_region.rs delete mode 100644 sdks/rust/src/models/ee_cloud_games_billing_dynamic_servers_capacity_region_config.rs delete mode 100644 sdks/rust/src/models/ee_cloud_games_billing_plan.rs delete mode 100644 sdks/rust/src/models/ee_cloud_games_billing_plan_config.rs create mode 100644 sdks/rust/src/models/ee_cloud_groups_billing_get_billing_usage_response.rs delete mode 100644 sdks/rust/src/models/ee_cloud_groups_billing_group.rs create mode 100644 sdks/rust/src/models/servers_create_server_network_request.rs create mode 100644 sdks/rust/src/models/servers_create_server_port_request.rs create mode 100644 sdks/rust/src/models/servers_create_server_request.rs create mode 100644 sdks/rust/src/models/servers_create_server_response.rs create mode 100644 sdks/rust/src/models/servers_destroy_server_response.rs create mode 100644 sdks/rust/src/models/servers_get_server_response.rs create mode 100644 sdks/rust/src/models/servers_network.rs create mode 100644 sdks/rust/src/models/servers_network_mode.rs create mode 100644 sdks/rust/src/models/servers_port.rs create mode 100644 sdks/rust/src/models/servers_port_protocol.rs create mode 100644 sdks/rust/src/models/servers_port_routing.rs create mode 100644 sdks/rust/src/models/servers_resources.rs create mode 100644 sdks/rust/src/models/servers_server.rs diff --git a/Cargo.lock b/Cargo.lock index 5af776cf..ce57333e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -276,10 +276,10 @@ dependencies = [ [[package]] name = "config" version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7328b20597b53c2454f0b1919720c25c7339051c02b72b7e05409e00b14132be" +source = "git+https://github.com/rivet-gg/config-rs?rev=0f3c89b4770276e8db72ce962974a9a72c59c97a#0f3c89b4770276e8db72ce962974a9a72c59c97a" dependencies = [ "async-trait", + "encoding_rs_io", "lazy_static", "nom", "pathdiff", @@ -477,6 +477,15 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "encoding_rs_io" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cc3c5651fb62ab8aa3103998dade57efdd028544bd300516baa31840c252a83" +dependencies = [ + "encoding_rs", +] + [[package]] name = "enum-iterator" version = "1.4.1" diff --git a/rivet-toolchain/Cargo.toml b/rivet-toolchain/Cargo.toml index 4ca1afe8..2de1c5ee 100644 --- a/rivet-toolchain/Cargo.toml +++ b/rivet-toolchain/Cargo.toml @@ -14,7 +14,7 @@ repository = "https://github.com/rivet-gg/cli" async-posthog = { git = "https://github.com/rivet-gg/posthog-rs.git", rev = "ef4e80e" } async-stream = "0.3.3" chrono = "0.4.21" -config = { version = "0.14", default-features = false, features = ["json", "async"] } +config = { git = "https://github.com/rivet-gg/config-rs", rev = "0f3c89b4770276e8db72ce962974a9a72c59c97a", default-features = false, features = ["json", "async"] } console = "0.15" ctrlc = { version = "3.2", features = ["termination"] } dirs = "5.0" diff --git a/rivet-toolchain/src/tasks/check_requirements.rs b/rivet-toolchain/src/tasks/check_requirements.rs new file mode 100644 index 00000000..583dda0c --- /dev/null +++ b/rivet-toolchain/src/tasks/check_requirements.rs @@ -0,0 +1,28 @@ +use global_error::prelude::*; +use serde::{Deserialize, Serialize}; + +use crate::util::task::TaskCtx; + +#[derive(Deserialize)] +pub struct Input { + path: String, +} + +#[derive(Serialize)] +pub struct Output {} + +pub struct Task; + +impl super::Task for Task { + type Input = Input; + type Output = Output; + + fn name() -> &'static str { + "check_requirements" + } + + async fn run(_task: TaskCtx, input: Self::Input) -> GlobalResult { + // TODO: + Ok(Output {}) + } +} diff --git a/rivet-toolchain/src/tasks/deploy/backend.rs b/rivet-toolchain/src/tasks/deploy/backend.rs index f99b90a3..acab54a0 100644 --- a/rivet-toolchain/src/tasks/deploy/backend.rs +++ b/rivet-toolchain/src/tasks/deploy/backend.rs @@ -9,9 +9,17 @@ use std::{ }; use tokio::fs; -use crate::{backend, config, ctx::Ctx, util::net::upload, util::task::TaskCtx}; +use crate::{ + backend, config, + ctx::Ctx, + util::task::TaskCtx, + util::{net::upload, term}, +}; pub struct DeployOpts { + /// Game ID being deployed to. + pub game_id: String, + /// The environment to deploy to. pub environment_id: String, @@ -39,6 +47,74 @@ pub async fn deploy(ctx: &Ctx, task: TaskCtx, opts: DeployOpts) -> GlobalResult< .await? .environment; + // TODO: re-apply both service token and endpoint if endpoint diff than one that's deployed + task.log_stdout(format!("[Fetching Environment Variables]")); + // let variables = + // apis::ee_cloud_backend_projects_envs_api::ee_cloud_backend_projects_envs_get_variables( + // &ctx.openapi_config_cloud, + // &project_id_str, + // &environment_id_str, + // ) + // .await? + // .variables; + let mut update_variables = HashMap::::new(); + // if !variables.contains_key("OPENGB_PUBLIC_ENDPOINT") { + // TODO: pull this from the server + let public_endpoint = format!( + "https://{}--{}.backend.nathan16.gameinc.io", + project.name_id, env.name_id + ); + update_variables.insert( + "OPENGB_PUBLIC_ENDPOINT".to_string(), + models::EeBackendUpdateVariable { + text: Some(public_endpoint), + ..Default::default() + }, + ); + // } + // if !variables.contains_key("RIVET_API_ENDPOINT") { + update_variables.insert( + "RIVET_API_ENDPOINT".to_string(), + models::EeBackendUpdateVariable { + text: Some(ctx.api_endpoint.clone()), + ..Default::default() + }, + ); + // } + // if !variables.contains_key("RIVET_SERVICE_TOKEN") { + let service_token = apis::cloud_games_tokens_api::cloud_games_tokens_create_service_token( + &ctx.openapi_config_cloud, + &opts.game_id, + ) + .await?; + update_variables.insert( + "RIVET_SERVICE_TOKEN".to_string(), + models::EeBackendUpdateVariable { + secret: Some(service_token.token), + ..Default::default() + }, + ); + // } + // if !update_variables.is_empty() { + task.log_stdout(format!( + "[Updating Environment Variables] {}", + update_variables + .keys() + .cloned() + .collect::>() + .join(", ") + )); + apis::ee_cloud_backend_projects_envs_api::ee_cloud_backend_projects_envs_update_variables( + &ctx.openapi_config_cloud, + &project_id_str, + &environment_id_str, + models::EeCloudBackendProjectsEnvsUpdateVariablesRequest { + variables: update_variables, + }, + ) + .await?; + // } + task.log_stdout(format!("[Building Project] {}", project_path.display())); // Build @@ -144,12 +220,13 @@ pub async fn deploy(ctx: &Ctx, task: TaskCtx, opts: DeployOpts) -> GlobalResult< // Upload files let reqwest_client = Arc::new(reqwest::Client::new()); - // let pb = term::EitherProgressBar::Multi(indicatif::MultiProgress::new()); + let pb = term::EitherProgressBar::Multi(term::multi_progress_bar(task.clone())); futures_util::stream::iter(prepare_res.presigned_requests) .map(Ok) .try_for_each_concurrent(8, |presigned_req| { - // let pb = pb.clone(); + let task = task.clone(); + let pb = pb.clone(); let files = files.clone(); let reqwest_client = reqwest_client.clone(); @@ -161,11 +238,12 @@ pub async fn deploy(ctx: &Ctx, task: TaskCtx, opts: DeployOpts) -> GlobalResult< ); upload::upload_file( + task.clone(), &reqwest_client, &presigned_req, &file.absolute_path, file.prepared.content_type.as_ref(), - // pb, + pb, ) .await?; diff --git a/rivet-toolchain/src/tasks/deploy/game_server.rs b/rivet-toolchain/src/tasks/deploy/game_server.rs index 63413968..a9397ca6 100644 --- a/rivet-toolchain/src/tasks/deploy/game_server.rs +++ b/rivet-toolchain/src/tasks/deploy/game_server.rs @@ -1,5 +1,5 @@ use global_error::prelude::*; -use std::{path::Path}; +use std::path::Path; use uuid::Uuid; use crate::{ diff --git a/rivet-toolchain/src/tasks/deploy/mod.rs b/rivet-toolchain/src/tasks/deploy/mod.rs index 76667e8c..2ce92e16 100644 --- a/rivet-toolchain/src/tasks/deploy/mod.rs +++ b/rivet-toolchain/src/tasks/deploy/mod.rs @@ -61,8 +61,10 @@ impl super::Task for Task { &ctx, task.clone(), backend::DeployOpts { + game_id: ctx.game_id.clone(), environment_id: input.environment_id.clone(), project_path: input.cwd.clone(), + // TODO: skip_migrate: true, }, ) diff --git a/rivet-toolchain/src/util/docker/push.rs b/rivet-toolchain/src/util/docker/push.rs index 9e68966c..83942d78 100644 --- a/rivet-toolchain/src/util/docker/push.rs +++ b/rivet-toolchain/src/util/docker/push.rs @@ -9,7 +9,7 @@ use uuid::Uuid; use crate::{ config, ctx::Ctx, - util::{net::upload, task::TaskCtx}, + util::{net::upload, task::TaskCtx, term}, }; use super::{BuildCompression, BuildKind}; @@ -85,22 +85,24 @@ pub async fn push_tar(ctx: &Ctx, task: TaskCtx, push_opts: &PushOpts) -> GlobalR } let build_res = unwrap!(build_res,); let image_id = build_res.build_id; - // let pb = term::EitherProgressBar::Multi(indicatif::MultiProgress::new()); + let pb = term::EitherProgressBar::Multi(term::multi_progress_bar(task.clone())); if multipart_enabled { // Upload chunks in parallel futures_util::stream::iter(build_res.image_presigned_requests.unwrap()) .map(|presigned_request| { + let task = task.clone(); let reqwest_client = reqwest_client.clone(); - // let pb = pb.clone(); + let pb = pb.clone(); async move { upload::upload_file( + task.clone(), &reqwest_client, &presigned_request, &push_opts.path, Some(content_type), - // pb, + pb, ) .await } @@ -111,11 +113,12 @@ pub async fn push_tar(ctx: &Ctx, task: TaskCtx, push_opts: &PushOpts) -> GlobalR } else { // Upload file upload::upload_file( + task.clone(), &reqwest_client, &build_res.image_presigned_request.unwrap(), &push_opts.path, Some(content_type), - // pb, + pb, ) .await?; } diff --git a/rivet-toolchain/src/util/mod.rs b/rivet-toolchain/src/util/mod.rs index 694f0f40..06d3a971 100644 --- a/rivet-toolchain/src/util/mod.rs +++ b/rivet-toolchain/src/util/mod.rs @@ -6,3 +6,5 @@ pub mod net; pub mod os; pub mod show_term; pub mod task; +pub mod term; + diff --git a/rivet-toolchain/src/util/net/upload.rs b/rivet-toolchain/src/util/net/upload.rs index 11bfe5a0..ed5a94b5 100644 --- a/rivet-toolchain/src/util/net/upload.rs +++ b/rivet-toolchain/src/util/net/upload.rs @@ -13,6 +13,8 @@ use tokio::{ }; use tokio_util::io::ReaderStream; +use crate::util::{task::TaskCtx, term}; + /// Prepared file that will be uploaded to S3. #[derive(Clone)] pub struct UploadFile { @@ -93,29 +95,30 @@ pub fn prepare_upload_file, Q: AsRef>( /// Uploads a file to a given URL. pub async fn upload_file( + task: TaskCtx, reqwest_client: &reqwest::Client, presigned_req: &models::UploadPresignedRequest, file_path: impl AsRef, content_type: Option, - // main_pb: term::EitherProgressBar, + main_pb: term::EitherProgressBar, ) -> GlobalResult<()> { let content_type = content_type.map(|x| x.to_string()); let path = presigned_req.path.clone(); - // let is_tty = console::Term::buffered_stderr().is_term(); - // let mut pb_added = false; - // let pb = match &main_pb { - // term::EitherProgressBar::Single(pb) => pb.clone(), - // term::EitherProgressBar::Multi(_) => term::progress_bar(), - // }; + let is_tty = console::Term::buffered_stderr().is_term(); + let mut pb_added = false; + let pb = match &main_pb { + term::EitherProgressBar::Single(pb) => pb.clone(), + term::EitherProgressBar::Multi(_) => term::progress_bar(task.clone()), + }; // Try the upload multiple times since DigitalOcean spaces is incredibly // buggy and spotty internet connections may cause issues. This is // especially important since we have files that we need to batch upload, so // one failing request is bad. let mut attempts = 0; - let (_upload_time, _total_size) = 'upload: loop { - // let pb = pb.clone(); + let (upload_time, total_size) = 'upload: loop { + let pb = pb.clone(); // Read file let mut file = File::open(file_path.as_ref()).await?; @@ -125,35 +128,37 @@ pub async fn upload_file( let total_size = presigned_req.content_length as u64; let is_multipart = total_size != file_len; - let _msg = if is_multipart { + let msg = if is_multipart { format!("{path} {}", style("[CHUNK]").dim().blue(),) } else { path.clone() }; // Add progress bar - // match &main_pb { - // term::EitherProgressBar::Single(_) => {} - // term::EitherProgressBar::Multi(mpb) => { - // pb.reset(); - // pb.set_style(term::pb_style_file()); - // pb.set_message(msg); - // pb.set_length(total_size); - // - // // Hack to fix weird bug with `MultiProgress` where it renders an empty progress bar and leaves - // // it there - // if !pb_added { - // pb.set_draw_target(indicatif::ProgressDrawTarget::stderr()); - // mpb.add(pb.clone()); - // - // pb_added = true; - // - // if !is_tty { - // eprintln!("Uploading {path} ({})", format_file_size(total_size)?); - // } - // } - // } - // } + match &main_pb { + term::EitherProgressBar::Single(_) => {} + term::EitherProgressBar::Multi(mpb) => { + pb.reset(); + pb.set_message(msg); + pb.set_length(total_size); + + // Hack to fix weird bug with `MultiProgress` where it renders an empty progress bar and leaves + // it there + if !pb_added { + pb.set_draw_target(term::get_pb_draw_target(task.clone())); + mpb.add(pb.clone()); + + pb_added = true; + + if !is_tty { + task.log_stderr(format!( + "Uploading {path} ({})", + format_file_size(total_size)? + )); + } + } + } + } // Create a reader for the slice of the file we need to read file.seek(tokio::io::SeekFrom::Start(presigned_req.byte_offset as u64)) @@ -165,13 +170,13 @@ pub async fn upload_file( let start = Instant::now(); - // // Process the stream with upload progress - // let pb2 = pb.clone(); + // Process the stream with upload progress + let pb2 = pb.clone(); let async_stream = async_stream::stream! { while let Some(chunk) = reader_stream.next().await { - // if let Ok(chunk) = &chunk { - // pb2.inc(chunk.len() as u64); - // } + if let Ok(chunk) = &chunk { + pb2.inc(chunk.len() as u64); + } yield chunk; } @@ -202,27 +207,27 @@ pub async fn upload_file( } else { attempts += 1; - let _status = res.status(); - let _body_text = unwrap!(res.text().await); - - // pb.set_style(term::pb_style_error()); - // pb.set_message(format!( - // "{}{}{} {path} {retry_and_body}", - // style("[").bold().red(), - // style(status).bold().red(), - // style("]").bold().red(), - // path = style(&path).red(), - // retry_and_body = - // style(format!("will retry (attempt #{attempts}): {body_text:?}")) - // .dim() - // .red(), - // )); - - // if !is_tty { - // eprintln!( - // "Error uploading {path} [{status}] (attempt #{attempts}): {body_text:?}", - // ); - // } + let status = res.status(); + let body_text = unwrap!(res.text().await); + + pb.set_style(term::pb_style_error()); + pb.set_message(format!( + "{}{}{} {path} {retry_and_body}", + style("[").bold().red(), + style(status).bold().red(), + style("]").bold().red(), + path = style(&path).red(), + retry_and_body = + style(format!("will retry (attempt #{attempts}): {body_text:?}")) + .dim() + .red(), + )); + + if !is_tty { + task.log_stderr( + "Error uploading {path} [{status}] (attempt #{attempts}): {body_text:?}", + ); + } tokio::time::sleep(Duration::from_secs(5)).await; continue 'upload; @@ -230,22 +235,22 @@ pub async fn upload_file( } }; - // match &main_pb { - // term::EitherProgressBar::Single(pb) => { - // pb.set_message(format!("Uploaded {path}")); - // } - // term::EitherProgressBar::Multi(_) => { - // pb.set_position(total_size); - // pb.finish(); - // } - // } - - // if !is_tty { - // eprintln!( - // "Finished uploading {path} ({:.3}s)", - // upload_time.as_secs_f64() - // ); - // } + match &main_pb { + term::EitherProgressBar::Single(pb) => { + pb.set_message(format!("Uploaded {path}")); + } + term::EitherProgressBar::Multi(_) => { + pb.set_position(total_size); + pb.finish(); + } + } + + if !is_tty { + task.log_stderr(format!( + "Finished uploading {path} ({:.3}s)", + upload_time.as_secs_f64() + )); + } Ok(()) } diff --git a/rivet-toolchain/src/util/task/mod.rs b/rivet-toolchain/src/util/task/mod.rs index e0ae1fbf..af61b71b 100644 --- a/rivet-toolchain/src/util/task/mod.rs +++ b/rivet-toolchain/src/util/task/mod.rs @@ -2,6 +2,7 @@ mod ctx; mod log; use global_error::prelude::*; +use serde::Deserialize; use std::path::Path; use tokio::{ fs::OpenOptions, @@ -14,6 +15,7 @@ pub use ctx::TaskCtx; use crate::tasks::Task; +#[derive(Deserialize)] pub struct RunConfig { /// Path to file that will abort this task if exists. pub abort_path: String, diff --git a/rivet-toolchain/src/util/term.rs b/rivet-toolchain/src/util/term.rs new file mode 100644 index 00000000..1b1b70ea --- /dev/null +++ b/rivet-toolchain/src/util/term.rs @@ -0,0 +1,130 @@ +use console::{style, StyledObject}; +use indicatif::{MultiProgress, ProgressBar, ProgressDrawTarget, ProgressStyle}; +use std::{fmt, io, time::Duration}; + +use super::task::TaskCtx; + +pub fn link(msg: impl ToString) -> StyledObject { + style(msg.to_string()).italic().underlined() +} + +#[derive(Clone)] +pub enum EitherProgressBar { + Single(ProgressBar), + Multi(MultiProgress), +} + +pub fn multi_progress_bar(task: TaskCtx) -> MultiProgress { + let pb = MultiProgress::new(); + pb.set_draw_target(get_pb_draw_target(task)); + pb +} + +pub fn progress_bar(task: TaskCtx) -> ProgressBar { + // Don't draw the first iteration until the pb is styled + let pb = ProgressBar::hidden(); + pb.set_style(pb_style_file(false)); + pb.set_draw_target(get_pb_draw_target(task)); + pb.enable_steady_tick(Duration::from_millis(1000)); + pb +} + +pub fn pb_style_file(include_spinner: bool) -> ProgressStyle { + ProgressStyle::default_bar() + .progress_chars("=> ") + .template(&if include_spinner { + format!( + "{{spinner:.dim}} {}{{eta:.dim}}{} [{{bar:23}}] {{percent:.bold}}{} {}{{bytes:.dim}}{}{{total_bytes:.dim}}{} {{binary_bytes_per_sec:.dim}}{} {{wide_msg}}", + style("(T-").dim(), + style(")").dim(), + style("%").bold(), + style("(").dim(), + style("/").dim(), + style(",").dim(), + style(")").dim(), + ) + } else { + format!( + "{}{{eta:3.dim}} [{{bar:12}}] {{percent:.bold}}{} {}{{bytes:.dim}}{}{{total_bytes:.dim}}{} {{binary_bytes_per_sec:.dim}}{} {{wide_msg}}", + style("T-").dim(), + style("%").bold(), + style("(").dim(), + style("/").dim(), + style(",").dim(), + style(")").dim(), + ) + }) + .expect("invalid progress bar style") +} + +pub fn pb_style_error() -> ProgressStyle { + ProgressStyle::default_bar() + .template(&format!("{} {{wide_msg:.red}}", style("!").bold().red())) + .expect("invalid progress bar style") +} + +pub fn get_pb_draw_target(task: TaskCtx) -> ProgressDrawTarget { + indicatif::ProgressDrawTarget::term_like(Box::new(TaskDrawTarget::new(task))) +} + +pub struct TaskDrawTarget { + task: TaskCtx, +} + +impl fmt::Debug for TaskDrawTarget { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("TaskDrawTarget").finish_non_exhaustive() + } +} + +impl TaskDrawTarget { + pub fn new(task: TaskCtx) -> TaskDrawTarget { + TaskDrawTarget { task } + } +} + +impl indicatif::TermLike for TaskDrawTarget { + fn width(&self) -> u16 { + 80 + } + + fn move_cursor_up(&self, _n: usize) -> io::Result<()> { + Ok(()) + } + + fn move_cursor_down(&self, _n: usize) -> io::Result<()> { + Ok(()) + } + + fn move_cursor_right(&self, _n: usize) -> io::Result<()> { + Ok(()) + } + + fn move_cursor_left(&self, _n: usize) -> io::Result<()> { + Ok(()) + } + + fn write_line(&self, s: &str) -> io::Result<()> { + let s = s.trim(); + if !s.is_empty() { + self.task.log_stdout(s); + } + Ok(()) + } + + fn write_str(&self, s: &str) -> io::Result<()> { + let s = s.trim(); + if !s.is_empty() { + self.task.log_stdout(s); + } + Ok(()) + } + + fn clear_line(&self) -> io::Result<()> { + Ok(()) + } + + fn flush(&self) -> io::Result<()> { + Ok(()) + } +} diff --git a/sdks/rust/.openapi-generator/FILES b/sdks/rust/.openapi-generator/FILES index a0ee6522..b82ff3fd 100644 --- a/sdks/rust/.openapi-generator/FILES +++ b/sdks/rust/.openapi-generator/FILES @@ -19,6 +19,7 @@ docs/AdminClustersListDatacentersResponse.md docs/AdminClustersListServersResponse.md docs/AdminClustersPool.md docs/AdminClustersPoolType.md +docs/AdminClustersPoolUpdate.md docs/AdminClustersProvider.md docs/AdminClustersServer.md docs/AdminClustersServersApi.md @@ -83,6 +84,7 @@ docs/CloudGamesCreateGameRequest.md docs/CloudGamesCreateGameResponse.md docs/CloudGamesCreateGameVersionRequest.md docs/CloudGamesCreateGameVersionResponse.md +docs/CloudGamesCreateServiceTokenResponse.md docs/CloudGamesDeleteMatchmakerLobbyResponse.md docs/CloudGamesExportLobbyLogsRequest.md docs/CloudGamesExportLobbyLogsResponse.md @@ -211,6 +213,11 @@ docs/EeBackendProject.md docs/EeBackendTier.md docs/EeBackendUpdateVariable.md docs/EeBackendVariable.md +docs/EeBillingGameUsage.md +docs/EeBillingGroup.md +docs/EeBillingPlan.md +docs/EeBillingRegionUsage.md +docs/EeBillingSubscription.md docs/EeCloudAnalyticsVariantQuery.md docs/EeCloudAvgPlayDurationByGameModeDataSet.md docs/EeCloudAvgPlayDurationByRegionDataSet.md @@ -243,11 +250,7 @@ docs/EeCloudDestroyedLobbiesByExitCodeDataSet.md docs/EeCloudDestroyedLobbiesByFailureDataSet.md docs/EeCloudFailedLobbiesDataSet.md docs/EeCloudGamesBillingApi.md -docs/EeCloudGamesBillingDynamicServersCapacityRegion.md -docs/EeCloudGamesBillingDynamicServersCapacityRegionConfig.md docs/EeCloudGamesBillingGetResponse.md -docs/EeCloudGamesBillingPlan.md -docs/EeCloudGamesBillingPlanConfig.md docs/EeCloudGamesBillingUpdatePlanRequest.md docs/EeCloudGamesNamespacesAnalyticsApi.md docs/EeCloudGamesNamespacesGetAnalyticsResponse.md @@ -258,7 +261,7 @@ docs/EeCloudGroupsBillingApi.md docs/EeCloudGroupsBillingCreateStripePortalSessionRequest.md docs/EeCloudGroupsBillingCreateStripePortalSessionResponse.md docs/EeCloudGroupsBillingGetBillingResponse.md -docs/EeCloudGroupsBillingGroup.md +docs/EeCloudGroupsBillingGetBillingUsageResponse.md docs/EeCloudGroupsBillingStripePortalSessionIntent.md docs/EeCloudLobbyCountByGameModeDataSet.md docs/EeCloudLobbyCountByRegionDataSet.md @@ -410,6 +413,20 @@ docs/ProvisionDatacentersApi.md docs/ProvisionDatacentersGetTlsResponse.md docs/ProvisionServersApi.md docs/ProvisionServersGetInfoResponse.md +docs/ServersCreateServerNetworkRequest.md +docs/ServersCreateServerPortRequest.md +docs/ServersCreateServerRequest.md +docs/ServersCreateServerResponse.md +docs/ServersDestroyServerResponse.md +docs/ServersGetServerResponse.md +docs/ServersNetwork.md +docs/ServersNetworkMode.md +docs/ServersPort.md +docs/ServersPortProtocol.md +docs/ServersPortRouting.md +docs/ServersResources.md +docs/ServersServer.md +docs/ServersServersApi.md docs/UploadPrepareFile.md docs/UploadPresignedRequest.md docs/ValidationError.md @@ -462,6 +479,7 @@ src/apis/mod.rs src/apis/portal_games_api.rs src/apis/provision_datacenters_api.rs src/apis/provision_servers_api.rs +src/apis/servers_servers_api.rs src/lib.rs src/models/admin_clusters_build_delivery_method.rs src/models/admin_clusters_cluster.rs @@ -476,6 +494,7 @@ src/models/admin_clusters_list_datacenters_response.rs src/models/admin_clusters_list_servers_response.rs src/models/admin_clusters_pool.rs src/models/admin_clusters_pool_type.rs +src/models/admin_clusters_pool_update.rs src/models/admin_clusters_provider.rs src/models/admin_clusters_server.rs src/models/admin_clusters_update_datacenter_request.rs @@ -529,6 +548,7 @@ src/models/cloud_games_create_game_request.rs src/models/cloud_games_create_game_response.rs src/models/cloud_games_create_game_version_request.rs src/models/cloud_games_create_game_version_response.rs +src/models/cloud_games_create_service_token_response.rs src/models/cloud_games_delete_matchmaker_lobby_response.rs src/models/cloud_games_export_lobby_logs_request.rs src/models/cloud_games_export_lobby_logs_response.rs @@ -647,6 +667,11 @@ src/models/ee_backend_project.rs src/models/ee_backend_tier.rs src/models/ee_backend_update_variable.rs src/models/ee_backend_variable.rs +src/models/ee_billing_game_usage.rs +src/models/ee_billing_group.rs +src/models/ee_billing_plan.rs +src/models/ee_billing_region_usage.rs +src/models/ee_billing_subscription.rs src/models/ee_cloud_analytics_variant_query.rs src/models/ee_cloud_avg_play_duration_by_game_mode_data_set.rs src/models/ee_cloud_avg_play_duration_by_region_data_set.rs @@ -676,11 +701,7 @@ src/models/ee_cloud_backend_projects_validate_response.rs src/models/ee_cloud_destroyed_lobbies_by_exit_code_data_set.rs src/models/ee_cloud_destroyed_lobbies_by_failure_data_set.rs src/models/ee_cloud_failed_lobbies_data_set.rs -src/models/ee_cloud_games_billing_dynamic_servers_capacity_region.rs -src/models/ee_cloud_games_billing_dynamic_servers_capacity_region_config.rs src/models/ee_cloud_games_billing_get_response.rs -src/models/ee_cloud_games_billing_plan.rs -src/models/ee_cloud_games_billing_plan_config.rs src/models/ee_cloud_games_billing_update_plan_request.rs src/models/ee_cloud_games_namespaces_get_analytics_response.rs src/models/ee_cloud_games_projects_get_response.rs @@ -688,7 +709,7 @@ src/models/ee_cloud_games_projects_link_request.rs src/models/ee_cloud_groups_billing_create_stripe_portal_session_request.rs src/models/ee_cloud_groups_billing_create_stripe_portal_session_response.rs src/models/ee_cloud_groups_billing_get_billing_response.rs -src/models/ee_cloud_groups_billing_group.rs +src/models/ee_cloud_groups_billing_get_billing_usage_response.rs src/models/ee_cloud_groups_billing_stripe_portal_session_intent.rs src/models/ee_cloud_lobby_count_by_game_mode_data_set.rs src/models/ee_cloud_lobby_count_by_region_data_set.rs @@ -826,6 +847,19 @@ src/models/portal_notification_register_service.rs src/models/portal_notification_unregister_service.rs src/models/provision_datacenters_get_tls_response.rs src/models/provision_servers_get_info_response.rs +src/models/servers_create_server_network_request.rs +src/models/servers_create_server_port_request.rs +src/models/servers_create_server_request.rs +src/models/servers_create_server_response.rs +src/models/servers_destroy_server_response.rs +src/models/servers_get_server_response.rs +src/models/servers_network.rs +src/models/servers_network_mode.rs +src/models/servers_port.rs +src/models/servers_port_protocol.rs +src/models/servers_port_routing.rs +src/models/servers_resources.rs +src/models/servers_server.rs src/models/upload_prepare_file.rs src/models/upload_presigned_request.rs src/models/validation_error.rs diff --git a/sdks/rust/README.md b/sdks/rust/README.md index e19b6ae4..364f28f5 100644 --- a/sdks/rust/README.md +++ b/sdks/rust/README.md @@ -82,6 +82,7 @@ Class | Method | HTTP request | Description *CloudGamesNamespacesLogsApi* | [**cloud_games_namespaces_logs_get_namespace_lobby**](docs/CloudGamesNamespacesLogsApi.md#cloud_games_namespaces_logs_get_namespace_lobby) | **GET** /cloud/games/{game_id}/namespaces/{namespace_id}/logs/lobbies/{lobby_id} | *CloudGamesNamespacesLogsApi* | [**cloud_games_namespaces_logs_list_namespace_lobbies**](docs/CloudGamesNamespacesLogsApi.md#cloud_games_namespaces_logs_list_namespace_lobbies) | **GET** /cloud/games/{game_id}/namespaces/{namespace_id}/logs/lobbies | *CloudGamesTokensApi* | [**cloud_games_tokens_create_cloud_token**](docs/CloudGamesTokensApi.md#cloud_games_tokens_create_cloud_token) | **POST** /cloud/games/{game_id}/tokens/cloud | +*CloudGamesTokensApi* | [**cloud_games_tokens_create_service_token**](docs/CloudGamesTokensApi.md#cloud_games_tokens_create_service_token) | **POST** /cloud/games/{game_id}/tokens/service | *CloudGamesVersionsApi* | [**cloud_games_versions_create_game_version**](docs/CloudGamesVersionsApi.md#cloud_games_versions_create_game_version) | **POST** /cloud/games/{game_id}/versions | *CloudGamesVersionsApi* | [**cloud_games_versions_get_game_version_by_id**](docs/CloudGamesVersionsApi.md#cloud_games_versions_get_game_version_by_id) | **GET** /cloud/games/{game_id}/versions/{version_id} | *CloudGamesVersionsApi* | [**cloud_games_versions_reserve_version_name**](docs/CloudGamesVersionsApi.md#cloud_games_versions_reserve_version_name) | **POST** /cloud/games/{game_id}/versions/reserve-name | @@ -115,6 +116,7 @@ Class | Method | HTTP request | Description *EeCloudGamesProjectsApi* | [**ee_cloud_games_projects_link**](docs/EeCloudGamesProjectsApi.md#ee_cloud_games_projects_link) | **POST** /cloud/games/{game_id}/project-link | *EeCloudGroupsBillingApi* | [**ee_cloud_groups_billing_create_stripe_portal_session**](docs/EeCloudGroupsBillingApi.md#ee_cloud_groups_billing_create_stripe_portal_session) | **POST** /cloud/groups/{group_id}/billing/stripe-portal-session | *EeCloudGroupsBillingApi* | [**ee_cloud_groups_billing_get**](docs/EeCloudGroupsBillingApi.md#ee_cloud_groups_billing_get) | **GET** /cloud/groups/{group_id}/billing | +*EeCloudGroupsBillingApi* | [**ee_cloud_groups_billing_get_usage**](docs/EeCloudGroupsBillingApi.md#ee_cloud_groups_billing_get_usage) | **GET** /cloud/groups/{group_id}/billing/usage | *GroupApi* | [**group_ban_identity**](docs/GroupApi.md#group_ban_identity) | **POST** /group/groups/{group_id}/bans/{identity_id} | *GroupApi* | [**group_complete_avatar_upload**](docs/GroupApi.md#group_complete_avatar_upload) | **POST** /group/groups/{group_id}/avatar-upload/{upload_id}/complete | *GroupApi* | [**group_create**](docs/GroupApi.md#group_create) | **POST** /group/groups | @@ -191,6 +193,9 @@ Class | Method | HTTP request | Description *PortalGamesApi* | [**portal_games_get_game_profile**](docs/PortalGamesApi.md#portal_games_get_game_profile) | **GET** /portal/games/{game_name_id}/profile | *ProvisionDatacentersApi* | [**provision_datacenters_get_tls**](docs/ProvisionDatacentersApi.md#provision_datacenters_get_tls) | **GET** /datacenters/{datacenter_id}/tls | *ProvisionServersApi* | [**provision_servers_get_info**](docs/ProvisionServersApi.md#provision_servers_get_info) | **GET** /servers/{ip} | +*ServersServersApi* | [**servers_servers_create**](docs/ServersServersApi.md#servers_servers_create) | **POST** /servers/servers | +*ServersServersApi* | [**servers_servers_destroy**](docs/ServersServersApi.md#servers_servers_destroy) | **DELETE** /servers/servers/{server_id} | +*ServersServersApi* | [**servers_servers_get**](docs/ServersServersApi.md#servers_servers_get) | **GET** /servers/servers/{server_id} | ## Documentation For Models @@ -208,6 +213,7 @@ Class | Method | HTTP request | Description - [AdminClustersListServersResponse](docs/AdminClustersListServersResponse.md) - [AdminClustersPool](docs/AdminClustersPool.md) - [AdminClustersPoolType](docs/AdminClustersPoolType.md) + - [AdminClustersPoolUpdate](docs/AdminClustersPoolUpdate.md) - [AdminClustersProvider](docs/AdminClustersProvider.md) - [AdminClustersServer](docs/AdminClustersServer.md) - [AdminClustersUpdateDatacenterRequest](docs/AdminClustersUpdateDatacenterRequest.md) @@ -261,6 +267,7 @@ Class | Method | HTTP request | Description - [CloudGamesCreateGameResponse](docs/CloudGamesCreateGameResponse.md) - [CloudGamesCreateGameVersionRequest](docs/CloudGamesCreateGameVersionRequest.md) - [CloudGamesCreateGameVersionResponse](docs/CloudGamesCreateGameVersionResponse.md) + - [CloudGamesCreateServiceTokenResponse](docs/CloudGamesCreateServiceTokenResponse.md) - [CloudGamesDeleteMatchmakerLobbyResponse](docs/CloudGamesDeleteMatchmakerLobbyResponse.md) - [CloudGamesExportLobbyLogsRequest](docs/CloudGamesExportLobbyLogsRequest.md) - [CloudGamesExportLobbyLogsResponse](docs/CloudGamesExportLobbyLogsResponse.md) @@ -379,6 +386,11 @@ Class | Method | HTTP request | Description - [EeBackendTier](docs/EeBackendTier.md) - [EeBackendUpdateVariable](docs/EeBackendUpdateVariable.md) - [EeBackendVariable](docs/EeBackendVariable.md) + - [EeBillingGameUsage](docs/EeBillingGameUsage.md) + - [EeBillingGroup](docs/EeBillingGroup.md) + - [EeBillingPlan](docs/EeBillingPlan.md) + - [EeBillingRegionUsage](docs/EeBillingRegionUsage.md) + - [EeBillingSubscription](docs/EeBillingSubscription.md) - [EeCloudAnalyticsVariantQuery](docs/EeCloudAnalyticsVariantQuery.md) - [EeCloudAvgPlayDurationByGameModeDataSet](docs/EeCloudAvgPlayDurationByGameModeDataSet.md) - [EeCloudAvgPlayDurationByRegionDataSet](docs/EeCloudAvgPlayDurationByRegionDataSet.md) @@ -408,11 +420,7 @@ Class | Method | HTTP request | Description - [EeCloudDestroyedLobbiesByExitCodeDataSet](docs/EeCloudDestroyedLobbiesByExitCodeDataSet.md) - [EeCloudDestroyedLobbiesByFailureDataSet](docs/EeCloudDestroyedLobbiesByFailureDataSet.md) - [EeCloudFailedLobbiesDataSet](docs/EeCloudFailedLobbiesDataSet.md) - - [EeCloudGamesBillingDynamicServersCapacityRegion](docs/EeCloudGamesBillingDynamicServersCapacityRegion.md) - - [EeCloudGamesBillingDynamicServersCapacityRegionConfig](docs/EeCloudGamesBillingDynamicServersCapacityRegionConfig.md) - [EeCloudGamesBillingGetResponse](docs/EeCloudGamesBillingGetResponse.md) - - [EeCloudGamesBillingPlan](docs/EeCloudGamesBillingPlan.md) - - [EeCloudGamesBillingPlanConfig](docs/EeCloudGamesBillingPlanConfig.md) - [EeCloudGamesBillingUpdatePlanRequest](docs/EeCloudGamesBillingUpdatePlanRequest.md) - [EeCloudGamesNamespacesGetAnalyticsResponse](docs/EeCloudGamesNamespacesGetAnalyticsResponse.md) - [EeCloudGamesProjectsGetResponse](docs/EeCloudGamesProjectsGetResponse.md) @@ -420,7 +428,7 @@ Class | Method | HTTP request | Description - [EeCloudGroupsBillingCreateStripePortalSessionRequest](docs/EeCloudGroupsBillingCreateStripePortalSessionRequest.md) - [EeCloudGroupsBillingCreateStripePortalSessionResponse](docs/EeCloudGroupsBillingCreateStripePortalSessionResponse.md) - [EeCloudGroupsBillingGetBillingResponse](docs/EeCloudGroupsBillingGetBillingResponse.md) - - [EeCloudGroupsBillingGroup](docs/EeCloudGroupsBillingGroup.md) + - [EeCloudGroupsBillingGetBillingUsageResponse](docs/EeCloudGroupsBillingGetBillingUsageResponse.md) - [EeCloudGroupsBillingStripePortalSessionIntent](docs/EeCloudGroupsBillingStripePortalSessionIntent.md) - [EeCloudLobbyCountByGameModeDataSet](docs/EeCloudLobbyCountByGameModeDataSet.md) - [EeCloudLobbyCountByRegionDataSet](docs/EeCloudLobbyCountByRegionDataSet.md) @@ -557,6 +565,19 @@ Class | Method | HTTP request | Description - [PortalNotificationUnregisterService](docs/PortalNotificationUnregisterService.md) - [ProvisionDatacentersGetTlsResponse](docs/ProvisionDatacentersGetTlsResponse.md) - [ProvisionServersGetInfoResponse](docs/ProvisionServersGetInfoResponse.md) + - [ServersCreateServerNetworkRequest](docs/ServersCreateServerNetworkRequest.md) + - [ServersCreateServerPortRequest](docs/ServersCreateServerPortRequest.md) + - [ServersCreateServerRequest](docs/ServersCreateServerRequest.md) + - [ServersCreateServerResponse](docs/ServersCreateServerResponse.md) + - [ServersDestroyServerResponse](docs/ServersDestroyServerResponse.md) + - [ServersGetServerResponse](docs/ServersGetServerResponse.md) + - [ServersNetwork](docs/ServersNetwork.md) + - [ServersNetworkMode](docs/ServersNetworkMode.md) + - [ServersPort](docs/ServersPort.md) + - [ServersPortProtocol](docs/ServersPortProtocol.md) + - [ServersPortRouting](docs/ServersPortRouting.md) + - [ServersResources](docs/ServersResources.md) + - [ServersServer](docs/ServersServer.md) - [UploadPrepareFile](docs/UploadPrepareFile.md) - [UploadPresignedRequest](docs/UploadPresignedRequest.md) - [ValidationError](docs/ValidationError.md) diff --git a/sdks/rust/docs/AdminClustersCreateDatacenterRequest.md b/sdks/rust/docs/AdminClustersCreateDatacenterRequest.md index 0b33f6a9..68a4a442 100644 --- a/sdks/rust/docs/AdminClustersCreateDatacenterRequest.md +++ b/sdks/rust/docs/AdminClustersCreateDatacenterRequest.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **build_delivery_method** | [**crate::models::AdminClustersBuildDeliveryMethod**](AdminClustersBuildDeliveryMethod.md) | | **display_name** | **String** | | **name_id** | **String** | | +**prebakes_enabled** | **bool** | | **provider** | [**crate::models::AdminClustersProvider**](AdminClustersProvider.md) | | **provider_datacenter_id** | **String** | | diff --git a/sdks/rust/docs/AdminClustersPoolUpdate.md b/sdks/rust/docs/AdminClustersPoolUpdate.md new file mode 100644 index 00000000..20ac9888 --- /dev/null +++ b/sdks/rust/docs/AdminClustersPoolUpdate.md @@ -0,0 +1,16 @@ +# AdminClustersPoolUpdate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**desired_count** | Option<**i32**> | | [optional] +**drain_timeout** | Option<**i64**> | | [optional] +**hardware** | [**Vec**](AdminClustersHardware.md) | | +**max_count** | Option<**i32**> | | [optional] +**min_count** | Option<**i32**> | | [optional] +**pool_type** | [**crate::models::AdminClustersPoolType**](AdminClustersPoolType.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdks/rust/docs/AdminClustersUpdateDatacenterRequest.md b/sdks/rust/docs/AdminClustersUpdateDatacenterRequest.md index 7e05f0a8..8709d3d1 100644 --- a/sdks/rust/docs/AdminClustersUpdateDatacenterRequest.md +++ b/sdks/rust/docs/AdminClustersUpdateDatacenterRequest.md @@ -4,12 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**desired_count** | Option<**i32**> | | [optional] -**drain_timeout** | Option<**i64**> | | [optional] -**hardware** | [**Vec**](AdminClustersHardware.md) | | -**max_count** | Option<**i32**> | | [optional] -**min_count** | Option<**i32**> | | [optional] -**pool_type** | [**crate::models::AdminClustersPoolType**](AdminClustersPoolType.md) | | +**pools** | [**Vec**](AdminClustersPoolUpdate.md) | | +**prebakes_enabled** | Option<**bool**> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/rust/docs/EeCloudGamesBillingDynamicServersCapacityRegion.md b/sdks/rust/docs/CloudGamesCreateServiceTokenResponse.md similarity index 63% rename from sdks/rust/docs/EeCloudGamesBillingDynamicServersCapacityRegion.md rename to sdks/rust/docs/CloudGamesCreateServiceTokenResponse.md index d02a5437..c8d021b0 100644 --- a/sdks/rust/docs/EeCloudGamesBillingDynamicServersCapacityRegion.md +++ b/sdks/rust/docs/CloudGamesCreateServiceTokenResponse.md @@ -1,11 +1,10 @@ -# EeCloudGamesBillingDynamicServersCapacityRegion +# CloudGamesCreateServiceTokenResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**cores** | **i32** | | -**region** | [**crate::models::CloudRegionSummary**](CloudRegionSummary.md) | | +**token** | **String** | A JSON Web Token. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/rust/docs/CloudGamesTokensApi.md b/sdks/rust/docs/CloudGamesTokensApi.md index c0ee6276..8c64a986 100644 --- a/sdks/rust/docs/CloudGamesTokensApi.md +++ b/sdks/rust/docs/CloudGamesTokensApi.md @@ -5,6 +5,7 @@ All URIs are relative to *https://api.rivet.gg* Method | HTTP request | Description ------------- | ------------- | ------------- [**cloud_games_tokens_create_cloud_token**](CloudGamesTokensApi.md#cloud_games_tokens_create_cloud_token) | **POST** /cloud/games/{game_id}/tokens/cloud | +[**cloud_games_tokens_create_service_token**](CloudGamesTokensApi.md#cloud_games_tokens_create_service_token) | **POST** /cloud/games/{game_id}/tokens/service | @@ -37,3 +38,33 @@ Name | Type | Description | Required | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +## cloud_games_tokens_create_service_token + +> crate::models::CloudGamesCreateCloudTokenResponse cloud_games_tokens_create_service_token(game_id) + + +Creates a new game service token. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**game_id** | **uuid::Uuid** | | [required] | + +### Return type + +[**crate::models::CloudGamesCreateCloudTokenResponse**](CloudGamesCreateCloudTokenResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/sdks/rust/docs/EeCloudGamesBillingPlan.md b/sdks/rust/docs/EeBillingGameUsage.md similarity index 59% rename from sdks/rust/docs/EeCloudGamesBillingPlan.md rename to sdks/rust/docs/EeBillingGameUsage.md index 015f9c98..60bbca83 100644 --- a/sdks/rust/docs/EeCloudGamesBillingPlan.md +++ b/sdks/rust/docs/EeBillingGameUsage.md @@ -1,10 +1,11 @@ -# EeCloudGamesBillingPlan +# EeBillingGameUsage ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**dynamic_servers_capacity** | [**Vec**](EeCloudGamesBillingDynamicServersCapacityRegion.md) | | +**game_id** | [**uuid::Uuid**](uuid::Uuid.md) | | +**regions** | [**Vec**](EeBillingRegionUsage.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/rust/docs/EeCloudGroupsBillingGroup.md b/sdks/rust/docs/EeBillingGroup.md similarity index 95% rename from sdks/rust/docs/EeCloudGroupsBillingGroup.md rename to sdks/rust/docs/EeBillingGroup.md index 41fc0ff2..17010d5a 100644 --- a/sdks/rust/docs/EeCloudGroupsBillingGroup.md +++ b/sdks/rust/docs/EeBillingGroup.md @@ -1,4 +1,4 @@ -# EeCloudGroupsBillingGroup +# EeBillingGroup ## Properties diff --git a/sdks/rust/docs/EeCloudGamesBillingPlanConfig.md b/sdks/rust/docs/EeBillingPlan.md similarity index 57% rename from sdks/rust/docs/EeCloudGamesBillingPlanConfig.md rename to sdks/rust/docs/EeBillingPlan.md index 136d93df..7ffd0329 100644 --- a/sdks/rust/docs/EeCloudGamesBillingPlanConfig.md +++ b/sdks/rust/docs/EeBillingPlan.md @@ -1,10 +1,9 @@ -# EeCloudGamesBillingPlanConfig +# EeBillingPlan ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**dynamic_servers_capacity** | [**Vec**](EeCloudGamesBillingDynamicServersCapacityRegionConfig.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/rust/docs/EeCloudGamesBillingDynamicServersCapacityRegionConfig.md b/sdks/rust/docs/EeBillingRegionUsage.md similarity index 79% rename from sdks/rust/docs/EeCloudGamesBillingDynamicServersCapacityRegionConfig.md rename to sdks/rust/docs/EeBillingRegionUsage.md index 0b1cd3b4..519a4d93 100644 --- a/sdks/rust/docs/EeCloudGamesBillingDynamicServersCapacityRegionConfig.md +++ b/sdks/rust/docs/EeBillingRegionUsage.md @@ -1,11 +1,11 @@ -# EeCloudGamesBillingDynamicServersCapacityRegionConfig +# EeBillingRegionUsage ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**cores** | **i32** | | **region_id** | [**uuid::Uuid**](uuid::Uuid.md) | | +**uptime** | **i64** | Total CPU usage time in milliseconds. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/rust/docs/EeBillingSubscription.md b/sdks/rust/docs/EeBillingSubscription.md new file mode 100644 index 00000000..a039590d --- /dev/null +++ b/sdks/rust/docs/EeBillingSubscription.md @@ -0,0 +1,12 @@ +# EeBillingSubscription + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**period_end_ts** | **String** | RFC3339 timestamp | +**period_start_ts** | **String** | RFC3339 timestamp | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdks/rust/docs/EeCloudGamesBillingApi.md b/sdks/rust/docs/EeCloudGamesBillingApi.md index 6b6a3f64..c44701aa 100644 --- a/sdks/rust/docs/EeCloudGamesBillingApi.md +++ b/sdks/rust/docs/EeCloudGamesBillingApi.md @@ -11,7 +11,7 @@ Method | HTTP request | Description ## ee_cloud_games_billing_get -> crate::models::EeCloudGamesBillingGetResponse ee_cloud_games_billing_get(game_id) +> crate::models::EeCloudGamesBillingGetResponse ee_cloud_games_billing_get(game_id, watch_index) ### Parameters @@ -20,6 +20,7 @@ Method | HTTP request | Description Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **game_id** | **uuid::Uuid** | | [required] | +**watch_index** | Option<**String**> | | | ### Return type diff --git a/sdks/rust/docs/EeCloudGamesBillingGetResponse.md b/sdks/rust/docs/EeCloudGamesBillingGetResponse.md index a56898ed..49297539 100644 --- a/sdks/rust/docs/EeCloudGamesBillingGetResponse.md +++ b/sdks/rust/docs/EeCloudGamesBillingGetResponse.md @@ -4,7 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**plan** | [**crate::models::EeCloudGamesBillingPlan**](EeCloudGamesBillingPlan.md) | | +**active_plan** | [**crate::models::EeBillingPlan**](EeBillingPlan.md) | | +**plan** | [**crate::models::EeBillingPlan**](EeBillingPlan.md) | | +**subscription** | Option<[**crate::models::EeBillingSubscription**](EeBillingSubscription.md)> | | [optional] +**watch** | [**crate::models::WatchResponse**](WatchResponse.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/rust/docs/EeCloudGamesBillingUpdatePlanRequest.md b/sdks/rust/docs/EeCloudGamesBillingUpdatePlanRequest.md index f7552339..14c57c07 100644 --- a/sdks/rust/docs/EeCloudGamesBillingUpdatePlanRequest.md +++ b/sdks/rust/docs/EeCloudGamesBillingUpdatePlanRequest.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**plan** | [**crate::models::EeCloudGamesBillingPlanConfig**](EeCloudGamesBillingPlanConfig.md) | | +**plan** | [**crate::models::EeBillingPlan**](EeBillingPlan.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/rust/docs/EeCloudGroupsBillingApi.md b/sdks/rust/docs/EeCloudGroupsBillingApi.md index 3b8db72d..b5e1e01a 100644 --- a/sdks/rust/docs/EeCloudGroupsBillingApi.md +++ b/sdks/rust/docs/EeCloudGroupsBillingApi.md @@ -6,6 +6,7 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**ee_cloud_groups_billing_create_stripe_portal_session**](EeCloudGroupsBillingApi.md#ee_cloud_groups_billing_create_stripe_portal_session) | **POST** /cloud/groups/{group_id}/billing/stripe-portal-session | [**ee_cloud_groups_billing_get**](EeCloudGroupsBillingApi.md#ee_cloud_groups_billing_get) | **GET** /cloud/groups/{group_id}/billing | +[**ee_cloud_groups_billing_get_usage**](EeCloudGroupsBillingApi.md#ee_cloud_groups_billing_get_usage) | **GET** /cloud/groups/{group_id}/billing/usage | @@ -66,3 +67,33 @@ Name | Type | Description | Required | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +## ee_cloud_groups_billing_get_usage + +> crate::models::EeCloudGroupsBillingGetBillingUsageResponse ee_cloud_groups_billing_get_usage(group_id, query_start_ts, query_end_ts) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**group_id** | **uuid::Uuid** | | [required] | +**query_start_ts** | Option<**String**> | | | +**query_end_ts** | Option<**String**> | | | + +### Return type + +[**crate::models::EeCloudGroupsBillingGetBillingUsageResponse**](EeCloudGroupsBillingGetBillingUsageResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/sdks/rust/docs/EeCloudGroupsBillingGetBillingResponse.md b/sdks/rust/docs/EeCloudGroupsBillingGetBillingResponse.md index 030b5b33..0a22e9ea 100644 --- a/sdks/rust/docs/EeCloudGroupsBillingGetBillingResponse.md +++ b/sdks/rust/docs/EeCloudGroupsBillingGetBillingResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**group** | [**crate::models::EeCloudGroupsBillingGroup**](EeCloudGroupsBillingGroup.md) | | +**group** | [**crate::models::EeBillingGroup**](EeBillingGroup.md) | | **watch** | [**crate::models::WatchResponse**](WatchResponse.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/rust/docs/EeCloudGroupsBillingGetBillingUsageResponse.md b/sdks/rust/docs/EeCloudGroupsBillingGetBillingUsageResponse.md new file mode 100644 index 00000000..3d6e0781 --- /dev/null +++ b/sdks/rust/docs/EeCloudGroupsBillingGetBillingUsageResponse.md @@ -0,0 +1,11 @@ +# EeCloudGroupsBillingGetBillingUsageResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**games** | [**Vec**](EeBillingGameUsage.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdks/rust/docs/ServersCreateServerNetworkRequest.md b/sdks/rust/docs/ServersCreateServerNetworkRequest.md new file mode 100644 index 00000000..633ac595 --- /dev/null +++ b/sdks/rust/docs/ServersCreateServerNetworkRequest.md @@ -0,0 +1,12 @@ +# ServersCreateServerNetworkRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mode** | Option<[**crate::models::ServersNetworkMode**](ServersNetworkMode.md)> | | [optional] +**ports** | [**::std::collections::HashMap**](ServersCreateServerPortRequest.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdks/rust/docs/ServersCreateServerPortRequest.md b/sdks/rust/docs/ServersCreateServerPortRequest.md new file mode 100644 index 00000000..8e5da96a --- /dev/null +++ b/sdks/rust/docs/ServersCreateServerPortRequest.md @@ -0,0 +1,13 @@ +# ServersCreateServerPortRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**protocol** | [**crate::models::ServersPortProtocol**](ServersPortProtocol.md) | | +**routing** | Option<[**crate::models::ServersPortRouting**](ServersPortRouting.md)> | | [optional] +**server_port** | Option<**i32**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdks/rust/docs/ServersCreateServerRequest.md b/sdks/rust/docs/ServersCreateServerRequest.md new file mode 100644 index 00000000..a98e9985 --- /dev/null +++ b/sdks/rust/docs/ServersCreateServerRequest.md @@ -0,0 +1,18 @@ +# ServersCreateServerRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arguments** | Option<**Vec**> | | [optional] +**datacenter** | **String** | The name ID of the datacenter | +**environment** | Option<**::std::collections::HashMap**> | | [optional] +**image_id** | [**uuid::Uuid**](uuid::Uuid.md) | | +**kill_timeout** | Option<**i64**> | The duration to wait for in milliseconds before killing the server. This should be set to a safe default, and can be overridden during a DELETE request if needed. | [optional] +**metadata** | Option<[**serde_json::Value**](.md)> | | +**network** | [**crate::models::ServersCreateServerNetworkRequest**](ServersCreateServerNetworkRequest.md) | | +**resources** | [**crate::models::ServersResources**](ServersResources.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdks/rust/docs/ServersCreateServerResponse.md b/sdks/rust/docs/ServersCreateServerResponse.md new file mode 100644 index 00000000..29bae37b --- /dev/null +++ b/sdks/rust/docs/ServersCreateServerResponse.md @@ -0,0 +1,11 @@ +# ServersCreateServerResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**server** | [**crate::models::ServersServer**](ServersServer.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdks/rust/docs/ServersDestroyServerResponse.md b/sdks/rust/docs/ServersDestroyServerResponse.md new file mode 100644 index 00000000..0cf193ed --- /dev/null +++ b/sdks/rust/docs/ServersDestroyServerResponse.md @@ -0,0 +1,11 @@ +# ServersDestroyServerResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**server_id** | [**uuid::Uuid**](uuid::Uuid.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdks/rust/docs/ServersGetServerResponse.md b/sdks/rust/docs/ServersGetServerResponse.md new file mode 100644 index 00000000..f5e5e42f --- /dev/null +++ b/sdks/rust/docs/ServersGetServerResponse.md @@ -0,0 +1,11 @@ +# ServersGetServerResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**server** | [**crate::models::ServersServer**](ServersServer.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdks/rust/docs/ServersNetwork.md b/sdks/rust/docs/ServersNetwork.md new file mode 100644 index 00000000..e1b81955 --- /dev/null +++ b/sdks/rust/docs/ServersNetwork.md @@ -0,0 +1,12 @@ +# ServersNetwork + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mode** | Option<[**crate::models::ServersNetworkMode**](ServersNetworkMode.md)> | | [optional] +**ports** | [**::std::collections::HashMap**](ServersPort.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdks/rust/docs/ServersNetworkMode.md b/sdks/rust/docs/ServersNetworkMode.md new file mode 100644 index 00000000..9fdd3e28 --- /dev/null +++ b/sdks/rust/docs/ServersNetworkMode.md @@ -0,0 +1,10 @@ +# ServersNetworkMode + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdks/rust/docs/ServersPort.md b/sdks/rust/docs/ServersPort.md new file mode 100644 index 00000000..c1494864 --- /dev/null +++ b/sdks/rust/docs/ServersPort.md @@ -0,0 +1,15 @@ +# ServersPort + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**protocol** | [**crate::models::ServersPortProtocol**](ServersPortProtocol.md) | | +**public_hostname** | Option<**String**> | | [optional] +**public_port** | Option<**i32**> | | [optional] +**routing** | [**crate::models::ServersPortRouting**](ServersPortRouting.md) | | +**server_port** | Option<**i32**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdks/rust/docs/ServersPortProtocol.md b/sdks/rust/docs/ServersPortProtocol.md new file mode 100644 index 00000000..595d11df --- /dev/null +++ b/sdks/rust/docs/ServersPortProtocol.md @@ -0,0 +1,10 @@ +# ServersPortProtocol + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdks/rust/docs/ServersPortRouting.md b/sdks/rust/docs/ServersPortRouting.md new file mode 100644 index 00000000..1ac474c2 --- /dev/null +++ b/sdks/rust/docs/ServersPortRouting.md @@ -0,0 +1,12 @@ +# ServersPortRouting + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**game_guard** | Option<[**serde_json::Value**](.md)> | | [optional] +**host** | Option<[**serde_json::Value**](.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdks/rust/docs/ServersResources.md b/sdks/rust/docs/ServersResources.md new file mode 100644 index 00000000..3b3f9d68 --- /dev/null +++ b/sdks/rust/docs/ServersResources.md @@ -0,0 +1,12 @@ +# ServersResources + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cpu** | **i32** | The number of CPU cores in millicores, or 1/1000 of a core. For example, 1/8 of a core would be 125 millicores, and 1 core would be 1000 millicores. | +**memory** | **i32** | The amount of memory in megabytes | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdks/rust/docs/ServersServer.md b/sdks/rust/docs/ServersServer.md new file mode 100644 index 00000000..bf6d0af8 --- /dev/null +++ b/sdks/rust/docs/ServersServer.md @@ -0,0 +1,23 @@ +# ServersServer + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arguments** | Option<**Vec**> | | [optional] +**cluster_id** | [**uuid::Uuid**](uuid::Uuid.md) | | +**create_ts** | **i64** | | +**datacenter_id** | [**uuid::Uuid**](uuid::Uuid.md) | | +**destroy_ts** | Option<**i64**> | | [optional] +**environment** | Option<**::std::collections::HashMap**> | | [optional] +**game_id** | [**uuid::Uuid**](uuid::Uuid.md) | | +**image_id** | [**uuid::Uuid**](uuid::Uuid.md) | | +**kill_timeout** | Option<**i64**> | The duration to wait for in milliseconds before killing the server. This should be set to a safe default, and can be overridden during a DELETE request if needed. | [optional] +**metadata** | Option<[**serde_json::Value**](.md)> | | +**network** | [**crate::models::ServersNetwork**](ServersNetwork.md) | | +**resources** | [**crate::models::ServersResources**](ServersResources.md) | | +**server_id** | [**uuid::Uuid**](uuid::Uuid.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdks/rust/docs/ServersServersApi.md b/sdks/rust/docs/ServersServersApi.md new file mode 100644 index 00000000..3bc24a18 --- /dev/null +++ b/sdks/rust/docs/ServersServersApi.md @@ -0,0 +1,102 @@ +# \ServersServersApi + +All URIs are relative to *https://api.rivet.gg* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**servers_servers_create**](ServersServersApi.md#servers_servers_create) | **POST** /servers/servers | +[**servers_servers_destroy**](ServersServersApi.md#servers_servers_destroy) | **DELETE** /servers/servers/{server_id} | +[**servers_servers_get**](ServersServersApi.md#servers_servers_get) | **GET** /servers/servers/{server_id} | + + + +## servers_servers_create + +> crate::models::ServersCreateServerResponse servers_servers_create(servers_create_server_request) + + +Create a new dynamic server. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**servers_create_server_request** | [**ServersCreateServerRequest**](ServersCreateServerRequest.md) | | [required] | + +### Return type + +[**crate::models::ServersCreateServerResponse**](ServersCreateServerResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## servers_servers_destroy + +> crate::models::ServersDestroyServerResponse servers_servers_destroy(server_id, override_kill_timeout) + + +Destroy a dynamic server. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **uuid::Uuid** | The id of the server to destroy | [required] | +**override_kill_timeout** | Option<**i64**> | The duration to wait for in milliseconds before killing the server. This should be used to override the default kill timeout if a faster time is needed, say for ignoring a graceful shutdown. | | + +### Return type + +[**crate::models::ServersDestroyServerResponse**](ServersDestroyServerResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## servers_servers_get + +> crate::models::ServersGetServerResponse servers_servers_get(server_id) + + +Gets a dynamic server. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **uuid::Uuid** | The id of the server to destroy | [required] | + +### Return type + +[**crate::models::ServersGetServerResponse**](ServersGetServerResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/sdks/rust/src/apis/admin_api.rs b/sdks/rust/src/apis/admin_api.rs index 39bf4f80..a5e8e9e3 100644 --- a/sdks/rust/src/apis/admin_api.rs +++ b/sdks/rust/src/apis/admin_api.rs @@ -4,65 +4,59 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`admin_login`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum AdminLoginError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } -pub async fn admin_login( - configuration: &configuration::Configuration, - admin_login_request: crate::models::AdminLoginRequest, -) -> Result> { - let local_var_configuration = configuration; - let local_var_client = &local_var_configuration.client; +pub async fn admin_login(configuration: &configuration::Configuration, admin_login_request: crate::models::AdminLoginRequest) -> Result> { + let local_var_configuration = configuration; - let local_var_uri_str = format!("{}/admin/login", local_var_configuration.base_path); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let local_var_client = &local_var_configuration.client; - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&admin_login_request); + let local_var_uri_str = format!("{}/admin/login", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&admin_login_request); - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/admin_clusters_api.rs b/sdks/rust/src/apis/admin_clusters_api.rs index fd7fe637..d30d7729 100644 --- a/sdks/rust/src/apis/admin_clusters_api.rs +++ b/sdks/rust/src/apis/admin_clusters_api.rs @@ -4,119 +4,104 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`admin_clusters_create`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum AdminClustersCreateError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`admin_clusters_list`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum AdminClustersListError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } + /// Create a new cluster -pub async fn admin_clusters_create( - configuration: &configuration::Configuration, - admin_clusters_create_cluster_request: crate::models::AdminClustersCreateClusterRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/admin/clusters", local_var_configuration.base_path); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&admin_clusters_create_cluster_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn admin_clusters_create(configuration: &configuration::Configuration, admin_clusters_create_cluster_request: crate::models::AdminClustersCreateClusterRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/admin/clusters", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&admin_clusters_create_cluster_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Get clusters -pub async fn admin_clusters_list( - configuration: &configuration::Configuration, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/admin/clusters", local_var_configuration.base_path); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn admin_clusters_list(configuration: &configuration::Configuration, ) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/admin/clusters", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/admin_clusters_datacenters_api.rs b/sdks/rust/src/apis/admin_clusters_datacenters_api.rs index 61cb45cf..9953689c 100644 --- a/sdks/rust/src/apis/admin_clusters_datacenters_api.rs +++ b/sdks/rust/src/apis/admin_clusters_datacenters_api.rs @@ -4,195 +4,147 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`admin_clusters_datacenters_create`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum AdminClustersDatacentersCreateError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`admin_clusters_datacenters_list`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum AdminClustersDatacentersListError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`admin_clusters_datacenters_update`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum AdminClustersDatacentersUpdateError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } -pub async fn admin_clusters_datacenters_create( - configuration: &configuration::Configuration, - cluster_id: &str, - admin_clusters_create_datacenter_request: crate::models::AdminClustersCreateDatacenterRequest, -) -> Result< - crate::models::AdminClustersCreateDatacenterResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/admin/clusters/{cluster_id}/datacenters", - local_var_configuration.base_path, - cluster_id = crate::apis::urlencode(cluster_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&admin_clusters_create_datacenter_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } + +pub async fn admin_clusters_datacenters_create(configuration: &configuration::Configuration, cluster_id: &str, admin_clusters_create_datacenter_request: crate::models::AdminClustersCreateDatacenterRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/admin/clusters/{cluster_id}/datacenters", local_var_configuration.base_path, cluster_id=crate::apis::urlencode(cluster_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&admin_clusters_create_datacenter_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Get datacenters of a cluster -pub async fn admin_clusters_datacenters_list( - configuration: &configuration::Configuration, - cluster_id: &str, -) -> Result< - crate::models::AdminClustersListDatacentersResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/admin/clusters/{cluster_id}/datacenters", - local_var_configuration.base_path, - cluster_id = crate::apis::urlencode(cluster_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn admin_clusters_datacenters_list(configuration: &configuration::Configuration, cluster_id: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/admin/clusters/{cluster_id}/datacenters", local_var_configuration.base_path, cluster_id=crate::apis::urlencode(cluster_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } -pub async fn admin_clusters_datacenters_update( - configuration: &configuration::Configuration, - cluster_id: &str, - datacenter_id: &str, - admin_clusters_update_datacenter_request: crate::models::AdminClustersUpdateDatacenterRequest, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/admin/clusters/{cluster_id}/datacenters/{datacenter_id}", - local_var_configuration.base_path, - cluster_id = crate::apis::urlencode(cluster_id), - datacenter_id = crate::apis::urlencode(datacenter_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&admin_clusters_update_datacenter_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn admin_clusters_datacenters_update(configuration: &configuration::Configuration, cluster_id: &str, datacenter_id: &str, admin_clusters_update_datacenter_request: crate::models::AdminClustersUpdateDatacenterRequest) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/admin/clusters/{cluster_id}/datacenters/{datacenter_id}", local_var_configuration.base_path, cluster_id=crate::apis::urlencode(cluster_id), datacenter_id=crate::apis::urlencode(datacenter_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&admin_clusters_update_datacenter_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/admin_clusters_servers_api.rs b/sdks/rust/src/apis/admin_clusters_servers_api.rs index 638fbc65..d79e652a 100644 --- a/sdks/rust/src/apis/admin_clusters_servers_api.rs +++ b/sdks/rust/src/apis/admin_clusters_servers_api.rs @@ -4,242 +4,180 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`admin_clusters_servers_destroy`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum AdminClustersServersDestroyError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`admin_clusters_servers_list`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum AdminClustersServersListError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`admin_clusters_servers_taint`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum AdminClustersServersTaintError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } -pub async fn admin_clusters_servers_destroy( - configuration: &configuration::Configuration, - cluster_id: &str, - server_id: Option<&str>, - datacenter: Option<&str>, - pool: Option, - public_ip: Option<&str>, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/admin/clusters/{cluster_id}/servers/destroy", - local_var_configuration.base_path, - cluster_id = crate::apis::urlencode(cluster_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = server_id { - local_var_req_builder = - local_var_req_builder.query(&[("server_id", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = datacenter { - local_var_req_builder = - local_var_req_builder.query(&[("datacenter", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = pool { - local_var_req_builder = - local_var_req_builder.query(&[("pool", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = public_ip { - local_var_req_builder = - local_var_req_builder.query(&[("public_ip", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } + +pub async fn admin_clusters_servers_destroy(configuration: &configuration::Configuration, cluster_id: &str, server_id: Option<&str>, datacenter: Option<&str>, pool: Option, public_ip: Option<&str>) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/admin/clusters/{cluster_id}/servers/destroy", local_var_configuration.base_path, cluster_id=crate::apis::urlencode(cluster_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = server_id { + local_var_req_builder = local_var_req_builder.query(&[("server_id", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = datacenter { + local_var_req_builder = local_var_req_builder.query(&[("datacenter", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = pool { + local_var_req_builder = local_var_req_builder.query(&[("pool", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = public_ip { + local_var_req_builder = local_var_req_builder.query(&[("public_ip", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } -pub async fn admin_clusters_servers_list( - configuration: &configuration::Configuration, - cluster_id: &str, - server_id: Option<&str>, - datacenter: Option<&str>, - pool: Option, - public_ip: Option<&str>, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/admin/clusters/{cluster_id}/servers", - local_var_configuration.base_path, - cluster_id = crate::apis::urlencode(cluster_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = server_id { - local_var_req_builder = - local_var_req_builder.query(&[("server_id", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = datacenter { - local_var_req_builder = - local_var_req_builder.query(&[("datacenter", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = pool { - local_var_req_builder = - local_var_req_builder.query(&[("pool", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = public_ip { - local_var_req_builder = - local_var_req_builder.query(&[("public_ip", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn admin_clusters_servers_list(configuration: &configuration::Configuration, cluster_id: &str, server_id: Option<&str>, datacenter: Option<&str>, pool: Option, public_ip: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/admin/clusters/{cluster_id}/servers", local_var_configuration.base_path, cluster_id=crate::apis::urlencode(cluster_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = server_id { + local_var_req_builder = local_var_req_builder.query(&[("server_id", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = datacenter { + local_var_req_builder = local_var_req_builder.query(&[("datacenter", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = pool { + local_var_req_builder = local_var_req_builder.query(&[("pool", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = public_ip { + local_var_req_builder = local_var_req_builder.query(&[("public_ip", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } -pub async fn admin_clusters_servers_taint( - configuration: &configuration::Configuration, - cluster_id: &str, - server_id: Option<&str>, - datacenter: Option<&str>, - pool: Option, - public_ip: Option<&str>, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/admin/clusters/{cluster_id}/servers/taint", - local_var_configuration.base_path, - cluster_id = crate::apis::urlencode(cluster_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = server_id { - local_var_req_builder = - local_var_req_builder.query(&[("server_id", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = datacenter { - local_var_req_builder = - local_var_req_builder.query(&[("datacenter", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = pool { - local_var_req_builder = - local_var_req_builder.query(&[("pool", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = public_ip { - local_var_req_builder = - local_var_req_builder.query(&[("public_ip", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn admin_clusters_servers_taint(configuration: &configuration::Configuration, cluster_id: &str, server_id: Option<&str>, datacenter: Option<&str>, pool: Option, public_ip: Option<&str>) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/admin/clusters/{cluster_id}/servers/taint", local_var_configuration.base_path, cluster_id=crate::apis::urlencode(cluster_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = server_id { + local_var_req_builder = local_var_req_builder.query(&[("server_id", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = datacenter { + local_var_req_builder = local_var_req_builder.query(&[("datacenter", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = pool { + local_var_req_builder = local_var_req_builder.query(&[("pool", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = public_ip { + local_var_req_builder = local_var_req_builder.query(&[("public_ip", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/auth_identity_access_token_api.rs b/sdks/rust/src/apis/auth_identity_access_token_api.rs index ba696352..94a8a43d 100644 --- a/sdks/rust/src/apis/auth_identity_access_token_api.rs +++ b/sdks/rust/src/apis/auth_identity_access_token_api.rs @@ -4,70 +4,60 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`auth_identity_access_token_complete_access_token_verification`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum AuthIdentityAccessTokenCompleteAccessTokenVerificationError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } -/// Completes the access token verification process. -pub async fn auth_identity_access_token_complete_access_token_verification( - configuration: &configuration::Configuration, - auth_identity_complete_access_token_verification_request: crate::models::AuthIdentityCompleteAccessTokenVerificationRequest, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/auth/identity/access-token/complete-verification", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = - local_var_req_builder.json(&auth_identity_complete_access_token_verification_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +/// Completes the access token verification process. +pub async fn auth_identity_access_token_complete_access_token_verification(configuration: &configuration::Configuration, auth_identity_complete_access_token_verification_request: crate::models::AuthIdentityCompleteAccessTokenVerificationRequest) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/auth/identity/access-token/complete-verification", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&auth_identity_complete_access_token_verification_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/auth_identity_email_api.rs b/sdks/rust/src/apis/auth_identity_email_api.rs index cb87d45d..16aea9c6 100644 --- a/sdks/rust/src/apis/auth_identity_email_api.rs +++ b/sdks/rust/src/apis/auth_identity_email_api.rs @@ -4,135 +4,105 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`auth_identity_email_complete_email_verification`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum AuthIdentityEmailCompleteEmailVerificationError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`auth_identity_email_start_email_verification`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum AuthIdentityEmailStartEmailVerificationError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } + /// Completes the email verification process. -pub async fn auth_identity_email_complete_email_verification( - configuration: &configuration::Configuration, - auth_identity_complete_email_verification_request: crate::models::AuthIdentityCompleteEmailVerificationRequest, -) -> Result< - crate::models::AuthIdentityCompleteEmailVerificationResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/auth/identity/email/complete-verification", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = - local_var_req_builder.json(&auth_identity_complete_email_verification_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn auth_identity_email_complete_email_verification(configuration: &configuration::Configuration, auth_identity_complete_email_verification_request: crate::models::AuthIdentityCompleteEmailVerificationRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/auth/identity/email/complete-verification", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&auth_identity_complete_email_verification_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Starts the verification process for linking an email to your identity. -pub async fn auth_identity_email_start_email_verification( - configuration: &configuration::Configuration, - auth_identity_start_email_verification_request: crate::models::AuthIdentityStartEmailVerificationRequest, -) -> Result< - crate::models::AuthIdentityStartEmailVerificationResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/auth/identity/email/start-verification", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = - local_var_req_builder.json(&auth_identity_start_email_verification_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn auth_identity_email_start_email_verification(configuration: &configuration::Configuration, auth_identity_start_email_verification_request: crate::models::AuthIdentityStartEmailVerificationRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/auth/identity/email/start-verification", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&auth_identity_start_email_verification_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/auth_tokens_api.rs b/sdks/rust/src/apis/auth_tokens_api.rs index fb38f581..46786b03 100644 --- a/sdks/rust/src/apis/auth_tokens_api.rs +++ b/sdks/rust/src/apis/auth_tokens_api.rs @@ -4,69 +4,60 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`auth_tokens_refresh_identity_token`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum AuthTokensRefreshIdentityTokenError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } -/// Refreshes the current identity's token and sets authentication headers. -pub async fn auth_tokens_refresh_identity_token( - configuration: &configuration::Configuration, - auth_refresh_identity_token_request: crate::models::AuthRefreshIdentityTokenRequest, -) -> Result< - crate::models::AuthRefreshIdentityTokenResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/auth/tokens/identity", local_var_configuration.base_path); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&auth_refresh_identity_token_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +/// Refreshes the current identity's token and sets authentication headers. +pub async fn auth_tokens_refresh_identity_token(configuration: &configuration::Configuration, auth_refresh_identity_token_request: crate::models::AuthRefreshIdentityTokenRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/auth/tokens/identity", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&auth_refresh_identity_token_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/cloud_api.rs b/sdks/rust/src/apis/cloud_api.rs index e4121d6c..14d5bb19 100644 --- a/sdks/rust/src/apis/cloud_api.rs +++ b/sdks/rust/src/apis/cloud_api.rs @@ -4,64 +4,59 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`cloud_bootstrap`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudBootstrapError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } -/// Returns the basic information required to use the cloud APIs. -pub async fn cloud_bootstrap( - configuration: &configuration::Configuration, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/bootstrap", local_var_configuration.base_path); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +/// Returns the basic information required to use the cloud APIs. +pub async fn cloud_bootstrap(configuration: &configuration::Configuration, ) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/bootstrap", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/cloud_auth_api.rs b/sdks/rust/src/apis/cloud_auth_api.rs index 1dbe048e..4533c5b5 100644 --- a/sdks/rust/src/apis/cloud_auth_api.rs +++ b/sdks/rust/src/apis/cloud_auth_api.rs @@ -4,64 +4,59 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`cloud_auth_inspect`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudAuthInspectError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } -/// Returns information about the current authenticated agent. -pub async fn cloud_auth_inspect( - configuration: &configuration::Configuration, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/auth/inspect", local_var_configuration.base_path); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +/// Returns information about the current authenticated agent. +pub async fn cloud_auth_inspect(configuration: &configuration::Configuration, ) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/auth/inspect", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/cloud_devices_links_api.rs b/sdks/rust/src/apis/cloud_devices_links_api.rs index c9483938..442f0e46 100644 --- a/sdks/rust/src/apis/cloud_devices_links_api.rs +++ b/sdks/rust/src/apis/cloud_devices_links_api.rs @@ -4,174 +4,140 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`cloud_devices_links_complete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudDevicesLinksCompleteError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_devices_links_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudDevicesLinksGetError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_devices_links_prepare`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudDevicesLinksPrepareError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } -pub async fn cloud_devices_links_complete( - configuration: &configuration::Configuration, - cloud_devices_complete_device_link_request: crate::models::CloudDevicesCompleteDeviceLinkRequest, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/devices/links/complete", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&cloud_devices_complete_device_link_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } + +pub async fn cloud_devices_links_complete(configuration: &configuration::Configuration, cloud_devices_complete_device_link_request: crate::models::CloudDevicesCompleteDeviceLinkRequest) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/devices/links/complete", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + local_var_req_builder = local_var_req_builder.json(&cloud_devices_complete_device_link_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } -pub async fn cloud_devices_links_get( - configuration: &configuration::Configuration, - device_link_token: &str, - watch_index: Option<&str>, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/devices/links", local_var_configuration.base_path); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - local_var_req_builder = - local_var_req_builder.query(&[("device_link_token", &device_link_token.to_string())]); - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = - local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_devices_links_get(configuration: &configuration::Configuration, device_link_token: &str, watch_index: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/devices/links", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("device_link_token", &device_link_token.to_string())]); + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } -pub async fn cloud_devices_links_prepare( - configuration: &configuration::Configuration, -) -> Result< - crate::models::CloudDevicesPrepareDeviceLinkResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/devices/links", local_var_configuration.base_path); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_devices_links_prepare(configuration: &configuration::Configuration, ) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/devices/links", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/cloud_games_api.rs b/sdks/rust/src/apis/cloud_games_api.rs index 0c3bfb9c..b23f0612 100644 --- a/sdks/rust/src/apis/cloud_games_api.rs +++ b/sdks/rust/src/apis/cloud_games_api.rs @@ -4,490 +4,377 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`cloud_games_create_game`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesCreateGameError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_game_banner_upload_complete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesGameBannerUploadCompleteError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_game_banner_upload_prepare`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesGameBannerUploadPrepareError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_game_logo_upload_complete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesGameLogoUploadCompleteError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_game_logo_upload_prepare`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesGameLogoUploadPrepareError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_get_game_by_id`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesGetGameByIdError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_get_games`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesGetGamesError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_validate_game`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesValidateGameError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } + /// Creates a new game. -pub async fn cloud_games_create_game( - configuration: &configuration::Configuration, - cloud_games_create_game_request: crate::models::CloudGamesCreateGameRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games", local_var_configuration.base_path); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&cloud_games_create_game_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_create_game(configuration: &configuration::Configuration, cloud_games_create_game_request: crate::models::CloudGamesCreateGameRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&cloud_games_create_game_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Completes an game banner image upload. Must be called after the file upload process completes. -pub async fn cloud_games_game_banner_upload_complete( - configuration: &configuration::Configuration, - game_id: &str, - upload_id: &str, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/banner-upload/{upload_id}/complete", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id), - upload_id = crate::apis::urlencode(upload_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_game_banner_upload_complete(configuration: &configuration::Configuration, game_id: &str, upload_id: &str) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/banner-upload/{upload_id}/complete", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), upload_id=crate::apis::urlencode(upload_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Prepares a game banner image upload. -pub async fn cloud_games_game_banner_upload_prepare( - configuration: &configuration::Configuration, - game_id: &str, - cloud_games_game_banner_upload_prepare_request: crate::models::CloudGamesGameBannerUploadPrepareRequest, -) -> Result< - crate::models::CloudGamesGameBannerUploadPrepareResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/banner-upload/prepare", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = - local_var_req_builder.json(&cloud_games_game_banner_upload_prepare_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_game_banner_upload_prepare(configuration: &configuration::Configuration, game_id: &str, cloud_games_game_banner_upload_prepare_request: crate::models::CloudGamesGameBannerUploadPrepareRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/banner-upload/prepare", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&cloud_games_game_banner_upload_prepare_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Completes a game logo image upload. Must be called after the file upload process completes. -pub async fn cloud_games_game_logo_upload_complete( - configuration: &configuration::Configuration, - game_id: &str, - upload_id: &str, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/logo-upload/{upload_id}/complete", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id), - upload_id = crate::apis::urlencode(upload_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_game_logo_upload_complete(configuration: &configuration::Configuration, game_id: &str, upload_id: &str) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/logo-upload/{upload_id}/complete", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), upload_id=crate::apis::urlencode(upload_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Prepares a game logo image upload. -pub async fn cloud_games_game_logo_upload_prepare( - configuration: &configuration::Configuration, - game_id: &str, - cloud_games_game_logo_upload_prepare_request: crate::models::CloudGamesGameLogoUploadPrepareRequest, -) -> Result< - crate::models::CloudGamesGameLogoUploadPrepareResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/logo-upload/prepare", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = - local_var_req_builder.json(&cloud_games_game_logo_upload_prepare_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_game_logo_upload_prepare(configuration: &configuration::Configuration, game_id: &str, cloud_games_game_logo_upload_prepare_request: crate::models::CloudGamesGameLogoUploadPrepareRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/logo-upload/prepare", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&cloud_games_game_logo_upload_prepare_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Returns a game by its game id. -pub async fn cloud_games_get_game_by_id( - configuration: &configuration::Configuration, - game_id: &str, - watch_index: Option<&str>, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = - local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_get_game_by_id(configuration: &configuration::Configuration, game_id: &str, watch_index: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Returns a list of games in which the current identity is a group member of its development team. -pub async fn cloud_games_get_games( - configuration: &configuration::Configuration, - watch_index: Option<&str>, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games", local_var_configuration.base_path); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = - local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_get_games(configuration: &configuration::Configuration, watch_index: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Validates information used to create a new game. -pub async fn cloud_games_validate_game( - configuration: &configuration::Configuration, - cloud_games_validate_game_request: crate::models::CloudGamesValidateGameRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/validate", local_var_configuration.base_path); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&cloud_games_validate_game_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_validate_game(configuration: &configuration::Configuration, cloud_games_validate_game_request: crate::models::CloudGamesValidateGameRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/validate", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&cloud_games_validate_game_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/cloud_games_avatars_api.rs b/sdks/rust/src/apis/cloud_games_avatars_api.rs index 834eb9f9..ee545e04 100644 --- a/sdks/rust/src/apis/cloud_games_avatars_api.rs +++ b/sdks/rust/src/apis/cloud_games_avatars_api.rs @@ -4,196 +4,148 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`cloud_games_avatars_complete_custom_avatar_upload`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesAvatarsCompleteCustomAvatarUploadError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_avatars_list_game_custom_avatars`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesAvatarsListGameCustomAvatarsError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_avatars_prepare_custom_avatar_upload`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesAvatarsPrepareCustomAvatarUploadError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } + /// Completes a custom avatar image upload. Must be called after the file upload process completes. -pub async fn cloud_games_avatars_complete_custom_avatar_upload( - configuration: &configuration::Configuration, - game_id: &str, - upload_id: &str, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/avatar-upload/{upload_id}/complete", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id), - upload_id = crate::apis::urlencode(upload_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_avatars_complete_custom_avatar_upload(configuration: &configuration::Configuration, game_id: &str, upload_id: &str) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/avatar-upload/{upload_id}/complete", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), upload_id=crate::apis::urlencode(upload_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Lists custom avatars for the given game. -pub async fn cloud_games_avatars_list_game_custom_avatars( - configuration: &configuration::Configuration, - game_id: &str, -) -> Result< - crate::models::CloudGamesListGameCustomAvatarsResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/avatars", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_avatars_list_game_custom_avatars(configuration: &configuration::Configuration, game_id: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/avatars", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Prepares a custom avatar image upload. Complete upload with `rivet.api.cloud#CompleteCustomAvatarUpload`. -pub async fn cloud_games_avatars_prepare_custom_avatar_upload( - configuration: &configuration::Configuration, - game_id: &str, - cloud_games_prepare_custom_avatar_upload_request: crate::models::CloudGamesPrepareCustomAvatarUploadRequest, -) -> Result< - crate::models::CloudGamesPrepareCustomAvatarUploadResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/prepare", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = - local_var_req_builder.json(&cloud_games_prepare_custom_avatar_upload_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_avatars_prepare_custom_avatar_upload(configuration: &configuration::Configuration, game_id: &str, cloud_games_prepare_custom_avatar_upload_request: crate::models::CloudGamesPrepareCustomAvatarUploadRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/prepare", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&cloud_games_prepare_custom_avatar_upload_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/cloud_games_builds_api.rs b/sdks/rust/src/apis/cloud_games_builds_api.rs index 36b2e968..9aed4f99 100644 --- a/sdks/rust/src/apis/cloud_games_builds_api.rs +++ b/sdks/rust/src/apis/cloud_games_builds_api.rs @@ -4,135 +4,104 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`cloud_games_builds_create_game_build`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesBuildsCreateGameBuildError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_builds_list_game_builds`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesBuildsListGameBuildsError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } + /// Creates a new game build for the given game. -pub async fn cloud_games_builds_create_game_build( - configuration: &configuration::Configuration, - game_id: &str, - cloud_games_create_game_build_request: crate::models::CloudGamesCreateGameBuildRequest, -) -> Result< - crate::models::CloudGamesCreateGameBuildResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/builds", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&cloud_games_create_game_build_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_builds_create_game_build(configuration: &configuration::Configuration, game_id: &str, cloud_games_create_game_build_request: crate::models::CloudGamesCreateGameBuildRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/builds", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&cloud_games_create_game_build_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Lists game builds for the given game. -pub async fn cloud_games_builds_list_game_builds( - configuration: &configuration::Configuration, - game_id: &str, -) -> Result< - crate::models::CloudGamesListGameBuildsResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/builds", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_builds_list_game_builds(configuration: &configuration::Configuration, game_id: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/builds", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/cloud_games_cdn_api.rs b/sdks/rust/src/apis/cloud_games_cdn_api.rs index 0e3182bc..efbbd12c 100644 --- a/sdks/rust/src/apis/cloud_games_cdn_api.rs +++ b/sdks/rust/src/apis/cloud_games_cdn_api.rs @@ -4,135 +4,104 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`cloud_games_cdn_create_game_cdn_site`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesCdnCreateGameCdnSiteError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_cdn_list_game_cdn_sites`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesCdnListGameCdnSitesError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } + /// Creates a new CDN site for the given game. -pub async fn cloud_games_cdn_create_game_cdn_site( - configuration: &configuration::Configuration, - game_id: &str, - cloud_games_create_game_cdn_site_request: crate::models::CloudGamesCreateGameCdnSiteRequest, -) -> Result< - crate::models::CloudGamesCreateGameCdnSiteResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/cdn/sites", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&cloud_games_create_game_cdn_site_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_cdn_create_game_cdn_site(configuration: &configuration::Configuration, game_id: &str, cloud_games_create_game_cdn_site_request: crate::models::CloudGamesCreateGameCdnSiteRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/cdn/sites", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&cloud_games_create_game_cdn_site_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Lists CDN sites for a game. -pub async fn cloud_games_cdn_list_game_cdn_sites( - configuration: &configuration::Configuration, - game_id: &str, -) -> Result< - crate::models::CloudGamesListGameCdnSitesResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/cdn/sites", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_cdn_list_game_cdn_sites(configuration: &configuration::Configuration, game_id: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/cdn/sites", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/cloud_games_matchmaker_api.rs b/sdks/rust/src/apis/cloud_games_matchmaker_api.rs index ccf14d23..c8a2e977 100644 --- a/sdks/rust/src/apis/cloud_games_matchmaker_api.rs +++ b/sdks/rust/src/apis/cloud_games_matchmaker_api.rs @@ -4,273 +4,197 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`cloud_games_matchmaker_delete_matchmaker_lobby`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesMatchmakerDeleteMatchmakerLobbyError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_matchmaker_export_lobby_logs`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesMatchmakerExportLobbyLogsError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_matchmaker_export_matchmaker_lobby_history`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesMatchmakerExportMatchmakerLobbyHistoryError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_matchmaker_get_lobby_logs`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesMatchmakerGetLobbyLogsError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } + /// Deletes a matchmaker lobby, stopping it immediately. -pub async fn cloud_games_matchmaker_delete_matchmaker_lobby( - configuration: &configuration::Configuration, - game_id: &str, - lobby_id: &str, -) -> Result< - crate::models::CloudGamesDeleteMatchmakerLobbyResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/matchmaker/lobbies/{lobby_id}", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id), - lobby_id = crate::apis::urlencode(lobby_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_matchmaker_delete_matchmaker_lobby(configuration: &configuration::Configuration, game_id: &str, lobby_id: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/matchmaker/lobbies/{lobby_id}", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), lobby_id=crate::apis::urlencode(lobby_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Generates a download URL for logs. -pub async fn cloud_games_matchmaker_export_lobby_logs( - configuration: &configuration::Configuration, - game_id: &str, - lobby_id: &str, - cloud_games_export_lobby_logs_request: crate::models::CloudGamesExportLobbyLogsRequest, -) -> Result< - crate::models::CloudGamesExportLobbyLogsResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/matchmaker/lobbies/{lobby_id}/logs/export", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id), - lobby_id = crate::apis::urlencode(lobby_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&cloud_games_export_lobby_logs_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_matchmaker_export_lobby_logs(configuration: &configuration::Configuration, game_id: &str, lobby_id: &str, cloud_games_export_lobby_logs_request: crate::models::CloudGamesExportLobbyLogsRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/matchmaker/lobbies/{lobby_id}/logs/export", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), lobby_id=crate::apis::urlencode(lobby_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&cloud_games_export_lobby_logs_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Exports lobby history over a given query time span. -pub async fn cloud_games_matchmaker_export_matchmaker_lobby_history( - configuration: &configuration::Configuration, - game_id: &str, - cloud_games_export_matchmaker_lobby_history_request: crate::models::CloudGamesExportMatchmakerLobbyHistoryRequest, -) -> Result< - crate::models::CloudGamesExportMatchmakerLobbyHistoryResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/matchmaker/lobbies/export-history", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = - local_var_req_builder.json(&cloud_games_export_matchmaker_lobby_history_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_matchmaker_export_matchmaker_lobby_history(configuration: &configuration::Configuration, game_id: &str, cloud_games_export_matchmaker_lobby_history_request: crate::models::CloudGamesExportMatchmakerLobbyHistoryRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/matchmaker/lobbies/export-history", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&cloud_games_export_matchmaker_lobby_history_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Returns the logs for a given lobby. -pub async fn cloud_games_matchmaker_get_lobby_logs( - configuration: &configuration::Configuration, - game_id: &str, - lobby_id: &str, - stream: crate::models::CloudGamesLogStream, - watch_index: Option<&str>, -) -> Result< - crate::models::CloudGamesGetLobbyLogsResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/matchmaker/lobbies/{lobby_id}/logs", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id), - lobby_id = crate::apis::urlencode(lobby_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - local_var_req_builder = local_var_req_builder.query(&[("stream", &stream.to_string())]); - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = - local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_matchmaker_get_lobby_logs(configuration: &configuration::Configuration, game_id: &str, lobby_id: &str, stream: crate::models::CloudGamesLogStream, watch_index: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/matchmaker/lobbies/{lobby_id}/logs", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), lobby_id=crate::apis::urlencode(lobby_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("stream", &stream.to_string())]); + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/cloud_games_namespaces_analytics_api.rs b/sdks/rust/src/apis/cloud_games_namespaces_analytics_api.rs index 74d2416f..9df21b11 100644 --- a/sdks/rust/src/apis/cloud_games_namespaces_analytics_api.rs +++ b/sdks/rust/src/apis/cloud_games_namespaces_analytics_api.rs @@ -4,74 +4,59 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`cloud_games_namespaces_analytics_get_analytics_matchmaker_live`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesAnalyticsGetAnalyticsMatchmakerLiveError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } -/// Returns live information about all active lobbies for a given namespace. -pub async fn cloud_games_namespaces_analytics_get_analytics_matchmaker_live( - configuration: &configuration::Configuration, - game_id: &str, - namespace_id: &str, -) -> Result< - crate::models::CloudGamesNamespacesGetAnalyticsMatchmakerLiveResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/namespaces/{namespace_id}/analytics/matchmaker/live", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id), - namespace_id = crate::apis::urlencode(namespace_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +/// Returns live information about all active lobbies for a given namespace. +pub async fn cloud_games_namespaces_analytics_get_analytics_matchmaker_live(configuration: &configuration::Configuration, game_id: &str, namespace_id: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces/{namespace_id}/analytics/matchmaker/live", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), namespace_id=crate::apis::urlencode(namespace_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/cloud_games_namespaces_api.rs b/sdks/rust/src/apis/cloud_games_namespaces_api.rs index 0a39d08b..57a7fd56 100644 --- a/sdks/rust/src/apis/cloud_games_namespaces_api.rs +++ b/sdks/rust/src/apis/cloud_games_namespaces_api.rs @@ -4,1040 +4,736 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`cloud_games_namespaces_add_namespace_domain`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesAddNamespaceDomainError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_namespaces_create_game_namespace`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesCreateGameNamespaceError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_namespaces_create_game_namespace_token_development`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_namespaces_create_game_namespace_token_public`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesCreateGameNamespaceTokenPublicError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_namespaces_get_game_namespace_by_id`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesGetGameNamespaceByIdError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_namespaces_get_game_namespace_version_history_list`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesGetGameNamespaceVersionHistoryListError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_namespaces_remove_namespace_cdn_auth_user`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesRemoveNamespaceCdnAuthUserError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_namespaces_remove_namespace_domain`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesRemoveNamespaceDomainError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_namespaces_set_namespace_cdn_auth_type`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesSetNamespaceCdnAuthTypeError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_namespaces_toggle_namespace_domain_public_auth`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesToggleNamespaceDomainPublicAuthError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_namespaces_update_game_namespace_matchmaker_config`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesUpdateGameNamespaceMatchmakerConfigError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_namespaces_update_game_namespace_version`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesUpdateGameNamespaceVersionError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_namespaces_update_namespace_cdn_auth_user`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesUpdateNamespaceCdnAuthUserError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_namespaces_validate_game_namespace`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesValidateGameNamespaceError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_namespaces_validate_game_namespace_matchmaker_config`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_namespaces_validate_game_namespace_token_development`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } + /// Adds a domain to the given game namespace. -pub async fn cloud_games_namespaces_add_namespace_domain( - configuration: &configuration::Configuration, - game_id: &str, - namespace_id: &str, - cloud_games_namespaces_add_namespace_domain_request: crate::models::CloudGamesNamespacesAddNamespaceDomainRequest, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/namespaces/{namespace_id}/domains", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id), - namespace_id = crate::apis::urlencode(namespace_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = - local_var_req_builder.json(&cloud_games_namespaces_add_namespace_domain_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_namespaces_add_namespace_domain(configuration: &configuration::Configuration, game_id: &str, namespace_id: &str, cloud_games_namespaces_add_namespace_domain_request: crate::models::CloudGamesNamespacesAddNamespaceDomainRequest) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces/{namespace_id}/domains", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), namespace_id=crate::apis::urlencode(namespace_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&cloud_games_namespaces_add_namespace_domain_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Creates a new namespace for the given game. -pub async fn cloud_games_namespaces_create_game_namespace( - configuration: &configuration::Configuration, - game_id: &str, - cloud_games_namespaces_create_game_namespace_request: crate::models::CloudGamesNamespacesCreateGameNamespaceRequest, -) -> Result< - crate::models::CloudGamesNamespacesCreateGameNamespaceResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/namespaces", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = - local_var_req_builder.json(&cloud_games_namespaces_create_game_namespace_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_namespaces_create_game_namespace(configuration: &configuration::Configuration, game_id: &str, cloud_games_namespaces_create_game_namespace_request: crate::models::CloudGamesNamespacesCreateGameNamespaceRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&cloud_games_namespaces_create_game_namespace_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Creates a development token for the given namespace. -pub async fn cloud_games_namespaces_create_game_namespace_token_development( - configuration: &configuration::Configuration, - game_id: &str, - namespace_id: &str, - cloud_games_namespaces_create_game_namespace_token_development_request: crate::models::CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentRequest, -) -> Result< - crate::models::CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/namespaces/{namespace_id}/tokens/development", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id), - namespace_id = crate::apis::urlencode(namespace_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder - .json(&cloud_games_namespaces_create_game_namespace_token_development_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_namespaces_create_game_namespace_token_development(configuration: &configuration::Configuration, game_id: &str, namespace_id: &str, cloud_games_namespaces_create_game_namespace_token_development_request: crate::models::CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces/{namespace_id}/tokens/development", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), namespace_id=crate::apis::urlencode(namespace_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&cloud_games_namespaces_create_game_namespace_token_development_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Creates a public token for the given namespace. -pub async fn cloud_games_namespaces_create_game_namespace_token_public( - configuration: &configuration::Configuration, - game_id: &str, - namespace_id: &str, -) -> Result< - crate::models::CloudGamesNamespacesCreateGameNamespaceTokenPublicResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/namespaces/{namespace_id}/tokens/public", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id), - namespace_id = crate::apis::urlencode(namespace_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_namespaces_create_game_namespace_token_public(configuration: &configuration::Configuration, game_id: &str, namespace_id: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces/{namespace_id}/tokens/public", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), namespace_id=crate::apis::urlencode(namespace_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Gets a game namespace by namespace ID. -pub async fn cloud_games_namespaces_get_game_namespace_by_id( - configuration: &configuration::Configuration, - game_id: &str, - namespace_id: &str, -) -> Result< - crate::models::CloudGamesNamespacesGetGameNamespaceByIdResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/namespaces/{namespace_id}", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id), - namespace_id = crate::apis::urlencode(namespace_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_namespaces_get_game_namespace_by_id(configuration: &configuration::Configuration, game_id: &str, namespace_id: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces/{namespace_id}", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), namespace_id=crate::apis::urlencode(namespace_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Gets the version history for a given namespace. -pub async fn cloud_games_namespaces_get_game_namespace_version_history_list( - configuration: &configuration::Configuration, - game_id: &str, - namespace_id: &str, - anchor: Option<&str>, - limit: Option, -) -> Result< - crate::models::CloudGamesNamespacesGetGameNamespaceVersionHistoryResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/namespaces/{namespace_id}/version-history", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id), - namespace_id = crate::apis::urlencode(namespace_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = anchor { - local_var_req_builder = - local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = limit { - local_var_req_builder = - local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_namespaces_get_game_namespace_version_history_list(configuration: &configuration::Configuration, game_id: &str, namespace_id: &str, anchor: Option<&str>, limit: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces/{namespace_id}/version-history", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), namespace_id=crate::apis::urlencode(namespace_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = anchor { + local_var_req_builder = local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Removes an authenticated user from the given game namespace. -pub async fn cloud_games_namespaces_remove_namespace_cdn_auth_user( - configuration: &configuration::Configuration, - game_id: &str, - namespace_id: &str, - user: &str, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/namespaces/{namespace_id}/auth-user/{user}", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id), - namespace_id = crate::apis::urlencode(namespace_id), - user = crate::apis::urlencode(user) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_namespaces_remove_namespace_cdn_auth_user(configuration: &configuration::Configuration, game_id: &str, namespace_id: &str, user: &str) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces/{namespace_id}/auth-user/{user}", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), namespace_id=crate::apis::urlencode(namespace_id), user=crate::apis::urlencode(user)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Removes a domain from the given game namespace. -pub async fn cloud_games_namespaces_remove_namespace_domain( - configuration: &configuration::Configuration, - game_id: &str, - namespace_id: &str, - domain: &str, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/namespaces/{namespace_id}/domains/{domain}", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id), - namespace_id = crate::apis::urlencode(namespace_id), - domain = crate::apis::urlencode(domain) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_namespaces_remove_namespace_domain(configuration: &configuration::Configuration, game_id: &str, namespace_id: &str, domain: &str) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces/{namespace_id}/domains/{domain}", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), namespace_id=crate::apis::urlencode(namespace_id), domain=crate::apis::urlencode(domain)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Updates the CDN authentication type of the given game namespace. -pub async fn cloud_games_namespaces_set_namespace_cdn_auth_type( - configuration: &configuration::Configuration, - game_id: &str, - namespace_id: &str, - cloud_games_namespaces_set_namespace_cdn_auth_type_request: crate::models::CloudGamesNamespacesSetNamespaceCdnAuthTypeRequest, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/namespaces/{namespace_id}/cdn-auth", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id), - namespace_id = crate::apis::urlencode(namespace_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = - local_var_req_builder.json(&cloud_games_namespaces_set_namespace_cdn_auth_type_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_namespaces_set_namespace_cdn_auth_type(configuration: &configuration::Configuration, game_id: &str, namespace_id: &str, cloud_games_namespaces_set_namespace_cdn_auth_type_request: crate::models::CloudGamesNamespacesSetNamespaceCdnAuthTypeRequest) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces/{namespace_id}/cdn-auth", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), namespace_id=crate::apis::urlencode(namespace_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&cloud_games_namespaces_set_namespace_cdn_auth_type_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Toggles whether or not to allow authentication based on domain for the given game namespace. -pub async fn cloud_games_namespaces_toggle_namespace_domain_public_auth( - configuration: &configuration::Configuration, - game_id: &str, - namespace_id: &str, - cloud_games_namespaces_toggle_namespace_domain_public_auth_request: crate::models::CloudGamesNamespacesToggleNamespaceDomainPublicAuthRequest, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/namespaces/{namespace_id}/domain-public-auth", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id), - namespace_id = crate::apis::urlencode(namespace_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder - .json(&cloud_games_namespaces_toggle_namespace_domain_public_auth_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_namespaces_toggle_namespace_domain_public_auth(configuration: &configuration::Configuration, game_id: &str, namespace_id: &str, cloud_games_namespaces_toggle_namespace_domain_public_auth_request: crate::models::CloudGamesNamespacesToggleNamespaceDomainPublicAuthRequest) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces/{namespace_id}/domain-public-auth", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), namespace_id=crate::apis::urlencode(namespace_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&cloud_games_namespaces_toggle_namespace_domain_public_auth_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Updates matchmaker config for the given game namespace. -pub async fn cloud_games_namespaces_update_game_namespace_matchmaker_config( - configuration: &configuration::Configuration, - game_id: &str, - namespace_id: &str, - cloud_games_namespaces_update_game_namespace_matchmaker_config_request: crate::models::CloudGamesNamespacesUpdateGameNamespaceMatchmakerConfigRequest, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/namespaces/{namespace_id}/mm-config", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id), - namespace_id = crate::apis::urlencode(namespace_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder - .json(&cloud_games_namespaces_update_game_namespace_matchmaker_config_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_namespaces_update_game_namespace_matchmaker_config(configuration: &configuration::Configuration, game_id: &str, namespace_id: &str, cloud_games_namespaces_update_game_namespace_matchmaker_config_request: crate::models::CloudGamesNamespacesUpdateGameNamespaceMatchmakerConfigRequest) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces/{namespace_id}/mm-config", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), namespace_id=crate::apis::urlencode(namespace_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&cloud_games_namespaces_update_game_namespace_matchmaker_config_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Updates the version of a game namespace. -pub async fn cloud_games_namespaces_update_game_namespace_version( - configuration: &configuration::Configuration, - game_id: &str, - namespace_id: &str, - cloud_games_namespaces_update_game_namespace_version_request: crate::models::CloudGamesNamespacesUpdateGameNamespaceVersionRequest, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/namespaces/{namespace_id}/version", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id), - namespace_id = crate::apis::urlencode(namespace_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = - local_var_req_builder.json(&cloud_games_namespaces_update_game_namespace_version_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_namespaces_update_game_namespace_version(configuration: &configuration::Configuration, game_id: &str, namespace_id: &str, cloud_games_namespaces_update_game_namespace_version_request: crate::models::CloudGamesNamespacesUpdateGameNamespaceVersionRequest) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces/{namespace_id}/version", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), namespace_id=crate::apis::urlencode(namespace_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&cloud_games_namespaces_update_game_namespace_version_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Adds an authenticated user to the given game namespace. -pub async fn cloud_games_namespaces_update_namespace_cdn_auth_user( - configuration: &configuration::Configuration, - game_id: &str, - namespace_id: &str, - cloud_games_namespaces_update_namespace_cdn_auth_user_request: crate::models::CloudGamesNamespacesUpdateNamespaceCdnAuthUserRequest, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/namespaces/{namespace_id}/auth-user", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id), - namespace_id = crate::apis::urlencode(namespace_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = - local_var_req_builder.json(&cloud_games_namespaces_update_namespace_cdn_auth_user_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_namespaces_update_namespace_cdn_auth_user(configuration: &configuration::Configuration, game_id: &str, namespace_id: &str, cloud_games_namespaces_update_namespace_cdn_auth_user_request: crate::models::CloudGamesNamespacesUpdateNamespaceCdnAuthUserRequest) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces/{namespace_id}/auth-user", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), namespace_id=crate::apis::urlencode(namespace_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&cloud_games_namespaces_update_namespace_cdn_auth_user_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Validates information used to create a new game namespace. -pub async fn cloud_games_namespaces_validate_game_namespace( - configuration: &configuration::Configuration, - game_id: &str, - cloud_games_namespaces_validate_game_namespace_request: crate::models::CloudGamesNamespacesValidateGameNamespaceRequest, -) -> Result< - crate::models::CloudGamesNamespacesValidateGameNamespaceResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/namespaces/validate", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = - local_var_req_builder.json(&cloud_games_namespaces_validate_game_namespace_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_namespaces_validate_game_namespace(configuration: &configuration::Configuration, game_id: &str, cloud_games_namespaces_validate_game_namespace_request: crate::models::CloudGamesNamespacesValidateGameNamespaceRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces/validate", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&cloud_games_namespaces_validate_game_namespace_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Validates information used to update a game namespace's matchmaker config. -pub async fn cloud_games_namespaces_validate_game_namespace_matchmaker_config( - configuration: &configuration::Configuration, - game_id: &str, - namespace_id: &str, - cloud_games_namespaces_validate_game_namespace_matchmaker_config_request: crate::models::CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigRequest, -) -> Result< - crate::models::CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/namespaces/{namespace_id}/mm-config/validate", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id), - namespace_id = crate::apis::urlencode(namespace_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder - .json(&cloud_games_namespaces_validate_game_namespace_matchmaker_config_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option< - CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigError, - > = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_namespaces_validate_game_namespace_matchmaker_config(configuration: &configuration::Configuration, game_id: &str, namespace_id: &str, cloud_games_namespaces_validate_game_namespace_matchmaker_config_request: crate::models::CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces/{namespace_id}/mm-config/validate", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), namespace_id=crate::apis::urlencode(namespace_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&cloud_games_namespaces_validate_game_namespace_matchmaker_config_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Validates information used to create a new game namespace development token. -pub async fn cloud_games_namespaces_validate_game_namespace_token_development( - configuration: &configuration::Configuration, - game_id: &str, - namespace_id: &str, - cloud_games_namespaces_validate_game_namespace_token_development_request: crate::models::CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentRequest, -) -> Result< - crate::models::CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/namespaces/{namespace_id}/tokens/development/validate", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id), - namespace_id = crate::apis::urlencode(namespace_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder - .json(&cloud_games_namespaces_validate_game_namespace_token_development_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option< - CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentError, - > = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_namespaces_validate_game_namespace_token_development(configuration: &configuration::Configuration, game_id: &str, namespace_id: &str, cloud_games_namespaces_validate_game_namespace_token_development_request: crate::models::CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces/{namespace_id}/tokens/development/validate", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), namespace_id=crate::apis::urlencode(namespace_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&cloud_games_namespaces_validate_game_namespace_token_development_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/cloud_games_namespaces_logs_api.rs b/sdks/rust/src/apis/cloud_games_namespaces_logs_api.rs index 2c829180..550f6252 100644 --- a/sdks/rust/src/apis/cloud_games_namespaces_logs_api.rs +++ b/sdks/rust/src/apis/cloud_games_namespaces_logs_api.rs @@ -4,144 +4,106 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`cloud_games_namespaces_logs_get_namespace_lobby`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesLogsGetNamespaceLobbyError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_namespaces_logs_list_namespace_lobbies`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesLogsListNamespaceLobbiesError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } + /// Returns a lobby from the given game namespace. -pub async fn cloud_games_namespaces_logs_get_namespace_lobby( - configuration: &configuration::Configuration, - game_id: &str, - namespace_id: &str, - lobby_id: &str, -) -> Result< - crate::models::CloudGamesNamespacesGetNamespaceLobbyResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/namespaces/{namespace_id}/logs/lobbies/{lobby_id}", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id), - namespace_id = crate::apis::urlencode(namespace_id), - lobby_id = crate::apis::urlencode(lobby_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_namespaces_logs_get_namespace_lobby(configuration: &configuration::Configuration, game_id: &str, namespace_id: &str, lobby_id: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces/{namespace_id}/logs/lobbies/{lobby_id}", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), namespace_id=crate::apis::urlencode(namespace_id), lobby_id=crate::apis::urlencode(lobby_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Returns a list of lobbies for the given game namespace. -pub async fn cloud_games_namespaces_logs_list_namespace_lobbies( - configuration: &configuration::Configuration, - game_id: &str, - namespace_id: &str, - before_create_ts: Option, -) -> Result< - crate::models::CloudGamesNamespacesListNamespaceLobbiesResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/namespaces/{namespace_id}/logs/lobbies", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id), - namespace_id = crate::apis::urlencode(namespace_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = before_create_ts { - local_var_req_builder = - local_var_req_builder.query(&[("before_create_ts", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_namespaces_logs_list_namespace_lobbies(configuration: &configuration::Configuration, game_id: &str, namespace_id: &str, before_create_ts: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces/{namespace_id}/logs/lobbies", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), namespace_id=crate::apis::urlencode(namespace_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = before_create_ts { + local_var_req_builder = local_var_req_builder.query(&[("before_create_ts", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/cloud_games_tokens_api.rs b/sdks/rust/src/apis/cloud_games_tokens_api.rs index c0da7bd6..b5f2bba9 100644 --- a/sdks/rust/src/apis/cloud_games_tokens_api.rs +++ b/sdks/rust/src/apis/cloud_games_tokens_api.rs @@ -4,72 +4,103 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`cloud_games_tokens_create_cloud_token`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesTokensCreateCloudTokenError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`cloud_games_tokens_create_service_token`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CloudGamesTokensCreateServiceTokenError { + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } + /// Creates a new game cloud token. -pub async fn cloud_games_tokens_create_cloud_token( - configuration: &configuration::Configuration, - game_id: &str, -) -> Result< - crate::models::CloudGamesCreateCloudTokenResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/tokens/cloud", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_tokens_create_cloud_token(configuration: &configuration::Configuration, game_id: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/tokens/cloud", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + +/// Creates a new game service token. +pub async fn cloud_games_tokens_create_service_token(configuration: &configuration::Configuration, game_id: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/tokens/service", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/sdks/rust/src/apis/cloud_games_versions_api.rs b/sdks/rust/src/apis/cloud_games_versions_api.rs index aa9e571c..62d0d7c9 100644 --- a/sdks/rust/src/apis/cloud_games_versions_api.rs +++ b/sdks/rust/src/apis/cloud_games_versions_api.rs @@ -4,261 +4,193 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`cloud_games_versions_create_game_version`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesVersionsCreateGameVersionError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_versions_get_game_version_by_id`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesVersionsGetGameVersionByIdError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_versions_reserve_version_name`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesVersionsReserveVersionNameError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_versions_validate_game_version`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesVersionsValidateGameVersionError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } + /// Creates a new game version. -pub async fn cloud_games_versions_create_game_version( - configuration: &configuration::Configuration, - game_id: &str, - cloud_games_create_game_version_request: crate::models::CloudGamesCreateGameVersionRequest, -) -> Result< - crate::models::CloudGamesCreateGameVersionResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/versions", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&cloud_games_create_game_version_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_versions_create_game_version(configuration: &configuration::Configuration, game_id: &str, cloud_games_create_game_version_request: crate::models::CloudGamesCreateGameVersionRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/versions", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&cloud_games_create_game_version_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Returns a game version by its version ID. -pub async fn cloud_games_versions_get_game_version_by_id( - configuration: &configuration::Configuration, - game_id: &str, - version_id: &str, -) -> Result< - crate::models::CloudGamesGetGameVersionByIdResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/versions/{version_id}", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id), - version_id = crate::apis::urlencode(version_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_versions_get_game_version_by_id(configuration: &configuration::Configuration, game_id: &str, version_id: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/versions/{version_id}", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), version_id=crate::apis::urlencode(version_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Reserves a display name for the next version. Used to generate a monotomically increasing build number without causing a race condition with multiple versions getting created at the same time. -pub async fn cloud_games_versions_reserve_version_name( - configuration: &configuration::Configuration, - game_id: &str, -) -> Result< - crate::models::CloudGamesReserveVersionNameResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/versions/reserve-name", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_versions_reserve_version_name(configuration: &configuration::Configuration, game_id: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/versions/reserve-name", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Validates information used to create a new game version. -pub async fn cloud_games_versions_validate_game_version( - configuration: &configuration::Configuration, - game_id: &str, - cloud_games_validate_game_version_request: crate::models::CloudGamesValidateGameVersionRequest, -) -> Result< - crate::models::CloudGamesValidateGameVersionResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/versions/validate", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&cloud_games_validate_game_version_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_versions_validate_game_version(configuration: &configuration::Configuration, game_id: &str, cloud_games_validate_game_version_request: crate::models::CloudGamesValidateGameVersionRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/versions/validate", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&cloud_games_validate_game_version_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/cloud_groups_api.rs b/sdks/rust/src/apis/cloud_groups_api.rs index 0dd581ef..4941c28c 100644 --- a/sdks/rust/src/apis/cloud_groups_api.rs +++ b/sdks/rust/src/apis/cloud_groups_api.rs @@ -4,69 +4,60 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`cloud_groups_validate`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGroupsValidateError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } -/// Validates information used to create a new group. -pub async fn cloud_groups_validate( - configuration: &configuration::Configuration, - cloud_validate_group_request: crate::models::CloudValidateGroupRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/groups/validate", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&cloud_validate_group_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +/// Validates information used to create a new group. +pub async fn cloud_groups_validate(configuration: &configuration::Configuration, cloud_validate_group_request: crate::models::CloudValidateGroupRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/groups/validate", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&cloud_validate_group_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/cloud_logs_api.rs b/sdks/rust/src/apis/cloud_logs_api.rs index 8b8d18c6..972d610d 100644 --- a/sdks/rust/src/apis/cloud_logs_api.rs +++ b/sdks/rust/src/apis/cloud_logs_api.rs @@ -4,69 +4,59 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`cloud_logs_get_ray_perf_logs`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudLogsGetRayPerfLogsError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } -/// Returns performance information about a Rivet Ray. -pub async fn cloud_logs_get_ray_perf_logs( - configuration: &configuration::Configuration, - ray_id: &str, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/rays/{ray_id}/perf", - local_var_configuration.base_path, - ray_id = crate::apis::urlencode(ray_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +/// Returns performance information about a Rivet Ray. +pub async fn cloud_logs_get_ray_perf_logs(configuration: &configuration::Configuration, ray_id: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/rays/{ray_id}/perf", local_var_configuration.base_path, ray_id=crate::apis::urlencode(ray_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/cloud_tiers_api.rs b/sdks/rust/src/apis/cloud_tiers_api.rs index ccf94afc..02f87d53 100644 --- a/sdks/rust/src/apis/cloud_tiers_api.rs +++ b/sdks/rust/src/apis/cloud_tiers_api.rs @@ -4,64 +4,59 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`cloud_tiers_get_region_tiers`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudTiersGetRegionTiersError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } -/// Returns all available region tiers. -pub async fn cloud_tiers_get_region_tiers( - configuration: &configuration::Configuration, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/region-tiers", local_var_configuration.base_path); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +/// Returns all available region tiers. +pub async fn cloud_tiers_get_region_tiers(configuration: &configuration::Configuration, ) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/region-tiers", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/cloud_uploads_api.rs b/sdks/rust/src/apis/cloud_uploads_api.rs index fedf5c09..fbb3ebe8 100644 --- a/sdks/rust/src/apis/cloud_uploads_api.rs +++ b/sdks/rust/src/apis/cloud_uploads_api.rs @@ -4,69 +4,59 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`cloud_uploads_complete_upload`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudUploadsCompleteUploadError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } -/// Marks an upload as complete. -pub async fn cloud_uploads_complete_upload( - configuration: &configuration::Configuration, - upload_id: &str, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/uploads/{upload_id}/complete", - local_var_configuration.base_path, - upload_id = crate::apis::urlencode(upload_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +/// Marks an upload as complete. +pub async fn cloud_uploads_complete_upload(configuration: &configuration::Configuration, upload_id: &str) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/uploads/{upload_id}/complete", local_var_configuration.base_path, upload_id=crate::apis::urlencode(upload_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/configuration.rs b/sdks/rust/src/apis/configuration.rs index 944ac4af..a5da37fd 100644 --- a/sdks/rust/src/apis/configuration.rs +++ b/sdks/rust/src/apis/configuration.rs @@ -4,46 +4,50 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + #[derive(Debug, Clone)] pub struct Configuration { - pub base_path: String, - pub user_agent: Option, - pub client: reqwest::Client, - pub basic_auth: Option, - pub oauth_access_token: Option, - pub bearer_access_token: Option, - pub api_key: Option, - // TODO: take an oauth2 token source, similar to the go one + pub base_path: String, + pub user_agent: Option, + pub client: reqwest::Client, + pub basic_auth: Option, + pub oauth_access_token: Option, + pub bearer_access_token: Option, + pub api_key: Option, + // TODO: take an oauth2 token source, similar to the go one } pub type BasicAuth = (String, Option); #[derive(Debug, Clone)] pub struct ApiKey { - pub prefix: Option, - pub key: String, + pub prefix: Option, + pub key: String, } + impl Configuration { - pub fn new() -> Configuration { - Configuration::default() - } + pub fn new() -> Configuration { + Configuration::default() + } } impl Default for Configuration { - fn default() -> Self { - Configuration { - base_path: "https://api.rivet.gg".to_owned(), - user_agent: Some("OpenAPI-Generator/0.0.1/rust".to_owned()), - client: reqwest::Client::new(), - basic_auth: None, - oauth_access_token: None, - bearer_access_token: None, - api_key: None, - } - } + fn default() -> Self { + Configuration { + base_path: "https://api.rivet.gg".to_owned(), + user_agent: Some("OpenAPI-Generator/0.0.1/rust".to_owned()), + client: reqwest::Client::new(), + basic_auth: None, + oauth_access_token: None, + bearer_access_token: None, + api_key: None, + + } + } } diff --git a/sdks/rust/src/apis/ee_cloud_backend_projects_api.rs b/sdks/rust/src/apis/ee_cloud_backend_projects_api.rs index 047ca669..07a0f517 100644 --- a/sdks/rust/src/apis/ee_cloud_backend_projects_api.rs +++ b/sdks/rust/src/apis/ee_cloud_backend_projects_api.rs @@ -4,257 +4,197 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`ee_cloud_backend_projects_create`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum EeCloudBackendProjectsCreateError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`ee_cloud_backend_projects_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum EeCloudBackendProjectsGetError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`ee_cloud_backend_projects_list`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum EeCloudBackendProjectsListError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`ee_cloud_backend_projects_validate`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum EeCloudBackendProjectsValidateError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } + /// Creates a new OpenGB project. -pub async fn ee_cloud_backend_projects_create( - configuration: &configuration::Configuration, - ee_cloud_backend_projects_create_request: crate::models::EeCloudBackendProjectsCreateRequest, -) -> Result< - crate::models::EeCloudBackendProjectsCreateResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/backend/projects", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&ee_cloud_backend_projects_create_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn ee_cloud_backend_projects_create(configuration: &configuration::Configuration, ee_cloud_backend_projects_create_request: crate::models::EeCloudBackendProjectsCreateRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/backend/projects", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&ee_cloud_backend_projects_create_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } -pub async fn ee_cloud_backend_projects_get( - configuration: &configuration::Configuration, - project_id: &str, - watch_index: Option<&str>, -) -> Result> -{ - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/backend/projects/{project_id}", - local_var_configuration.base_path, - project_id = crate::apis::urlencode(project_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = - local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn ee_cloud_backend_projects_get(configuration: &configuration::Configuration, project_id: &str, watch_index: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/backend/projects/{project_id}", local_var_configuration.base_path, project_id=crate::apis::urlencode(project_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } -pub async fn ee_cloud_backend_projects_list( - configuration: &configuration::Configuration, - watch_index: Option<&str>, -) -> Result> -{ - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/backend/projects", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = - local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn ee_cloud_backend_projects_list(configuration: &configuration::Configuration, watch_index: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/backend/projects", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Validates information used to create a new project. -pub async fn ee_cloud_backend_projects_validate( - configuration: &configuration::Configuration, - ee_cloud_backend_projects_validate_request: crate::models::EeCloudBackendProjectsValidateRequest, -) -> Result< - crate::models::EeCloudBackendProjectsValidateResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/backend/projects/validate", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&ee_cloud_backend_projects_validate_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn ee_cloud_backend_projects_validate(configuration: &configuration::Configuration, ee_cloud_backend_projects_validate_request: crate::models::EeCloudBackendProjectsValidateRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/backend/projects/validate", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&ee_cloud_backend_projects_validate_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/ee_cloud_backend_projects_envs_api.rs b/sdks/rust/src/apis/ee_cloud_backend_projects_envs_api.rs index e688ff85..c0770b1c 100644 --- a/sdks/rust/src/apis/ee_cloud_backend_projects_envs_api.rs +++ b/sdks/rust/src/apis/ee_cloud_backend_projects_envs_api.rs @@ -4,900 +4,638 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`ee_cloud_backend_projects_envs_create`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum EeCloudBackendProjectsEnvsCreateError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`ee_cloud_backend_projects_envs_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum EeCloudBackendProjectsEnvsDeleteError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`ee_cloud_backend_projects_envs_deploy`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum EeCloudBackendProjectsEnvsDeployError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`ee_cloud_backend_projects_envs_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum EeCloudBackendProjectsEnvsGetError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`ee_cloud_backend_projects_envs_get_config`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum EeCloudBackendProjectsEnvsGetConfigError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`ee_cloud_backend_projects_envs_get_db_url`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum EeCloudBackendProjectsEnvsGetDbUrlError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`ee_cloud_backend_projects_envs_get_events`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum EeCloudBackendProjectsEnvsGetEventsError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`ee_cloud_backend_projects_envs_get_variables`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum EeCloudBackendProjectsEnvsGetVariablesError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`ee_cloud_backend_projects_envs_list`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum EeCloudBackendProjectsEnvsListError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`ee_cloud_backend_projects_envs_prepare_deploy`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum EeCloudBackendProjectsEnvsPrepareDeployError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`ee_cloud_backend_projects_envs_provision_database`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum EeCloudBackendProjectsEnvsProvisionDatabaseError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`ee_cloud_backend_projects_envs_update_config`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum EeCloudBackendProjectsEnvsUpdateConfigError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`ee_cloud_backend_projects_envs_update_variables`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum EeCloudBackendProjectsEnvsUpdateVariablesError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`ee_cloud_backend_projects_envs_validate`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum EeCloudBackendProjectsEnvsValidateError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } + /// Creates a new OpenGB environment. -pub async fn ee_cloud_backend_projects_envs_create( - configuration: &configuration::Configuration, - project_id: &str, - ee_cloud_backend_projects_envs_create_request: crate::models::EeCloudBackendProjectsEnvsCreateRequest, -) -> Result< - crate::models::EeCloudBackendProjectsEnvsCreateResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/backend/projects/{project_id}/environments", - local_var_configuration.base_path, - project_id = crate::apis::urlencode(project_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = - local_var_req_builder.json(&ee_cloud_backend_projects_envs_create_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn ee_cloud_backend_projects_envs_create(configuration: &configuration::Configuration, project_id: &str, ee_cloud_backend_projects_envs_create_request: crate::models::EeCloudBackendProjectsEnvsCreateRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/backend/projects/{project_id}/environments", local_var_configuration.base_path, project_id=crate::apis::urlencode(project_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&ee_cloud_backend_projects_envs_create_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Deletes an backend environment. -pub async fn ee_cloud_backend_projects_envs_delete( - configuration: &configuration::Configuration, - project_id: &str, - environment_id: &str, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/backend/projects/{project_id}/environments/{environment_id}", - local_var_configuration.base_path, - project_id = crate::apis::urlencode(project_id), - environment_id = crate::apis::urlencode(environment_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn ee_cloud_backend_projects_envs_delete(configuration: &configuration::Configuration, project_id: &str, environment_id: &str) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/backend/projects/{project_id}/environments/{environment_id}", local_var_configuration.base_path, project_id=crate::apis::urlencode(project_id), environment_id=crate::apis::urlencode(environment_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } -pub async fn ee_cloud_backend_projects_envs_deploy( - configuration: &configuration::Configuration, - project_id: &str, - environment_id: &str, - ee_cloud_backend_projects_envs_deploy_request: crate::models::EeCloudBackendProjectsEnvsDeployRequest, -) -> Result< - crate::models::EeCloudBackendProjectsEnvsDeployResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/backend/projects/{project_id}/environments/{environment_id}/deploy", - local_var_configuration.base_path, - project_id = crate::apis::urlencode(project_id), - environment_id = crate::apis::urlencode(environment_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = - local_var_req_builder.json(&ee_cloud_backend_projects_envs_deploy_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn ee_cloud_backend_projects_envs_deploy(configuration: &configuration::Configuration, project_id: &str, environment_id: &str, ee_cloud_backend_projects_envs_deploy_request: crate::models::EeCloudBackendProjectsEnvsDeployRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/backend/projects/{project_id}/environments/{environment_id}/deploy", local_var_configuration.base_path, project_id=crate::apis::urlencode(project_id), environment_id=crate::apis::urlencode(environment_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&ee_cloud_backend_projects_envs_deploy_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } -pub async fn ee_cloud_backend_projects_envs_get( - configuration: &configuration::Configuration, - project_id: &str, - environment_id: &str, - watch_index: Option<&str>, -) -> Result< - crate::models::EeCloudBackendProjectsEnvsGetResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/backend/projects/{project_id}/environments/{environment_id}", - local_var_configuration.base_path, - project_id = crate::apis::urlencode(project_id), - environment_id = crate::apis::urlencode(environment_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = - local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn ee_cloud_backend_projects_envs_get(configuration: &configuration::Configuration, project_id: &str, environment_id: &str, watch_index: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/backend/projects/{project_id}/environments/{environment_id}", local_var_configuration.base_path, project_id=crate::apis::urlencode(project_id), environment_id=crate::apis::urlencode(environment_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } -pub async fn ee_cloud_backend_projects_envs_get_config( - configuration: &configuration::Configuration, - project_id: &str, - environment_id: &str, -) -> Result< - crate::models::EeCloudBackendProjectsEnvsGetConfigResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/backend/projects/{project_id}/environments/{environment_id}/config", - local_var_configuration.base_path, - project_id = crate::apis::urlencode(project_id), - environment_id = crate::apis::urlencode(environment_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn ee_cloud_backend_projects_envs_get_config(configuration: &configuration::Configuration, project_id: &str, environment_id: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/backend/projects/{project_id}/environments/{environment_id}/config", local_var_configuration.base_path, project_id=crate::apis::urlencode(project_id), environment_id=crate::apis::urlencode(environment_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } -pub async fn ee_cloud_backend_projects_envs_get_db_url( - configuration: &configuration::Configuration, - project_id: &str, - environment_id: &str, -) -> Result< - crate::models::EeCloudBackendProjectsEnvsGetDbUrlResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/backend/projects/{project_id}/environments/{environment_id}/db", - local_var_configuration.base_path, - project_id = crate::apis::urlencode(project_id), - environment_id = crate::apis::urlencode(environment_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn ee_cloud_backend_projects_envs_get_db_url(configuration: &configuration::Configuration, project_id: &str, environment_id: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/backend/projects/{project_id}/environments/{environment_id}/db", local_var_configuration.base_path, project_id=crate::apis::urlencode(project_id), environment_id=crate::apis::urlencode(environment_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } -pub async fn ee_cloud_backend_projects_envs_get_events( - configuration: &configuration::Configuration, - project_id: &str, - environment_id: &str, - watch_index: Option<&str>, -) -> Result< - crate::models::EeCloudBackendProjectsEnvsGetEventsResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/backend/projects/{project_id}/environments/{environment_id}/events", - local_var_configuration.base_path, - project_id = crate::apis::urlencode(project_id), - environment_id = crate::apis::urlencode(environment_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = - local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn ee_cloud_backend_projects_envs_get_events(configuration: &configuration::Configuration, project_id: &str, environment_id: &str, watch_index: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/backend/projects/{project_id}/environments/{environment_id}/events", local_var_configuration.base_path, project_id=crate::apis::urlencode(project_id), environment_id=crate::apis::urlencode(environment_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Get environment variables from an environment. -pub async fn ee_cloud_backend_projects_envs_get_variables( - configuration: &configuration::Configuration, - project_id: &str, - environment_id: &str, -) -> Result< - crate::models::EeCloudBackendProjectsEnvsGetVariablesResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/backend/projects/{project_id}/environments/{environment_id}/variables", - local_var_configuration.base_path, - project_id = crate::apis::urlencode(project_id), - environment_id = crate::apis::urlencode(environment_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn ee_cloud_backend_projects_envs_get_variables(configuration: &configuration::Configuration, project_id: &str, environment_id: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/backend/projects/{project_id}/environments/{environment_id}/variables", local_var_configuration.base_path, project_id=crate::apis::urlencode(project_id), environment_id=crate::apis::urlencode(environment_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } -pub async fn ee_cloud_backend_projects_envs_list( - configuration: &configuration::Configuration, - project_id: &str, - watch_index: Option<&str>, -) -> Result< - crate::models::EeCloudBackendProjectsEnvsListResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/backend/projects/{project_id}/environments", - local_var_configuration.base_path, - project_id = crate::apis::urlencode(project_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = - local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn ee_cloud_backend_projects_envs_list(configuration: &configuration::Configuration, project_id: &str, watch_index: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/backend/projects/{project_id}/environments", local_var_configuration.base_path, project_id=crate::apis::urlencode(project_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } -pub async fn ee_cloud_backend_projects_envs_prepare_deploy( - configuration: &configuration::Configuration, - project_id: &str, - environment_id: &str, - ee_cloud_backend_projects_envs_prepare_deploy_request: crate::models::EeCloudBackendProjectsEnvsPrepareDeployRequest, -) -> Result< - crate::models::EeCloudBackendProjectsEnvsPrepareDeployResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/backend/projects/{project_id}/environments/{environment_id}/deploy/prepare", - local_var_configuration.base_path, - project_id = crate::apis::urlencode(project_id), - environment_id = crate::apis::urlencode(environment_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = - local_var_req_builder.json(&ee_cloud_backend_projects_envs_prepare_deploy_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn ee_cloud_backend_projects_envs_prepare_deploy(configuration: &configuration::Configuration, project_id: &str, environment_id: &str, ee_cloud_backend_projects_envs_prepare_deploy_request: crate::models::EeCloudBackendProjectsEnvsPrepareDeployRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/backend/projects/{project_id}/environments/{environment_id}/deploy/prepare", local_var_configuration.base_path, project_id=crate::apis::urlencode(project_id), environment_id=crate::apis::urlencode(environment_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&ee_cloud_backend_projects_envs_prepare_deploy_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Provisions the database for the given environment. Idempotent. -pub async fn ee_cloud_backend_projects_envs_provision_database( - configuration: &configuration::Configuration, - project_id: &str, - environment_id: &str, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/backend/projects/{project_id}/environments/{environment_id}/provision-database", - local_var_configuration.base_path, - project_id = crate::apis::urlencode(project_id), - environment_id = crate::apis::urlencode(environment_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn ee_cloud_backend_projects_envs_provision_database(configuration: &configuration::Configuration, project_id: &str, environment_id: &str) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/backend/projects/{project_id}/environments/{environment_id}/provision-database", local_var_configuration.base_path, project_id=crate::apis::urlencode(project_id), environment_id=crate::apis::urlencode(environment_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } -pub async fn ee_cloud_backend_projects_envs_update_config( - configuration: &configuration::Configuration, - project_id: &str, - environment_id: &str, - ee_cloud_backend_projects_envs_update_config_request: crate::models::EeCloudBackendProjectsEnvsUpdateConfigRequest, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/backend/projects/{project_id}/environments/{environment_id}/config", - local_var_configuration.base_path, - project_id = crate::apis::urlencode(project_id), - environment_id = crate::apis::urlencode(environment_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = - local_var_req_builder.json(&ee_cloud_backend_projects_envs_update_config_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn ee_cloud_backend_projects_envs_update_config(configuration: &configuration::Configuration, project_id: &str, environment_id: &str, ee_cloud_backend_projects_envs_update_config_request: crate::models::EeCloudBackendProjectsEnvsUpdateConfigRequest) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/backend/projects/{project_id}/environments/{environment_id}/config", local_var_configuration.base_path, project_id=crate::apis::urlencode(project_id), environment_id=crate::apis::urlencode(environment_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&ee_cloud_backend_projects_envs_update_config_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Updates environment variables for an environment. -pub async fn ee_cloud_backend_projects_envs_update_variables( - configuration: &configuration::Configuration, - project_id: &str, - environment_id: &str, - ee_cloud_backend_projects_envs_update_variables_request: crate::models::EeCloudBackendProjectsEnvsUpdateVariablesRequest, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/backend/projects/{project_id}/environments/{environment_id}/variables", - local_var_configuration.base_path, - project_id = crate::apis::urlencode(project_id), - environment_id = crate::apis::urlencode(environment_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = - local_var_req_builder.json(&ee_cloud_backend_projects_envs_update_variables_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn ee_cloud_backend_projects_envs_update_variables(configuration: &configuration::Configuration, project_id: &str, environment_id: &str, ee_cloud_backend_projects_envs_update_variables_request: crate::models::EeCloudBackendProjectsEnvsUpdateVariablesRequest) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/backend/projects/{project_id}/environments/{environment_id}/variables", local_var_configuration.base_path, project_id=crate::apis::urlencode(project_id), environment_id=crate::apis::urlencode(environment_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&ee_cloud_backend_projects_envs_update_variables_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Validates information used to create a new environment. -pub async fn ee_cloud_backend_projects_envs_validate( - configuration: &configuration::Configuration, - project_id: &str, - ee_cloud_backend_projects_envs_validate_request: crate::models::EeCloudBackendProjectsEnvsValidateRequest, -) -> Result< - crate::models::EeCloudBackendProjectsEnvsValidateResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/backend/projects/{project_id}/environments/validate", - local_var_configuration.base_path, - project_id = crate::apis::urlencode(project_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = - local_var_req_builder.json(&ee_cloud_backend_projects_envs_validate_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn ee_cloud_backend_projects_envs_validate(configuration: &configuration::Configuration, project_id: &str, ee_cloud_backend_projects_envs_validate_request: crate::models::EeCloudBackendProjectsEnvsValidateRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/backend/projects/{project_id}/environments/validate", local_var_configuration.base_path, project_id=crate::apis::urlencode(project_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&ee_cloud_backend_projects_envs_validate_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/ee_cloud_games_billing_api.rs b/sdks/rust/src/apis/ee_cloud_games_billing_api.rs index 39af8d6d..d7e4cccf 100644 --- a/sdks/rust/src/apis/ee_cloud_games_billing_api.rs +++ b/sdks/rust/src/apis/ee_cloud_games_billing_api.rs @@ -4,127 +4,105 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`ee_cloud_games_billing_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum EeCloudGamesBillingGetError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`ee_cloud_games_billing_update_plan`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum EeCloudGamesBillingUpdatePlanError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } -pub async fn ee_cloud_games_billing_get( - configuration: &configuration::Configuration, - game_id: &str, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/billing", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } + +pub async fn ee_cloud_games_billing_get(configuration: &configuration::Configuration, game_id: &str, watch_index: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/billing", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } -pub async fn ee_cloud_games_billing_update_plan( - configuration: &configuration::Configuration, - game_id: &str, - ee_cloud_games_billing_update_plan_request: crate::models::EeCloudGamesBillingUpdatePlanRequest, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/billing/plan", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&ee_cloud_games_billing_update_plan_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn ee_cloud_games_billing_update_plan(configuration: &configuration::Configuration, game_id: &str, ee_cloud_games_billing_update_plan_request: crate::models::EeCloudGamesBillingUpdatePlanRequest) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/billing/plan", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&ee_cloud_games_billing_update_plan_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/ee_cloud_games_namespaces_analytics_api.rs b/sdks/rust/src/apis/ee_cloud_games_namespaces_analytics_api.rs index 7647b827..8f40f893 100644 --- a/sdks/rust/src/apis/ee_cloud_games_namespaces_analytics_api.rs +++ b/sdks/rust/src/apis/ee_cloud_games_namespaces_analytics_api.rs @@ -4,81 +4,63 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`ee_cloud_games_namespaces_analytics_get_analytics`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum EeCloudGamesNamespacesAnalyticsGetAnalyticsError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } -pub async fn ee_cloud_games_namespaces_analytics_get_analytics( - configuration: &configuration::Configuration, - query_start: String, - query_end: String, - game_ids: &str, - namespace_ids: &str, - variants: crate::models::EeCloudAnalyticsVariantQuery, -) -> Result< - crate::models::EeCloudGamesNamespacesGetAnalyticsResponse, - Error, -> { - let local_var_configuration = configuration; - let local_var_client = &local_var_configuration.client; +pub async fn ee_cloud_games_namespaces_analytics_get_analytics(configuration: &configuration::Configuration, query_start: String, query_end: String, game_ids: &str, namespace_ids: &str, variants: crate::models::EeCloudAnalyticsVariantQuery) -> Result> { + let local_var_configuration = configuration; - let local_var_uri_str = format!( - "{}/cloud/games/namespaces/analytics", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_client = &local_var_configuration.client; - local_var_req_builder = - local_var_req_builder.query(&[("query_start", &query_start.to_string())]); - local_var_req_builder = local_var_req_builder.query(&[("query_end", &query_end.to_string())]); - local_var_req_builder = local_var_req_builder.query(&[("game_ids", &game_ids.to_string())]); - local_var_req_builder = - local_var_req_builder.query(&[("namespace_ids", &namespace_ids.to_string())]); - local_var_req_builder = local_var_req_builder.query(&[("variants", &variants.to_string())]); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; + let local_var_uri_str = format!("{}/cloud/games/namespaces/analytics", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + local_var_req_builder = local_var_req_builder.query(&[("query_start", &query_start.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("query_end", &query_end.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("game_ids", &game_ids.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("namespace_ids", &namespace_ids.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("variants", &variants.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/ee_cloud_games_projects_api.rs b/sdks/rust/src/apis/ee_cloud_games_projects_api.rs index 7247aa97..000890a1 100644 --- a/sdks/rust/src/apis/ee_cloud_games_projects_api.rs +++ b/sdks/rust/src/apis/ee_cloud_games_projects_api.rs @@ -4,128 +4,103 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`ee_cloud_games_projects_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum EeCloudGamesProjectsGetError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`ee_cloud_games_projects_link`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum EeCloudGamesProjectsLinkError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } -pub async fn ee_cloud_games_projects_get( - configuration: &configuration::Configuration, - game_id: &str, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/project", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } + +pub async fn ee_cloud_games_projects_get(configuration: &configuration::Configuration, game_id: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/project", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Links a game to an OpenGB project. -pub async fn ee_cloud_games_projects_link( - configuration: &configuration::Configuration, - game_id: &str, - ee_cloud_games_projects_link_request: crate::models::EeCloudGamesProjectsLinkRequest, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/games/{game_id}/project-link", - local_var_configuration.base_path, - game_id = crate::apis::urlencode(game_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&ee_cloud_games_projects_link_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn ee_cloud_games_projects_link(configuration: &configuration::Configuration, game_id: &str, ee_cloud_games_projects_link_request: crate::models::EeCloudGamesProjectsLinkRequest) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/{game_id}/project-link", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&ee_cloud_games_projects_link_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/ee_cloud_groups_billing_api.rs b/sdks/rust/src/apis/ee_cloud_groups_billing_api.rs index 9cb218fd..c7d0ff7a 100644 --- a/sdks/rust/src/apis/ee_cloud_groups_billing_api.rs +++ b/sdks/rust/src/apis/ee_cloud_groups_billing_api.rs @@ -4,139 +4,154 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`ee_cloud_groups_billing_create_stripe_portal_session`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum EeCloudGroupsBillingCreateStripePortalSessionError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`ee_cloud_groups_billing_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum EeCloudGroupsBillingGetError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } -pub async fn ee_cloud_groups_billing_create_stripe_portal_session( - configuration: &configuration::Configuration, - group_id: &str, - ee_cloud_groups_billing_create_stripe_portal_session_request: crate::models::EeCloudGroupsBillingCreateStripePortalSessionRequest, -) -> Result< - crate::models::EeCloudGroupsBillingCreateStripePortalSessionResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/groups/{group_id}/billing/stripe-portal-session", - local_var_configuration.base_path, - group_id = crate::apis::urlencode(group_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = - local_var_req_builder.json(&ee_cloud_groups_billing_create_stripe_portal_session_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +/// struct for typed errors of method [`ee_cloud_groups_billing_get_usage`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum EeCloudGroupsBillingGetUsageError { + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } -pub async fn ee_cloud_groups_billing_get( - configuration: &configuration::Configuration, - group_id: &str, - watch_index: Option<&str>, -) -> Result< - crate::models::EeCloudGroupsBillingGetBillingResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/cloud/groups/{group_id}/billing", - local_var_configuration.base_path, - group_id = crate::apis::urlencode(group_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = - local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } + +pub async fn ee_cloud_groups_billing_create_stripe_portal_session(configuration: &configuration::Configuration, group_id: &str, ee_cloud_groups_billing_create_stripe_portal_session_request: crate::models::EeCloudGroupsBillingCreateStripePortalSessionRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/groups/{group_id}/billing/stripe-portal-session", local_var_configuration.base_path, group_id=crate::apis::urlencode(group_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&ee_cloud_groups_billing_create_stripe_portal_session_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +pub async fn ee_cloud_groups_billing_get(configuration: &configuration::Configuration, group_id: &str, watch_index: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/groups/{group_id}/billing", local_var_configuration.base_path, group_id=crate::apis::urlencode(group_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +pub async fn ee_cloud_groups_billing_get_usage(configuration: &configuration::Configuration, group_id: &str, query_start_ts: Option, query_end_ts: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/groups/{group_id}/billing/usage", local_var_configuration.base_path, group_id=crate::apis::urlencode(group_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = query_start_ts { + local_var_req_builder = local_var_req_builder.query(&[("query_start_ts", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = query_end_ts { + local_var_req_builder = local_var_req_builder.query(&[("query_end_ts", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/group_api.rs b/sdks/rust/src/apis/group_api.rs index 7b224734..a6201d9e 100644 --- a/sdks/rust/src/apis/group_api.rs +++ b/sdks/rust/src/apis/group_api.rs @@ -4,1061 +4,806 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`group_ban_identity`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupBanIdentityError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`group_complete_avatar_upload`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupCompleteAvatarUploadError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`group_create`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupCreateError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`group_get_bans`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupGetBansError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`group_get_join_requests`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupGetJoinRequestsError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`group_get_members`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupGetMembersError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`group_get_profile`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupGetProfileError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`group_get_summary`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupGetSummaryError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`group_kick_member`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupKickMemberError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`group_leave`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupLeaveError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`group_list_suggested`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupListSuggestedError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`group_prepare_avatar_upload`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupPrepareAvatarUploadError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`group_search`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupSearchError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`group_transfer_ownership`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupTransferOwnershipError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`group_unban_identity`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupUnbanIdentityError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`group_update_profile`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupUpdateProfileError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`group_validate_profile`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupValidateProfileError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } + /// Bans an identity from a group. Must be the owner of the group to perform this action. The banned identity will no longer be able to create a join request or use a group invite. -pub async fn group_ban_identity( - configuration: &configuration::Configuration, - group_id: &str, - identity_id: &str, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/group/groups/{group_id}/bans/{identity_id}", - local_var_configuration.base_path, - group_id = crate::apis::urlencode(group_id), - identity_id = crate::apis::urlencode(identity_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_ban_identity(configuration: &configuration::Configuration, group_id: &str, identity_id: &str) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/group/groups/{group_id}/bans/{identity_id}", local_var_configuration.base_path, group_id=crate::apis::urlencode(group_id), identity_id=crate::apis::urlencode(identity_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Completes an avatar image upload. Must be called after the file upload process completes. Call `rivet.api.group#PrepareAvatarUpload` first. -pub async fn group_complete_avatar_upload( - configuration: &configuration::Configuration, - group_id: &str, - upload_id: &str, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/group/groups/{group_id}/avatar-upload/{upload_id}/complete", - local_var_configuration.base_path, - group_id = crate::apis::urlencode(group_id), - upload_id = crate::apis::urlencode(upload_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_complete_avatar_upload(configuration: &configuration::Configuration, group_id: &str, upload_id: &str) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/group/groups/{group_id}/avatar-upload/{upload_id}/complete", local_var_configuration.base_path, group_id=crate::apis::urlencode(group_id), upload_id=crate::apis::urlencode(upload_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Creates a new group. -pub async fn group_create( - configuration: &configuration::Configuration, - group_create_request: crate::models::GroupCreateRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/group/groups", local_var_configuration.base_path); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&group_create_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_create(configuration: &configuration::Configuration, group_create_request: crate::models::GroupCreateRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/group/groups", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&group_create_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Returns a group's bans. Must have valid permissions to view. -pub async fn group_get_bans( - configuration: &configuration::Configuration, - group_id: &str, - anchor: Option<&str>, - count: Option, - watch_index: Option<&str>, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/group/groups/{group_id}/bans", - local_var_configuration.base_path, - group_id = crate::apis::urlencode(group_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = anchor { - local_var_req_builder = - local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = count { - local_var_req_builder = - local_var_req_builder.query(&[("count", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = - local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_get_bans(configuration: &configuration::Configuration, group_id: &str, anchor: Option<&str>, count: Option, watch_index: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/group/groups/{group_id}/bans", local_var_configuration.base_path, group_id=crate::apis::urlencode(group_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = anchor { + local_var_req_builder = local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = count { + local_var_req_builder = local_var_req_builder.query(&[("count", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Returns a group's join requests. Must have valid permissions to view. -pub async fn group_get_join_requests( - configuration: &configuration::Configuration, - group_id: &str, - anchor: Option<&str>, - count: Option, - watch_index: Option<&str>, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/group/groups/{group_id}/join-requests", - local_var_configuration.base_path, - group_id = crate::apis::urlencode(group_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = anchor { - local_var_req_builder = - local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = count { - local_var_req_builder = - local_var_req_builder.query(&[("count", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = - local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_get_join_requests(configuration: &configuration::Configuration, group_id: &str, anchor: Option<&str>, count: Option, watch_index: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/group/groups/{group_id}/join-requests", local_var_configuration.base_path, group_id=crate::apis::urlencode(group_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = anchor { + local_var_req_builder = local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = count { + local_var_req_builder = local_var_req_builder.query(&[("count", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Returns a group's members. -pub async fn group_get_members( - configuration: &configuration::Configuration, - group_id: &str, - anchor: Option<&str>, - count: Option, - watch_index: Option<&str>, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/group/groups/{group_id}/members", - local_var_configuration.base_path, - group_id = crate::apis::urlencode(group_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = anchor { - local_var_req_builder = - local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = count { - local_var_req_builder = - local_var_req_builder.query(&[("count", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = - local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_get_members(configuration: &configuration::Configuration, group_id: &str, anchor: Option<&str>, count: Option, watch_index: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/group/groups/{group_id}/members", local_var_configuration.base_path, group_id=crate::apis::urlencode(group_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = anchor { + local_var_req_builder = local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = count { + local_var_req_builder = local_var_req_builder.query(&[("count", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Returns a group profile. -pub async fn group_get_profile( - configuration: &configuration::Configuration, - group_id: &str, - watch_index: Option<&str>, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/group/groups/{group_id}/profile", - local_var_configuration.base_path, - group_id = crate::apis::urlencode(group_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = - local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_get_profile(configuration: &configuration::Configuration, group_id: &str, watch_index: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/group/groups/{group_id}/profile", local_var_configuration.base_path, group_id=crate::apis::urlencode(group_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } -pub async fn group_get_summary( - configuration: &configuration::Configuration, - group_id: &str, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/group/groups/{group_id}/summary", - local_var_configuration.base_path, - group_id = crate::apis::urlencode(group_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_get_summary(configuration: &configuration::Configuration, group_id: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/group/groups/{group_id}/summary", local_var_configuration.base_path, group_id=crate::apis::urlencode(group_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Kicks an identity from a group. Must be the owner of the group to perform this action. -pub async fn group_kick_member( - configuration: &configuration::Configuration, - group_id: &str, - identity_id: &str, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/group/groups/{group_id}/kick/{identity_id}", - local_var_configuration.base_path, - group_id = crate::apis::urlencode(group_id), - identity_id = crate::apis::urlencode(identity_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_kick_member(configuration: &configuration::Configuration, group_id: &str, identity_id: &str) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/group/groups/{group_id}/kick/{identity_id}", local_var_configuration.base_path, group_id=crate::apis::urlencode(group_id), identity_id=crate::apis::urlencode(identity_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Leaves a group. -pub async fn group_leave( - configuration: &configuration::Configuration, - group_id: &str, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/group/groups/{group_id}/leave", - local_var_configuration.base_path, - group_id = crate::apis::urlencode(group_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_leave(configuration: &configuration::Configuration, group_id: &str) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/group/groups/{group_id}/leave", local_var_configuration.base_path, group_id=crate::apis::urlencode(group_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Returns a list of suggested groups. -pub async fn group_list_suggested( - configuration: &configuration::Configuration, - watch_index: Option<&str>, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/group/groups", local_var_configuration.base_path); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = - local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_list_suggested(configuration: &configuration::Configuration, watch_index: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/group/groups", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Prepares an avatar image upload. Complete upload with `rivet.api.group#CompleteAvatarUpload`. -pub async fn group_prepare_avatar_upload( - configuration: &configuration::Configuration, - group_prepare_avatar_upload_request: crate::models::GroupPrepareAvatarUploadRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/group/groups/avatar-upload/prepare", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&group_prepare_avatar_upload_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_prepare_avatar_upload(configuration: &configuration::Configuration, group_prepare_avatar_upload_request: crate::models::GroupPrepareAvatarUploadRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/group/groups/avatar-upload/prepare", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&group_prepare_avatar_upload_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Fuzzy search for groups. -pub async fn group_search( - configuration: &configuration::Configuration, - query: &str, - anchor: Option<&str>, - limit: Option, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/group/groups/search", local_var_configuration.base_path); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - local_var_req_builder = local_var_req_builder.query(&[("query", &query.to_string())]); - if let Some(ref local_var_str) = anchor { - local_var_req_builder = - local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = limit { - local_var_req_builder = - local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_search(configuration: &configuration::Configuration, query: &str, anchor: Option<&str>, limit: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/group/groups/search", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("query", &query.to_string())]); + if let Some(ref local_var_str) = anchor { + local_var_req_builder = local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Transfers ownership of a group to another identity. -pub async fn group_transfer_ownership( - configuration: &configuration::Configuration, - group_id: &str, - group_transfer_ownership_request: crate::models::GroupTransferOwnershipRequest, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/group/groups/{group_id}/transfer-owner", - local_var_configuration.base_path, - group_id = crate::apis::urlencode(group_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&group_transfer_ownership_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_transfer_ownership(configuration: &configuration::Configuration, group_id: &str, group_transfer_ownership_request: crate::models::GroupTransferOwnershipRequest) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/group/groups/{group_id}/transfer-owner", local_var_configuration.base_path, group_id=crate::apis::urlencode(group_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&group_transfer_ownership_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Unbans an identity from a group. Must be the owner of the group to perform this action. -pub async fn group_unban_identity( - configuration: &configuration::Configuration, - group_id: &str, - identity_id: &str, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/group/groups/{group_id}/bans/{identity_id}", - local_var_configuration.base_path, - group_id = crate::apis::urlencode(group_id), - identity_id = crate::apis::urlencode(identity_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_unban_identity(configuration: &configuration::Configuration, group_id: &str, identity_id: &str) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/group/groups/{group_id}/bans/{identity_id}", local_var_configuration.base_path, group_id=crate::apis::urlencode(group_id), identity_id=crate::apis::urlencode(identity_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } -pub async fn group_update_profile( - configuration: &configuration::Configuration, - group_id: &str, - group_update_profile_request: crate::models::GroupUpdateProfileRequest, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/group/groups/{group_id}/profile", - local_var_configuration.base_path, - group_id = crate::apis::urlencode(group_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&group_update_profile_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_update_profile(configuration: &configuration::Configuration, group_id: &str, group_update_profile_request: crate::models::GroupUpdateProfileRequest) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/group/groups/{group_id}/profile", local_var_configuration.base_path, group_id=crate::apis::urlencode(group_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&group_update_profile_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Validate contents of group profile. Use to provide immediate feedback on profile changes before committing them. -pub async fn group_validate_profile( - configuration: &configuration::Configuration, - group_validate_profile_request: crate::models::GroupValidateProfileRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/group/groups/profile/validate", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&group_validate_profile_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_validate_profile(configuration: &configuration::Configuration, group_validate_profile_request: crate::models::GroupValidateProfileRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/group/groups/profile/validate", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&group_validate_profile_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/group_invites_api.rs b/sdks/rust/src/apis/group_invites_api.rs index b4b30770..0d972e52 100644 --- a/sdks/rust/src/apis/group_invites_api.rs +++ b/sdks/rust/src/apis/group_invites_api.rs @@ -4,187 +4,148 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`group_invites_consume_invite`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupInvitesConsumeInviteError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`group_invites_create_invite`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupInvitesCreateInviteError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`group_invites_get_invite`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupInvitesGetInviteError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } + /// Consumes a group invite to join a group. -pub async fn group_invites_consume_invite( - configuration: &configuration::Configuration, - group_invite_code: &str, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/group/invites/{group_invite_code}/consume", - local_var_configuration.base_path, - group_invite_code = crate::apis::urlencode(group_invite_code) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_invites_consume_invite(configuration: &configuration::Configuration, group_invite_code: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/group/invites/{group_invite_code}/consume", local_var_configuration.base_path, group_invite_code=crate::apis::urlencode(group_invite_code)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Creates a group invite. Can be shared with other identities to let them join this group. -pub async fn group_invites_create_invite( - configuration: &configuration::Configuration, - group_id: &str, - group_create_invite_request: crate::models::GroupCreateInviteRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/group/groups/{group_id}/invites", - local_var_configuration.base_path, - group_id = crate::apis::urlencode(group_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&group_create_invite_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_invites_create_invite(configuration: &configuration::Configuration, group_id: &str, group_create_invite_request: crate::models::GroupCreateInviteRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/group/groups/{group_id}/invites", local_var_configuration.base_path, group_id=crate::apis::urlencode(group_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&group_create_invite_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Inspects a group invite returning information about the team that created it. -pub async fn group_invites_get_invite( - configuration: &configuration::Configuration, - group_invite_code: &str, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/group/invites/{group_invite_code}", - local_var_configuration.base_path, - group_invite_code = crate::apis::urlencode(group_invite_code) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_invites_get_invite(configuration: &configuration::Configuration, group_invite_code: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/group/invites/{group_invite_code}", local_var_configuration.base_path, group_invite_code=crate::apis::urlencode(group_invite_code)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/group_join_requests_api.rs b/sdks/rust/src/apis/group_join_requests_api.rs index 0798fc7f..975fbe39 100644 --- a/sdks/rust/src/apis/group_join_requests_api.rs +++ b/sdks/rust/src/apis/group_join_requests_api.rs @@ -4,131 +4,104 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`group_join_requests_create_join_request`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupJoinRequestsCreateJoinRequestError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`group_join_requests_resolve_join_request`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupJoinRequestsResolveJoinRequestError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } + /// Requests to join a group. -pub async fn group_join_requests_create_join_request( - configuration: &configuration::Configuration, - group_id: &str, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/group/groups/{group_id}/join-request", - local_var_configuration.base_path, - group_id = crate::apis::urlencode(group_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_join_requests_create_join_request(configuration: &configuration::Configuration, group_id: &str) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/group/groups/{group_id}/join-request", local_var_configuration.base_path, group_id=crate::apis::urlencode(group_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Resolves a join request for a given group. -pub async fn group_join_requests_resolve_join_request( - configuration: &configuration::Configuration, - group_id: &str, - identity_id: &str, - group_resolve_join_request_request: crate::models::GroupResolveJoinRequestRequest, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/group/groups/{group_id}/join-request/{identity_id}", - local_var_configuration.base_path, - group_id = crate::apis::urlencode(group_id), - identity_id = crate::apis::urlencode(identity_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&group_resolve_join_request_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_join_requests_resolve_join_request(configuration: &configuration::Configuration, group_id: &str, identity_id: &str, group_resolve_join_request_request: crate::models::GroupResolveJoinRequestRequest) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/group/groups/{group_id}/join-request/{identity_id}", local_var_configuration.base_path, group_id=crate::apis::urlencode(group_id), identity_id=crate::apis::urlencode(identity_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&group_resolve_join_request_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/identity_activities_api.rs b/sdks/rust/src/apis/identity_activities_api.rs index f755ba6f..20351ad1 100644 --- a/sdks/rust/src/apis/identity_activities_api.rs +++ b/sdks/rust/src/apis/identity_activities_api.rs @@ -4,69 +4,62 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`identity_activities_list`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityActivitiesListError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } + /// Returns an overview of all players currently online or in game. -pub async fn identity_activities_list( - configuration: &configuration::Configuration, - watch_index: Option<&str>, -) -> Result> { - let local_var_configuration = configuration; +pub async fn identity_activities_list(configuration: &configuration::Configuration, watch_index: Option<&str>) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &local_var_configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/identity/activities", local_var_configuration.base_path); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!("{}/identity/activities", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = - local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/identity_api.rs b/sdks/rust/src/apis/identity_api.rs index 1892afcf..91ff1412 100644 --- a/sdks/rust/src/apis/identity_api.rs +++ b/sdks/rust/src/apis/identity_api.rs @@ -4,1519 +4,1160 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`identity_complete_avatar_upload`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityCompleteAvatarUploadError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_follow`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityFollowError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_get_handles`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityGetHandlesError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_get_profile`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityGetProfileError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_get_self_profile`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityGetSelfProfileError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_get_summaries`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityGetSummariesError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_ignore_recent_follower`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityIgnoreRecentFollowerError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_list_followers`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityListFollowersError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_list_following`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityListFollowingError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_list_friends`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityListFriendsError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_list_mutual_friends`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityListMutualFriendsError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_list_recent_followers`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityListRecentFollowersError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_mark_deletion`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityMarkDeletionError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_prepare_avatar_upload`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityPrepareAvatarUploadError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_remove_game_activity`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityRemoveGameActivityError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_report`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityReportError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_search`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentitySearchError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_set_game_activity`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentitySetGameActivityError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_setup`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentitySetupError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_signup_for_beta`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentitySignupForBetaError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_unfollow`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityUnfollowError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_unmark_deletion`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityUnmarkDeletionError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_update_profile`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityUpdateProfileError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_update_status`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityUpdateStatusError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_validate_profile`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityValidateProfileError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } + /// Completes an avatar image upload. Must be called after the file upload process completes. -pub async fn identity_complete_avatar_upload( - configuration: &configuration::Configuration, - upload_id: &str, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/identity/identities/avatar-upload/{upload_id}/complete", - local_var_configuration.base_path, - upload_id = crate::apis::urlencode(upload_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_complete_avatar_upload(configuration: &configuration::Configuration, upload_id: &str) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/identity/identities/avatar-upload/{upload_id}/complete", local_var_configuration.base_path, upload_id=crate::apis::urlencode(upload_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Follows the given identity. In order for identities to be \"friends\", the other identity has to also follow this identity. -pub async fn identity_follow( - configuration: &configuration::Configuration, - identity_id: &str, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/identity/identities/{identity_id}/follow", - local_var_configuration.base_path, - identity_id = crate::apis::urlencode(identity_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_follow(configuration: &configuration::Configuration, identity_id: &str) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/identity/identities/{identity_id}/follow", local_var_configuration.base_path, identity_id=crate::apis::urlencode(identity_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Fetches a list of identity handles. -pub async fn identity_get_handles( - configuration: &configuration::Configuration, - identity_ids: &str, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/identity/identities/batch/handle", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - local_var_req_builder = - local_var_req_builder.query(&[("identity_ids", &identity_ids.to_string())]); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_get_handles(configuration: &configuration::Configuration, identity_ids: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/identity/identities/batch/handle", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("identity_ids", &identity_ids.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Fetches an identity profile. -pub async fn identity_get_profile( - configuration: &configuration::Configuration, - identity_id: &str, - watch_index: Option<&str>, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/identity/identities/{identity_id}/profile", - local_var_configuration.base_path, - identity_id = crate::apis::urlencode(identity_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = - local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_get_profile(configuration: &configuration::Configuration, identity_id: &str, watch_index: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/identity/identities/{identity_id}/profile", local_var_configuration.base_path, identity_id=crate::apis::urlencode(identity_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Fetches the current identity's profile. -pub async fn identity_get_self_profile( - configuration: &configuration::Configuration, - watch_index: Option<&str>, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/identity/identities/self/profile", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = - local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_get_self_profile(configuration: &configuration::Configuration, watch_index: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/identity/identities/self/profile", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Fetches a list of identity summaries. -pub async fn identity_get_summaries( - configuration: &configuration::Configuration, - identity_ids: &str, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/identity/identities/batch/summary", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - local_var_req_builder = - local_var_req_builder.query(&[("identity_ids", &identity_ids.to_string())]); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_get_summaries(configuration: &configuration::Configuration, identity_ids: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/identity/identities/batch/summary", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("identity_ids", &identity_ids.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } -pub async fn identity_ignore_recent_follower( - configuration: &configuration::Configuration, - identity_id: &str, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/identity/identities/self/recent-followers/{identity_id}/ignore", - local_var_configuration.base_path, - identity_id = crate::apis::urlencode(identity_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_ignore_recent_follower(configuration: &configuration::Configuration, identity_id: &str) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/identity/identities/self/recent-followers/{identity_id}/ignore", local_var_configuration.base_path, identity_id=crate::apis::urlencode(identity_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } -pub async fn identity_list_followers( - configuration: &configuration::Configuration, - identity_id: &str, - anchor: Option<&str>, - limit: Option<&str>, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/identity/identities/{identity_id}/followers", - local_var_configuration.base_path, - identity_id = crate::apis::urlencode(identity_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = anchor { - local_var_req_builder = - local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = limit { - local_var_req_builder = - local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_list_followers(configuration: &configuration::Configuration, identity_id: &str, anchor: Option<&str>, limit: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/identity/identities/{identity_id}/followers", local_var_configuration.base_path, identity_id=crate::apis::urlencode(identity_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = anchor { + local_var_req_builder = local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } -pub async fn identity_list_following( - configuration: &configuration::Configuration, - identity_id: &str, - anchor: Option<&str>, - limit: Option<&str>, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/identity/identities/{identity_id}/following", - local_var_configuration.base_path, - identity_id = crate::apis::urlencode(identity_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = anchor { - local_var_req_builder = - local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = limit { - local_var_req_builder = - local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_list_following(configuration: &configuration::Configuration, identity_id: &str, anchor: Option<&str>, limit: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/identity/identities/{identity_id}/following", local_var_configuration.base_path, identity_id=crate::apis::urlencode(identity_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = anchor { + local_var_req_builder = local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } -pub async fn identity_list_friends( - configuration: &configuration::Configuration, - anchor: Option<&str>, - limit: Option<&str>, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/identity/identities/self/friends", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = anchor { - local_var_req_builder = - local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = limit { - local_var_req_builder = - local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_list_friends(configuration: &configuration::Configuration, anchor: Option<&str>, limit: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/identity/identities/self/friends", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = anchor { + local_var_req_builder = local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } -pub async fn identity_list_mutual_friends( - configuration: &configuration::Configuration, - identity_id: &str, - anchor: Option<&str>, - limit: Option<&str>, -) -> Result> -{ - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/identity/identities/{identity_id}/mutual-friends", - local_var_configuration.base_path, - identity_id = crate::apis::urlencode(identity_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = anchor { - local_var_req_builder = - local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = limit { - local_var_req_builder = - local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_list_mutual_friends(configuration: &configuration::Configuration, identity_id: &str, anchor: Option<&str>, limit: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/identity/identities/{identity_id}/mutual-friends", local_var_configuration.base_path, identity_id=crate::apis::urlencode(identity_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = anchor { + local_var_req_builder = local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } -pub async fn identity_list_recent_followers( - configuration: &configuration::Configuration, - count: Option, - watch_index: Option<&str>, -) -> Result< - crate::models::IdentityListRecentFollowersResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/identity/identities/self/recent-followers", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = count { - local_var_req_builder = - local_var_req_builder.query(&[("count", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = - local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_list_recent_followers(configuration: &configuration::Configuration, count: Option, watch_index: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/identity/identities/self/recent-followers", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = count { + local_var_req_builder = local_var_req_builder.query(&[("count", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } -pub async fn identity_mark_deletion( - configuration: &configuration::Configuration, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/identity/identities/self/delete-request", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_mark_deletion(configuration: &configuration::Configuration, ) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/identity/identities/self/delete-request", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Prepares an avatar image upload. Complete upload with `CompleteIdentityAvatarUpload`. -pub async fn identity_prepare_avatar_upload( - configuration: &configuration::Configuration, - identity_prepare_avatar_upload_request: crate::models::IdentityPrepareAvatarUploadRequest, -) -> Result< - crate::models::IdentityPrepareAvatarUploadResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/identity/identities/avatar-upload/prepare", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&identity_prepare_avatar_upload_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_prepare_avatar_upload(configuration: &configuration::Configuration, identity_prepare_avatar_upload_request: crate::models::IdentityPrepareAvatarUploadRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/identity/identities/avatar-upload/prepare", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&identity_prepare_avatar_upload_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Removes the current identity's game activity. -pub async fn identity_remove_game_activity( - configuration: &configuration::Configuration, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/identity/identities/self/activity", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_remove_game_activity(configuration: &configuration::Configuration, ) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/identity/identities/self/activity", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Creates an abuse report for an identity. -pub async fn identity_report( - configuration: &configuration::Configuration, - identity_id: &str, - identity_report_request: crate::models::IdentityReportRequest, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/identity/identities/{identity_id}/report", - local_var_configuration.base_path, - identity_id = crate::apis::urlencode(identity_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&identity_report_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_report(configuration: &configuration::Configuration, identity_id: &str, identity_report_request: crate::models::IdentityReportRequest) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/identity/identities/{identity_id}/report", local_var_configuration.base_path, identity_id=crate::apis::urlencode(identity_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&identity_report_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Fuzzy search for identities. -pub async fn identity_search( - configuration: &configuration::Configuration, - query: &str, - anchor: Option<&str>, - limit: Option, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/identity/identities/search", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - local_var_req_builder = local_var_req_builder.query(&[("query", &query.to_string())]); - if let Some(ref local_var_str) = anchor { - local_var_req_builder = - local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = limit { - local_var_req_builder = - local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_search(configuration: &configuration::Configuration, query: &str, anchor: Option<&str>, limit: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/identity/identities/search", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("query", &query.to_string())]); + if let Some(ref local_var_str) = anchor { + local_var_req_builder = local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Sets the current identity's game activity. This activity will automatically be removed when the identity goes offline. -pub async fn identity_set_game_activity( - configuration: &configuration::Configuration, - identity_set_game_activity_request: crate::models::IdentitySetGameActivityRequest, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/identity/identities/self/activity", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&identity_set_game_activity_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_set_game_activity(configuration: &configuration::Configuration, identity_set_game_activity_request: crate::models::IdentitySetGameActivityRequest) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/identity/identities/self/activity", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&identity_set_game_activity_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Gets or creates an identity. Passing an existing identity token in the body refreshes the token. Temporary Accounts Until the identity is linked with the Rivet Hub (see `PrepareGameLink`), this identity will be temporary but still behave like all other identities. This is intended to allow users to play the game without signing up while still having the benefits of having an account. When they are ready to save their account, they should be instructed to link their account (see `PrepareGameLink`). Storing Token `identity_token` should be stored in some form of persistent storage. The token should be read from storage and passed to `Setup` every time the client starts. -pub async fn identity_setup( - configuration: &configuration::Configuration, - identity_setup_request: crate::models::IdentitySetupRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/identities", local_var_configuration.base_path); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&identity_setup_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_setup(configuration: &configuration::Configuration, identity_setup_request: crate::models::IdentitySetupRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/identity/identities", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&identity_setup_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Completes an avatar image upload. Must be called after the file upload process completes. -pub async fn identity_signup_for_beta( - configuration: &configuration::Configuration, - identity_signup_for_beta_request: crate::models::IdentitySignupForBetaRequest, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/identity/identities/self/beta-signup", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&identity_signup_for_beta_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_signup_for_beta(configuration: &configuration::Configuration, identity_signup_for_beta_request: crate::models::IdentitySignupForBetaRequest) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/identity/identities/self/beta-signup", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&identity_signup_for_beta_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Unfollows the given identity. -pub async fn identity_unfollow( - configuration: &configuration::Configuration, - identity_id: &str, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/identity/identities/{identity_id}/follow", - local_var_configuration.base_path, - identity_id = crate::apis::urlencode(identity_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_unfollow(configuration: &configuration::Configuration, identity_id: &str) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/identity/identities/{identity_id}/follow", local_var_configuration.base_path, identity_id=crate::apis::urlencode(identity_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } -pub async fn identity_unmark_deletion( - configuration: &configuration::Configuration, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/identity/identities/self/delete-request", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_unmark_deletion(configuration: &configuration::Configuration, ) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/identity/identities/self/delete-request", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Updates profile of the current identity. -pub async fn identity_update_profile( - configuration: &configuration::Configuration, - identity_update_profile_request: crate::models::IdentityUpdateProfileRequest, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/identity/identities/self/profile", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&identity_update_profile_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_update_profile(configuration: &configuration::Configuration, identity_update_profile_request: crate::models::IdentityUpdateProfileRequest) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/identity/identities/self/profile", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&identity_update_profile_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Updates the current identity's status. -pub async fn identity_update_status( - configuration: &configuration::Configuration, - identity_update_status_request: crate::models::IdentityUpdateStatusRequest, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/identity/identities/identities/self/status", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&identity_update_status_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_update_status(configuration: &configuration::Configuration, identity_update_status_request: crate::models::IdentityUpdateStatusRequest) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/identity/identities/identities/self/status", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&identity_update_status_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Validate contents of identity profile. Use to provide immediate feedback on profile changes before committing them. -pub async fn identity_validate_profile( - configuration: &configuration::Configuration, - identity_update_profile_request: crate::models::IdentityUpdateProfileRequest, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/identity/identities/self/profile/validate", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&identity_update_profile_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_validate_profile(configuration: &configuration::Configuration, identity_update_profile_request: crate::models::IdentityUpdateProfileRequest) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/identity/identities/self/profile/validate", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&identity_update_profile_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/identity_events_api.rs b/sdks/rust/src/apis/identity_events_api.rs index 38e63614..b21fc73f 100644 --- a/sdks/rust/src/apis/identity_events_api.rs +++ b/sdks/rust/src/apis/identity_events_api.rs @@ -4,69 +4,62 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`identity_events_watch`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityEventsWatchError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } + /// Returns all events relative to the current identity. -pub async fn identity_events_watch( - configuration: &configuration::Configuration, - watch_index: Option<&str>, -) -> Result> { - let local_var_configuration = configuration; +pub async fn identity_events_watch(configuration: &configuration::Configuration, watch_index: Option<&str>) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &local_var_configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/identity/events/live", local_var_configuration.base_path); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!("{}/identity/events/live", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = - local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/identity_links_api.rs b/sdks/rust/src/apis/identity_links_api.rs index 01a61739..54f06431 100644 --- a/sdks/rust/src/apis/identity_links_api.rs +++ b/sdks/rust/src/apis/identity_links_api.rs @@ -4,241 +4,197 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`identity_links_cancel`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityLinksCancelError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_links_complete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityLinksCompleteError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_links_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityLinksGetError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_links_prepare`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityLinksPrepareError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } + /// Cancels a game link. It can no longer be used to link after cancellation. -pub async fn identity_links_cancel( - configuration: &configuration::Configuration, - identity_cancel_game_link_request: crate::models::IdentityCancelGameLinkRequest, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/identity/game-links/cancel", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&identity_cancel_game_link_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_links_cancel(configuration: &configuration::Configuration, identity_cancel_game_link_request: crate::models::IdentityCancelGameLinkRequest) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/identity/game-links/cancel", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&identity_cancel_game_link_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Completes a game link process and returns whether or not the link is valid. -pub async fn identity_links_complete( - configuration: &configuration::Configuration, - identity_complete_game_link_request: crate::models::IdentityCompleteGameLinkRequest, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/identity/game-links/complete", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&identity_complete_game_link_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_links_complete(configuration: &configuration::Configuration, identity_complete_game_link_request: crate::models::IdentityCompleteGameLinkRequest) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/identity/game-links/complete", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&identity_complete_game_link_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Returns the current status of a linking process. Once `status` is `complete`, the identity's profile should be fetched again since they may have switched accounts. -pub async fn identity_links_get( - configuration: &configuration::Configuration, - identity_link_token: &str, - watch_index: Option<&str>, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/game-links", local_var_configuration.base_path); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - local_var_req_builder = - local_var_req_builder.query(&[("identity_link_token", &identity_link_token.to_string())]); - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = - local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_links_get(configuration: &configuration::Configuration, identity_link_token: &str, watch_index: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/identity/game-links", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("identity_link_token", &identity_link_token.to_string())]); + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Begins the process for linking an identity with the Rivet Hub. # Importance of Linking Identities When an identity is created via `rivet.api.identity#SetupIdentity`, the identity is temporary and is not shared with other games the user plays. In order to make the identity permanent and synchronize the identity with other games, the identity must be linked with the hub. # Linking Process The linking process works by opening `identity_link_url` in a browser then polling `rivet.api.identity#GetGameLink` to wait for it to complete. This is designed to be as flexible as possible so `identity_link_url` can be opened on any device. For example, when playing a console game, the user can scan a QR code for `identity_link_url` to authenticate on their phone. -pub async fn identity_links_prepare( - configuration: &configuration::Configuration, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/game-links", local_var_configuration.base_path); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_links_prepare(configuration: &configuration::Configuration, ) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/identity/game-links", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/job_run_api.rs b/sdks/rust/src/apis/job_run_api.rs index b4556456..8e2dc671 100644 --- a/sdks/rust/src/apis/job_run_api.rs +++ b/sdks/rust/src/apis/job_run_api.rs @@ -4,63 +4,58 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`job_run_cleanup`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum JobRunCleanupError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } -pub async fn job_run_cleanup( - configuration: &configuration::Configuration, -) -> Result<(), Error> { - let local_var_configuration = configuration; - let local_var_client = &local_var_configuration.client; +pub async fn job_run_cleanup(configuration: &configuration::Configuration, ) -> Result<(), Error> { + let local_var_configuration = configuration; - let local_var_uri_str = format!("{}/job/runs/cleanup", local_var_configuration.base_path); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let local_var_client = &local_var_configuration.client; - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; + let local_var_uri_str = format!("{}/job/runs/cleanup", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/kv_api.rs b/sdks/rust/src/apis/kv_api.rs index c598718d..101035e7 100644 --- a/sdks/rust/src/apis/kv_api.rs +++ b/sdks/rust/src/apis/kv_api.rs @@ -4,425 +4,349 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`kv_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum KvDeleteError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`kv_delete_batch`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum KvDeleteBatchError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`kv_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum KvGetError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`kv_get_batch`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum KvGetBatchError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`kv_list`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum KvListError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`kv_put`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum KvPutError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`kv_put_batch`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum KvPutBatchError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } + /// Deletes a key-value entry by key. -pub async fn kv_delete( - configuration: &configuration::Configuration, - key: &str, - namespace_id: Option<&str>, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/kv/entries", local_var_configuration.base_path); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - local_var_req_builder = local_var_req_builder.query(&[("key", &key.to_string())]); - if let Some(ref local_var_str) = namespace_id { - local_var_req_builder = - local_var_req_builder.query(&[("namespace_id", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn kv_delete(configuration: &configuration::Configuration, key: &str, namespace_id: Option<&str>) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/kv/entries", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("key", &key.to_string())]); + if let Some(ref local_var_str) = namespace_id { + local_var_req_builder = local_var_req_builder.query(&[("namespace_id", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Deletes multiple key-value entries by key(s). -pub async fn kv_delete_batch( - configuration: &configuration::Configuration, - keys: &str, - namespace_id: Option<&str>, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/kv/entries/batch", local_var_configuration.base_path); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - local_var_req_builder = local_var_req_builder.query(&[("keys", &keys.to_string())]); - if let Some(ref local_var_str) = namespace_id { - local_var_req_builder = - local_var_req_builder.query(&[("namespace_id", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn kv_delete_batch(configuration: &configuration::Configuration, keys: &str, namespace_id: Option<&str>) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/kv/entries/batch", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("keys", &keys.to_string())]); + if let Some(ref local_var_str) = namespace_id { + local_var_req_builder = local_var_req_builder.query(&[("namespace_id", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Returns a specific key-value entry by key. -pub async fn kv_get( - configuration: &configuration::Configuration, - key: &str, - watch_index: Option<&str>, - namespace_id: Option<&str>, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/kv/entries", local_var_configuration.base_path); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - local_var_req_builder = local_var_req_builder.query(&[("key", &key.to_string())]); - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = - local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = namespace_id { - local_var_req_builder = - local_var_req_builder.query(&[("namespace_id", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn kv_get(configuration: &configuration::Configuration, key: &str, watch_index: Option<&str>, namespace_id: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/kv/entries", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("key", &key.to_string())]); + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = namespace_id { + local_var_req_builder = local_var_req_builder.query(&[("namespace_id", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Gets multiple key-value entries by key(s). -pub async fn kv_get_batch( - configuration: &configuration::Configuration, - keys: &str, - watch_index: Option<&str>, - namespace_id: Option<&str>, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/kv/entries/batch", local_var_configuration.base_path); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - local_var_req_builder = local_var_req_builder.query(&[("keys", &keys.to_string())]); - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = - local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = namespace_id { - local_var_req_builder = - local_var_req_builder.query(&[("namespace_id", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn kv_get_batch(configuration: &configuration::Configuration, keys: &str, watch_index: Option<&str>, namespace_id: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/kv/entries/batch", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("keys", &keys.to_string())]); + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = namespace_id { + local_var_req_builder = local_var_req_builder.query(&[("namespace_id", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Lists all keys in a directory. -pub async fn kv_list( - configuration: &configuration::Configuration, - directory: &str, - namespace_id: &str, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/kv/entries/list", local_var_configuration.base_path); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - local_var_req_builder = local_var_req_builder.query(&[("directory", &directory.to_string())]); - local_var_req_builder = - local_var_req_builder.query(&[("namespace_id", &namespace_id.to_string())]); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn kv_list(configuration: &configuration::Configuration, directory: &str, namespace_id: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/kv/entries/list", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("directory", &directory.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("namespace_id", &namespace_id.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Puts (sets or overwrites) a key-value entry by key. -pub async fn kv_put( - configuration: &configuration::Configuration, - kv_put_request: crate::models::KvPutRequest, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/kv/entries", local_var_configuration.base_path); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&kv_put_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn kv_put(configuration: &configuration::Configuration, kv_put_request: crate::models::KvPutRequest) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/kv/entries", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&kv_put_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Puts (sets or overwrites) multiple key-value entries by key(s). -pub async fn kv_put_batch( - configuration: &configuration::Configuration, - kv_put_batch_request: crate::models::KvPutBatchRequest, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/kv/entries/batch", local_var_configuration.base_path); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&kv_put_batch_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn kv_put_batch(configuration: &configuration::Configuration, kv_put_batch_request: crate::models::KvPutBatchRequest) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/kv/entries/batch", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&kv_put_batch_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/matchmaker_lobbies_api.rs b/sdks/rust/src/apis/matchmaker_lobbies_api.rs index 7bff3f14..d6496860 100644 --- a/sdks/rust/src/apis/matchmaker_lobbies_api.rs +++ b/sdks/rust/src/apis/matchmaker_lobbies_api.rs @@ -4,481 +4,378 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`matchmaker_lobbies_create`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum MatchmakerLobbiesCreateError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`matchmaker_lobbies_find`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum MatchmakerLobbiesFindError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`matchmaker_lobbies_get_state`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum MatchmakerLobbiesGetStateError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`matchmaker_lobbies_join`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum MatchmakerLobbiesJoinError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`matchmaker_lobbies_list`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum MatchmakerLobbiesListError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`matchmaker_lobbies_ready`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum MatchmakerLobbiesReadyError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`matchmaker_lobbies_set_closed`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum MatchmakerLobbiesSetClosedError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`matchmaker_lobbies_set_state`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum MatchmakerLobbiesSetStateError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } + /// Creates a custom lobby. When [tokenless authentication](/docs/general/concepts/tokenless-authentication/web) is enabled in your game namespace, this endpoint does not require a token to authenticate. Otherwise, a [development namespace token](/docs/general/concepts/token-types#namespace-development) can be used for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) can be used for general authentication. -pub async fn matchmaker_lobbies_create( - configuration: &configuration::Configuration, - matchmaker_lobbies_create_request: crate::models::MatchmakerLobbiesCreateRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/matchmaker/lobbies/create", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&matchmaker_lobbies_create_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn matchmaker_lobbies_create(configuration: &configuration::Configuration, matchmaker_lobbies_create_request: crate::models::MatchmakerLobbiesCreateRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/matchmaker/lobbies/create", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&matchmaker_lobbies_create_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Finds a lobby based on the given criteria. If a lobby is not found and `prevent_auto_create_lobby` is `false`, a new lobby will be created. When [tokenless authentication](/docs/general/concepts/tokenless-authentication/web) is enabled in your game namespace, this endpoint does not require a token to authenticate. Otherwise, a [development namespace token](/docs/general/concepts/token-types#namespace-development) can be used for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) can be used for general authentication. -pub async fn matchmaker_lobbies_find( - configuration: &configuration::Configuration, - matchmaker_lobbies_find_request: crate::models::MatchmakerLobbiesFindRequest, - origin: Option<&str>, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/matchmaker/lobbies/find", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(local_var_param_value) = origin { - local_var_req_builder = - local_var_req_builder.header("origin", local_var_param_value.to_string()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&matchmaker_lobbies_find_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn matchmaker_lobbies_find(configuration: &configuration::Configuration, matchmaker_lobbies_find_request: crate::models::MatchmakerLobbiesFindRequest, origin: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/matchmaker/lobbies/find", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(local_var_param_value) = origin { + local_var_req_builder = local_var_req_builder.header("origin", local_var_param_value.to_string()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&matchmaker_lobbies_find_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Get the state of any lobby. This endpoint requires a [lobby token](/docs/general/concepts/token-types#matchmaker-lobby) for authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) for mock responses. When running on Rivet servers, you can access the given lobby token from the [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable. -pub async fn matchmaker_lobbies_get_state( - configuration: &configuration::Configuration, - lobby_id: &str, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/matchmaker/lobbies/{lobby_id}/state", - local_var_configuration.base_path, - lobby_id = crate::apis::urlencode(lobby_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn matchmaker_lobbies_get_state(configuration: &configuration::Configuration, lobby_id: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/matchmaker/lobbies/{lobby_id}/state", local_var_configuration.base_path, lobby_id=crate::apis::urlencode(lobby_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Joins a specific lobby. This request will use the direct player count configured for the lobby group. When [tokenless authentication](/docs/general/concepts/tokenless-authentication/web) is enabled in your game namespace, this endpoint does not require a token to authenticate. Otherwise, a [development namespace token](/docs/general/concepts/token-types#namespace-development) can be used for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) can be used for general authentication. -pub async fn matchmaker_lobbies_join( - configuration: &configuration::Configuration, - matchmaker_lobbies_join_request: crate::models::MatchmakerLobbiesJoinRequest, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/matchmaker/lobbies/join", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&matchmaker_lobbies_join_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn matchmaker_lobbies_join(configuration: &configuration::Configuration, matchmaker_lobbies_join_request: crate::models::MatchmakerLobbiesJoinRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/matchmaker/lobbies/join", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&matchmaker_lobbies_join_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Lists all open lobbies. When [tokenless authentication](/docs/general/concepts/tokenless-authentication/web) is enabled in your game namespace, this endpoint does not require a token to authenticate. Otherwise, a [development namespace token](/docs/general/concepts/token-types#namespace-development) can be used for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) can be used for general authentication. -pub async fn matchmaker_lobbies_list( - configuration: &configuration::Configuration, - include_state: Option, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/matchmaker/lobbies/list", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = include_state { - local_var_req_builder = - local_var_req_builder.query(&[("include_state", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn matchmaker_lobbies_list(configuration: &configuration::Configuration, include_state: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/matchmaker/lobbies/list", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = include_state { + local_var_req_builder = local_var_req_builder.query(&[("include_state", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Marks the current lobby as ready to accept connections. Players will not be able to connect to this lobby until the lobby is flagged as ready. This endpoint requires a [lobby token](/docs/general/concepts/token-types#matchmaker-lobby) for authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) for mock responses. When running on Rivet servers, you can access the given lobby token from the [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable. -pub async fn matchmaker_lobbies_ready( - configuration: &configuration::Configuration, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/matchmaker/lobbies/ready", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn matchmaker_lobbies_ready(configuration: &configuration::Configuration, ) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/matchmaker/lobbies/ready", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// If `is_closed` is `true`, the matchmaker will no longer route players to the lobby. Players can still join using the /join endpoint (this can be disabled by the developer by rejecting all new connections after setting the lobby to closed). Does not shutdown the lobby. This endpoint requires a [lobby token](/docs/general/concepts/token-types#matchmaker-lobby) for authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) for mock responses. When running on Rivet servers, you can access the given lobby token from the [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable. -pub async fn matchmaker_lobbies_set_closed( - configuration: &configuration::Configuration, - matchmaker_lobbies_set_closed_request: crate::models::MatchmakerLobbiesSetClosedRequest, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/matchmaker/lobbies/closed", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&matchmaker_lobbies_set_closed_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn matchmaker_lobbies_set_closed(configuration: &configuration::Configuration, matchmaker_lobbies_set_closed_request: crate::models::MatchmakerLobbiesSetClosedRequest) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/matchmaker/lobbies/closed", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&matchmaker_lobbies_set_closed_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Sets the state JSON of the current lobby. This endpoint requires a [lobby token](/docs/general/concepts/token-types#matchmaker-lobby) for authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) for mock responses. When running on Rivet servers, you can access the given lobby token from the [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable. -pub async fn matchmaker_lobbies_set_state( - configuration: &configuration::Configuration, - body: Option, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/matchmaker/lobbies/state", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&body); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn matchmaker_lobbies_set_state(configuration: &configuration::Configuration, body: Option) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/matchmaker/lobbies/state", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&body); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/matchmaker_players_api.rs b/sdks/rust/src/apis/matchmaker_players_api.rs index 3d784a9c..f3746338 100644 --- a/sdks/rust/src/apis/matchmaker_players_api.rs +++ b/sdks/rust/src/apis/matchmaker_players_api.rs @@ -4,186 +4,149 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`matchmaker_players_connected`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum MatchmakerPlayersConnectedError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`matchmaker_players_disconnected`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum MatchmakerPlayersDisconnectedError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`matchmaker_players_get_statistics`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum MatchmakerPlayersGetStatisticsError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } + /// Validates the player token is valid and has not already been consumed then marks the player as connected. # Player Tokens and Reserved Slots Player tokens reserve a spot in the lobby until they expire. This allows for precise matchmaking up to exactly the lobby's player limit, which is important for games with small lobbies and a high influx of players. By calling this endpoint with the player token, the player's spot is marked as connected and will not expire. If this endpoint is never called, the player's token will expire and this spot will be filled by another player. # Anti-Botting Player tokens are only issued by caling `lobbies.join`, calling `lobbies.find`, or from the `GlobalEventMatchmakerLobbyJoin` event. These endpoints have anti-botting measures (i.e. enforcing max player limits, captchas, and detecting bots), so valid player tokens provide some confidence that the player is not a bot. Therefore, it's important to make sure the token is valid by waiting for this endpoint to return OK before allowing the connected socket to do anything else. If this endpoint returns an error, the socket should be disconnected immediately. # How to Transmit the Player Token The client is responsible for acquiring the player token by caling `lobbies.join`, calling `lobbies.find`, or from the `GlobalEventMatchmakerLobbyJoin` event. Beyond that, it's up to the developer how the player token is transmitted to the lobby. If using WebSockets, the player token can be transmitted as a query parameter. Otherwise, the player token will likely be automatically sent by the client once the socket opens. As mentioned above, nothing else should happen until the player token is validated. -pub async fn matchmaker_players_connected( - configuration: &configuration::Configuration, - matchmaker_players_connected_request: crate::models::MatchmakerPlayersConnectedRequest, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/matchmaker/players/connected", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&matchmaker_players_connected_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn matchmaker_players_connected(configuration: &configuration::Configuration, matchmaker_players_connected_request: crate::models::MatchmakerPlayersConnectedRequest) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/matchmaker/players/connected", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&matchmaker_players_connected_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Marks a player as disconnected. # Ghost Players If players are not marked as disconnected, lobbies will result with \"ghost players\" that the matchmaker thinks exist but are no longer connected to the lobby. -pub async fn matchmaker_players_disconnected( - configuration: &configuration::Configuration, - matchmaker_players_connected_request: crate::models::MatchmakerPlayersConnectedRequest, -) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/matchmaker/players/disconnected", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&matchmaker_players_connected_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn matchmaker_players_disconnected(configuration: &configuration::Configuration, matchmaker_players_connected_request: crate::models::MatchmakerPlayersConnectedRequest) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/matchmaker/players/disconnected", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&matchmaker_players_connected_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } /// Gives matchmaker statistics about the players in game. -pub async fn matchmaker_players_get_statistics( - configuration: &configuration::Configuration, -) -> Result< - crate::models::MatchmakerGetStatisticsResponse, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/matchmaker/players/statistics", - local_var_configuration.base_path - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn matchmaker_players_get_statistics(configuration: &configuration::Configuration, ) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/matchmaker/players/statistics", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/matchmaker_regions_api.rs b/sdks/rust/src/apis/matchmaker_regions_api.rs index 11287bd1..c6fa8de9 100644 --- a/sdks/rust/src/apis/matchmaker_regions_api.rs +++ b/sdks/rust/src/apis/matchmaker_regions_api.rs @@ -4,64 +4,59 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`matchmaker_regions_list`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum MatchmakerRegionsListError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } -/// Returns a list of regions available to this namespace. Regions are sorted by most optimal to least optimal. The player's IP address is used to calculate the regions' optimality. -pub async fn matchmaker_regions_list( - configuration: &configuration::Configuration, -) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/matchmaker/regions", local_var_configuration.base_path); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } +/// Returns a list of regions available to this namespace. Regions are sorted by most optimal to least optimal. The player's IP address is used to calculate the regions' optimality. +pub async fn matchmaker_regions_list(configuration: &configuration::Configuration, ) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/matchmaker/regions", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/mod.rs b/sdks/rust/src/apis/mod.rs index d1b17d09..24048abe 100644 --- a/sdks/rust/src/apis/mod.rs +++ b/sdks/rust/src/apis/mod.rs @@ -3,93 +3,91 @@ use std::fmt; #[derive(Debug, Clone)] pub struct ResponseContent { - pub status: reqwest::StatusCode, - pub content: String, - pub entity: Option, + pub status: reqwest::StatusCode, + pub content: String, + pub entity: Option, } #[derive(Debug)] pub enum Error { - Reqwest(reqwest::Error), - Serde(serde_json::Error), - Io(std::io::Error), - ResponseError(ResponseContent), + Reqwest(reqwest::Error), + Serde(serde_json::Error), + Io(std::io::Error), + ResponseError(ResponseContent), } -impl fmt::Display for Error { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let (module, e) = match self { - Error::Reqwest(e) => ("reqwest", e.to_string()), - Error::Serde(e) => ("serde", e.to_string()), - Error::Io(e) => ("IO", e.to_string()), - Error::ResponseError(e) => ("response", format!("status code {}", e.status)), - }; - write!(f, "error in {}: {}", module, e) - } +impl fmt::Display for Error { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let (module, e) = match self { + Error::Reqwest(e) => ("reqwest", e.to_string()), + Error::Serde(e) => ("serde", e.to_string()), + Error::Io(e) => ("IO", e.to_string()), + Error::ResponseError(e) => ("response", format!("status code {}", e.status)), + }; + write!(f, "error in {}: {}", module, e) + } } -impl error::Error for Error { - fn source(&self) -> Option<&(dyn error::Error + 'static)> { - Some(match self { - Error::Reqwest(e) => e, - Error::Serde(e) => e, - Error::Io(e) => e, - Error::ResponseError(_) => return None, - }) - } +impl error::Error for Error { + fn source(&self) -> Option<&(dyn error::Error + 'static)> { + Some(match self { + Error::Reqwest(e) => e, + Error::Serde(e) => e, + Error::Io(e) => e, + Error::ResponseError(_) => return None, + }) + } } -impl From for Error { - fn from(e: reqwest::Error) -> Self { - Error::Reqwest(e) - } +impl From for Error { + fn from(e: reqwest::Error) -> Self { + Error::Reqwest(e) + } } -impl From for Error { - fn from(e: serde_json::Error) -> Self { - Error::Serde(e) - } +impl From for Error { + fn from(e: serde_json::Error) -> Self { + Error::Serde(e) + } } -impl From for Error { - fn from(e: std::io::Error) -> Self { - Error::Io(e) - } +impl From for Error { + fn from(e: std::io::Error) -> Self { + Error::Io(e) + } } pub fn urlencode>(s: T) -> String { - ::url::form_urlencoded::byte_serialize(s.as_ref().as_bytes()).collect() + ::url::form_urlencoded::byte_serialize(s.as_ref().as_bytes()).collect() } pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String, String)> { - if let serde_json::Value::Object(object) = value { - let mut params = vec![]; + if let serde_json::Value::Object(object) = value { + let mut params = vec![]; - for (key, value) in object { - match value { - serde_json::Value::Object(_) => params.append(&mut parse_deep_object( - &format!("{}[{}]", prefix, key), - value, - )), - serde_json::Value::Array(array) => { - for (i, value) in array.iter().enumerate() { - params.append(&mut parse_deep_object( - &format!("{}[{}][{}]", prefix, key, i), - value, - )); - } - } - serde_json::Value::String(s) => { - params.push((format!("{}[{}]", prefix, key), s.clone())) - } - _ => params.push((format!("{}[{}]", prefix, key), value.to_string())), - } - } + for (key, value) in object { + match value { + serde_json::Value::Object(_) => params.append(&mut parse_deep_object( + &format!("{}[{}]", prefix, key), + value, + )), + serde_json::Value::Array(array) => { + for (i, value) in array.iter().enumerate() { + params.append(&mut parse_deep_object( + &format!("{}[{}][{}]", prefix, key, i), + value, + )); + } + }, + serde_json::Value::String(s) => params.push((format!("{}[{}]", prefix, key), s.clone())), + _ => params.push((format!("{}[{}]", prefix, key), value.to_string())), + } + } - return params; - } + return params; + } - unimplemented!("Only objects are supported with style=deepObject") + unimplemented!("Only objects are supported with style=deepObject") } pub mod admin_api; @@ -107,8 +105,8 @@ pub mod cloud_games_avatars_api; pub mod cloud_games_builds_api; pub mod cloud_games_cdn_api; pub mod cloud_games_matchmaker_api; -pub mod cloud_games_namespaces_analytics_api; pub mod cloud_games_namespaces_api; +pub mod cloud_games_namespaces_analytics_api; pub mod cloud_games_namespaces_logs_api; pub mod cloud_games_tokens_api; pub mod cloud_games_versions_api; @@ -125,8 +123,8 @@ pub mod ee_cloud_groups_billing_api; pub mod group_api; pub mod group_invites_api; pub mod group_join_requests_api; -pub mod identity_activities_api; pub mod identity_api; +pub mod identity_activities_api; pub mod identity_events_api; pub mod identity_links_api; pub mod job_run_api; @@ -137,5 +135,6 @@ pub mod matchmaker_regions_api; pub mod portal_games_api; pub mod provision_datacenters_api; pub mod provision_servers_api; +pub mod servers_servers_api; pub mod configuration; diff --git a/sdks/rust/src/apis/portal_games_api.rs b/sdks/rust/src/apis/portal_games_api.rs index 90325c1e..2a0442cc 100644 --- a/sdks/rust/src/apis/portal_games_api.rs +++ b/sdks/rust/src/apis/portal_games_api.rs @@ -4,74 +4,62 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`portal_games_get_game_profile`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum PortalGamesGetGameProfileError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } + /// Returns a game profile. -pub async fn portal_games_get_game_profile( - configuration: &configuration::Configuration, - game_name_id: &str, - watch_index: Option<&str>, -) -> Result> { - let local_var_configuration = configuration; +pub async fn portal_games_get_game_profile(configuration: &configuration::Configuration, game_name_id: &str, watch_index: Option<&str>) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &local_var_configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!( - "{}/portal/games/{game_name_id}/profile", - local_var_configuration.base_path, - game_name_id = crate::apis::urlencode(game_name_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!("{}/portal/games/{game_name_id}/profile", local_var_configuration.base_path, game_name_id=crate::apis::urlencode(game_name_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = - local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/provision_datacenters_api.rs b/sdks/rust/src/apis/provision_datacenters_api.rs index 7c1101f9..78703373 100644 --- a/sdks/rust/src/apis/provision_datacenters_api.rs +++ b/sdks/rust/src/apis/provision_datacenters_api.rs @@ -4,69 +4,58 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`provision_datacenters_get_tls`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ProvisionDatacentersGetTlsError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } -pub async fn provision_datacenters_get_tls( - configuration: &configuration::Configuration, - datacenter_id: &str, -) -> Result> -{ - let local_var_configuration = configuration; - let local_var_client = &local_var_configuration.client; +pub async fn provision_datacenters_get_tls(configuration: &configuration::Configuration, datacenter_id: &str) -> Result> { + let local_var_configuration = configuration; - let local_var_uri_str = format!( - "{}/datacenters/{datacenter_id}/tls", - local_var_configuration.base_path, - datacenter_id = crate::apis::urlencode(datacenter_id) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_client = &local_var_configuration.client; - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; + let local_var_uri_str = format!("{}/datacenters/{datacenter_id}/tls", local_var_configuration.base_path, datacenter_id=crate::apis::urlencode(datacenter_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/provision_servers_api.rs b/sdks/rust/src/apis/provision_servers_api.rs index 53da9c24..89970841 100644 --- a/sdks/rust/src/apis/provision_servers_api.rs +++ b/sdks/rust/src/apis/provision_servers_api.rs @@ -4,68 +4,58 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + use reqwest; -use super::{configuration, Error}; use crate::apis::ResponseContent; +use super::{Error, configuration}; + /// struct for typed errors of method [`provision_servers_get_info`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ProvisionServersGetInfoError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } -pub async fn provision_servers_get_info( - configuration: &configuration::Configuration, - ip: &str, -) -> Result> { - let local_var_configuration = configuration; - let local_var_client = &local_var_configuration.client; +pub async fn provision_servers_get_info(configuration: &configuration::Configuration, ip: &str) -> Result> { + let local_var_configuration = configuration; - let local_var_uri_str = format!( - "{}/servers/{ip}", - local_var_configuration.base_path, - ip = crate::apis::urlencode(ip) - ); - let mut local_var_req_builder = - local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_client = &local_var_configuration.client; - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = - local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; + let local_var_uri_str = format!("{}/servers/{ip}", local_var_configuration.base_path, ip=crate::apis::urlencode(ip)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = - serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { - status: local_var_status, - content: local_var_content, - entity: local_var_entity, - }; - Err(Error::ResponseError(local_var_error)) - } + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } } + diff --git a/sdks/rust/src/apis/servers_servers_api.rs b/sdks/rust/src/apis/servers_servers_api.rs new file mode 100644 index 00000000..7970f70e --- /dev/null +++ b/sdks/rust/src/apis/servers_servers_api.rs @@ -0,0 +1,154 @@ +/* + * Rivet API EE + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; + +use crate::apis::ResponseContent; +use super::{Error, configuration}; + + +/// struct for typed errors of method [`servers_servers_create`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ServersServersCreateError { + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`servers_servers_destroy`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ServersServersDestroyError { + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`servers_servers_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ServersServersGetError { + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), +} + + +/// Create a new dynamic server. +pub async fn servers_servers_create(configuration: &configuration::Configuration, servers_create_server_request: crate::models::ServersCreateServerRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/servers/servers", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&servers_create_server_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Destroy a dynamic server. +pub async fn servers_servers_destroy(configuration: &configuration::Configuration, server_id: &str, override_kill_timeout: Option) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/servers/servers/{server_id}", local_var_configuration.base_path, server_id=crate::apis::urlencode(server_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = override_kill_timeout { + local_var_req_builder = local_var_req_builder.query(&[("override_kill_timeout", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Gets a dynamic server. +pub async fn servers_servers_get(configuration: &configuration::Configuration, server_id: &str) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/servers/servers/{server_id}", local_var_configuration.base_path, server_id=crate::apis::urlencode(server_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/sdks/rust/src/lib.rs b/sdks/rust/src/lib.rs index fc22e4e4..c1dd666f 100644 --- a/sdks/rust/src/lib.rs +++ b/sdks/rust/src/lib.rs @@ -1,10 +1,10 @@ #[macro_use] extern crate serde_derive; -extern crate reqwest; extern crate serde; extern crate serde_json; extern crate url; +extern crate reqwest; pub mod apis; pub mod models; diff --git a/sdks/rust/src/models/admin_clusters_build_delivery_method.rs b/sdks/rust/src/models/admin_clusters_build_delivery_method.rs index e71fd5bd..6de661fc 100644 --- a/sdks/rust/src/models/admin_clusters_build_delivery_method.rs +++ b/sdks/rust/src/models/admin_clusters_build_delivery_method.rs @@ -4,30 +4,36 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ -/// + +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum AdminClustersBuildDeliveryMethod { - #[serde(rename = "traffic_server")] - TrafficServer, - #[serde(rename = "s3_direct")] - S3Direct, + #[serde(rename = "traffic_server")] + TrafficServer, + #[serde(rename = "s3_direct")] + S3Direct, + } impl ToString for AdminClustersBuildDeliveryMethod { - fn to_string(&self) -> String { - match self { - Self::TrafficServer => String::from("traffic_server"), - Self::S3Direct => String::from("s3_direct"), - } - } + fn to_string(&self) -> String { + match self { + Self::TrafficServer => String::from("traffic_server"), + Self::S3Direct => String::from("s3_direct"), + } + } } impl Default for AdminClustersBuildDeliveryMethod { - fn default() -> AdminClustersBuildDeliveryMethod { - Self::TrafficServer - } + fn default() -> AdminClustersBuildDeliveryMethod { + Self::TrafficServer + } } + + + + diff --git a/sdks/rust/src/models/admin_clusters_cluster.rs b/sdks/rust/src/models/admin_clusters_cluster.rs index ac1f8359..0f9ec6dc 100644 --- a/sdks/rust/src/models/admin_clusters_cluster.rs +++ b/sdks/rust/src/models/admin_clusters_cluster.rs @@ -4,29 +4,34 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct AdminClustersCluster { - #[serde(rename = "cluster_id")] - pub cluster_id: uuid::Uuid, - #[serde(rename = "create_ts")] - pub create_ts: i64, - #[serde(rename = "name_id")] - pub name_id: String, - #[serde(rename = "owner_team_id", skip_serializing_if = "Option::is_none")] - pub owner_team_id: Option, + #[serde(rename = "cluster_id")] + pub cluster_id: uuid::Uuid, + #[serde(rename = "create_ts")] + pub create_ts: i64, + #[serde(rename = "name_id")] + pub name_id: String, + #[serde(rename = "owner_team_id", skip_serializing_if = "Option::is_none")] + pub owner_team_id: Option, } impl AdminClustersCluster { - pub fn new(cluster_id: uuid::Uuid, create_ts: i64, name_id: String) -> AdminClustersCluster { - AdminClustersCluster { - cluster_id, - create_ts, - name_id, - owner_team_id: None, - } - } + pub fn new(cluster_id: uuid::Uuid, create_ts: i64, name_id: String) -> AdminClustersCluster { + AdminClustersCluster { + cluster_id, + create_ts, + name_id, + owner_team_id: None, + } + } } + + diff --git a/sdks/rust/src/models/admin_clusters_create_cluster_request.rs b/sdks/rust/src/models/admin_clusters_create_cluster_request.rs index 64cc09fb..dee83060 100644 --- a/sdks/rust/src/models/admin_clusters_create_cluster_request.rs +++ b/sdks/rust/src/models/admin_clusters_create_cluster_request.rs @@ -4,23 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct AdminClustersCreateClusterRequest { - #[serde(rename = "name_id")] - pub name_id: String, - #[serde(rename = "owner_team_id", skip_serializing_if = "Option::is_none")] - pub owner_team_id: Option, + #[serde(rename = "name_id")] + pub name_id: String, + #[serde(rename = "owner_team_id", skip_serializing_if = "Option::is_none")] + pub owner_team_id: Option, } impl AdminClustersCreateClusterRequest { - pub fn new(name_id: String) -> AdminClustersCreateClusterRequest { - AdminClustersCreateClusterRequest { - name_id, - owner_team_id: None, - } - } + pub fn new(name_id: String) -> AdminClustersCreateClusterRequest { + AdminClustersCreateClusterRequest { + name_id, + owner_team_id: None, + } + } } + + diff --git a/sdks/rust/src/models/admin_clusters_create_cluster_response.rs b/sdks/rust/src/models/admin_clusters_create_cluster_response.rs index 85a50d59..b3e73e0f 100644 --- a/sdks/rust/src/models/admin_clusters_create_cluster_response.rs +++ b/sdks/rust/src/models/admin_clusters_create_cluster_response.rs @@ -4,18 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct AdminClustersCreateClusterResponse { - #[serde(rename = "cluster_id")] - pub cluster_id: uuid::Uuid, + #[serde(rename = "cluster_id")] + pub cluster_id: uuid::Uuid, } impl AdminClustersCreateClusterResponse { - pub fn new(cluster_id: uuid::Uuid) -> AdminClustersCreateClusterResponse { - AdminClustersCreateClusterResponse { cluster_id } - } + pub fn new(cluster_id: uuid::Uuid) -> AdminClustersCreateClusterResponse { + AdminClustersCreateClusterResponse { + cluster_id, + } + } } + + diff --git a/sdks/rust/src/models/admin_clusters_create_datacenter_request.rs b/sdks/rust/src/models/admin_clusters_create_datacenter_request.rs index 549476b6..fd79c9de 100644 --- a/sdks/rust/src/models/admin_clusters_create_datacenter_request.rs +++ b/sdks/rust/src/models/admin_clusters_create_datacenter_request.rs @@ -4,38 +4,40 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct AdminClustersCreateDatacenterRequest { - #[serde(rename = "build_delivery_method")] - pub build_delivery_method: crate::models::AdminClustersBuildDeliveryMethod, - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "name_id")] - pub name_id: String, - #[serde(rename = "provider")] - pub provider: crate::models::AdminClustersProvider, - #[serde(rename = "provider_datacenter_id")] - pub provider_datacenter_id: String, + #[serde(rename = "build_delivery_method")] + pub build_delivery_method: crate::models::AdminClustersBuildDeliveryMethod, + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "name_id")] + pub name_id: String, + #[serde(rename = "prebakes_enabled")] + pub prebakes_enabled: bool, + #[serde(rename = "provider")] + pub provider: crate::models::AdminClustersProvider, + #[serde(rename = "provider_datacenter_id")] + pub provider_datacenter_id: String, } impl AdminClustersCreateDatacenterRequest { - pub fn new( - build_delivery_method: crate::models::AdminClustersBuildDeliveryMethod, - display_name: String, - name_id: String, - provider: crate::models::AdminClustersProvider, - provider_datacenter_id: String, - ) -> AdminClustersCreateDatacenterRequest { - AdminClustersCreateDatacenterRequest { - build_delivery_method, - display_name, - name_id, - provider, - provider_datacenter_id, - } - } + pub fn new(build_delivery_method: crate::models::AdminClustersBuildDeliveryMethod, display_name: String, name_id: String, prebakes_enabled: bool, provider: crate::models::AdminClustersProvider, provider_datacenter_id: String) -> AdminClustersCreateDatacenterRequest { + AdminClustersCreateDatacenterRequest { + build_delivery_method, + display_name, + name_id, + prebakes_enabled, + provider, + provider_datacenter_id, + } + } } + + diff --git a/sdks/rust/src/models/admin_clusters_create_datacenter_response.rs b/sdks/rust/src/models/admin_clusters_create_datacenter_response.rs index 899fc740..8790529e 100644 --- a/sdks/rust/src/models/admin_clusters_create_datacenter_response.rs +++ b/sdks/rust/src/models/admin_clusters_create_datacenter_response.rs @@ -4,18 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct AdminClustersCreateDatacenterResponse { - #[serde(rename = "datacenter_id")] - pub datacenter_id: uuid::Uuid, + #[serde(rename = "datacenter_id")] + pub datacenter_id: uuid::Uuid, } impl AdminClustersCreateDatacenterResponse { - pub fn new(datacenter_id: uuid::Uuid) -> AdminClustersCreateDatacenterResponse { - AdminClustersCreateDatacenterResponse { datacenter_id } - } + pub fn new(datacenter_id: uuid::Uuid) -> AdminClustersCreateDatacenterResponse { + AdminClustersCreateDatacenterResponse { + datacenter_id, + } + } } + + diff --git a/sdks/rust/src/models/admin_clusters_datacenter.rs b/sdks/rust/src/models/admin_clusters_datacenter.rs index f6c4ca7e..747bb9dd 100644 --- a/sdks/rust/src/models/admin_clusters_datacenter.rs +++ b/sdks/rust/src/models/admin_clusters_datacenter.rs @@ -4,53 +4,49 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct AdminClustersDatacenter { - #[serde(rename = "build_delivery_method")] - pub build_delivery_method: crate::models::AdminClustersBuildDeliveryMethod, - #[serde(rename = "cluster_id")] - pub cluster_id: uuid::Uuid, - #[serde(rename = "datacenter_id")] - pub datacenter_id: uuid::Uuid, - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "name_id")] - pub name_id: String, - #[serde(rename = "pools")] - pub pools: Vec, - #[serde(rename = "provider")] - pub provider: crate::models::AdminClustersProvider, - #[serde(rename = "provider_api_token", skip_serializing_if = "Option::is_none")] - pub provider_api_token: Option, - #[serde(rename = "provider_datacenter_id")] - pub provider_datacenter_id: String, + #[serde(rename = "build_delivery_method")] + pub build_delivery_method: crate::models::AdminClustersBuildDeliveryMethod, + #[serde(rename = "cluster_id")] + pub cluster_id: uuid::Uuid, + #[serde(rename = "datacenter_id")] + pub datacenter_id: uuid::Uuid, + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "name_id")] + pub name_id: String, + #[serde(rename = "pools")] + pub pools: Vec, + #[serde(rename = "provider")] + pub provider: crate::models::AdminClustersProvider, + #[serde(rename = "provider_api_token", skip_serializing_if = "Option::is_none")] + pub provider_api_token: Option, + #[serde(rename = "provider_datacenter_id")] + pub provider_datacenter_id: String, } impl AdminClustersDatacenter { - pub fn new( - build_delivery_method: crate::models::AdminClustersBuildDeliveryMethod, - cluster_id: uuid::Uuid, - datacenter_id: uuid::Uuid, - display_name: String, - name_id: String, - pools: Vec, - provider: crate::models::AdminClustersProvider, - provider_datacenter_id: String, - ) -> AdminClustersDatacenter { - AdminClustersDatacenter { - build_delivery_method, - cluster_id, - datacenter_id, - display_name, - name_id, - pools, - provider, - provider_api_token: None, - provider_datacenter_id, - } - } + pub fn new(build_delivery_method: crate::models::AdminClustersBuildDeliveryMethod, cluster_id: uuid::Uuid, datacenter_id: uuid::Uuid, display_name: String, name_id: String, pools: Vec, provider: crate::models::AdminClustersProvider, provider_datacenter_id: String) -> AdminClustersDatacenter { + AdminClustersDatacenter { + build_delivery_method, + cluster_id, + datacenter_id, + display_name, + name_id, + pools, + provider, + provider_api_token: None, + provider_datacenter_id, + } + } } + + diff --git a/sdks/rust/src/models/admin_clusters_hardware.rs b/sdks/rust/src/models/admin_clusters_hardware.rs index 4db7c0c5..2883b076 100644 --- a/sdks/rust/src/models/admin_clusters_hardware.rs +++ b/sdks/rust/src/models/admin_clusters_hardware.rs @@ -4,18 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct AdminClustersHardware { - #[serde(rename = "provider_hardware")] - pub provider_hardware: String, + #[serde(rename = "provider_hardware")] + pub provider_hardware: String, } impl AdminClustersHardware { - pub fn new(provider_hardware: String) -> AdminClustersHardware { - AdminClustersHardware { provider_hardware } - } + pub fn new(provider_hardware: String) -> AdminClustersHardware { + AdminClustersHardware { + provider_hardware, + } + } } + + diff --git a/sdks/rust/src/models/admin_clusters_list_clusters_response.rs b/sdks/rust/src/models/admin_clusters_list_clusters_response.rs index 9f7d11c6..d3288174 100644 --- a/sdks/rust/src/models/admin_clusters_list_clusters_response.rs +++ b/sdks/rust/src/models/admin_clusters_list_clusters_response.rs @@ -4,20 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct AdminClustersListClustersResponse { - #[serde(rename = "clusters")] - pub clusters: Vec, + #[serde(rename = "clusters")] + pub clusters: Vec, } impl AdminClustersListClustersResponse { - pub fn new( - clusters: Vec, - ) -> AdminClustersListClustersResponse { - AdminClustersListClustersResponse { clusters } - } + pub fn new(clusters: Vec) -> AdminClustersListClustersResponse { + AdminClustersListClustersResponse { + clusters, + } + } } + + diff --git a/sdks/rust/src/models/admin_clusters_list_datacenters_response.rs b/sdks/rust/src/models/admin_clusters_list_datacenters_response.rs index c83dc80c..01308656 100644 --- a/sdks/rust/src/models/admin_clusters_list_datacenters_response.rs +++ b/sdks/rust/src/models/admin_clusters_list_datacenters_response.rs @@ -4,20 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct AdminClustersListDatacentersResponse { - #[serde(rename = "datacenters")] - pub datacenters: Vec, + #[serde(rename = "datacenters")] + pub datacenters: Vec, } impl AdminClustersListDatacentersResponse { - pub fn new( - datacenters: Vec, - ) -> AdminClustersListDatacentersResponse { - AdminClustersListDatacentersResponse { datacenters } - } + pub fn new(datacenters: Vec) -> AdminClustersListDatacentersResponse { + AdminClustersListDatacentersResponse { + datacenters, + } + } } + + diff --git a/sdks/rust/src/models/admin_clusters_list_servers_response.rs b/sdks/rust/src/models/admin_clusters_list_servers_response.rs index 9af88890..2c21599c 100644 --- a/sdks/rust/src/models/admin_clusters_list_servers_response.rs +++ b/sdks/rust/src/models/admin_clusters_list_servers_response.rs @@ -4,20 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct AdminClustersListServersResponse { - #[serde(rename = "servers")] - pub servers: Vec, + #[serde(rename = "servers")] + pub servers: Vec, } impl AdminClustersListServersResponse { - pub fn new( - servers: Vec, - ) -> AdminClustersListServersResponse { - AdminClustersListServersResponse { servers } - } + pub fn new(servers: Vec) -> AdminClustersListServersResponse { + AdminClustersListServersResponse { + servers, + } + } } + + diff --git a/sdks/rust/src/models/admin_clusters_pool.rs b/sdks/rust/src/models/admin_clusters_pool.rs index 91198350..1ec666f1 100644 --- a/sdks/rust/src/models/admin_clusters_pool.rs +++ b/sdks/rust/src/models/admin_clusters_pool.rs @@ -4,42 +4,40 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct AdminClustersPool { - #[serde(rename = "desired_count")] - pub desired_count: i32, - #[serde(rename = "drain_timeout")] - pub drain_timeout: i64, - #[serde(rename = "hardware")] - pub hardware: Vec, - #[serde(rename = "max_count")] - pub max_count: i32, - #[serde(rename = "min_count")] - pub min_count: i32, - #[serde(rename = "pool_type")] - pub pool_type: crate::models::AdminClustersPoolType, + #[serde(rename = "desired_count")] + pub desired_count: i32, + #[serde(rename = "drain_timeout")] + pub drain_timeout: i64, + #[serde(rename = "hardware")] + pub hardware: Vec, + #[serde(rename = "max_count")] + pub max_count: i32, + #[serde(rename = "min_count")] + pub min_count: i32, + #[serde(rename = "pool_type")] + pub pool_type: crate::models::AdminClustersPoolType, } impl AdminClustersPool { - pub fn new( - desired_count: i32, - drain_timeout: i64, - hardware: Vec, - max_count: i32, - min_count: i32, - pool_type: crate::models::AdminClustersPoolType, - ) -> AdminClustersPool { - AdminClustersPool { - desired_count, - drain_timeout, - hardware, - max_count, - min_count, - pool_type, - } - } + pub fn new(desired_count: i32, drain_timeout: i64, hardware: Vec, max_count: i32, min_count: i32, pool_type: crate::models::AdminClustersPoolType) -> AdminClustersPool { + AdminClustersPool { + desired_count, + drain_timeout, + hardware, + max_count, + min_count, + pool_type, + } + } } + + diff --git a/sdks/rust/src/models/admin_clusters_pool_type.rs b/sdks/rust/src/models/admin_clusters_pool_type.rs index 26d6c6d9..13c7dd0c 100644 --- a/sdks/rust/src/models/admin_clusters_pool_type.rs +++ b/sdks/rust/src/models/admin_clusters_pool_type.rs @@ -4,33 +4,39 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ -/// + +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum AdminClustersPoolType { - #[serde(rename = "job")] - Job, - #[serde(rename = "gg")] - Gg, - #[serde(rename = "ats")] - Ats, + #[serde(rename = "job")] + Job, + #[serde(rename = "gg")] + Gg, + #[serde(rename = "ats")] + Ats, + } impl ToString for AdminClustersPoolType { - fn to_string(&self) -> String { - match self { - Self::Job => String::from("job"), - Self::Gg => String::from("gg"), - Self::Ats => String::from("ats"), - } - } + fn to_string(&self) -> String { + match self { + Self::Job => String::from("job"), + Self::Gg => String::from("gg"), + Self::Ats => String::from("ats"), + } + } } impl Default for AdminClustersPoolType { - fn default() -> AdminClustersPoolType { - Self::Job - } + fn default() -> AdminClustersPoolType { + Self::Job + } } + + + + diff --git a/sdks/rust/src/models/admin_clusters_pool_update.rs b/sdks/rust/src/models/admin_clusters_pool_update.rs new file mode 100644 index 00000000..8c612f3b --- /dev/null +++ b/sdks/rust/src/models/admin_clusters_pool_update.rs @@ -0,0 +1,43 @@ +/* + * Rivet API EE + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct AdminClustersPoolUpdate { + #[serde(rename = "desired_count", skip_serializing_if = "Option::is_none")] + pub desired_count: Option, + #[serde(rename = "drain_timeout", skip_serializing_if = "Option::is_none")] + pub drain_timeout: Option, + #[serde(rename = "hardware")] + pub hardware: Vec, + #[serde(rename = "max_count", skip_serializing_if = "Option::is_none")] + pub max_count: Option, + #[serde(rename = "min_count", skip_serializing_if = "Option::is_none")] + pub min_count: Option, + #[serde(rename = "pool_type")] + pub pool_type: crate::models::AdminClustersPoolType, +} + +impl AdminClustersPoolUpdate { + pub fn new(hardware: Vec, pool_type: crate::models::AdminClustersPoolType) -> AdminClustersPoolUpdate { + AdminClustersPoolUpdate { + desired_count: None, + drain_timeout: None, + hardware, + max_count: None, + min_count: None, + pool_type, + } + } +} + + diff --git a/sdks/rust/src/models/admin_clusters_provider.rs b/sdks/rust/src/models/admin_clusters_provider.rs index 6bd0e8e3..afd72888 100644 --- a/sdks/rust/src/models/admin_clusters_provider.rs +++ b/sdks/rust/src/models/admin_clusters_provider.rs @@ -4,27 +4,33 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ -/// + +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum AdminClustersProvider { - #[serde(rename = "linode")] - Linode, + #[serde(rename = "linode")] + Linode, + } impl ToString for AdminClustersProvider { - fn to_string(&self) -> String { - match self { - Self::Linode => String::from("linode"), - } - } + fn to_string(&self) -> String { + match self { + Self::Linode => String::from("linode"), + } + } } impl Default for AdminClustersProvider { - fn default() -> AdminClustersProvider { - Self::Linode - } + fn default() -> AdminClustersProvider { + Self::Linode + } } + + + + diff --git a/sdks/rust/src/models/admin_clusters_server.rs b/sdks/rust/src/models/admin_clusters_server.rs index 4e07ecd3..36e708e1 100644 --- a/sdks/rust/src/models/admin_clusters_server.rs +++ b/sdks/rust/src/models/admin_clusters_server.rs @@ -4,23 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct AdminClustersServer { - #[serde(rename = "public_ip")] - pub public_ip: String, - #[serde(rename = "server_id")] - pub server_id: uuid::Uuid, + #[serde(rename = "public_ip")] + pub public_ip: String, + #[serde(rename = "server_id")] + pub server_id: uuid::Uuid, } impl AdminClustersServer { - pub fn new(public_ip: String, server_id: uuid::Uuid) -> AdminClustersServer { - AdminClustersServer { - public_ip, - server_id, - } - } + pub fn new(public_ip: String, server_id: uuid::Uuid) -> AdminClustersServer { + AdminClustersServer { + public_ip, + server_id, + } + } } + + diff --git a/sdks/rust/src/models/admin_clusters_update_datacenter_request.rs b/sdks/rust/src/models/admin_clusters_update_datacenter_request.rs index 84ed7492..5a74cc40 100644 --- a/sdks/rust/src/models/admin_clusters_update_datacenter_request.rs +++ b/sdks/rust/src/models/admin_clusters_update_datacenter_request.rs @@ -4,38 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct AdminClustersUpdateDatacenterRequest { - #[serde(rename = "desired_count", skip_serializing_if = "Option::is_none")] - pub desired_count: Option, - #[serde(rename = "drain_timeout", skip_serializing_if = "Option::is_none")] - pub drain_timeout: Option, - #[serde(rename = "hardware")] - pub hardware: Vec, - #[serde(rename = "max_count", skip_serializing_if = "Option::is_none")] - pub max_count: Option, - #[serde(rename = "min_count", skip_serializing_if = "Option::is_none")] - pub min_count: Option, - #[serde(rename = "pool_type")] - pub pool_type: crate::models::AdminClustersPoolType, + #[serde(rename = "pools")] + pub pools: Vec, + #[serde(rename = "prebakes_enabled", skip_serializing_if = "Option::is_none")] + pub prebakes_enabled: Option, } impl AdminClustersUpdateDatacenterRequest { - pub fn new( - hardware: Vec, - pool_type: crate::models::AdminClustersPoolType, - ) -> AdminClustersUpdateDatacenterRequest { - AdminClustersUpdateDatacenterRequest { - desired_count: None, - drain_timeout: None, - hardware, - max_count: None, - min_count: None, - pool_type, - } - } + pub fn new(pools: Vec) -> AdminClustersUpdateDatacenterRequest { + AdminClustersUpdateDatacenterRequest { + pools, + prebakes_enabled: None, + } + } } + + diff --git a/sdks/rust/src/models/admin_login_request.rs b/sdks/rust/src/models/admin_login_request.rs index f0044963..fcf97b8a 100644 --- a/sdks/rust/src/models/admin_login_request.rs +++ b/sdks/rust/src/models/admin_login_request.rs @@ -4,18 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct AdminLoginRequest { - #[serde(rename = "name")] - pub name: String, + #[serde(rename = "name")] + pub name: String, } impl AdminLoginRequest { - pub fn new(name: String) -> AdminLoginRequest { - AdminLoginRequest { name } - } + pub fn new(name: String) -> AdminLoginRequest { + AdminLoginRequest { + name, + } + } } + + diff --git a/sdks/rust/src/models/admin_login_response.rs b/sdks/rust/src/models/admin_login_response.rs index ab22d918..1783f090 100644 --- a/sdks/rust/src/models/admin_login_response.rs +++ b/sdks/rust/src/models/admin_login_response.rs @@ -4,18 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct AdminLoginResponse { - #[serde(rename = "url")] - pub url: String, + #[serde(rename = "url")] + pub url: String, } impl AdminLoginResponse { - pub fn new(url: String) -> AdminLoginResponse { - AdminLoginResponse { url } - } + pub fn new(url: String) -> AdminLoginResponse { + AdminLoginResponse { + url, + } + } } + + diff --git a/sdks/rust/src/models/auth_complete_status.rs b/sdks/rust/src/models/auth_complete_status.rs index 151e1f34..dc7138ee 100644 --- a/sdks/rust/src/models/auth_complete_status.rs +++ b/sdks/rust/src/models/auth_complete_status.rs @@ -4,7 +4,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -13,35 +13,40 @@ /// Represents the state of an external account linking process. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum AuthCompleteStatus { - #[serde(rename = "switch_identity")] - SwitchIdentity, - #[serde(rename = "linked_account_added")] - LinkedAccountAdded, - #[serde(rename = "already_complete")] - AlreadyComplete, - #[serde(rename = "expired")] - Expired, - #[serde(rename = "too_many_attempts")] - TooManyAttempts, - #[serde(rename = "incorrect")] - Incorrect, + #[serde(rename = "switch_identity")] + SwitchIdentity, + #[serde(rename = "linked_account_added")] + LinkedAccountAdded, + #[serde(rename = "already_complete")] + AlreadyComplete, + #[serde(rename = "expired")] + Expired, + #[serde(rename = "too_many_attempts")] + TooManyAttempts, + #[serde(rename = "incorrect")] + Incorrect, + } impl ToString for AuthCompleteStatus { - fn to_string(&self) -> String { - match self { - Self::SwitchIdentity => String::from("switch_identity"), - Self::LinkedAccountAdded => String::from("linked_account_added"), - Self::AlreadyComplete => String::from("already_complete"), - Self::Expired => String::from("expired"), - Self::TooManyAttempts => String::from("too_many_attempts"), - Self::Incorrect => String::from("incorrect"), - } - } + fn to_string(&self) -> String { + match self { + Self::SwitchIdentity => String::from("switch_identity"), + Self::LinkedAccountAdded => String::from("linked_account_added"), + Self::AlreadyComplete => String::from("already_complete"), + Self::Expired => String::from("expired"), + Self::TooManyAttempts => String::from("too_many_attempts"), + Self::Incorrect => String::from("incorrect"), + } + } } impl Default for AuthCompleteStatus { - fn default() -> AuthCompleteStatus { - Self::SwitchIdentity - } + fn default() -> AuthCompleteStatus { + Self::SwitchIdentity + } } + + + + diff --git a/sdks/rust/src/models/auth_identity_complete_access_token_verification_request.rs b/sdks/rust/src/models/auth_identity_complete_access_token_verification_request.rs index 2bdbc4d0..a02a5743 100644 --- a/sdks/rust/src/models/auth_identity_complete_access_token_verification_request.rs +++ b/sdks/rust/src/models/auth_identity_complete_access_token_verification_request.rs @@ -4,19 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct AuthIdentityCompleteAccessTokenVerificationRequest { - /// Documentation at https://jwt.io/ - #[serde(rename = "access_token")] - pub access_token: String, + /// Documentation at https://jwt.io/ + #[serde(rename = "access_token")] + pub access_token: String, } impl AuthIdentityCompleteAccessTokenVerificationRequest { - pub fn new(access_token: String) -> AuthIdentityCompleteAccessTokenVerificationRequest { - AuthIdentityCompleteAccessTokenVerificationRequest { access_token } - } + pub fn new(access_token: String) -> AuthIdentityCompleteAccessTokenVerificationRequest { + AuthIdentityCompleteAccessTokenVerificationRequest { + access_token, + } + } } + + diff --git a/sdks/rust/src/models/auth_identity_complete_email_verification_request.rs b/sdks/rust/src/models/auth_identity_complete_email_verification_request.rs index 76edc3e6..0d79f38c 100644 --- a/sdks/rust/src/models/auth_identity_complete_email_verification_request.rs +++ b/sdks/rust/src/models/auth_identity_complete_email_verification_request.rs @@ -4,27 +4,29 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct AuthIdentityCompleteEmailVerificationRequest { - /// The code sent to the requestee's email. - #[serde(rename = "code")] - pub code: String, - #[serde(rename = "verification_id")] - pub verification_id: uuid::Uuid, + /// The code sent to the requestee's email. + #[serde(rename = "code")] + pub code: String, + #[serde(rename = "verification_id")] + pub verification_id: uuid::Uuid, } impl AuthIdentityCompleteEmailVerificationRequest { - pub fn new( - code: String, - verification_id: uuid::Uuid, - ) -> AuthIdentityCompleteEmailVerificationRequest { - AuthIdentityCompleteEmailVerificationRequest { - code, - verification_id, - } - } + pub fn new(code: String, verification_id: uuid::Uuid) -> AuthIdentityCompleteEmailVerificationRequest { + AuthIdentityCompleteEmailVerificationRequest { + code, + verification_id, + } + } } + + diff --git a/sdks/rust/src/models/auth_identity_complete_email_verification_response.rs b/sdks/rust/src/models/auth_identity_complete_email_verification_response.rs index 2cede2c9..58bae2f0 100644 --- a/sdks/rust/src/models/auth_identity_complete_email_verification_response.rs +++ b/sdks/rust/src/models/auth_identity_complete_email_verification_response.rs @@ -4,20 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct AuthIdentityCompleteEmailVerificationResponse { - #[serde(rename = "status")] - pub status: crate::models::AuthCompleteStatus, + #[serde(rename = "status")] + pub status: crate::models::AuthCompleteStatus, } impl AuthIdentityCompleteEmailVerificationResponse { - pub fn new( - status: crate::models::AuthCompleteStatus, - ) -> AuthIdentityCompleteEmailVerificationResponse { - AuthIdentityCompleteEmailVerificationResponse { status } - } + pub fn new(status: crate::models::AuthCompleteStatus) -> AuthIdentityCompleteEmailVerificationResponse { + AuthIdentityCompleteEmailVerificationResponse { + status, + } + } } + + diff --git a/sdks/rust/src/models/auth_identity_start_email_verification_request.rs b/sdks/rust/src/models/auth_identity_start_email_verification_request.rs index e6f47e76..5a08fb37 100644 --- a/sdks/rust/src/models/auth_identity_start_email_verification_request.rs +++ b/sdks/rust/src/models/auth_identity_start_email_verification_request.rs @@ -4,26 +4,31 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct AuthIdentityStartEmailVerificationRequest { - #[serde(rename = "captcha", skip_serializing_if = "Option::is_none")] - pub captcha: Option>, - #[serde(rename = "email")] - pub email: String, - #[serde(rename = "game_id", skip_serializing_if = "Option::is_none")] - pub game_id: Option, + #[serde(rename = "captcha", skip_serializing_if = "Option::is_none")] + pub captcha: Option>, + #[serde(rename = "email")] + pub email: String, + #[serde(rename = "game_id", skip_serializing_if = "Option::is_none")] + pub game_id: Option, } impl AuthIdentityStartEmailVerificationRequest { - pub fn new(email: String) -> AuthIdentityStartEmailVerificationRequest { - AuthIdentityStartEmailVerificationRequest { - captcha: None, - email, - game_id: None, - } - } + pub fn new(email: String) -> AuthIdentityStartEmailVerificationRequest { + AuthIdentityStartEmailVerificationRequest { + captcha: None, + email, + game_id: None, + } + } } + + diff --git a/sdks/rust/src/models/auth_identity_start_email_verification_response.rs b/sdks/rust/src/models/auth_identity_start_email_verification_response.rs index a753f6b6..e6bdbed1 100644 --- a/sdks/rust/src/models/auth_identity_start_email_verification_response.rs +++ b/sdks/rust/src/models/auth_identity_start_email_verification_response.rs @@ -4,18 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct AuthIdentityStartEmailVerificationResponse { - #[serde(rename = "verification_id")] - pub verification_id: uuid::Uuid, + #[serde(rename = "verification_id")] + pub verification_id: uuid::Uuid, } impl AuthIdentityStartEmailVerificationResponse { - pub fn new(verification_id: uuid::Uuid) -> AuthIdentityStartEmailVerificationResponse { - AuthIdentityStartEmailVerificationResponse { verification_id } - } + pub fn new(verification_id: uuid::Uuid) -> AuthIdentityStartEmailVerificationResponse { + AuthIdentityStartEmailVerificationResponse { + verification_id, + } + } } + + diff --git a/sdks/rust/src/models/auth_refresh_identity_token_request.rs b/sdks/rust/src/models/auth_refresh_identity_token_request.rs index 09003dec..1fc25dbb 100644 --- a/sdks/rust/src/models/auth_refresh_identity_token_request.rs +++ b/sdks/rust/src/models/auth_refresh_identity_token_request.rs @@ -4,19 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct AuthRefreshIdentityTokenRequest { - /// When `true`, the current identity for the provided cookie will be logged out and a new identity will be returned. - #[serde(rename = "logout", skip_serializing_if = "Option::is_none")] - pub logout: Option, + /// When `true`, the current identity for the provided cookie will be logged out and a new identity will be returned. + #[serde(rename = "logout", skip_serializing_if = "Option::is_none")] + pub logout: Option, } impl AuthRefreshIdentityTokenRequest { - pub fn new() -> AuthRefreshIdentityTokenRequest { - AuthRefreshIdentityTokenRequest { logout: None } - } + pub fn new() -> AuthRefreshIdentityTokenRequest { + AuthRefreshIdentityTokenRequest { + logout: None, + } + } } + + diff --git a/sdks/rust/src/models/auth_refresh_identity_token_response.rs b/sdks/rust/src/models/auth_refresh_identity_token_response.rs index 20abaaf2..e10d6915 100644 --- a/sdks/rust/src/models/auth_refresh_identity_token_response.rs +++ b/sdks/rust/src/models/auth_refresh_identity_token_response.rs @@ -4,32 +4,33 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct AuthRefreshIdentityTokenResponse { - /// Token expiration time (in milliseconds). - #[serde(rename = "exp")] - pub exp: String, - #[serde(rename = "identity_id")] - pub identity_id: uuid::Uuid, - /// A JSON Web Token. Slightly modified to include a description prefix and use Protobufs of JSON. - #[serde(rename = "token")] - pub token: String, + /// Token expiration time (in milliseconds). + #[serde(rename = "exp")] + pub exp: String, + #[serde(rename = "identity_id")] + pub identity_id: uuid::Uuid, + /// A JSON Web Token. Slightly modified to include a description prefix and use Protobufs of JSON. + #[serde(rename = "token")] + pub token: String, } impl AuthRefreshIdentityTokenResponse { - pub fn new( - exp: String, - identity_id: uuid::Uuid, - token: String, - ) -> AuthRefreshIdentityTokenResponse { - AuthRefreshIdentityTokenResponse { - exp, - identity_id, - token, - } - } + pub fn new(exp: String, identity_id: uuid::Uuid, token: String) -> AuthRefreshIdentityTokenResponse { + AuthRefreshIdentityTokenResponse { + exp, + identity_id, + token, + } + } } + + diff --git a/sdks/rust/src/models/captcha_config.rs b/sdks/rust/src/models/captcha_config.rs index de6df6fe..a205d631 100644 --- a/sdks/rust/src/models/captcha_config.rs +++ b/sdks/rust/src/models/captcha_config.rs @@ -4,26 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CaptchaConfig : Methods to verify a captcha + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CaptchaConfig { - #[serde(rename = "hcaptcha", skip_serializing_if = "Option::is_none")] - pub hcaptcha: Option>, - #[serde(rename = "turnstile", skip_serializing_if = "Option::is_none")] - pub turnstile: Option>, + #[serde(rename = "hcaptcha", skip_serializing_if = "Option::is_none")] + pub hcaptcha: Option>, + #[serde(rename = "turnstile", skip_serializing_if = "Option::is_none")] + pub turnstile: Option>, } impl CaptchaConfig { - /// Methods to verify a captcha - pub fn new() -> CaptchaConfig { - CaptchaConfig { - hcaptcha: None, - turnstile: None, - } - } + /// Methods to verify a captcha + pub fn new() -> CaptchaConfig { + CaptchaConfig { + hcaptcha: None, + turnstile: None, + } + } } + + diff --git a/sdks/rust/src/models/captcha_config_hcaptcha.rs b/sdks/rust/src/models/captcha_config_hcaptcha.rs index 9f0246b9..2d227a95 100644 --- a/sdks/rust/src/models/captcha_config_hcaptcha.rs +++ b/sdks/rust/src/models/captcha_config_hcaptcha.rs @@ -4,21 +4,27 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CaptchaConfigHcaptcha : Captcha configuration. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CaptchaConfigHcaptcha { - #[serde(rename = "client_response")] - pub client_response: String, + #[serde(rename = "client_response")] + pub client_response: String, } impl CaptchaConfigHcaptcha { - /// Captcha configuration. - pub fn new(client_response: String) -> CaptchaConfigHcaptcha { - CaptchaConfigHcaptcha { client_response } - } + /// Captcha configuration. + pub fn new(client_response: String) -> CaptchaConfigHcaptcha { + CaptchaConfigHcaptcha { + client_response, + } + } } + + diff --git a/sdks/rust/src/models/captcha_config_turnstile.rs b/sdks/rust/src/models/captcha_config_turnstile.rs index ecfd012b..a4b53b23 100644 --- a/sdks/rust/src/models/captcha_config_turnstile.rs +++ b/sdks/rust/src/models/captcha_config_turnstile.rs @@ -4,21 +4,27 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CaptchaConfigTurnstile : Captcha configuration. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CaptchaConfigTurnstile { - #[serde(rename = "client_response")] - pub client_response: String, + #[serde(rename = "client_response")] + pub client_response: String, } impl CaptchaConfigTurnstile { - /// Captcha configuration. - pub fn new(client_response: String) -> CaptchaConfigTurnstile { - CaptchaConfigTurnstile { client_response } - } + /// Captcha configuration. + pub fn new(client_response: String) -> CaptchaConfigTurnstile { + CaptchaConfigTurnstile { + client_response, + } + } } + + diff --git a/sdks/rust/src/models/cloud_auth_agent.rs b/sdks/rust/src/models/cloud_auth_agent.rs index 35816631..2443f780 100644 --- a/sdks/rust/src/models/cloud_auth_agent.rs +++ b/sdks/rust/src/models/cloud_auth_agent.rs @@ -4,26 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudAuthAgent : The current authenticated agent. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudAuthAgent { - #[serde(rename = "game_cloud", skip_serializing_if = "Option::is_none")] - pub game_cloud: Option>, - #[serde(rename = "identity", skip_serializing_if = "Option::is_none")] - pub identity: Option>, + #[serde(rename = "game_cloud", skip_serializing_if = "Option::is_none")] + pub game_cloud: Option>, + #[serde(rename = "identity", skip_serializing_if = "Option::is_none")] + pub identity: Option>, } impl CloudAuthAgent { - /// The current authenticated agent. - pub fn new() -> CloudAuthAgent { - CloudAuthAgent { - game_cloud: None, - identity: None, - } - } + /// The current authenticated agent. + pub fn new() -> CloudAuthAgent { + CloudAuthAgent { + game_cloud: None, + identity: None, + } + } } + + diff --git a/sdks/rust/src/models/cloud_auth_agent_game_cloud.rs b/sdks/rust/src/models/cloud_auth_agent_game_cloud.rs index 61ece012..92f5ccac 100644 --- a/sdks/rust/src/models/cloud_auth_agent_game_cloud.rs +++ b/sdks/rust/src/models/cloud_auth_agent_game_cloud.rs @@ -4,21 +4,27 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudAuthAgentGameCloud : The current authenticated game cloud. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudAuthAgentGameCloud { - #[serde(rename = "game_id")] - pub game_id: uuid::Uuid, + #[serde(rename = "game_id")] + pub game_id: uuid::Uuid, } impl CloudAuthAgentGameCloud { - /// The current authenticated game cloud. - pub fn new(game_id: uuid::Uuid) -> CloudAuthAgentGameCloud { - CloudAuthAgentGameCloud { game_id } - } + /// The current authenticated game cloud. + pub fn new(game_id: uuid::Uuid) -> CloudAuthAgentGameCloud { + CloudAuthAgentGameCloud { + game_id, + } + } } + + diff --git a/sdks/rust/src/models/cloud_auth_agent_identity.rs b/sdks/rust/src/models/cloud_auth_agent_identity.rs index a214fd2b..b06d895b 100644 --- a/sdks/rust/src/models/cloud_auth_agent_identity.rs +++ b/sdks/rust/src/models/cloud_auth_agent_identity.rs @@ -4,21 +4,27 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudAuthAgentIdentity : The current authenticated identity. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudAuthAgentIdentity { - #[serde(rename = "identity_id")] - pub identity_id: uuid::Uuid, + #[serde(rename = "identity_id")] + pub identity_id: uuid::Uuid, } impl CloudAuthAgentIdentity { - /// The current authenticated identity. - pub fn new(identity_id: uuid::Uuid) -> CloudAuthAgentIdentity { - CloudAuthAgentIdentity { identity_id } - } + /// The current authenticated identity. + pub fn new(identity_id: uuid::Uuid) -> CloudAuthAgentIdentity { + CloudAuthAgentIdentity { + identity_id, + } + } } + + diff --git a/sdks/rust/src/models/cloud_bootstrap_access.rs b/sdks/rust/src/models/cloud_bootstrap_access.rs index 849fb9cd..b04bdb5a 100644 --- a/sdks/rust/src/models/cloud_bootstrap_access.rs +++ b/sdks/rust/src/models/cloud_bootstrap_access.rs @@ -4,30 +4,36 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ -/// + +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum CloudBootstrapAccess { - #[serde(rename = "public")] - Public, - #[serde(rename = "private")] - Private, + #[serde(rename = "public")] + Public, + #[serde(rename = "private")] + Private, + } impl ToString for CloudBootstrapAccess { - fn to_string(&self) -> String { - match self { - Self::Public => String::from("public"), - Self::Private => String::from("private"), - } - } + fn to_string(&self) -> String { + match self { + Self::Public => String::from("public"), + Self::Private => String::from("private"), + } + } } impl Default for CloudBootstrapAccess { - fn default() -> CloudBootstrapAccess { - Self::Public - } + fn default() -> CloudBootstrapAccess { + Self::Public + } } + + + + diff --git a/sdks/rust/src/models/cloud_bootstrap_captcha.rs b/sdks/rust/src/models/cloud_bootstrap_captcha.rs index ff0d847e..5ddfd27d 100644 --- a/sdks/rust/src/models/cloud_bootstrap_captcha.rs +++ b/sdks/rust/src/models/cloud_bootstrap_captcha.rs @@ -4,18 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudBootstrapCaptcha { - #[serde(rename = "turnstile", skip_serializing_if = "Option::is_none")] - pub turnstile: Option>, + #[serde(rename = "turnstile", skip_serializing_if = "Option::is_none")] + pub turnstile: Option>, } impl CloudBootstrapCaptcha { - pub fn new() -> CloudBootstrapCaptcha { - CloudBootstrapCaptcha { turnstile: None } - } + pub fn new() -> CloudBootstrapCaptcha { + CloudBootstrapCaptcha { + turnstile: None, + } + } } + + diff --git a/sdks/rust/src/models/cloud_bootstrap_captcha_turnstile.rs b/sdks/rust/src/models/cloud_bootstrap_captcha_turnstile.rs index 0fd134a5..056bc471 100644 --- a/sdks/rust/src/models/cloud_bootstrap_captcha_turnstile.rs +++ b/sdks/rust/src/models/cloud_bootstrap_captcha_turnstile.rs @@ -4,18 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudBootstrapCaptchaTurnstile { - #[serde(rename = "site_key")] - pub site_key: String, + #[serde(rename = "site_key")] + pub site_key: String, } impl CloudBootstrapCaptchaTurnstile { - pub fn new(site_key: String) -> CloudBootstrapCaptchaTurnstile { - CloudBootstrapCaptchaTurnstile { site_key } - } + pub fn new(site_key: String) -> CloudBootstrapCaptchaTurnstile { + CloudBootstrapCaptchaTurnstile { + site_key, + } + } } + + diff --git a/sdks/rust/src/models/cloud_bootstrap_cluster.rs b/sdks/rust/src/models/cloud_bootstrap_cluster.rs index 16e3f259..eda7581d 100644 --- a/sdks/rust/src/models/cloud_bootstrap_cluster.rs +++ b/sdks/rust/src/models/cloud_bootstrap_cluster.rs @@ -4,7 +4,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -13,23 +13,28 @@ /// The type of cluster that the backend is currently running. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum CloudBootstrapCluster { - #[serde(rename = "enterprise")] - Enterprise, - #[serde(rename = "oss")] - Oss, + #[serde(rename = "enterprise")] + Enterprise, + #[serde(rename = "oss")] + Oss, + } impl ToString for CloudBootstrapCluster { - fn to_string(&self) -> String { - match self { - Self::Enterprise => String::from("enterprise"), - Self::Oss => String::from("oss"), - } - } + fn to_string(&self) -> String { + match self { + Self::Enterprise => String::from("enterprise"), + Self::Oss => String::from("oss"), + } + } } impl Default for CloudBootstrapCluster { - fn default() -> CloudBootstrapCluster { - Self::Enterprise - } + fn default() -> CloudBootstrapCluster { + Self::Enterprise + } } + + + + diff --git a/sdks/rust/src/models/cloud_bootstrap_domains.rs b/sdks/rust/src/models/cloud_bootstrap_domains.rs index 8f187b06..d6a59556 100644 --- a/sdks/rust/src/models/cloud_bootstrap_domains.rs +++ b/sdks/rust/src/models/cloud_bootstrap_domains.rs @@ -4,32 +4,36 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudBootstrapDomains : Domains that host parts of Rivet + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudBootstrapDomains { - #[serde(rename = "cdn")] - pub cdn: String, - #[serde(rename = "job")] - pub job: String, - #[serde(rename = "main")] - pub main: String, - #[serde(rename = "opengb", skip_serializing_if = "Option::is_none")] - pub opengb: Option, + #[serde(rename = "cdn")] + pub cdn: String, + #[serde(rename = "job")] + pub job: String, + #[serde(rename = "main")] + pub main: String, + #[serde(rename = "opengb", skip_serializing_if = "Option::is_none")] + pub opengb: Option, } impl CloudBootstrapDomains { - /// Domains that host parts of Rivet - pub fn new(cdn: String, job: String, main: String) -> CloudBootstrapDomains { - CloudBootstrapDomains { - cdn, - job, - main, - opengb: None, - } - } + /// Domains that host parts of Rivet + pub fn new(cdn: String, job: String, main: String) -> CloudBootstrapDomains { + CloudBootstrapDomains { + cdn, + job, + main, + opengb: None, + } + } } + + diff --git a/sdks/rust/src/models/cloud_bootstrap_login_methods.rs b/sdks/rust/src/models/cloud_bootstrap_login_methods.rs index 15577176..a9b5d259 100644 --- a/sdks/rust/src/models/cloud_bootstrap_login_methods.rs +++ b/sdks/rust/src/models/cloud_bootstrap_login_methods.rs @@ -4,23 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudBootstrapLoginMethods { - #[serde(rename = "access_token")] - pub access_token: bool, - #[serde(rename = "email")] - pub email: bool, + #[serde(rename = "access_token")] + pub access_token: bool, + #[serde(rename = "email")] + pub email: bool, } impl CloudBootstrapLoginMethods { - pub fn new(access_token: bool, email: bool) -> CloudBootstrapLoginMethods { - CloudBootstrapLoginMethods { - access_token, - email, - } - } + pub fn new(access_token: bool, email: bool) -> CloudBootstrapLoginMethods { + CloudBootstrapLoginMethods { + access_token, + email, + } + } } + + diff --git a/sdks/rust/src/models/cloud_bootstrap_origins.rs b/sdks/rust/src/models/cloud_bootstrap_origins.rs index cc727a42..b501d392 100644 --- a/sdks/rust/src/models/cloud_bootstrap_origins.rs +++ b/sdks/rust/src/models/cloud_bootstrap_origins.rs @@ -4,21 +4,27 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudBootstrapOrigins : Origins used to build URLs from + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudBootstrapOrigins { - #[serde(rename = "hub")] - pub hub: String, + #[serde(rename = "hub")] + pub hub: String, } impl CloudBootstrapOrigins { - /// Origins used to build URLs from - pub fn new(hub: String) -> CloudBootstrapOrigins { - CloudBootstrapOrigins { hub } - } + /// Origins used to build URLs from + pub fn new(hub: String) -> CloudBootstrapOrigins { + CloudBootstrapOrigins { + hub, + } + } } + + diff --git a/sdks/rust/src/models/cloud_bootstrap_response.rs b/sdks/rust/src/models/cloud_bootstrap_response.rs index 820fc713..88ac2030 100644 --- a/sdks/rust/src/models/cloud_bootstrap_response.rs +++ b/sdks/rust/src/models/cloud_bootstrap_response.rs @@ -4,41 +4,40 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudBootstrapResponse { - #[serde(rename = "access")] - pub access: crate::models::CloudBootstrapAccess, - #[serde(rename = "captcha")] - pub captcha: Box, - #[serde(rename = "cluster")] - pub cluster: crate::models::CloudBootstrapCluster, - #[serde(rename = "domains", skip_serializing_if = "Option::is_none")] - pub domains: Option>, - #[serde(rename = "login_methods")] - pub login_methods: Box, - #[serde(rename = "origins")] - pub origins: Box, + #[serde(rename = "access")] + pub access: crate::models::CloudBootstrapAccess, + #[serde(rename = "captcha")] + pub captcha: Box, + #[serde(rename = "cluster")] + pub cluster: crate::models::CloudBootstrapCluster, + #[serde(rename = "domains", skip_serializing_if = "Option::is_none")] + pub domains: Option>, + #[serde(rename = "login_methods")] + pub login_methods: Box, + #[serde(rename = "origins")] + pub origins: Box, } impl CloudBootstrapResponse { - pub fn new( - access: crate::models::CloudBootstrapAccess, - captcha: crate::models::CloudBootstrapCaptcha, - cluster: crate::models::CloudBootstrapCluster, - login_methods: crate::models::CloudBootstrapLoginMethods, - origins: crate::models::CloudBootstrapOrigins, - ) -> CloudBootstrapResponse { - CloudBootstrapResponse { - access, - captcha: Box::new(captcha), - cluster, - domains: None, - login_methods: Box::new(login_methods), - origins: Box::new(origins), - } - } + pub fn new(access: crate::models::CloudBootstrapAccess, captcha: crate::models::CloudBootstrapCaptcha, cluster: crate::models::CloudBootstrapCluster, login_methods: crate::models::CloudBootstrapLoginMethods, origins: crate::models::CloudBootstrapOrigins) -> CloudBootstrapResponse { + CloudBootstrapResponse { + access, + captcha: Box::new(captcha), + cluster, + domains: None, + login_methods: Box::new(login_methods), + origins: Box::new(origins), + } + } } + + diff --git a/sdks/rust/src/models/cloud_build_summary.rs b/sdks/rust/src/models/cloud_build_summary.rs index d59bf613..6943a385 100644 --- a/sdks/rust/src/models/cloud_build_summary.rs +++ b/sdks/rust/src/models/cloud_build_summary.rs @@ -4,49 +4,46 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudBuildSummary : A build summary. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudBuildSummary { - #[serde(rename = "build_id")] - pub build_id: uuid::Uuid, - /// Whether or not this build has completely been uploaded. - #[serde(rename = "complete")] - pub complete: bool, - /// Unsigned 64 bit integer. - #[serde(rename = "content_length")] - pub content_length: i64, - /// RFC3339 timestamp - #[serde(rename = "create_ts")] - pub create_ts: String, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "upload_id")] - pub upload_id: uuid::Uuid, + #[serde(rename = "build_id")] + pub build_id: uuid::Uuid, + /// Whether or not this build has completely been uploaded. + #[serde(rename = "complete")] + pub complete: bool, + /// Unsigned 64 bit integer. + #[serde(rename = "content_length")] + pub content_length: i64, + /// RFC3339 timestamp + #[serde(rename = "create_ts")] + pub create_ts: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "upload_id")] + pub upload_id: uuid::Uuid, } impl CloudBuildSummary { - /// A build summary. - pub fn new( - build_id: uuid::Uuid, - complete: bool, - content_length: i64, - create_ts: String, - display_name: String, - upload_id: uuid::Uuid, - ) -> CloudBuildSummary { - CloudBuildSummary { - build_id, - complete, - content_length, - create_ts, - display_name, - upload_id, - } - } + /// A build summary. + pub fn new(build_id: uuid::Uuid, complete: bool, content_length: i64, create_ts: String, display_name: String, upload_id: uuid::Uuid) -> CloudBuildSummary { + CloudBuildSummary { + build_id, + complete, + content_length, + create_ts, + display_name, + upload_id, + } + } } + + diff --git a/sdks/rust/src/models/cloud_cdn_auth_type.rs b/sdks/rust/src/models/cloud_cdn_auth_type.rs index 11edecf8..de0a457d 100644 --- a/sdks/rust/src/models/cloud_cdn_auth_type.rs +++ b/sdks/rust/src/models/cloud_cdn_auth_type.rs @@ -4,7 +4,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -13,23 +13,28 @@ /// A value denoting what type of authentication to use for a game namespace's CDN. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum CloudCdnAuthType { - #[serde(rename = "none")] - None, - #[serde(rename = "basic")] - Basic, + #[serde(rename = "none")] + None, + #[serde(rename = "basic")] + Basic, + } impl ToString for CloudCdnAuthType { - fn to_string(&self) -> String { - match self { - Self::None => String::from("none"), - Self::Basic => String::from("basic"), - } - } + fn to_string(&self) -> String { + match self { + Self::None => String::from("none"), + Self::Basic => String::from("basic"), + } + } } impl Default for CloudCdnAuthType { - fn default() -> CloudCdnAuthType { - Self::None - } + fn default() -> CloudCdnAuthType { + Self::None + } } + + + + diff --git a/sdks/rust/src/models/cloud_cdn_namespace_auth_user.rs b/sdks/rust/src/models/cloud_cdn_namespace_auth_user.rs index 7bae3642..8398ff2c 100644 --- a/sdks/rust/src/models/cloud_cdn_namespace_auth_user.rs +++ b/sdks/rust/src/models/cloud_cdn_namespace_auth_user.rs @@ -4,22 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudCdnNamespaceAuthUser : An authenticated CDN user for a given namespace. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudCdnNamespaceAuthUser { - /// A user name. - #[serde(rename = "user")] - pub user: String, + /// A user name. + #[serde(rename = "user")] + pub user: String, } impl CloudCdnNamespaceAuthUser { - /// An authenticated CDN user for a given namespace. - pub fn new(user: String) -> CloudCdnNamespaceAuthUser { - CloudCdnNamespaceAuthUser { user } - } + /// An authenticated CDN user for a given namespace. + pub fn new(user: String) -> CloudCdnNamespaceAuthUser { + CloudCdnNamespaceAuthUser { + user, + } + } } + + diff --git a/sdks/rust/src/models/cloud_cdn_namespace_config.rs b/sdks/rust/src/models/cloud_cdn_namespace_config.rs index 8a640b50..a0de3ad1 100644 --- a/sdks/rust/src/models/cloud_cdn_namespace_config.rs +++ b/sdks/rust/src/models/cloud_cdn_namespace_config.rs @@ -4,40 +4,39 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudCdnNamespaceConfig : CDN configuration for a given namespace. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudCdnNamespaceConfig { - #[serde(rename = "auth_type")] - pub auth_type: crate::models::CloudCdnAuthType, - /// A list of CDN authenticated users for a given namespace. - #[serde(rename = "auth_user_list")] - pub auth_user_list: Vec, - /// A list of CDN domains for a given namespace. - #[serde(rename = "domains")] - pub domains: Vec, - /// Whether or not to allow users to connect to the given namespace via domain name. - #[serde(rename = "enable_domain_public_auth")] - pub enable_domain_public_auth: bool, + #[serde(rename = "auth_type")] + pub auth_type: crate::models::CloudCdnAuthType, + /// A list of CDN authenticated users for a given namespace. + #[serde(rename = "auth_user_list")] + pub auth_user_list: Vec, + /// A list of CDN domains for a given namespace. + #[serde(rename = "domains")] + pub domains: Vec, + /// Whether or not to allow users to connect to the given namespace via domain name. + #[serde(rename = "enable_domain_public_auth")] + pub enable_domain_public_auth: bool, } impl CloudCdnNamespaceConfig { - /// CDN configuration for a given namespace. - pub fn new( - auth_type: crate::models::CloudCdnAuthType, - auth_user_list: Vec, - domains: Vec, - enable_domain_public_auth: bool, - ) -> CloudCdnNamespaceConfig { - CloudCdnNamespaceConfig { - auth_type, - auth_user_list, - domains, - enable_domain_public_auth, - } - } + /// CDN configuration for a given namespace. + pub fn new(auth_type: crate::models::CloudCdnAuthType, auth_user_list: Vec, domains: Vec, enable_domain_public_auth: bool) -> CloudCdnNamespaceConfig { + CloudCdnNamespaceConfig { + auth_type, + auth_user_list, + domains, + enable_domain_public_auth, + } + } } + + diff --git a/sdks/rust/src/models/cloud_cdn_namespace_domain.rs b/sdks/rust/src/models/cloud_cdn_namespace_domain.rs index 2b334cee..59b4c076 100644 --- a/sdks/rust/src/models/cloud_cdn_namespace_domain.rs +++ b/sdks/rust/src/models/cloud_cdn_namespace_domain.rs @@ -4,43 +4,41 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudCdnNamespaceDomain : A CDN domain for a given namespace. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudCdnNamespaceDomain { - /// RFC3339 timestamp - #[serde(rename = "create_ts")] - pub create_ts: String, - /// A valid domain name (no protocol). - #[serde(rename = "domain")] - pub domain: String, - #[serde(rename = "verification_errors")] - pub verification_errors: Vec, - #[serde(rename = "verification_method")] - pub verification_method: Box, - #[serde(rename = "verification_status")] - pub verification_status: crate::models::CloudCdnNamespaceDomainVerificationStatus, + /// RFC3339 timestamp + #[serde(rename = "create_ts")] + pub create_ts: String, + /// A valid domain name (no protocol). + #[serde(rename = "domain")] + pub domain: String, + #[serde(rename = "verification_errors")] + pub verification_errors: Vec, + #[serde(rename = "verification_method")] + pub verification_method: Box, + #[serde(rename = "verification_status")] + pub verification_status: crate::models::CloudCdnNamespaceDomainVerificationStatus, } impl CloudCdnNamespaceDomain { - /// A CDN domain for a given namespace. - pub fn new( - create_ts: String, - domain: String, - verification_errors: Vec, - verification_method: crate::models::CloudCdnNamespaceDomainVerificationMethod, - verification_status: crate::models::CloudCdnNamespaceDomainVerificationStatus, - ) -> CloudCdnNamespaceDomain { - CloudCdnNamespaceDomain { - create_ts, - domain, - verification_errors, - verification_method: Box::new(verification_method), - verification_status, - } - } + /// A CDN domain for a given namespace. + pub fn new(create_ts: String, domain: String, verification_errors: Vec, verification_method: crate::models::CloudCdnNamespaceDomainVerificationMethod, verification_status: crate::models::CloudCdnNamespaceDomainVerificationStatus) -> CloudCdnNamespaceDomain { + CloudCdnNamespaceDomain { + create_ts, + domain, + verification_errors, + verification_method: Box::new(verification_method), + verification_status, + } + } } + + diff --git a/sdks/rust/src/models/cloud_cdn_namespace_domain_verification_method.rs b/sdks/rust/src/models/cloud_cdn_namespace_domain_verification_method.rs index b2ec7278..3de8c0ca 100644 --- a/sdks/rust/src/models/cloud_cdn_namespace_domain_verification_method.rs +++ b/sdks/rust/src/models/cloud_cdn_namespace_domain_verification_method.rs @@ -4,26 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudCdnNamespaceDomainVerificationMethod : A union representing the verification method used for this CDN domain. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudCdnNamespaceDomainVerificationMethod { - #[serde(rename = "http", skip_serializing_if = "Option::is_none")] - pub http: Option>, - #[serde(rename = "invalid", skip_serializing_if = "Option::is_none")] - pub invalid: Option, + #[serde(rename = "http", skip_serializing_if = "Option::is_none")] + pub http: Option>, + #[serde(rename = "invalid", skip_serializing_if = "Option::is_none")] + pub invalid: Option, } impl CloudCdnNamespaceDomainVerificationMethod { - /// A union representing the verification method used for this CDN domain. - pub fn new() -> CloudCdnNamespaceDomainVerificationMethod { - CloudCdnNamespaceDomainVerificationMethod { - http: None, - invalid: None, - } - } + /// A union representing the verification method used for this CDN domain. + pub fn new() -> CloudCdnNamespaceDomainVerificationMethod { + CloudCdnNamespaceDomainVerificationMethod { + http: None, + invalid: None, + } + } } + + diff --git a/sdks/rust/src/models/cloud_cdn_namespace_domain_verification_method_http.rs b/sdks/rust/src/models/cloud_cdn_namespace_domain_verification_method_http.rs index 7834b33b..8617f123 100644 --- a/sdks/rust/src/models/cloud_cdn_namespace_domain_verification_method_http.rs +++ b/sdks/rust/src/models/cloud_cdn_namespace_domain_verification_method_http.rs @@ -4,18 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudCdnNamespaceDomainVerificationMethodHttp { - #[serde(rename = "cname_record")] - pub cname_record: String, + #[serde(rename = "cname_record")] + pub cname_record: String, } impl CloudCdnNamespaceDomainVerificationMethodHttp { - pub fn new(cname_record: String) -> CloudCdnNamespaceDomainVerificationMethodHttp { - CloudCdnNamespaceDomainVerificationMethodHttp { cname_record } - } + pub fn new(cname_record: String) -> CloudCdnNamespaceDomainVerificationMethodHttp { + CloudCdnNamespaceDomainVerificationMethodHttp { + cname_record, + } + } } + + diff --git a/sdks/rust/src/models/cloud_cdn_namespace_domain_verification_status.rs b/sdks/rust/src/models/cloud_cdn_namespace_domain_verification_status.rs index c5c0f732..81b51b3b 100644 --- a/sdks/rust/src/models/cloud_cdn_namespace_domain_verification_status.rs +++ b/sdks/rust/src/models/cloud_cdn_namespace_domain_verification_status.rs @@ -4,7 +4,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -13,26 +13,31 @@ /// A value denoting the status of a CDN domain's verification status. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum CloudCdnNamespaceDomainVerificationStatus { - #[serde(rename = "active")] - Active, - #[serde(rename = "pending")] - Pending, - #[serde(rename = "failed")] - Failed, + #[serde(rename = "active")] + Active, + #[serde(rename = "pending")] + Pending, + #[serde(rename = "failed")] + Failed, + } impl ToString for CloudCdnNamespaceDomainVerificationStatus { - fn to_string(&self) -> String { - match self { - Self::Active => String::from("active"), - Self::Pending => String::from("pending"), - Self::Failed => String::from("failed"), - } - } + fn to_string(&self) -> String { + match self { + Self::Active => String::from("active"), + Self::Pending => String::from("pending"), + Self::Failed => String::from("failed"), + } + } } impl Default for CloudCdnNamespaceDomainVerificationStatus { - fn default() -> CloudCdnNamespaceDomainVerificationStatus { - Self::Active - } + fn default() -> CloudCdnNamespaceDomainVerificationStatus { + Self::Active + } } + + + + diff --git a/sdks/rust/src/models/cloud_cdn_site_summary.rs b/sdks/rust/src/models/cloud_cdn_site_summary.rs index 4efad2cb..15461e61 100644 --- a/sdks/rust/src/models/cloud_cdn_site_summary.rs +++ b/sdks/rust/src/models/cloud_cdn_site_summary.rs @@ -4,49 +4,46 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudCdnSiteSummary : A CDN site summary. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudCdnSiteSummary { - /// Whether or not this site has completely been uploaded. - #[serde(rename = "complete")] - pub complete: bool, - /// Unsigned 64 bit integer. - #[serde(rename = "content_length")] - pub content_length: i64, - /// RFC3339 timestamp - #[serde(rename = "create_ts")] - pub create_ts: String, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "site_id")] - pub site_id: uuid::Uuid, - #[serde(rename = "upload_id")] - pub upload_id: uuid::Uuid, + /// Whether or not this site has completely been uploaded. + #[serde(rename = "complete")] + pub complete: bool, + /// Unsigned 64 bit integer. + #[serde(rename = "content_length")] + pub content_length: i64, + /// RFC3339 timestamp + #[serde(rename = "create_ts")] + pub create_ts: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "site_id")] + pub site_id: uuid::Uuid, + #[serde(rename = "upload_id")] + pub upload_id: uuid::Uuid, } impl CloudCdnSiteSummary { - /// A CDN site summary. - pub fn new( - complete: bool, - content_length: i64, - create_ts: String, - display_name: String, - site_id: uuid::Uuid, - upload_id: uuid::Uuid, - ) -> CloudCdnSiteSummary { - CloudCdnSiteSummary { - complete, - content_length, - create_ts, - display_name, - site_id, - upload_id, - } - } + /// A CDN site summary. + pub fn new(complete: bool, content_length: i64, create_ts: String, display_name: String, site_id: uuid::Uuid, upload_id: uuid::Uuid) -> CloudCdnSiteSummary { + CloudCdnSiteSummary { + complete, + content_length, + create_ts, + display_name, + site_id, + upload_id, + } + } } + + diff --git a/sdks/rust/src/models/cloud_custom_avatar_summary.rs b/sdks/rust/src/models/cloud_custom_avatar_summary.rs index 757853d7..baf4d2e7 100644 --- a/sdks/rust/src/models/cloud_custom_avatar_summary.rs +++ b/sdks/rust/src/models/cloud_custom_avatar_summary.rs @@ -4,49 +4,47 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudCustomAvatarSummary : A custom avatar summary. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudCustomAvatarSummary { - /// Whether or not this custom avatar has completely been uploaded. - #[serde(rename = "complete")] - pub complete: bool, - /// Unsigned 64 bit integer. - #[serde(rename = "content_length")] - pub content_length: i64, - /// RFC3339 timestamp - #[serde(rename = "create_ts")] - pub create_ts: String, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "upload_id")] - pub upload_id: uuid::Uuid, - /// The URL of this custom avatar image. Only present if upload is complete. - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, + /// Whether or not this custom avatar has completely been uploaded. + #[serde(rename = "complete")] + pub complete: bool, + /// Unsigned 64 bit integer. + #[serde(rename = "content_length")] + pub content_length: i64, + /// RFC3339 timestamp + #[serde(rename = "create_ts")] + pub create_ts: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "upload_id")] + pub upload_id: uuid::Uuid, + /// The URL of this custom avatar image. Only present if upload is complete. + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, } impl CloudCustomAvatarSummary { - /// A custom avatar summary. - pub fn new( - complete: bool, - content_length: i64, - create_ts: String, - display_name: String, - upload_id: uuid::Uuid, - ) -> CloudCustomAvatarSummary { - CloudCustomAvatarSummary { - complete, - content_length, - create_ts, - display_name, - upload_id, - url: None, - } - } + /// A custom avatar summary. + pub fn new(complete: bool, content_length: i64, create_ts: String, display_name: String, upload_id: uuid::Uuid) -> CloudCustomAvatarSummary { + CloudCustomAvatarSummary { + complete, + content_length, + create_ts, + display_name, + upload_id, + url: None, + } + } } + + diff --git a/sdks/rust/src/models/cloud_devices_complete_device_link_request.rs b/sdks/rust/src/models/cloud_devices_complete_device_link_request.rs index 2e3084b3..253bfd83 100644 --- a/sdks/rust/src/models/cloud_devices_complete_device_link_request.rs +++ b/sdks/rust/src/models/cloud_devices_complete_device_link_request.rs @@ -4,27 +4,29 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudDevicesCompleteDeviceLinkRequest { - /// Documentation at https://jwt.io/ - #[serde(rename = "device_link_token")] - pub device_link_token: String, - #[serde(rename = "game_id")] - pub game_id: uuid::Uuid, + /// Documentation at https://jwt.io/ + #[serde(rename = "device_link_token")] + pub device_link_token: String, + #[serde(rename = "game_id")] + pub game_id: uuid::Uuid, } impl CloudDevicesCompleteDeviceLinkRequest { - pub fn new( - device_link_token: String, - game_id: uuid::Uuid, - ) -> CloudDevicesCompleteDeviceLinkRequest { - CloudDevicesCompleteDeviceLinkRequest { - device_link_token, - game_id, - } - } + pub fn new(device_link_token: String, game_id: uuid::Uuid) -> CloudDevicesCompleteDeviceLinkRequest { + CloudDevicesCompleteDeviceLinkRequest { + device_link_token, + game_id, + } + } } + + diff --git a/sdks/rust/src/models/cloud_devices_get_device_link_response.rs b/sdks/rust/src/models/cloud_devices_get_device_link_response.rs index bb45221d..89483fcb 100644 --- a/sdks/rust/src/models/cloud_devices_get_device_link_response.rs +++ b/sdks/rust/src/models/cloud_devices_get_device_link_response.rs @@ -4,23 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudDevicesGetDeviceLinkResponse { - #[serde(rename = "cloud_token", skip_serializing_if = "Option::is_none")] - pub cloud_token: Option, - #[serde(rename = "watch")] - pub watch: Box, + #[serde(rename = "cloud_token", skip_serializing_if = "Option::is_none")] + pub cloud_token: Option, + #[serde(rename = "watch")] + pub watch: Box, } impl CloudDevicesGetDeviceLinkResponse { - pub fn new(watch: crate::models::WatchResponse) -> CloudDevicesGetDeviceLinkResponse { - CloudDevicesGetDeviceLinkResponse { - cloud_token: None, - watch: Box::new(watch), - } - } + pub fn new(watch: crate::models::WatchResponse) -> CloudDevicesGetDeviceLinkResponse { + CloudDevicesGetDeviceLinkResponse { + cloud_token: None, + watch: Box::new(watch), + } + } } + + diff --git a/sdks/rust/src/models/cloud_devices_prepare_device_link_response.rs b/sdks/rust/src/models/cloud_devices_prepare_device_link_response.rs index 493443fd..a63f8f15 100644 --- a/sdks/rust/src/models/cloud_devices_prepare_device_link_response.rs +++ b/sdks/rust/src/models/cloud_devices_prepare_device_link_response.rs @@ -4,30 +4,31 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudDevicesPrepareDeviceLinkResponse { - #[serde(rename = "device_link_id")] - pub device_link_id: uuid::Uuid, - #[serde(rename = "device_link_token")] - pub device_link_token: String, - #[serde(rename = "device_link_url")] - pub device_link_url: String, + #[serde(rename = "device_link_id")] + pub device_link_id: uuid::Uuid, + #[serde(rename = "device_link_token")] + pub device_link_token: String, + #[serde(rename = "device_link_url")] + pub device_link_url: String, } impl CloudDevicesPrepareDeviceLinkResponse { - pub fn new( - device_link_id: uuid::Uuid, - device_link_token: String, - device_link_url: String, - ) -> CloudDevicesPrepareDeviceLinkResponse { - CloudDevicesPrepareDeviceLinkResponse { - device_link_id, - device_link_token, - device_link_url, - } - } + pub fn new(device_link_id: uuid::Uuid, device_link_token: String, device_link_url: String) -> CloudDevicesPrepareDeviceLinkResponse { + CloudDevicesPrepareDeviceLinkResponse { + device_link_id, + device_link_token, + device_link_url, + } + } } + + diff --git a/sdks/rust/src/models/cloud_game_full.rs b/sdks/rust/src/models/cloud_game_full.rs index 769ccd1d..a97b5e71 100644 --- a/sdks/rust/src/models/cloud_game_full.rs +++ b/sdks/rust/src/models/cloud_game_full.rs @@ -4,72 +4,66 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudGameFull : A full game. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGameFull { - /// A list of region summaries. - #[serde(rename = "available_regions")] - pub available_regions: Vec, - /// The URL of this game's banner image. - #[serde(rename = "banner_url", skip_serializing_if = "Option::is_none")] - pub banner_url: Option, - /// RFC3339 timestamp - #[serde(rename = "create_ts")] - pub create_ts: String, - #[serde(rename = "developer_group_id")] - pub developer_group_id: uuid::Uuid, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "game_id")] - pub game_id: uuid::Uuid, - /// The URL of this game's logo image. - #[serde(rename = "logo_url", skip_serializing_if = "Option::is_none")] - pub logo_url: Option, - /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. - #[serde(rename = "name_id")] - pub name_id: String, - /// A list of namespace summaries. - #[serde(rename = "namespaces")] - pub namespaces: Vec, - /// Unsigned 32 bit integer. - #[serde(rename = "total_player_count")] - pub total_player_count: i32, - /// A list of version summaries. - #[serde(rename = "versions")] - pub versions: Vec, + /// A list of region summaries. + #[serde(rename = "available_regions")] + pub available_regions: Vec, + /// The URL of this game's banner image. + #[serde(rename = "banner_url", skip_serializing_if = "Option::is_none")] + pub banner_url: Option, + /// RFC3339 timestamp + #[serde(rename = "create_ts")] + pub create_ts: String, + #[serde(rename = "developer_group_id")] + pub developer_group_id: uuid::Uuid, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "game_id")] + pub game_id: uuid::Uuid, + /// The URL of this game's logo image. + #[serde(rename = "logo_url", skip_serializing_if = "Option::is_none")] + pub logo_url: Option, + /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. + #[serde(rename = "name_id")] + pub name_id: String, + /// A list of namespace summaries. + #[serde(rename = "namespaces")] + pub namespaces: Vec, + /// Unsigned 32 bit integer. + #[serde(rename = "total_player_count")] + pub total_player_count: i32, + /// A list of version summaries. + #[serde(rename = "versions")] + pub versions: Vec, } impl CloudGameFull { - /// A full game. - pub fn new( - available_regions: Vec, - create_ts: String, - developer_group_id: uuid::Uuid, - display_name: String, - game_id: uuid::Uuid, - name_id: String, - namespaces: Vec, - total_player_count: i32, - versions: Vec, - ) -> CloudGameFull { - CloudGameFull { - available_regions, - banner_url: None, - create_ts, - developer_group_id, - display_name, - game_id, - logo_url: None, - name_id, - namespaces, - total_player_count, - versions, - } - } + /// A full game. + pub fn new(available_regions: Vec, create_ts: String, developer_group_id: uuid::Uuid, display_name: String, game_id: uuid::Uuid, name_id: String, namespaces: Vec, total_player_count: i32, versions: Vec) -> CloudGameFull { + CloudGameFull { + available_regions, + banner_url: None, + create_ts, + developer_group_id, + display_name, + game_id, + logo_url: None, + name_id, + namespaces, + total_player_count, + versions, + } + } } + + diff --git a/sdks/rust/src/models/cloud_game_lobby_expenses.rs b/sdks/rust/src/models/cloud_game_lobby_expenses.rs index c4c3d944..fbdbb10d 100644 --- a/sdks/rust/src/models/cloud_game_lobby_expenses.rs +++ b/sdks/rust/src/models/cloud_game_lobby_expenses.rs @@ -4,35 +4,35 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudGameLobbyExpenses : Game lobby expenses. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGameLobbyExpenses { - /// A list of multiple region tier expenses. - #[serde(rename = "expenses")] - pub expenses: Vec, - #[serde(rename = "game")] - pub game: Box, - /// A list of namespace summaries. - #[serde(rename = "namespaces")] - pub namespaces: Vec, + /// A list of multiple region tier expenses. + #[serde(rename = "expenses")] + pub expenses: Vec, + #[serde(rename = "game")] + pub game: Box, + /// A list of namespace summaries. + #[serde(rename = "namespaces")] + pub namespaces: Vec, } impl CloudGameLobbyExpenses { - /// Game lobby expenses. - pub fn new( - expenses: Vec, - game: crate::models::GameHandle, - namespaces: Vec, - ) -> CloudGameLobbyExpenses { - CloudGameLobbyExpenses { - expenses, - game: Box::new(game), - namespaces, - } - } + /// Game lobby expenses. + pub fn new(expenses: Vec, game: crate::models::GameHandle, namespaces: Vec) -> CloudGameLobbyExpenses { + CloudGameLobbyExpenses { + expenses, + game: Box::new(game), + namespaces, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_build_compression.rs b/sdks/rust/src/models/cloud_games_build_compression.rs index 037978da..da9ddfd8 100644 --- a/sdks/rust/src/models/cloud_games_build_compression.rs +++ b/sdks/rust/src/models/cloud_games_build_compression.rs @@ -4,30 +4,36 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ -/// + +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum CloudGamesBuildCompression { - #[serde(rename = "none")] - None, - #[serde(rename = "lz4")] - Lz4, + #[serde(rename = "none")] + None, + #[serde(rename = "lz4")] + Lz4, + } impl ToString for CloudGamesBuildCompression { - fn to_string(&self) -> String { - match self { - Self::None => String::from("none"), - Self::Lz4 => String::from("lz4"), - } - } + fn to_string(&self) -> String { + match self { + Self::None => String::from("none"), + Self::Lz4 => String::from("lz4"), + } + } } impl Default for CloudGamesBuildCompression { - fn default() -> CloudGamesBuildCompression { - Self::None - } + fn default() -> CloudGamesBuildCompression { + Self::None + } } + + + + diff --git a/sdks/rust/src/models/cloud_games_build_kind.rs b/sdks/rust/src/models/cloud_games_build_kind.rs index 9d2a5f76..007d9b5a 100644 --- a/sdks/rust/src/models/cloud_games_build_kind.rs +++ b/sdks/rust/src/models/cloud_games_build_kind.rs @@ -4,30 +4,36 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ -/// + +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum CloudGamesBuildKind { - #[serde(rename = "docker_image")] - DockerImage, - #[serde(rename = "oci_bundle")] - OciBundle, + #[serde(rename = "docker_image")] + DockerImage, + #[serde(rename = "oci_bundle")] + OciBundle, + } impl ToString for CloudGamesBuildKind { - fn to_string(&self) -> String { - match self { - Self::DockerImage => String::from("docker_image"), - Self::OciBundle => String::from("oci_bundle"), - } - } + fn to_string(&self) -> String { + match self { + Self::DockerImage => String::from("docker_image"), + Self::OciBundle => String::from("oci_bundle"), + } + } } impl Default for CloudGamesBuildKind { - fn default() -> CloudGamesBuildKind { - Self::DockerImage - } + fn default() -> CloudGamesBuildKind { + Self::DockerImage + } } + + + + diff --git a/sdks/rust/src/models/cloud_games_create_cloud_token_response.rs b/sdks/rust/src/models/cloud_games_create_cloud_token_response.rs index d2e83bbc..700892b9 100644 --- a/sdks/rust/src/models/cloud_games_create_cloud_token_response.rs +++ b/sdks/rust/src/models/cloud_games_create_cloud_token_response.rs @@ -4,19 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesCreateCloudTokenResponse { - /// A JSON Web Token. Slightly modified to include a description prefix and use Protobufs of JSON. - #[serde(rename = "token")] - pub token: String, + /// A JSON Web Token. Slightly modified to include a description prefix and use Protobufs of JSON. + #[serde(rename = "token")] + pub token: String, } impl CloudGamesCreateCloudTokenResponse { - pub fn new(token: String) -> CloudGamesCreateCloudTokenResponse { - CloudGamesCreateCloudTokenResponse { token } - } + pub fn new(token: String) -> CloudGamesCreateCloudTokenResponse { + CloudGamesCreateCloudTokenResponse { + token, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_create_game_build_request.rs b/sdks/rust/src/models/cloud_games_create_game_build_request.rs index 4438f78b..13f4d4ff 100644 --- a/sdks/rust/src/models/cloud_games_create_game_build_request.rs +++ b/sdks/rust/src/models/cloud_games_create_game_build_request.rs @@ -4,41 +4,42 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesCreateGameBuildRequest { - #[serde(rename = "compression", skip_serializing_if = "Option::is_none")] - pub compression: Option, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "image_file")] - pub image_file: Box, - /// A tag given to the game build. - #[serde(rename = "image_tag")] - pub image_tag: String, - #[serde(rename = "kind", skip_serializing_if = "Option::is_none")] - pub kind: Option, - #[serde(rename = "multipart_upload", skip_serializing_if = "Option::is_none")] - pub multipart_upload: Option, + #[serde(rename = "compression", skip_serializing_if = "Option::is_none")] + pub compression: Option, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "image_file")] + pub image_file: Box, + /// A tag given to the game build. + #[serde(rename = "image_tag")] + pub image_tag: String, + #[serde(rename = "kind", skip_serializing_if = "Option::is_none")] + pub kind: Option, + #[serde(rename = "multipart_upload", skip_serializing_if = "Option::is_none")] + pub multipart_upload: Option, } impl CloudGamesCreateGameBuildRequest { - pub fn new( - display_name: String, - image_file: crate::models::UploadPrepareFile, - image_tag: String, - ) -> CloudGamesCreateGameBuildRequest { - CloudGamesCreateGameBuildRequest { - compression: None, - display_name, - image_file: Box::new(image_file), - image_tag, - kind: None, - multipart_upload: None, - } - } + pub fn new(display_name: String, image_file: crate::models::UploadPrepareFile, image_tag: String) -> CloudGamesCreateGameBuildRequest { + CloudGamesCreateGameBuildRequest { + compression: None, + display_name, + image_file: Box::new(image_file), + image_tag, + kind: None, + multipart_upload: None, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_create_game_build_response.rs b/sdks/rust/src/models/cloud_games_create_game_build_response.rs index e4bbf674..e58fd25d 100644 --- a/sdks/rust/src/models/cloud_games_create_game_build_response.rs +++ b/sdks/rust/src/models/cloud_games_create_game_build_response.rs @@ -4,35 +4,34 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesCreateGameBuildResponse { - #[serde(rename = "build_id")] - pub build_id: uuid::Uuid, - #[serde( - rename = "image_presigned_request", - skip_serializing_if = "Option::is_none" - )] - pub image_presigned_request: Option>, - #[serde( - rename = "image_presigned_requests", - skip_serializing_if = "Option::is_none" - )] - pub image_presigned_requests: Option>, - #[serde(rename = "upload_id")] - pub upload_id: uuid::Uuid, + #[serde(rename = "build_id")] + pub build_id: uuid::Uuid, + #[serde(rename = "image_presigned_request", skip_serializing_if = "Option::is_none")] + pub image_presigned_request: Option>, + #[serde(rename = "image_presigned_requests", skip_serializing_if = "Option::is_none")] + pub image_presigned_requests: Option>, + #[serde(rename = "upload_id")] + pub upload_id: uuid::Uuid, } impl CloudGamesCreateGameBuildResponse { - pub fn new(build_id: uuid::Uuid, upload_id: uuid::Uuid) -> CloudGamesCreateGameBuildResponse { - CloudGamesCreateGameBuildResponse { - build_id, - image_presigned_request: None, - image_presigned_requests: None, - upload_id, - } - } + pub fn new(build_id: uuid::Uuid, upload_id: uuid::Uuid) -> CloudGamesCreateGameBuildResponse { + CloudGamesCreateGameBuildResponse { + build_id, + image_presigned_request: None, + image_presigned_requests: None, + upload_id, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_create_game_cdn_site_request.rs b/sdks/rust/src/models/cloud_games_create_game_cdn_site_request.rs index 57f988a0..94f5c718 100644 --- a/sdks/rust/src/models/cloud_games_create_game_cdn_site_request.rs +++ b/sdks/rust/src/models/cloud_games_create_game_cdn_site_request.rs @@ -4,28 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesCreateGameCdnSiteRequest { - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - /// A list of files preparing to upload. - #[serde(rename = "files")] - pub files: Vec, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + /// A list of files preparing to upload. + #[serde(rename = "files")] + pub files: Vec, } impl CloudGamesCreateGameCdnSiteRequest { - pub fn new( - display_name: String, - files: Vec, - ) -> CloudGamesCreateGameCdnSiteRequest { - CloudGamesCreateGameCdnSiteRequest { - display_name, - files, - } - } + pub fn new(display_name: String, files: Vec) -> CloudGamesCreateGameCdnSiteRequest { + CloudGamesCreateGameCdnSiteRequest { + display_name, + files, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_create_game_cdn_site_response.rs b/sdks/rust/src/models/cloud_games_create_game_cdn_site_response.rs index 765c5093..002ac49e 100644 --- a/sdks/rust/src/models/cloud_games_create_game_cdn_site_response.rs +++ b/sdks/rust/src/models/cloud_games_create_game_cdn_site_response.rs @@ -4,30 +4,31 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesCreateGameCdnSiteResponse { - #[serde(rename = "presigned_requests")] - pub presigned_requests: Vec, - #[serde(rename = "site_id")] - pub site_id: uuid::Uuid, - #[serde(rename = "upload_id")] - pub upload_id: uuid::Uuid, + #[serde(rename = "presigned_requests")] + pub presigned_requests: Vec, + #[serde(rename = "site_id")] + pub site_id: uuid::Uuid, + #[serde(rename = "upload_id")] + pub upload_id: uuid::Uuid, } impl CloudGamesCreateGameCdnSiteResponse { - pub fn new( - presigned_requests: Vec, - site_id: uuid::Uuid, - upload_id: uuid::Uuid, - ) -> CloudGamesCreateGameCdnSiteResponse { - CloudGamesCreateGameCdnSiteResponse { - presigned_requests, - site_id, - upload_id, - } - } + pub fn new(presigned_requests: Vec, site_id: uuid::Uuid, upload_id: uuid::Uuid) -> CloudGamesCreateGameCdnSiteResponse { + CloudGamesCreateGameCdnSiteResponse { + presigned_requests, + site_id, + upload_id, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_create_game_request.rs b/sdks/rust/src/models/cloud_games_create_game_request.rs index 1342b3e5..ad6c20cf 100644 --- a/sdks/rust/src/models/cloud_games_create_game_request.rs +++ b/sdks/rust/src/models/cloud_games_create_game_request.rs @@ -4,31 +4,33 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesCreateGameRequest { - #[serde(rename = "developer_group_id")] - pub developer_group_id: uuid::Uuid, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - /// A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short. - #[serde(rename = "name_id", skip_serializing_if = "Option::is_none")] - pub name_id: Option, + #[serde(rename = "developer_group_id")] + pub developer_group_id: uuid::Uuid, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + /// A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short. + #[serde(rename = "name_id", skip_serializing_if = "Option::is_none")] + pub name_id: Option, } impl CloudGamesCreateGameRequest { - pub fn new( - developer_group_id: uuid::Uuid, - display_name: String, - ) -> CloudGamesCreateGameRequest { - CloudGamesCreateGameRequest { - developer_group_id, - display_name, - name_id: None, - } - } + pub fn new(developer_group_id: uuid::Uuid, display_name: String) -> CloudGamesCreateGameRequest { + CloudGamesCreateGameRequest { + developer_group_id, + display_name, + name_id: None, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_create_game_response.rs b/sdks/rust/src/models/cloud_games_create_game_response.rs index 59f78354..9f243418 100644 --- a/sdks/rust/src/models/cloud_games_create_game_response.rs +++ b/sdks/rust/src/models/cloud_games_create_game_response.rs @@ -4,18 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesCreateGameResponse { - #[serde(rename = "game_id")] - pub game_id: uuid::Uuid, + #[serde(rename = "game_id")] + pub game_id: uuid::Uuid, } impl CloudGamesCreateGameResponse { - pub fn new(game_id: uuid::Uuid) -> CloudGamesCreateGameResponse { - CloudGamesCreateGameResponse { game_id } - } + pub fn new(game_id: uuid::Uuid) -> CloudGamesCreateGameResponse { + CloudGamesCreateGameResponse { + game_id, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_create_game_version_request.rs b/sdks/rust/src/models/cloud_games_create_game_version_request.rs index 49b3aa07..639e0051 100644 --- a/sdks/rust/src/models/cloud_games_create_game_version_request.rs +++ b/sdks/rust/src/models/cloud_games_create_game_version_request.rs @@ -4,27 +4,29 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesCreateGameVersionRequest { - #[serde(rename = "config")] - pub config: Box, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, + #[serde(rename = "config")] + pub config: Box, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, } impl CloudGamesCreateGameVersionRequest { - pub fn new( - config: crate::models::CloudVersionConfig, - display_name: String, - ) -> CloudGamesCreateGameVersionRequest { - CloudGamesCreateGameVersionRequest { - config: Box::new(config), - display_name, - } - } + pub fn new(config: crate::models::CloudVersionConfig, display_name: String) -> CloudGamesCreateGameVersionRequest { + CloudGamesCreateGameVersionRequest { + config: Box::new(config), + display_name, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_create_game_version_response.rs b/sdks/rust/src/models/cloud_games_create_game_version_response.rs index d7f8ef77..e6d36a61 100644 --- a/sdks/rust/src/models/cloud_games_create_game_version_response.rs +++ b/sdks/rust/src/models/cloud_games_create_game_version_response.rs @@ -4,18 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesCreateGameVersionResponse { - #[serde(rename = "version_id")] - pub version_id: uuid::Uuid, + #[serde(rename = "version_id")] + pub version_id: uuid::Uuid, } impl CloudGamesCreateGameVersionResponse { - pub fn new(version_id: uuid::Uuid) -> CloudGamesCreateGameVersionResponse { - CloudGamesCreateGameVersionResponse { version_id } - } + pub fn new(version_id: uuid::Uuid) -> CloudGamesCreateGameVersionResponse { + CloudGamesCreateGameVersionResponse { + version_id, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_create_service_token_response.rs b/sdks/rust/src/models/cloud_games_create_service_token_response.rs new file mode 100644 index 00000000..b2367dab --- /dev/null +++ b/sdks/rust/src/models/cloud_games_create_service_token_response.rs @@ -0,0 +1,29 @@ +/* + * Rivet API EE + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct CloudGamesCreateServiceTokenResponse { + /// A JSON Web Token. + #[serde(rename = "token")] + pub token: String, +} + +impl CloudGamesCreateServiceTokenResponse { + pub fn new(token: String) -> CloudGamesCreateServiceTokenResponse { + CloudGamesCreateServiceTokenResponse { + token, + } + } +} + + diff --git a/sdks/rust/src/models/cloud_games_delete_matchmaker_lobby_response.rs b/sdks/rust/src/models/cloud_games_delete_matchmaker_lobby_response.rs index 18afd70b..cc99c6f9 100644 --- a/sdks/rust/src/models/cloud_games_delete_matchmaker_lobby_response.rs +++ b/sdks/rust/src/models/cloud_games_delete_matchmaker_lobby_response.rs @@ -4,19 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesDeleteMatchmakerLobbyResponse { - /// Whether or not the lobby was successfully stopped. - #[serde(rename = "did_remove")] - pub did_remove: bool, + /// Whether or not the lobby was successfully stopped. + #[serde(rename = "did_remove")] + pub did_remove: bool, } impl CloudGamesDeleteMatchmakerLobbyResponse { - pub fn new(did_remove: bool) -> CloudGamesDeleteMatchmakerLobbyResponse { - CloudGamesDeleteMatchmakerLobbyResponse { did_remove } - } + pub fn new(did_remove: bool) -> CloudGamesDeleteMatchmakerLobbyResponse { + CloudGamesDeleteMatchmakerLobbyResponse { + did_remove, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_export_lobby_logs_request.rs b/sdks/rust/src/models/cloud_games_export_lobby_logs_request.rs index f4ac91a9..1edc601e 100644 --- a/sdks/rust/src/models/cloud_games_export_lobby_logs_request.rs +++ b/sdks/rust/src/models/cloud_games_export_lobby_logs_request.rs @@ -4,18 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesExportLobbyLogsRequest { - #[serde(rename = "stream")] - pub stream: crate::models::CloudGamesLogStream, + #[serde(rename = "stream")] + pub stream: crate::models::CloudGamesLogStream, } impl CloudGamesExportLobbyLogsRequest { - pub fn new(stream: crate::models::CloudGamesLogStream) -> CloudGamesExportLobbyLogsRequest { - CloudGamesExportLobbyLogsRequest { stream } - } + pub fn new(stream: crate::models::CloudGamesLogStream) -> CloudGamesExportLobbyLogsRequest { + CloudGamesExportLobbyLogsRequest { + stream, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_export_lobby_logs_response.rs b/sdks/rust/src/models/cloud_games_export_lobby_logs_response.rs index c3162906..2909aebb 100644 --- a/sdks/rust/src/models/cloud_games_export_lobby_logs_response.rs +++ b/sdks/rust/src/models/cloud_games_export_lobby_logs_response.rs @@ -4,19 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesExportLobbyLogsResponse { - /// The URL to a CSV file for the given lobby history. - #[serde(rename = "url")] - pub url: String, + /// The URL to a CSV file for the given lobby history. + #[serde(rename = "url")] + pub url: String, } impl CloudGamesExportLobbyLogsResponse { - pub fn new(url: String) -> CloudGamesExportLobbyLogsResponse { - CloudGamesExportLobbyLogsResponse { url } - } + pub fn new(url: String) -> CloudGamesExportLobbyLogsResponse { + CloudGamesExportLobbyLogsResponse { + url, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_export_matchmaker_lobby_history_request.rs b/sdks/rust/src/models/cloud_games_export_matchmaker_lobby_history_request.rs index be16bd14..a0ea0714 100644 --- a/sdks/rust/src/models/cloud_games_export_matchmaker_lobby_history_request.rs +++ b/sdks/rust/src/models/cloud_games_export_matchmaker_lobby_history_request.rs @@ -4,25 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesExportMatchmakerLobbyHistoryRequest { - /// Unsigned 64 bit integer. - #[serde(rename = "query_end")] - pub query_end: i64, - /// Unsigned 64 bit integer. - #[serde(rename = "query_start")] - pub query_start: i64, + /// Unsigned 64 bit integer. + #[serde(rename = "query_end")] + pub query_end: i64, + /// Unsigned 64 bit integer. + #[serde(rename = "query_start")] + pub query_start: i64, } impl CloudGamesExportMatchmakerLobbyHistoryRequest { - pub fn new(query_end: i64, query_start: i64) -> CloudGamesExportMatchmakerLobbyHistoryRequest { - CloudGamesExportMatchmakerLobbyHistoryRequest { - query_end, - query_start, - } - } + pub fn new(query_end: i64, query_start: i64) -> CloudGamesExportMatchmakerLobbyHistoryRequest { + CloudGamesExportMatchmakerLobbyHistoryRequest { + query_end, + query_start, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_export_matchmaker_lobby_history_response.rs b/sdks/rust/src/models/cloud_games_export_matchmaker_lobby_history_response.rs index f81e4b47..624c45f7 100644 --- a/sdks/rust/src/models/cloud_games_export_matchmaker_lobby_history_response.rs +++ b/sdks/rust/src/models/cloud_games_export_matchmaker_lobby_history_response.rs @@ -4,19 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesExportMatchmakerLobbyHistoryResponse { - /// The URL to a CSV file for the given lobby history. - #[serde(rename = "url")] - pub url: String, + /// The URL to a CSV file for the given lobby history. + #[serde(rename = "url")] + pub url: String, } impl CloudGamesExportMatchmakerLobbyHistoryResponse { - pub fn new(url: String) -> CloudGamesExportMatchmakerLobbyHistoryResponse { - CloudGamesExportMatchmakerLobbyHistoryResponse { url } - } + pub fn new(url: String) -> CloudGamesExportMatchmakerLobbyHistoryResponse { + CloudGamesExportMatchmakerLobbyHistoryResponse { + url, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_game_banner_upload_prepare_request.rs b/sdks/rust/src/models/cloud_games_game_banner_upload_prepare_request.rs index 82932ca5..12934f1f 100644 --- a/sdks/rust/src/models/cloud_games_game_banner_upload_prepare_request.rs +++ b/sdks/rust/src/models/cloud_games_game_banner_upload_prepare_request.rs @@ -4,29 +4,34 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesGameBannerUploadPrepareRequest { - /// Unsigned 64 bit integer. - #[serde(rename = "content_length")] - pub content_length: i64, - /// The MIME type of the game banner. - #[serde(rename = "mime", skip_serializing_if = "Option::is_none")] - pub mime: Option, - /// The path/filename of the game banner. - #[serde(rename = "path")] - pub path: String, + /// Unsigned 64 bit integer. + #[serde(rename = "content_length")] + pub content_length: i64, + /// The MIME type of the game banner. + #[serde(rename = "mime", skip_serializing_if = "Option::is_none")] + pub mime: Option, + /// The path/filename of the game banner. + #[serde(rename = "path")] + pub path: String, } impl CloudGamesGameBannerUploadPrepareRequest { - pub fn new(content_length: i64, path: String) -> CloudGamesGameBannerUploadPrepareRequest { - CloudGamesGameBannerUploadPrepareRequest { - content_length, - mime: None, - path, - } - } + pub fn new(content_length: i64, path: String) -> CloudGamesGameBannerUploadPrepareRequest { + CloudGamesGameBannerUploadPrepareRequest { + content_length, + mime: None, + path, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_game_banner_upload_prepare_response.rs b/sdks/rust/src/models/cloud_games_game_banner_upload_prepare_response.rs index c4520426..d5d93fa7 100644 --- a/sdks/rust/src/models/cloud_games_game_banner_upload_prepare_response.rs +++ b/sdks/rust/src/models/cloud_games_game_banner_upload_prepare_response.rs @@ -4,26 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesGameBannerUploadPrepareResponse { - #[serde(rename = "presigned_request")] - pub presigned_request: Box, - #[serde(rename = "upload_id")] - pub upload_id: uuid::Uuid, + #[serde(rename = "presigned_request")] + pub presigned_request: Box, + #[serde(rename = "upload_id")] + pub upload_id: uuid::Uuid, } impl CloudGamesGameBannerUploadPrepareResponse { - pub fn new( - presigned_request: crate::models::UploadPresignedRequest, - upload_id: uuid::Uuid, - ) -> CloudGamesGameBannerUploadPrepareResponse { - CloudGamesGameBannerUploadPrepareResponse { - presigned_request: Box::new(presigned_request), - upload_id, - } - } + pub fn new(presigned_request: crate::models::UploadPresignedRequest, upload_id: uuid::Uuid) -> CloudGamesGameBannerUploadPrepareResponse { + CloudGamesGameBannerUploadPrepareResponse { + presigned_request: Box::new(presigned_request), + upload_id, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_game_logo_upload_prepare_request.rs b/sdks/rust/src/models/cloud_games_game_logo_upload_prepare_request.rs index 42376bd4..4c449db9 100644 --- a/sdks/rust/src/models/cloud_games_game_logo_upload_prepare_request.rs +++ b/sdks/rust/src/models/cloud_games_game_logo_upload_prepare_request.rs @@ -4,29 +4,34 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesGameLogoUploadPrepareRequest { - /// Unsigned 64 bit integer. - #[serde(rename = "content_length")] - pub content_length: i64, - /// The MIME type of the game logo. - #[serde(rename = "mime", skip_serializing_if = "Option::is_none")] - pub mime: Option, - /// The path/filename of the game logo. - #[serde(rename = "path")] - pub path: String, + /// Unsigned 64 bit integer. + #[serde(rename = "content_length")] + pub content_length: i64, + /// The MIME type of the game logo. + #[serde(rename = "mime", skip_serializing_if = "Option::is_none")] + pub mime: Option, + /// The path/filename of the game logo. + #[serde(rename = "path")] + pub path: String, } impl CloudGamesGameLogoUploadPrepareRequest { - pub fn new(content_length: i64, path: String) -> CloudGamesGameLogoUploadPrepareRequest { - CloudGamesGameLogoUploadPrepareRequest { - content_length, - mime: None, - path, - } - } + pub fn new(content_length: i64, path: String) -> CloudGamesGameLogoUploadPrepareRequest { + CloudGamesGameLogoUploadPrepareRequest { + content_length, + mime: None, + path, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_game_logo_upload_prepare_response.rs b/sdks/rust/src/models/cloud_games_game_logo_upload_prepare_response.rs index 9b25d613..b454b477 100644 --- a/sdks/rust/src/models/cloud_games_game_logo_upload_prepare_response.rs +++ b/sdks/rust/src/models/cloud_games_game_logo_upload_prepare_response.rs @@ -4,26 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesGameLogoUploadPrepareResponse { - #[serde(rename = "presigned_request")] - pub presigned_request: Box, - #[serde(rename = "upload_id")] - pub upload_id: uuid::Uuid, + #[serde(rename = "presigned_request")] + pub presigned_request: Box, + #[serde(rename = "upload_id")] + pub upload_id: uuid::Uuid, } impl CloudGamesGameLogoUploadPrepareResponse { - pub fn new( - presigned_request: crate::models::UploadPresignedRequest, - upload_id: uuid::Uuid, - ) -> CloudGamesGameLogoUploadPrepareResponse { - CloudGamesGameLogoUploadPrepareResponse { - presigned_request: Box::new(presigned_request), - upload_id, - } - } + pub fn new(presigned_request: crate::models::UploadPresignedRequest, upload_id: uuid::Uuid) -> CloudGamesGameLogoUploadPrepareResponse { + CloudGamesGameLogoUploadPrepareResponse { + presigned_request: Box::new(presigned_request), + upload_id, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_get_game_by_id_response.rs b/sdks/rust/src/models/cloud_games_get_game_by_id_response.rs index 0badd3a0..f859338a 100644 --- a/sdks/rust/src/models/cloud_games_get_game_by_id_response.rs +++ b/sdks/rust/src/models/cloud_games_get_game_by_id_response.rs @@ -4,26 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesGetGameByIdResponse { - #[serde(rename = "game")] - pub game: Box, - #[serde(rename = "watch")] - pub watch: Box, + #[serde(rename = "game")] + pub game: Box, + #[serde(rename = "watch")] + pub watch: Box, } impl CloudGamesGetGameByIdResponse { - pub fn new( - game: crate::models::CloudGameFull, - watch: crate::models::WatchResponse, - ) -> CloudGamesGetGameByIdResponse { - CloudGamesGetGameByIdResponse { - game: Box::new(game), - watch: Box::new(watch), - } - } + pub fn new(game: crate::models::CloudGameFull, watch: crate::models::WatchResponse) -> CloudGamesGetGameByIdResponse { + CloudGamesGetGameByIdResponse { + game: Box::new(game), + watch: Box::new(watch), + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_get_game_version_by_id_response.rs b/sdks/rust/src/models/cloud_games_get_game_version_by_id_response.rs index 9e7de7ed..7d59c430 100644 --- a/sdks/rust/src/models/cloud_games_get_game_version_by_id_response.rs +++ b/sdks/rust/src/models/cloud_games_get_game_version_by_id_response.rs @@ -4,20 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesGetGameVersionByIdResponse { - #[serde(rename = "version")] - pub version: Box, + #[serde(rename = "version")] + pub version: Box, } impl CloudGamesGetGameVersionByIdResponse { - pub fn new(version: crate::models::CloudVersionFull) -> CloudGamesGetGameVersionByIdResponse { - CloudGamesGetGameVersionByIdResponse { - version: Box::new(version), - } - } + pub fn new(version: crate::models::CloudVersionFull) -> CloudGamesGetGameVersionByIdResponse { + CloudGamesGetGameVersionByIdResponse { + version: Box::new(version), + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_get_games_response.rs b/sdks/rust/src/models/cloud_games_get_games_response.rs index 1365d505..f8d1061b 100644 --- a/sdks/rust/src/models/cloud_games_get_games_response.rs +++ b/sdks/rust/src/models/cloud_games_get_games_response.rs @@ -4,32 +4,33 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesGetGamesResponse { - /// A list of game summaries. - #[serde(rename = "games")] - pub games: Vec, - /// A list of group summaries. - #[serde(rename = "groups")] - pub groups: Vec, - #[serde(rename = "watch")] - pub watch: Box, + /// A list of game summaries. + #[serde(rename = "games")] + pub games: Vec, + /// A list of group summaries. + #[serde(rename = "groups")] + pub groups: Vec, + #[serde(rename = "watch")] + pub watch: Box, } impl CloudGamesGetGamesResponse { - pub fn new( - games: Vec, - groups: Vec, - watch: crate::models::WatchResponse, - ) -> CloudGamesGetGamesResponse { - CloudGamesGetGamesResponse { - games, - groups, - watch: Box::new(watch), - } - } + pub fn new(games: Vec, groups: Vec, watch: crate::models::WatchResponse) -> CloudGamesGetGamesResponse { + CloudGamesGetGamesResponse { + games, + groups, + watch: Box::new(watch), + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_get_lobby_logs_response.rs b/sdks/rust/src/models/cloud_games_get_lobby_logs_response.rs index 43b9c2e5..9df50d17 100644 --- a/sdks/rust/src/models/cloud_games_get_lobby_logs_response.rs +++ b/sdks/rust/src/models/cloud_games_get_lobby_logs_response.rs @@ -4,32 +4,33 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesGetLobbyLogsResponse { - /// Sorted old to new. - #[serde(rename = "lines")] - pub lines: Vec, - /// Sorted old to new. - #[serde(rename = "timestamps")] - pub timestamps: Vec, - #[serde(rename = "watch")] - pub watch: Box, + /// Sorted old to new. + #[serde(rename = "lines")] + pub lines: Vec, + /// Sorted old to new. + #[serde(rename = "timestamps")] + pub timestamps: Vec, + #[serde(rename = "watch")] + pub watch: Box, } impl CloudGamesGetLobbyLogsResponse { - pub fn new( - lines: Vec, - timestamps: Vec, - watch: crate::models::WatchResponse, - ) -> CloudGamesGetLobbyLogsResponse { - CloudGamesGetLobbyLogsResponse { - lines, - timestamps, - watch: Box::new(watch), - } - } + pub fn new(lines: Vec, timestamps: Vec, watch: crate::models::WatchResponse) -> CloudGamesGetLobbyLogsResponse { + CloudGamesGetLobbyLogsResponse { + lines, + timestamps, + watch: Box::new(watch), + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_list_game_builds_response.rs b/sdks/rust/src/models/cloud_games_list_game_builds_response.rs index bc460475..3661f6ec 100644 --- a/sdks/rust/src/models/cloud_games_list_game_builds_response.rs +++ b/sdks/rust/src/models/cloud_games_list_game_builds_response.rs @@ -4,19 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesListGameBuildsResponse { - /// A list of build summaries. - #[serde(rename = "builds")] - pub builds: Vec, + /// A list of build summaries. + #[serde(rename = "builds")] + pub builds: Vec, } impl CloudGamesListGameBuildsResponse { - pub fn new(builds: Vec) -> CloudGamesListGameBuildsResponse { - CloudGamesListGameBuildsResponse { builds } - } + pub fn new(builds: Vec) -> CloudGamesListGameBuildsResponse { + CloudGamesListGameBuildsResponse { + builds, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_list_game_cdn_sites_response.rs b/sdks/rust/src/models/cloud_games_list_game_cdn_sites_response.rs index 989f169e..2393192b 100644 --- a/sdks/rust/src/models/cloud_games_list_game_cdn_sites_response.rs +++ b/sdks/rust/src/models/cloud_games_list_game_cdn_sites_response.rs @@ -4,21 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesListGameCdnSitesResponse { - /// A list of CDN site summaries. - #[serde(rename = "sites")] - pub sites: Vec, + /// A list of CDN site summaries. + #[serde(rename = "sites")] + pub sites: Vec, } impl CloudGamesListGameCdnSitesResponse { - pub fn new( - sites: Vec, - ) -> CloudGamesListGameCdnSitesResponse { - CloudGamesListGameCdnSitesResponse { sites } - } + pub fn new(sites: Vec) -> CloudGamesListGameCdnSitesResponse { + CloudGamesListGameCdnSitesResponse { + sites, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_list_game_custom_avatars_response.rs b/sdks/rust/src/models/cloud_games_list_game_custom_avatars_response.rs index 64268955..dc90b149 100644 --- a/sdks/rust/src/models/cloud_games_list_game_custom_avatars_response.rs +++ b/sdks/rust/src/models/cloud_games_list_game_custom_avatars_response.rs @@ -4,21 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesListGameCustomAvatarsResponse { - /// A list of custom avatar summaries. - #[serde(rename = "custom_avatars")] - pub custom_avatars: Vec, + /// A list of custom avatar summaries. + #[serde(rename = "custom_avatars")] + pub custom_avatars: Vec, } impl CloudGamesListGameCustomAvatarsResponse { - pub fn new( - custom_avatars: Vec, - ) -> CloudGamesListGameCustomAvatarsResponse { - CloudGamesListGameCustomAvatarsResponse { custom_avatars } - } + pub fn new(custom_avatars: Vec) -> CloudGamesListGameCustomAvatarsResponse { + CloudGamesListGameCustomAvatarsResponse { + custom_avatars, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_log_stream.rs b/sdks/rust/src/models/cloud_games_log_stream.rs index 14fd2710..c686f576 100644 --- a/sdks/rust/src/models/cloud_games_log_stream.rs +++ b/sdks/rust/src/models/cloud_games_log_stream.rs @@ -4,30 +4,36 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ -/// + +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum CloudGamesLogStream { - #[serde(rename = "std_out")] - StdOut, - #[serde(rename = "std_err")] - StdErr, + #[serde(rename = "std_out")] + StdOut, + #[serde(rename = "std_err")] + StdErr, + } impl ToString for CloudGamesLogStream { - fn to_string(&self) -> String { - match self { - Self::StdOut => String::from("std_out"), - Self::StdErr => String::from("std_err"), - } - } + fn to_string(&self) -> String { + match self { + Self::StdOut => String::from("std_out"), + Self::StdErr => String::from("std_err"), + } + } } impl Default for CloudGamesLogStream { - fn default() -> CloudGamesLogStream { - Self::StdOut - } + fn default() -> CloudGamesLogStream { + Self::StdOut + } } + + + + diff --git a/sdks/rust/src/models/cloud_games_namespaces_add_namespace_domain_request.rs b/sdks/rust/src/models/cloud_games_namespaces_add_namespace_domain_request.rs index 5d48e126..3428b541 100644 --- a/sdks/rust/src/models/cloud_games_namespaces_add_namespace_domain_request.rs +++ b/sdks/rust/src/models/cloud_games_namespaces_add_namespace_domain_request.rs @@ -4,19 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesAddNamespaceDomainRequest { - /// A valid domain name (no protocol). - #[serde(rename = "domain")] - pub domain: String, + /// A valid domain name (no protocol). + #[serde(rename = "domain")] + pub domain: String, } impl CloudGamesNamespacesAddNamespaceDomainRequest { - pub fn new(domain: String) -> CloudGamesNamespacesAddNamespaceDomainRequest { - CloudGamesNamespacesAddNamespaceDomainRequest { domain } - } + pub fn new(domain: String) -> CloudGamesNamespacesAddNamespaceDomainRequest { + CloudGamesNamespacesAddNamespaceDomainRequest { + domain, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_namespaces_create_game_namespace_request.rs b/sdks/rust/src/models/cloud_games_namespaces_create_game_namespace_request.rs index 30054a48..546ab15f 100644 --- a/sdks/rust/src/models/cloud_games_namespaces_create_game_namespace_request.rs +++ b/sdks/rust/src/models/cloud_games_namespaces_create_game_namespace_request.rs @@ -4,32 +4,33 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesCreateGameNamespaceRequest { - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. - #[serde(rename = "name_id")] - pub name_id: String, - #[serde(rename = "version_id")] - pub version_id: uuid::Uuid, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. + #[serde(rename = "name_id")] + pub name_id: String, + #[serde(rename = "version_id")] + pub version_id: uuid::Uuid, } impl CloudGamesNamespacesCreateGameNamespaceRequest { - pub fn new( - display_name: String, - name_id: String, - version_id: uuid::Uuid, - ) -> CloudGamesNamespacesCreateGameNamespaceRequest { - CloudGamesNamespacesCreateGameNamespaceRequest { - display_name, - name_id, - version_id, - } - } + pub fn new(display_name: String, name_id: String, version_id: uuid::Uuid) -> CloudGamesNamespacesCreateGameNamespaceRequest { + CloudGamesNamespacesCreateGameNamespaceRequest { + display_name, + name_id, + version_id, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_namespaces_create_game_namespace_response.rs b/sdks/rust/src/models/cloud_games_namespaces_create_game_namespace_response.rs index 2f541a31..363c0f86 100644 --- a/sdks/rust/src/models/cloud_games_namespaces_create_game_namespace_response.rs +++ b/sdks/rust/src/models/cloud_games_namespaces_create_game_namespace_response.rs @@ -4,18 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesCreateGameNamespaceResponse { - #[serde(rename = "namespace_id")] - pub namespace_id: uuid::Uuid, + #[serde(rename = "namespace_id")] + pub namespace_id: uuid::Uuid, } impl CloudGamesNamespacesCreateGameNamespaceResponse { - pub fn new(namespace_id: uuid::Uuid) -> CloudGamesNamespacesCreateGameNamespaceResponse { - CloudGamesNamespacesCreateGameNamespaceResponse { namespace_id } - } + pub fn new(namespace_id: uuid::Uuid) -> CloudGamesNamespacesCreateGameNamespaceResponse { + CloudGamesNamespacesCreateGameNamespaceResponse { + namespace_id, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_namespaces_create_game_namespace_token_development_request.rs b/sdks/rust/src/models/cloud_games_namespaces_create_game_namespace_token_development_request.rs index 4414acf0..5fb0ef92 100644 --- a/sdks/rust/src/models/cloud_games_namespaces_create_game_namespace_token_development_request.rs +++ b/sdks/rust/src/models/cloud_games_namespaces_create_game_namespace_token_development_request.rs @@ -4,29 +4,33 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentRequest { - /// The hostname used for the token. - #[serde(rename = "hostname")] - pub hostname: String, - /// **Deprecated** A list of docker ports. - #[serde(rename = "lobby_ports", skip_serializing_if = "Option::is_none")] - pub lobby_ports: Option>, - #[serde(rename = "ports", skip_serializing_if = "Option::is_none")] - pub ports: - Option<::std::collections::HashMap>, + /// The hostname used for the token. + #[serde(rename = "hostname")] + pub hostname: String, + /// **Deprecated** A list of docker ports. + #[serde(rename = "lobby_ports", skip_serializing_if = "Option::is_none")] + pub lobby_ports: Option>, + #[serde(rename = "ports", skip_serializing_if = "Option::is_none")] + pub ports: Option<::std::collections::HashMap>, } impl CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentRequest { - pub fn new(hostname: String) -> CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentRequest { - CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentRequest { - hostname, - lobby_ports: None, - ports: None, - } - } + pub fn new(hostname: String) -> CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentRequest { + CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentRequest { + hostname, + lobby_ports: None, + ports: None, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_namespaces_create_game_namespace_token_development_response.rs b/sdks/rust/src/models/cloud_games_namespaces_create_game_namespace_token_development_response.rs index ae9eaf67..9756fed1 100644 --- a/sdks/rust/src/models/cloud_games_namespaces_create_game_namespace_token_development_response.rs +++ b/sdks/rust/src/models/cloud_games_namespaces_create_game_namespace_token_development_response.rs @@ -4,19 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentResponse { - /// A JSON Web Token. Slightly modified to include a description prefix and use Protobufs of JSON. - #[serde(rename = "token")] - pub token: String, + /// A JSON Web Token. Slightly modified to include a description prefix and use Protobufs of JSON. + #[serde(rename = "token")] + pub token: String, } impl CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentResponse { - pub fn new(token: String) -> CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentResponse { - CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentResponse { token } - } + pub fn new(token: String) -> CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentResponse { + CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentResponse { + token, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_namespaces_create_game_namespace_token_public_response.rs b/sdks/rust/src/models/cloud_games_namespaces_create_game_namespace_token_public_response.rs index 8c191bf7..2d0f4633 100644 --- a/sdks/rust/src/models/cloud_games_namespaces_create_game_namespace_token_public_response.rs +++ b/sdks/rust/src/models/cloud_games_namespaces_create_game_namespace_token_public_response.rs @@ -4,19 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesCreateGameNamespaceTokenPublicResponse { - /// A JSON Web Token. Slightly modified to include a description prefix and use Protobufs of JSON. - #[serde(rename = "token")] - pub token: String, + /// A JSON Web Token. Slightly modified to include a description prefix and use Protobufs of JSON. + #[serde(rename = "token")] + pub token: String, } impl CloudGamesNamespacesCreateGameNamespaceTokenPublicResponse { - pub fn new(token: String) -> CloudGamesNamespacesCreateGameNamespaceTokenPublicResponse { - CloudGamesNamespacesCreateGameNamespaceTokenPublicResponse { token } - } + pub fn new(token: String) -> CloudGamesNamespacesCreateGameNamespaceTokenPublicResponse { + CloudGamesNamespacesCreateGameNamespaceTokenPublicResponse { + token, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_namespaces_get_analytics_matchmaker_live_response.rs b/sdks/rust/src/models/cloud_games_namespaces_get_analytics_matchmaker_live_response.rs index c8ca1758..b01f1505 100644 --- a/sdks/rust/src/models/cloud_games_namespaces_get_analytics_matchmaker_live_response.rs +++ b/sdks/rust/src/models/cloud_games_namespaces_get_analytics_matchmaker_live_response.rs @@ -4,21 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesGetAnalyticsMatchmakerLiveResponse { - /// A list of analytics lobby summaries. - #[serde(rename = "lobbies")] - pub lobbies: Vec, + /// A list of analytics lobby summaries. + #[serde(rename = "lobbies")] + pub lobbies: Vec, } impl CloudGamesNamespacesGetAnalyticsMatchmakerLiveResponse { - pub fn new( - lobbies: Vec, - ) -> CloudGamesNamespacesGetAnalyticsMatchmakerLiveResponse { - CloudGamesNamespacesGetAnalyticsMatchmakerLiveResponse { lobbies } - } + pub fn new(lobbies: Vec) -> CloudGamesNamespacesGetAnalyticsMatchmakerLiveResponse { + CloudGamesNamespacesGetAnalyticsMatchmakerLiveResponse { + lobbies, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_namespaces_get_game_namespace_by_id_response.rs b/sdks/rust/src/models/cloud_games_namespaces_get_game_namespace_by_id_response.rs index 51f9226f..53227a9e 100644 --- a/sdks/rust/src/models/cloud_games_namespaces_get_game_namespace_by_id_response.rs +++ b/sdks/rust/src/models/cloud_games_namespaces_get_game_namespace_by_id_response.rs @@ -4,22 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesGetGameNamespaceByIdResponse { - #[serde(rename = "namespace")] - pub namespace: Box, + #[serde(rename = "namespace")] + pub namespace: Box, } impl CloudGamesNamespacesGetGameNamespaceByIdResponse { - pub fn new( - namespace: crate::models::CloudNamespaceFull, - ) -> CloudGamesNamespacesGetGameNamespaceByIdResponse { - CloudGamesNamespacesGetGameNamespaceByIdResponse { - namespace: Box::new(namespace), - } - } + pub fn new(namespace: crate::models::CloudNamespaceFull) -> CloudGamesNamespacesGetGameNamespaceByIdResponse { + CloudGamesNamespacesGetGameNamespaceByIdResponse { + namespace: Box::new(namespace), + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_namespaces_get_game_namespace_version_history_response.rs b/sdks/rust/src/models/cloud_games_namespaces_get_game_namespace_version_history_response.rs index b14603d6..51044c3f 100644 --- a/sdks/rust/src/models/cloud_games_namespaces_get_game_namespace_version_history_response.rs +++ b/sdks/rust/src/models/cloud_games_namespaces_get_game_namespace_version_history_response.rs @@ -4,21 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesGetGameNamespaceVersionHistoryResponse { - /// A list of previously deployed namespace versions. - #[serde(rename = "versions")] - pub versions: Vec, + /// A list of previously deployed namespace versions. + #[serde(rename = "versions")] + pub versions: Vec, } impl CloudGamesNamespacesGetGameNamespaceVersionHistoryResponse { - pub fn new( - versions: Vec, - ) -> CloudGamesNamespacesGetGameNamespaceVersionHistoryResponse { - CloudGamesNamespacesGetGameNamespaceVersionHistoryResponse { versions } - } + pub fn new(versions: Vec) -> CloudGamesNamespacesGetGameNamespaceVersionHistoryResponse { + CloudGamesNamespacesGetGameNamespaceVersionHistoryResponse { + versions, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_namespaces_get_namespace_lobby_response.rs b/sdks/rust/src/models/cloud_games_namespaces_get_namespace_lobby_response.rs index f1f18bc4..25033740 100644 --- a/sdks/rust/src/models/cloud_games_namespaces_get_namespace_lobby_response.rs +++ b/sdks/rust/src/models/cloud_games_namespaces_get_namespace_lobby_response.rs @@ -4,40 +4,40 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesGetNamespaceLobbyResponse { - #[serde(rename = "lobby")] - pub lobby: Box, - #[serde(rename = "metrics", skip_serializing_if = "Option::is_none")] - pub metrics: Option>, - /// **Deprecated** A list of service performance summaries. - #[serde(rename = "perf_lists")] - pub perf_lists: Vec, - /// **Deprecated** A list of URLs. - #[serde(rename = "stderr_presigned_urls")] - pub stderr_presigned_urls: Vec, - /// **Deprecated** A list of URLs. - #[serde(rename = "stdout_presigned_urls")] - pub stdout_presigned_urls: Vec, + #[serde(rename = "lobby")] + pub lobby: Box, + #[serde(rename = "metrics", skip_serializing_if = "Option::is_none")] + pub metrics: Option>, + /// **Deprecated** A list of service performance summaries. + #[serde(rename = "perf_lists")] + pub perf_lists: Vec, + /// **Deprecated** A list of URLs. + #[serde(rename = "stderr_presigned_urls")] + pub stderr_presigned_urls: Vec, + /// **Deprecated** A list of URLs. + #[serde(rename = "stdout_presigned_urls")] + pub stdout_presigned_urls: Vec, } impl CloudGamesNamespacesGetNamespaceLobbyResponse { - pub fn new( - lobby: crate::models::CloudLogsLobbySummary, - perf_lists: Vec, - stderr_presigned_urls: Vec, - stdout_presigned_urls: Vec, - ) -> CloudGamesNamespacesGetNamespaceLobbyResponse { - CloudGamesNamespacesGetNamespaceLobbyResponse { - lobby: Box::new(lobby), - metrics: None, - perf_lists, - stderr_presigned_urls, - stdout_presigned_urls, - } - } + pub fn new(lobby: crate::models::CloudLogsLobbySummary, perf_lists: Vec, stderr_presigned_urls: Vec, stdout_presigned_urls: Vec) -> CloudGamesNamespacesGetNamespaceLobbyResponse { + CloudGamesNamespacesGetNamespaceLobbyResponse { + lobby: Box::new(lobby), + metrics: None, + perf_lists, + stderr_presigned_urls, + stdout_presigned_urls, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_namespaces_inspect_response.rs b/sdks/rust/src/models/cloud_games_namespaces_inspect_response.rs index 7498a02c..bdd1733a 100644 --- a/sdks/rust/src/models/cloud_games_namespaces_inspect_response.rs +++ b/sdks/rust/src/models/cloud_games_namespaces_inspect_response.rs @@ -4,20 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesInspectResponse { - #[serde(rename = "agent")] - pub agent: Box, + #[serde(rename = "agent")] + pub agent: Box, } impl CloudGamesNamespacesInspectResponse { - pub fn new(agent: crate::models::CloudAuthAgent) -> CloudGamesNamespacesInspectResponse { - CloudGamesNamespacesInspectResponse { - agent: Box::new(agent), - } - } + pub fn new(agent: crate::models::CloudAuthAgent) -> CloudGamesNamespacesInspectResponse { + CloudGamesNamespacesInspectResponse { + agent: Box::new(agent), + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_namespaces_list_namespace_lobbies_response.rs b/sdks/rust/src/models/cloud_games_namespaces_list_namespace_lobbies_response.rs index 42578dd9..66af507b 100644 --- a/sdks/rust/src/models/cloud_games_namespaces_list_namespace_lobbies_response.rs +++ b/sdks/rust/src/models/cloud_games_namespaces_list_namespace_lobbies_response.rs @@ -4,21 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesListNamespaceLobbiesResponse { - /// A list of lobby log summaries. - #[serde(rename = "lobbies")] - pub lobbies: Vec, + /// A list of lobby log summaries. + #[serde(rename = "lobbies")] + pub lobbies: Vec, } impl CloudGamesNamespacesListNamespaceLobbiesResponse { - pub fn new( - lobbies: Vec, - ) -> CloudGamesNamespacesListNamespaceLobbiesResponse { - CloudGamesNamespacesListNamespaceLobbiesResponse { lobbies } - } + pub fn new(lobbies: Vec) -> CloudGamesNamespacesListNamespaceLobbiesResponse { + CloudGamesNamespacesListNamespaceLobbiesResponse { + lobbies, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_namespaces_set_namespace_cdn_auth_type_request.rs b/sdks/rust/src/models/cloud_games_namespaces_set_namespace_cdn_auth_type_request.rs index b7e726ff..96d0f460 100644 --- a/sdks/rust/src/models/cloud_games_namespaces_set_namespace_cdn_auth_type_request.rs +++ b/sdks/rust/src/models/cloud_games_namespaces_set_namespace_cdn_auth_type_request.rs @@ -4,20 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesSetNamespaceCdnAuthTypeRequest { - #[serde(rename = "auth_type")] - pub auth_type: crate::models::CloudCdnAuthType, + #[serde(rename = "auth_type")] + pub auth_type: crate::models::CloudCdnAuthType, } impl CloudGamesNamespacesSetNamespaceCdnAuthTypeRequest { - pub fn new( - auth_type: crate::models::CloudCdnAuthType, - ) -> CloudGamesNamespacesSetNamespaceCdnAuthTypeRequest { - CloudGamesNamespacesSetNamespaceCdnAuthTypeRequest { auth_type } - } + pub fn new(auth_type: crate::models::CloudCdnAuthType) -> CloudGamesNamespacesSetNamespaceCdnAuthTypeRequest { + CloudGamesNamespacesSetNamespaceCdnAuthTypeRequest { + auth_type, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_namespaces_toggle_namespace_domain_public_auth_request.rs b/sdks/rust/src/models/cloud_games_namespaces_toggle_namespace_domain_public_auth_request.rs index 667a8d94..dca06733 100644 --- a/sdks/rust/src/models/cloud_games_namespaces_toggle_namespace_domain_public_auth_request.rs +++ b/sdks/rust/src/models/cloud_games_namespaces_toggle_namespace_domain_public_auth_request.rs @@ -4,19 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesToggleNamespaceDomainPublicAuthRequest { - /// Whether or not to enable authentication based on domain. - #[serde(rename = "enabled")] - pub enabled: bool, + /// Whether or not to enable authentication based on domain. + #[serde(rename = "enabled")] + pub enabled: bool, } impl CloudGamesNamespacesToggleNamespaceDomainPublicAuthRequest { - pub fn new(enabled: bool) -> CloudGamesNamespacesToggleNamespaceDomainPublicAuthRequest { - CloudGamesNamespacesToggleNamespaceDomainPublicAuthRequest { enabled } - } + pub fn new(enabled: bool) -> CloudGamesNamespacesToggleNamespaceDomainPublicAuthRequest { + CloudGamesNamespacesToggleNamespaceDomainPublicAuthRequest { + enabled, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_namespaces_update_game_namespace_matchmaker_config_request.rs b/sdks/rust/src/models/cloud_games_namespaces_update_game_namespace_matchmaker_config_request.rs index 0ef36228..7c300a53 100644 --- a/sdks/rust/src/models/cloud_games_namespaces_update_game_namespace_matchmaker_config_request.rs +++ b/sdks/rust/src/models/cloud_games_namespaces_update_game_namespace_matchmaker_config_request.rs @@ -4,28 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesUpdateGameNamespaceMatchmakerConfigRequest { - /// Unsigned 32 bit integer. - #[serde(rename = "lobby_count_max")] - pub lobby_count_max: i32, - /// Unsigned 32 bit integer. - #[serde(rename = "max_players")] - pub max_players: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "lobby_count_max")] + pub lobby_count_max: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "max_players")] + pub max_players: i32, } impl CloudGamesNamespacesUpdateGameNamespaceMatchmakerConfigRequest { - pub fn new( - lobby_count_max: i32, - max_players: i32, - ) -> CloudGamesNamespacesUpdateGameNamespaceMatchmakerConfigRequest { - CloudGamesNamespacesUpdateGameNamespaceMatchmakerConfigRequest { - lobby_count_max, - max_players, - } - } + pub fn new(lobby_count_max: i32, max_players: i32) -> CloudGamesNamespacesUpdateGameNamespaceMatchmakerConfigRequest { + CloudGamesNamespacesUpdateGameNamespaceMatchmakerConfigRequest { + lobby_count_max, + max_players, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_namespaces_update_game_namespace_version_request.rs b/sdks/rust/src/models/cloud_games_namespaces_update_game_namespace_version_request.rs index c9d3f651..142f493e 100644 --- a/sdks/rust/src/models/cloud_games_namespaces_update_game_namespace_version_request.rs +++ b/sdks/rust/src/models/cloud_games_namespaces_update_game_namespace_version_request.rs @@ -4,18 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesUpdateGameNamespaceVersionRequest { - #[serde(rename = "version_id")] - pub version_id: uuid::Uuid, + #[serde(rename = "version_id")] + pub version_id: uuid::Uuid, } impl CloudGamesNamespacesUpdateGameNamespaceVersionRequest { - pub fn new(version_id: uuid::Uuid) -> CloudGamesNamespacesUpdateGameNamespaceVersionRequest { - CloudGamesNamespacesUpdateGameNamespaceVersionRequest { version_id } - } + pub fn new(version_id: uuid::Uuid) -> CloudGamesNamespacesUpdateGameNamespaceVersionRequest { + CloudGamesNamespacesUpdateGameNamespaceVersionRequest { + version_id, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_namespaces_update_namespace_cdn_auth_user_request.rs b/sdks/rust/src/models/cloud_games_namespaces_update_namespace_cdn_auth_user_request.rs index cf1174a8..6a4d00a9 100644 --- a/sdks/rust/src/models/cloud_games_namespaces_update_namespace_cdn_auth_user_request.rs +++ b/sdks/rust/src/models/cloud_games_namespaces_update_namespace_cdn_auth_user_request.rs @@ -4,25 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesUpdateNamespaceCdnAuthUserRequest { - /// A bcrypt encrypted password. An error is returned if the given string is not properly encrypted. - #[serde(rename = "password")] - pub password: String, - /// A user name. - #[serde(rename = "user")] - pub user: String, + /// A bcrypt encrypted password. An error is returned if the given string is not properly encrypted. + #[serde(rename = "password")] + pub password: String, + /// A user name. + #[serde(rename = "user")] + pub user: String, } impl CloudGamesNamespacesUpdateNamespaceCdnAuthUserRequest { - pub fn new( - password: String, - user: String, - ) -> CloudGamesNamespacesUpdateNamespaceCdnAuthUserRequest { - CloudGamesNamespacesUpdateNamespaceCdnAuthUserRequest { password, user } - } + pub fn new(password: String, user: String) -> CloudGamesNamespacesUpdateNamespaceCdnAuthUserRequest { + CloudGamesNamespacesUpdateNamespaceCdnAuthUserRequest { + password, + user, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_namespaces_validate_game_namespace_matchmaker_config_request.rs b/sdks/rust/src/models/cloud_games_namespaces_validate_game_namespace_matchmaker_config_request.rs index f2c1a2f2..76f92fe1 100644 --- a/sdks/rust/src/models/cloud_games_namespaces_validate_game_namespace_matchmaker_config_request.rs +++ b/sdks/rust/src/models/cloud_games_namespaces_validate_game_namespace_matchmaker_config_request.rs @@ -4,28 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigRequest { - /// Unsigned 32 bit integer. - #[serde(rename = "lobby_count_max")] - pub lobby_count_max: i32, - /// Unsigned 32 bit integer. - #[serde(rename = "max_players")] - pub max_players: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "lobby_count_max")] + pub lobby_count_max: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "max_players")] + pub max_players: i32, } impl CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigRequest { - pub fn new( - lobby_count_max: i32, - max_players: i32, - ) -> CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigRequest { - CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigRequest { - lobby_count_max, - max_players, - } - } + pub fn new(lobby_count_max: i32, max_players: i32) -> CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigRequest { + CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigRequest { + lobby_count_max, + max_players, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_namespaces_validate_game_namespace_matchmaker_config_response.rs b/sdks/rust/src/models/cloud_games_namespaces_validate_game_namespace_matchmaker_config_response.rs index 66985f0f..894b2ce4 100644 --- a/sdks/rust/src/models/cloud_games_namespaces_validate_game_namespace_matchmaker_config_response.rs +++ b/sdks/rust/src/models/cloud_games_namespaces_validate_game_namespace_matchmaker_config_response.rs @@ -4,21 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigResponse { - /// A list of validation errors. - #[serde(rename = "errors")] - pub errors: Vec, + /// A list of validation errors. + #[serde(rename = "errors")] + pub errors: Vec, } impl CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigResponse { - pub fn new( - errors: Vec, - ) -> CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigResponse { - CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigResponse { errors } - } + pub fn new(errors: Vec) -> CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigResponse { + CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigResponse { + errors, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_namespaces_validate_game_namespace_request.rs b/sdks/rust/src/models/cloud_games_namespaces_validate_game_namespace_request.rs index 0d90d022..6cf1780e 100644 --- a/sdks/rust/src/models/cloud_games_namespaces_validate_game_namespace_request.rs +++ b/sdks/rust/src/models/cloud_games_namespaces_validate_game_namespace_request.rs @@ -4,28 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesValidateGameNamespaceRequest { - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. - #[serde(rename = "name_id")] - pub name_id: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. + #[serde(rename = "name_id")] + pub name_id: String, } impl CloudGamesNamespacesValidateGameNamespaceRequest { - pub fn new( - display_name: String, - name_id: String, - ) -> CloudGamesNamespacesValidateGameNamespaceRequest { - CloudGamesNamespacesValidateGameNamespaceRequest { - display_name, - name_id, - } - } + pub fn new(display_name: String, name_id: String) -> CloudGamesNamespacesValidateGameNamespaceRequest { + CloudGamesNamespacesValidateGameNamespaceRequest { + display_name, + name_id, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_namespaces_validate_game_namespace_response.rs b/sdks/rust/src/models/cloud_games_namespaces_validate_game_namespace_response.rs index b4965176..b79e54ef 100644 --- a/sdks/rust/src/models/cloud_games_namespaces_validate_game_namespace_response.rs +++ b/sdks/rust/src/models/cloud_games_namespaces_validate_game_namespace_response.rs @@ -4,21 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesValidateGameNamespaceResponse { - /// A list of validation errors. - #[serde(rename = "errors")] - pub errors: Vec, + /// A list of validation errors. + #[serde(rename = "errors")] + pub errors: Vec, } impl CloudGamesNamespacesValidateGameNamespaceResponse { - pub fn new( - errors: Vec, - ) -> CloudGamesNamespacesValidateGameNamespaceResponse { - CloudGamesNamespacesValidateGameNamespaceResponse { errors } - } + pub fn new(errors: Vec) -> CloudGamesNamespacesValidateGameNamespaceResponse { + CloudGamesNamespacesValidateGameNamespaceResponse { + errors, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_namespaces_validate_game_namespace_token_development_request.rs b/sdks/rust/src/models/cloud_games_namespaces_validate_game_namespace_token_development_request.rs index 9b41d5b5..cbc615b8 100644 --- a/sdks/rust/src/models/cloud_games_namespaces_validate_game_namespace_token_development_request.rs +++ b/sdks/rust/src/models/cloud_games_namespaces_validate_game_namespace_token_development_request.rs @@ -4,27 +4,29 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentRequest { - #[serde(rename = "hostname")] - pub hostname: String, - /// A list of docker ports. - #[serde(rename = "lobby_ports")] - pub lobby_ports: Vec, + #[serde(rename = "hostname")] + pub hostname: String, + /// A list of docker ports. + #[serde(rename = "lobby_ports")] + pub lobby_ports: Vec, } impl CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentRequest { - pub fn new( - hostname: String, - lobby_ports: Vec, - ) -> CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentRequest { - CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentRequest { - hostname, - lobby_ports, - } - } + pub fn new(hostname: String, lobby_ports: Vec) -> CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentRequest { + CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentRequest { + hostname, + lobby_ports, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_namespaces_validate_game_namespace_token_development_response.rs b/sdks/rust/src/models/cloud_games_namespaces_validate_game_namespace_token_development_response.rs index 53740acc..db2258fe 100644 --- a/sdks/rust/src/models/cloud_games_namespaces_validate_game_namespace_token_development_response.rs +++ b/sdks/rust/src/models/cloud_games_namespaces_validate_game_namespace_token_development_response.rs @@ -4,21 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentResponse { - /// A list of validation errors. - #[serde(rename = "errors")] - pub errors: Vec, + /// A list of validation errors. + #[serde(rename = "errors")] + pub errors: Vec, } impl CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentResponse { - pub fn new( - errors: Vec, - ) -> CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentResponse { - CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentResponse { errors } - } + pub fn new(errors: Vec) -> CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentResponse { + CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentResponse { + errors, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_prepare_custom_avatar_upload_request.rs b/sdks/rust/src/models/cloud_games_prepare_custom_avatar_upload_request.rs index 3151080b..235751d6 100644 --- a/sdks/rust/src/models/cloud_games_prepare_custom_avatar_upload_request.rs +++ b/sdks/rust/src/models/cloud_games_prepare_custom_avatar_upload_request.rs @@ -4,29 +4,34 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesPrepareCustomAvatarUploadRequest { - /// Unsigned 64 bit integer. - #[serde(rename = "content_length")] - pub content_length: i64, - /// The MIME type of the custom avatar. - #[serde(rename = "mime", skip_serializing_if = "Option::is_none")] - pub mime: Option, - /// The path/filename of the custom avatar. - #[serde(rename = "path")] - pub path: String, + /// Unsigned 64 bit integer. + #[serde(rename = "content_length")] + pub content_length: i64, + /// The MIME type of the custom avatar. + #[serde(rename = "mime", skip_serializing_if = "Option::is_none")] + pub mime: Option, + /// The path/filename of the custom avatar. + #[serde(rename = "path")] + pub path: String, } impl CloudGamesPrepareCustomAvatarUploadRequest { - pub fn new(content_length: i64, path: String) -> CloudGamesPrepareCustomAvatarUploadRequest { - CloudGamesPrepareCustomAvatarUploadRequest { - content_length, - mime: None, - path, - } - } + pub fn new(content_length: i64, path: String) -> CloudGamesPrepareCustomAvatarUploadRequest { + CloudGamesPrepareCustomAvatarUploadRequest { + content_length, + mime: None, + path, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_prepare_custom_avatar_upload_response.rs b/sdks/rust/src/models/cloud_games_prepare_custom_avatar_upload_response.rs index 034b7bb5..a2f83bf5 100644 --- a/sdks/rust/src/models/cloud_games_prepare_custom_avatar_upload_response.rs +++ b/sdks/rust/src/models/cloud_games_prepare_custom_avatar_upload_response.rs @@ -4,26 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesPrepareCustomAvatarUploadResponse { - #[serde(rename = "presigned_request")] - pub presigned_request: Box, - #[serde(rename = "upload_id")] - pub upload_id: uuid::Uuid, + #[serde(rename = "presigned_request")] + pub presigned_request: Box, + #[serde(rename = "upload_id")] + pub upload_id: uuid::Uuid, } impl CloudGamesPrepareCustomAvatarUploadResponse { - pub fn new( - presigned_request: crate::models::UploadPresignedRequest, - upload_id: uuid::Uuid, - ) -> CloudGamesPrepareCustomAvatarUploadResponse { - CloudGamesPrepareCustomAvatarUploadResponse { - presigned_request: Box::new(presigned_request), - upload_id, - } - } + pub fn new(presigned_request: crate::models::UploadPresignedRequest, upload_id: uuid::Uuid) -> CloudGamesPrepareCustomAvatarUploadResponse { + CloudGamesPrepareCustomAvatarUploadResponse { + presigned_request: Box::new(presigned_request), + upload_id, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_reserve_version_name_response.rs b/sdks/rust/src/models/cloud_games_reserve_version_name_response.rs index de381f91..8e8fcdaf 100644 --- a/sdks/rust/src/models/cloud_games_reserve_version_name_response.rs +++ b/sdks/rust/src/models/cloud_games_reserve_version_name_response.rs @@ -4,21 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesReserveVersionNameResponse { - /// Represent a resource's readable display name. - #[serde(rename = "version_display_name")] - pub version_display_name: String, + /// Represent a resource's readable display name. + #[serde(rename = "version_display_name")] + pub version_display_name: String, } impl CloudGamesReserveVersionNameResponse { - pub fn new(version_display_name: String) -> CloudGamesReserveVersionNameResponse { - CloudGamesReserveVersionNameResponse { - version_display_name, - } - } + pub fn new(version_display_name: String) -> CloudGamesReserveVersionNameResponse { + CloudGamesReserveVersionNameResponse { + version_display_name, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_validate_game_request.rs b/sdks/rust/src/models/cloud_games_validate_game_request.rs index b5e7951b..fc595f65 100644 --- a/sdks/rust/src/models/cloud_games_validate_game_request.rs +++ b/sdks/rust/src/models/cloud_games_validate_game_request.rs @@ -4,25 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesValidateGameRequest { - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - /// A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short. - #[serde(rename = "name_id", skip_serializing_if = "Option::is_none")] - pub name_id: Option, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + /// A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short. + #[serde(rename = "name_id", skip_serializing_if = "Option::is_none")] + pub name_id: Option, } impl CloudGamesValidateGameRequest { - pub fn new(display_name: String) -> CloudGamesValidateGameRequest { - CloudGamesValidateGameRequest { - display_name, - name_id: None, - } - } + pub fn new(display_name: String) -> CloudGamesValidateGameRequest { + CloudGamesValidateGameRequest { + display_name, + name_id: None, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_validate_game_response.rs b/sdks/rust/src/models/cloud_games_validate_game_response.rs index c8194d97..e2fcbf6c 100644 --- a/sdks/rust/src/models/cloud_games_validate_game_response.rs +++ b/sdks/rust/src/models/cloud_games_validate_game_response.rs @@ -4,19 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesValidateGameResponse { - /// A list of validation errors. - #[serde(rename = "errors")] - pub errors: Vec, + /// A list of validation errors. + #[serde(rename = "errors")] + pub errors: Vec, } impl CloudGamesValidateGameResponse { - pub fn new(errors: Vec) -> CloudGamesValidateGameResponse { - CloudGamesValidateGameResponse { errors } - } + pub fn new(errors: Vec) -> CloudGamesValidateGameResponse { + CloudGamesValidateGameResponse { + errors, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_validate_game_version_request.rs b/sdks/rust/src/models/cloud_games_validate_game_version_request.rs index e83e6e16..e830eb05 100644 --- a/sdks/rust/src/models/cloud_games_validate_game_version_request.rs +++ b/sdks/rust/src/models/cloud_games_validate_game_version_request.rs @@ -4,27 +4,29 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesValidateGameVersionRequest { - #[serde(rename = "config")] - pub config: Box, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, + #[serde(rename = "config")] + pub config: Box, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, } impl CloudGamesValidateGameVersionRequest { - pub fn new( - config: crate::models::CloudVersionConfig, - display_name: String, - ) -> CloudGamesValidateGameVersionRequest { - CloudGamesValidateGameVersionRequest { - config: Box::new(config), - display_name, - } - } + pub fn new(config: crate::models::CloudVersionConfig, display_name: String) -> CloudGamesValidateGameVersionRequest { + CloudGamesValidateGameVersionRequest { + config: Box::new(config), + display_name, + } + } } + + diff --git a/sdks/rust/src/models/cloud_games_validate_game_version_response.rs b/sdks/rust/src/models/cloud_games_validate_game_version_response.rs index 4809fd7f..911e59da 100644 --- a/sdks/rust/src/models/cloud_games_validate_game_version_response.rs +++ b/sdks/rust/src/models/cloud_games_validate_game_version_response.rs @@ -4,21 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesValidateGameVersionResponse { - /// A list of validation errors. - #[serde(rename = "errors")] - pub errors: Vec, + /// A list of validation errors. + #[serde(rename = "errors")] + pub errors: Vec, } impl CloudGamesValidateGameVersionResponse { - pub fn new( - errors: Vec, - ) -> CloudGamesValidateGameVersionResponse { - CloudGamesValidateGameVersionResponse { errors } - } + pub fn new(errors: Vec) -> CloudGamesValidateGameVersionResponse { + CloudGamesValidateGameVersionResponse { + errors, + } + } } + + diff --git a/sdks/rust/src/models/cloud_get_ray_perf_logs_response.rs b/sdks/rust/src/models/cloud_get_ray_perf_logs_response.rs index 50932a03..913111a5 100644 --- a/sdks/rust/src/models/cloud_get_ray_perf_logs_response.rs +++ b/sdks/rust/src/models/cloud_get_ray_perf_logs_response.rs @@ -4,19 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGetRayPerfLogsResponse { - /// A list of service performance summaries. - #[serde(rename = "perf_lists")] - pub perf_lists: Vec, + /// A list of service performance summaries. + #[serde(rename = "perf_lists")] + pub perf_lists: Vec, } impl CloudGetRayPerfLogsResponse { - pub fn new(perf_lists: Vec) -> CloudGetRayPerfLogsResponse { - CloudGetRayPerfLogsResponse { perf_lists } - } + pub fn new(perf_lists: Vec) -> CloudGetRayPerfLogsResponse { + CloudGetRayPerfLogsResponse { + perf_lists, + } + } } + + diff --git a/sdks/rust/src/models/cloud_get_region_tiers_response.rs b/sdks/rust/src/models/cloud_get_region_tiers_response.rs index 962bd602..3beeb62f 100644 --- a/sdks/rust/src/models/cloud_get_region_tiers_response.rs +++ b/sdks/rust/src/models/cloud_get_region_tiers_response.rs @@ -4,19 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGetRegionTiersResponse { - /// A list of region server tiers. - #[serde(rename = "tiers")] - pub tiers: Vec, + /// A list of region server tiers. + #[serde(rename = "tiers")] + pub tiers: Vec, } impl CloudGetRegionTiersResponse { - pub fn new(tiers: Vec) -> CloudGetRegionTiersResponse { - CloudGetRegionTiersResponse { tiers } - } + pub fn new(tiers: Vec) -> CloudGetRegionTiersResponse { + CloudGetRegionTiersResponse { + tiers, + } + } } + + diff --git a/sdks/rust/src/models/cloud_group_bank_source.rs b/sdks/rust/src/models/cloud_group_bank_source.rs index 385487e5..3e4e4e12 100644 --- a/sdks/rust/src/models/cloud_group_bank_source.rs +++ b/sdks/rust/src/models/cloud_group_bank_source.rs @@ -4,25 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGroupBankSource { - /// The bank account number of this group's bank source. - #[serde(rename = "account_number")] - pub account_number: String, - /// The bank routing number of this group's bank source. - #[serde(rename = "routing_number")] - pub routing_number: String, + /// The bank account number of this group's bank source. + #[serde(rename = "account_number")] + pub account_number: String, + /// The bank routing number of this group's bank source. + #[serde(rename = "routing_number")] + pub routing_number: String, } impl CloudGroupBankSource { - pub fn new(account_number: String, routing_number: String) -> CloudGroupBankSource { - CloudGroupBankSource { - account_number, - routing_number, - } - } + pub fn new(account_number: String, routing_number: String) -> CloudGroupBankSource { + CloudGroupBankSource { + account_number, + routing_number, + } + } } + + diff --git a/sdks/rust/src/models/cloud_inspect_response.rs b/sdks/rust/src/models/cloud_inspect_response.rs index 098a564f..df95e801 100644 --- a/sdks/rust/src/models/cloud_inspect_response.rs +++ b/sdks/rust/src/models/cloud_inspect_response.rs @@ -4,20 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudInspectResponse { - #[serde(rename = "agent")] - pub agent: Box, + #[serde(rename = "agent")] + pub agent: Box, } impl CloudInspectResponse { - pub fn new(agent: crate::models::CloudAuthAgent) -> CloudInspectResponse { - CloudInspectResponse { - agent: Box::new(agent), - } - } + pub fn new(agent: crate::models::CloudAuthAgent) -> CloudInspectResponse { + CloudInspectResponse { + agent: Box::new(agent), + } + } } + + diff --git a/sdks/rust/src/models/cloud_lobby_summary_analytics.rs b/sdks/rust/src/models/cloud_lobby_summary_analytics.rs index 70897c8d..a5dae653 100644 --- a/sdks/rust/src/models/cloud_lobby_summary_analytics.rs +++ b/sdks/rust/src/models/cloud_lobby_summary_analytics.rs @@ -4,88 +4,77 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudLobbySummaryAnalytics : Analytical information about a lobby. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudLobbySummaryAnalytics { - /// RFC3339 timestamp - #[serde(rename = "create_ts")] - pub create_ts: String, - /// Whether or not this lobby is in a closed state. - #[serde(rename = "is_closed")] - pub is_closed: bool, - /// Whether or not this lobby is idle. - #[serde(rename = "is_idle")] - pub is_idle: bool, - /// Whether or not this lobby is outdated. - #[serde(rename = "is_outdated")] - pub is_outdated: bool, - /// Whether or not this lobby is ready. - #[serde(rename = "is_ready")] - pub is_ready: bool, - #[serde(rename = "lobby_group_id")] - pub lobby_group_id: uuid::Uuid, - /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. - #[serde(rename = "lobby_group_name_id")] - pub lobby_group_name_id: String, - #[serde(rename = "lobby_id")] - pub lobby_id: uuid::Uuid, - /// Unsigned 32 bit integer. - #[serde(rename = "max_players_direct")] - pub max_players_direct: i32, - /// Unsigned 32 bit integer. - #[serde(rename = "max_players_normal")] - pub max_players_normal: i32, - /// Unsigned 32 bit integer. - #[serde(rename = "max_players_party")] - pub max_players_party: i32, - #[serde(rename = "region_id")] - pub region_id: uuid::Uuid, - /// Unsigned 32 bit integer. - #[serde(rename = "registered_player_count")] - pub registered_player_count: i32, - /// Unsigned 32 bit integer. - #[serde(rename = "total_player_count")] - pub total_player_count: i32, + /// RFC3339 timestamp + #[serde(rename = "create_ts")] + pub create_ts: String, + /// Whether or not this lobby is in a closed state. + #[serde(rename = "is_closed")] + pub is_closed: bool, + /// Whether or not this lobby is idle. + #[serde(rename = "is_idle")] + pub is_idle: bool, + /// Whether or not this lobby is outdated. + #[serde(rename = "is_outdated")] + pub is_outdated: bool, + /// Whether or not this lobby is ready. + #[serde(rename = "is_ready")] + pub is_ready: bool, + #[serde(rename = "lobby_group_id")] + pub lobby_group_id: uuid::Uuid, + /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. + #[serde(rename = "lobby_group_name_id")] + pub lobby_group_name_id: String, + #[serde(rename = "lobby_id")] + pub lobby_id: uuid::Uuid, + /// Unsigned 32 bit integer. + #[serde(rename = "max_players_direct")] + pub max_players_direct: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "max_players_normal")] + pub max_players_normal: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "max_players_party")] + pub max_players_party: i32, + #[serde(rename = "region_id")] + pub region_id: uuid::Uuid, + /// Unsigned 32 bit integer. + #[serde(rename = "registered_player_count")] + pub registered_player_count: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "total_player_count")] + pub total_player_count: i32, } impl CloudLobbySummaryAnalytics { - /// Analytical information about a lobby. - pub fn new( - create_ts: String, - is_closed: bool, - is_idle: bool, - is_outdated: bool, - is_ready: bool, - lobby_group_id: uuid::Uuid, - lobby_group_name_id: String, - lobby_id: uuid::Uuid, - max_players_direct: i32, - max_players_normal: i32, - max_players_party: i32, - region_id: uuid::Uuid, - registered_player_count: i32, - total_player_count: i32, - ) -> CloudLobbySummaryAnalytics { - CloudLobbySummaryAnalytics { - create_ts, - is_closed, - is_idle, - is_outdated, - is_ready, - lobby_group_id, - lobby_group_name_id, - lobby_id, - max_players_direct, - max_players_normal, - max_players_party, - region_id, - registered_player_count, - total_player_count, - } - } + /// Analytical information about a lobby. + pub fn new(create_ts: String, is_closed: bool, is_idle: bool, is_outdated: bool, is_ready: bool, lobby_group_id: uuid::Uuid, lobby_group_name_id: String, lobby_id: uuid::Uuid, max_players_direct: i32, max_players_normal: i32, max_players_party: i32, region_id: uuid::Uuid, registered_player_count: i32, total_player_count: i32) -> CloudLobbySummaryAnalytics { + CloudLobbySummaryAnalytics { + create_ts, + is_closed, + is_idle, + is_outdated, + is_ready, + lobby_group_id, + lobby_group_name_id, + lobby_id, + max_players_direct, + max_players_normal, + max_players_party, + region_id, + registered_player_count, + total_player_count, + } + } } + + diff --git a/sdks/rust/src/models/cloud_logs_lobby_status.rs b/sdks/rust/src/models/cloud_logs_lobby_status.rs index e3611b8b..93a27407 100644 --- a/sdks/rust/src/models/cloud_logs_lobby_status.rs +++ b/sdks/rust/src/models/cloud_logs_lobby_status.rs @@ -4,26 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudLogsLobbyStatus : A union representing the state of a lobby. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudLogsLobbyStatus { - #[serde(rename = "running")] - pub running: serde_json::Value, - #[serde(rename = "stopped", skip_serializing_if = "Option::is_none")] - pub stopped: Option>, + #[serde(rename = "running")] + pub running: serde_json::Value, + #[serde(rename = "stopped", skip_serializing_if = "Option::is_none")] + pub stopped: Option>, } impl CloudLogsLobbyStatus { - /// A union representing the state of a lobby. - pub fn new(running: serde_json::Value) -> CloudLogsLobbyStatus { - CloudLogsLobbyStatus { - running, - stopped: None, - } - } + /// A union representing the state of a lobby. + pub fn new(running: serde_json::Value) -> CloudLogsLobbyStatus { + CloudLogsLobbyStatus { + running, + stopped: None, + } + } } + + diff --git a/sdks/rust/src/models/cloud_logs_lobby_status_stopped.rs b/sdks/rust/src/models/cloud_logs_lobby_status_stopped.rs index 5793a71f..f9d7ba02 100644 --- a/sdks/rust/src/models/cloud_logs_lobby_status_stopped.rs +++ b/sdks/rust/src/models/cloud_logs_lobby_status_stopped.rs @@ -4,32 +4,36 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudLogsLobbyStatusStopped : The status of a stopped lobby. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudLogsLobbyStatusStopped { - /// The exit code returned by the lobby's main process when stopped. - #[serde(rename = "exit_code")] - pub exit_code: i32, - /// Whether or not the lobby failed or stopped successfully. - #[serde(rename = "failed")] - pub failed: bool, - /// RFC3339 timestamp - #[serde(rename = "stop_ts")] - pub stop_ts: String, + /// The exit code returned by the lobby's main process when stopped. + #[serde(rename = "exit_code")] + pub exit_code: i32, + /// Whether or not the lobby failed or stopped successfully. + #[serde(rename = "failed")] + pub failed: bool, + /// RFC3339 timestamp + #[serde(rename = "stop_ts")] + pub stop_ts: String, } impl CloudLogsLobbyStatusStopped { - /// The status of a stopped lobby. - pub fn new(exit_code: i32, failed: bool, stop_ts: String) -> CloudLogsLobbyStatusStopped { - CloudLogsLobbyStatusStopped { - exit_code, - failed, - stop_ts, - } - } + /// The status of a stopped lobby. + pub fn new(exit_code: i32, failed: bool, stop_ts: String) -> CloudLogsLobbyStatusStopped { + CloudLogsLobbyStatusStopped { + exit_code, + failed, + stop_ts, + } + } } + + diff --git a/sdks/rust/src/models/cloud_logs_lobby_summary.rs b/sdks/rust/src/models/cloud_logs_lobby_summary.rs index 0bd6bc7f..6cc1d581 100644 --- a/sdks/rust/src/models/cloud_logs_lobby_summary.rs +++ b/sdks/rust/src/models/cloud_logs_lobby_summary.rs @@ -4,55 +4,52 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudLogsLobbySummary : A logs summary for a lobby. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudLogsLobbySummary { - /// RFC3339 timestamp - #[serde(rename = "create_ts")] - pub create_ts: String, - /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. - #[serde(rename = "lobby_group_name_id")] - pub lobby_group_name_id: String, - #[serde(rename = "lobby_id")] - pub lobby_id: uuid::Uuid, - #[serde(rename = "namespace_id")] - pub namespace_id: uuid::Uuid, - /// RFC3339 timestamp - #[serde(rename = "ready_ts", skip_serializing_if = "Option::is_none")] - pub ready_ts: Option, - #[serde(rename = "region_id")] - pub region_id: uuid::Uuid, - /// RFC3339 timestamp - #[serde(rename = "start_ts", skip_serializing_if = "Option::is_none")] - pub start_ts: Option, - #[serde(rename = "status")] - pub status: Box, + /// RFC3339 timestamp + #[serde(rename = "create_ts")] + pub create_ts: String, + /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. + #[serde(rename = "lobby_group_name_id")] + pub lobby_group_name_id: String, + #[serde(rename = "lobby_id")] + pub lobby_id: uuid::Uuid, + #[serde(rename = "namespace_id")] + pub namespace_id: uuid::Uuid, + /// RFC3339 timestamp + #[serde(rename = "ready_ts", skip_serializing_if = "Option::is_none")] + pub ready_ts: Option, + #[serde(rename = "region_id")] + pub region_id: uuid::Uuid, + /// RFC3339 timestamp + #[serde(rename = "start_ts", skip_serializing_if = "Option::is_none")] + pub start_ts: Option, + #[serde(rename = "status")] + pub status: Box, } impl CloudLogsLobbySummary { - /// A logs summary for a lobby. - pub fn new( - create_ts: String, - lobby_group_name_id: String, - lobby_id: uuid::Uuid, - namespace_id: uuid::Uuid, - region_id: uuid::Uuid, - status: crate::models::CloudLogsLobbyStatus, - ) -> CloudLogsLobbySummary { - CloudLogsLobbySummary { - create_ts, - lobby_group_name_id, - lobby_id, - namespace_id, - ready_ts: None, - region_id, - start_ts: None, - status: Box::new(status), - } - } + /// A logs summary for a lobby. + pub fn new(create_ts: String, lobby_group_name_id: String, lobby_id: uuid::Uuid, namespace_id: uuid::Uuid, region_id: uuid::Uuid, status: crate::models::CloudLogsLobbyStatus) -> CloudLogsLobbySummary { + CloudLogsLobbySummary { + create_ts, + lobby_group_name_id, + lobby_id, + namespace_id, + ready_ts: None, + region_id, + start_ts: None, + status: Box::new(status), + } + } } + + diff --git a/sdks/rust/src/models/cloud_logs_perf_mark.rs b/sdks/rust/src/models/cloud_logs_perf_mark.rs index eb571f7b..73959692 100644 --- a/sdks/rust/src/models/cloud_logs_perf_mark.rs +++ b/sdks/rust/src/models/cloud_logs_perf_mark.rs @@ -4,34 +4,38 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudLogsPerfMark : A performance mark. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudLogsPerfMark { - /// The label given to this performance mark. - #[serde(rename = "label")] - pub label: String, - #[serde(rename = "ray_id", skip_serializing_if = "Option::is_none")] - pub ray_id: Option, - #[serde(rename = "req_id", skip_serializing_if = "Option::is_none")] - pub req_id: Option, - /// RFC3339 timestamp - #[serde(rename = "ts")] - pub ts: String, + /// The label given to this performance mark. + #[serde(rename = "label")] + pub label: String, + #[serde(rename = "ray_id", skip_serializing_if = "Option::is_none")] + pub ray_id: Option, + #[serde(rename = "req_id", skip_serializing_if = "Option::is_none")] + pub req_id: Option, + /// RFC3339 timestamp + #[serde(rename = "ts")] + pub ts: String, } impl CloudLogsPerfMark { - /// A performance mark. - pub fn new(label: String, ts: String) -> CloudLogsPerfMark { - CloudLogsPerfMark { - label, - ray_id: None, - req_id: None, - ts, - } - } + /// A performance mark. + pub fn new(label: String, ts: String) -> CloudLogsPerfMark { + CloudLogsPerfMark { + label, + ray_id: None, + req_id: None, + ts, + } + } } + + diff --git a/sdks/rust/src/models/cloud_logs_perf_span.rs b/sdks/rust/src/models/cloud_logs_perf_span.rs index 2d4b0ff5..c4acfc28 100644 --- a/sdks/rust/src/models/cloud_logs_perf_span.rs +++ b/sdks/rust/src/models/cloud_logs_perf_span.rs @@ -4,35 +4,39 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudLogsPerfSpan : A performance span. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudLogsPerfSpan { - /// RFC3339 timestamp - #[serde(rename = "finish_ts", skip_serializing_if = "Option::is_none")] - pub finish_ts: Option, - /// The label given to this performance span. - #[serde(rename = "label")] - pub label: String, - #[serde(rename = "req_id", skip_serializing_if = "Option::is_none")] - pub req_id: Option, - /// RFC3339 timestamp - #[serde(rename = "start_ts")] - pub start_ts: String, + /// RFC3339 timestamp + #[serde(rename = "finish_ts", skip_serializing_if = "Option::is_none")] + pub finish_ts: Option, + /// The label given to this performance span. + #[serde(rename = "label")] + pub label: String, + #[serde(rename = "req_id", skip_serializing_if = "Option::is_none")] + pub req_id: Option, + /// RFC3339 timestamp + #[serde(rename = "start_ts")] + pub start_ts: String, } impl CloudLogsPerfSpan { - /// A performance span. - pub fn new(label: String, start_ts: String) -> CloudLogsPerfSpan { - CloudLogsPerfSpan { - finish_ts: None, - label, - req_id: None, - start_ts, - } - } + /// A performance span. + pub fn new(label: String, start_ts: String) -> CloudLogsPerfSpan { + CloudLogsPerfSpan { + finish_ts: None, + label, + req_id: None, + start_ts, + } + } } + + diff --git a/sdks/rust/src/models/cloud_matchmaker_development_port.rs b/sdks/rust/src/models/cloud_matchmaker_development_port.rs index a01e9ac5..326d964b 100644 --- a/sdks/rust/src/models/cloud_matchmaker_development_port.rs +++ b/sdks/rust/src/models/cloud_matchmaker_development_port.rs @@ -4,31 +4,33 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudMatchmakerDevelopmentPort : A port configuration used to create development tokens. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudMatchmakerDevelopmentPort { - #[serde(rename = "port", skip_serializing_if = "Option::is_none")] - pub port: Option, - #[serde(rename = "port_range", skip_serializing_if = "Option::is_none")] - pub port_range: Option>, - #[serde(rename = "protocol")] - pub protocol: crate::models::CloudVersionMatchmakerPortProtocol, + #[serde(rename = "port", skip_serializing_if = "Option::is_none")] + pub port: Option, + #[serde(rename = "port_range", skip_serializing_if = "Option::is_none")] + pub port_range: Option>, + #[serde(rename = "protocol")] + pub protocol: crate::models::CloudVersionMatchmakerPortProtocol, } impl CloudMatchmakerDevelopmentPort { - /// A port configuration used to create development tokens. - pub fn new( - protocol: crate::models::CloudVersionMatchmakerPortProtocol, - ) -> CloudMatchmakerDevelopmentPort { - CloudMatchmakerDevelopmentPort { - port: None, - port_range: None, - protocol, - } - } + /// A port configuration used to create development tokens. + pub fn new(protocol: crate::models::CloudVersionMatchmakerPortProtocol) -> CloudMatchmakerDevelopmentPort { + CloudMatchmakerDevelopmentPort { + port: None, + port_range: None, + protocol, + } + } } + + diff --git a/sdks/rust/src/models/cloud_matchmaker_namespace_config.rs b/sdks/rust/src/models/cloud_matchmaker_namespace_config.rs index 3153dd8b..1b48d6e1 100644 --- a/sdks/rust/src/models/cloud_matchmaker_namespace_config.rs +++ b/sdks/rust/src/models/cloud_matchmaker_namespace_config.rs @@ -4,51 +4,48 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudMatchmakerNamespaceConfig : Matchmaker configuration for a given namespace. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudMatchmakerNamespaceConfig { - /// Unsigned 32 bit integer. - #[serde(rename = "lobby_count_max")] - pub lobby_count_max: i32, - /// Unsigned 32 bit integer. - #[serde(rename = "max_players_per_client")] - pub max_players_per_client: i32, - /// Unsigned 32 bit integer. - #[serde(rename = "max_players_per_client_hosting")] - pub max_players_per_client_hosting: i32, - /// Unsigned 32 bit integer. - #[serde(rename = "max_players_per_client_proxy")] - pub max_players_per_client_proxy: i32, - /// Unsigned 32 bit integer. - #[serde(rename = "max_players_per_client_tor")] - pub max_players_per_client_tor: i32, - /// Unsigned 32 bit integer. - #[serde(rename = "max_players_per_client_vpn")] - pub max_players_per_client_vpn: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "lobby_count_max")] + pub lobby_count_max: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "max_players_per_client")] + pub max_players_per_client: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "max_players_per_client_hosting")] + pub max_players_per_client_hosting: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "max_players_per_client_proxy")] + pub max_players_per_client_proxy: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "max_players_per_client_tor")] + pub max_players_per_client_tor: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "max_players_per_client_vpn")] + pub max_players_per_client_vpn: i32, } impl CloudMatchmakerNamespaceConfig { - /// Matchmaker configuration for a given namespace. - pub fn new( - lobby_count_max: i32, - max_players_per_client: i32, - max_players_per_client_hosting: i32, - max_players_per_client_proxy: i32, - max_players_per_client_tor: i32, - max_players_per_client_vpn: i32, - ) -> CloudMatchmakerNamespaceConfig { - CloudMatchmakerNamespaceConfig { - lobby_count_max, - max_players_per_client, - max_players_per_client_hosting, - max_players_per_client_proxy, - max_players_per_client_tor, - max_players_per_client_vpn, - } - } + /// Matchmaker configuration for a given namespace. + pub fn new(lobby_count_max: i32, max_players_per_client: i32, max_players_per_client_hosting: i32, max_players_per_client_proxy: i32, max_players_per_client_tor: i32, max_players_per_client_vpn: i32) -> CloudMatchmakerNamespaceConfig { + CloudMatchmakerNamespaceConfig { + lobby_count_max, + max_players_per_client, + max_players_per_client_hosting, + max_players_per_client_proxy, + max_players_per_client_tor, + max_players_per_client_vpn, + } + } } + + diff --git a/sdks/rust/src/models/cloud_namespace_config.rs b/sdks/rust/src/models/cloud_namespace_config.rs index 4ca4696b..25ec78b7 100644 --- a/sdks/rust/src/models/cloud_namespace_config.rs +++ b/sdks/rust/src/models/cloud_namespace_config.rs @@ -4,39 +4,38 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudNamespaceConfig : Cloud configuration for a given namespace. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudNamespaceConfig { - #[serde(rename = "cdn")] - pub cdn: Box, - /// Identity configuration for a given namespace. - #[serde(rename = "identity")] - pub identity: serde_json::Value, - /// KV configuration for a given namespace. - #[serde(rename = "kv")] - pub kv: serde_json::Value, - #[serde(rename = "matchmaker")] - pub matchmaker: Box, + #[serde(rename = "cdn")] + pub cdn: Box, + /// Identity configuration for a given namespace. + #[serde(rename = "identity")] + pub identity: serde_json::Value, + /// KV configuration for a given namespace. + #[serde(rename = "kv")] + pub kv: serde_json::Value, + #[serde(rename = "matchmaker")] + pub matchmaker: Box, } impl CloudNamespaceConfig { - /// Cloud configuration for a given namespace. - pub fn new( - cdn: crate::models::CloudCdnNamespaceConfig, - identity: serde_json::Value, - kv: serde_json::Value, - matchmaker: crate::models::CloudMatchmakerNamespaceConfig, - ) -> CloudNamespaceConfig { - CloudNamespaceConfig { - cdn: Box::new(cdn), - identity, - kv, - matchmaker: Box::new(matchmaker), - } - } + /// Cloud configuration for a given namespace. + pub fn new(cdn: crate::models::CloudCdnNamespaceConfig, identity: serde_json::Value, kv: serde_json::Value, matchmaker: crate::models::CloudMatchmakerNamespaceConfig) -> CloudNamespaceConfig { + CloudNamespaceConfig { + cdn: Box::new(cdn), + identity, + kv, + matchmaker: Box::new(matchmaker), + } + } } + + diff --git a/sdks/rust/src/models/cloud_namespace_full.rs b/sdks/rust/src/models/cloud_namespace_full.rs index 11cddc09..63dc813b 100644 --- a/sdks/rust/src/models/cloud_namespace_full.rs +++ b/sdks/rust/src/models/cloud_namespace_full.rs @@ -4,48 +4,45 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudNamespaceFull : A full namespace. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudNamespaceFull { - #[serde(rename = "config")] - pub config: Box, - /// RFC3339 timestamp - #[serde(rename = "create_ts")] - pub create_ts: String, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. - #[serde(rename = "name_id")] - pub name_id: String, - #[serde(rename = "namespace_id")] - pub namespace_id: uuid::Uuid, - #[serde(rename = "version_id")] - pub version_id: uuid::Uuid, + #[serde(rename = "config")] + pub config: Box, + /// RFC3339 timestamp + #[serde(rename = "create_ts")] + pub create_ts: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. + #[serde(rename = "name_id")] + pub name_id: String, + #[serde(rename = "namespace_id")] + pub namespace_id: uuid::Uuid, + #[serde(rename = "version_id")] + pub version_id: uuid::Uuid, } impl CloudNamespaceFull { - /// A full namespace. - pub fn new( - config: crate::models::CloudNamespaceConfig, - create_ts: String, - display_name: String, - name_id: String, - namespace_id: uuid::Uuid, - version_id: uuid::Uuid, - ) -> CloudNamespaceFull { - CloudNamespaceFull { - config: Box::new(config), - create_ts, - display_name, - name_id, - namespace_id, - version_id, - } - } + /// A full namespace. + pub fn new(config: crate::models::CloudNamespaceConfig, create_ts: String, display_name: String, name_id: String, namespace_id: uuid::Uuid, version_id: uuid::Uuid) -> CloudNamespaceFull { + CloudNamespaceFull { + config: Box::new(config), + create_ts, + display_name, + name_id, + namespace_id, + version_id, + } + } } + + diff --git a/sdks/rust/src/models/cloud_namespace_summary.rs b/sdks/rust/src/models/cloud_namespace_summary.rs index 646669e2..5df85e8e 100644 --- a/sdks/rust/src/models/cloud_namespace_summary.rs +++ b/sdks/rust/src/models/cloud_namespace_summary.rs @@ -4,44 +4,42 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudNamespaceSummary : A namespace summary. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudNamespaceSummary { - /// RFC3339 timestamp - #[serde(rename = "create_ts")] - pub create_ts: String, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. - #[serde(rename = "name_id")] - pub name_id: String, - #[serde(rename = "namespace_id")] - pub namespace_id: uuid::Uuid, - #[serde(rename = "version_id")] - pub version_id: uuid::Uuid, + /// RFC3339 timestamp + #[serde(rename = "create_ts")] + pub create_ts: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. + #[serde(rename = "name_id")] + pub name_id: String, + #[serde(rename = "namespace_id")] + pub namespace_id: uuid::Uuid, + #[serde(rename = "version_id")] + pub version_id: uuid::Uuid, } impl CloudNamespaceSummary { - /// A namespace summary. - pub fn new( - create_ts: String, - display_name: String, - name_id: String, - namespace_id: uuid::Uuid, - version_id: uuid::Uuid, - ) -> CloudNamespaceSummary { - CloudNamespaceSummary { - create_ts, - display_name, - name_id, - namespace_id, - version_id, - } - } + /// A namespace summary. + pub fn new(create_ts: String, display_name: String, name_id: String, namespace_id: uuid::Uuid, version_id: uuid::Uuid) -> CloudNamespaceSummary { + CloudNamespaceSummary { + create_ts, + display_name, + name_id, + namespace_id, + version_id, + } + } } + + diff --git a/sdks/rust/src/models/cloud_namespace_version.rs b/sdks/rust/src/models/cloud_namespace_version.rs index 05cd6bea..54d22e63 100644 --- a/sdks/rust/src/models/cloud_namespace_version.rs +++ b/sdks/rust/src/models/cloud_namespace_version.rs @@ -4,36 +4,36 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudNamespaceVersion : A previously deployed namespace version. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudNamespaceVersion { - /// RFC3339 timestamp - #[serde(rename = "deploy_ts")] - pub deploy_ts: String, - /// A universally unique identifier. - #[serde(rename = "namespace_id")] - pub namespace_id: String, - /// A universally unique identifier. - #[serde(rename = "version_id")] - pub version_id: String, + /// RFC3339 timestamp + #[serde(rename = "deploy_ts")] + pub deploy_ts: String, + /// A universally unique identifier. + #[serde(rename = "namespace_id")] + pub namespace_id: String, + /// A universally unique identifier. + #[serde(rename = "version_id")] + pub version_id: String, } impl CloudNamespaceVersion { - /// A previously deployed namespace version. - pub fn new( - deploy_ts: String, - namespace_id: String, - version_id: String, - ) -> CloudNamespaceVersion { - CloudNamespaceVersion { - deploy_ts, - namespace_id, - version_id, - } - } + /// A previously deployed namespace version. + pub fn new(deploy_ts: String, namespace_id: String, version_id: String) -> CloudNamespaceVersion { + CloudNamespaceVersion { + deploy_ts, + namespace_id, + version_id, + } + } } + + diff --git a/sdks/rust/src/models/cloud_region_summary.rs b/sdks/rust/src/models/cloud_region_summary.rs index 34c5a03c..d2652c8b 100644 --- a/sdks/rust/src/models/cloud_region_summary.rs +++ b/sdks/rust/src/models/cloud_region_summary.rs @@ -4,49 +4,46 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudRegionSummary : A region summary. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudRegionSummary { - /// The server provider of this region. - #[serde(rename = "provider")] - pub provider: String, - /// Represent a resource's readable display name. - #[serde(rename = "provider_display_name")] - pub provider_display_name: String, - /// Represent a resource's readable display name. - #[serde(rename = "region_display_name")] - pub region_display_name: String, - #[serde(rename = "region_id")] - pub region_id: uuid::Uuid, - /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. - #[serde(rename = "region_name_id")] - pub region_name_id: String, - #[serde(rename = "universal_region")] - pub universal_region: crate::models::CloudUniversalRegion, + /// The server provider of this region. + #[serde(rename = "provider")] + pub provider: String, + /// Represent a resource's readable display name. + #[serde(rename = "provider_display_name")] + pub provider_display_name: String, + /// Represent a resource's readable display name. + #[serde(rename = "region_display_name")] + pub region_display_name: String, + #[serde(rename = "region_id")] + pub region_id: uuid::Uuid, + /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. + #[serde(rename = "region_name_id")] + pub region_name_id: String, + #[serde(rename = "universal_region")] + pub universal_region: crate::models::CloudUniversalRegion, } impl CloudRegionSummary { - /// A region summary. - pub fn new( - provider: String, - provider_display_name: String, - region_display_name: String, - region_id: uuid::Uuid, - region_name_id: String, - universal_region: crate::models::CloudUniversalRegion, - ) -> CloudRegionSummary { - CloudRegionSummary { - provider, - provider_display_name, - region_display_name, - region_id, - region_name_id, - universal_region, - } - } + /// A region summary. + pub fn new(provider: String, provider_display_name: String, region_display_name: String, region_id: uuid::Uuid, region_name_id: String, universal_region: crate::models::CloudUniversalRegion) -> CloudRegionSummary { + CloudRegionSummary { + provider, + provider_display_name, + region_display_name, + region_id, + region_name_id, + universal_region, + } + } } + + diff --git a/sdks/rust/src/models/cloud_region_tier.rs b/sdks/rust/src/models/cloud_region_tier.rs index bd81fc48..6a1d2ff1 100644 --- a/sdks/rust/src/models/cloud_region_tier.rs +++ b/sdks/rust/src/models/cloud_region_tier.rs @@ -4,61 +4,56 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudRegionTier : A region server tier. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudRegionTier { - /// Internet bandwidth (MB). - #[serde(rename = "bandwidth")] - pub bandwidth: i32, - /// CPU frequency (MHz). - #[serde(rename = "cpu")] - pub cpu: i32, - /// Allocated disk space (MB). - #[serde(rename = "disk")] - pub disk: i32, - /// Allocated memory (MB). - #[serde(rename = "memory")] - pub memory: i32, - /// **Deprecated** Price billed for every second this server is running (in quadrillionth USD, 1,000,000,000,000 = $1.00). - #[serde(rename = "price_per_second")] - pub price_per_second: i32, - /// Together with the numerator, denotes the portion of the CPU a given server uses. - #[serde(rename = "rivet_cores_denominator")] - pub rivet_cores_denominator: i32, - /// Together with the denominator, denotes the portion of the CPU a given server uses. - #[serde(rename = "rivet_cores_numerator")] - pub rivet_cores_numerator: i32, - /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. - #[serde(rename = "tier_name_id")] - pub tier_name_id: String, + /// Internet bandwidth (MB). + #[serde(rename = "bandwidth")] + pub bandwidth: i32, + /// CPU frequency (MHz). + #[serde(rename = "cpu")] + pub cpu: i32, + /// Allocated disk space (MB). + #[serde(rename = "disk")] + pub disk: i32, + /// Allocated memory (MB). + #[serde(rename = "memory")] + pub memory: i32, + /// **Deprecated** Price billed for every second this server is running (in quadrillionth USD, 1,000,000,000,000 = $1.00). + #[serde(rename = "price_per_second")] + pub price_per_second: i32, + /// Together with the numerator, denotes the portion of the CPU a given server uses. + #[serde(rename = "rivet_cores_denominator")] + pub rivet_cores_denominator: i32, + /// Together with the denominator, denotes the portion of the CPU a given server uses. + #[serde(rename = "rivet_cores_numerator")] + pub rivet_cores_numerator: i32, + /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. + #[serde(rename = "tier_name_id")] + pub tier_name_id: String, } impl CloudRegionTier { - /// A region server tier. - pub fn new( - bandwidth: i32, - cpu: i32, - disk: i32, - memory: i32, - price_per_second: i32, - rivet_cores_denominator: i32, - rivet_cores_numerator: i32, - tier_name_id: String, - ) -> CloudRegionTier { - CloudRegionTier { - bandwidth, - cpu, - disk, - memory, - price_per_second, - rivet_cores_denominator, - rivet_cores_numerator, - tier_name_id, - } - } + /// A region server tier. + pub fn new(bandwidth: i32, cpu: i32, disk: i32, memory: i32, price_per_second: i32, rivet_cores_denominator: i32, rivet_cores_numerator: i32, tier_name_id: String) -> CloudRegionTier { + CloudRegionTier { + bandwidth, + cpu, + disk, + memory, + price_per_second, + rivet_cores_denominator, + rivet_cores_numerator, + tier_name_id, + } + } } + + diff --git a/sdks/rust/src/models/cloud_region_tier_expenses.rs b/sdks/rust/src/models/cloud_region_tier_expenses.rs index b697270c..87dad9de 100644 --- a/sdks/rust/src/models/cloud_region_tier_expenses.rs +++ b/sdks/rust/src/models/cloud_region_tier_expenses.rs @@ -4,49 +4,46 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudRegionTierExpenses : Region tier expenses. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudRegionTierExpenses { - /// Amount of expenses for this region tier (in hundred-thousandths USD, 100,000 = $1.00). - #[serde(rename = "expenses")] - pub expenses: f64, - /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. - #[serde(rename = "lobby_group_name_id")] - pub lobby_group_name_id: String, - #[serde(rename = "namespace_id")] - pub namespace_id: uuid::Uuid, - #[serde(rename = "region_id")] - pub region_id: uuid::Uuid, - /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. - #[serde(rename = "tier_name_id")] - pub tier_name_id: String, - /// How long a region tier has been active (in milliseconds). - #[serde(rename = "uptime")] - pub uptime: f64, + /// Amount of expenses for this region tier (in hundred-thousandths USD, 100,000 = $1.00). + #[serde(rename = "expenses")] + pub expenses: f64, + /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. + #[serde(rename = "lobby_group_name_id")] + pub lobby_group_name_id: String, + #[serde(rename = "namespace_id")] + pub namespace_id: uuid::Uuid, + #[serde(rename = "region_id")] + pub region_id: uuid::Uuid, + /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. + #[serde(rename = "tier_name_id")] + pub tier_name_id: String, + /// How long a region tier has been active (in milliseconds). + #[serde(rename = "uptime")] + pub uptime: f64, } impl CloudRegionTierExpenses { - /// Region tier expenses. - pub fn new( - expenses: f64, - lobby_group_name_id: String, - namespace_id: uuid::Uuid, - region_id: uuid::Uuid, - tier_name_id: String, - uptime: f64, - ) -> CloudRegionTierExpenses { - CloudRegionTierExpenses { - expenses, - lobby_group_name_id, - namespace_id, - region_id, - tier_name_id, - uptime, - } - } + /// Region tier expenses. + pub fn new(expenses: f64, lobby_group_name_id: String, namespace_id: uuid::Uuid, region_id: uuid::Uuid, tier_name_id: String, uptime: f64) -> CloudRegionTierExpenses { + CloudRegionTierExpenses { + expenses, + lobby_group_name_id, + namespace_id, + region_id, + tier_name_id, + uptime, + } + } } + + diff --git a/sdks/rust/src/models/cloud_svc_metrics.rs b/sdks/rust/src/models/cloud_svc_metrics.rs index aa5bdbd4..fcdab024 100644 --- a/sdks/rust/src/models/cloud_svc_metrics.rs +++ b/sdks/rust/src/models/cloud_svc_metrics.rs @@ -4,36 +4,40 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudSvcMetrics : Metrics relating to a job service. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudSvcMetrics { - /// Total allocated memory (MB). - #[serde(rename = "allocated_memory", skip_serializing_if = "Option::is_none")] - pub allocated_memory: Option, - /// CPU metrics. - #[serde(rename = "cpu")] - pub cpu: Vec, - /// The job name. - #[serde(rename = "job")] - pub job: String, - /// Memory metrics. - #[serde(rename = "memory")] - pub memory: Vec, + /// Total allocated memory (MB). + #[serde(rename = "allocated_memory", skip_serializing_if = "Option::is_none")] + pub allocated_memory: Option, + /// CPU metrics. + #[serde(rename = "cpu")] + pub cpu: Vec, + /// The job name. + #[serde(rename = "job")] + pub job: String, + /// Memory metrics. + #[serde(rename = "memory")] + pub memory: Vec, } impl CloudSvcMetrics { - /// Metrics relating to a job service. - pub fn new(cpu: Vec, job: String, memory: Vec) -> CloudSvcMetrics { - CloudSvcMetrics { - allocated_memory: None, - cpu, - job, - memory, - } - } + /// Metrics relating to a job service. + pub fn new(cpu: Vec, job: String, memory: Vec) -> CloudSvcMetrics { + CloudSvcMetrics { + allocated_memory: None, + cpu, + job, + memory, + } + } } + + diff --git a/sdks/rust/src/models/cloud_svc_perf.rs b/sdks/rust/src/models/cloud_svc_perf.rs index 6cdfbc98..32827c86 100644 --- a/sdks/rust/src/models/cloud_svc_perf.rs +++ b/sdks/rust/src/models/cloud_svc_perf.rs @@ -4,49 +4,47 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudSvcPerf : A service performance summary. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudSvcPerf { - /// Unsigned 64 bit integer. - #[serde(rename = "duration")] - pub duration: i64, - /// A list of performance marks. - #[serde(rename = "marks")] - pub marks: Vec, - #[serde(rename = "req_id", skip_serializing_if = "Option::is_none")] - pub req_id: Option, - /// A list of performance spans. - #[serde(rename = "spans")] - pub spans: Vec, - /// The name of the service. - #[serde(rename = "svc_name")] - pub svc_name: String, - /// RFC3339 timestamp - #[serde(rename = "ts")] - pub ts: String, + /// Unsigned 64 bit integer. + #[serde(rename = "duration")] + pub duration: i64, + /// A list of performance marks. + #[serde(rename = "marks")] + pub marks: Vec, + #[serde(rename = "req_id", skip_serializing_if = "Option::is_none")] + pub req_id: Option, + /// A list of performance spans. + #[serde(rename = "spans")] + pub spans: Vec, + /// The name of the service. + #[serde(rename = "svc_name")] + pub svc_name: String, + /// RFC3339 timestamp + #[serde(rename = "ts")] + pub ts: String, } impl CloudSvcPerf { - /// A service performance summary. - pub fn new( - duration: i64, - marks: Vec, - spans: Vec, - svc_name: String, - ts: String, - ) -> CloudSvcPerf { - CloudSvcPerf { - duration, - marks, - req_id: None, - spans, - svc_name, - ts, - } - } + /// A service performance summary. + pub fn new(duration: i64, marks: Vec, spans: Vec, svc_name: String, ts: String) -> CloudSvcPerf { + CloudSvcPerf { + duration, + marks, + req_id: None, + spans, + svc_name, + ts, + } + } } + + diff --git a/sdks/rust/src/models/cloud_universal_region.rs b/sdks/rust/src/models/cloud_universal_region.rs index e52e11c6..354bc534 100644 --- a/sdks/rust/src/models/cloud_universal_region.rs +++ b/sdks/rust/src/models/cloud_universal_region.rs @@ -4,7 +4,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -13,101 +13,106 @@ /// **Deprecated** #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum CloudUniversalRegion { - #[serde(rename = "unknown")] - Unknown, - #[serde(rename = "local")] - Local, - #[serde(rename = "amsterdam")] - Amsterdam, - #[serde(rename = "atlanta")] - Atlanta, - #[serde(rename = "bangalore")] - Bangalore, - #[serde(rename = "dallas")] - Dallas, - #[serde(rename = "frankfurt")] - Frankfurt, - #[serde(rename = "london")] - London, - #[serde(rename = "mumbai")] - Mumbai, - #[serde(rename = "newark")] - Newark, - #[serde(rename = "new_york_city")] - NewYorkCity, - #[serde(rename = "san_francisco")] - SanFrancisco, - #[serde(rename = "singapore")] - Singapore, - #[serde(rename = "sydney")] - Sydney, - #[serde(rename = "tokyo")] - Tokyo, - #[serde(rename = "toronto")] - Toronto, - #[serde(rename = "washington_dc")] - WashingtonDc, - #[serde(rename = "chicago")] - Chicago, - #[serde(rename = "paris")] - Paris, - #[serde(rename = "seattle")] - Seattle, - #[serde(rename = "sao_paulo")] - SaoPaulo, - #[serde(rename = "stockholm")] - Stockholm, - #[serde(rename = "chennai")] - Chennai, - #[serde(rename = "osaka")] - Osaka, - #[serde(rename = "milan")] - Milan, - #[serde(rename = "miami")] - Miami, - #[serde(rename = "jakarta")] - Jakarta, - #[serde(rename = "los_angeles")] - LosAngeles, + #[serde(rename = "unknown")] + Unknown, + #[serde(rename = "local")] + Local, + #[serde(rename = "amsterdam")] + Amsterdam, + #[serde(rename = "atlanta")] + Atlanta, + #[serde(rename = "bangalore")] + Bangalore, + #[serde(rename = "dallas")] + Dallas, + #[serde(rename = "frankfurt")] + Frankfurt, + #[serde(rename = "london")] + London, + #[serde(rename = "mumbai")] + Mumbai, + #[serde(rename = "newark")] + Newark, + #[serde(rename = "new_york_city")] + NewYorkCity, + #[serde(rename = "san_francisco")] + SanFrancisco, + #[serde(rename = "singapore")] + Singapore, + #[serde(rename = "sydney")] + Sydney, + #[serde(rename = "tokyo")] + Tokyo, + #[serde(rename = "toronto")] + Toronto, + #[serde(rename = "washington_dc")] + WashingtonDc, + #[serde(rename = "chicago")] + Chicago, + #[serde(rename = "paris")] + Paris, + #[serde(rename = "seattle")] + Seattle, + #[serde(rename = "sao_paulo")] + SaoPaulo, + #[serde(rename = "stockholm")] + Stockholm, + #[serde(rename = "chennai")] + Chennai, + #[serde(rename = "osaka")] + Osaka, + #[serde(rename = "milan")] + Milan, + #[serde(rename = "miami")] + Miami, + #[serde(rename = "jakarta")] + Jakarta, + #[serde(rename = "los_angeles")] + LosAngeles, + } impl ToString for CloudUniversalRegion { - fn to_string(&self) -> String { - match self { - Self::Unknown => String::from("unknown"), - Self::Local => String::from("local"), - Self::Amsterdam => String::from("amsterdam"), - Self::Atlanta => String::from("atlanta"), - Self::Bangalore => String::from("bangalore"), - Self::Dallas => String::from("dallas"), - Self::Frankfurt => String::from("frankfurt"), - Self::London => String::from("london"), - Self::Mumbai => String::from("mumbai"), - Self::Newark => String::from("newark"), - Self::NewYorkCity => String::from("new_york_city"), - Self::SanFrancisco => String::from("san_francisco"), - Self::Singapore => String::from("singapore"), - Self::Sydney => String::from("sydney"), - Self::Tokyo => String::from("tokyo"), - Self::Toronto => String::from("toronto"), - Self::WashingtonDc => String::from("washington_dc"), - Self::Chicago => String::from("chicago"), - Self::Paris => String::from("paris"), - Self::Seattle => String::from("seattle"), - Self::SaoPaulo => String::from("sao_paulo"), - Self::Stockholm => String::from("stockholm"), - Self::Chennai => String::from("chennai"), - Self::Osaka => String::from("osaka"), - Self::Milan => String::from("milan"), - Self::Miami => String::from("miami"), - Self::Jakarta => String::from("jakarta"), - Self::LosAngeles => String::from("los_angeles"), - } - } + fn to_string(&self) -> String { + match self { + Self::Unknown => String::from("unknown"), + Self::Local => String::from("local"), + Self::Amsterdam => String::from("amsterdam"), + Self::Atlanta => String::from("atlanta"), + Self::Bangalore => String::from("bangalore"), + Self::Dallas => String::from("dallas"), + Self::Frankfurt => String::from("frankfurt"), + Self::London => String::from("london"), + Self::Mumbai => String::from("mumbai"), + Self::Newark => String::from("newark"), + Self::NewYorkCity => String::from("new_york_city"), + Self::SanFrancisco => String::from("san_francisco"), + Self::Singapore => String::from("singapore"), + Self::Sydney => String::from("sydney"), + Self::Tokyo => String::from("tokyo"), + Self::Toronto => String::from("toronto"), + Self::WashingtonDc => String::from("washington_dc"), + Self::Chicago => String::from("chicago"), + Self::Paris => String::from("paris"), + Self::Seattle => String::from("seattle"), + Self::SaoPaulo => String::from("sao_paulo"), + Self::Stockholm => String::from("stockholm"), + Self::Chennai => String::from("chennai"), + Self::Osaka => String::from("osaka"), + Self::Milan => String::from("milan"), + Self::Miami => String::from("miami"), + Self::Jakarta => String::from("jakarta"), + Self::LosAngeles => String::from("los_angeles"), + } + } } impl Default for CloudUniversalRegion { - fn default() -> CloudUniversalRegion { - Self::Unknown - } + fn default() -> CloudUniversalRegion { + Self::Unknown + } } + + + + diff --git a/sdks/rust/src/models/cloud_validate_group_request.rs b/sdks/rust/src/models/cloud_validate_group_request.rs index 2f6128f9..5fb32221 100644 --- a/sdks/rust/src/models/cloud_validate_group_request.rs +++ b/sdks/rust/src/models/cloud_validate_group_request.rs @@ -4,19 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudValidateGroupRequest { - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, } impl CloudValidateGroupRequest { - pub fn new(display_name: String) -> CloudValidateGroupRequest { - CloudValidateGroupRequest { display_name } - } + pub fn new(display_name: String) -> CloudValidateGroupRequest { + CloudValidateGroupRequest { + display_name, + } + } } + + diff --git a/sdks/rust/src/models/cloud_validate_group_response.rs b/sdks/rust/src/models/cloud_validate_group_response.rs index 375be924..af990f66 100644 --- a/sdks/rust/src/models/cloud_validate_group_response.rs +++ b/sdks/rust/src/models/cloud_validate_group_response.rs @@ -4,19 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudValidateGroupResponse { - /// A list of validation errors. - #[serde(rename = "errors")] - pub errors: Vec, + /// A list of validation errors. + #[serde(rename = "errors")] + pub errors: Vec, } impl CloudValidateGroupResponse { - pub fn new(errors: Vec) -> CloudValidateGroupResponse { - CloudValidateGroupResponse { errors } - } + pub fn new(errors: Vec) -> CloudValidateGroupResponse { + CloudValidateGroupResponse { + errors, + } + } } + + diff --git a/sdks/rust/src/models/cloud_version_cdn_config.rs b/sdks/rust/src/models/cloud_version_cdn_config.rs index 1e704ad7..61e1266c 100644 --- a/sdks/rust/src/models/cloud_version_cdn_config.rs +++ b/sdks/rust/src/models/cloud_version_cdn_config.rs @@ -4,39 +4,43 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionCdnConfig : CDN configuration for a given version. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionCdnConfig { - /// _Configures Rivet CLI behavior. Has no effect on server behavior._ - #[serde(rename = "build_command", skip_serializing_if = "Option::is_none")] - pub build_command: Option, - /// _Configures Rivet CLI behavior. Has no effect on server behavior._ - #[serde(rename = "build_env", skip_serializing_if = "Option::is_none")] - pub build_env: Option<::std::collections::HashMap>, - /// _Configures Rivet CLI behavior. Has no effect on server behavior._ - #[serde(rename = "build_output", skip_serializing_if = "Option::is_none")] - pub build_output: Option, - /// Multiple CDN version routes. - #[serde(rename = "routes", skip_serializing_if = "Option::is_none")] - pub routes: Option>, - #[serde(rename = "site_id", skip_serializing_if = "Option::is_none")] - pub site_id: Option, + /// _Configures Rivet CLI behavior. Has no effect on server behavior._ + #[serde(rename = "build_command", skip_serializing_if = "Option::is_none")] + pub build_command: Option, + /// _Configures Rivet CLI behavior. Has no effect on server behavior._ + #[serde(rename = "build_env", skip_serializing_if = "Option::is_none")] + pub build_env: Option<::std::collections::HashMap>, + /// _Configures Rivet CLI behavior. Has no effect on server behavior._ + #[serde(rename = "build_output", skip_serializing_if = "Option::is_none")] + pub build_output: Option, + /// Multiple CDN version routes. + #[serde(rename = "routes", skip_serializing_if = "Option::is_none")] + pub routes: Option>, + #[serde(rename = "site_id", skip_serializing_if = "Option::is_none")] + pub site_id: Option, } impl CloudVersionCdnConfig { - /// CDN configuration for a given version. - pub fn new() -> CloudVersionCdnConfig { - CloudVersionCdnConfig { - build_command: None, - build_env: None, - build_output: None, - routes: None, - site_id: None, - } - } + /// CDN configuration for a given version. + pub fn new() -> CloudVersionCdnConfig { + CloudVersionCdnConfig { + build_command: None, + build_env: None, + build_output: None, + routes: None, + site_id: None, + } + } } + + diff --git a/sdks/rust/src/models/cloud_version_cdn_custom_headers_middleware.rs b/sdks/rust/src/models/cloud_version_cdn_custom_headers_middleware.rs index e79224c4..56eab593 100644 --- a/sdks/rust/src/models/cloud_version_cdn_custom_headers_middleware.rs +++ b/sdks/rust/src/models/cloud_version_cdn_custom_headers_middleware.rs @@ -4,20 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionCdnCustomHeadersMiddleware { - #[serde(rename = "headers")] - pub headers: Vec, + #[serde(rename = "headers")] + pub headers: Vec, } impl CloudVersionCdnCustomHeadersMiddleware { - pub fn new( - headers: Vec, - ) -> CloudVersionCdnCustomHeadersMiddleware { - CloudVersionCdnCustomHeadersMiddleware { headers } - } + pub fn new(headers: Vec) -> CloudVersionCdnCustomHeadersMiddleware { + CloudVersionCdnCustomHeadersMiddleware { + headers, + } + } } + + diff --git a/sdks/rust/src/models/cloud_version_cdn_header.rs b/sdks/rust/src/models/cloud_version_cdn_header.rs index 2aafae97..e17ca754 100644 --- a/sdks/rust/src/models/cloud_version_cdn_header.rs +++ b/sdks/rust/src/models/cloud_version_cdn_header.rs @@ -4,20 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionCdnHeader { - #[serde(rename = "name")] - pub name: String, - #[serde(rename = "value")] - pub value: String, + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "value")] + pub value: String, } impl CloudVersionCdnHeader { - pub fn new(name: String, value: String) -> CloudVersionCdnHeader { - CloudVersionCdnHeader { name, value } - } + pub fn new(name: String, value: String) -> CloudVersionCdnHeader { + CloudVersionCdnHeader { + name, + value, + } + } } + + diff --git a/sdks/rust/src/models/cloud_version_cdn_middleware.rs b/sdks/rust/src/models/cloud_version_cdn_middleware.rs index 4f72c000..c720d45e 100644 --- a/sdks/rust/src/models/cloud_version_cdn_middleware.rs +++ b/sdks/rust/src/models/cloud_version_cdn_middleware.rs @@ -4,20 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionCdnMiddleware { - #[serde(rename = "kind")] - pub kind: Box, + #[serde(rename = "kind")] + pub kind: Box, } impl CloudVersionCdnMiddleware { - pub fn new(kind: crate::models::CloudVersionCdnMiddlewareKind) -> CloudVersionCdnMiddleware { - CloudVersionCdnMiddleware { - kind: Box::new(kind), - } - } + pub fn new(kind: crate::models::CloudVersionCdnMiddlewareKind) -> CloudVersionCdnMiddleware { + CloudVersionCdnMiddleware { + kind: Box::new(kind), + } + } } + + diff --git a/sdks/rust/src/models/cloud_version_cdn_middleware_kind.rs b/sdks/rust/src/models/cloud_version_cdn_middleware_kind.rs index 89646137..18f2e270 100644 --- a/sdks/rust/src/models/cloud_version_cdn_middleware_kind.rs +++ b/sdks/rust/src/models/cloud_version_cdn_middleware_kind.rs @@ -4,20 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionCdnMiddlewareKind { - #[serde(rename = "custom_headers", skip_serializing_if = "Option::is_none")] - pub custom_headers: Option>, + #[serde(rename = "custom_headers", skip_serializing_if = "Option::is_none")] + pub custom_headers: Option>, } impl CloudVersionCdnMiddlewareKind { - pub fn new() -> CloudVersionCdnMiddlewareKind { - CloudVersionCdnMiddlewareKind { - custom_headers: None, - } - } + pub fn new() -> CloudVersionCdnMiddlewareKind { + CloudVersionCdnMiddlewareKind { + custom_headers: None, + } + } } + + diff --git a/sdks/rust/src/models/cloud_version_cdn_route.rs b/sdks/rust/src/models/cloud_version_cdn_route.rs index 149edd91..615146cd 100644 --- a/sdks/rust/src/models/cloud_version_cdn_route.rs +++ b/sdks/rust/src/models/cloud_version_cdn_route.rs @@ -4,32 +4,33 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionCdnRoute { - #[serde(rename = "glob")] - pub glob: String, - /// Multiple CDN version middleware. - #[serde(rename = "middlewares")] - pub middlewares: Vec, - /// Unsigned 32 bit integer. - #[serde(rename = "priority")] - pub priority: i32, + #[serde(rename = "glob")] + pub glob: String, + /// Multiple CDN version middleware. + #[serde(rename = "middlewares")] + pub middlewares: Vec, + /// Unsigned 32 bit integer. + #[serde(rename = "priority")] + pub priority: i32, } impl CloudVersionCdnRoute { - pub fn new( - glob: String, - middlewares: Vec, - priority: i32, - ) -> CloudVersionCdnRoute { - CloudVersionCdnRoute { - glob, - middlewares, - priority, - } - } + pub fn new(glob: String, middlewares: Vec, priority: i32) -> CloudVersionCdnRoute { + CloudVersionCdnRoute { + glob, + middlewares, + priority, + } + } } + + diff --git a/sdks/rust/src/models/cloud_version_config.rs b/sdks/rust/src/models/cloud_version_config.rs index 8a99dc62..251f902e 100644 --- a/sdks/rust/src/models/cloud_version_config.rs +++ b/sdks/rust/src/models/cloud_version_config.rs @@ -4,39 +4,43 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionConfig : Cloud configuration for a given version. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionConfig { - #[serde(rename = "cdn", skip_serializing_if = "Option::is_none")] - pub cdn: Option>, - #[serde(rename = "engine", skip_serializing_if = "Option::is_none")] - pub engine: Option>, - #[serde(rename = "identity", skip_serializing_if = "Option::is_none")] - pub identity: Option>, - /// KV configuration for a given version. - #[serde(rename = "kv", skip_serializing_if = "Option::is_none")] - pub kv: Option, - #[serde(rename = "matchmaker", skip_serializing_if = "Option::is_none")] - pub matchmaker: Option>, - #[serde(rename = "scripts", skip_serializing_if = "Option::is_none")] - pub scripts: Option<::std::collections::HashMap>, + #[serde(rename = "cdn", skip_serializing_if = "Option::is_none")] + pub cdn: Option>, + #[serde(rename = "engine", skip_serializing_if = "Option::is_none")] + pub engine: Option>, + #[serde(rename = "identity", skip_serializing_if = "Option::is_none")] + pub identity: Option>, + /// KV configuration for a given version. + #[serde(rename = "kv", skip_serializing_if = "Option::is_none")] + pub kv: Option, + #[serde(rename = "matchmaker", skip_serializing_if = "Option::is_none")] + pub matchmaker: Option>, + #[serde(rename = "scripts", skip_serializing_if = "Option::is_none")] + pub scripts: Option<::std::collections::HashMap>, } impl CloudVersionConfig { - /// Cloud configuration for a given version. - pub fn new() -> CloudVersionConfig { - CloudVersionConfig { - cdn: None, - engine: None, - identity: None, - kv: None, - matchmaker: None, - scripts: None, - } - } + /// Cloud configuration for a given version. + pub fn new() -> CloudVersionConfig { + CloudVersionConfig { + cdn: None, + engine: None, + identity: None, + kv: None, + matchmaker: None, + scripts: None, + } + } } + + diff --git a/sdks/rust/src/models/cloud_version_engine_config.rs b/sdks/rust/src/models/cloud_version_engine_config.rs index 866e8b7d..34a8cdfc 100644 --- a/sdks/rust/src/models/cloud_version_engine_config.rs +++ b/sdks/rust/src/models/cloud_version_engine_config.rs @@ -4,32 +4,37 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionEngineConfig { - #[serde(rename = "custom", skip_serializing_if = "Option::is_none")] - pub custom: Option, - #[serde(rename = "godot", skip_serializing_if = "Option::is_none")] - pub godot: Option, - #[serde(rename = "html5", skip_serializing_if = "Option::is_none")] - pub html5: Option, - #[serde(rename = "unity", skip_serializing_if = "Option::is_none")] - pub unity: Option, - #[serde(rename = "unreal", skip_serializing_if = "Option::is_none")] - pub unreal: Option>, + #[serde(rename = "custom", skip_serializing_if = "Option::is_none")] + pub custom: Option, + #[serde(rename = "godot", skip_serializing_if = "Option::is_none")] + pub godot: Option, + #[serde(rename = "html5", skip_serializing_if = "Option::is_none")] + pub html5: Option, + #[serde(rename = "unity", skip_serializing_if = "Option::is_none")] + pub unity: Option, + #[serde(rename = "unreal", skip_serializing_if = "Option::is_none")] + pub unreal: Option>, } impl CloudVersionEngineConfig { - pub fn new() -> CloudVersionEngineConfig { - CloudVersionEngineConfig { - custom: None, - godot: None, - html5: None, - unity: None, - unreal: None, - } - } + pub fn new() -> CloudVersionEngineConfig { + CloudVersionEngineConfig { + custom: None, + godot: None, + html5: None, + unity: None, + unreal: None, + } + } } + + diff --git a/sdks/rust/src/models/cloud_version_engine_unreal_config.rs b/sdks/rust/src/models/cloud_version_engine_unreal_config.rs index bb439f0b..cc120b77 100644 --- a/sdks/rust/src/models/cloud_version_engine_unreal_config.rs +++ b/sdks/rust/src/models/cloud_version_engine_unreal_config.rs @@ -4,19 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionEngineUnrealConfig { - /// Name of the Unreal module that holds the game code. This is usually the value of `$.Modules[0].Name` in the file `MyProject.unproject`. _Configures Rivet CLI behavior. Has no effect on server behavior._ - #[serde(rename = "game_module")] - pub game_module: String, + /// Name of the Unreal module that holds the game code. This is usually the value of `$.Modules[0].Name` in the file `MyProject.unproject`. _Configures Rivet CLI behavior. Has no effect on server behavior._ + #[serde(rename = "game_module")] + pub game_module: String, } impl CloudVersionEngineUnrealConfig { - pub fn new(game_module: String) -> CloudVersionEngineUnrealConfig { - CloudVersionEngineUnrealConfig { game_module } - } + pub fn new(game_module: String) -> CloudVersionEngineUnrealConfig { + CloudVersionEngineUnrealConfig { + game_module, + } + } } + + diff --git a/sdks/rust/src/models/cloud_version_full.rs b/sdks/rust/src/models/cloud_version_full.rs index 2df9ad1b..12846c98 100644 --- a/sdks/rust/src/models/cloud_version_full.rs +++ b/sdks/rust/src/models/cloud_version_full.rs @@ -4,39 +4,38 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionFull : A full version. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionFull { - #[serde(rename = "config")] - pub config: Box, - /// RFC3339 timestamp - #[serde(rename = "create_ts")] - pub create_ts: String, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "version_id")] - pub version_id: uuid::Uuid, + #[serde(rename = "config")] + pub config: Box, + /// RFC3339 timestamp + #[serde(rename = "create_ts")] + pub create_ts: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "version_id")] + pub version_id: uuid::Uuid, } impl CloudVersionFull { - /// A full version. - pub fn new( - config: crate::models::CloudVersionConfig, - create_ts: String, - display_name: String, - version_id: uuid::Uuid, - ) -> CloudVersionFull { - CloudVersionFull { - config: Box::new(config), - create_ts, - display_name, - version_id, - } - } + /// A full version. + pub fn new(config: crate::models::CloudVersionConfig, create_ts: String, display_name: String, version_id: uuid::Uuid) -> CloudVersionFull { + CloudVersionFull { + config: Box::new(config), + create_ts, + display_name, + version_id, + } + } } + + diff --git a/sdks/rust/src/models/cloud_version_identity_config.rs b/sdks/rust/src/models/cloud_version_identity_config.rs index 16f574ca..8fceb0e3 100644 --- a/sdks/rust/src/models/cloud_version_identity_config.rs +++ b/sdks/rust/src/models/cloud_version_identity_config.rs @@ -4,39 +4,40 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionIdentityConfig : **Deprecated** Identity configuration for a given version. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionIdentityConfig { - /// **Deprecated** - #[serde(rename = "avatars", skip_serializing_if = "Option::is_none")] - pub avatars: Option>, - /// **Deprecated** - #[serde(rename = "custom_avatars", skip_serializing_if = "Option::is_none")] - pub custom_avatars: Option>, - /// **Deprecated** - #[serde( - rename = "custom_display_names", - skip_serializing_if = "Option::is_none" - )] - pub custom_display_names: Option>, - /// **Deprecated** - #[serde(rename = "display_names", skip_serializing_if = "Option::is_none")] - pub display_names: Option>, + /// **Deprecated** + #[serde(rename = "avatars", skip_serializing_if = "Option::is_none")] + pub avatars: Option>, + /// **Deprecated** + #[serde(rename = "custom_avatars", skip_serializing_if = "Option::is_none")] + pub custom_avatars: Option>, + /// **Deprecated** + #[serde(rename = "custom_display_names", skip_serializing_if = "Option::is_none")] + pub custom_display_names: Option>, + /// **Deprecated** + #[serde(rename = "display_names", skip_serializing_if = "Option::is_none")] + pub display_names: Option>, } impl CloudVersionIdentityConfig { - /// **Deprecated** Identity configuration for a given version. - pub fn new() -> CloudVersionIdentityConfig { - CloudVersionIdentityConfig { - avatars: None, - custom_avatars: None, - custom_display_names: None, - display_names: None, - } - } + /// **Deprecated** Identity configuration for a given version. + pub fn new() -> CloudVersionIdentityConfig { + CloudVersionIdentityConfig { + avatars: None, + custom_avatars: None, + custom_display_names: None, + display_names: None, + } + } } + + diff --git a/sdks/rust/src/models/cloud_version_identity_custom_avatar.rs b/sdks/rust/src/models/cloud_version_identity_custom_avatar.rs index 88a76ee7..5b206ab5 100644 --- a/sdks/rust/src/models/cloud_version_identity_custom_avatar.rs +++ b/sdks/rust/src/models/cloud_version_identity_custom_avatar.rs @@ -4,18 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionIdentityCustomAvatar { - #[serde(rename = "upload_id")] - pub upload_id: uuid::Uuid, + #[serde(rename = "upload_id")] + pub upload_id: uuid::Uuid, } impl CloudVersionIdentityCustomAvatar { - pub fn new(upload_id: uuid::Uuid) -> CloudVersionIdentityCustomAvatar { - CloudVersionIdentityCustomAvatar { upload_id } - } + pub fn new(upload_id: uuid::Uuid) -> CloudVersionIdentityCustomAvatar { + CloudVersionIdentityCustomAvatar { + upload_id, + } + } } + + diff --git a/sdks/rust/src/models/cloud_version_identity_custom_display_name.rs b/sdks/rust/src/models/cloud_version_identity_custom_display_name.rs index aa42c95d..a650f57a 100644 --- a/sdks/rust/src/models/cloud_version_identity_custom_display_name.rs +++ b/sdks/rust/src/models/cloud_version_identity_custom_display_name.rs @@ -4,19 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionIdentityCustomDisplayName { - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, } impl CloudVersionIdentityCustomDisplayName { - pub fn new(display_name: String) -> CloudVersionIdentityCustomDisplayName { - CloudVersionIdentityCustomDisplayName { display_name } - } + pub fn new(display_name: String) -> CloudVersionIdentityCustomDisplayName { + CloudVersionIdentityCustomDisplayName { + display_name, + } + } } + + diff --git a/sdks/rust/src/models/cloud_version_matchmaker_captcha.rs b/sdks/rust/src/models/cloud_version_matchmaker_captcha.rs index 511a1722..79e39a92 100644 --- a/sdks/rust/src/models/cloud_version_matchmaker_captcha.rs +++ b/sdks/rust/src/models/cloud_version_matchmaker_captcha.rs @@ -4,37 +4,38 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerCaptcha : Matchmaker captcha configuration. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerCaptcha { - #[serde(rename = "hcaptcha", skip_serializing_if = "Option::is_none")] - pub hcaptcha: Option>, - /// Denotes how many requests a connection can make before it is required to reverify a captcha. - #[serde(rename = "requests_before_reverify")] - pub requests_before_reverify: i32, - #[serde(rename = "turnstile", skip_serializing_if = "Option::is_none")] - pub turnstile: Option>, - /// Denotes how long a connection can continue to reconnect without having to reverify a captcha (in milliseconds). - #[serde(rename = "verification_ttl")] - pub verification_ttl: i64, + #[serde(rename = "hcaptcha", skip_serializing_if = "Option::is_none")] + pub hcaptcha: Option>, + /// Denotes how many requests a connection can make before it is required to reverify a captcha. + #[serde(rename = "requests_before_reverify")] + pub requests_before_reverify: i32, + #[serde(rename = "turnstile", skip_serializing_if = "Option::is_none")] + pub turnstile: Option>, + /// Denotes how long a connection can continue to reconnect without having to reverify a captcha (in milliseconds). + #[serde(rename = "verification_ttl")] + pub verification_ttl: i64, } impl CloudVersionMatchmakerCaptcha { - /// Matchmaker captcha configuration. - pub fn new( - requests_before_reverify: i32, - verification_ttl: i64, - ) -> CloudVersionMatchmakerCaptcha { - CloudVersionMatchmakerCaptcha { - hcaptcha: None, - requests_before_reverify, - turnstile: None, - verification_ttl, - } - } + /// Matchmaker captcha configuration. + pub fn new(requests_before_reverify: i32, verification_ttl: i64) -> CloudVersionMatchmakerCaptcha { + CloudVersionMatchmakerCaptcha { + hcaptcha: None, + requests_before_reverify, + turnstile: None, + verification_ttl, + } + } } + + diff --git a/sdks/rust/src/models/cloud_version_matchmaker_captcha_hcaptcha.rs b/sdks/rust/src/models/cloud_version_matchmaker_captcha_hcaptcha.rs index eff4045a..c42ff671 100644 --- a/sdks/rust/src/models/cloud_version_matchmaker_captcha_hcaptcha.rs +++ b/sdks/rust/src/models/cloud_version_matchmaker_captcha_hcaptcha.rs @@ -4,31 +4,35 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerCaptchaHcaptcha : hCpatcha configuration. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerCaptchaHcaptcha { - #[serde(rename = "level", skip_serializing_if = "Option::is_none")] - pub level: Option, - /// Secret key for your hCaptcha application. Must be set. - #[serde(rename = "secret_key", skip_serializing_if = "Option::is_none")] - pub secret_key: Option, - /// Site key for your hCaptcha application. Must be set. - #[serde(rename = "site_key", skip_serializing_if = "Option::is_none")] - pub site_key: Option, + #[serde(rename = "level", skip_serializing_if = "Option::is_none")] + pub level: Option, + /// Secret key for your hCaptcha application. Must be set. + #[serde(rename = "secret_key", skip_serializing_if = "Option::is_none")] + pub secret_key: Option, + /// Site key for your hCaptcha application. Must be set. + #[serde(rename = "site_key", skip_serializing_if = "Option::is_none")] + pub site_key: Option, } impl CloudVersionMatchmakerCaptchaHcaptcha { - /// hCpatcha configuration. - pub fn new() -> CloudVersionMatchmakerCaptchaHcaptcha { - CloudVersionMatchmakerCaptchaHcaptcha { - level: None, - secret_key: None, - site_key: None, - } - } + /// hCpatcha configuration. + pub fn new() -> CloudVersionMatchmakerCaptchaHcaptcha { + CloudVersionMatchmakerCaptchaHcaptcha { + level: None, + secret_key: None, + site_key: None, + } + } } + + diff --git a/sdks/rust/src/models/cloud_version_matchmaker_captcha_hcaptcha_level.rs b/sdks/rust/src/models/cloud_version_matchmaker_captcha_hcaptcha_level.rs index 8c188ec9..8c10e028 100644 --- a/sdks/rust/src/models/cloud_version_matchmaker_captcha_hcaptcha_level.rs +++ b/sdks/rust/src/models/cloud_version_matchmaker_captcha_hcaptcha_level.rs @@ -4,7 +4,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -13,29 +13,34 @@ /// **Deprecated** How hard a captcha should be. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum CloudVersionMatchmakerCaptchaHcaptchaLevel { - #[serde(rename = "easy")] - Easy, - #[serde(rename = "moderate")] - Moderate, - #[serde(rename = "difficult")] - Difficult, - #[serde(rename = "always_on")] - AlwaysOn, + #[serde(rename = "easy")] + Easy, + #[serde(rename = "moderate")] + Moderate, + #[serde(rename = "difficult")] + Difficult, + #[serde(rename = "always_on")] + AlwaysOn, + } impl ToString for CloudVersionMatchmakerCaptchaHcaptchaLevel { - fn to_string(&self) -> String { - match self { - Self::Easy => String::from("easy"), - Self::Moderate => String::from("moderate"), - Self::Difficult => String::from("difficult"), - Self::AlwaysOn => String::from("always_on"), - } - } + fn to_string(&self) -> String { + match self { + Self::Easy => String::from("easy"), + Self::Moderate => String::from("moderate"), + Self::Difficult => String::from("difficult"), + Self::AlwaysOn => String::from("always_on"), + } + } } impl Default for CloudVersionMatchmakerCaptchaHcaptchaLevel { - fn default() -> CloudVersionMatchmakerCaptchaHcaptchaLevel { - Self::Easy - } + fn default() -> CloudVersionMatchmakerCaptchaHcaptchaLevel { + Self::Easy + } } + + + + diff --git a/sdks/rust/src/models/cloud_version_matchmaker_captcha_turnstile.rs b/sdks/rust/src/models/cloud_version_matchmaker_captcha_turnstile.rs index 01b00402..0321f704 100644 --- a/sdks/rust/src/models/cloud_version_matchmaker_captcha_turnstile.rs +++ b/sdks/rust/src/models/cloud_version_matchmaker_captcha_turnstile.rs @@ -4,26 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerCaptchaTurnstile : Turnstile captcha configuration. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerCaptchaTurnstile { - #[serde(rename = "secret_key")] - pub secret_key: String, - #[serde(rename = "site_key")] - pub site_key: String, + #[serde(rename = "secret_key")] + pub secret_key: String, + #[serde(rename = "site_key")] + pub site_key: String, } impl CloudVersionMatchmakerCaptchaTurnstile { - /// Turnstile captcha configuration. - pub fn new(secret_key: String, site_key: String) -> CloudVersionMatchmakerCaptchaTurnstile { - CloudVersionMatchmakerCaptchaTurnstile { - secret_key, - site_key, - } - } + /// Turnstile captcha configuration. + pub fn new(secret_key: String, site_key: String) -> CloudVersionMatchmakerCaptchaTurnstile { + CloudVersionMatchmakerCaptchaTurnstile { + secret_key, + site_key, + } + } } + + diff --git a/sdks/rust/src/models/cloud_version_matchmaker_config.rs b/sdks/rust/src/models/cloud_version_matchmaker_config.rs index a3a8fbe9..7a9ce6d2 100644 --- a/sdks/rust/src/models/cloud_version_matchmaker_config.rs +++ b/sdks/rust/src/models/cloud_version_matchmaker_config.rs @@ -4,59 +4,60 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerConfig : Matchmaker configuration for a given version. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerConfig { - #[serde(rename = "captcha", skip_serializing_if = "Option::is_none")] - pub captcha: Option>, - /// _Configures Rivet CLI behavior. Has no effect on server behavior._ - #[serde(rename = "dev_hostname", skip_serializing_if = "Option::is_none")] - pub dev_hostname: Option, - #[serde(rename = "docker", skip_serializing_if = "Option::is_none")] - pub docker: Option>, - /// A list of game modes. - #[serde(rename = "game_modes", skip_serializing_if = "Option::is_none")] - pub game_modes: - Option<::std::collections::HashMap>, - #[serde(rename = "idle_lobbies", skip_serializing_if = "Option::is_none")] - pub idle_lobbies: Option>, - /// **Deprecated: use `game_modes` instead** A list of game modes. - #[serde(rename = "lobby_groups", skip_serializing_if = "Option::is_none")] - pub lobby_groups: Option>, - #[serde(rename = "max_players", skip_serializing_if = "Option::is_none")] - pub max_players: Option, - #[serde(rename = "max_players_direct", skip_serializing_if = "Option::is_none")] - pub max_players_direct: Option, - #[serde(rename = "max_players_party", skip_serializing_if = "Option::is_none")] - pub max_players_party: Option, - #[serde(rename = "regions", skip_serializing_if = "Option::is_none")] - pub regions: Option< - ::std::collections::HashMap, - >, - #[serde(rename = "tier", skip_serializing_if = "Option::is_none")] - pub tier: Option, + #[serde(rename = "captcha", skip_serializing_if = "Option::is_none")] + pub captcha: Option>, + /// _Configures Rivet CLI behavior. Has no effect on server behavior._ + #[serde(rename = "dev_hostname", skip_serializing_if = "Option::is_none")] + pub dev_hostname: Option, + #[serde(rename = "docker", skip_serializing_if = "Option::is_none")] + pub docker: Option>, + /// A list of game modes. + #[serde(rename = "game_modes", skip_serializing_if = "Option::is_none")] + pub game_modes: Option<::std::collections::HashMap>, + #[serde(rename = "idle_lobbies", skip_serializing_if = "Option::is_none")] + pub idle_lobbies: Option>, + /// **Deprecated: use `game_modes` instead** A list of game modes. + #[serde(rename = "lobby_groups", skip_serializing_if = "Option::is_none")] + pub lobby_groups: Option>, + #[serde(rename = "max_players", skip_serializing_if = "Option::is_none")] + pub max_players: Option, + #[serde(rename = "max_players_direct", skip_serializing_if = "Option::is_none")] + pub max_players_direct: Option, + #[serde(rename = "max_players_party", skip_serializing_if = "Option::is_none")] + pub max_players_party: Option, + #[serde(rename = "regions", skip_serializing_if = "Option::is_none")] + pub regions: Option<::std::collections::HashMap>, + #[serde(rename = "tier", skip_serializing_if = "Option::is_none")] + pub tier: Option, } impl CloudVersionMatchmakerConfig { - /// Matchmaker configuration for a given version. - pub fn new() -> CloudVersionMatchmakerConfig { - CloudVersionMatchmakerConfig { - captcha: None, - dev_hostname: None, - docker: None, - game_modes: None, - idle_lobbies: None, - lobby_groups: None, - max_players: None, - max_players_direct: None, - max_players_party: None, - regions: None, - tier: None, - } - } + /// Matchmaker configuration for a given version. + pub fn new() -> CloudVersionMatchmakerConfig { + CloudVersionMatchmakerConfig { + captcha: None, + dev_hostname: None, + docker: None, + game_modes: None, + idle_lobbies: None, + lobby_groups: None, + max_players: None, + max_players_direct: None, + max_players_party: None, + regions: None, + tier: None, + } + } } + + diff --git a/sdks/rust/src/models/cloud_version_matchmaker_game_mode.rs b/sdks/rust/src/models/cloud_version_matchmaker_game_mode.rs index 61ff7aab..5bb11ed8 100644 --- a/sdks/rust/src/models/cloud_version_matchmaker_game_mode.rs +++ b/sdks/rust/src/models/cloud_version_matchmaker_game_mode.rs @@ -4,58 +4,57 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerGameMode : A game mode. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerGameMode { - #[serde(rename = "actions", skip_serializing_if = "Option::is_none")] - pub actions: Option>, - #[serde( - rename = "allow_dynamic_max_players", - skip_serializing_if = "Option::is_none" - )] - pub allow_dynamic_max_players: Option, - #[serde(rename = "docker", skip_serializing_if = "Option::is_none")] - pub docker: Option>, - #[serde(rename = "idle_lobbies", skip_serializing_if = "Option::is_none")] - pub idle_lobbies: Option>, - #[serde(rename = "listable", skip_serializing_if = "Option::is_none")] - pub listable: Option, - #[serde(rename = "max_players", skip_serializing_if = "Option::is_none")] - pub max_players: Option, - #[serde(rename = "max_players_direct", skip_serializing_if = "Option::is_none")] - pub max_players_direct: Option, - #[serde(rename = "max_players_party", skip_serializing_if = "Option::is_none")] - pub max_players_party: Option, - #[serde(rename = "regions", skip_serializing_if = "Option::is_none")] - pub regions: Option< - ::std::collections::HashMap, - >, - #[serde(rename = "taggable", skip_serializing_if = "Option::is_none")] - pub taggable: Option, - #[serde(rename = "tier", skip_serializing_if = "Option::is_none")] - pub tier: Option, + #[serde(rename = "actions", skip_serializing_if = "Option::is_none")] + pub actions: Option>, + #[serde(rename = "allow_dynamic_max_players", skip_serializing_if = "Option::is_none")] + pub allow_dynamic_max_players: Option, + #[serde(rename = "docker", skip_serializing_if = "Option::is_none")] + pub docker: Option>, + #[serde(rename = "idle_lobbies", skip_serializing_if = "Option::is_none")] + pub idle_lobbies: Option>, + #[serde(rename = "listable", skip_serializing_if = "Option::is_none")] + pub listable: Option, + #[serde(rename = "max_players", skip_serializing_if = "Option::is_none")] + pub max_players: Option, + #[serde(rename = "max_players_direct", skip_serializing_if = "Option::is_none")] + pub max_players_direct: Option, + #[serde(rename = "max_players_party", skip_serializing_if = "Option::is_none")] + pub max_players_party: Option, + #[serde(rename = "regions", skip_serializing_if = "Option::is_none")] + pub regions: Option<::std::collections::HashMap>, + #[serde(rename = "taggable", skip_serializing_if = "Option::is_none")] + pub taggable: Option, + #[serde(rename = "tier", skip_serializing_if = "Option::is_none")] + pub tier: Option, } impl CloudVersionMatchmakerGameMode { - /// A game mode. - pub fn new() -> CloudVersionMatchmakerGameMode { - CloudVersionMatchmakerGameMode { - actions: None, - allow_dynamic_max_players: None, - docker: None, - idle_lobbies: None, - listable: None, - max_players: None, - max_players_direct: None, - max_players_party: None, - regions: None, - taggable: None, - tier: None, - } - } + /// A game mode. + pub fn new() -> CloudVersionMatchmakerGameMode { + CloudVersionMatchmakerGameMode { + actions: None, + allow_dynamic_max_players: None, + docker: None, + idle_lobbies: None, + listable: None, + max_players: None, + max_players_direct: None, + max_players_party: None, + regions: None, + taggable: None, + tier: None, + } + } } + + diff --git a/sdks/rust/src/models/cloud_version_matchmaker_game_mode_actions.rs b/sdks/rust/src/models/cloud_version_matchmaker_game_mode_actions.rs index e433eb7b..d6b3d196 100644 --- a/sdks/rust/src/models/cloud_version_matchmaker_game_mode_actions.rs +++ b/sdks/rust/src/models/cloud_version_matchmaker_game_mode_actions.rs @@ -4,29 +4,33 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerGameModeActions : Configuration for the connection types allowed for a game mode. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerGameModeActions { - #[serde(rename = "create", skip_serializing_if = "Option::is_none")] - pub create: Option>, - #[serde(rename = "find", skip_serializing_if = "Option::is_none")] - pub find: Option>, - #[serde(rename = "join", skip_serializing_if = "Option::is_none")] - pub join: Option>, + #[serde(rename = "create", skip_serializing_if = "Option::is_none")] + pub create: Option>, + #[serde(rename = "find", skip_serializing_if = "Option::is_none")] + pub find: Option>, + #[serde(rename = "join", skip_serializing_if = "Option::is_none")] + pub join: Option>, } impl CloudVersionMatchmakerGameModeActions { - /// Configuration for the connection types allowed for a game mode. - pub fn new() -> CloudVersionMatchmakerGameModeActions { - CloudVersionMatchmakerGameModeActions { - create: None, - find: None, - join: None, - } - } + /// Configuration for the connection types allowed for a game mode. + pub fn new() -> CloudVersionMatchmakerGameModeActions { + CloudVersionMatchmakerGameModeActions { + create: None, + find: None, + join: None, + } + } } + + diff --git a/sdks/rust/src/models/cloud_version_matchmaker_game_mode_create_config.rs b/sdks/rust/src/models/cloud_version_matchmaker_game_mode_create_config.rs index 05da7037..acf151cb 100644 --- a/sdks/rust/src/models/cloud_version_matchmaker_game_mode_create_config.rs +++ b/sdks/rust/src/models/cloud_version_matchmaker_game_mode_create_config.rs @@ -4,49 +4,46 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerGameModeCreateConfig : Configures the requirements and authentication for the /create endpoint. If this value is not set in the config, the /create endpoint is NOT enabled. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerGameModeCreateConfig { - /// Defaults to true when unset. - #[serde(rename = "enable_private", skip_serializing_if = "Option::is_none")] - pub enable_private: Option, - /// Defaults to false when unset. - #[serde(rename = "enable_public", skip_serializing_if = "Option::is_none")] - pub enable_public: Option, - /// Sets whether or not the /create endpoint is enabled. - #[serde(rename = "enabled")] - pub enabled: bool, - #[serde( - rename = "identity_requirement", - skip_serializing_if = "Option::is_none" - )] - pub identity_requirement: - Option, - /// **Deprecated** - #[serde( - rename = "max_lobbies_per_identity", - skip_serializing_if = "Option::is_none" - )] - pub max_lobbies_per_identity: Option, - #[serde(rename = "verification", skip_serializing_if = "Option::is_none")] - pub verification: Option>, + /// Defaults to true when unset. + #[serde(rename = "enable_private", skip_serializing_if = "Option::is_none")] + pub enable_private: Option, + /// Defaults to false when unset. + #[serde(rename = "enable_public", skip_serializing_if = "Option::is_none")] + pub enable_public: Option, + /// Sets whether or not the /create endpoint is enabled. + #[serde(rename = "enabled")] + pub enabled: bool, + #[serde(rename = "identity_requirement", skip_serializing_if = "Option::is_none")] + pub identity_requirement: Option, + /// **Deprecated** + #[serde(rename = "max_lobbies_per_identity", skip_serializing_if = "Option::is_none")] + pub max_lobbies_per_identity: Option, + #[serde(rename = "verification", skip_serializing_if = "Option::is_none")] + pub verification: Option>, } impl CloudVersionMatchmakerGameModeCreateConfig { - /// Configures the requirements and authentication for the /create endpoint. If this value is not set in the config, the /create endpoint is NOT enabled. - pub fn new(enabled: bool) -> CloudVersionMatchmakerGameModeCreateConfig { - CloudVersionMatchmakerGameModeCreateConfig { - enable_private: None, - enable_public: None, - enabled, - identity_requirement: None, - max_lobbies_per_identity: None, - verification: None, - } - } + /// Configures the requirements and authentication for the /create endpoint. If this value is not set in the config, the /create endpoint is NOT enabled. + pub fn new(enabled: bool) -> CloudVersionMatchmakerGameModeCreateConfig { + CloudVersionMatchmakerGameModeCreateConfig { + enable_private: None, + enable_public: None, + enabled, + identity_requirement: None, + max_lobbies_per_identity: None, + verification: None, + } + } } + + diff --git a/sdks/rust/src/models/cloud_version_matchmaker_game_mode_find_config.rs b/sdks/rust/src/models/cloud_version_matchmaker_game_mode_find_config.rs index 80bc5ddd..64d51693 100644 --- a/sdks/rust/src/models/cloud_version_matchmaker_game_mode_find_config.rs +++ b/sdks/rust/src/models/cloud_version_matchmaker_game_mode_find_config.rs @@ -4,34 +4,34 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerGameModeFindConfig : Configures the requirements and authentication for the /find endpoint. If this value is not set in the config, the /find endpoint is still enabled. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerGameModeFindConfig { - /// Sets whether or not the /find endpoint is enabled. - #[serde(rename = "enabled")] - pub enabled: bool, - #[serde( - rename = "identity_requirement", - skip_serializing_if = "Option::is_none" - )] - pub identity_requirement: - Option, - #[serde(rename = "verification", skip_serializing_if = "Option::is_none")] - pub verification: Option>, + /// Sets whether or not the /find endpoint is enabled. + #[serde(rename = "enabled")] + pub enabled: bool, + #[serde(rename = "identity_requirement", skip_serializing_if = "Option::is_none")] + pub identity_requirement: Option, + #[serde(rename = "verification", skip_serializing_if = "Option::is_none")] + pub verification: Option>, } impl CloudVersionMatchmakerGameModeFindConfig { - /// Configures the requirements and authentication for the /find endpoint. If this value is not set in the config, the /find endpoint is still enabled. - pub fn new(enabled: bool) -> CloudVersionMatchmakerGameModeFindConfig { - CloudVersionMatchmakerGameModeFindConfig { - enabled, - identity_requirement: None, - verification: None, - } - } + /// Configures the requirements and authentication for the /find endpoint. If this value is not set in the config, the /find endpoint is still enabled. + pub fn new(enabled: bool) -> CloudVersionMatchmakerGameModeFindConfig { + CloudVersionMatchmakerGameModeFindConfig { + enabled, + identity_requirement: None, + verification: None, + } + } } + + diff --git a/sdks/rust/src/models/cloud_version_matchmaker_game_mode_identity_requirement.rs b/sdks/rust/src/models/cloud_version_matchmaker_game_mode_identity_requirement.rs index 39d54256..4732bf73 100644 --- a/sdks/rust/src/models/cloud_version_matchmaker_game_mode_identity_requirement.rs +++ b/sdks/rust/src/models/cloud_version_matchmaker_game_mode_identity_requirement.rs @@ -4,7 +4,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -13,26 +13,31 @@ /// **Deprecated** The registration requirement for a user when joining/finding/creating a lobby. \"None\" allows for connections without an identity. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum CloudVersionMatchmakerGameModeIdentityRequirement { - #[serde(rename = "none")] - None, - #[serde(rename = "guest")] - Guest, - #[serde(rename = "registered")] - Registered, + #[serde(rename = "none")] + None, + #[serde(rename = "guest")] + Guest, + #[serde(rename = "registered")] + Registered, + } impl ToString for CloudVersionMatchmakerGameModeIdentityRequirement { - fn to_string(&self) -> String { - match self { - Self::None => String::from("none"), - Self::Guest => String::from("guest"), - Self::Registered => String::from("registered"), - } - } + fn to_string(&self) -> String { + match self { + Self::None => String::from("none"), + Self::Guest => String::from("guest"), + Self::Registered => String::from("registered"), + } + } } impl Default for CloudVersionMatchmakerGameModeIdentityRequirement { - fn default() -> CloudVersionMatchmakerGameModeIdentityRequirement { - Self::None - } + fn default() -> CloudVersionMatchmakerGameModeIdentityRequirement { + Self::None + } } + + + + diff --git a/sdks/rust/src/models/cloud_version_matchmaker_game_mode_idle_lobbies_config.rs b/sdks/rust/src/models/cloud_version_matchmaker_game_mode_idle_lobbies_config.rs index e388cfcd..e649c315 100644 --- a/sdks/rust/src/models/cloud_version_matchmaker_game_mode_idle_lobbies_config.rs +++ b/sdks/rust/src/models/cloud_version_matchmaker_game_mode_idle_lobbies_config.rs @@ -4,23 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerGameModeIdleLobbiesConfig : Configuration for how many idle lobbies a game version should have. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerGameModeIdleLobbiesConfig { - #[serde(rename = "max")] - pub max: i32, - #[serde(rename = "min")] - pub min: i32, + #[serde(rename = "max")] + pub max: i32, + #[serde(rename = "min")] + pub min: i32, } impl CloudVersionMatchmakerGameModeIdleLobbiesConfig { - /// Configuration for how many idle lobbies a game version should have. - pub fn new(max: i32, min: i32) -> CloudVersionMatchmakerGameModeIdleLobbiesConfig { - CloudVersionMatchmakerGameModeIdleLobbiesConfig { max, min } - } + /// Configuration for how many idle lobbies a game version should have. + pub fn new(max: i32, min: i32) -> CloudVersionMatchmakerGameModeIdleLobbiesConfig { + CloudVersionMatchmakerGameModeIdleLobbiesConfig { + max, + min, + } + } } + + diff --git a/sdks/rust/src/models/cloud_version_matchmaker_game_mode_join_config.rs b/sdks/rust/src/models/cloud_version_matchmaker_game_mode_join_config.rs index 9728e378..83db3903 100644 --- a/sdks/rust/src/models/cloud_version_matchmaker_game_mode_join_config.rs +++ b/sdks/rust/src/models/cloud_version_matchmaker_game_mode_join_config.rs @@ -4,34 +4,34 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerGameModeJoinConfig : Configures the requirements and authentication for the /join endpoint. If this value is not set in the config, the /join endpoint is still enabled. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerGameModeJoinConfig { - /// Sets whether or not the /join endpoint is enabled. - #[serde(rename = "enabled")] - pub enabled: bool, - #[serde( - rename = "identity_requirement", - skip_serializing_if = "Option::is_none" - )] - pub identity_requirement: - Option, - #[serde(rename = "verification", skip_serializing_if = "Option::is_none")] - pub verification: Option>, + /// Sets whether or not the /join endpoint is enabled. + #[serde(rename = "enabled")] + pub enabled: bool, + #[serde(rename = "identity_requirement", skip_serializing_if = "Option::is_none")] + pub identity_requirement: Option, + #[serde(rename = "verification", skip_serializing_if = "Option::is_none")] + pub verification: Option>, } impl CloudVersionMatchmakerGameModeJoinConfig { - /// Configures the requirements and authentication for the /join endpoint. If this value is not set in the config, the /join endpoint is still enabled. - pub fn new(enabled: bool) -> CloudVersionMatchmakerGameModeJoinConfig { - CloudVersionMatchmakerGameModeJoinConfig { - enabled, - identity_requirement: None, - verification: None, - } - } + /// Configures the requirements and authentication for the /join endpoint. If this value is not set in the config, the /join endpoint is still enabled. + pub fn new(enabled: bool) -> CloudVersionMatchmakerGameModeJoinConfig { + CloudVersionMatchmakerGameModeJoinConfig { + enabled, + identity_requirement: None, + verification: None, + } + } } + + diff --git a/sdks/rust/src/models/cloud_version_matchmaker_game_mode_region.rs b/sdks/rust/src/models/cloud_version_matchmaker_game_mode_region.rs index 7774787c..1d9c748d 100644 --- a/sdks/rust/src/models/cloud_version_matchmaker_game_mode_region.rs +++ b/sdks/rust/src/models/cloud_version_matchmaker_game_mode_region.rs @@ -4,26 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerGameModeRegion : A game mode region. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerGameModeRegion { - #[serde(rename = "idle_lobbies", skip_serializing_if = "Option::is_none")] - pub idle_lobbies: Option>, - #[serde(rename = "tier", skip_serializing_if = "Option::is_none")] - pub tier: Option, + #[serde(rename = "idle_lobbies", skip_serializing_if = "Option::is_none")] + pub idle_lobbies: Option>, + #[serde(rename = "tier", skip_serializing_if = "Option::is_none")] + pub tier: Option, } impl CloudVersionMatchmakerGameModeRegion { - /// A game mode region. - pub fn new() -> CloudVersionMatchmakerGameModeRegion { - CloudVersionMatchmakerGameModeRegion { - idle_lobbies: None, - tier: None, - } - } + /// A game mode region. + pub fn new() -> CloudVersionMatchmakerGameModeRegion { + CloudVersionMatchmakerGameModeRegion { + idle_lobbies: None, + tier: None, + } + } } + + diff --git a/sdks/rust/src/models/cloud_version_matchmaker_game_mode_runtime_docker.rs b/sdks/rust/src/models/cloud_version_matchmaker_game_mode_runtime_docker.rs index d2526b9d..08fb0f24 100644 --- a/sdks/rust/src/models/cloud_version_matchmaker_game_mode_runtime_docker.rs +++ b/sdks/rust/src/models/cloud_version_matchmaker_game_mode_runtime_docker.rs @@ -4,52 +4,51 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerGameModeRuntimeDocker : A game mode runtime running through Docker. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerGameModeRuntimeDocker { - #[serde(rename = "args", skip_serializing_if = "Option::is_none")] - pub args: Option>, - /// _Configures Rivet CLI behavior. Has no effect on server behavior._ - #[serde(rename = "build_args", skip_serializing_if = "Option::is_none")] - pub build_args: Option<::std::collections::HashMap>, - /// _Configures Rivet CLI behavior. Has no effect on server behavior._ - #[serde(rename = "dockerfile", skip_serializing_if = "Option::is_none")] - pub dockerfile: Option, - #[serde(rename = "env", skip_serializing_if = "Option::is_none")] - pub env: Option<::std::collections::HashMap>, - /// _Configures Rivet CLI behavior. Has no effect on server behavior._ - #[serde(rename = "image", skip_serializing_if = "Option::is_none")] - pub image: Option, - #[serde(rename = "image_id", skip_serializing_if = "Option::is_none")] - pub image_id: Option, - #[serde(rename = "network_mode", skip_serializing_if = "Option::is_none")] - pub network_mode: Option, - #[serde(rename = "ports", skip_serializing_if = "Option::is_none")] - pub ports: Option< - ::std::collections::HashMap< - String, - crate::models::CloudVersionMatchmakerGameModeRuntimeDockerPort, - >, - >, + #[serde(rename = "args", skip_serializing_if = "Option::is_none")] + pub args: Option>, + /// _Configures Rivet CLI behavior. Has no effect on server behavior._ + #[serde(rename = "build_args", skip_serializing_if = "Option::is_none")] + pub build_args: Option<::std::collections::HashMap>, + /// _Configures Rivet CLI behavior. Has no effect on server behavior._ + #[serde(rename = "dockerfile", skip_serializing_if = "Option::is_none")] + pub dockerfile: Option, + #[serde(rename = "env", skip_serializing_if = "Option::is_none")] + pub env: Option<::std::collections::HashMap>, + /// _Configures Rivet CLI behavior. Has no effect on server behavior._ + #[serde(rename = "image", skip_serializing_if = "Option::is_none")] + pub image: Option, + #[serde(rename = "image_id", skip_serializing_if = "Option::is_none")] + pub image_id: Option, + #[serde(rename = "network_mode", skip_serializing_if = "Option::is_none")] + pub network_mode: Option, + #[serde(rename = "ports", skip_serializing_if = "Option::is_none")] + pub ports: Option<::std::collections::HashMap>, } impl CloudVersionMatchmakerGameModeRuntimeDocker { - /// A game mode runtime running through Docker. - pub fn new() -> CloudVersionMatchmakerGameModeRuntimeDocker { - CloudVersionMatchmakerGameModeRuntimeDocker { - args: None, - build_args: None, - dockerfile: None, - env: None, - image: None, - image_id: None, - network_mode: None, - ports: None, - } - } + /// A game mode runtime running through Docker. + pub fn new() -> CloudVersionMatchmakerGameModeRuntimeDocker { + CloudVersionMatchmakerGameModeRuntimeDocker { + args: None, + build_args: None, + dockerfile: None, + env: None, + image: None, + image_id: None, + network_mode: None, + ports: None, + } + } } + + diff --git a/sdks/rust/src/models/cloud_version_matchmaker_game_mode_runtime_docker_port.rs b/sdks/rust/src/models/cloud_version_matchmaker_game_mode_runtime_docker_port.rs index 821d789d..51c8e6ba 100644 --- a/sdks/rust/src/models/cloud_version_matchmaker_game_mode_runtime_docker_port.rs +++ b/sdks/rust/src/models/cloud_version_matchmaker_game_mode_runtime_docker_port.rs @@ -4,43 +4,47 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerGameModeRuntimeDockerPort : Port config for a docker build. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerGameModeRuntimeDockerPort { - /// _Configures Rivet CLI behavior. Has no effect on server behavior._ - #[serde(rename = "dev_port", skip_serializing_if = "Option::is_none")] - pub dev_port: Option, - #[serde(rename = "dev_port_range", skip_serializing_if = "Option::is_none")] - pub dev_port_range: Option>, - #[serde(rename = "dev_protocol", skip_serializing_if = "Option::is_none")] - pub dev_protocol: Option, - /// The port number to connect to. ### Related - cloud.version.matchmaker.PortProtocol - cloud.version.matchmaker.ProxyKind - #[serde(rename = "port", skip_serializing_if = "Option::is_none")] - pub port: Option, - #[serde(rename = "port_range", skip_serializing_if = "Option::is_none")] - pub port_range: Option>, - #[serde(rename = "protocol", skip_serializing_if = "Option::is_none")] - pub protocol: Option, - #[serde(rename = "proxy", skip_serializing_if = "Option::is_none")] - pub proxy: Option, + /// _Configures Rivet CLI behavior. Has no effect on server behavior._ + #[serde(rename = "dev_port", skip_serializing_if = "Option::is_none")] + pub dev_port: Option, + #[serde(rename = "dev_port_range", skip_serializing_if = "Option::is_none")] + pub dev_port_range: Option>, + #[serde(rename = "dev_protocol", skip_serializing_if = "Option::is_none")] + pub dev_protocol: Option, + /// The port number to connect to. ### Related - cloud.version.matchmaker.PortProtocol - cloud.version.matchmaker.ProxyKind + #[serde(rename = "port", skip_serializing_if = "Option::is_none")] + pub port: Option, + #[serde(rename = "port_range", skip_serializing_if = "Option::is_none")] + pub port_range: Option>, + #[serde(rename = "protocol", skip_serializing_if = "Option::is_none")] + pub protocol: Option, + #[serde(rename = "proxy", skip_serializing_if = "Option::is_none")] + pub proxy: Option, } impl CloudVersionMatchmakerGameModeRuntimeDockerPort { - /// Port config for a docker build. - pub fn new() -> CloudVersionMatchmakerGameModeRuntimeDockerPort { - CloudVersionMatchmakerGameModeRuntimeDockerPort { - dev_port: None, - dev_port_range: None, - dev_protocol: None, - port: None, - port_range: None, - protocol: None, - proxy: None, - } - } + /// Port config for a docker build. + pub fn new() -> CloudVersionMatchmakerGameModeRuntimeDockerPort { + CloudVersionMatchmakerGameModeRuntimeDockerPort { + dev_port: None, + dev_port_range: None, + dev_protocol: None, + port: None, + port_range: None, + protocol: None, + proxy: None, + } + } } + + diff --git a/sdks/rust/src/models/cloud_version_matchmaker_game_mode_verification_config.rs b/sdks/rust/src/models/cloud_version_matchmaker_game_mode_verification_config.rs index cdc5c5b8..4e5a714d 100644 --- a/sdks/rust/src/models/cloud_version_matchmaker_game_mode_verification_config.rs +++ b/sdks/rust/src/models/cloud_version_matchmaker_game_mode_verification_config.rs @@ -4,26 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerGameModeVerificationConfig : Configuration that tells Rivet where to send validation requests and with what headers. When set, Rivet will send the `verification_data` property (given by the user in the find/join/create endpoint) to the given url along with the headers provided and some information about the requested lobby. The response of this request will determine if the user can join that lobby or not. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerGameModeVerificationConfig { - #[serde(rename = "headers")] - pub headers: ::std::collections::HashMap, - #[serde(rename = "url")] - pub url: String, + #[serde(rename = "headers")] + pub headers: ::std::collections::HashMap, + #[serde(rename = "url")] + pub url: String, } impl CloudVersionMatchmakerGameModeVerificationConfig { - /// Configuration that tells Rivet where to send validation requests and with what headers. When set, Rivet will send the `verification_data` property (given by the user in the find/join/create endpoint) to the given url along with the headers provided and some information about the requested lobby. The response of this request will determine if the user can join that lobby or not. - pub fn new( - headers: ::std::collections::HashMap, - url: String, - ) -> CloudVersionMatchmakerGameModeVerificationConfig { - CloudVersionMatchmakerGameModeVerificationConfig { headers, url } - } + /// Configuration that tells Rivet where to send validation requests and with what headers. When set, Rivet will send the `verification_data` property (given by the user in the find/join/create endpoint) to the given url along with the headers provided and some information about the requested lobby. The response of this request will determine if the user can join that lobby or not. + pub fn new(headers: ::std::collections::HashMap, url: String) -> CloudVersionMatchmakerGameModeVerificationConfig { + CloudVersionMatchmakerGameModeVerificationConfig { + headers, + url, + } + } } + + diff --git a/sdks/rust/src/models/cloud_version_matchmaker_lobby_group.rs b/sdks/rust/src/models/cloud_version_matchmaker_lobby_group.rs index 486eca87..12cdd2fd 100644 --- a/sdks/rust/src/models/cloud_version_matchmaker_lobby_group.rs +++ b/sdks/rust/src/models/cloud_version_matchmaker_lobby_group.rs @@ -4,50 +4,47 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerLobbyGroup : A game mode. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerLobbyGroup { - /// Unsigned 32 bit integer. - #[serde(rename = "max_players_direct")] - pub max_players_direct: i32, - /// Unsigned 32 bit integer. - #[serde(rename = "max_players_normal")] - pub max_players_normal: i32, - /// Unsigned 32 bit integer. - #[serde(rename = "max_players_party")] - pub max_players_party: i32, - /// **Deprecated: use GameMode instead** A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. - #[serde(rename = "name_id")] - pub name_id: String, - /// A list of game mode regions. - #[serde(rename = "regions")] - pub regions: Vec, - #[serde(rename = "runtime")] - pub runtime: Box, + /// Unsigned 32 bit integer. + #[serde(rename = "max_players_direct")] + pub max_players_direct: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "max_players_normal")] + pub max_players_normal: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "max_players_party")] + pub max_players_party: i32, + /// **Deprecated: use GameMode instead** A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. + #[serde(rename = "name_id")] + pub name_id: String, + /// A list of game mode regions. + #[serde(rename = "regions")] + pub regions: Vec, + #[serde(rename = "runtime")] + pub runtime: Box, } impl CloudVersionMatchmakerLobbyGroup { - /// A game mode. - pub fn new( - max_players_direct: i32, - max_players_normal: i32, - max_players_party: i32, - name_id: String, - regions: Vec, - runtime: crate::models::CloudVersionMatchmakerLobbyGroupRuntime, - ) -> CloudVersionMatchmakerLobbyGroup { - CloudVersionMatchmakerLobbyGroup { - max_players_direct, - max_players_normal, - max_players_party, - name_id, - regions, - runtime: Box::new(runtime), - } - } + /// A game mode. + pub fn new(max_players_direct: i32, max_players_normal: i32, max_players_party: i32, name_id: String, regions: Vec, runtime: crate::models::CloudVersionMatchmakerLobbyGroupRuntime) -> CloudVersionMatchmakerLobbyGroup { + CloudVersionMatchmakerLobbyGroup { + max_players_direct, + max_players_normal, + max_players_party, + name_id, + regions, + runtime: Box::new(runtime), + } + } } + + diff --git a/sdks/rust/src/models/cloud_version_matchmaker_lobby_group_idle_lobbies_config.rs b/sdks/rust/src/models/cloud_version_matchmaker_lobby_group_idle_lobbies_config.rs index a3b6dac1..68bb2455 100644 --- a/sdks/rust/src/models/cloud_version_matchmaker_lobby_group_idle_lobbies_config.rs +++ b/sdks/rust/src/models/cloud_version_matchmaker_lobby_group_idle_lobbies_config.rs @@ -4,31 +4,32 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerLobbyGroupIdleLobbiesConfig : **Deprecated: use GameMode instead** Configuration for how many idle lobbies a game version should have. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerLobbyGroupIdleLobbiesConfig { - /// Unsigned 32 bit integer. - #[serde(rename = "max_idle_lobbies")] - pub max_idle_lobbies: i32, - /// Unsigned 32 bit integer. - #[serde(rename = "min_idle_lobbies")] - pub min_idle_lobbies: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "max_idle_lobbies")] + pub max_idle_lobbies: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "min_idle_lobbies")] + pub min_idle_lobbies: i32, } impl CloudVersionMatchmakerLobbyGroupIdleLobbiesConfig { - /// **Deprecated: use GameMode instead** Configuration for how many idle lobbies a game version should have. - pub fn new( - max_idle_lobbies: i32, - min_idle_lobbies: i32, - ) -> CloudVersionMatchmakerLobbyGroupIdleLobbiesConfig { - CloudVersionMatchmakerLobbyGroupIdleLobbiesConfig { - max_idle_lobbies, - min_idle_lobbies, - } - } + /// **Deprecated: use GameMode instead** Configuration for how many idle lobbies a game version should have. + pub fn new(max_idle_lobbies: i32, min_idle_lobbies: i32) -> CloudVersionMatchmakerLobbyGroupIdleLobbiesConfig { + CloudVersionMatchmakerLobbyGroupIdleLobbiesConfig { + max_idle_lobbies, + min_idle_lobbies, + } + } } + + diff --git a/sdks/rust/src/models/cloud_version_matchmaker_lobby_group_region.rs b/sdks/rust/src/models/cloud_version_matchmaker_lobby_group_region.rs index ea19d2c4..e4c52e01 100644 --- a/sdks/rust/src/models/cloud_version_matchmaker_lobby_group_region.rs +++ b/sdks/rust/src/models/cloud_version_matchmaker_lobby_group_region.rs @@ -4,33 +4,34 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerLobbyGroupRegion : **Deprecated: use GameMode instead** A game mode region. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerLobbyGroupRegion { - #[serde(rename = "idle_lobbies", skip_serializing_if = "Option::is_none")] - pub idle_lobbies: Option>, - #[serde(rename = "region_id")] - pub region_id: uuid::Uuid, - /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. - #[serde(rename = "tier_name_id")] - pub tier_name_id: String, + #[serde(rename = "idle_lobbies", skip_serializing_if = "Option::is_none")] + pub idle_lobbies: Option>, + #[serde(rename = "region_id")] + pub region_id: uuid::Uuid, + /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. + #[serde(rename = "tier_name_id")] + pub tier_name_id: String, } impl CloudVersionMatchmakerLobbyGroupRegion { - /// **Deprecated: use GameMode instead** A game mode region. - pub fn new( - region_id: uuid::Uuid, - tier_name_id: String, - ) -> CloudVersionMatchmakerLobbyGroupRegion { - CloudVersionMatchmakerLobbyGroupRegion { - idle_lobbies: None, - region_id, - tier_name_id, - } - } + /// **Deprecated: use GameMode instead** A game mode region. + pub fn new(region_id: uuid::Uuid, tier_name_id: String) -> CloudVersionMatchmakerLobbyGroupRegion { + CloudVersionMatchmakerLobbyGroupRegion { + idle_lobbies: None, + region_id, + tier_name_id, + } + } } + + diff --git a/sdks/rust/src/models/cloud_version_matchmaker_lobby_group_runtime.rs b/sdks/rust/src/models/cloud_version_matchmaker_lobby_group_runtime.rs index f0b0d428..2a22e378 100644 --- a/sdks/rust/src/models/cloud_version_matchmaker_lobby_group_runtime.rs +++ b/sdks/rust/src/models/cloud_version_matchmaker_lobby_group_runtime.rs @@ -4,21 +4,27 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerLobbyGroupRuntime : **Deprecated: use GameMode instead** A union representing the runtime a game mode runs on. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerLobbyGroupRuntime { - #[serde(rename = "docker", skip_serializing_if = "Option::is_none")] - pub docker: Option>, + #[serde(rename = "docker", skip_serializing_if = "Option::is_none")] + pub docker: Option>, } impl CloudVersionMatchmakerLobbyGroupRuntime { - /// **Deprecated: use GameMode instead** A union representing the runtime a game mode runs on. - pub fn new() -> CloudVersionMatchmakerLobbyGroupRuntime { - CloudVersionMatchmakerLobbyGroupRuntime { docker: None } - } + /// **Deprecated: use GameMode instead** A union representing the runtime a game mode runs on. + pub fn new() -> CloudVersionMatchmakerLobbyGroupRuntime { + CloudVersionMatchmakerLobbyGroupRuntime { + docker: None, + } + } } + + diff --git a/sdks/rust/src/models/cloud_version_matchmaker_lobby_group_runtime_docker.rs b/sdks/rust/src/models/cloud_version_matchmaker_lobby_group_runtime_docker.rs index ca644679..ed903982 100644 --- a/sdks/rust/src/models/cloud_version_matchmaker_lobby_group_runtime_docker.rs +++ b/sdks/rust/src/models/cloud_version_matchmaker_lobby_group_runtime_docker.rs @@ -4,39 +4,39 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerLobbyGroupRuntimeDocker : **Deprecated: use GameMode instead** A game mode runtime running through Docker. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerLobbyGroupRuntimeDocker { - #[serde(rename = "args")] - pub args: Vec, - #[serde(rename = "build_id", skip_serializing_if = "Option::is_none")] - pub build_id: Option, - #[serde(rename = "env_vars")] - pub env_vars: Vec, - #[serde(rename = "network_mode", skip_serializing_if = "Option::is_none")] - pub network_mode: Option, - #[serde(rename = "ports")] - pub ports: Vec, + #[serde(rename = "args")] + pub args: Vec, + #[serde(rename = "build_id", skip_serializing_if = "Option::is_none")] + pub build_id: Option, + #[serde(rename = "env_vars")] + pub env_vars: Vec, + #[serde(rename = "network_mode", skip_serializing_if = "Option::is_none")] + pub network_mode: Option, + #[serde(rename = "ports")] + pub ports: Vec, } impl CloudVersionMatchmakerLobbyGroupRuntimeDocker { - /// **Deprecated: use GameMode instead** A game mode runtime running through Docker. - pub fn new( - args: Vec, - env_vars: Vec, - ports: Vec, - ) -> CloudVersionMatchmakerLobbyGroupRuntimeDocker { - CloudVersionMatchmakerLobbyGroupRuntimeDocker { - args, - build_id: None, - env_vars, - network_mode: None, - ports, - } - } + /// **Deprecated: use GameMode instead** A game mode runtime running through Docker. + pub fn new(args: Vec, env_vars: Vec, ports: Vec) -> CloudVersionMatchmakerLobbyGroupRuntimeDocker { + CloudVersionMatchmakerLobbyGroupRuntimeDocker { + args, + build_id: None, + env_vars, + network_mode: None, + ports, + } + } } + + diff --git a/sdks/rust/src/models/cloud_version_matchmaker_lobby_group_runtime_docker_env_var.rs b/sdks/rust/src/models/cloud_version_matchmaker_lobby_group_runtime_docker_env_var.rs index b2f4a371..3aacf4af 100644 --- a/sdks/rust/src/models/cloud_version_matchmaker_lobby_group_runtime_docker_env_var.rs +++ b/sdks/rust/src/models/cloud_version_matchmaker_lobby_group_runtime_docker_env_var.rs @@ -4,23 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerLobbyGroupRuntimeDockerEnvVar : **Deprecated: use GameMode instead** A docker environment variable. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerLobbyGroupRuntimeDockerEnvVar { - #[serde(rename = "key")] - pub key: String, - #[serde(rename = "value")] - pub value: String, + #[serde(rename = "key")] + pub key: String, + #[serde(rename = "value")] + pub value: String, } impl CloudVersionMatchmakerLobbyGroupRuntimeDockerEnvVar { - /// **Deprecated: use GameMode instead** A docker environment variable. - pub fn new(key: String, value: String) -> CloudVersionMatchmakerLobbyGroupRuntimeDockerEnvVar { - CloudVersionMatchmakerLobbyGroupRuntimeDockerEnvVar { key, value } - } + /// **Deprecated: use GameMode instead** A docker environment variable. + pub fn new(key: String, value: String) -> CloudVersionMatchmakerLobbyGroupRuntimeDockerEnvVar { + CloudVersionMatchmakerLobbyGroupRuntimeDockerEnvVar { + key, + value, + } + } } + + diff --git a/sdks/rust/src/models/cloud_version_matchmaker_lobby_group_runtime_docker_port.rs b/sdks/rust/src/models/cloud_version_matchmaker_lobby_group_runtime_docker_port.rs index 7bff1ee3..900a1e42 100644 --- a/sdks/rust/src/models/cloud_version_matchmaker_lobby_group_runtime_docker_port.rs +++ b/sdks/rust/src/models/cloud_version_matchmaker_lobby_group_runtime_docker_port.rs @@ -4,37 +4,38 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerLobbyGroupRuntimeDockerPort : **Deprecated: use GameMode instead** A docker port. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerLobbyGroupRuntimeDockerPort { - /// The label of this docker port. - #[serde(rename = "label")] - pub label: String, - #[serde(rename = "port_range", skip_serializing_if = "Option::is_none")] - pub port_range: Option>, - #[serde(rename = "proxy_protocol")] - pub proxy_protocol: crate::models::CloudVersionMatchmakerPortProtocol, - /// The port number to connect to. - #[serde(rename = "target_port", skip_serializing_if = "Option::is_none")] - pub target_port: Option, + /// The label of this docker port. + #[serde(rename = "label")] + pub label: String, + #[serde(rename = "port_range", skip_serializing_if = "Option::is_none")] + pub port_range: Option>, + #[serde(rename = "proxy_protocol")] + pub proxy_protocol: crate::models::CloudVersionMatchmakerPortProtocol, + /// The port number to connect to. + #[serde(rename = "target_port", skip_serializing_if = "Option::is_none")] + pub target_port: Option, } impl CloudVersionMatchmakerLobbyGroupRuntimeDockerPort { - /// **Deprecated: use GameMode instead** A docker port. - pub fn new( - label: String, - proxy_protocol: crate::models::CloudVersionMatchmakerPortProtocol, - ) -> CloudVersionMatchmakerLobbyGroupRuntimeDockerPort { - CloudVersionMatchmakerLobbyGroupRuntimeDockerPort { - label, - port_range: None, - proxy_protocol, - target_port: None, - } - } + /// **Deprecated: use GameMode instead** A docker port. + pub fn new(label: String, proxy_protocol: crate::models::CloudVersionMatchmakerPortProtocol) -> CloudVersionMatchmakerLobbyGroupRuntimeDockerPort { + CloudVersionMatchmakerLobbyGroupRuntimeDockerPort { + label, + port_range: None, + proxy_protocol, + target_port: None, + } + } } + + diff --git a/sdks/rust/src/models/cloud_version_matchmaker_network_mode.rs b/sdks/rust/src/models/cloud_version_matchmaker_network_mode.rs index 8513a498..90251ca9 100644 --- a/sdks/rust/src/models/cloud_version_matchmaker_network_mode.rs +++ b/sdks/rust/src/models/cloud_version_matchmaker_network_mode.rs @@ -4,7 +4,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -13,23 +13,28 @@ /// Configures how the container's network is isolated from the host. `bridge` (default) networking isolates the container's network from the host & other containers. `host` networking removes isolation between the container and the host. Only available in Rivet Open Source & Enterprise. Read more about bridge vs host networking [here](https://rivet.gg/docs/dynamic-servers/concepts/host-bridge-networking). #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum CloudVersionMatchmakerNetworkMode { - #[serde(rename = "bridge")] - Bridge, - #[serde(rename = "host")] - Host, + #[serde(rename = "bridge")] + Bridge, + #[serde(rename = "host")] + Host, + } impl ToString for CloudVersionMatchmakerNetworkMode { - fn to_string(&self) -> String { - match self { - Self::Bridge => String::from("bridge"), - Self::Host => String::from("host"), - } - } + fn to_string(&self) -> String { + match self { + Self::Bridge => String::from("bridge"), + Self::Host => String::from("host"), + } + } } impl Default for CloudVersionMatchmakerNetworkMode { - fn default() -> CloudVersionMatchmakerNetworkMode { - Self::Bridge - } + fn default() -> CloudVersionMatchmakerNetworkMode { + Self::Bridge + } } + + + + diff --git a/sdks/rust/src/models/cloud_version_matchmaker_port_protocol.rs b/sdks/rust/src/models/cloud_version_matchmaker_port_protocol.rs index 90471b2a..47b999e7 100644 --- a/sdks/rust/src/models/cloud_version_matchmaker_port_protocol.rs +++ b/sdks/rust/src/models/cloud_version_matchmaker_port_protocol.rs @@ -4,7 +4,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -13,32 +13,37 @@ /// Signifies the protocol of the port. Note that when proxying through GameGuard (via `ProxyKind`), the port number returned by `/find`, `/join`, and `/create` will not be the same as the port number configured in the config: - With HTTP, the port will always be 80. The hostname of the port correctly routes the incoming connection to the correct port being used by the game server. - With HTTPS, the port will always be 443. The hostname of the port correctly routes the incoming connection to the correct port being used by the game server. - Using TCP/UDP, the port will be a random number between 26000 and 31999. This gets automatically routed to the correct port being used by the game server. ### Related - cloud.version.matchmaker.GameModeRuntimeDockerPort - cloud.version.matchmaker.ProxyKind - /docs/dynamic-servers/concepts/game-guard - matchmaker.lobbies.find #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum CloudVersionMatchmakerPortProtocol { - #[serde(rename = "http")] - Http, - #[serde(rename = "https")] - Https, - #[serde(rename = "tcp")] - Tcp, - #[serde(rename = "tcp_tls")] - TcpTls, - #[serde(rename = "udp")] - Udp, + #[serde(rename = "http")] + Http, + #[serde(rename = "https")] + Https, + #[serde(rename = "tcp")] + Tcp, + #[serde(rename = "tcp_tls")] + TcpTls, + #[serde(rename = "udp")] + Udp, + } impl ToString for CloudVersionMatchmakerPortProtocol { - fn to_string(&self) -> String { - match self { - Self::Http => String::from("http"), - Self::Https => String::from("https"), - Self::Tcp => String::from("tcp"), - Self::TcpTls => String::from("tcp_tls"), - Self::Udp => String::from("udp"), - } - } + fn to_string(&self) -> String { + match self { + Self::Http => String::from("http"), + Self::Https => String::from("https"), + Self::Tcp => String::from("tcp"), + Self::TcpTls => String::from("tcp_tls"), + Self::Udp => String::from("udp"), + } + } } impl Default for CloudVersionMatchmakerPortProtocol { - fn default() -> CloudVersionMatchmakerPortProtocol { - Self::Http - } + fn default() -> CloudVersionMatchmakerPortProtocol { + Self::Http + } } + + + + diff --git a/sdks/rust/src/models/cloud_version_matchmaker_port_range.rs b/sdks/rust/src/models/cloud_version_matchmaker_port_range.rs index 17b9db0a..90778df8 100644 --- a/sdks/rust/src/models/cloud_version_matchmaker_port_range.rs +++ b/sdks/rust/src/models/cloud_version_matchmaker_port_range.rs @@ -4,25 +4,32 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerPortRange : Range of ports that can be connected to. If configured, `network_mode` must equal `host`. Port ranges may overlap between containers, it is the responsibility of the developer to ensure ports are available before using. Read more about host networking [here](https://rivet.gg/docs/dynamic-servers/concepts/host-bridge-networking). Only available on Rivet Open Source & Enterprise. ### Related - cloud.version.matchmaker.PortProtocol - cloud.version.matchmaker.ProxyKind + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerPortRange { - /// Unsigned 32 bit integer. - #[serde(rename = "max")] - pub max: i32, - /// Unsigned 32 bit integer. - #[serde(rename = "min")] - pub min: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "max")] + pub max: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "min")] + pub min: i32, } impl CloudVersionMatchmakerPortRange { - /// Range of ports that can be connected to. If configured, `network_mode` must equal `host`. Port ranges may overlap between containers, it is the responsibility of the developer to ensure ports are available before using. Read more about host networking [here](https://rivet.gg/docs/dynamic-servers/concepts/host-bridge-networking). Only available on Rivet Open Source & Enterprise. ### Related - cloud.version.matchmaker.PortProtocol - cloud.version.matchmaker.ProxyKind - pub fn new(max: i32, min: i32) -> CloudVersionMatchmakerPortRange { - CloudVersionMatchmakerPortRange { max, min } - } + /// Range of ports that can be connected to. If configured, `network_mode` must equal `host`. Port ranges may overlap between containers, it is the responsibility of the developer to ensure ports are available before using. Read more about host networking [here](https://rivet.gg/docs/dynamic-servers/concepts/host-bridge-networking). Only available on Rivet Open Source & Enterprise. ### Related - cloud.version.matchmaker.PortProtocol - cloud.version.matchmaker.ProxyKind + pub fn new(max: i32, min: i32) -> CloudVersionMatchmakerPortRange { + CloudVersionMatchmakerPortRange { + max, + min, + } + } } + + diff --git a/sdks/rust/src/models/cloud_version_matchmaker_proxy_kind.rs b/sdks/rust/src/models/cloud_version_matchmaker_proxy_kind.rs index 419478fb..3f1a9d43 100644 --- a/sdks/rust/src/models/cloud_version_matchmaker_proxy_kind.rs +++ b/sdks/rust/src/models/cloud_version_matchmaker_proxy_kind.rs @@ -4,7 +4,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -13,23 +13,28 @@ /// Range of ports that can be connected to. `game_guard` (default) proxies all traffic through [Game Guard](https://rivet.gg/docs/dynamic-servers/concepts/game-guard) to mitigate DDoS attacks and provide TLS termination. `none` sends traffic directly to the game server. If configured, `network_mode` must equal `host`. Read more about host networking [here](https://rivet.gg/docs/dynamic-servers/concepts/host-bridge-networking). Only available on Rivet Open Source & Enterprise. ### Related - /docs/dynamic-servers/concepts/game-guard - cloud.version.matchmaker.PortProtocol #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum CloudVersionMatchmakerProxyKind { - #[serde(rename = "none")] - None, - #[serde(rename = "game_guard")] - GameGuard, + #[serde(rename = "none")] + None, + #[serde(rename = "game_guard")] + GameGuard, + } impl ToString for CloudVersionMatchmakerProxyKind { - fn to_string(&self) -> String { - match self { - Self::None => String::from("none"), - Self::GameGuard => String::from("game_guard"), - } - } + fn to_string(&self) -> String { + match self { + Self::None => String::from("none"), + Self::GameGuard => String::from("game_guard"), + } + } } impl Default for CloudVersionMatchmakerProxyKind { - fn default() -> CloudVersionMatchmakerProxyKind { - Self::None - } + fn default() -> CloudVersionMatchmakerProxyKind { + Self::None + } } + + + + diff --git a/sdks/rust/src/models/cloud_version_summary.rs b/sdks/rust/src/models/cloud_version_summary.rs index 79d10892..fe748b59 100644 --- a/sdks/rust/src/models/cloud_version_summary.rs +++ b/sdks/rust/src/models/cloud_version_summary.rs @@ -4,35 +4,35 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionSummary : A version summary. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionSummary { - /// RFC3339 timestamp - #[serde(rename = "create_ts")] - pub create_ts: String, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "version_id")] - pub version_id: uuid::Uuid, + /// RFC3339 timestamp + #[serde(rename = "create_ts")] + pub create_ts: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "version_id")] + pub version_id: uuid::Uuid, } impl CloudVersionSummary { - /// A version summary. - pub fn new( - create_ts: String, - display_name: String, - version_id: uuid::Uuid, - ) -> CloudVersionSummary { - CloudVersionSummary { - create_ts, - display_name, - version_id, - } - } + /// A version summary. + pub fn new(create_ts: String, display_name: String, version_id: uuid::Uuid) -> CloudVersionSummary { + CloudVersionSummary { + create_ts, + display_name, + version_id, + } + } } + + diff --git a/sdks/rust/src/models/ee_backend_environment.rs b/sdks/rust/src/models/ee_backend_environment.rs index b7b933b7..1b55839c 100644 --- a/sdks/rust/src/models/ee_backend_environment.rs +++ b/sdks/rust/src/models/ee_backend_environment.rs @@ -4,41 +4,40 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeBackendEnvironment { - /// RFC3339 timestamp - #[serde(rename = "create_ts")] - pub create_ts: String, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "environment_id")] - pub environment_id: uuid::Uuid, - /// A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short. - #[serde(rename = "name_id")] - pub name_id: String, - #[serde(rename = "tier")] - pub tier: crate::models::EeBackendTier, + /// RFC3339 timestamp + #[serde(rename = "create_ts")] + pub create_ts: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "environment_id")] + pub environment_id: uuid::Uuid, + /// A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short. + #[serde(rename = "name_id")] + pub name_id: String, + #[serde(rename = "tier")] + pub tier: crate::models::EeBackendTier, } impl EeBackendEnvironment { - pub fn new( - create_ts: String, - display_name: String, - environment_id: uuid::Uuid, - name_id: String, - tier: crate::models::EeBackendTier, - ) -> EeBackendEnvironment { - EeBackendEnvironment { - create_ts, - display_name, - environment_id, - name_id, - tier, - } - } + pub fn new(create_ts: String, display_name: String, environment_id: uuid::Uuid, name_id: String, tier: crate::models::EeBackendTier) -> EeBackendEnvironment { + EeBackendEnvironment { + create_ts, + display_name, + environment_id, + name_id, + tier, + } + } } + + diff --git a/sdks/rust/src/models/ee_backend_neon_project_config.rs b/sdks/rust/src/models/ee_backend_neon_project_config.rs index 1345d217..93e5d4cd 100644 --- a/sdks/rust/src/models/ee_backend_neon_project_config.rs +++ b/sdks/rust/src/models/ee_backend_neon_project_config.rs @@ -4,29 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// EeBackendNeonProjectConfig : See https://api-docs.neon.tech/reference/updateproject for more info. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeBackendNeonProjectConfig { - #[serde(rename = "autoscaling_limit_max_cu")] - pub autoscaling_limit_max_cu: f64, - #[serde(rename = "autoscaling_limit_min_cu")] - pub autoscaling_limit_min_cu: f64, + #[serde(rename = "autoscaling_limit_max_cu")] + pub autoscaling_limit_max_cu: f64, + #[serde(rename = "autoscaling_limit_min_cu")] + pub autoscaling_limit_min_cu: f64, } impl EeBackendNeonProjectConfig { - /// See https://api-docs.neon.tech/reference/updateproject for more info. - pub fn new( - autoscaling_limit_max_cu: f64, - autoscaling_limit_min_cu: f64, - ) -> EeBackendNeonProjectConfig { - EeBackendNeonProjectConfig { - autoscaling_limit_max_cu, - autoscaling_limit_min_cu, - } - } + /// See https://api-docs.neon.tech/reference/updateproject for more info. + pub fn new(autoscaling_limit_max_cu: f64, autoscaling_limit_min_cu: f64) -> EeBackendNeonProjectConfig { + EeBackendNeonProjectConfig { + autoscaling_limit_max_cu, + autoscaling_limit_min_cu, + } + } } + + diff --git a/sdks/rust/src/models/ee_backend_project.rs b/sdks/rust/src/models/ee_backend_project.rs index 6a448e60..0cc2bd3d 100644 --- a/sdks/rust/src/models/ee_backend_project.rs +++ b/sdks/rust/src/models/ee_backend_project.rs @@ -4,41 +4,40 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeBackendProject { - /// RFC3339 timestamp - #[serde(rename = "create_ts")] - pub create_ts: String, - #[serde(rename = "developer_group_id")] - pub developer_group_id: uuid::Uuid, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - /// A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short. - #[serde(rename = "name_id")] - pub name_id: String, - #[serde(rename = "project_id")] - pub project_id: uuid::Uuid, + /// RFC3339 timestamp + #[serde(rename = "create_ts")] + pub create_ts: String, + #[serde(rename = "developer_group_id")] + pub developer_group_id: uuid::Uuid, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + /// A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short. + #[serde(rename = "name_id")] + pub name_id: String, + #[serde(rename = "project_id")] + pub project_id: uuid::Uuid, } impl EeBackendProject { - pub fn new( - create_ts: String, - developer_group_id: uuid::Uuid, - display_name: String, - name_id: String, - project_id: uuid::Uuid, - ) -> EeBackendProject { - EeBackendProject { - create_ts, - developer_group_id, - display_name, - name_id, - project_id, - } - } + pub fn new(create_ts: String, developer_group_id: uuid::Uuid, display_name: String, name_id: String, project_id: uuid::Uuid) -> EeBackendProject { + EeBackendProject { + create_ts, + developer_group_id, + display_name, + name_id, + project_id, + } + } } + + diff --git a/sdks/rust/src/models/ee_backend_tier.rs b/sdks/rust/src/models/ee_backend_tier.rs index b55d6655..db9bd99b 100644 --- a/sdks/rust/src/models/ee_backend_tier.rs +++ b/sdks/rust/src/models/ee_backend_tier.rs @@ -4,30 +4,36 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ -/// + +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum EeBackendTier { - #[serde(rename = "shared")] - Shared, - #[serde(rename = "dedicated")] - Dedicated, + #[serde(rename = "shared")] + Shared, + #[serde(rename = "dedicated")] + Dedicated, + } impl ToString for EeBackendTier { - fn to_string(&self) -> String { - match self { - Self::Shared => String::from("shared"), - Self::Dedicated => String::from("dedicated"), - } - } + fn to_string(&self) -> String { + match self { + Self::Shared => String::from("shared"), + Self::Dedicated => String::from("dedicated"), + } + } } impl Default for EeBackendTier { - fn default() -> EeBackendTier { - Self::Shared - } + fn default() -> EeBackendTier { + Self::Shared + } } + + + + diff --git a/sdks/rust/src/models/ee_backend_update_variable.rs b/sdks/rust/src/models/ee_backend_update_variable.rs index e938aacd..7c847103 100644 --- a/sdks/rust/src/models/ee_backend_update_variable.rs +++ b/sdks/rust/src/models/ee_backend_update_variable.rs @@ -4,29 +4,33 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// EeBackendUpdateVariable : An environment variable patch. One of these properties must be set. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeBackendUpdateVariable { - #[serde(rename = "delete", skip_serializing_if = "Option::is_none")] - pub delete: Option, - #[serde(rename = "secret", skip_serializing_if = "Option::is_none")] - pub secret: Option, - #[serde(rename = "text", skip_serializing_if = "Option::is_none")] - pub text: Option, + #[serde(rename = "delete", skip_serializing_if = "Option::is_none")] + pub delete: Option, + #[serde(rename = "secret", skip_serializing_if = "Option::is_none")] + pub secret: Option, + #[serde(rename = "text", skip_serializing_if = "Option::is_none")] + pub text: Option, } impl EeBackendUpdateVariable { - /// An environment variable patch. One of these properties must be set. - pub fn new() -> EeBackendUpdateVariable { - EeBackendUpdateVariable { - delete: None, - secret: None, - text: None, - } - } + /// An environment variable patch. One of these properties must be set. + pub fn new() -> EeBackendUpdateVariable { + EeBackendUpdateVariable { + delete: None, + secret: None, + text: None, + } + } } + + diff --git a/sdks/rust/src/models/ee_backend_variable.rs b/sdks/rust/src/models/ee_backend_variable.rs index 430549ea..5beb6e1c 100644 --- a/sdks/rust/src/models/ee_backend_variable.rs +++ b/sdks/rust/src/models/ee_backend_variable.rs @@ -4,26 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// EeBackendVariable : An environment variable. One of these properties must be set. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeBackendVariable { - #[serde(rename = "secret", skip_serializing_if = "Option::is_none")] - pub secret: Option, - #[serde(rename = "text", skip_serializing_if = "Option::is_none")] - pub text: Option, + #[serde(rename = "secret", skip_serializing_if = "Option::is_none")] + pub secret: Option, + #[serde(rename = "text", skip_serializing_if = "Option::is_none")] + pub text: Option, } impl EeBackendVariable { - /// An environment variable. One of these properties must be set. - pub fn new() -> EeBackendVariable { - EeBackendVariable { - secret: None, - text: None, - } - } + /// An environment variable. One of these properties must be set. + pub fn new() -> EeBackendVariable { + EeBackendVariable { + secret: None, + text: None, + } + } } + + diff --git a/sdks/rust/src/models/ee_billing_game_usage.rs b/sdks/rust/src/models/ee_billing_game_usage.rs new file mode 100644 index 00000000..5c39fc76 --- /dev/null +++ b/sdks/rust/src/models/ee_billing_game_usage.rs @@ -0,0 +1,31 @@ +/* + * Rivet API EE + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct EeBillingGameUsage { + #[serde(rename = "game_id")] + pub game_id: uuid::Uuid, + #[serde(rename = "regions")] + pub regions: Vec, +} + +impl EeBillingGameUsage { + pub fn new(game_id: uuid::Uuid, regions: Vec) -> EeBillingGameUsage { + EeBillingGameUsage { + game_id, + regions, + } + } +} + + diff --git a/sdks/rust/src/models/ee_billing_group.rs b/sdks/rust/src/models/ee_billing_group.rs new file mode 100644 index 00000000..a6a72c94 --- /dev/null +++ b/sdks/rust/src/models/ee_billing_group.rs @@ -0,0 +1,41 @@ +/* + * Rivet API EE + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct EeBillingGroup { + /// RFC3339 timestamp + #[serde(rename = "payment_failed_ts", skip_serializing_if = "Option::is_none")] + pub payment_failed_ts: Option, + /// RFC3339 timestamp + #[serde(rename = "payment_method_attached_ts", skip_serializing_if = "Option::is_none")] + pub payment_method_attached_ts: Option, + /// RFC3339 timestamp + #[serde(rename = "payment_method_valid_ts", skip_serializing_if = "Option::is_none")] + pub payment_method_valid_ts: Option, + /// RFC3339 timestamp + #[serde(rename = "payment_succeeded_ts", skip_serializing_if = "Option::is_none")] + pub payment_succeeded_ts: Option, +} + +impl EeBillingGroup { + pub fn new() -> EeBillingGroup { + EeBillingGroup { + payment_failed_ts: None, + payment_method_attached_ts: None, + payment_method_valid_ts: None, + payment_succeeded_ts: None, + } + } +} + + diff --git a/sdks/rust/src/models/ee_billing_plan.rs b/sdks/rust/src/models/ee_billing_plan.rs new file mode 100644 index 00000000..01fa9e43 --- /dev/null +++ b/sdks/rust/src/models/ee_billing_plan.rs @@ -0,0 +1,42 @@ +/* + * Rivet API EE + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum EeBillingPlan { + #[serde(rename = "trial")] + Trial, + #[serde(rename = "indie")] + Indie, + #[serde(rename = "studio")] + Studio, + +} + +impl ToString for EeBillingPlan { + fn to_string(&self) -> String { + match self { + Self::Trial => String::from("trial"), + Self::Indie => String::from("indie"), + Self::Studio => String::from("studio"), + } + } +} + +impl Default for EeBillingPlan { + fn default() -> EeBillingPlan { + Self::Trial + } +} + + + + diff --git a/sdks/rust/src/models/ee_billing_region_usage.rs b/sdks/rust/src/models/ee_billing_region_usage.rs new file mode 100644 index 00000000..0a12941a --- /dev/null +++ b/sdks/rust/src/models/ee_billing_region_usage.rs @@ -0,0 +1,32 @@ +/* + * Rivet API EE + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct EeBillingRegionUsage { + #[serde(rename = "region_id")] + pub region_id: uuid::Uuid, + /// Total CPU usage time in milliseconds. + #[serde(rename = "uptime")] + pub uptime: i64, +} + +impl EeBillingRegionUsage { + pub fn new(region_id: uuid::Uuid, uptime: i64) -> EeBillingRegionUsage { + EeBillingRegionUsage { + region_id, + uptime, + } + } +} + + diff --git a/sdks/rust/src/models/ee_billing_subscription.rs b/sdks/rust/src/models/ee_billing_subscription.rs new file mode 100644 index 00000000..55dbfe06 --- /dev/null +++ b/sdks/rust/src/models/ee_billing_subscription.rs @@ -0,0 +1,33 @@ +/* + * Rivet API EE + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct EeBillingSubscription { + /// RFC3339 timestamp + #[serde(rename = "period_end_ts")] + pub period_end_ts: String, + /// RFC3339 timestamp + #[serde(rename = "period_start_ts")] + pub period_start_ts: String, +} + +impl EeBillingSubscription { + pub fn new(period_end_ts: String, period_start_ts: String) -> EeBillingSubscription { + EeBillingSubscription { + period_end_ts, + period_start_ts, + } + } +} + + diff --git a/sdks/rust/src/models/ee_cloud_analytics_variant_query.rs b/sdks/rust/src/models/ee_cloud_analytics_variant_query.rs index a7372efb..b00bd313 100644 --- a/sdks/rust/src/models/ee_cloud_analytics_variant_query.rs +++ b/sdks/rust/src/models/ee_cloud_analytics_variant_query.rs @@ -4,72 +4,78 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ -/// + +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum EeCloudAnalyticsVariantQuery { - #[serde(rename = "matchmaker_overview")] - MatchmakerOverview, - #[serde(rename = "player_count")] - PlayerCount, - #[serde(rename = "player_count_by_region")] - PlayerCountByRegion, - #[serde(rename = "player_count_by_game_mode")] - PlayerCountByGameMode, - #[serde(rename = "lobby_count")] - LobbyCount, - #[serde(rename = "lobby_count_by_region")] - LobbyCountByRegion, - #[serde(rename = "lobby_count_by_game_mode")] - LobbyCountByGameMode, - #[serde(rename = "avg_play_duration")] - AvgPlayDuration, - #[serde(rename = "avg_play_duration_by_region")] - AvgPlayDurationByRegion, - #[serde(rename = "avg_play_duration_by_game_mode")] - AvgPlayDurationByGameMode, - #[serde(rename = "new_players_per_second")] - NewPlayersPerSecond, - #[serde(rename = "new_lobbies_per_second")] - NewLobbiesPerSecond, - #[serde(rename = "destroyed_lobbies_by_failure")] - DestroyedLobbiesByFailure, - #[serde(rename = "destroyed_lobbies_by_exit_code")] - DestroyedLobbiesByExitCode, - #[serde(rename = "failed_lobbies")] - FailedLobbies, - #[serde(rename = "lobby_ready_time")] - LobbyReadyTime, + #[serde(rename = "matchmaker_overview")] + MatchmakerOverview, + #[serde(rename = "player_count")] + PlayerCount, + #[serde(rename = "player_count_by_region")] + PlayerCountByRegion, + #[serde(rename = "player_count_by_game_mode")] + PlayerCountByGameMode, + #[serde(rename = "lobby_count")] + LobbyCount, + #[serde(rename = "lobby_count_by_region")] + LobbyCountByRegion, + #[serde(rename = "lobby_count_by_game_mode")] + LobbyCountByGameMode, + #[serde(rename = "avg_play_duration")] + AvgPlayDuration, + #[serde(rename = "avg_play_duration_by_region")] + AvgPlayDurationByRegion, + #[serde(rename = "avg_play_duration_by_game_mode")] + AvgPlayDurationByGameMode, + #[serde(rename = "new_players_per_second")] + NewPlayersPerSecond, + #[serde(rename = "new_lobbies_per_second")] + NewLobbiesPerSecond, + #[serde(rename = "destroyed_lobbies_by_failure")] + DestroyedLobbiesByFailure, + #[serde(rename = "destroyed_lobbies_by_exit_code")] + DestroyedLobbiesByExitCode, + #[serde(rename = "failed_lobbies")] + FailedLobbies, + #[serde(rename = "lobby_ready_time")] + LobbyReadyTime, + } impl ToString for EeCloudAnalyticsVariantQuery { - fn to_string(&self) -> String { - match self { - Self::MatchmakerOverview => String::from("matchmaker_overview"), - Self::PlayerCount => String::from("player_count"), - Self::PlayerCountByRegion => String::from("player_count_by_region"), - Self::PlayerCountByGameMode => String::from("player_count_by_game_mode"), - Self::LobbyCount => String::from("lobby_count"), - Self::LobbyCountByRegion => String::from("lobby_count_by_region"), - Self::LobbyCountByGameMode => String::from("lobby_count_by_game_mode"), - Self::AvgPlayDuration => String::from("avg_play_duration"), - Self::AvgPlayDurationByRegion => String::from("avg_play_duration_by_region"), - Self::AvgPlayDurationByGameMode => String::from("avg_play_duration_by_game_mode"), - Self::NewPlayersPerSecond => String::from("new_players_per_second"), - Self::NewLobbiesPerSecond => String::from("new_lobbies_per_second"), - Self::DestroyedLobbiesByFailure => String::from("destroyed_lobbies_by_failure"), - Self::DestroyedLobbiesByExitCode => String::from("destroyed_lobbies_by_exit_code"), - Self::FailedLobbies => String::from("failed_lobbies"), - Self::LobbyReadyTime => String::from("lobby_ready_time"), - } - } + fn to_string(&self) -> String { + match self { + Self::MatchmakerOverview => String::from("matchmaker_overview"), + Self::PlayerCount => String::from("player_count"), + Self::PlayerCountByRegion => String::from("player_count_by_region"), + Self::PlayerCountByGameMode => String::from("player_count_by_game_mode"), + Self::LobbyCount => String::from("lobby_count"), + Self::LobbyCountByRegion => String::from("lobby_count_by_region"), + Self::LobbyCountByGameMode => String::from("lobby_count_by_game_mode"), + Self::AvgPlayDuration => String::from("avg_play_duration"), + Self::AvgPlayDurationByRegion => String::from("avg_play_duration_by_region"), + Self::AvgPlayDurationByGameMode => String::from("avg_play_duration_by_game_mode"), + Self::NewPlayersPerSecond => String::from("new_players_per_second"), + Self::NewLobbiesPerSecond => String::from("new_lobbies_per_second"), + Self::DestroyedLobbiesByFailure => String::from("destroyed_lobbies_by_failure"), + Self::DestroyedLobbiesByExitCode => String::from("destroyed_lobbies_by_exit_code"), + Self::FailedLobbies => String::from("failed_lobbies"), + Self::LobbyReadyTime => String::from("lobby_ready_time"), + } + } } impl Default for EeCloudAnalyticsVariantQuery { - fn default() -> EeCloudAnalyticsVariantQuery { - Self::MatchmakerOverview - } + fn default() -> EeCloudAnalyticsVariantQuery { + Self::MatchmakerOverview + } } + + + + diff --git a/sdks/rust/src/models/ee_cloud_avg_play_duration_by_game_mode_data_set.rs b/sdks/rust/src/models/ee_cloud_avg_play_duration_by_game_mode_data_set.rs index 597bc056..fdd081dd 100644 --- a/sdks/rust/src/models/ee_cloud_avg_play_duration_by_game_mode_data_set.rs +++ b/sdks/rust/src/models/ee_cloud_avg_play_duration_by_game_mode_data_set.rs @@ -4,30 +4,31 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudAvgPlayDurationByGameModeDataSet { - #[serde(rename = "duration")] - pub duration: Vec, - #[serde(rename = "game_mode_id")] - pub game_mode_id: Vec, - #[serde(rename = "game_mode_name_id")] - pub game_mode_name_id: Vec, + #[serde(rename = "duration")] + pub duration: Vec, + #[serde(rename = "game_mode_id")] + pub game_mode_id: Vec, + #[serde(rename = "game_mode_name_id")] + pub game_mode_name_id: Vec, } impl EeCloudAvgPlayDurationByGameModeDataSet { - pub fn new( - duration: Vec, - game_mode_id: Vec, - game_mode_name_id: Vec, - ) -> EeCloudAvgPlayDurationByGameModeDataSet { - EeCloudAvgPlayDurationByGameModeDataSet { - duration, - game_mode_id, - game_mode_name_id, - } - } + pub fn new(duration: Vec, game_mode_id: Vec, game_mode_name_id: Vec) -> EeCloudAvgPlayDurationByGameModeDataSet { + EeCloudAvgPlayDurationByGameModeDataSet { + duration, + game_mode_id, + game_mode_name_id, + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_avg_play_duration_by_region_data_set.rs b/sdks/rust/src/models/ee_cloud_avg_play_duration_by_region_data_set.rs index 7db40442..0f78c523 100644 --- a/sdks/rust/src/models/ee_cloud_avg_play_duration_by_region_data_set.rs +++ b/sdks/rust/src/models/ee_cloud_avg_play_duration_by_region_data_set.rs @@ -4,30 +4,31 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudAvgPlayDurationByRegionDataSet { - #[serde(rename = "duration")] - pub duration: Vec, - #[serde(rename = "region_id")] - pub region_id: Vec, - #[serde(rename = "region_name_id")] - pub region_name_id: Vec, + #[serde(rename = "duration")] + pub duration: Vec, + #[serde(rename = "region_id")] + pub region_id: Vec, + #[serde(rename = "region_name_id")] + pub region_name_id: Vec, } impl EeCloudAvgPlayDurationByRegionDataSet { - pub fn new( - duration: Vec, - region_id: Vec, - region_name_id: Vec, - ) -> EeCloudAvgPlayDurationByRegionDataSet { - EeCloudAvgPlayDurationByRegionDataSet { - duration, - region_id, - region_name_id, - } - } + pub fn new(duration: Vec, region_id: Vec, region_name_id: Vec) -> EeCloudAvgPlayDurationByRegionDataSet { + EeCloudAvgPlayDurationByRegionDataSet { + duration, + region_id, + region_name_id, + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_avg_play_duration_data_set.rs b/sdks/rust/src/models/ee_cloud_avg_play_duration_data_set.rs index c303c063..81d1133b 100644 --- a/sdks/rust/src/models/ee_cloud_avg_play_duration_data_set.rs +++ b/sdks/rust/src/models/ee_cloud_avg_play_duration_data_set.rs @@ -4,20 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudAvgPlayDurationDataSet { - #[serde(rename = "duration")] - pub duration: Vec, - #[serde(rename = "ts")] - pub ts: Vec, + #[serde(rename = "duration")] + pub duration: Vec, + #[serde(rename = "ts")] + pub ts: Vec, } impl EeCloudAvgPlayDurationDataSet { - pub fn new(duration: Vec, ts: Vec) -> EeCloudAvgPlayDurationDataSet { - EeCloudAvgPlayDurationDataSet { duration, ts } - } + pub fn new(duration: Vec, ts: Vec) -> EeCloudAvgPlayDurationDataSet { + EeCloudAvgPlayDurationDataSet { + duration, + ts, + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_backend_projects_create_request.rs b/sdks/rust/src/models/ee_cloud_backend_projects_create_request.rs index b114e3f0..5614253e 100644 --- a/sdks/rust/src/models/ee_cloud_backend_projects_create_request.rs +++ b/sdks/rust/src/models/ee_cloud_backend_projects_create_request.rs @@ -4,27 +4,29 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudBackendProjectsCreateRequest { - #[serde(rename = "developer_group_id")] - pub developer_group_id: uuid::Uuid, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, + #[serde(rename = "developer_group_id")] + pub developer_group_id: uuid::Uuid, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, } impl EeCloudBackendProjectsCreateRequest { - pub fn new( - developer_group_id: uuid::Uuid, - display_name: String, - ) -> EeCloudBackendProjectsCreateRequest { - EeCloudBackendProjectsCreateRequest { - developer_group_id, - display_name, - } - } + pub fn new(developer_group_id: uuid::Uuid, display_name: String) -> EeCloudBackendProjectsCreateRequest { + EeCloudBackendProjectsCreateRequest { + developer_group_id, + display_name, + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_backend_projects_create_response.rs b/sdks/rust/src/models/ee_cloud_backend_projects_create_response.rs index 6cafa0b4..37a3abdc 100644 --- a/sdks/rust/src/models/ee_cloud_backend_projects_create_response.rs +++ b/sdks/rust/src/models/ee_cloud_backend_projects_create_response.rs @@ -4,18 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudBackendProjectsCreateResponse { - #[serde(rename = "project_id")] - pub project_id: uuid::Uuid, + #[serde(rename = "project_id")] + pub project_id: uuid::Uuid, } impl EeCloudBackendProjectsCreateResponse { - pub fn new(project_id: uuid::Uuid) -> EeCloudBackendProjectsCreateResponse { - EeCloudBackendProjectsCreateResponse { project_id } - } + pub fn new(project_id: uuid::Uuid) -> EeCloudBackendProjectsCreateResponse { + EeCloudBackendProjectsCreateResponse { + project_id, + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_backend_projects_envs_create_request.rs b/sdks/rust/src/models/ee_cloud_backend_projects_envs_create_request.rs index b38add64..65e53dac 100644 --- a/sdks/rust/src/models/ee_cloud_backend_projects_envs_create_request.rs +++ b/sdks/rust/src/models/ee_cloud_backend_projects_envs_create_request.rs @@ -4,32 +4,33 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudBackendProjectsEnvsCreateRequest { - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - /// A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short. - #[serde(rename = "name_id")] - pub name_id: String, - #[serde(rename = "tier")] - pub tier: crate::models::EeBackendTier, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + /// A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short. + #[serde(rename = "name_id")] + pub name_id: String, + #[serde(rename = "tier")] + pub tier: crate::models::EeBackendTier, } impl EeCloudBackendProjectsEnvsCreateRequest { - pub fn new( - display_name: String, - name_id: String, - tier: crate::models::EeBackendTier, - ) -> EeCloudBackendProjectsEnvsCreateRequest { - EeCloudBackendProjectsEnvsCreateRequest { - display_name, - name_id, - tier, - } - } + pub fn new(display_name: String, name_id: String, tier: crate::models::EeBackendTier) -> EeCloudBackendProjectsEnvsCreateRequest { + EeCloudBackendProjectsEnvsCreateRequest { + display_name, + name_id, + tier, + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_backend_projects_envs_create_response.rs b/sdks/rust/src/models/ee_cloud_backend_projects_envs_create_response.rs index 4593cfe7..c985fa04 100644 --- a/sdks/rust/src/models/ee_cloud_backend_projects_envs_create_response.rs +++ b/sdks/rust/src/models/ee_cloud_backend_projects_envs_create_response.rs @@ -4,18 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudBackendProjectsEnvsCreateResponse { - #[serde(rename = "environment_id")] - pub environment_id: uuid::Uuid, + #[serde(rename = "environment_id")] + pub environment_id: uuid::Uuid, } impl EeCloudBackendProjectsEnvsCreateResponse { - pub fn new(environment_id: uuid::Uuid) -> EeCloudBackendProjectsEnvsCreateResponse { - EeCloudBackendProjectsEnvsCreateResponse { environment_id } - } + pub fn new(environment_id: uuid::Uuid) -> EeCloudBackendProjectsEnvsCreateResponse { + EeCloudBackendProjectsEnvsCreateResponse { + environment_id, + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_backend_projects_envs_deploy_request.rs b/sdks/rust/src/models/ee_cloud_backend_projects_envs_deploy_request.rs index ef68759d..93b87358 100644 --- a/sdks/rust/src/models/ee_cloud_backend_projects_envs_deploy_request.rs +++ b/sdks/rust/src/models/ee_cloud_backend_projects_envs_deploy_request.rs @@ -4,18 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudBackendProjectsEnvsDeployRequest { - #[serde(rename = "upload_id")] - pub upload_id: uuid::Uuid, + #[serde(rename = "upload_id")] + pub upload_id: uuid::Uuid, } impl EeCloudBackendProjectsEnvsDeployRequest { - pub fn new(upload_id: uuid::Uuid) -> EeCloudBackendProjectsEnvsDeployRequest { - EeCloudBackendProjectsEnvsDeployRequest { upload_id } - } + pub fn new(upload_id: uuid::Uuid) -> EeCloudBackendProjectsEnvsDeployRequest { + EeCloudBackendProjectsEnvsDeployRequest { + upload_id, + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_backend_projects_envs_deploy_response.rs b/sdks/rust/src/models/ee_cloud_backend_projects_envs_deploy_response.rs index 6b979c89..b733b015 100644 --- a/sdks/rust/src/models/ee_cloud_backend_projects_envs_deploy_response.rs +++ b/sdks/rust/src/models/ee_cloud_backend_projects_envs_deploy_response.rs @@ -4,19 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudBackendProjectsEnvsDeployResponse { - /// Url to access the deployed OpenGB environment from. - #[serde(rename = "url")] - pub url: String, + /// Url to access the deployed OpenGB environment from. + #[serde(rename = "url")] + pub url: String, } impl EeCloudBackendProjectsEnvsDeployResponse { - pub fn new(url: String) -> EeCloudBackendProjectsEnvsDeployResponse { - EeCloudBackendProjectsEnvsDeployResponse { url } - } + pub fn new(url: String) -> EeCloudBackendProjectsEnvsDeployResponse { + EeCloudBackendProjectsEnvsDeployResponse { + url, + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_backend_projects_envs_get_config_response.rs b/sdks/rust/src/models/ee_cloud_backend_projects_envs_get_config_response.rs index 58252455..dfe9eda4 100644 --- a/sdks/rust/src/models/ee_cloud_backend_projects_envs_get_config_response.rs +++ b/sdks/rust/src/models/ee_cloud_backend_projects_envs_get_config_response.rs @@ -4,26 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudBackendProjectsEnvsGetConfigResponse { - #[serde(rename = "config")] - pub config: Box, - #[serde(rename = "watch")] - pub watch: Box, + #[serde(rename = "config")] + pub config: Box, + #[serde(rename = "watch")] + pub watch: Box, } impl EeCloudBackendProjectsEnvsGetConfigResponse { - pub fn new( - config: crate::models::EeBackendNeonProjectConfig, - watch: crate::models::WatchResponse, - ) -> EeCloudBackendProjectsEnvsGetConfigResponse { - EeCloudBackendProjectsEnvsGetConfigResponse { - config: Box::new(config), - watch: Box::new(watch), - } - } + pub fn new(config: crate::models::EeBackendNeonProjectConfig, watch: crate::models::WatchResponse) -> EeCloudBackendProjectsEnvsGetConfigResponse { + EeCloudBackendProjectsEnvsGetConfigResponse { + config: Box::new(config), + watch: Box::new(watch), + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_backend_projects_envs_get_db_url_response.rs b/sdks/rust/src/models/ee_cloud_backend_projects_envs_get_db_url_response.rs index 7b1dfe67..225d3d46 100644 --- a/sdks/rust/src/models/ee_cloud_backend_projects_envs_get_db_url_response.rs +++ b/sdks/rust/src/models/ee_cloud_backend_projects_envs_get_db_url_response.rs @@ -4,18 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudBackendProjectsEnvsGetDbUrlResponse { - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, } impl EeCloudBackendProjectsEnvsGetDbUrlResponse { - pub fn new() -> EeCloudBackendProjectsEnvsGetDbUrlResponse { - EeCloudBackendProjectsEnvsGetDbUrlResponse { url: None } - } + pub fn new() -> EeCloudBackendProjectsEnvsGetDbUrlResponse { + EeCloudBackendProjectsEnvsGetDbUrlResponse { + url: None, + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_backend_projects_envs_get_events_response.rs b/sdks/rust/src/models/ee_cloud_backend_projects_envs_get_events_response.rs index f72e447c..d1f8b7a9 100644 --- a/sdks/rust/src/models/ee_cloud_backend_projects_envs_get_events_response.rs +++ b/sdks/rust/src/models/ee_cloud_backend_projects_envs_get_events_response.rs @@ -4,27 +4,29 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudBackendProjectsEnvsGetEventsResponse { - /// Sorted old to new. - #[serde(rename = "events")] - pub events: Vec, - #[serde(rename = "watch")] - pub watch: Box, + /// Sorted old to new. + #[serde(rename = "events")] + pub events: Vec, + #[serde(rename = "watch")] + pub watch: Box, } impl EeCloudBackendProjectsEnvsGetEventsResponse { - pub fn new( - events: Vec, - watch: crate::models::WatchResponse, - ) -> EeCloudBackendProjectsEnvsGetEventsResponse { - EeCloudBackendProjectsEnvsGetEventsResponse { - events, - watch: Box::new(watch), - } - } + pub fn new(events: Vec, watch: crate::models::WatchResponse) -> EeCloudBackendProjectsEnvsGetEventsResponse { + EeCloudBackendProjectsEnvsGetEventsResponse { + events, + watch: Box::new(watch), + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_backend_projects_envs_get_response.rs b/sdks/rust/src/models/ee_cloud_backend_projects_envs_get_response.rs index bb5461e4..31e6ee3e 100644 --- a/sdks/rust/src/models/ee_cloud_backend_projects_envs_get_response.rs +++ b/sdks/rust/src/models/ee_cloud_backend_projects_envs_get_response.rs @@ -4,26 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudBackendProjectsEnvsGetResponse { - #[serde(rename = "environment")] - pub environment: Box, - #[serde(rename = "watch")] - pub watch: Box, + #[serde(rename = "environment")] + pub environment: Box, + #[serde(rename = "watch")] + pub watch: Box, } impl EeCloudBackendProjectsEnvsGetResponse { - pub fn new( - environment: crate::models::EeBackendEnvironment, - watch: crate::models::WatchResponse, - ) -> EeCloudBackendProjectsEnvsGetResponse { - EeCloudBackendProjectsEnvsGetResponse { - environment: Box::new(environment), - watch: Box::new(watch), - } - } + pub fn new(environment: crate::models::EeBackendEnvironment, watch: crate::models::WatchResponse) -> EeCloudBackendProjectsEnvsGetResponse { + EeCloudBackendProjectsEnvsGetResponse { + environment: Box::new(environment), + watch: Box::new(watch), + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_backend_projects_envs_get_variables_response.rs b/sdks/rust/src/models/ee_cloud_backend_projects_envs_get_variables_response.rs index f0d0efe4..f5f10178 100644 --- a/sdks/rust/src/models/ee_cloud_backend_projects_envs_get_variables_response.rs +++ b/sdks/rust/src/models/ee_cloud_backend_projects_envs_get_variables_response.rs @@ -4,26 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudBackendProjectsEnvsGetVariablesResponse { - #[serde(rename = "variables")] - pub variables: ::std::collections::HashMap, - #[serde(rename = "watch")] - pub watch: Box, + #[serde(rename = "variables")] + pub variables: ::std::collections::HashMap, + #[serde(rename = "watch")] + pub watch: Box, } impl EeCloudBackendProjectsEnvsGetVariablesResponse { - pub fn new( - variables: ::std::collections::HashMap, - watch: crate::models::WatchResponse, - ) -> EeCloudBackendProjectsEnvsGetVariablesResponse { - EeCloudBackendProjectsEnvsGetVariablesResponse { - variables, - watch: Box::new(watch), - } - } + pub fn new(variables: ::std::collections::HashMap, watch: crate::models::WatchResponse) -> EeCloudBackendProjectsEnvsGetVariablesResponse { + EeCloudBackendProjectsEnvsGetVariablesResponse { + variables, + watch: Box::new(watch), + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_backend_projects_envs_list_response.rs b/sdks/rust/src/models/ee_cloud_backend_projects_envs_list_response.rs index 0d77ee5b..ad6a3a00 100644 --- a/sdks/rust/src/models/ee_cloud_backend_projects_envs_list_response.rs +++ b/sdks/rust/src/models/ee_cloud_backend_projects_envs_list_response.rs @@ -4,26 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudBackendProjectsEnvsListResponse { - #[serde(rename = "environments")] - pub environments: Vec, - #[serde(rename = "watch")] - pub watch: Box, + #[serde(rename = "environments")] + pub environments: Vec, + #[serde(rename = "watch")] + pub watch: Box, } impl EeCloudBackendProjectsEnvsListResponse { - pub fn new( - environments: Vec, - watch: crate::models::WatchResponse, - ) -> EeCloudBackendProjectsEnvsListResponse { - EeCloudBackendProjectsEnvsListResponse { - environments, - watch: Box::new(watch), - } - } + pub fn new(environments: Vec, watch: crate::models::WatchResponse) -> EeCloudBackendProjectsEnvsListResponse { + EeCloudBackendProjectsEnvsListResponse { + environments, + watch: Box::new(watch), + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_backend_projects_envs_prepare_deploy_request.rs b/sdks/rust/src/models/ee_cloud_backend_projects_envs_prepare_deploy_request.rs index feea83d8..1750bb25 100644 --- a/sdks/rust/src/models/ee_cloud_backend_projects_envs_prepare_deploy_request.rs +++ b/sdks/rust/src/models/ee_cloud_backend_projects_envs_prepare_deploy_request.rs @@ -4,21 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudBackendProjectsEnvsPrepareDeployRequest { - /// A list of files preparing to upload. - #[serde(rename = "files")] - pub files: Vec, + /// A list of files preparing to upload. + #[serde(rename = "files")] + pub files: Vec, } impl EeCloudBackendProjectsEnvsPrepareDeployRequest { - pub fn new( - files: Vec, - ) -> EeCloudBackendProjectsEnvsPrepareDeployRequest { - EeCloudBackendProjectsEnvsPrepareDeployRequest { files } - } + pub fn new(files: Vec) -> EeCloudBackendProjectsEnvsPrepareDeployRequest { + EeCloudBackendProjectsEnvsPrepareDeployRequest { + files, + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_backend_projects_envs_prepare_deploy_response.rs b/sdks/rust/src/models/ee_cloud_backend_projects_envs_prepare_deploy_response.rs index d0532750..ba17cd69 100644 --- a/sdks/rust/src/models/ee_cloud_backend_projects_envs_prepare_deploy_response.rs +++ b/sdks/rust/src/models/ee_cloud_backend_projects_envs_prepare_deploy_response.rs @@ -4,26 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudBackendProjectsEnvsPrepareDeployResponse { - #[serde(rename = "presigned_requests")] - pub presigned_requests: Vec, - #[serde(rename = "upload_id")] - pub upload_id: uuid::Uuid, + #[serde(rename = "presigned_requests")] + pub presigned_requests: Vec, + #[serde(rename = "upload_id")] + pub upload_id: uuid::Uuid, } impl EeCloudBackendProjectsEnvsPrepareDeployResponse { - pub fn new( - presigned_requests: Vec, - upload_id: uuid::Uuid, - ) -> EeCloudBackendProjectsEnvsPrepareDeployResponse { - EeCloudBackendProjectsEnvsPrepareDeployResponse { - presigned_requests, - upload_id, - } - } + pub fn new(presigned_requests: Vec, upload_id: uuid::Uuid) -> EeCloudBackendProjectsEnvsPrepareDeployResponse { + EeCloudBackendProjectsEnvsPrepareDeployResponse { + presigned_requests, + upload_id, + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_backend_projects_envs_update_config_request.rs b/sdks/rust/src/models/ee_cloud_backend_projects_envs_update_config_request.rs index a7d5bf29..144eb500 100644 --- a/sdks/rust/src/models/ee_cloud_backend_projects_envs_update_config_request.rs +++ b/sdks/rust/src/models/ee_cloud_backend_projects_envs_update_config_request.rs @@ -4,22 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudBackendProjectsEnvsUpdateConfigRequest { - #[serde(rename = "config")] - pub config: Box, + #[serde(rename = "config")] + pub config: Box, } impl EeCloudBackendProjectsEnvsUpdateConfigRequest { - pub fn new( - config: crate::models::EeBackendNeonProjectConfig, - ) -> EeCloudBackendProjectsEnvsUpdateConfigRequest { - EeCloudBackendProjectsEnvsUpdateConfigRequest { - config: Box::new(config), - } - } + pub fn new(config: crate::models::EeBackendNeonProjectConfig) -> EeCloudBackendProjectsEnvsUpdateConfigRequest { + EeCloudBackendProjectsEnvsUpdateConfigRequest { + config: Box::new(config), + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_backend_projects_envs_update_variables_request.rs b/sdks/rust/src/models/ee_cloud_backend_projects_envs_update_variables_request.rs index 4fd0d99b..f57e619b 100644 --- a/sdks/rust/src/models/ee_cloud_backend_projects_envs_update_variables_request.rs +++ b/sdks/rust/src/models/ee_cloud_backend_projects_envs_update_variables_request.rs @@ -4,20 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudBackendProjectsEnvsUpdateVariablesRequest { - #[serde(rename = "variables")] - pub variables: ::std::collections::HashMap, + #[serde(rename = "variables")] + pub variables: ::std::collections::HashMap, } impl EeCloudBackendProjectsEnvsUpdateVariablesRequest { - pub fn new( - variables: ::std::collections::HashMap, - ) -> EeCloudBackendProjectsEnvsUpdateVariablesRequest { - EeCloudBackendProjectsEnvsUpdateVariablesRequest { variables } - } + pub fn new(variables: ::std::collections::HashMap) -> EeCloudBackendProjectsEnvsUpdateVariablesRequest { + EeCloudBackendProjectsEnvsUpdateVariablesRequest { + variables, + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_backend_projects_envs_validate_request.rs b/sdks/rust/src/models/ee_cloud_backend_projects_envs_validate_request.rs index a3272962..a61924e4 100644 --- a/sdks/rust/src/models/ee_cloud_backend_projects_envs_validate_request.rs +++ b/sdks/rust/src/models/ee_cloud_backend_projects_envs_validate_request.rs @@ -4,25 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudBackendProjectsEnvsValidateRequest { - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - /// A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short. - #[serde(rename = "name_id")] - pub name_id: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + /// A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short. + #[serde(rename = "name_id")] + pub name_id: String, } impl EeCloudBackendProjectsEnvsValidateRequest { - pub fn new(display_name: String, name_id: String) -> EeCloudBackendProjectsEnvsValidateRequest { - EeCloudBackendProjectsEnvsValidateRequest { - display_name, - name_id, - } - } + pub fn new(display_name: String, name_id: String) -> EeCloudBackendProjectsEnvsValidateRequest { + EeCloudBackendProjectsEnvsValidateRequest { + display_name, + name_id, + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_backend_projects_envs_validate_response.rs b/sdks/rust/src/models/ee_cloud_backend_projects_envs_validate_response.rs index 91cf4520..1003db51 100644 --- a/sdks/rust/src/models/ee_cloud_backend_projects_envs_validate_response.rs +++ b/sdks/rust/src/models/ee_cloud_backend_projects_envs_validate_response.rs @@ -4,21 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudBackendProjectsEnvsValidateResponse { - /// A list of validation errors. - #[serde(rename = "errors")] - pub errors: Vec, + /// A list of validation errors. + #[serde(rename = "errors")] + pub errors: Vec, } impl EeCloudBackendProjectsEnvsValidateResponse { - pub fn new( - errors: Vec, - ) -> EeCloudBackendProjectsEnvsValidateResponse { - EeCloudBackendProjectsEnvsValidateResponse { errors } - } + pub fn new(errors: Vec) -> EeCloudBackendProjectsEnvsValidateResponse { + EeCloudBackendProjectsEnvsValidateResponse { + errors, + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_backend_projects_get_response.rs b/sdks/rust/src/models/ee_cloud_backend_projects_get_response.rs index 453afddf..ab4e4362 100644 --- a/sdks/rust/src/models/ee_cloud_backend_projects_get_response.rs +++ b/sdks/rust/src/models/ee_cloud_backend_projects_get_response.rs @@ -4,26 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudBackendProjectsGetResponse { - #[serde(rename = "project")] - pub project: Box, - #[serde(rename = "watch")] - pub watch: Box, + #[serde(rename = "project")] + pub project: Box, + #[serde(rename = "watch")] + pub watch: Box, } impl EeCloudBackendProjectsGetResponse { - pub fn new( - project: crate::models::EeBackendProject, - watch: crate::models::WatchResponse, - ) -> EeCloudBackendProjectsGetResponse { - EeCloudBackendProjectsGetResponse { - project: Box::new(project), - watch: Box::new(watch), - } - } + pub fn new(project: crate::models::EeBackendProject, watch: crate::models::WatchResponse) -> EeCloudBackendProjectsGetResponse { + EeCloudBackendProjectsGetResponse { + project: Box::new(project), + watch: Box::new(watch), + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_backend_projects_list_response.rs b/sdks/rust/src/models/ee_cloud_backend_projects_list_response.rs index 3cb3af8a..64a30fb0 100644 --- a/sdks/rust/src/models/ee_cloud_backend_projects_list_response.rs +++ b/sdks/rust/src/models/ee_cloud_backend_projects_list_response.rs @@ -4,26 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudBackendProjectsListResponse { - #[serde(rename = "projects")] - pub projects: Vec, - #[serde(rename = "watch")] - pub watch: Box, + #[serde(rename = "projects")] + pub projects: Vec, + #[serde(rename = "watch")] + pub watch: Box, } impl EeCloudBackendProjectsListResponse { - pub fn new( - projects: Vec, - watch: crate::models::WatchResponse, - ) -> EeCloudBackendProjectsListResponse { - EeCloudBackendProjectsListResponse { - projects, - watch: Box::new(watch), - } - } + pub fn new(projects: Vec, watch: crate::models::WatchResponse) -> EeCloudBackendProjectsListResponse { + EeCloudBackendProjectsListResponse { + projects, + watch: Box::new(watch), + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_backend_projects_validate_request.rs b/sdks/rust/src/models/ee_cloud_backend_projects_validate_request.rs index 41779f1d..5c29adc9 100644 --- a/sdks/rust/src/models/ee_cloud_backend_projects_validate_request.rs +++ b/sdks/rust/src/models/ee_cloud_backend_projects_validate_request.rs @@ -4,19 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudBackendProjectsValidateRequest { - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, } impl EeCloudBackendProjectsValidateRequest { - pub fn new(display_name: String) -> EeCloudBackendProjectsValidateRequest { - EeCloudBackendProjectsValidateRequest { display_name } - } + pub fn new(display_name: String) -> EeCloudBackendProjectsValidateRequest { + EeCloudBackendProjectsValidateRequest { + display_name, + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_backend_projects_validate_response.rs b/sdks/rust/src/models/ee_cloud_backend_projects_validate_response.rs index 977702d7..af6a020f 100644 --- a/sdks/rust/src/models/ee_cloud_backend_projects_validate_response.rs +++ b/sdks/rust/src/models/ee_cloud_backend_projects_validate_response.rs @@ -4,21 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudBackendProjectsValidateResponse { - /// A list of validation errors. - #[serde(rename = "errors")] - pub errors: Vec, + /// A list of validation errors. + #[serde(rename = "errors")] + pub errors: Vec, } impl EeCloudBackendProjectsValidateResponse { - pub fn new( - errors: Vec, - ) -> EeCloudBackendProjectsValidateResponse { - EeCloudBackendProjectsValidateResponse { errors } - } + pub fn new(errors: Vec) -> EeCloudBackendProjectsValidateResponse { + EeCloudBackendProjectsValidateResponse { + errors, + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_destroyed_lobbies_by_exit_code_data_set.rs b/sdks/rust/src/models/ee_cloud_destroyed_lobbies_by_exit_code_data_set.rs index be5c7daf..bc05f8bb 100644 --- a/sdks/rust/src/models/ee_cloud_destroyed_lobbies_by_exit_code_data_set.rs +++ b/sdks/rust/src/models/ee_cloud_destroyed_lobbies_by_exit_code_data_set.rs @@ -4,30 +4,31 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudDestroyedLobbiesByExitCodeDataSet { - #[serde(rename = "destroyed_lobby_count")] - pub destroyed_lobby_count: Vec, - #[serde(rename = "exit_code")] - pub exit_code: Vec, - #[serde(rename = "ts")] - pub ts: Vec, + #[serde(rename = "destroyed_lobby_count")] + pub destroyed_lobby_count: Vec, + #[serde(rename = "exit_code")] + pub exit_code: Vec, + #[serde(rename = "ts")] + pub ts: Vec, } impl EeCloudDestroyedLobbiesByExitCodeDataSet { - pub fn new( - destroyed_lobby_count: Vec, - exit_code: Vec, - ts: Vec, - ) -> EeCloudDestroyedLobbiesByExitCodeDataSet { - EeCloudDestroyedLobbiesByExitCodeDataSet { - destroyed_lobby_count, - exit_code, - ts, - } - } + pub fn new(destroyed_lobby_count: Vec, exit_code: Vec, ts: Vec) -> EeCloudDestroyedLobbiesByExitCodeDataSet { + EeCloudDestroyedLobbiesByExitCodeDataSet { + destroyed_lobby_count, + exit_code, + ts, + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_destroyed_lobbies_by_failure_data_set.rs b/sdks/rust/src/models/ee_cloud_destroyed_lobbies_by_failure_data_set.rs index 33c20faf..3327c8bb 100644 --- a/sdks/rust/src/models/ee_cloud_destroyed_lobbies_by_failure_data_set.rs +++ b/sdks/rust/src/models/ee_cloud_destroyed_lobbies_by_failure_data_set.rs @@ -4,30 +4,31 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudDestroyedLobbiesByFailureDataSet { - #[serde(rename = "destroyed_lobby_count")] - pub destroyed_lobby_count: Vec, - #[serde(rename = "failed")] - pub failed: Vec, - #[serde(rename = "ts")] - pub ts: Vec, + #[serde(rename = "destroyed_lobby_count")] + pub destroyed_lobby_count: Vec, + #[serde(rename = "failed")] + pub failed: Vec, + #[serde(rename = "ts")] + pub ts: Vec, } impl EeCloudDestroyedLobbiesByFailureDataSet { - pub fn new( - destroyed_lobby_count: Vec, - failed: Vec, - ts: Vec, - ) -> EeCloudDestroyedLobbiesByFailureDataSet { - EeCloudDestroyedLobbiesByFailureDataSet { - destroyed_lobby_count, - failed, - ts, - } - } + pub fn new(destroyed_lobby_count: Vec, failed: Vec, ts: Vec) -> EeCloudDestroyedLobbiesByFailureDataSet { + EeCloudDestroyedLobbiesByFailureDataSet { + destroyed_lobby_count, + failed, + ts, + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_failed_lobbies_data_set.rs b/sdks/rust/src/models/ee_cloud_failed_lobbies_data_set.rs index 014d5675..f637926c 100644 --- a/sdks/rust/src/models/ee_cloud_failed_lobbies_data_set.rs +++ b/sdks/rust/src/models/ee_cloud_failed_lobbies_data_set.rs @@ -4,23 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudFailedLobbiesDataSet { - #[serde(rename = "destroyed_lobby_count")] - pub destroyed_lobby_count: Vec, - #[serde(rename = "ts")] - pub ts: Vec, + #[serde(rename = "destroyed_lobby_count")] + pub destroyed_lobby_count: Vec, + #[serde(rename = "ts")] + pub ts: Vec, } impl EeCloudFailedLobbiesDataSet { - pub fn new(destroyed_lobby_count: Vec, ts: Vec) -> EeCloudFailedLobbiesDataSet { - EeCloudFailedLobbiesDataSet { - destroyed_lobby_count, - ts, - } - } + pub fn new(destroyed_lobby_count: Vec, ts: Vec) -> EeCloudFailedLobbiesDataSet { + EeCloudFailedLobbiesDataSet { + destroyed_lobby_count, + ts, + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_games_billing_dynamic_servers_capacity_region.rs b/sdks/rust/src/models/ee_cloud_games_billing_dynamic_servers_capacity_region.rs deleted file mode 100644 index e353385a..00000000 --- a/sdks/rust/src/models/ee_cloud_games_billing_dynamic_servers_capacity_region.rs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Rivet API EE - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct EeCloudGamesBillingDynamicServersCapacityRegion { - #[serde(rename = "cores")] - pub cores: i32, - #[serde(rename = "region")] - pub region: Box, -} - -impl EeCloudGamesBillingDynamicServersCapacityRegion { - pub fn new( - cores: i32, - region: crate::models::CloudRegionSummary, - ) -> EeCloudGamesBillingDynamicServersCapacityRegion { - EeCloudGamesBillingDynamicServersCapacityRegion { - cores, - region: Box::new(region), - } - } -} diff --git a/sdks/rust/src/models/ee_cloud_games_billing_dynamic_servers_capacity_region_config.rs b/sdks/rust/src/models/ee_cloud_games_billing_dynamic_servers_capacity_region_config.rs deleted file mode 100644 index fbeb2788..00000000 --- a/sdks/rust/src/models/ee_cloud_games_billing_dynamic_servers_capacity_region_config.rs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Rivet API EE - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct EeCloudGamesBillingDynamicServersCapacityRegionConfig { - #[serde(rename = "cores")] - pub cores: i32, - #[serde(rename = "region_id")] - pub region_id: uuid::Uuid, -} - -impl EeCloudGamesBillingDynamicServersCapacityRegionConfig { - pub fn new( - cores: i32, - region_id: uuid::Uuid, - ) -> EeCloudGamesBillingDynamicServersCapacityRegionConfig { - EeCloudGamesBillingDynamicServersCapacityRegionConfig { cores, region_id } - } -} diff --git a/sdks/rust/src/models/ee_cloud_games_billing_get_response.rs b/sdks/rust/src/models/ee_cloud_games_billing_get_response.rs index 219fd2dd..c88ded97 100644 --- a/sdks/rust/src/models/ee_cloud_games_billing_get_response.rs +++ b/sdks/rust/src/models/ee_cloud_games_billing_get_response.rs @@ -4,20 +4,34 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudGamesBillingGetResponse { - #[serde(rename = "plan")] - pub plan: Box, + #[serde(rename = "active_plan")] + pub active_plan: crate::models::EeBillingPlan, + #[serde(rename = "plan")] + pub plan: crate::models::EeBillingPlan, + #[serde(rename = "subscription", skip_serializing_if = "Option::is_none")] + pub subscription: Option>, + #[serde(rename = "watch")] + pub watch: Box, } impl EeCloudGamesBillingGetResponse { - pub fn new(plan: crate::models::EeCloudGamesBillingPlan) -> EeCloudGamesBillingGetResponse { - EeCloudGamesBillingGetResponse { - plan: Box::new(plan), - } - } + pub fn new(active_plan: crate::models::EeBillingPlan, plan: crate::models::EeBillingPlan, watch: crate::models::WatchResponse) -> EeCloudGamesBillingGetResponse { + EeCloudGamesBillingGetResponse { + active_plan, + plan, + subscription: None, + watch: Box::new(watch), + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_games_billing_plan.rs b/sdks/rust/src/models/ee_cloud_games_billing_plan.rs deleted file mode 100644 index 79e14914..00000000 --- a/sdks/rust/src/models/ee_cloud_games_billing_plan.rs +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Rivet API EE - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct EeCloudGamesBillingPlan { - #[serde(rename = "dynamic_servers_capacity")] - pub dynamic_servers_capacity: - Vec, -} - -impl EeCloudGamesBillingPlan { - pub fn new( - dynamic_servers_capacity: Vec< - crate::models::EeCloudGamesBillingDynamicServersCapacityRegion, - >, - ) -> EeCloudGamesBillingPlan { - EeCloudGamesBillingPlan { - dynamic_servers_capacity, - } - } -} diff --git a/sdks/rust/src/models/ee_cloud_games_billing_plan_config.rs b/sdks/rust/src/models/ee_cloud_games_billing_plan_config.rs deleted file mode 100644 index e15b3ec2..00000000 --- a/sdks/rust/src/models/ee_cloud_games_billing_plan_config.rs +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Rivet API EE - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct EeCloudGamesBillingPlanConfig { - #[serde(rename = "dynamic_servers_capacity")] - pub dynamic_servers_capacity: - Vec, -} - -impl EeCloudGamesBillingPlanConfig { - pub fn new( - dynamic_servers_capacity: Vec< - crate::models::EeCloudGamesBillingDynamicServersCapacityRegionConfig, - >, - ) -> EeCloudGamesBillingPlanConfig { - EeCloudGamesBillingPlanConfig { - dynamic_servers_capacity, - } - } -} diff --git a/sdks/rust/src/models/ee_cloud_games_billing_update_plan_request.rs b/sdks/rust/src/models/ee_cloud_games_billing_update_plan_request.rs index d7267949..18fa55e5 100644 --- a/sdks/rust/src/models/ee_cloud_games_billing_update_plan_request.rs +++ b/sdks/rust/src/models/ee_cloud_games_billing_update_plan_request.rs @@ -4,22 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudGamesBillingUpdatePlanRequest { - #[serde(rename = "plan")] - pub plan: Box, + #[serde(rename = "plan")] + pub plan: crate::models::EeBillingPlan, } impl EeCloudGamesBillingUpdatePlanRequest { - pub fn new( - plan: crate::models::EeCloudGamesBillingPlanConfig, - ) -> EeCloudGamesBillingUpdatePlanRequest { - EeCloudGamesBillingUpdatePlanRequest { - plan: Box::new(plan), - } - } + pub fn new(plan: crate::models::EeBillingPlan) -> EeCloudGamesBillingUpdatePlanRequest { + EeCloudGamesBillingUpdatePlanRequest { + plan, + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_games_namespaces_get_analytics_response.rs b/sdks/rust/src/models/ee_cloud_games_namespaces_get_analytics_response.rs index 5482db58..f2c6e4f6 100644 --- a/sdks/rust/src/models/ee_cloud_games_namespaces_get_analytics_response.rs +++ b/sdks/rust/src/models/ee_cloud_games_namespaces_get_analytics_response.rs @@ -4,20 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudGamesNamespacesGetAnalyticsResponse { - #[serde(rename = "data_sets")] - pub data_sets: Vec, + #[serde(rename = "data_sets")] + pub data_sets: Vec, } impl EeCloudGamesNamespacesGetAnalyticsResponse { - pub fn new( - data_sets: Vec, - ) -> EeCloudGamesNamespacesGetAnalyticsResponse { - EeCloudGamesNamespacesGetAnalyticsResponse { data_sets } - } + pub fn new(data_sets: Vec) -> EeCloudGamesNamespacesGetAnalyticsResponse { + EeCloudGamesNamespacesGetAnalyticsResponse { + data_sets, + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_games_projects_get_response.rs b/sdks/rust/src/models/ee_cloud_games_projects_get_response.rs index 3dd8e249..1e71756e 100644 --- a/sdks/rust/src/models/ee_cloud_games_projects_get_response.rs +++ b/sdks/rust/src/models/ee_cloud_games_projects_get_response.rs @@ -4,18 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudGamesProjectsGetResponse { - #[serde(rename = "project", skip_serializing_if = "Option::is_none")] - pub project: Option>, + #[serde(rename = "project", skip_serializing_if = "Option::is_none")] + pub project: Option>, } impl EeCloudGamesProjectsGetResponse { - pub fn new() -> EeCloudGamesProjectsGetResponse { - EeCloudGamesProjectsGetResponse { project: None } - } + pub fn new() -> EeCloudGamesProjectsGetResponse { + EeCloudGamesProjectsGetResponse { + project: None, + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_games_projects_link_request.rs b/sdks/rust/src/models/ee_cloud_games_projects_link_request.rs index 5346ca02..5f3040ab 100644 --- a/sdks/rust/src/models/ee_cloud_games_projects_link_request.rs +++ b/sdks/rust/src/models/ee_cloud_games_projects_link_request.rs @@ -4,18 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudGamesProjectsLinkRequest { - #[serde(rename = "project_id")] - pub project_id: uuid::Uuid, + #[serde(rename = "project_id")] + pub project_id: uuid::Uuid, } impl EeCloudGamesProjectsLinkRequest { - pub fn new(project_id: uuid::Uuid) -> EeCloudGamesProjectsLinkRequest { - EeCloudGamesProjectsLinkRequest { project_id } - } + pub fn new(project_id: uuid::Uuid) -> EeCloudGamesProjectsLinkRequest { + EeCloudGamesProjectsLinkRequest { + project_id, + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_groups_billing_create_stripe_portal_session_request.rs b/sdks/rust/src/models/ee_cloud_groups_billing_create_stripe_portal_session_request.rs index 84a1dbfc..593fbde5 100644 --- a/sdks/rust/src/models/ee_cloud_groups_billing_create_stripe_portal_session_request.rs +++ b/sdks/rust/src/models/ee_cloud_groups_billing_create_stripe_portal_session_request.rs @@ -4,20 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudGroupsBillingCreateStripePortalSessionRequest { - #[serde(rename = "intent")] - pub intent: crate::models::EeCloudGroupsBillingStripePortalSessionIntent, + #[serde(rename = "intent")] + pub intent: crate::models::EeCloudGroupsBillingStripePortalSessionIntent, } impl EeCloudGroupsBillingCreateStripePortalSessionRequest { - pub fn new( - intent: crate::models::EeCloudGroupsBillingStripePortalSessionIntent, - ) -> EeCloudGroupsBillingCreateStripePortalSessionRequest { - EeCloudGroupsBillingCreateStripePortalSessionRequest { intent } - } + pub fn new(intent: crate::models::EeCloudGroupsBillingStripePortalSessionIntent) -> EeCloudGroupsBillingCreateStripePortalSessionRequest { + EeCloudGroupsBillingCreateStripePortalSessionRequest { + intent, + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_groups_billing_create_stripe_portal_session_response.rs b/sdks/rust/src/models/ee_cloud_groups_billing_create_stripe_portal_session_response.rs index 9318b64f..b08b5384 100644 --- a/sdks/rust/src/models/ee_cloud_groups_billing_create_stripe_portal_session_response.rs +++ b/sdks/rust/src/models/ee_cloud_groups_billing_create_stripe_portal_session_response.rs @@ -4,20 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudGroupsBillingCreateStripePortalSessionResponse { - #[serde(rename = "stripe_session_url")] - pub stripe_session_url: String, + #[serde(rename = "stripe_session_url")] + pub stripe_session_url: String, } impl EeCloudGroupsBillingCreateStripePortalSessionResponse { - pub fn new( - stripe_session_url: String, - ) -> EeCloudGroupsBillingCreateStripePortalSessionResponse { - EeCloudGroupsBillingCreateStripePortalSessionResponse { stripe_session_url } - } + pub fn new(stripe_session_url: String) -> EeCloudGroupsBillingCreateStripePortalSessionResponse { + EeCloudGroupsBillingCreateStripePortalSessionResponse { + stripe_session_url, + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_groups_billing_get_billing_response.rs b/sdks/rust/src/models/ee_cloud_groups_billing_get_billing_response.rs index 9f3c0917..781373ab 100644 --- a/sdks/rust/src/models/ee_cloud_groups_billing_get_billing_response.rs +++ b/sdks/rust/src/models/ee_cloud_groups_billing_get_billing_response.rs @@ -4,26 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudGroupsBillingGetBillingResponse { - #[serde(rename = "group")] - pub group: Box, - #[serde(rename = "watch")] - pub watch: Box, + #[serde(rename = "group")] + pub group: Box, + #[serde(rename = "watch")] + pub watch: Box, } impl EeCloudGroupsBillingGetBillingResponse { - pub fn new( - group: crate::models::EeCloudGroupsBillingGroup, - watch: crate::models::WatchResponse, - ) -> EeCloudGroupsBillingGetBillingResponse { - EeCloudGroupsBillingGetBillingResponse { - group: Box::new(group), - watch: Box::new(watch), - } - } + pub fn new(group: crate::models::EeBillingGroup, watch: crate::models::WatchResponse) -> EeCloudGroupsBillingGetBillingResponse { + EeCloudGroupsBillingGetBillingResponse { + group: Box::new(group), + watch: Box::new(watch), + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_groups_billing_get_billing_usage_response.rs b/sdks/rust/src/models/ee_cloud_groups_billing_get_billing_usage_response.rs new file mode 100644 index 00000000..c69a576f --- /dev/null +++ b/sdks/rust/src/models/ee_cloud_groups_billing_get_billing_usage_response.rs @@ -0,0 +1,28 @@ +/* + * Rivet API EE + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct EeCloudGroupsBillingGetBillingUsageResponse { + #[serde(rename = "games")] + pub games: Vec, +} + +impl EeCloudGroupsBillingGetBillingUsageResponse { + pub fn new(games: Vec) -> EeCloudGroupsBillingGetBillingUsageResponse { + EeCloudGroupsBillingGetBillingUsageResponse { + games, + } + } +} + + diff --git a/sdks/rust/src/models/ee_cloud_groups_billing_group.rs b/sdks/rust/src/models/ee_cloud_groups_billing_group.rs deleted file mode 100644 index 7f899bef..00000000 --- a/sdks/rust/src/models/ee_cloud_groups_billing_group.rs +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Rivet API EE - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct EeCloudGroupsBillingGroup { - /// RFC3339 timestamp - #[serde(rename = "payment_failed_ts", skip_serializing_if = "Option::is_none")] - pub payment_failed_ts: Option, - /// RFC3339 timestamp - #[serde( - rename = "payment_method_attached_ts", - skip_serializing_if = "Option::is_none" - )] - pub payment_method_attached_ts: Option, - /// RFC3339 timestamp - #[serde( - rename = "payment_method_valid_ts", - skip_serializing_if = "Option::is_none" - )] - pub payment_method_valid_ts: Option, - /// RFC3339 timestamp - #[serde( - rename = "payment_succeeded_ts", - skip_serializing_if = "Option::is_none" - )] - pub payment_succeeded_ts: Option, -} - -impl EeCloudGroupsBillingGroup { - pub fn new() -> EeCloudGroupsBillingGroup { - EeCloudGroupsBillingGroup { - payment_failed_ts: None, - payment_method_attached_ts: None, - payment_method_valid_ts: None, - payment_succeeded_ts: None, - } - } -} diff --git a/sdks/rust/src/models/ee_cloud_groups_billing_stripe_portal_session_intent.rs b/sdks/rust/src/models/ee_cloud_groups_billing_stripe_portal_session_intent.rs index 30397f48..07a5f082 100644 --- a/sdks/rust/src/models/ee_cloud_groups_billing_stripe_portal_session_intent.rs +++ b/sdks/rust/src/models/ee_cloud_groups_billing_stripe_portal_session_intent.rs @@ -4,30 +4,36 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ -/// + +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum EeCloudGroupsBillingStripePortalSessionIntent { - #[serde(rename = "general")] - General, - #[serde(rename = "payment_method_update")] - PaymentMethodUpdate, + #[serde(rename = "general")] + General, + #[serde(rename = "payment_method_update")] + PaymentMethodUpdate, + } impl ToString for EeCloudGroupsBillingStripePortalSessionIntent { - fn to_string(&self) -> String { - match self { - Self::General => String::from("general"), - Self::PaymentMethodUpdate => String::from("payment_method_update"), - } - } + fn to_string(&self) -> String { + match self { + Self::General => String::from("general"), + Self::PaymentMethodUpdate => String::from("payment_method_update"), + } + } } impl Default for EeCloudGroupsBillingStripePortalSessionIntent { - fn default() -> EeCloudGroupsBillingStripePortalSessionIntent { - Self::General - } + fn default() -> EeCloudGroupsBillingStripePortalSessionIntent { + Self::General + } } + + + + diff --git a/sdks/rust/src/models/ee_cloud_lobby_count_by_game_mode_data_set.rs b/sdks/rust/src/models/ee_cloud_lobby_count_by_game_mode_data_set.rs index efd89c57..fc92004f 100644 --- a/sdks/rust/src/models/ee_cloud_lobby_count_by_game_mode_data_set.rs +++ b/sdks/rust/src/models/ee_cloud_lobby_count_by_game_mode_data_set.rs @@ -4,34 +4,34 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudLobbyCountByGameModeDataSet { - #[serde(rename = "game_mode_id")] - pub game_mode_id: Vec, - #[serde(rename = "game_mode_name_id")] - pub game_mode_name_id: Vec, - #[serde(rename = "lobby_count")] - pub lobby_count: Vec, - #[serde(rename = "ts")] - pub ts: Vec, + #[serde(rename = "game_mode_id")] + pub game_mode_id: Vec, + #[serde(rename = "game_mode_name_id")] + pub game_mode_name_id: Vec, + #[serde(rename = "lobby_count")] + pub lobby_count: Vec, + #[serde(rename = "ts")] + pub ts: Vec, } impl EeCloudLobbyCountByGameModeDataSet { - pub fn new( - game_mode_id: Vec, - game_mode_name_id: Vec, - lobby_count: Vec, - ts: Vec, - ) -> EeCloudLobbyCountByGameModeDataSet { - EeCloudLobbyCountByGameModeDataSet { - game_mode_id, - game_mode_name_id, - lobby_count, - ts, - } - } + pub fn new(game_mode_id: Vec, game_mode_name_id: Vec, lobby_count: Vec, ts: Vec) -> EeCloudLobbyCountByGameModeDataSet { + EeCloudLobbyCountByGameModeDataSet { + game_mode_id, + game_mode_name_id, + lobby_count, + ts, + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_lobby_count_by_region_data_set.rs b/sdks/rust/src/models/ee_cloud_lobby_count_by_region_data_set.rs index 6e38df15..34b8a6f6 100644 --- a/sdks/rust/src/models/ee_cloud_lobby_count_by_region_data_set.rs +++ b/sdks/rust/src/models/ee_cloud_lobby_count_by_region_data_set.rs @@ -4,34 +4,34 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudLobbyCountByRegionDataSet { - #[serde(rename = "lobby_count")] - pub lobby_count: Vec, - #[serde(rename = "region_id")] - pub region_id: Vec, - #[serde(rename = "region_name_id")] - pub region_name_id: Vec, - #[serde(rename = "ts")] - pub ts: Vec, + #[serde(rename = "lobby_count")] + pub lobby_count: Vec, + #[serde(rename = "region_id")] + pub region_id: Vec, + #[serde(rename = "region_name_id")] + pub region_name_id: Vec, + #[serde(rename = "ts")] + pub ts: Vec, } impl EeCloudLobbyCountByRegionDataSet { - pub fn new( - lobby_count: Vec, - region_id: Vec, - region_name_id: Vec, - ts: Vec, - ) -> EeCloudLobbyCountByRegionDataSet { - EeCloudLobbyCountByRegionDataSet { - lobby_count, - region_id, - region_name_id, - ts, - } - } + pub fn new(lobby_count: Vec, region_id: Vec, region_name_id: Vec, ts: Vec) -> EeCloudLobbyCountByRegionDataSet { + EeCloudLobbyCountByRegionDataSet { + lobby_count, + region_id, + region_name_id, + ts, + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_lobby_count_data_set.rs b/sdks/rust/src/models/ee_cloud_lobby_count_data_set.rs index 18177b22..ad0ff6ff 100644 --- a/sdks/rust/src/models/ee_cloud_lobby_count_data_set.rs +++ b/sdks/rust/src/models/ee_cloud_lobby_count_data_set.rs @@ -4,38 +4,37 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudLobbyCountDataSet { - #[serde(rename = "lobby_closed_count")] - pub lobby_closed_count: Vec, - #[serde(rename = "lobby_count")] - pub lobby_count: Vec, - #[serde(rename = "lobby_preemptive_count")] - pub lobby_preemptive_count: Vec, - #[serde(rename = "lobby_unready_count")] - pub lobby_unready_count: Vec, - #[serde(rename = "ts")] - pub ts: Vec, + #[serde(rename = "lobby_closed_count")] + pub lobby_closed_count: Vec, + #[serde(rename = "lobby_count")] + pub lobby_count: Vec, + #[serde(rename = "lobby_preemptive_count")] + pub lobby_preemptive_count: Vec, + #[serde(rename = "lobby_unready_count")] + pub lobby_unready_count: Vec, + #[serde(rename = "ts")] + pub ts: Vec, } impl EeCloudLobbyCountDataSet { - pub fn new( - lobby_closed_count: Vec, - lobby_count: Vec, - lobby_preemptive_count: Vec, - lobby_unready_count: Vec, - ts: Vec, - ) -> EeCloudLobbyCountDataSet { - EeCloudLobbyCountDataSet { - lobby_closed_count, - lobby_count, - lobby_preemptive_count, - lobby_unready_count, - ts, - } - } + pub fn new(lobby_closed_count: Vec, lobby_count: Vec, lobby_preemptive_count: Vec, lobby_unready_count: Vec, ts: Vec) -> EeCloudLobbyCountDataSet { + EeCloudLobbyCountDataSet { + lobby_closed_count, + lobby_count, + lobby_preemptive_count, + lobby_unready_count, + ts, + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_lobby_ready_time_data_set.rs b/sdks/rust/src/models/ee_cloud_lobby_ready_time_data_set.rs index bcd9423c..4caeada5 100644 --- a/sdks/rust/src/models/ee_cloud_lobby_ready_time_data_set.rs +++ b/sdks/rust/src/models/ee_cloud_lobby_ready_time_data_set.rs @@ -4,20 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudLobbyReadyTimeDataSet { - #[serde(rename = "ready_duration")] - pub ready_duration: Vec, - #[serde(rename = "ts")] - pub ts: Vec, + #[serde(rename = "ready_duration")] + pub ready_duration: Vec, + #[serde(rename = "ts")] + pub ts: Vec, } impl EeCloudLobbyReadyTimeDataSet { - pub fn new(ready_duration: Vec, ts: Vec) -> EeCloudLobbyReadyTimeDataSet { - EeCloudLobbyReadyTimeDataSet { ready_duration, ts } - } + pub fn new(ready_duration: Vec, ts: Vec) -> EeCloudLobbyReadyTimeDataSet { + EeCloudLobbyReadyTimeDataSet { + ready_duration, + ts, + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_matchmaker_overview_data_set.rs b/sdks/rust/src/models/ee_cloud_matchmaker_overview_data_set.rs index 01dbafb2..01284b2b 100644 --- a/sdks/rust/src/models/ee_cloud_matchmaker_overview_data_set.rs +++ b/sdks/rust/src/models/ee_cloud_matchmaker_overview_data_set.rs @@ -4,23 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudMatchmakerOverviewDataSet { - #[serde(rename = "lobby_count")] - pub lobby_count: i64, - #[serde(rename = "player_count")] - pub player_count: i64, + #[serde(rename = "lobby_count")] + pub lobby_count: i64, + #[serde(rename = "player_count")] + pub player_count: i64, } impl EeCloudMatchmakerOverviewDataSet { - pub fn new(lobby_count: i64, player_count: i64) -> EeCloudMatchmakerOverviewDataSet { - EeCloudMatchmakerOverviewDataSet { - lobby_count, - player_count, - } - } + pub fn new(lobby_count: i64, player_count: i64) -> EeCloudMatchmakerOverviewDataSet { + EeCloudMatchmakerOverviewDataSet { + lobby_count, + player_count, + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_namespace_analytics_data_set.rs b/sdks/rust/src/models/ee_cloud_namespace_analytics_data_set.rs index dd60197b..3a2cfa8a 100644 --- a/sdks/rust/src/models/ee_cloud_namespace_analytics_data_set.rs +++ b/sdks/rust/src/models/ee_cloud_namespace_analytics_data_set.rs @@ -4,102 +4,70 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudNamespaceAnalyticsDataSet { - #[serde(rename = "avg_play_duration", skip_serializing_if = "Option::is_none")] - pub avg_play_duration: Option>, - #[serde( - rename = "avg_play_duration_by_game_mode", - skip_serializing_if = "Option::is_none" - )] - pub avg_play_duration_by_game_mode: - Option>, - #[serde( - rename = "avg_play_duration_by_region", - skip_serializing_if = "Option::is_none" - )] - pub avg_play_duration_by_region: - Option>, - #[serde( - rename = "destroyed_lobbies_by_exit_code", - skip_serializing_if = "Option::is_none" - )] - pub destroyed_lobbies_by_exit_code: - Option>, - #[serde( - rename = "destroyed_lobbies_by_failure", - skip_serializing_if = "Option::is_none" - )] - pub destroyed_lobbies_by_failure: - Option>, - #[serde(rename = "failed_lobbies", skip_serializing_if = "Option::is_none")] - pub failed_lobbies: Option>, - #[serde(rename = "lobby_count", skip_serializing_if = "Option::is_none")] - pub lobby_count: Option>, - #[serde( - rename = "lobby_count_by_game_mode", - skip_serializing_if = "Option::is_none" - )] - pub lobby_count_by_game_mode: Option>, - #[serde( - rename = "lobby_count_by_region", - skip_serializing_if = "Option::is_none" - )] - pub lobby_count_by_region: Option>, - #[serde(rename = "lobby_ready_time", skip_serializing_if = "Option::is_none")] - pub lobby_ready_time: Option>, - #[serde( - rename = "matchmaker_overview", - skip_serializing_if = "Option::is_none" - )] - pub matchmaker_overview: Option>, - #[serde( - rename = "new_lobbies_per_second", - skip_serializing_if = "Option::is_none" - )] - pub new_lobbies_per_second: Option>, - #[serde( - rename = "new_players_per_second", - skip_serializing_if = "Option::is_none" - )] - pub new_players_per_second: Option>, - #[serde(rename = "player_count", skip_serializing_if = "Option::is_none")] - pub player_count: Option>, - #[serde( - rename = "player_count_by_game_mode", - skip_serializing_if = "Option::is_none" - )] - pub player_count_by_game_mode: Option>, - #[serde( - rename = "player_count_by_region", - skip_serializing_if = "Option::is_none" - )] - pub player_count_by_region: Option>, + #[serde(rename = "avg_play_duration", skip_serializing_if = "Option::is_none")] + pub avg_play_duration: Option>, + #[serde(rename = "avg_play_duration_by_game_mode", skip_serializing_if = "Option::is_none")] + pub avg_play_duration_by_game_mode: Option>, + #[serde(rename = "avg_play_duration_by_region", skip_serializing_if = "Option::is_none")] + pub avg_play_duration_by_region: Option>, + #[serde(rename = "destroyed_lobbies_by_exit_code", skip_serializing_if = "Option::is_none")] + pub destroyed_lobbies_by_exit_code: Option>, + #[serde(rename = "destroyed_lobbies_by_failure", skip_serializing_if = "Option::is_none")] + pub destroyed_lobbies_by_failure: Option>, + #[serde(rename = "failed_lobbies", skip_serializing_if = "Option::is_none")] + pub failed_lobbies: Option>, + #[serde(rename = "lobby_count", skip_serializing_if = "Option::is_none")] + pub lobby_count: Option>, + #[serde(rename = "lobby_count_by_game_mode", skip_serializing_if = "Option::is_none")] + pub lobby_count_by_game_mode: Option>, + #[serde(rename = "lobby_count_by_region", skip_serializing_if = "Option::is_none")] + pub lobby_count_by_region: Option>, + #[serde(rename = "lobby_ready_time", skip_serializing_if = "Option::is_none")] + pub lobby_ready_time: Option>, + #[serde(rename = "matchmaker_overview", skip_serializing_if = "Option::is_none")] + pub matchmaker_overview: Option>, + #[serde(rename = "new_lobbies_per_second", skip_serializing_if = "Option::is_none")] + pub new_lobbies_per_second: Option>, + #[serde(rename = "new_players_per_second", skip_serializing_if = "Option::is_none")] + pub new_players_per_second: Option>, + #[serde(rename = "player_count", skip_serializing_if = "Option::is_none")] + pub player_count: Option>, + #[serde(rename = "player_count_by_game_mode", skip_serializing_if = "Option::is_none")] + pub player_count_by_game_mode: Option>, + #[serde(rename = "player_count_by_region", skip_serializing_if = "Option::is_none")] + pub player_count_by_region: Option>, } impl EeCloudNamespaceAnalyticsDataSet { - pub fn new() -> EeCloudNamespaceAnalyticsDataSet { - EeCloudNamespaceAnalyticsDataSet { - avg_play_duration: None, - avg_play_duration_by_game_mode: None, - avg_play_duration_by_region: None, - destroyed_lobbies_by_exit_code: None, - destroyed_lobbies_by_failure: None, - failed_lobbies: None, - lobby_count: None, - lobby_count_by_game_mode: None, - lobby_count_by_region: None, - lobby_ready_time: None, - matchmaker_overview: None, - new_lobbies_per_second: None, - new_players_per_second: None, - player_count: None, - player_count_by_game_mode: None, - player_count_by_region: None, - } - } + pub fn new() -> EeCloudNamespaceAnalyticsDataSet { + EeCloudNamespaceAnalyticsDataSet { + avg_play_duration: None, + avg_play_duration_by_game_mode: None, + avg_play_duration_by_region: None, + destroyed_lobbies_by_exit_code: None, + destroyed_lobbies_by_failure: None, + failed_lobbies: None, + lobby_count: None, + lobby_count_by_game_mode: None, + lobby_count_by_region: None, + lobby_ready_time: None, + matchmaker_overview: None, + new_lobbies_per_second: None, + new_players_per_second: None, + player_count: None, + player_count_by_game_mode: None, + player_count_by_region: None, + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_new_lobbies_per_second_data_set.rs b/sdks/rust/src/models/ee_cloud_new_lobbies_per_second_data_set.rs index e11bc27d..1080a988 100644 --- a/sdks/rust/src/models/ee_cloud_new_lobbies_per_second_data_set.rs +++ b/sdks/rust/src/models/ee_cloud_new_lobbies_per_second_data_set.rs @@ -4,23 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudNewLobbiesPerSecondDataSet { - #[serde(rename = "new_lobby_count")] - pub new_lobby_count: Vec, - #[serde(rename = "ts")] - pub ts: Vec, + #[serde(rename = "new_lobby_count")] + pub new_lobby_count: Vec, + #[serde(rename = "ts")] + pub ts: Vec, } impl EeCloudNewLobbiesPerSecondDataSet { - pub fn new(new_lobby_count: Vec, ts: Vec) -> EeCloudNewLobbiesPerSecondDataSet { - EeCloudNewLobbiesPerSecondDataSet { - new_lobby_count, - ts, - } - } + pub fn new(new_lobby_count: Vec, ts: Vec) -> EeCloudNewLobbiesPerSecondDataSet { + EeCloudNewLobbiesPerSecondDataSet { + new_lobby_count, + ts, + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_new_players_per_second_data_set.rs b/sdks/rust/src/models/ee_cloud_new_players_per_second_data_set.rs index d0a4cfeb..a006b545 100644 --- a/sdks/rust/src/models/ee_cloud_new_players_per_second_data_set.rs +++ b/sdks/rust/src/models/ee_cloud_new_players_per_second_data_set.rs @@ -4,23 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudNewPlayersPerSecondDataSet { - #[serde(rename = "new_player_count")] - pub new_player_count: Vec, - #[serde(rename = "ts")] - pub ts: Vec, + #[serde(rename = "new_player_count")] + pub new_player_count: Vec, + #[serde(rename = "ts")] + pub ts: Vec, } impl EeCloudNewPlayersPerSecondDataSet { - pub fn new(new_player_count: Vec, ts: Vec) -> EeCloudNewPlayersPerSecondDataSet { - EeCloudNewPlayersPerSecondDataSet { - new_player_count, - ts, - } - } + pub fn new(new_player_count: Vec, ts: Vec) -> EeCloudNewPlayersPerSecondDataSet { + EeCloudNewPlayersPerSecondDataSet { + new_player_count, + ts, + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_player_count_by_game_mode_data_set.rs b/sdks/rust/src/models/ee_cloud_player_count_by_game_mode_data_set.rs index cc3701f3..8d6657b5 100644 --- a/sdks/rust/src/models/ee_cloud_player_count_by_game_mode_data_set.rs +++ b/sdks/rust/src/models/ee_cloud_player_count_by_game_mode_data_set.rs @@ -4,34 +4,34 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudPlayerCountByGameModeDataSet { - #[serde(rename = "game_mode_id")] - pub game_mode_id: Vec, - #[serde(rename = "game_mode_name_id")] - pub game_mode_name_id: Vec, - #[serde(rename = "player_count")] - pub player_count: Vec, - #[serde(rename = "ts")] - pub ts: Vec, + #[serde(rename = "game_mode_id")] + pub game_mode_id: Vec, + #[serde(rename = "game_mode_name_id")] + pub game_mode_name_id: Vec, + #[serde(rename = "player_count")] + pub player_count: Vec, + #[serde(rename = "ts")] + pub ts: Vec, } impl EeCloudPlayerCountByGameModeDataSet { - pub fn new( - game_mode_id: Vec, - game_mode_name_id: Vec, - player_count: Vec, - ts: Vec, - ) -> EeCloudPlayerCountByGameModeDataSet { - EeCloudPlayerCountByGameModeDataSet { - game_mode_id, - game_mode_name_id, - player_count, - ts, - } - } + pub fn new(game_mode_id: Vec, game_mode_name_id: Vec, player_count: Vec, ts: Vec) -> EeCloudPlayerCountByGameModeDataSet { + EeCloudPlayerCountByGameModeDataSet { + game_mode_id, + game_mode_name_id, + player_count, + ts, + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_player_count_by_region_data_set.rs b/sdks/rust/src/models/ee_cloud_player_count_by_region_data_set.rs index bef7e0cd..c4269015 100644 --- a/sdks/rust/src/models/ee_cloud_player_count_by_region_data_set.rs +++ b/sdks/rust/src/models/ee_cloud_player_count_by_region_data_set.rs @@ -4,34 +4,34 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudPlayerCountByRegionDataSet { - #[serde(rename = "player_count")] - pub player_count: Vec, - #[serde(rename = "region_id")] - pub region_id: Vec, - #[serde(rename = "region_name_id")] - pub region_name_id: Vec, - #[serde(rename = "ts")] - pub ts: Vec, + #[serde(rename = "player_count")] + pub player_count: Vec, + #[serde(rename = "region_id")] + pub region_id: Vec, + #[serde(rename = "region_name_id")] + pub region_name_id: Vec, + #[serde(rename = "ts")] + pub ts: Vec, } impl EeCloudPlayerCountByRegionDataSet { - pub fn new( - player_count: Vec, - region_id: Vec, - region_name_id: Vec, - ts: Vec, - ) -> EeCloudPlayerCountByRegionDataSet { - EeCloudPlayerCountByRegionDataSet { - player_count, - region_id, - region_name_id, - ts, - } - } + pub fn new(player_count: Vec, region_id: Vec, region_name_id: Vec, ts: Vec) -> EeCloudPlayerCountByRegionDataSet { + EeCloudPlayerCountByRegionDataSet { + player_count, + region_id, + region_name_id, + ts, + } + } } + + diff --git a/sdks/rust/src/models/ee_cloud_player_count_data_set.rs b/sdks/rust/src/models/ee_cloud_player_count_data_set.rs index e750f941..115719d2 100644 --- a/sdks/rust/src/models/ee_cloud_player_count_data_set.rs +++ b/sdks/rust/src/models/ee_cloud_player_count_data_set.rs @@ -4,30 +4,31 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EeCloudPlayerCountDataSet { - #[serde(rename = "player_count")] - pub player_count: Vec, - #[serde(rename = "player_unready_count")] - pub player_unready_count: Vec, - #[serde(rename = "ts")] - pub ts: Vec, + #[serde(rename = "player_count")] + pub player_count: Vec, + #[serde(rename = "player_unready_count")] + pub player_unready_count: Vec, + #[serde(rename = "ts")] + pub ts: Vec, } impl EeCloudPlayerCountDataSet { - pub fn new( - player_count: Vec, - player_unready_count: Vec, - ts: Vec, - ) -> EeCloudPlayerCountDataSet { - EeCloudPlayerCountDataSet { - player_count, - player_unready_count, - ts, - } - } + pub fn new(player_count: Vec, player_unready_count: Vec, ts: Vec) -> EeCloudPlayerCountDataSet { + EeCloudPlayerCountDataSet { + player_count, + player_unready_count, + ts, + } + } } + + diff --git a/sdks/rust/src/models/error_body.rs b/sdks/rust/src/models/error_body.rs index 3b0a6871..0ecd627e 100644 --- a/sdks/rust/src/models/error_body.rs +++ b/sdks/rust/src/models/error_body.rs @@ -4,38 +4,38 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ErrorBody { - #[serde(rename = "code")] - pub code: String, - #[serde(rename = "documentation", skip_serializing_if = "Option::is_none")] - pub documentation: Option, - #[serde(rename = "message")] - pub message: String, - /// Unstructured metadata relating to an error. Must be manually parsed. - #[serde( - rename = "metadata", - default, - with = "::serde_with::rust::double_option", - skip_serializing_if = "Option::is_none" - )] - pub metadata: Option>, - #[serde(rename = "ray_id")] - pub ray_id: String, + #[serde(rename = "code")] + pub code: String, + #[serde(rename = "documentation", skip_serializing_if = "Option::is_none")] + pub documentation: Option, + #[serde(rename = "message")] + pub message: String, + /// Unstructured metadata relating to an error. Must be manually parsed. + #[serde(rename = "metadata", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub metadata: Option>, + #[serde(rename = "ray_id")] + pub ray_id: String, } impl ErrorBody { - pub fn new(code: String, message: String, ray_id: String) -> ErrorBody { - ErrorBody { - code, - documentation: None, - message, - metadata: None, - ray_id, - } - } + pub fn new(code: String, message: String, ray_id: String) -> ErrorBody { + ErrorBody { + code, + documentation: None, + message, + metadata: None, + ray_id, + } + } } + + diff --git a/sdks/rust/src/models/game_handle.rs b/sdks/rust/src/models/game_handle.rs index 4667c4f1..16751ae2 100644 --- a/sdks/rust/src/models/game_handle.rs +++ b/sdks/rust/src/models/game_handle.rs @@ -4,36 +4,41 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GameHandle { - /// The URL of this game's banner image. - #[serde(rename = "banner_url", skip_serializing_if = "Option::is_none")] - pub banner_url: Option, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "game_id")] - pub game_id: uuid::Uuid, - /// The URL of this game's logo image. - #[serde(rename = "logo_url", skip_serializing_if = "Option::is_none")] - pub logo_url: Option, - /// A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short. - #[serde(rename = "name_id")] - pub name_id: String, + /// The URL of this game's banner image. + #[serde(rename = "banner_url", skip_serializing_if = "Option::is_none")] + pub banner_url: Option, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "game_id")] + pub game_id: uuid::Uuid, + /// The URL of this game's logo image. + #[serde(rename = "logo_url", skip_serializing_if = "Option::is_none")] + pub logo_url: Option, + /// A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short. + #[serde(rename = "name_id")] + pub name_id: String, } impl GameHandle { - pub fn new(display_name: String, game_id: uuid::Uuid, name_id: String) -> GameHandle { - GameHandle { - banner_url: None, - display_name, - game_id, - logo_url: None, - name_id, - } - } + pub fn new(display_name: String, game_id: uuid::Uuid, name_id: String) -> GameHandle { + GameHandle { + banner_url: None, + display_name, + game_id, + logo_url: None, + name_id, + } + } } + + diff --git a/sdks/rust/src/models/game_leaderboard_category.rs b/sdks/rust/src/models/game_leaderboard_category.rs index 8070b967..2072f2b1 100644 --- a/sdks/rust/src/models/game_leaderboard_category.rs +++ b/sdks/rust/src/models/game_leaderboard_category.rs @@ -4,22 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GameLeaderboardCategory : A game leaderboard category. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GameLeaderboardCategory { - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, } impl GameLeaderboardCategory { - /// A game leaderboard category. - pub fn new(display_name: String) -> GameLeaderboardCategory { - GameLeaderboardCategory { display_name } - } + /// A game leaderboard category. + pub fn new(display_name: String) -> GameLeaderboardCategory { + GameLeaderboardCategory { + display_name, + } + } } + + diff --git a/sdks/rust/src/models/game_platform_link.rs b/sdks/rust/src/models/game_platform_link.rs index bad65eea..fc12830a 100644 --- a/sdks/rust/src/models/game_platform_link.rs +++ b/sdks/rust/src/models/game_platform_link.rs @@ -4,25 +4,32 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GamePlatformLink : A platform link denoting a supported platform. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GamePlatformLink { - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - /// The URL to the given game's method of distribution on this platform. - #[serde(rename = "url")] - pub url: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + /// The URL to the given game's method of distribution on this platform. + #[serde(rename = "url")] + pub url: String, } impl GamePlatformLink { - /// A platform link denoting a supported platform. - pub fn new(display_name: String, url: String) -> GamePlatformLink { - GamePlatformLink { display_name, url } - } + /// A platform link denoting a supported platform. + pub fn new(display_name: String, url: String) -> GamePlatformLink { + GamePlatformLink { + display_name, + url, + } + } } + + diff --git a/sdks/rust/src/models/game_profile.rs b/sdks/rust/src/models/game_profile.rs index 19aacc8e..ec909937 100644 --- a/sdks/rust/src/models/game_profile.rs +++ b/sdks/rust/src/models/game_profile.rs @@ -4,82 +4,74 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GameProfile : A game profile. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GameProfile { - /// The URL of this game's banner image. - #[serde(rename = "banner_url", skip_serializing_if = "Option::is_none")] - pub banner_url: Option, - /// A description of the given game. - #[serde(rename = "description")] - pub description: String, - #[serde(rename = "developer")] - pub developer: Box, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "game_id")] - pub game_id: uuid::Uuid, - /// A list of game leaderboard categories. - #[serde(rename = "group_leaderboard_categories")] - pub group_leaderboard_categories: Vec, - /// A list of game leaderboard categories. - #[serde(rename = "identity_leaderboard_categories")] - pub identity_leaderboard_categories: Vec, - /// The URL of this game's logo image. - #[serde(rename = "logo_url", skip_serializing_if = "Option::is_none")] - pub logo_url: Option, - /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. - #[serde(rename = "name_id")] - pub name_id: String, - /// A list of platform links. - #[serde(rename = "platforms")] - pub platforms: Vec, - /// A list of group summaries. - #[serde(rename = "recommended_groups")] - pub recommended_groups: Vec, - /// A list of game tags. - #[serde(rename = "tags")] - pub tags: Vec, - /// The URL to this game's website. - #[serde(rename = "url")] - pub url: String, + /// The URL of this game's banner image. + #[serde(rename = "banner_url", skip_serializing_if = "Option::is_none")] + pub banner_url: Option, + /// A description of the given game. + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "developer")] + pub developer: Box, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "game_id")] + pub game_id: uuid::Uuid, + /// A list of game leaderboard categories. + #[serde(rename = "group_leaderboard_categories")] + pub group_leaderboard_categories: Vec, + /// A list of game leaderboard categories. + #[serde(rename = "identity_leaderboard_categories")] + pub identity_leaderboard_categories: Vec, + /// The URL of this game's logo image. + #[serde(rename = "logo_url", skip_serializing_if = "Option::is_none")] + pub logo_url: Option, + /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. + #[serde(rename = "name_id")] + pub name_id: String, + /// A list of platform links. + #[serde(rename = "platforms")] + pub platforms: Vec, + /// A list of group summaries. + #[serde(rename = "recommended_groups")] + pub recommended_groups: Vec, + /// A list of game tags. + #[serde(rename = "tags")] + pub tags: Vec, + /// The URL to this game's website. + #[serde(rename = "url")] + pub url: String, } impl GameProfile { - /// A game profile. - pub fn new( - description: String, - developer: crate::models::GroupSummary, - display_name: String, - game_id: uuid::Uuid, - group_leaderboard_categories: Vec, - identity_leaderboard_categories: Vec, - name_id: String, - platforms: Vec, - recommended_groups: Vec, - tags: Vec, - url: String, - ) -> GameProfile { - GameProfile { - banner_url: None, - description, - developer: Box::new(developer), - display_name, - game_id, - group_leaderboard_categories, - identity_leaderboard_categories, - logo_url: None, - name_id, - platforms, - recommended_groups, - tags, - url, - } - } + /// A game profile. + pub fn new(description: String, developer: crate::models::GroupSummary, display_name: String, game_id: uuid::Uuid, group_leaderboard_categories: Vec, identity_leaderboard_categories: Vec, name_id: String, platforms: Vec, recommended_groups: Vec, tags: Vec, url: String) -> GameProfile { + GameProfile { + banner_url: None, + description, + developer: Box::new(developer), + display_name, + game_id, + group_leaderboard_categories, + identity_leaderboard_categories, + logo_url: None, + name_id, + platforms, + recommended_groups, + tags, + url, + } + } } + + diff --git a/sdks/rust/src/models/game_stat.rs b/sdks/rust/src/models/game_stat.rs index e0639cf2..d3a2ab78 100644 --- a/sdks/rust/src/models/game_stat.rs +++ b/sdks/rust/src/models/game_stat.rs @@ -4,27 +4,31 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GameStat : A game statistic. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GameStat { - #[serde(rename = "config")] - pub config: Box, - /// A single overall value of the given statistic. - #[serde(rename = "overall_value")] - pub overall_value: f64, + #[serde(rename = "config")] + pub config: Box, + /// A single overall value of the given statistic. + #[serde(rename = "overall_value")] + pub overall_value: f64, } impl GameStat { - /// A game statistic. - pub fn new(config: crate::models::GameStatConfig, overall_value: f64) -> GameStat { - GameStat { - config: Box::new(config), - overall_value, - } - } + /// A game statistic. + pub fn new(config: crate::models::GameStatConfig, overall_value: f64) -> GameStat { + GameStat { + config: Box::new(config), + overall_value, + } + } } + + diff --git a/sdks/rust/src/models/game_stat_aggregation_method.rs b/sdks/rust/src/models/game_stat_aggregation_method.rs index 90cc137a..cb326b1d 100644 --- a/sdks/rust/src/models/game_stat_aggregation_method.rs +++ b/sdks/rust/src/models/game_stat_aggregation_method.rs @@ -4,7 +4,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -13,29 +13,34 @@ /// A value denoting the aggregation method of a game statistic. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum GameStatAggregationMethod { - #[serde(rename = "sum")] - Sum, - #[serde(rename = "average")] - Average, - #[serde(rename = "min")] - Min, - #[serde(rename = "max")] - Max, + #[serde(rename = "sum")] + Sum, + #[serde(rename = "average")] + Average, + #[serde(rename = "min")] + Min, + #[serde(rename = "max")] + Max, + } impl ToString for GameStatAggregationMethod { - fn to_string(&self) -> String { - match self { - Self::Sum => String::from("sum"), - Self::Average => String::from("average"), - Self::Min => String::from("min"), - Self::Max => String::from("max"), - } - } + fn to_string(&self) -> String { + match self { + Self::Sum => String::from("sum"), + Self::Average => String::from("average"), + Self::Min => String::from("min"), + Self::Max => String::from("max"), + } + } } impl Default for GameStatAggregationMethod { - fn default() -> GameStatAggregationMethod { - Self::Sum - } + fn default() -> GameStatAggregationMethod { + Self::Sum + } } + + + + diff --git a/sdks/rust/src/models/game_stat_config.rs b/sdks/rust/src/models/game_stat_config.rs index 4ff405ab..619e37b5 100644 --- a/sdks/rust/src/models/game_stat_config.rs +++ b/sdks/rust/src/models/game_stat_config.rs @@ -4,66 +4,62 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GameStatConfig : A game statistic config. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GameStatConfig { - #[serde(rename = "aggregation")] - pub aggregation: crate::models::GameStatAggregationMethod, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "format")] - pub format: crate::models::GameStatFormatMethod, - #[serde(rename = "icon_id")] - pub icon_id: uuid::Uuid, - /// A string appended to the end of a game statistic's value that is not exactly 1. Example: 45 **dollars**. - #[serde(rename = "postfix_plural", skip_serializing_if = "Option::is_none")] - pub postfix_plural: Option, - /// A string appended to the end of a singular game statistic's value. Example: 1 **dollar**. - #[serde(rename = "postfix_singular", skip_serializing_if = "Option::is_none")] - pub postfix_singular: Option, - /// A string prepended to the beginning of a game statistic's value that is not exactly 1. Example: **values** 45. - #[serde(rename = "prefix_plural", skip_serializing_if = "Option::is_none")] - pub prefix_plural: Option, - /// A string appended to the beginning of a singular game statistic's value. Example: **value** 1. - #[serde(rename = "prefix_singular", skip_serializing_if = "Option::is_none")] - pub prefix_singular: Option, - #[serde(rename = "priority")] - pub priority: i32, - #[serde(rename = "record_id")] - pub record_id: uuid::Uuid, - #[serde(rename = "sorting")] - pub sorting: crate::models::GameStatSortingMethod, + #[serde(rename = "aggregation")] + pub aggregation: crate::models::GameStatAggregationMethod, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "format")] + pub format: crate::models::GameStatFormatMethod, + #[serde(rename = "icon_id")] + pub icon_id: uuid::Uuid, + /// A string appended to the end of a game statistic's value that is not exactly 1. Example: 45 **dollars**. + #[serde(rename = "postfix_plural", skip_serializing_if = "Option::is_none")] + pub postfix_plural: Option, + /// A string appended to the end of a singular game statistic's value. Example: 1 **dollar**. + #[serde(rename = "postfix_singular", skip_serializing_if = "Option::is_none")] + pub postfix_singular: Option, + /// A string prepended to the beginning of a game statistic's value that is not exactly 1. Example: **values** 45. + #[serde(rename = "prefix_plural", skip_serializing_if = "Option::is_none")] + pub prefix_plural: Option, + /// A string appended to the beginning of a singular game statistic's value. Example: **value** 1. + #[serde(rename = "prefix_singular", skip_serializing_if = "Option::is_none")] + pub prefix_singular: Option, + #[serde(rename = "priority")] + pub priority: i32, + #[serde(rename = "record_id")] + pub record_id: uuid::Uuid, + #[serde(rename = "sorting")] + pub sorting: crate::models::GameStatSortingMethod, } impl GameStatConfig { - /// A game statistic config. - pub fn new( - aggregation: crate::models::GameStatAggregationMethod, - display_name: String, - format: crate::models::GameStatFormatMethod, - icon_id: uuid::Uuid, - priority: i32, - record_id: uuid::Uuid, - sorting: crate::models::GameStatSortingMethod, - ) -> GameStatConfig { - GameStatConfig { - aggregation, - display_name, - format, - icon_id, - postfix_plural: None, - postfix_singular: None, - prefix_plural: None, - prefix_singular: None, - priority, - record_id, - sorting, - } - } + /// A game statistic config. + pub fn new(aggregation: crate::models::GameStatAggregationMethod, display_name: String, format: crate::models::GameStatFormatMethod, icon_id: uuid::Uuid, priority: i32, record_id: uuid::Uuid, sorting: crate::models::GameStatSortingMethod) -> GameStatConfig { + GameStatConfig { + aggregation, + display_name, + format, + icon_id, + postfix_plural: None, + postfix_singular: None, + prefix_plural: None, + prefix_singular: None, + priority, + record_id, + sorting, + } + } } + + diff --git a/sdks/rust/src/models/game_stat_format_method.rs b/sdks/rust/src/models/game_stat_format_method.rs index e93c2f99..c4a27889 100644 --- a/sdks/rust/src/models/game_stat_format_method.rs +++ b/sdks/rust/src/models/game_stat_format_method.rs @@ -4,7 +4,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -13,38 +13,43 @@ /// A value denoting the format method of a game statistic. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum GameStatFormatMethod { - #[serde(rename = "integer")] - Integer, - #[serde(rename = "float_1")] - Float1, - #[serde(rename = "float_2")] - Float2, - #[serde(rename = "float_3")] - Float3, - #[serde(rename = "duration_minute")] - DurationMinute, - #[serde(rename = "duration_second")] - DurationSecond, - #[serde(rename = "duration_hundredth_second")] - DurationHundredthSecond, + #[serde(rename = "integer")] + Integer, + #[serde(rename = "float_1")] + Float1, + #[serde(rename = "float_2")] + Float2, + #[serde(rename = "float_3")] + Float3, + #[serde(rename = "duration_minute")] + DurationMinute, + #[serde(rename = "duration_second")] + DurationSecond, + #[serde(rename = "duration_hundredth_second")] + DurationHundredthSecond, + } impl ToString for GameStatFormatMethod { - fn to_string(&self) -> String { - match self { - Self::Integer => String::from("integer"), - Self::Float1 => String::from("float_1"), - Self::Float2 => String::from("float_2"), - Self::Float3 => String::from("float_3"), - Self::DurationMinute => String::from("duration_minute"), - Self::DurationSecond => String::from("duration_second"), - Self::DurationHundredthSecond => String::from("duration_hundredth_second"), - } - } + fn to_string(&self) -> String { + match self { + Self::Integer => String::from("integer"), + Self::Float1 => String::from("float_1"), + Self::Float2 => String::from("float_2"), + Self::Float3 => String::from("float_3"), + Self::DurationMinute => String::from("duration_minute"), + Self::DurationSecond => String::from("duration_second"), + Self::DurationHundredthSecond => String::from("duration_hundredth_second"), + } + } } impl Default for GameStatFormatMethod { - fn default() -> GameStatFormatMethod { - Self::Integer - } + fn default() -> GameStatFormatMethod { + Self::Integer + } } + + + + diff --git a/sdks/rust/src/models/game_stat_sorting_method.rs b/sdks/rust/src/models/game_stat_sorting_method.rs index 636c3599..a34bdbbc 100644 --- a/sdks/rust/src/models/game_stat_sorting_method.rs +++ b/sdks/rust/src/models/game_stat_sorting_method.rs @@ -4,7 +4,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -13,23 +13,28 @@ /// A value denoting the sorting method of a game statistic. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum GameStatSortingMethod { - #[serde(rename = "desc")] - Desc, - #[serde(rename = "asc")] - Asc, + #[serde(rename = "desc")] + Desc, + #[serde(rename = "asc")] + Asc, + } impl ToString for GameStatSortingMethod { - fn to_string(&self) -> String { - match self { - Self::Desc => String::from("desc"), - Self::Asc => String::from("asc"), - } - } + fn to_string(&self) -> String { + match self { + Self::Desc => String::from("desc"), + Self::Asc => String::from("asc"), + } + } } impl Default for GameStatSortingMethod { - fn default() -> GameStatSortingMethod { - Self::Desc - } + fn default() -> GameStatSortingMethod { + Self::Desc + } } + + + + diff --git a/sdks/rust/src/models/game_stat_summary.rs b/sdks/rust/src/models/game_stat_summary.rs index d3d4ee5d..fdaeb5f0 100644 --- a/sdks/rust/src/models/game_stat_summary.rs +++ b/sdks/rust/src/models/game_stat_summary.rs @@ -4,29 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GameStatSummary : A game statistic summary. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GameStatSummary { - #[serde(rename = "game")] - pub game: Box, - #[serde(rename = "stats")] - pub stats: Vec, + #[serde(rename = "game")] + pub game: Box, + #[serde(rename = "stats")] + pub stats: Vec, } impl GameStatSummary { - /// A game statistic summary. - pub fn new( - game: crate::models::GameHandle, - stats: Vec, - ) -> GameStatSummary { - GameStatSummary { - game: Box::new(game), - stats, - } - } + /// A game statistic summary. + pub fn new(game: crate::models::GameHandle, stats: Vec) -> GameStatSummary { + GameStatSummary { + game: Box::new(game), + stats, + } + } } + + diff --git a/sdks/rust/src/models/game_summary.rs b/sdks/rust/src/models/game_summary.rs index 95f201de..ea91e1fd 100644 --- a/sdks/rust/src/models/game_summary.rs +++ b/sdks/rust/src/models/game_summary.rs @@ -4,53 +4,51 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GameSummary { - /// The URL of this game's banner image. - #[serde(rename = "banner_url", skip_serializing_if = "Option::is_none")] - pub banner_url: Option, - #[serde(rename = "developer")] - pub developer: Box, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "game_id")] - pub game_id: uuid::Uuid, - /// The URL of this game's logo image. - #[serde(rename = "logo_url", skip_serializing_if = "Option::is_none")] - pub logo_url: Option, - /// A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short. - #[serde(rename = "name_id")] - pub name_id: String, - /// Unsigned 32 bit integer. - #[serde(rename = "total_player_count")] - pub total_player_count: i32, - #[serde(rename = "url")] - pub url: String, + /// The URL of this game's banner image. + #[serde(rename = "banner_url", skip_serializing_if = "Option::is_none")] + pub banner_url: Option, + #[serde(rename = "developer")] + pub developer: Box, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "game_id")] + pub game_id: uuid::Uuid, + /// The URL of this game's logo image. + #[serde(rename = "logo_url", skip_serializing_if = "Option::is_none")] + pub logo_url: Option, + /// A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short. + #[serde(rename = "name_id")] + pub name_id: String, + /// Unsigned 32 bit integer. + #[serde(rename = "total_player_count")] + pub total_player_count: i32, + #[serde(rename = "url")] + pub url: String, } impl GameSummary { - pub fn new( - developer: crate::models::GroupHandle, - display_name: String, - game_id: uuid::Uuid, - name_id: String, - total_player_count: i32, - url: String, - ) -> GameSummary { - GameSummary { - banner_url: None, - developer: Box::new(developer), - display_name, - game_id, - logo_url: None, - name_id, - total_player_count, - url, - } - } + pub fn new(developer: crate::models::GroupHandle, display_name: String, game_id: uuid::Uuid, name_id: String, total_player_count: i32, url: String) -> GameSummary { + GameSummary { + banner_url: None, + developer: Box::new(developer), + display_name, + game_id, + logo_url: None, + name_id, + total_player_count, + url, + } + } } + + diff --git a/sdks/rust/src/models/geo_coord.rs b/sdks/rust/src/models/geo_coord.rs index 2101e843..c6fe5764 100644 --- a/sdks/rust/src/models/geo_coord.rs +++ b/sdks/rust/src/models/geo_coord.rs @@ -4,26 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GeoCoord : Geographical coordinates for a location on Planet Earth. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GeoCoord { - #[serde(rename = "latitude")] - pub latitude: f64, - #[serde(rename = "longitude")] - pub longitude: f64, + #[serde(rename = "latitude")] + pub latitude: f64, + #[serde(rename = "longitude")] + pub longitude: f64, } impl GeoCoord { - /// Geographical coordinates for a location on Planet Earth. - pub fn new(latitude: f64, longitude: f64) -> GeoCoord { - GeoCoord { - latitude, - longitude, - } - } + /// Geographical coordinates for a location on Planet Earth. + pub fn new(latitude: f64, longitude: f64) -> GeoCoord { + GeoCoord { + latitude, + longitude, + } + } } + + diff --git a/sdks/rust/src/models/geo_distance.rs b/sdks/rust/src/models/geo_distance.rs index d7c91cb7..a33608dc 100644 --- a/sdks/rust/src/models/geo_distance.rs +++ b/sdks/rust/src/models/geo_distance.rs @@ -4,23 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GeoDistance : Distance available in multiple units. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GeoDistance { - #[serde(rename = "kilometers")] - pub kilometers: f64, - #[serde(rename = "miles")] - pub miles: f64, + #[serde(rename = "kilometers")] + pub kilometers: f64, + #[serde(rename = "miles")] + pub miles: f64, } impl GeoDistance { - /// Distance available in multiple units. - pub fn new(kilometers: f64, miles: f64) -> GeoDistance { - GeoDistance { kilometers, miles } - } + /// Distance available in multiple units. + pub fn new(kilometers: f64, miles: f64) -> GeoDistance { + GeoDistance { + kilometers, + miles, + } + } } + + diff --git a/sdks/rust/src/models/global_event_notification.rs b/sdks/rust/src/models/global_event_notification.rs index 8ee9e474..8fd3d0cf 100644 --- a/sdks/rust/src/models/global_event_notification.rs +++ b/sdks/rust/src/models/global_event_notification.rs @@ -4,34 +4,34 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GlobalEventNotification { - #[serde(rename = "description")] - pub description: String, - #[serde(rename = "thumbnail_url")] - pub thumbnail_url: String, - #[serde(rename = "title")] - pub title: String, - #[serde(rename = "url")] - pub url: String, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "thumbnail_url")] + pub thumbnail_url: String, + #[serde(rename = "title")] + pub title: String, + #[serde(rename = "url")] + pub url: String, } impl GlobalEventNotification { - pub fn new( - description: String, - thumbnail_url: String, - title: String, - url: String, - ) -> GlobalEventNotification { - GlobalEventNotification { - description, - thumbnail_url, - title, - url, - } - } + pub fn new(description: String, thumbnail_url: String, title: String, url: String) -> GlobalEventNotification { + GlobalEventNotification { + description, + thumbnail_url, + title, + url, + } + } } + + diff --git a/sdks/rust/src/models/group_banned_identity.rs b/sdks/rust/src/models/group_banned_identity.rs index a1653ff0..b5cbc24c 100644 --- a/sdks/rust/src/models/group_banned_identity.rs +++ b/sdks/rust/src/models/group_banned_identity.rs @@ -4,27 +4,31 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GroupBannedIdentity : A banned identity. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupBannedIdentity { - /// RFC3339 timestamp - #[serde(rename = "ban_ts")] - pub ban_ts: String, - #[serde(rename = "identity")] - pub identity: Box, + /// RFC3339 timestamp + #[serde(rename = "ban_ts")] + pub ban_ts: String, + #[serde(rename = "identity")] + pub identity: Box, } impl GroupBannedIdentity { - /// A banned identity. - pub fn new(ban_ts: String, identity: crate::models::IdentityHandle) -> GroupBannedIdentity { - GroupBannedIdentity { - ban_ts, - identity: Box::new(identity), - } - } + /// A banned identity. + pub fn new(ban_ts: String, identity: crate::models::IdentityHandle) -> GroupBannedIdentity { + GroupBannedIdentity { + ban_ts, + identity: Box::new(identity), + } + } } + + diff --git a/sdks/rust/src/models/group_consume_invite_response.rs b/sdks/rust/src/models/group_consume_invite_response.rs index 4cd58bf2..f7143c9a 100644 --- a/sdks/rust/src/models/group_consume_invite_response.rs +++ b/sdks/rust/src/models/group_consume_invite_response.rs @@ -4,18 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupConsumeInviteResponse { - #[serde(rename = "group_id", skip_serializing_if = "Option::is_none")] - pub group_id: Option, + #[serde(rename = "group_id", skip_serializing_if = "Option::is_none")] + pub group_id: Option, } impl GroupConsumeInviteResponse { - pub fn new() -> GroupConsumeInviteResponse { - GroupConsumeInviteResponse { group_id: None } - } + pub fn new() -> GroupConsumeInviteResponse { + GroupConsumeInviteResponse { + group_id: None, + } + } } + + diff --git a/sdks/rust/src/models/group_create_invite_request.rs b/sdks/rust/src/models/group_create_invite_request.rs index 5638e3bb..0f514c10 100644 --- a/sdks/rust/src/models/group_create_invite_request.rs +++ b/sdks/rust/src/models/group_create_invite_request.rs @@ -4,25 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupCreateInviteRequest { - /// How long until the group invite expires (in milliseconds). - #[serde(rename = "ttl", skip_serializing_if = "Option::is_none")] - pub ttl: Option, - /// How many times the group invite can be used. - #[serde(rename = "use_count", skip_serializing_if = "Option::is_none")] - pub use_count: Option, + /// How long until the group invite expires (in milliseconds). + #[serde(rename = "ttl", skip_serializing_if = "Option::is_none")] + pub ttl: Option, + /// How many times the group invite can be used. + #[serde(rename = "use_count", skip_serializing_if = "Option::is_none")] + pub use_count: Option, } impl GroupCreateInviteRequest { - pub fn new() -> GroupCreateInviteRequest { - GroupCreateInviteRequest { - ttl: None, - use_count: None, - } - } + pub fn new() -> GroupCreateInviteRequest { + GroupCreateInviteRequest { + ttl: None, + use_count: None, + } + } } + + diff --git a/sdks/rust/src/models/group_create_invite_response.rs b/sdks/rust/src/models/group_create_invite_response.rs index 8bc34253..0d511a0d 100644 --- a/sdks/rust/src/models/group_create_invite_response.rs +++ b/sdks/rust/src/models/group_create_invite_response.rs @@ -4,19 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupCreateInviteResponse { - /// The code that will be passed to `rivet.api.group#ConsumeInvite` to join a group. - #[serde(rename = "code")] - pub code: String, + /// The code that will be passed to `rivet.api.group#ConsumeInvite` to join a group. + #[serde(rename = "code")] + pub code: String, } impl GroupCreateInviteResponse { - pub fn new(code: String) -> GroupCreateInviteResponse { - GroupCreateInviteResponse { code } - } + pub fn new(code: String) -> GroupCreateInviteResponse { + GroupCreateInviteResponse { + code, + } + } } + + diff --git a/sdks/rust/src/models/group_create_request.rs b/sdks/rust/src/models/group_create_request.rs index 3222eef0..ab388ed4 100644 --- a/sdks/rust/src/models/group_create_request.rs +++ b/sdks/rust/src/models/group_create_request.rs @@ -4,19 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupCreateRequest { - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, } impl GroupCreateRequest { - pub fn new(display_name: String) -> GroupCreateRequest { - GroupCreateRequest { display_name } - } + pub fn new(display_name: String) -> GroupCreateRequest { + GroupCreateRequest { + display_name, + } + } } + + diff --git a/sdks/rust/src/models/group_create_response.rs b/sdks/rust/src/models/group_create_response.rs index fe8d1307..8e4b145c 100644 --- a/sdks/rust/src/models/group_create_response.rs +++ b/sdks/rust/src/models/group_create_response.rs @@ -4,18 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupCreateResponse { - #[serde(rename = "group_id")] - pub group_id: uuid::Uuid, + #[serde(rename = "group_id")] + pub group_id: uuid::Uuid, } impl GroupCreateResponse { - pub fn new(group_id: uuid::Uuid) -> GroupCreateResponse { - GroupCreateResponse { group_id } - } + pub fn new(group_id: uuid::Uuid) -> GroupCreateResponse { + GroupCreateResponse { + group_id, + } + } } + + diff --git a/sdks/rust/src/models/group_external_links.rs b/sdks/rust/src/models/group_external_links.rs index 52251928..6e9c9945 100644 --- a/sdks/rust/src/models/group_external_links.rs +++ b/sdks/rust/src/models/group_external_links.rs @@ -4,22 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GroupExternalLinks : External links for this group. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupExternalLinks { - /// A link to this group's profile page. - #[serde(rename = "profile")] - pub profile: String, + /// A link to this group's profile page. + #[serde(rename = "profile")] + pub profile: String, } impl GroupExternalLinks { - /// External links for this group. - pub fn new(profile: String) -> GroupExternalLinks { - GroupExternalLinks { profile } - } + /// External links for this group. + pub fn new(profile: String) -> GroupExternalLinks { + GroupExternalLinks { + profile, + } + } } + + diff --git a/sdks/rust/src/models/group_get_bans_response.rs b/sdks/rust/src/models/group_get_bans_response.rs index 6ed27b19..daca9639 100644 --- a/sdks/rust/src/models/group_get_bans_response.rs +++ b/sdks/rust/src/models/group_get_bans_response.rs @@ -4,31 +4,33 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupGetBansResponse { - /// The pagination anchor. - #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] - pub anchor: Option, - /// A list of banned group members. - #[serde(rename = "banned_identities")] - pub banned_identities: Vec, - #[serde(rename = "watch")] - pub watch: Box, + /// The pagination anchor. + #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] + pub anchor: Option, + /// A list of banned group members. + #[serde(rename = "banned_identities")] + pub banned_identities: Vec, + #[serde(rename = "watch")] + pub watch: Box, } impl GroupGetBansResponse { - pub fn new( - banned_identities: Vec, - watch: crate::models::WatchResponse, - ) -> GroupGetBansResponse { - GroupGetBansResponse { - anchor: None, - banned_identities, - watch: Box::new(watch), - } - } + pub fn new(banned_identities: Vec, watch: crate::models::WatchResponse) -> GroupGetBansResponse { + GroupGetBansResponse { + anchor: None, + banned_identities, + watch: Box::new(watch), + } + } } + + diff --git a/sdks/rust/src/models/group_get_invite_response.rs b/sdks/rust/src/models/group_get_invite_response.rs index e5f138ab..76fe24d5 100644 --- a/sdks/rust/src/models/group_get_invite_response.rs +++ b/sdks/rust/src/models/group_get_invite_response.rs @@ -4,20 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupGetInviteResponse { - #[serde(rename = "group")] - pub group: Box, + #[serde(rename = "group")] + pub group: Box, } impl GroupGetInviteResponse { - pub fn new(group: crate::models::GroupHandle) -> GroupGetInviteResponse { - GroupGetInviteResponse { - group: Box::new(group), - } - } + pub fn new(group: crate::models::GroupHandle) -> GroupGetInviteResponse { + GroupGetInviteResponse { + group: Box::new(group), + } + } } + + diff --git a/sdks/rust/src/models/group_get_join_requests_response.rs b/sdks/rust/src/models/group_get_join_requests_response.rs index 2b4802c0..d915a0b1 100644 --- a/sdks/rust/src/models/group_get_join_requests_response.rs +++ b/sdks/rust/src/models/group_get_join_requests_response.rs @@ -4,31 +4,33 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupGetJoinRequestsResponse { - /// The pagination anchor. - #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] - pub anchor: Option, - /// A list of group join requests. - #[serde(rename = "join_requests")] - pub join_requests: Vec, - #[serde(rename = "watch")] - pub watch: Box, + /// The pagination anchor. + #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] + pub anchor: Option, + /// A list of group join requests. + #[serde(rename = "join_requests")] + pub join_requests: Vec, + #[serde(rename = "watch")] + pub watch: Box, } impl GroupGetJoinRequestsResponse { - pub fn new( - join_requests: Vec, - watch: crate::models::WatchResponse, - ) -> GroupGetJoinRequestsResponse { - GroupGetJoinRequestsResponse { - anchor: None, - join_requests, - watch: Box::new(watch), - } - } + pub fn new(join_requests: Vec, watch: crate::models::WatchResponse) -> GroupGetJoinRequestsResponse { + GroupGetJoinRequestsResponse { + anchor: None, + join_requests, + watch: Box::new(watch), + } + } } + + diff --git a/sdks/rust/src/models/group_get_members_response.rs b/sdks/rust/src/models/group_get_members_response.rs index 9623b43b..f53eaced 100644 --- a/sdks/rust/src/models/group_get_members_response.rs +++ b/sdks/rust/src/models/group_get_members_response.rs @@ -4,31 +4,33 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupGetMembersResponse { - /// The pagination anchor. - #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] - pub anchor: Option, - /// A list of group members. - #[serde(rename = "members")] - pub members: Vec, - #[serde(rename = "watch")] - pub watch: Box, + /// The pagination anchor. + #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] + pub anchor: Option, + /// A list of group members. + #[serde(rename = "members")] + pub members: Vec, + #[serde(rename = "watch")] + pub watch: Box, } impl GroupGetMembersResponse { - pub fn new( - members: Vec, - watch: crate::models::WatchResponse, - ) -> GroupGetMembersResponse { - GroupGetMembersResponse { - anchor: None, - members, - watch: Box::new(watch), - } - } + pub fn new(members: Vec, watch: crate::models::WatchResponse) -> GroupGetMembersResponse { + GroupGetMembersResponse { + anchor: None, + members, + watch: Box::new(watch), + } + } } + + diff --git a/sdks/rust/src/models/group_get_profile_response.rs b/sdks/rust/src/models/group_get_profile_response.rs index a8aae8b5..96ba81ae 100644 --- a/sdks/rust/src/models/group_get_profile_response.rs +++ b/sdks/rust/src/models/group_get_profile_response.rs @@ -4,26 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupGetProfileResponse { - #[serde(rename = "group")] - pub group: Box, - #[serde(rename = "watch")] - pub watch: Box, + #[serde(rename = "group")] + pub group: Box, + #[serde(rename = "watch")] + pub watch: Box, } impl GroupGetProfileResponse { - pub fn new( - group: crate::models::GroupProfile, - watch: crate::models::WatchResponse, - ) -> GroupGetProfileResponse { - GroupGetProfileResponse { - group: Box::new(group), - watch: Box::new(watch), - } - } + pub fn new(group: crate::models::GroupProfile, watch: crate::models::WatchResponse) -> GroupGetProfileResponse { + GroupGetProfileResponse { + group: Box::new(group), + watch: Box::new(watch), + } + } } + + diff --git a/sdks/rust/src/models/group_get_summary_response.rs b/sdks/rust/src/models/group_get_summary_response.rs index 06dc3656..b6706be7 100644 --- a/sdks/rust/src/models/group_get_summary_response.rs +++ b/sdks/rust/src/models/group_get_summary_response.rs @@ -4,20 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupGetSummaryResponse { - #[serde(rename = "group")] - pub group: Box, + #[serde(rename = "group")] + pub group: Box, } impl GroupGetSummaryResponse { - pub fn new(group: crate::models::GroupSummary) -> GroupGetSummaryResponse { - GroupGetSummaryResponse { - group: Box::new(group), - } - } + pub fn new(group: crate::models::GroupSummary) -> GroupGetSummaryResponse { + GroupGetSummaryResponse { + group: Box::new(group), + } + } } + + diff --git a/sdks/rust/src/models/group_handle.rs b/sdks/rust/src/models/group_handle.rs index f72f688e..963ef56b 100644 --- a/sdks/rust/src/models/group_handle.rs +++ b/sdks/rust/src/models/group_handle.rs @@ -4,42 +4,42 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GroupHandle : A group handle. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupHandle { - /// The URL of this group's avatar image - #[serde(rename = "avatar_url", skip_serializing_if = "Option::is_none")] - pub avatar_url: Option, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "external")] - pub external: Box, - #[serde(rename = "group_id")] - pub group_id: uuid::Uuid, - /// Whether or not this group is a developer group. - #[serde(rename = "is_developer", skip_serializing_if = "Option::is_none")] - pub is_developer: Option, + /// The URL of this group's avatar image + #[serde(rename = "avatar_url", skip_serializing_if = "Option::is_none")] + pub avatar_url: Option, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "external")] + pub external: Box, + #[serde(rename = "group_id")] + pub group_id: uuid::Uuid, + /// Whether or not this group is a developer group. + #[serde(rename = "is_developer", skip_serializing_if = "Option::is_none")] + pub is_developer: Option, } impl GroupHandle { - /// A group handle. - pub fn new( - display_name: String, - external: crate::models::GroupExternalLinks, - group_id: uuid::Uuid, - ) -> GroupHandle { - GroupHandle { - avatar_url: None, - display_name, - external: Box::new(external), - group_id, - is_developer: None, - } - } + /// A group handle. + pub fn new(display_name: String, external: crate::models::GroupExternalLinks, group_id: uuid::Uuid) -> GroupHandle { + GroupHandle { + avatar_url: None, + display_name, + external: Box::new(external), + group_id, + is_developer: None, + } + } } + + diff --git a/sdks/rust/src/models/group_join_request.rs b/sdks/rust/src/models/group_join_request.rs index 3ddf1831..9621e3a7 100644 --- a/sdks/rust/src/models/group_join_request.rs +++ b/sdks/rust/src/models/group_join_request.rs @@ -4,27 +4,31 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GroupJoinRequest : A group join request. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupJoinRequest { - #[serde(rename = "identity")] - pub identity: Box, - /// RFC3339 timestamp - #[serde(rename = "ts")] - pub ts: String, + #[serde(rename = "identity")] + pub identity: Box, + /// RFC3339 timestamp + #[serde(rename = "ts")] + pub ts: String, } impl GroupJoinRequest { - /// A group join request. - pub fn new(identity: crate::models::IdentityHandle, ts: String) -> GroupJoinRequest { - GroupJoinRequest { - identity: Box::new(identity), - ts, - } - } + /// A group join request. + pub fn new(identity: crate::models::IdentityHandle, ts: String) -> GroupJoinRequest { + GroupJoinRequest { + identity: Box::new(identity), + ts, + } + } } + + diff --git a/sdks/rust/src/models/group_list_suggested_response.rs b/sdks/rust/src/models/group_list_suggested_response.rs index 2866b041..a930c707 100644 --- a/sdks/rust/src/models/group_list_suggested_response.rs +++ b/sdks/rust/src/models/group_list_suggested_response.rs @@ -4,27 +4,29 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupListSuggestedResponse { - /// A list of group summaries. - #[serde(rename = "groups")] - pub groups: Vec, - #[serde(rename = "watch")] - pub watch: Box, + /// A list of group summaries. + #[serde(rename = "groups")] + pub groups: Vec, + #[serde(rename = "watch")] + pub watch: Box, } impl GroupListSuggestedResponse { - pub fn new( - groups: Vec, - watch: crate::models::WatchResponse, - ) -> GroupListSuggestedResponse { - GroupListSuggestedResponse { - groups, - watch: Box::new(watch), - } - } + pub fn new(groups: Vec, watch: crate::models::WatchResponse) -> GroupListSuggestedResponse { + GroupListSuggestedResponse { + groups, + watch: Box::new(watch), + } + } } + + diff --git a/sdks/rust/src/models/group_member.rs b/sdks/rust/src/models/group_member.rs index b6be3e0a..ef27ad8d 100644 --- a/sdks/rust/src/models/group_member.rs +++ b/sdks/rust/src/models/group_member.rs @@ -4,23 +4,27 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GroupMember : A group member. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupMember { - #[serde(rename = "identity")] - pub identity: Box, + #[serde(rename = "identity")] + pub identity: Box, } impl GroupMember { - /// A group member. - pub fn new(identity: crate::models::IdentityHandle) -> GroupMember { - GroupMember { - identity: Box::new(identity), - } - } + /// A group member. + pub fn new(identity: crate::models::IdentityHandle) -> GroupMember { + GroupMember { + identity: Box::new(identity), + } + } } + + diff --git a/sdks/rust/src/models/group_prepare_avatar_upload_request.rs b/sdks/rust/src/models/group_prepare_avatar_upload_request.rs index 3cc88f79..ec995ea7 100644 --- a/sdks/rust/src/models/group_prepare_avatar_upload_request.rs +++ b/sdks/rust/src/models/group_prepare_avatar_upload_request.rs @@ -4,29 +4,34 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupPrepareAvatarUploadRequest { - /// Unsigned 64 bit integer. - #[serde(rename = "content_length")] - pub content_length: i64, - /// The MIME type of the group avatar. - #[serde(rename = "mime", skip_serializing_if = "Option::is_none")] - pub mime: Option, - /// The path/filename of the group avatar. - #[serde(rename = "path")] - pub path: String, + /// Unsigned 64 bit integer. + #[serde(rename = "content_length")] + pub content_length: i64, + /// The MIME type of the group avatar. + #[serde(rename = "mime", skip_serializing_if = "Option::is_none")] + pub mime: Option, + /// The path/filename of the group avatar. + #[serde(rename = "path")] + pub path: String, } impl GroupPrepareAvatarUploadRequest { - pub fn new(content_length: i64, path: String) -> GroupPrepareAvatarUploadRequest { - GroupPrepareAvatarUploadRequest { - content_length, - mime: None, - path, - } - } + pub fn new(content_length: i64, path: String) -> GroupPrepareAvatarUploadRequest { + GroupPrepareAvatarUploadRequest { + content_length, + mime: None, + path, + } + } } + + diff --git a/sdks/rust/src/models/group_prepare_avatar_upload_response.rs b/sdks/rust/src/models/group_prepare_avatar_upload_response.rs index f5ae7227..c71f7f78 100644 --- a/sdks/rust/src/models/group_prepare_avatar_upload_response.rs +++ b/sdks/rust/src/models/group_prepare_avatar_upload_response.rs @@ -4,26 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupPrepareAvatarUploadResponse { - #[serde(rename = "presigned_request")] - pub presigned_request: Box, - #[serde(rename = "upload_id")] - pub upload_id: uuid::Uuid, + #[serde(rename = "presigned_request")] + pub presigned_request: Box, + #[serde(rename = "upload_id")] + pub upload_id: uuid::Uuid, } impl GroupPrepareAvatarUploadResponse { - pub fn new( - presigned_request: crate::models::UploadPresignedRequest, - upload_id: uuid::Uuid, - ) -> GroupPrepareAvatarUploadResponse { - GroupPrepareAvatarUploadResponse { - presigned_request: Box::new(presigned_request), - upload_id, - } - } + pub fn new(presigned_request: crate::models::UploadPresignedRequest, upload_id: uuid::Uuid) -> GroupPrepareAvatarUploadResponse { + GroupPrepareAvatarUploadResponse { + presigned_request: Box::new(presigned_request), + upload_id, + } + } } + + diff --git a/sdks/rust/src/models/group_profile.rs b/sdks/rust/src/models/group_profile.rs index 1f04322e..40f3ecc7 100644 --- a/sdks/rust/src/models/group_profile.rs +++ b/sdks/rust/src/models/group_profile.rs @@ -4,83 +4,72 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GroupProfile : A list of group profiles. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupProfile { - /// The URL of this group's avatar image. - #[serde(rename = "avatar_url", skip_serializing_if = "Option::is_none")] - pub avatar_url: Option, - /// Detailed information about a profile. - #[serde(rename = "bio")] - pub bio: String, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "external")] - pub external: Box, - #[serde(rename = "group_id")] - pub group_id: uuid::Uuid, - /// Whether or not the current identity is a member of this group. - #[serde( - rename = "is_current_identity_member", - skip_serializing_if = "Option::is_none" - )] - pub is_current_identity_member: Option, - /// Whether or not the current identity is currently requesting to join this group. - #[serde( - rename = "is_current_identity_requesting_join", - skip_serializing_if = "Option::is_none" - )] - pub is_current_identity_requesting_join: Option, - /// Whether or not this group is a developer. - #[serde(rename = "is_developer", skip_serializing_if = "Option::is_none")] - pub is_developer: Option, - /// A list of group join requests. - #[serde(rename = "join_requests")] - pub join_requests: Vec, - /// Unsigned 32 bit integer. - #[serde(rename = "member_count", skip_serializing_if = "Option::is_none")] - pub member_count: Option, - /// A list of group members. - #[serde(rename = "members")] - pub members: Vec, - #[serde(rename = "owner_identity_id")] - pub owner_identity_id: uuid::Uuid, - #[serde(rename = "publicity")] - pub publicity: crate::models::GroupPublicity, + /// The URL of this group's avatar image. + #[serde(rename = "avatar_url", skip_serializing_if = "Option::is_none")] + pub avatar_url: Option, + /// Detailed information about a profile. + #[serde(rename = "bio")] + pub bio: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "external")] + pub external: Box, + #[serde(rename = "group_id")] + pub group_id: uuid::Uuid, + /// Whether or not the current identity is a member of this group. + #[serde(rename = "is_current_identity_member", skip_serializing_if = "Option::is_none")] + pub is_current_identity_member: Option, + /// Whether or not the current identity is currently requesting to join this group. + #[serde(rename = "is_current_identity_requesting_join", skip_serializing_if = "Option::is_none")] + pub is_current_identity_requesting_join: Option, + /// Whether or not this group is a developer. + #[serde(rename = "is_developer", skip_serializing_if = "Option::is_none")] + pub is_developer: Option, + /// A list of group join requests. + #[serde(rename = "join_requests")] + pub join_requests: Vec, + /// Unsigned 32 bit integer. + #[serde(rename = "member_count", skip_serializing_if = "Option::is_none")] + pub member_count: Option, + /// A list of group members. + #[serde(rename = "members")] + pub members: Vec, + #[serde(rename = "owner_identity_id")] + pub owner_identity_id: uuid::Uuid, + #[serde(rename = "publicity")] + pub publicity: crate::models::GroupPublicity, } impl GroupProfile { - /// A list of group profiles. - pub fn new( - bio: String, - display_name: String, - external: crate::models::GroupExternalLinks, - group_id: uuid::Uuid, - join_requests: Vec, - members: Vec, - owner_identity_id: uuid::Uuid, - publicity: crate::models::GroupPublicity, - ) -> GroupProfile { - GroupProfile { - avatar_url: None, - bio, - display_name, - external: Box::new(external), - group_id, - is_current_identity_member: None, - is_current_identity_requesting_join: None, - is_developer: None, - join_requests, - member_count: None, - members, - owner_identity_id, - publicity, - } - } + /// A list of group profiles. + pub fn new(bio: String, display_name: String, external: crate::models::GroupExternalLinks, group_id: uuid::Uuid, join_requests: Vec, members: Vec, owner_identity_id: uuid::Uuid, publicity: crate::models::GroupPublicity) -> GroupProfile { + GroupProfile { + avatar_url: None, + bio, + display_name, + external: Box::new(external), + group_id, + is_current_identity_member: None, + is_current_identity_requesting_join: None, + is_developer: None, + join_requests, + member_count: None, + members, + owner_identity_id, + publicity, + } + } } + + diff --git a/sdks/rust/src/models/group_publicity.rs b/sdks/rust/src/models/group_publicity.rs index 46494f5f..f77e988b 100644 --- a/sdks/rust/src/models/group_publicity.rs +++ b/sdks/rust/src/models/group_publicity.rs @@ -4,7 +4,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -13,23 +13,28 @@ /// The current publicity value for the given group. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum GroupPublicity { - #[serde(rename = "open")] - Open, - #[serde(rename = "closed")] - Closed, + #[serde(rename = "open")] + Open, + #[serde(rename = "closed")] + Closed, + } impl ToString for GroupPublicity { - fn to_string(&self) -> String { - match self { - Self::Open => String::from("open"), - Self::Closed => String::from("closed"), - } - } + fn to_string(&self) -> String { + match self { + Self::Open => String::from("open"), + Self::Closed => String::from("closed"), + } + } } impl Default for GroupPublicity { - fn default() -> GroupPublicity { - Self::Open - } + fn default() -> GroupPublicity { + Self::Open + } } + + + + diff --git a/sdks/rust/src/models/group_resolve_join_request_request.rs b/sdks/rust/src/models/group_resolve_join_request_request.rs index a02ea62f..413958f9 100644 --- a/sdks/rust/src/models/group_resolve_join_request_request.rs +++ b/sdks/rust/src/models/group_resolve_join_request_request.rs @@ -4,18 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupResolveJoinRequestRequest { - #[serde(rename = "resolution", skip_serializing_if = "Option::is_none")] - pub resolution: Option, + #[serde(rename = "resolution", skip_serializing_if = "Option::is_none")] + pub resolution: Option, } impl GroupResolveJoinRequestRequest { - pub fn new() -> GroupResolveJoinRequestRequest { - GroupResolveJoinRequestRequest { resolution: None } - } + pub fn new() -> GroupResolveJoinRequestRequest { + GroupResolveJoinRequestRequest { + resolution: None, + } + } } + + diff --git a/sdks/rust/src/models/group_search_response.rs b/sdks/rust/src/models/group_search_response.rs index 1ad55d01..21fe7920 100644 --- a/sdks/rust/src/models/group_search_response.rs +++ b/sdks/rust/src/models/group_search_response.rs @@ -4,24 +4,29 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupSearchResponse { - #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] - pub anchor: Option, - /// A list of group handles. - #[serde(rename = "groups")] - pub groups: Vec, + #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] + pub anchor: Option, + /// A list of group handles. + #[serde(rename = "groups")] + pub groups: Vec, } impl GroupSearchResponse { - pub fn new(groups: Vec) -> GroupSearchResponse { - GroupSearchResponse { - anchor: None, - groups, - } - } + pub fn new(groups: Vec) -> GroupSearchResponse { + GroupSearchResponse { + anchor: None, + groups, + } + } } + + diff --git a/sdks/rust/src/models/group_summary.rs b/sdks/rust/src/models/group_summary.rs index 4510e4c0..922873f0 100644 --- a/sdks/rust/src/models/group_summary.rs +++ b/sdks/rust/src/models/group_summary.rs @@ -4,62 +4,57 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupSummary { - /// The URL of this group's avatar image. - #[serde(rename = "avatar_url", skip_serializing_if = "Option::is_none")] - pub avatar_url: Option, - /// Follows regex ^(?:[^\\n\\r]+\\n?|\\n){1,5}$ - #[serde(rename = "bio")] - pub bio: String, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "external")] - pub external: Box, - #[serde(rename = "group_id")] - pub group_id: uuid::Uuid, - /// Whether or not the current identity is a member of this group. - #[serde(rename = "is_current_identity_member")] - pub is_current_identity_member: bool, - /// **Deprecated** Whether or not this group is a developer. - #[serde(rename = "is_developer")] - pub is_developer: bool, - #[serde(rename = "member_count")] - pub member_count: i32, - #[serde(rename = "owner_identity_id")] - pub owner_identity_id: uuid::Uuid, - #[serde(rename = "publicity")] - pub publicity: crate::models::GroupPublicity, + /// The URL of this group's avatar image. + #[serde(rename = "avatar_url", skip_serializing_if = "Option::is_none")] + pub avatar_url: Option, + /// Follows regex ^(?:[^\\n\\r]+\\n?|\\n){1,5}$ + #[serde(rename = "bio")] + pub bio: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "external")] + pub external: Box, + #[serde(rename = "group_id")] + pub group_id: uuid::Uuid, + /// Whether or not the current identity is a member of this group. + #[serde(rename = "is_current_identity_member")] + pub is_current_identity_member: bool, + /// **Deprecated** Whether or not this group is a developer. + #[serde(rename = "is_developer")] + pub is_developer: bool, + #[serde(rename = "member_count")] + pub member_count: i32, + #[serde(rename = "owner_identity_id")] + pub owner_identity_id: uuid::Uuid, + #[serde(rename = "publicity")] + pub publicity: crate::models::GroupPublicity, } impl GroupSummary { - pub fn new( - bio: String, - display_name: String, - external: crate::models::GroupExternalLinks, - group_id: uuid::Uuid, - is_current_identity_member: bool, - is_developer: bool, - member_count: i32, - owner_identity_id: uuid::Uuid, - publicity: crate::models::GroupPublicity, - ) -> GroupSummary { - GroupSummary { - avatar_url: None, - bio, - display_name, - external: Box::new(external), - group_id, - is_current_identity_member, - is_developer, - member_count, - owner_identity_id, - publicity, - } - } + pub fn new(bio: String, display_name: String, external: crate::models::GroupExternalLinks, group_id: uuid::Uuid, is_current_identity_member: bool, is_developer: bool, member_count: i32, owner_identity_id: uuid::Uuid, publicity: crate::models::GroupPublicity) -> GroupSummary { + GroupSummary { + avatar_url: None, + bio, + display_name, + external: Box::new(external), + group_id, + is_current_identity_member, + is_developer, + member_count, + owner_identity_id, + publicity, + } + } } + + diff --git a/sdks/rust/src/models/group_transfer_ownership_request.rs b/sdks/rust/src/models/group_transfer_ownership_request.rs index 6cab1d07..1df4dac9 100644 --- a/sdks/rust/src/models/group_transfer_ownership_request.rs +++ b/sdks/rust/src/models/group_transfer_ownership_request.rs @@ -4,21 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupTransferOwnershipRequest { - /// Identity to transfer the group to. Must be a member of the group. - #[serde(rename = "new_owner_identity_id")] - pub new_owner_identity_id: String, + /// Identity to transfer the group to. Must be a member of the group. + #[serde(rename = "new_owner_identity_id")] + pub new_owner_identity_id: String, } impl GroupTransferOwnershipRequest { - pub fn new(new_owner_identity_id: String) -> GroupTransferOwnershipRequest { - GroupTransferOwnershipRequest { - new_owner_identity_id, - } - } + pub fn new(new_owner_identity_id: String) -> GroupTransferOwnershipRequest { + GroupTransferOwnershipRequest { + new_owner_identity_id, + } + } } + + diff --git a/sdks/rust/src/models/group_update_profile_request.rs b/sdks/rust/src/models/group_update_profile_request.rs index fd624d80..8a9165ff 100644 --- a/sdks/rust/src/models/group_update_profile_request.rs +++ b/sdks/rust/src/models/group_update_profile_request.rs @@ -4,28 +4,33 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupUpdateProfileRequest { - /// Detailed information about a profile. - #[serde(rename = "bio", skip_serializing_if = "Option::is_none")] - pub bio: Option, - /// Represent a resource's readable display name. - #[serde(rename = "display_name", skip_serializing_if = "Option::is_none")] - pub display_name: Option, - #[serde(rename = "publicity", skip_serializing_if = "Option::is_none")] - pub publicity: Option, + /// Detailed information about a profile. + #[serde(rename = "bio", skip_serializing_if = "Option::is_none")] + pub bio: Option, + /// Represent a resource's readable display name. + #[serde(rename = "display_name", skip_serializing_if = "Option::is_none")] + pub display_name: Option, + #[serde(rename = "publicity", skip_serializing_if = "Option::is_none")] + pub publicity: Option, } impl GroupUpdateProfileRequest { - pub fn new() -> GroupUpdateProfileRequest { - GroupUpdateProfileRequest { - bio: None, - display_name: None, - publicity: None, - } - } + pub fn new() -> GroupUpdateProfileRequest { + GroupUpdateProfileRequest { + bio: None, + display_name: None, + publicity: None, + } + } } + + diff --git a/sdks/rust/src/models/group_validate_profile_request.rs b/sdks/rust/src/models/group_validate_profile_request.rs index 00b9ef27..40854f9d 100644 --- a/sdks/rust/src/models/group_validate_profile_request.rs +++ b/sdks/rust/src/models/group_validate_profile_request.rs @@ -4,28 +4,33 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupValidateProfileRequest { - /// Represent a resource's readable display name. - #[serde(rename = "bio", skip_serializing_if = "Option::is_none")] - pub bio: Option, - /// Represent a resource's readable display name. - #[serde(rename = "display_name", skip_serializing_if = "Option::is_none")] - pub display_name: Option, - #[serde(rename = "publicity", skip_serializing_if = "Option::is_none")] - pub publicity: Option, + /// Represent a resource's readable display name. + #[serde(rename = "bio", skip_serializing_if = "Option::is_none")] + pub bio: Option, + /// Represent a resource's readable display name. + #[serde(rename = "display_name", skip_serializing_if = "Option::is_none")] + pub display_name: Option, + #[serde(rename = "publicity", skip_serializing_if = "Option::is_none")] + pub publicity: Option, } impl GroupValidateProfileRequest { - pub fn new() -> GroupValidateProfileRequest { - GroupValidateProfileRequest { - bio: None, - display_name: None, - publicity: None, - } - } + pub fn new() -> GroupValidateProfileRequest { + GroupValidateProfileRequest { + bio: None, + display_name: None, + publicity: None, + } + } } + + diff --git a/sdks/rust/src/models/group_validate_profile_response.rs b/sdks/rust/src/models/group_validate_profile_response.rs index 3b8cf7eb..257203c6 100644 --- a/sdks/rust/src/models/group_validate_profile_response.rs +++ b/sdks/rust/src/models/group_validate_profile_response.rs @@ -4,19 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupValidateProfileResponse { - /// A list of validation errors. - #[serde(rename = "errors")] - pub errors: Vec, + /// A list of validation errors. + #[serde(rename = "errors")] + pub errors: Vec, } impl GroupValidateProfileResponse { - pub fn new(errors: Vec) -> GroupValidateProfileResponse { - GroupValidateProfileResponse { errors } - } + pub fn new(errors: Vec) -> GroupValidateProfileResponse { + GroupValidateProfileResponse { + errors, + } + } } + + diff --git a/sdks/rust/src/models/identity_access_token_linked_account.rs b/sdks/rust/src/models/identity_access_token_linked_account.rs index cd46b54f..ea4f290a 100644 --- a/sdks/rust/src/models/identity_access_token_linked_account.rs +++ b/sdks/rust/src/models/identity_access_token_linked_account.rs @@ -4,21 +4,27 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// IdentityAccessTokenLinkedAccount : An identity's access token identity. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityAccessTokenLinkedAccount { - #[serde(rename = "name")] - pub name: String, + #[serde(rename = "name")] + pub name: String, } impl IdentityAccessTokenLinkedAccount { - /// An identity's access token identity. - pub fn new(name: String) -> IdentityAccessTokenLinkedAccount { - IdentityAccessTokenLinkedAccount { name } - } + /// An identity's access token identity. + pub fn new(name: String) -> IdentityAccessTokenLinkedAccount { + IdentityAccessTokenLinkedAccount { + name, + } + } } + + diff --git a/sdks/rust/src/models/identity_cancel_game_link_request.rs b/sdks/rust/src/models/identity_cancel_game_link_request.rs index fdc1c3af..9bc1c716 100644 --- a/sdks/rust/src/models/identity_cancel_game_link_request.rs +++ b/sdks/rust/src/models/identity_cancel_game_link_request.rs @@ -4,21 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityCancelGameLinkRequest { - /// Documentation at https://jwt.io/ - #[serde(rename = "identity_link_token")] - pub identity_link_token: String, + /// Documentation at https://jwt.io/ + #[serde(rename = "identity_link_token")] + pub identity_link_token: String, } impl IdentityCancelGameLinkRequest { - pub fn new(identity_link_token: String) -> IdentityCancelGameLinkRequest { - IdentityCancelGameLinkRequest { - identity_link_token, - } - } + pub fn new(identity_link_token: String) -> IdentityCancelGameLinkRequest { + IdentityCancelGameLinkRequest { + identity_link_token, + } + } } + + diff --git a/sdks/rust/src/models/identity_complete_game_link_request.rs b/sdks/rust/src/models/identity_complete_game_link_request.rs index 22474f63..a7606f3a 100644 --- a/sdks/rust/src/models/identity_complete_game_link_request.rs +++ b/sdks/rust/src/models/identity_complete_game_link_request.rs @@ -4,21 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityCompleteGameLinkRequest { - /// Documentation at https://jwt.io/ - #[serde(rename = "identity_link_token")] - pub identity_link_token: String, + /// Documentation at https://jwt.io/ + #[serde(rename = "identity_link_token")] + pub identity_link_token: String, } impl IdentityCompleteGameLinkRequest { - pub fn new(identity_link_token: String) -> IdentityCompleteGameLinkRequest { - IdentityCompleteGameLinkRequest { - identity_link_token, - } - } + pub fn new(identity_link_token: String) -> IdentityCompleteGameLinkRequest { + IdentityCompleteGameLinkRequest { + identity_link_token, + } + } } + + diff --git a/sdks/rust/src/models/identity_dev_state.rs b/sdks/rust/src/models/identity_dev_state.rs index 84f1ecf3..de90b48a 100644 --- a/sdks/rust/src/models/identity_dev_state.rs +++ b/sdks/rust/src/models/identity_dev_state.rs @@ -4,7 +4,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -13,26 +13,31 @@ /// The state of the given identity's developer status. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum IdentityDevState { - #[serde(rename = "inactive")] - Inactive, - #[serde(rename = "pending")] - Pending, - #[serde(rename = "accepted")] - Accepted, + #[serde(rename = "inactive")] + Inactive, + #[serde(rename = "pending")] + Pending, + #[serde(rename = "accepted")] + Accepted, + } impl ToString for IdentityDevState { - fn to_string(&self) -> String { - match self { - Self::Inactive => String::from("inactive"), - Self::Pending => String::from("pending"), - Self::Accepted => String::from("accepted"), - } - } + fn to_string(&self) -> String { + match self { + Self::Inactive => String::from("inactive"), + Self::Pending => String::from("pending"), + Self::Accepted => String::from("accepted"), + } + } } impl Default for IdentityDevState { - fn default() -> IdentityDevState { - Self::Inactive - } + fn default() -> IdentityDevState { + Self::Inactive + } } + + + + diff --git a/sdks/rust/src/models/identity_email_linked_account.rs b/sdks/rust/src/models/identity_email_linked_account.rs index f1a57279..3d615728 100644 --- a/sdks/rust/src/models/identity_email_linked_account.rs +++ b/sdks/rust/src/models/identity_email_linked_account.rs @@ -4,22 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// IdentityEmailLinkedAccount : An identity's linked email. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityEmailLinkedAccount { - /// A valid email address - #[serde(rename = "email")] - pub email: String, + /// A valid email address + #[serde(rename = "email")] + pub email: String, } impl IdentityEmailLinkedAccount { - /// An identity's linked email. - pub fn new(email: String) -> IdentityEmailLinkedAccount { - IdentityEmailLinkedAccount { email } - } + /// An identity's linked email. + pub fn new(email: String) -> IdentityEmailLinkedAccount { + IdentityEmailLinkedAccount { + email, + } + } } + + diff --git a/sdks/rust/src/models/identity_external_links.rs b/sdks/rust/src/models/identity_external_links.rs index dec4dc36..de38610b 100644 --- a/sdks/rust/src/models/identity_external_links.rs +++ b/sdks/rust/src/models/identity_external_links.rs @@ -4,28 +4,32 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// IdentityExternalLinks : External links for an identity. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityExternalLinks { - /// A link to this identity's profile page. - #[serde(rename = "profile")] - pub profile: String, - /// A link to the Rivet settings page. - #[serde(rename = "settings", skip_serializing_if = "Option::is_none")] - pub settings: Option, + /// A link to this identity's profile page. + #[serde(rename = "profile")] + pub profile: String, + /// A link to the Rivet settings page. + #[serde(rename = "settings", skip_serializing_if = "Option::is_none")] + pub settings: Option, } impl IdentityExternalLinks { - /// External links for an identity. - pub fn new(profile: String) -> IdentityExternalLinks { - IdentityExternalLinks { - profile, - settings: None, - } - } + /// External links for an identity. + pub fn new(profile: String) -> IdentityExternalLinks { + IdentityExternalLinks { + profile, + settings: None, + } + } } + + diff --git a/sdks/rust/src/models/identity_game_activity.rs b/sdks/rust/src/models/identity_game_activity.rs index 1bb66f6b..19404bdc 100644 --- a/sdks/rust/src/models/identity_game_activity.rs +++ b/sdks/rust/src/models/identity_game_activity.rs @@ -4,45 +4,39 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// IdentityGameActivity : The game an identity is currently participating in. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityGameActivity { - #[serde(rename = "game")] - pub game: Box, - /// A short activity message about the current game activity. - #[serde(rename = "message")] - pub message: String, - /// JSON data seen only by the given identity and their mutual followers. - #[serde( - rename = "mutual_metadata", - default, - with = "::serde_with::rust::double_option", - skip_serializing_if = "Option::is_none" - )] - pub mutual_metadata: Option>, - /// JSON data seen by anyone. - #[serde( - rename = "public_metadata", - default, - with = "::serde_with::rust::double_option", - skip_serializing_if = "Option::is_none" - )] - pub public_metadata: Option>, + #[serde(rename = "game")] + pub game: Box, + /// A short activity message about the current game activity. + #[serde(rename = "message")] + pub message: String, + /// JSON data seen only by the given identity and their mutual followers. + #[serde(rename = "mutual_metadata", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub mutual_metadata: Option>, + /// JSON data seen by anyone. + #[serde(rename = "public_metadata", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub public_metadata: Option>, } impl IdentityGameActivity { - /// The game an identity is currently participating in. - pub fn new(game: crate::models::GameHandle, message: String) -> IdentityGameActivity { - IdentityGameActivity { - game: Box::new(game), - message, - mutual_metadata: None, - public_metadata: None, - } - } + /// The game an identity is currently participating in. + pub fn new(game: crate::models::GameHandle, message: String) -> IdentityGameActivity { + IdentityGameActivity { + game: Box::new(game), + message, + mutual_metadata: None, + public_metadata: None, + } + } } + + diff --git a/sdks/rust/src/models/identity_game_link_status.rs b/sdks/rust/src/models/identity_game_link_status.rs index e5d30f5b..54343658 100644 --- a/sdks/rust/src/models/identity_game_link_status.rs +++ b/sdks/rust/src/models/identity_game_link_status.rs @@ -4,33 +4,39 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ -/// + +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum IdentityGameLinkStatus { - #[serde(rename = "incomplete")] - Incomplete, - #[serde(rename = "complete")] - Complete, - #[serde(rename = "cancelled")] - Cancelled, + #[serde(rename = "incomplete")] + Incomplete, + #[serde(rename = "complete")] + Complete, + #[serde(rename = "cancelled")] + Cancelled, + } impl ToString for IdentityGameLinkStatus { - fn to_string(&self) -> String { - match self { - Self::Incomplete => String::from("incomplete"), - Self::Complete => String::from("complete"), - Self::Cancelled => String::from("cancelled"), - } - } + fn to_string(&self) -> String { + match self { + Self::Incomplete => String::from("incomplete"), + Self::Complete => String::from("complete"), + Self::Cancelled => String::from("cancelled"), + } + } } impl Default for IdentityGameLinkStatus { - fn default() -> IdentityGameLinkStatus { - Self::Incomplete - } + fn default() -> IdentityGameLinkStatus { + Self::Incomplete + } } + + + + diff --git a/sdks/rust/src/models/identity_get_game_link_new_identity.rs b/sdks/rust/src/models/identity_get_game_link_new_identity.rs index 2483a9d8..c2b51b9e 100644 --- a/sdks/rust/src/models/identity_get_game_link_new_identity.rs +++ b/sdks/rust/src/models/identity_get_game_link_new_identity.rs @@ -4,32 +4,33 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityGetGameLinkNewIdentity { - #[serde(rename = "identity")] - pub identity: Box, - /// Documentation at https://jwt.io/ - #[serde(rename = "identity_token")] - pub identity_token: String, - /// RFC3339 timestamp - #[serde(rename = "identity_token_expire_ts")] - pub identity_token_expire_ts: String, + #[serde(rename = "identity")] + pub identity: Box, + /// Documentation at https://jwt.io/ + #[serde(rename = "identity_token")] + pub identity_token: String, + /// RFC3339 timestamp + #[serde(rename = "identity_token_expire_ts")] + pub identity_token_expire_ts: String, } impl IdentityGetGameLinkNewIdentity { - pub fn new( - identity: crate::models::IdentityProfile, - identity_token: String, - identity_token_expire_ts: String, - ) -> IdentityGetGameLinkNewIdentity { - IdentityGetGameLinkNewIdentity { - identity: Box::new(identity), - identity_token, - identity_token_expire_ts, - } - } + pub fn new(identity: crate::models::IdentityProfile, identity_token: String, identity_token_expire_ts: String) -> IdentityGetGameLinkNewIdentity { + IdentityGetGameLinkNewIdentity { + identity: Box::new(identity), + identity_token, + identity_token_expire_ts, + } + } } + + diff --git a/sdks/rust/src/models/identity_get_game_link_response.rs b/sdks/rust/src/models/identity_get_game_link_response.rs index e41db7ce..b6da148f 100644 --- a/sdks/rust/src/models/identity_get_game_link_response.rs +++ b/sdks/rust/src/models/identity_get_game_link_response.rs @@ -4,37 +4,37 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityGetGameLinkResponse { - #[serde(rename = "current_identity")] - pub current_identity: Box, - #[serde(rename = "game")] - pub game: Box, - #[serde(rename = "new_identity", skip_serializing_if = "Option::is_none")] - pub new_identity: Option>, - #[serde(rename = "status")] - pub status: crate::models::IdentityGameLinkStatus, - #[serde(rename = "watch")] - pub watch: Box, + #[serde(rename = "current_identity")] + pub current_identity: Box, + #[serde(rename = "game")] + pub game: Box, + #[serde(rename = "new_identity", skip_serializing_if = "Option::is_none")] + pub new_identity: Option>, + #[serde(rename = "status")] + pub status: crate::models::IdentityGameLinkStatus, + #[serde(rename = "watch")] + pub watch: Box, } impl IdentityGetGameLinkResponse { - pub fn new( - current_identity: crate::models::IdentityHandle, - game: crate::models::GameHandle, - status: crate::models::IdentityGameLinkStatus, - watch: crate::models::WatchResponse, - ) -> IdentityGetGameLinkResponse { - IdentityGetGameLinkResponse { - current_identity: Box::new(current_identity), - game: Box::new(game), - new_identity: None, - status, - watch: Box::new(watch), - } - } + pub fn new(current_identity: crate::models::IdentityHandle, game: crate::models::GameHandle, status: crate::models::IdentityGameLinkStatus, watch: crate::models::WatchResponse) -> IdentityGetGameLinkResponse { + IdentityGetGameLinkResponse { + current_identity: Box::new(current_identity), + game: Box::new(game), + new_identity: None, + status, + watch: Box::new(watch), + } + } } + + diff --git a/sdks/rust/src/models/identity_get_handles_response.rs b/sdks/rust/src/models/identity_get_handles_response.rs index 3f28d443..ea6433b0 100644 --- a/sdks/rust/src/models/identity_get_handles_response.rs +++ b/sdks/rust/src/models/identity_get_handles_response.rs @@ -4,26 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityGetHandlesResponse { - #[serde(rename = "identities")] - pub identities: Vec, - #[serde(rename = "watch")] - pub watch: Box, + #[serde(rename = "identities")] + pub identities: Vec, + #[serde(rename = "watch")] + pub watch: Box, } impl IdentityGetHandlesResponse { - pub fn new( - identities: Vec, - watch: crate::models::WatchResponse, - ) -> IdentityGetHandlesResponse { - IdentityGetHandlesResponse { - identities, - watch: Box::new(watch), - } - } + pub fn new(identities: Vec, watch: crate::models::WatchResponse) -> IdentityGetHandlesResponse { + IdentityGetHandlesResponse { + identities, + watch: Box::new(watch), + } + } } + + diff --git a/sdks/rust/src/models/identity_get_profile_response.rs b/sdks/rust/src/models/identity_get_profile_response.rs index 891df259..12e76c2d 100644 --- a/sdks/rust/src/models/identity_get_profile_response.rs +++ b/sdks/rust/src/models/identity_get_profile_response.rs @@ -4,26 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityGetProfileResponse { - #[serde(rename = "identity")] - pub identity: Box, - #[serde(rename = "watch")] - pub watch: Box, + #[serde(rename = "identity")] + pub identity: Box, + #[serde(rename = "watch")] + pub watch: Box, } impl IdentityGetProfileResponse { - pub fn new( - identity: crate::models::IdentityProfile, - watch: crate::models::WatchResponse, - ) -> IdentityGetProfileResponse { - IdentityGetProfileResponse { - identity: Box::new(identity), - watch: Box::new(watch), - } - } + pub fn new(identity: crate::models::IdentityProfile, watch: crate::models::WatchResponse) -> IdentityGetProfileResponse { + IdentityGetProfileResponse { + identity: Box::new(identity), + watch: Box::new(watch), + } + } } + + diff --git a/sdks/rust/src/models/identity_get_summaries_response.rs b/sdks/rust/src/models/identity_get_summaries_response.rs index bcab4ed1..87659b18 100644 --- a/sdks/rust/src/models/identity_get_summaries_response.rs +++ b/sdks/rust/src/models/identity_get_summaries_response.rs @@ -4,26 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityGetSummariesResponse { - #[serde(rename = "identities")] - pub identities: Vec, - #[serde(rename = "watch")] - pub watch: Box, + #[serde(rename = "identities")] + pub identities: Vec, + #[serde(rename = "watch")] + pub watch: Box, } impl IdentityGetSummariesResponse { - pub fn new( - identities: Vec, - watch: crate::models::WatchResponse, - ) -> IdentityGetSummariesResponse { - IdentityGetSummariesResponse { - identities, - watch: Box::new(watch), - } - } + pub fn new(identities: Vec, watch: crate::models::WatchResponse) -> IdentityGetSummariesResponse { + IdentityGetSummariesResponse { + identities, + watch: Box::new(watch), + } + } } + + diff --git a/sdks/rust/src/models/identity_global_event.rs b/sdks/rust/src/models/identity_global_event.rs index 37c8fffc..4a059e99 100644 --- a/sdks/rust/src/models/identity_global_event.rs +++ b/sdks/rust/src/models/identity_global_event.rs @@ -4,30 +4,34 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// IdentityGlobalEvent : An event relevant to the current identity. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityGlobalEvent { - #[serde(rename = "kind")] - pub kind: Box, - #[serde(rename = "notification", skip_serializing_if = "Option::is_none")] - pub notification: Option>, - /// RFC3339 timestamp - #[serde(rename = "ts")] - pub ts: String, + #[serde(rename = "kind")] + pub kind: Box, + #[serde(rename = "notification", skip_serializing_if = "Option::is_none")] + pub notification: Option>, + /// RFC3339 timestamp + #[serde(rename = "ts")] + pub ts: String, } impl IdentityGlobalEvent { - /// An event relevant to the current identity. - pub fn new(kind: crate::models::IdentityGlobalEventKind, ts: String) -> IdentityGlobalEvent { - IdentityGlobalEvent { - kind: Box::new(kind), - notification: None, - ts, - } - } + /// An event relevant to the current identity. + pub fn new(kind: crate::models::IdentityGlobalEventKind, ts: String) -> IdentityGlobalEvent { + IdentityGlobalEvent { + kind: Box::new(kind), + notification: None, + ts, + } + } } + + diff --git a/sdks/rust/src/models/identity_global_event_identity_update.rs b/sdks/rust/src/models/identity_global_event_identity_update.rs index 2f6de024..710d419e 100644 --- a/sdks/rust/src/models/identity_global_event_identity_update.rs +++ b/sdks/rust/src/models/identity_global_event_identity_update.rs @@ -4,20 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityGlobalEventIdentityUpdate { - #[serde(rename = "identity")] - pub identity: Box, + #[serde(rename = "identity")] + pub identity: Box, } impl IdentityGlobalEventIdentityUpdate { - pub fn new(identity: crate::models::IdentityProfile) -> IdentityGlobalEventIdentityUpdate { - IdentityGlobalEventIdentityUpdate { - identity: Box::new(identity), - } - } + pub fn new(identity: crate::models::IdentityProfile) -> IdentityGlobalEventIdentityUpdate { + IdentityGlobalEventIdentityUpdate { + identity: Box::new(identity), + } + } } + + diff --git a/sdks/rust/src/models/identity_global_event_kind.rs b/sdks/rust/src/models/identity_global_event_kind.rs index e1474b1b..12977855 100644 --- a/sdks/rust/src/models/identity_global_event_kind.rs +++ b/sdks/rust/src/models/identity_global_event_kind.rs @@ -4,26 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityGlobalEventKind { - #[serde(rename = "identity_update", skip_serializing_if = "Option::is_none")] - pub identity_update: Option>, - #[serde( - rename = "matchmaker_lobby_join", - skip_serializing_if = "Option::is_none" - )] - pub matchmaker_lobby_join: Option>, + #[serde(rename = "identity_update", skip_serializing_if = "Option::is_none")] + pub identity_update: Option>, + #[serde(rename = "matchmaker_lobby_join", skip_serializing_if = "Option::is_none")] + pub matchmaker_lobby_join: Option>, } impl IdentityGlobalEventKind { - pub fn new() -> IdentityGlobalEventKind { - IdentityGlobalEventKind { - identity_update: None, - matchmaker_lobby_join: None, - } - } + pub fn new() -> IdentityGlobalEventKind { + IdentityGlobalEventKind { + identity_update: None, + matchmaker_lobby_join: None, + } + } } + + diff --git a/sdks/rust/src/models/identity_global_event_matchmaker_lobby_join.rs b/sdks/rust/src/models/identity_global_event_matchmaker_lobby_join.rs index 1652595b..76ad279c 100644 --- a/sdks/rust/src/models/identity_global_event_matchmaker_lobby_join.rs +++ b/sdks/rust/src/models/identity_global_event_matchmaker_lobby_join.rs @@ -4,30 +4,31 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityGlobalEventMatchmakerLobbyJoin { - #[serde(rename = "lobby")] - pub lobby: Box, - #[serde(rename = "player")] - pub player: Box, - #[serde(rename = "ports")] - pub ports: ::std::collections::HashMap, + #[serde(rename = "lobby")] + pub lobby: Box, + #[serde(rename = "player")] + pub player: Box, + #[serde(rename = "ports")] + pub ports: ::std::collections::HashMap, } impl IdentityGlobalEventMatchmakerLobbyJoin { - pub fn new( - lobby: crate::models::MatchmakerJoinLobby, - player: crate::models::MatchmakerJoinPlayer, - ports: ::std::collections::HashMap, - ) -> IdentityGlobalEventMatchmakerLobbyJoin { - IdentityGlobalEventMatchmakerLobbyJoin { - lobby: Box::new(lobby), - player: Box::new(player), - ports, - } - } + pub fn new(lobby: crate::models::MatchmakerJoinLobby, player: crate::models::MatchmakerJoinPlayer, ports: ::std::collections::HashMap) -> IdentityGlobalEventMatchmakerLobbyJoin { + IdentityGlobalEventMatchmakerLobbyJoin { + lobby: Box::new(lobby), + player: Box::new(player), + ports, + } + } } + + diff --git a/sdks/rust/src/models/identity_global_event_notification.rs b/sdks/rust/src/models/identity_global_event_notification.rs index 11fbc728..d1bad15a 100644 --- a/sdks/rust/src/models/identity_global_event_notification.rs +++ b/sdks/rust/src/models/identity_global_event_notification.rs @@ -4,39 +4,38 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// IdentityGlobalEventNotification : Notifications represent information that should be presented to the user immediately. At the moment, only chat message events have associated notifications. # Display Notifications should be displayed in an unobtrusive manner throughout the entire game. Notifications should disappear after a few seconds if not interacted with. # Interactions If your platform supports it, notifications should be able to be clicked or tapped in order to open the relevant context for the event. For a simple implementation of notification interactions, open `url` in a web browser to present the relevant context. For example, a chat message notification will open the thread the chat message was sent in. For advanced implementations that implement a custom chat UI, use `GlobalEvent.kind` to determine what action to take when the notification is interacted with. For example, if the global event kind is `GlobalEventChatMessage`, then open the chat UI for the given thread. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityGlobalEventNotification { - #[serde(rename = "description")] - pub description: String, - /// URL to an image thumbnail that should be shown for this notification. - #[serde(rename = "thumbnail_url")] - pub thumbnail_url: String, - #[serde(rename = "title")] - pub title: String, - /// Rivet Hub URL that holds the relevant context for this notification. - #[serde(rename = "url")] - pub url: String, + #[serde(rename = "description")] + pub description: String, + /// URL to an image thumbnail that should be shown for this notification. + #[serde(rename = "thumbnail_url")] + pub thumbnail_url: String, + #[serde(rename = "title")] + pub title: String, + /// Rivet Hub URL that holds the relevant context for this notification. + #[serde(rename = "url")] + pub url: String, } impl IdentityGlobalEventNotification { - /// Notifications represent information that should be presented to the user immediately. At the moment, only chat message events have associated notifications. # Display Notifications should be displayed in an unobtrusive manner throughout the entire game. Notifications should disappear after a few seconds if not interacted with. # Interactions If your platform supports it, notifications should be able to be clicked or tapped in order to open the relevant context for the event. For a simple implementation of notification interactions, open `url` in a web browser to present the relevant context. For example, a chat message notification will open the thread the chat message was sent in. For advanced implementations that implement a custom chat UI, use `GlobalEvent.kind` to determine what action to take when the notification is interacted with. For example, if the global event kind is `GlobalEventChatMessage`, then open the chat UI for the given thread. - pub fn new( - description: String, - thumbnail_url: String, - title: String, - url: String, - ) -> IdentityGlobalEventNotification { - IdentityGlobalEventNotification { - description, - thumbnail_url, - title, - url, - } - } + /// Notifications represent information that should be presented to the user immediately. At the moment, only chat message events have associated notifications. # Display Notifications should be displayed in an unobtrusive manner throughout the entire game. Notifications should disappear after a few seconds if not interacted with. # Interactions If your platform supports it, notifications should be able to be clicked or tapped in order to open the relevant context for the event. For a simple implementation of notification interactions, open `url` in a web browser to present the relevant context. For example, a chat message notification will open the thread the chat message was sent in. For advanced implementations that implement a custom chat UI, use `GlobalEvent.kind` to determine what action to take when the notification is interacted with. For example, if the global event kind is `GlobalEventChatMessage`, then open the chat UI for the given thread. + pub fn new(description: String, thumbnail_url: String, title: String, url: String) -> IdentityGlobalEventNotification { + IdentityGlobalEventNotification { + description, + thumbnail_url, + title, + url, + } + } } + + diff --git a/sdks/rust/src/models/identity_group.rs b/sdks/rust/src/models/identity_group.rs index c4302034..be46af79 100644 --- a/sdks/rust/src/models/identity_group.rs +++ b/sdks/rust/src/models/identity_group.rs @@ -4,23 +4,27 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// IdentityGroup : A group that the given identity. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityGroup { - #[serde(rename = "group")] - pub group: Box, + #[serde(rename = "group")] + pub group: Box, } impl IdentityGroup { - /// A group that the given identity. - pub fn new(group: crate::models::GroupHandle) -> IdentityGroup { - IdentityGroup { - group: Box::new(group), - } - } + /// A group that the given identity. + pub fn new(group: crate::models::GroupHandle) -> IdentityGroup { + IdentityGroup { + group: Box::new(group), + } + } } + + diff --git a/sdks/rust/src/models/identity_handle.rs b/sdks/rust/src/models/identity_handle.rs index 30ed19c3..efef4cfe 100644 --- a/sdks/rust/src/models/identity_handle.rs +++ b/sdks/rust/src/models/identity_handle.rs @@ -4,51 +4,48 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// IdentityHandle : An identity handle. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityHandle { - #[serde(rename = "account_number")] - pub account_number: i32, - /// The URL of this identity's avatar image. - #[serde(rename = "avatar_url")] - pub avatar_url: String, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "external")] - pub external: Box, - #[serde(rename = "identity_id")] - pub identity_id: uuid::Uuid, - /// Whether or not this identity is registered with a linked account. - #[serde(rename = "is_registered")] - pub is_registered: bool, - #[serde(rename = "presence", skip_serializing_if = "Option::is_none")] - pub presence: Option>, + #[serde(rename = "account_number")] + pub account_number: i32, + /// The URL of this identity's avatar image. + #[serde(rename = "avatar_url")] + pub avatar_url: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "external")] + pub external: Box, + #[serde(rename = "identity_id")] + pub identity_id: uuid::Uuid, + /// Whether or not this identity is registered with a linked account. + #[serde(rename = "is_registered")] + pub is_registered: bool, + #[serde(rename = "presence", skip_serializing_if = "Option::is_none")] + pub presence: Option>, } impl IdentityHandle { - /// An identity handle. - pub fn new( - account_number: i32, - avatar_url: String, - display_name: String, - external: crate::models::IdentityExternalLinks, - identity_id: uuid::Uuid, - is_registered: bool, - ) -> IdentityHandle { - IdentityHandle { - account_number, - avatar_url, - display_name, - external: Box::new(external), - identity_id, - is_registered, - presence: None, - } - } + /// An identity handle. + pub fn new(account_number: i32, avatar_url: String, display_name: String, external: crate::models::IdentityExternalLinks, identity_id: uuid::Uuid, is_registered: bool) -> IdentityHandle { + IdentityHandle { + account_number, + avatar_url, + display_name, + external: Box::new(external), + identity_id, + is_registered, + presence: None, + } + } } + + diff --git a/sdks/rust/src/models/identity_linked_account.rs b/sdks/rust/src/models/identity_linked_account.rs index 86986a29..f44c2cbf 100644 --- a/sdks/rust/src/models/identity_linked_account.rs +++ b/sdks/rust/src/models/identity_linked_account.rs @@ -4,26 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// IdentityLinkedAccount : A union representing an identity's linked accounts. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityLinkedAccount { - #[serde(rename = "access_token", skip_serializing_if = "Option::is_none")] - pub access_token: Option>, - #[serde(rename = "email", skip_serializing_if = "Option::is_none")] - pub email: Option>, + #[serde(rename = "access_token", skip_serializing_if = "Option::is_none")] + pub access_token: Option>, + #[serde(rename = "email", skip_serializing_if = "Option::is_none")] + pub email: Option>, } impl IdentityLinkedAccount { - /// A union representing an identity's linked accounts. - pub fn new() -> IdentityLinkedAccount { - IdentityLinkedAccount { - access_token: None, - email: None, - } - } + /// A union representing an identity's linked accounts. + pub fn new() -> IdentityLinkedAccount { + IdentityLinkedAccount { + access_token: None, + email: None, + } + } } + + diff --git a/sdks/rust/src/models/identity_list_activities_response.rs b/sdks/rust/src/models/identity_list_activities_response.rs index 0a5f6a82..e6bd5fbe 100644 --- a/sdks/rust/src/models/identity_list_activities_response.rs +++ b/sdks/rust/src/models/identity_list_activities_response.rs @@ -4,38 +4,37 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityListActivitiesResponse { - #[serde(rename = "games")] - pub games: Vec, - #[serde(rename = "identities")] - pub identities: Vec, - #[serde(rename = "suggested_groups")] - pub suggested_groups: Vec, - #[serde(rename = "suggested_players")] - pub suggested_players: Vec, - #[serde(rename = "watch")] - pub watch: Box, + #[serde(rename = "games")] + pub games: Vec, + #[serde(rename = "identities")] + pub identities: Vec, + #[serde(rename = "suggested_groups")] + pub suggested_groups: Vec, + #[serde(rename = "suggested_players")] + pub suggested_players: Vec, + #[serde(rename = "watch")] + pub watch: Box, } impl IdentityListActivitiesResponse { - pub fn new( - games: Vec, - identities: Vec, - suggested_groups: Vec, - suggested_players: Vec, - watch: crate::models::WatchResponse, - ) -> IdentityListActivitiesResponse { - IdentityListActivitiesResponse { - games, - identities, - suggested_groups, - suggested_players, - watch: Box::new(watch), - } - } + pub fn new(games: Vec, identities: Vec, suggested_groups: Vec, suggested_players: Vec, watch: crate::models::WatchResponse) -> IdentityListActivitiesResponse { + IdentityListActivitiesResponse { + games, + identities, + suggested_groups, + suggested_players, + watch: Box::new(watch), + } + } } + + diff --git a/sdks/rust/src/models/identity_list_followers_response.rs b/sdks/rust/src/models/identity_list_followers_response.rs index 357bd364..be0694d5 100644 --- a/sdks/rust/src/models/identity_list_followers_response.rs +++ b/sdks/rust/src/models/identity_list_followers_response.rs @@ -4,29 +4,31 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityListFollowersResponse { - #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] - pub anchor: Option, - #[serde(rename = "identities")] - pub identities: Vec, - #[serde(rename = "watch")] - pub watch: Box, + #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] + pub anchor: Option, + #[serde(rename = "identities")] + pub identities: Vec, + #[serde(rename = "watch")] + pub watch: Box, } impl IdentityListFollowersResponse { - pub fn new( - identities: Vec, - watch: crate::models::WatchResponse, - ) -> IdentityListFollowersResponse { - IdentityListFollowersResponse { - anchor: None, - identities, - watch: Box::new(watch), - } - } + pub fn new(identities: Vec, watch: crate::models::WatchResponse) -> IdentityListFollowersResponse { + IdentityListFollowersResponse { + anchor: None, + identities, + watch: Box::new(watch), + } + } } + + diff --git a/sdks/rust/src/models/identity_list_following_response.rs b/sdks/rust/src/models/identity_list_following_response.rs index 5520fdbc..73481c4f 100644 --- a/sdks/rust/src/models/identity_list_following_response.rs +++ b/sdks/rust/src/models/identity_list_following_response.rs @@ -4,29 +4,31 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityListFollowingResponse { - #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] - pub anchor: Option, - #[serde(rename = "identities")] - pub identities: Vec, - #[serde(rename = "watch")] - pub watch: Box, + #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] + pub anchor: Option, + #[serde(rename = "identities")] + pub identities: Vec, + #[serde(rename = "watch")] + pub watch: Box, } impl IdentityListFollowingResponse { - pub fn new( - identities: Vec, - watch: crate::models::WatchResponse, - ) -> IdentityListFollowingResponse { - IdentityListFollowingResponse { - anchor: None, - identities, - watch: Box::new(watch), - } - } + pub fn new(identities: Vec, watch: crate::models::WatchResponse) -> IdentityListFollowingResponse { + IdentityListFollowingResponse { + anchor: None, + identities, + watch: Box::new(watch), + } + } } + + diff --git a/sdks/rust/src/models/identity_list_friends_response.rs b/sdks/rust/src/models/identity_list_friends_response.rs index e139b159..d1e8422e 100644 --- a/sdks/rust/src/models/identity_list_friends_response.rs +++ b/sdks/rust/src/models/identity_list_friends_response.rs @@ -4,29 +4,31 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityListFriendsResponse { - #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] - pub anchor: Option, - #[serde(rename = "identities")] - pub identities: Vec, - #[serde(rename = "watch")] - pub watch: Box, + #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] + pub anchor: Option, + #[serde(rename = "identities")] + pub identities: Vec, + #[serde(rename = "watch")] + pub watch: Box, } impl IdentityListFriendsResponse { - pub fn new( - identities: Vec, - watch: crate::models::WatchResponse, - ) -> IdentityListFriendsResponse { - IdentityListFriendsResponse { - anchor: None, - identities, - watch: Box::new(watch), - } - } + pub fn new(identities: Vec, watch: crate::models::WatchResponse) -> IdentityListFriendsResponse { + IdentityListFriendsResponse { + anchor: None, + identities, + watch: Box::new(watch), + } + } } + + diff --git a/sdks/rust/src/models/identity_list_mutual_friends_response.rs b/sdks/rust/src/models/identity_list_mutual_friends_response.rs index bc405410..2db3d6e2 100644 --- a/sdks/rust/src/models/identity_list_mutual_friends_response.rs +++ b/sdks/rust/src/models/identity_list_mutual_friends_response.rs @@ -4,25 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityListMutualFriendsResponse { - #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] - pub anchor: Option, - #[serde(rename = "identities")] - pub identities: Vec, + #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] + pub anchor: Option, + #[serde(rename = "identities")] + pub identities: Vec, } impl IdentityListMutualFriendsResponse { - pub fn new( - identities: Vec, - ) -> IdentityListMutualFriendsResponse { - IdentityListMutualFriendsResponse { - anchor: None, - identities, - } - } + pub fn new(identities: Vec) -> IdentityListMutualFriendsResponse { + IdentityListMutualFriendsResponse { + anchor: None, + identities, + } + } } + + diff --git a/sdks/rust/src/models/identity_list_recent_followers_response.rs b/sdks/rust/src/models/identity_list_recent_followers_response.rs index 22ea602b..09d51398 100644 --- a/sdks/rust/src/models/identity_list_recent_followers_response.rs +++ b/sdks/rust/src/models/identity_list_recent_followers_response.rs @@ -4,29 +4,31 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityListRecentFollowersResponse { - #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] - pub anchor: Option, - #[serde(rename = "identities")] - pub identities: Vec, - #[serde(rename = "watch")] - pub watch: Box, + #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] + pub anchor: Option, + #[serde(rename = "identities")] + pub identities: Vec, + #[serde(rename = "watch")] + pub watch: Box, } impl IdentityListRecentFollowersResponse { - pub fn new( - identities: Vec, - watch: crate::models::WatchResponse, - ) -> IdentityListRecentFollowersResponse { - IdentityListRecentFollowersResponse { - anchor: None, - identities, - watch: Box::new(watch), - } - } + pub fn new(identities: Vec, watch: crate::models::WatchResponse) -> IdentityListRecentFollowersResponse { + IdentityListRecentFollowersResponse { + anchor: None, + identities, + watch: Box::new(watch), + } + } } + + diff --git a/sdks/rust/src/models/identity_prepare_avatar_upload_request.rs b/sdks/rust/src/models/identity_prepare_avatar_upload_request.rs index f162b467..fccaab12 100644 --- a/sdks/rust/src/models/identity_prepare_avatar_upload_request.rs +++ b/sdks/rust/src/models/identity_prepare_avatar_upload_request.rs @@ -4,31 +4,32 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityPrepareAvatarUploadRequest { - #[serde(rename = "content_length")] - pub content_length: i64, - /// See https://www.iana.org/assignments/media-types/media-types.xhtml - #[serde(rename = "mime")] - pub mime: String, - #[serde(rename = "path")] - pub path: String, + #[serde(rename = "content_length")] + pub content_length: i64, + /// See https://www.iana.org/assignments/media-types/media-types.xhtml + #[serde(rename = "mime")] + pub mime: String, + #[serde(rename = "path")] + pub path: String, } impl IdentityPrepareAvatarUploadRequest { - pub fn new( - content_length: i64, - mime: String, - path: String, - ) -> IdentityPrepareAvatarUploadRequest { - IdentityPrepareAvatarUploadRequest { - content_length, - mime, - path, - } - } + pub fn new(content_length: i64, mime: String, path: String) -> IdentityPrepareAvatarUploadRequest { + IdentityPrepareAvatarUploadRequest { + content_length, + mime, + path, + } + } } + + diff --git a/sdks/rust/src/models/identity_prepare_avatar_upload_response.rs b/sdks/rust/src/models/identity_prepare_avatar_upload_response.rs index 901f1f4f..80b6c9de 100644 --- a/sdks/rust/src/models/identity_prepare_avatar_upload_response.rs +++ b/sdks/rust/src/models/identity_prepare_avatar_upload_response.rs @@ -4,26 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityPrepareAvatarUploadResponse { - #[serde(rename = "presigned_request")] - pub presigned_request: Box, - #[serde(rename = "upload_id")] - pub upload_id: uuid::Uuid, + #[serde(rename = "presigned_request")] + pub presigned_request: Box, + #[serde(rename = "upload_id")] + pub upload_id: uuid::Uuid, } impl IdentityPrepareAvatarUploadResponse { - pub fn new( - presigned_request: crate::models::UploadPresignedRequest, - upload_id: uuid::Uuid, - ) -> IdentityPrepareAvatarUploadResponse { - IdentityPrepareAvatarUploadResponse { - presigned_request: Box::new(presigned_request), - upload_id, - } - } + pub fn new(presigned_request: crate::models::UploadPresignedRequest, upload_id: uuid::Uuid) -> IdentityPrepareAvatarUploadResponse { + IdentityPrepareAvatarUploadResponse { + presigned_request: Box::new(presigned_request), + upload_id, + } + } } + + diff --git a/sdks/rust/src/models/identity_prepare_game_link_response.rs b/sdks/rust/src/models/identity_prepare_game_link_response.rs index 78d2a3fe..733d914c 100644 --- a/sdks/rust/src/models/identity_prepare_game_link_response.rs +++ b/sdks/rust/src/models/identity_prepare_game_link_response.rs @@ -4,32 +4,33 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityPrepareGameLinkResponse { - /// RFC3339 timestamp - #[serde(rename = "expire_ts")] - pub expire_ts: String, - /// Pass this to `GetGameLink` to get the linking status. Valid for 15 minutes. - #[serde(rename = "identity_link_token")] - pub identity_link_token: String, - #[serde(rename = "identity_link_url")] - pub identity_link_url: String, + /// RFC3339 timestamp + #[serde(rename = "expire_ts")] + pub expire_ts: String, + /// Pass this to `GetGameLink` to get the linking status. Valid for 15 minutes. + #[serde(rename = "identity_link_token")] + pub identity_link_token: String, + #[serde(rename = "identity_link_url")] + pub identity_link_url: String, } impl IdentityPrepareGameLinkResponse { - pub fn new( - expire_ts: String, - identity_link_token: String, - identity_link_url: String, - ) -> IdentityPrepareGameLinkResponse { - IdentityPrepareGameLinkResponse { - expire_ts, - identity_link_token, - identity_link_url, - } - } + pub fn new(expire_ts: String, identity_link_token: String, identity_link_url: String) -> IdentityPrepareGameLinkResponse { + IdentityPrepareGameLinkResponse { + expire_ts, + identity_link_token, + identity_link_url, + } + } } + + diff --git a/sdks/rust/src/models/identity_presence.rs b/sdks/rust/src/models/identity_presence.rs index 69c7a578..e03ac17d 100644 --- a/sdks/rust/src/models/identity_presence.rs +++ b/sdks/rust/src/models/identity_presence.rs @@ -4,30 +4,34 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// IdentityPresence : Information about the identity's current status, party, and active game. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityPresence { - #[serde(rename = "game_activity", skip_serializing_if = "Option::is_none")] - pub game_activity: Option>, - #[serde(rename = "status")] - pub status: crate::models::IdentityStatus, - /// RFC3339 timestamp - #[serde(rename = "update_ts")] - pub update_ts: String, + #[serde(rename = "game_activity", skip_serializing_if = "Option::is_none")] + pub game_activity: Option>, + #[serde(rename = "status")] + pub status: crate::models::IdentityStatus, + /// RFC3339 timestamp + #[serde(rename = "update_ts")] + pub update_ts: String, } impl IdentityPresence { - /// Information about the identity's current status, party, and active game. - pub fn new(status: crate::models::IdentityStatus, update_ts: String) -> IdentityPresence { - IdentityPresence { - game_activity: None, - status, - update_ts, - } - } + /// Information about the identity's current status, party, and active game. + pub fn new(status: crate::models::IdentityStatus, update_ts: String) -> IdentityPresence { + IdentityPresence { + game_activity: None, + status, + update_ts, + } + } } + + diff --git a/sdks/rust/src/models/identity_profile.rs b/sdks/rust/src/models/identity_profile.rs index 06eec455..98f78fff 100644 --- a/sdks/rust/src/models/identity_profile.rs +++ b/sdks/rust/src/models/identity_profile.rs @@ -4,111 +4,97 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// IdentityProfile : An identity profile. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityProfile { - #[serde(rename = "account_number")] - pub account_number: i32, - /// The URL of this identity's avatar image. - #[serde(rename = "avatar_url")] - pub avatar_url: String, - /// Whether or not this identity is awaiting account deletion. Only visible to when the requestee is this identity. - #[serde(rename = "awaiting_deletion", skip_serializing_if = "Option::is_none")] - pub awaiting_deletion: Option, - /// Follows regex ^(?:[^\\n\\r]+\\n?|\\n){1,5}$ - #[serde(rename = "bio")] - pub bio: String, - #[serde(rename = "dev_state", skip_serializing_if = "Option::is_none")] - pub dev_state: Option, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "external")] - pub external: Box, - #[serde(rename = "follower_count")] - pub follower_count: i64, - /// Whether or not the requestee's identity is following this identity. - #[serde(rename = "following")] - pub following: bool, - #[serde(rename = "following_count")] - pub following_count: i64, - #[serde(rename = "games")] - pub games: Vec, - #[serde(rename = "groups")] - pub groups: Vec, - #[serde(rename = "identity_id")] - pub identity_id: uuid::Uuid, - /// Whether or not this identity is an admin. - #[serde(rename = "is_admin")] - pub is_admin: bool, - /// Whether or not this identity is both following and is followed by the requestee's identity. - #[serde(rename = "is_following_me")] - pub is_following_me: bool, - /// Whether or not this game user has been linked through the Rivet dashboard. - #[serde(rename = "is_game_linked", skip_serializing_if = "Option::is_none")] - pub is_game_linked: Option, - #[serde(rename = "is_mutual_following")] - pub is_mutual_following: bool, - /// Whether or not this identity is registered with a linked account. - #[serde(rename = "is_registered")] - pub is_registered: bool, - /// RFC3339 timestamp - #[serde(rename = "join_ts")] - pub join_ts: String, - #[serde(rename = "linked_accounts")] - pub linked_accounts: Vec, - #[serde(rename = "presence", skip_serializing_if = "Option::is_none")] - pub presence: Option>, + #[serde(rename = "account_number")] + pub account_number: i32, + /// The URL of this identity's avatar image. + #[serde(rename = "avatar_url")] + pub avatar_url: String, + /// Whether or not this identity is awaiting account deletion. Only visible to when the requestee is this identity. + #[serde(rename = "awaiting_deletion", skip_serializing_if = "Option::is_none")] + pub awaiting_deletion: Option, + /// Follows regex ^(?:[^\\n\\r]+\\n?|\\n){1,5}$ + #[serde(rename = "bio")] + pub bio: String, + #[serde(rename = "dev_state", skip_serializing_if = "Option::is_none")] + pub dev_state: Option, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "external")] + pub external: Box, + #[serde(rename = "follower_count")] + pub follower_count: i64, + /// Whether or not the requestee's identity is following this identity. + #[serde(rename = "following")] + pub following: bool, + #[serde(rename = "following_count")] + pub following_count: i64, + #[serde(rename = "games")] + pub games: Vec, + #[serde(rename = "groups")] + pub groups: Vec, + #[serde(rename = "identity_id")] + pub identity_id: uuid::Uuid, + /// Whether or not this identity is an admin. + #[serde(rename = "is_admin")] + pub is_admin: bool, + /// Whether or not this identity is both following and is followed by the requestee's identity. + #[serde(rename = "is_following_me")] + pub is_following_me: bool, + /// Whether or not this game user has been linked through the Rivet dashboard. + #[serde(rename = "is_game_linked", skip_serializing_if = "Option::is_none")] + pub is_game_linked: Option, + #[serde(rename = "is_mutual_following")] + pub is_mutual_following: bool, + /// Whether or not this identity is registered with a linked account. + #[serde(rename = "is_registered")] + pub is_registered: bool, + /// RFC3339 timestamp + #[serde(rename = "join_ts")] + pub join_ts: String, + #[serde(rename = "linked_accounts")] + pub linked_accounts: Vec, + #[serde(rename = "presence", skip_serializing_if = "Option::is_none")] + pub presence: Option>, } impl IdentityProfile { - /// An identity profile. - pub fn new( - account_number: i32, - avatar_url: String, - bio: String, - display_name: String, - external: crate::models::IdentityExternalLinks, - follower_count: i64, - following: bool, - following_count: i64, - games: Vec, - groups: Vec, - identity_id: uuid::Uuid, - is_admin: bool, - is_following_me: bool, - is_mutual_following: bool, - is_registered: bool, - join_ts: String, - linked_accounts: Vec, - ) -> IdentityProfile { - IdentityProfile { - account_number, - avatar_url, - awaiting_deletion: None, - bio, - dev_state: None, - display_name, - external: Box::new(external), - follower_count, - following, - following_count, - games, - groups, - identity_id, - is_admin, - is_following_me, - is_game_linked: None, - is_mutual_following, - is_registered, - join_ts, - linked_accounts, - presence: None, - } - } + /// An identity profile. + pub fn new(account_number: i32, avatar_url: String, bio: String, display_name: String, external: crate::models::IdentityExternalLinks, follower_count: i64, following: bool, following_count: i64, games: Vec, groups: Vec, identity_id: uuid::Uuid, is_admin: bool, is_following_me: bool, is_mutual_following: bool, is_registered: bool, join_ts: String, linked_accounts: Vec) -> IdentityProfile { + IdentityProfile { + account_number, + avatar_url, + awaiting_deletion: None, + bio, + dev_state: None, + display_name, + external: Box::new(external), + follower_count, + following, + following_count, + games, + groups, + identity_id, + is_admin, + is_following_me, + is_game_linked: None, + is_mutual_following, + is_registered, + join_ts, + linked_accounts, + presence: None, + } + } } + + diff --git a/sdks/rust/src/models/identity_report_request.rs b/sdks/rust/src/models/identity_report_request.rs index 6b999435..d21411f0 100644 --- a/sdks/rust/src/models/identity_report_request.rs +++ b/sdks/rust/src/models/identity_report_request.rs @@ -4,18 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityReportRequest { - #[serde(rename = "reason", skip_serializing_if = "Option::is_none")] - pub reason: Option, + #[serde(rename = "reason", skip_serializing_if = "Option::is_none")] + pub reason: Option, } impl IdentityReportRequest { - pub fn new() -> IdentityReportRequest { - IdentityReportRequest { reason: None } - } + pub fn new() -> IdentityReportRequest { + IdentityReportRequest { + reason: None, + } + } } + + diff --git a/sdks/rust/src/models/identity_search_response.rs b/sdks/rust/src/models/identity_search_response.rs index 674b81a1..7dd8a427 100644 --- a/sdks/rust/src/models/identity_search_response.rs +++ b/sdks/rust/src/models/identity_search_response.rs @@ -4,24 +4,29 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentitySearchResponse { - /// The pagination anchor. - #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] - pub anchor: Option, - #[serde(rename = "identities")] - pub identities: Vec, + /// The pagination anchor. + #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] + pub anchor: Option, + #[serde(rename = "identities")] + pub identities: Vec, } impl IdentitySearchResponse { - pub fn new(identities: Vec) -> IdentitySearchResponse { - IdentitySearchResponse { - anchor: None, - identities, - } - } + pub fn new(identities: Vec) -> IdentitySearchResponse { + IdentitySearchResponse { + anchor: None, + identities, + } + } } + + diff --git a/sdks/rust/src/models/identity_set_game_activity_request.rs b/sdks/rust/src/models/identity_set_game_activity_request.rs index e3dff637..8c46ac1f 100644 --- a/sdks/rust/src/models/identity_set_game_activity_request.rs +++ b/sdks/rust/src/models/identity_set_game_activity_request.rs @@ -4,22 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentitySetGameActivityRequest { - #[serde(rename = "game_activity")] - pub game_activity: Box, + #[serde(rename = "game_activity")] + pub game_activity: Box, } impl IdentitySetGameActivityRequest { - pub fn new( - game_activity: crate::models::IdentityUpdateGameActivity, - ) -> IdentitySetGameActivityRequest { - IdentitySetGameActivityRequest { - game_activity: Box::new(game_activity), - } - } + pub fn new(game_activity: crate::models::IdentityUpdateGameActivity) -> IdentitySetGameActivityRequest { + IdentitySetGameActivityRequest { + game_activity: Box::new(game_activity), + } + } } + + diff --git a/sdks/rust/src/models/identity_setup_request.rs b/sdks/rust/src/models/identity_setup_request.rs index 9d45b19c..81f39da7 100644 --- a/sdks/rust/src/models/identity_setup_request.rs +++ b/sdks/rust/src/models/identity_setup_request.rs @@ -4,24 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentitySetupRequest { - /// Documentation at https://jwt.io/ - #[serde( - rename = "existing_identity_token", - skip_serializing_if = "Option::is_none" - )] - pub existing_identity_token: Option, + /// Documentation at https://jwt.io/ + #[serde(rename = "existing_identity_token", skip_serializing_if = "Option::is_none")] + pub existing_identity_token: Option, } impl IdentitySetupRequest { - pub fn new() -> IdentitySetupRequest { - IdentitySetupRequest { - existing_identity_token: None, - } - } + pub fn new() -> IdentitySetupRequest { + IdentitySetupRequest { + existing_identity_token: None, + } + } } + + diff --git a/sdks/rust/src/models/identity_setup_response.rs b/sdks/rust/src/models/identity_setup_response.rs index d14248dc..b754026b 100644 --- a/sdks/rust/src/models/identity_setup_response.rs +++ b/sdks/rust/src/models/identity_setup_response.rs @@ -4,36 +4,36 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentitySetupResponse { - #[serde(rename = "game_id")] - pub game_id: uuid::Uuid, - #[serde(rename = "identity")] - pub identity: Box, - /// Documentation at https://jwt.io/ - #[serde(rename = "identity_token")] - pub identity_token: String, - /// RFC3339 timestamp - #[serde(rename = "identity_token_expire_ts")] - pub identity_token_expire_ts: String, + #[serde(rename = "game_id")] + pub game_id: uuid::Uuid, + #[serde(rename = "identity")] + pub identity: Box, + /// Documentation at https://jwt.io/ + #[serde(rename = "identity_token")] + pub identity_token: String, + /// RFC3339 timestamp + #[serde(rename = "identity_token_expire_ts")] + pub identity_token_expire_ts: String, } impl IdentitySetupResponse { - pub fn new( - game_id: uuid::Uuid, - identity: crate::models::IdentityProfile, - identity_token: String, - identity_token_expire_ts: String, - ) -> IdentitySetupResponse { - IdentitySetupResponse { - game_id, - identity: Box::new(identity), - identity_token, - identity_token_expire_ts, - } - } + pub fn new(game_id: uuid::Uuid, identity: crate::models::IdentityProfile, identity_token: String, identity_token_expire_ts: String) -> IdentitySetupResponse { + IdentitySetupResponse { + game_id, + identity: Box::new(identity), + identity_token, + identity_token_expire_ts, + } + } } + + diff --git a/sdks/rust/src/models/identity_signup_for_beta_request.rs b/sdks/rust/src/models/identity_signup_for_beta_request.rs index f1fecf84..8182a2c4 100644 --- a/sdks/rust/src/models/identity_signup_for_beta_request.rs +++ b/sdks/rust/src/models/identity_signup_for_beta_request.rs @@ -4,37 +4,37 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentitySignupForBetaRequest { - #[serde(rename = "company_name", skip_serializing_if = "Option::is_none")] - pub company_name: Option, - #[serde(rename = "company_size")] - pub company_size: String, - #[serde(rename = "goals")] - pub goals: String, - #[serde(rename = "name")] - pub name: String, - #[serde(rename = "preferred_tools")] - pub preferred_tools: String, + #[serde(rename = "company_name", skip_serializing_if = "Option::is_none")] + pub company_name: Option, + #[serde(rename = "company_size")] + pub company_size: String, + #[serde(rename = "goals")] + pub goals: String, + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "preferred_tools")] + pub preferred_tools: String, } impl IdentitySignupForBetaRequest { - pub fn new( - company_size: String, - goals: String, - name: String, - preferred_tools: String, - ) -> IdentitySignupForBetaRequest { - IdentitySignupForBetaRequest { - company_name: None, - company_size, - goals, - name, - preferred_tools, - } - } + pub fn new(company_size: String, goals: String, name: String, preferred_tools: String) -> IdentitySignupForBetaRequest { + IdentitySignupForBetaRequest { + company_name: None, + company_size, + goals, + name, + preferred_tools, + } + } } + + diff --git a/sdks/rust/src/models/identity_status.rs b/sdks/rust/src/models/identity_status.rs index bf27c8f9..88ce7285 100644 --- a/sdks/rust/src/models/identity_status.rs +++ b/sdks/rust/src/models/identity_status.rs @@ -4,7 +4,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -13,26 +13,31 @@ /// The current status of an identity. This helps players understand if another player is currently playing or has their game in the background. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum IdentityStatus { - #[serde(rename = "online")] - Online, - #[serde(rename = "away")] - Away, - #[serde(rename = "offline")] - Offline, + #[serde(rename = "online")] + Online, + #[serde(rename = "away")] + Away, + #[serde(rename = "offline")] + Offline, + } impl ToString for IdentityStatus { - fn to_string(&self) -> String { - match self { - Self::Online => String::from("online"), - Self::Away => String::from("away"), - Self::Offline => String::from("offline"), - } - } + fn to_string(&self) -> String { + match self { + Self::Online => String::from("online"), + Self::Away => String::from("away"), + Self::Offline => String::from("offline"), + } + } } impl Default for IdentityStatus { - fn default() -> IdentityStatus { - Self::Online - } + fn default() -> IdentityStatus { + Self::Online + } } + + + + diff --git a/sdks/rust/src/models/identity_summary.rs b/sdks/rust/src/models/identity_summary.rs index b3766261..c0088f01 100644 --- a/sdks/rust/src/models/identity_summary.rs +++ b/sdks/rust/src/models/identity_summary.rs @@ -4,65 +4,59 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// IdentitySummary : An identity summary. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentitySummary { - #[serde(rename = "account_number")] - pub account_number: i32, - /// The URL of this identity's avatar image. - #[serde(rename = "avatar_url")] - pub avatar_url: String, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "external")] - pub external: Box, - /// Whether or not the requestee's identity is following this identity. - #[serde(rename = "following")] - pub following: bool, - #[serde(rename = "identity_id")] - pub identity_id: uuid::Uuid, - /// Whether or not this identity is both following and is followed by the requestee's identity. - #[serde(rename = "is_following_me")] - pub is_following_me: bool, - #[serde(rename = "is_mutual_following")] - pub is_mutual_following: bool, - /// Whether or not this identity is registered with a linked account. - #[serde(rename = "is_registered")] - pub is_registered: bool, - #[serde(rename = "presence", skip_serializing_if = "Option::is_none")] - pub presence: Option>, + #[serde(rename = "account_number")] + pub account_number: i32, + /// The URL of this identity's avatar image. + #[serde(rename = "avatar_url")] + pub avatar_url: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "external")] + pub external: Box, + /// Whether or not the requestee's identity is following this identity. + #[serde(rename = "following")] + pub following: bool, + #[serde(rename = "identity_id")] + pub identity_id: uuid::Uuid, + /// Whether or not this identity is both following and is followed by the requestee's identity. + #[serde(rename = "is_following_me")] + pub is_following_me: bool, + #[serde(rename = "is_mutual_following")] + pub is_mutual_following: bool, + /// Whether or not this identity is registered with a linked account. + #[serde(rename = "is_registered")] + pub is_registered: bool, + #[serde(rename = "presence", skip_serializing_if = "Option::is_none")] + pub presence: Option>, } impl IdentitySummary { - /// An identity summary. - pub fn new( - account_number: i32, - avatar_url: String, - display_name: String, - external: crate::models::IdentityExternalLinks, - following: bool, - identity_id: uuid::Uuid, - is_following_me: bool, - is_mutual_following: bool, - is_registered: bool, - ) -> IdentitySummary { - IdentitySummary { - account_number, - avatar_url, - display_name, - external: Box::new(external), - following, - identity_id, - is_following_me, - is_mutual_following, - is_registered, - presence: None, - } - } + /// An identity summary. + pub fn new(account_number: i32, avatar_url: String, display_name: String, external: crate::models::IdentityExternalLinks, following: bool, identity_id: uuid::Uuid, is_following_me: bool, is_mutual_following: bool, is_registered: bool) -> IdentitySummary { + IdentitySummary { + account_number, + avatar_url, + display_name, + external: Box::new(external), + following, + identity_id, + is_following_me, + is_mutual_following, + is_registered, + presence: None, + } + } } + + diff --git a/sdks/rust/src/models/identity_update_game_activity.rs b/sdks/rust/src/models/identity_update_game_activity.rs index 0882455c..e6fe5dfb 100644 --- a/sdks/rust/src/models/identity_update_game_activity.rs +++ b/sdks/rust/src/models/identity_update_game_activity.rs @@ -4,42 +4,36 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// IdentityUpdateGameActivity : Information about the identity's current game. This is information that all other identities can see about what the current identity is doing. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityUpdateGameActivity { - /// A short message about the current game activity. - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, - /// JSON data seen only by the given identity and their mutual followers. - #[serde( - rename = "mutual_metadata", - default, - with = "::serde_with::rust::double_option", - skip_serializing_if = "Option::is_none" - )] - pub mutual_metadata: Option>, - /// JSON data seen by anyone. - #[serde( - rename = "public_metadata", - default, - with = "::serde_with::rust::double_option", - skip_serializing_if = "Option::is_none" - )] - pub public_metadata: Option>, + /// A short message about the current game activity. + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, + /// JSON data seen only by the given identity and their mutual followers. + #[serde(rename = "mutual_metadata", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub mutual_metadata: Option>, + /// JSON data seen by anyone. + #[serde(rename = "public_metadata", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub public_metadata: Option>, } impl IdentityUpdateGameActivity { - /// Information about the identity's current game. This is information that all other identities can see about what the current identity is doing. - pub fn new() -> IdentityUpdateGameActivity { - IdentityUpdateGameActivity { - message: None, - mutual_metadata: None, - public_metadata: None, - } - } + /// Information about the identity's current game. This is information that all other identities can see about what the current identity is doing. + pub fn new() -> IdentityUpdateGameActivity { + IdentityUpdateGameActivity { + message: None, + mutual_metadata: None, + public_metadata: None, + } + } } + + diff --git a/sdks/rust/src/models/identity_update_profile_request.rs b/sdks/rust/src/models/identity_update_profile_request.rs index ac71ed6a..7f75bf12 100644 --- a/sdks/rust/src/models/identity_update_profile_request.rs +++ b/sdks/rust/src/models/identity_update_profile_request.rs @@ -4,28 +4,33 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityUpdateProfileRequest { - #[serde(rename = "account_number", skip_serializing_if = "Option::is_none")] - pub account_number: Option, - /// Follows regex ^(?:[^\\n\\r]+\\n?|\\n){1,5}$ - #[serde(rename = "bio", skip_serializing_if = "Option::is_none")] - pub bio: Option, - /// Represent a resource's readable display name. - #[serde(rename = "display_name", skip_serializing_if = "Option::is_none")] - pub display_name: Option, + #[serde(rename = "account_number", skip_serializing_if = "Option::is_none")] + pub account_number: Option, + /// Follows regex ^(?:[^\\n\\r]+\\n?|\\n){1,5}$ + #[serde(rename = "bio", skip_serializing_if = "Option::is_none")] + pub bio: Option, + /// Represent a resource's readable display name. + #[serde(rename = "display_name", skip_serializing_if = "Option::is_none")] + pub display_name: Option, } impl IdentityUpdateProfileRequest { - pub fn new() -> IdentityUpdateProfileRequest { - IdentityUpdateProfileRequest { - account_number: None, - bio: None, - display_name: None, - } - } + pub fn new() -> IdentityUpdateProfileRequest { + IdentityUpdateProfileRequest { + account_number: None, + bio: None, + display_name: None, + } + } } + + diff --git a/sdks/rust/src/models/identity_update_status_request.rs b/sdks/rust/src/models/identity_update_status_request.rs index 3cb55558..777cd246 100644 --- a/sdks/rust/src/models/identity_update_status_request.rs +++ b/sdks/rust/src/models/identity_update_status_request.rs @@ -4,18 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityUpdateStatusRequest { - #[serde(rename = "status")] - pub status: crate::models::IdentityStatus, + #[serde(rename = "status")] + pub status: crate::models::IdentityStatus, } impl IdentityUpdateStatusRequest { - pub fn new(status: crate::models::IdentityStatus) -> IdentityUpdateStatusRequest { - IdentityUpdateStatusRequest { status } - } + pub fn new(status: crate::models::IdentityStatus) -> IdentityUpdateStatusRequest { + IdentityUpdateStatusRequest { + status, + } + } } + + diff --git a/sdks/rust/src/models/identity_validate_profile_response.rs b/sdks/rust/src/models/identity_validate_profile_response.rs index 68e78b39..89f575ae 100644 --- a/sdks/rust/src/models/identity_validate_profile_response.rs +++ b/sdks/rust/src/models/identity_validate_profile_response.rs @@ -4,18 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityValidateProfileResponse { - #[serde(rename = "errors")] - pub errors: Vec, + #[serde(rename = "errors")] + pub errors: Vec, } impl IdentityValidateProfileResponse { - pub fn new(errors: Vec) -> IdentityValidateProfileResponse { - IdentityValidateProfileResponse { errors } - } + pub fn new(errors: Vec) -> IdentityValidateProfileResponse { + IdentityValidateProfileResponse { + errors, + } + } } + + diff --git a/sdks/rust/src/models/identity_watch_events_response.rs b/sdks/rust/src/models/identity_watch_events_response.rs index 1177ad76..1d4767b3 100644 --- a/sdks/rust/src/models/identity_watch_events_response.rs +++ b/sdks/rust/src/models/identity_watch_events_response.rs @@ -4,26 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityWatchEventsResponse { - #[serde(rename = "events")] - pub events: Vec, - #[serde(rename = "watch")] - pub watch: Box, + #[serde(rename = "events")] + pub events: Vec, + #[serde(rename = "watch")] + pub watch: Box, } impl IdentityWatchEventsResponse { - pub fn new( - events: Vec, - watch: crate::models::WatchResponse, - ) -> IdentityWatchEventsResponse { - IdentityWatchEventsResponse { - events, - watch: Box::new(watch), - } - } + pub fn new(events: Vec, watch: crate::models::WatchResponse) -> IdentityWatchEventsResponse { + IdentityWatchEventsResponse { + events, + watch: Box::new(watch), + } + } } + + diff --git a/sdks/rust/src/models/kv_entry.rs b/sdks/rust/src/models/kv_entry.rs index a226d106..3ea12251 100644 --- a/sdks/rust/src/models/kv_entry.rs +++ b/sdks/rust/src/models/kv_entry.rs @@ -4,31 +4,35 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// KvEntry : A key-value entry. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct KvEntry { - #[serde(rename = "deleted", skip_serializing_if = "Option::is_none")] - pub deleted: Option, - /// A string representing a key in the key-value database. Maximum length of 512 characters. _Recommended Key Path Format_ Key path components are split by a slash (e.g. `a/b/c` has the path components `[\"a\", \"b\", \"c\"]`). Slashes can be escaped by using a backslash (e.g. `a/b/c/d` has the path components `[\"a\", \"b/c\", \"d\"]`). This format is not enforced by Rivet, but the tools built around Rivet KV work better if this format is used. - #[serde(rename = "key")] - pub key: String, - /// A JSON object stored in the KV database. A `null` value indicates the entry is deleted. Maximum length of 262,144 bytes when encoded. - #[serde(rename = "value", deserialize_with = "Option::deserialize")] - pub value: Option, + #[serde(rename = "deleted", skip_serializing_if = "Option::is_none")] + pub deleted: Option, + /// A string representing a key in the key-value database. Maximum length of 512 characters. _Recommended Key Path Format_ Key path components are split by a slash (e.g. `a/b/c` has the path components `[\"a\", \"b\", \"c\"]`). Slashes can be escaped by using a backslash (e.g. `a/b/c/d` has the path components `[\"a\", \"b/c\", \"d\"]`). This format is not enforced by Rivet, but the tools built around Rivet KV work better if this format is used. + #[serde(rename = "key")] + pub key: String, + /// A JSON object stored in the KV database. A `null` value indicates the entry is deleted. Maximum length of 262,144 bytes when encoded. + #[serde(rename = "value", deserialize_with = "Option::deserialize")] + pub value: Option, } impl KvEntry { - /// A key-value entry. - pub fn new(key: String, value: Option) -> KvEntry { - KvEntry { - deleted: None, - key, - value, - } - } + /// A key-value entry. + pub fn new(key: String, value: Option) -> KvEntry { + KvEntry { + deleted: None, + key, + value, + } + } } + + diff --git a/sdks/rust/src/models/kv_get_batch_response.rs b/sdks/rust/src/models/kv_get_batch_response.rs index bf8ca80f..ce2f8fe4 100644 --- a/sdks/rust/src/models/kv_get_batch_response.rs +++ b/sdks/rust/src/models/kv_get_batch_response.rs @@ -4,26 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct KvGetBatchResponse { - #[serde(rename = "entries")] - pub entries: Vec, - #[serde(rename = "watch")] - pub watch: Box, + #[serde(rename = "entries")] + pub entries: Vec, + #[serde(rename = "watch")] + pub watch: Box, } impl KvGetBatchResponse { - pub fn new( - entries: Vec, - watch: crate::models::WatchResponse, - ) -> KvGetBatchResponse { - KvGetBatchResponse { - entries, - watch: Box::new(watch), - } - } + pub fn new(entries: Vec, watch: crate::models::WatchResponse) -> KvGetBatchResponse { + KvGetBatchResponse { + entries, + watch: Box::new(watch), + } + } } + + diff --git a/sdks/rust/src/models/kv_get_response.rs b/sdks/rust/src/models/kv_get_response.rs index ca95f7c6..b052ce6e 100644 --- a/sdks/rust/src/models/kv_get_response.rs +++ b/sdks/rust/src/models/kv_get_response.rs @@ -4,31 +4,33 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct KvGetResponse { - /// Whether or not the entry has been deleted. Only set when watching this endpoint. - #[serde(rename = "deleted", skip_serializing_if = "Option::is_none")] - pub deleted: Option, - /// A JSON object stored in the KV database. A `null` value indicates the entry is deleted. Maximum length of 262,144 bytes when encoded. - #[serde(rename = "value", deserialize_with = "Option::deserialize")] - pub value: Option, - #[serde(rename = "watch")] - pub watch: Box, + /// Whether or not the entry has been deleted. Only set when watching this endpoint. + #[serde(rename = "deleted", skip_serializing_if = "Option::is_none")] + pub deleted: Option, + /// A JSON object stored in the KV database. A `null` value indicates the entry is deleted. Maximum length of 262,144 bytes when encoded. + #[serde(rename = "value", deserialize_with = "Option::deserialize")] + pub value: Option, + #[serde(rename = "watch")] + pub watch: Box, } impl KvGetResponse { - pub fn new( - value: Option, - watch: crate::models::WatchResponse, - ) -> KvGetResponse { - KvGetResponse { - deleted: None, - value, - watch: Box::new(watch), - } - } + pub fn new(value: Option, watch: crate::models::WatchResponse) -> KvGetResponse { + KvGetResponse { + deleted: None, + value, + watch: Box::new(watch), + } + } } + + diff --git a/sdks/rust/src/models/kv_list_response.rs b/sdks/rust/src/models/kv_list_response.rs index 8e3863b3..33a1ce67 100644 --- a/sdks/rust/src/models/kv_list_response.rs +++ b/sdks/rust/src/models/kv_list_response.rs @@ -4,18 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct KvListResponse { - #[serde(rename = "entries")] - pub entries: Vec, + #[serde(rename = "entries")] + pub entries: Vec, } impl KvListResponse { - pub fn new(entries: Vec) -> KvListResponse { - KvListResponse { entries } - } + pub fn new(entries: Vec) -> KvListResponse { + KvListResponse { + entries, + } + } } + + diff --git a/sdks/rust/src/models/kv_put_batch_request.rs b/sdks/rust/src/models/kv_put_batch_request.rs index 5f022de0..200342b1 100644 --- a/sdks/rust/src/models/kv_put_batch_request.rs +++ b/sdks/rust/src/models/kv_put_batch_request.rs @@ -4,23 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct KvPutBatchRequest { - #[serde(rename = "entries")] - pub entries: Vec, - #[serde(rename = "namespace_id", skip_serializing_if = "Option::is_none")] - pub namespace_id: Option, + #[serde(rename = "entries")] + pub entries: Vec, + #[serde(rename = "namespace_id", skip_serializing_if = "Option::is_none")] + pub namespace_id: Option, } impl KvPutBatchRequest { - pub fn new(entries: Vec) -> KvPutBatchRequest { - KvPutBatchRequest { - entries, - namespace_id: None, - } - } + pub fn new(entries: Vec) -> KvPutBatchRequest { + KvPutBatchRequest { + entries, + namespace_id: None, + } + } } + + diff --git a/sdks/rust/src/models/kv_put_entry.rs b/sdks/rust/src/models/kv_put_entry.rs index 3bf48d64..504417b7 100644 --- a/sdks/rust/src/models/kv_put_entry.rs +++ b/sdks/rust/src/models/kv_put_entry.rs @@ -4,25 +4,32 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// KvPutEntry : A new entry to insert into the key-value database. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct KvPutEntry { - /// A string representing a key in the key-value database. Maximum length of 512 characters. _Recommended Key Path Format_ Key path components are split by a slash (e.g. `a/b/c` has the path components `[\"a\", \"b\", \"c\"]`). Slashes can be escaped by using a backslash (e.g. `a/b/c/d` has the path components `[\"a\", \"b/c\", \"d\"]`). This format is not enforced by Rivet, but the tools built around Rivet KV work better if this format is used. - #[serde(rename = "key")] - pub key: String, - /// A JSON object stored in the KV database. A `null` value indicates the entry is deleted. Maximum length of 262,144 bytes when encoded. - #[serde(rename = "value", deserialize_with = "Option::deserialize")] - pub value: Option, + /// A string representing a key in the key-value database. Maximum length of 512 characters. _Recommended Key Path Format_ Key path components are split by a slash (e.g. `a/b/c` has the path components `[\"a\", \"b\", \"c\"]`). Slashes can be escaped by using a backslash (e.g. `a/b/c/d` has the path components `[\"a\", \"b/c\", \"d\"]`). This format is not enforced by Rivet, but the tools built around Rivet KV work better if this format is used. + #[serde(rename = "key")] + pub key: String, + /// A JSON object stored in the KV database. A `null` value indicates the entry is deleted. Maximum length of 262,144 bytes when encoded. + #[serde(rename = "value", deserialize_with = "Option::deserialize")] + pub value: Option, } impl KvPutEntry { - /// A new entry to insert into the key-value database. - pub fn new(key: String, value: Option) -> KvPutEntry { - KvPutEntry { key, value } - } + /// A new entry to insert into the key-value database. + pub fn new(key: String, value: Option) -> KvPutEntry { + KvPutEntry { + key, + value, + } + } } + + diff --git a/sdks/rust/src/models/kv_put_request.rs b/sdks/rust/src/models/kv_put_request.rs index e36b65a8..d6cd7c95 100644 --- a/sdks/rust/src/models/kv_put_request.rs +++ b/sdks/rust/src/models/kv_put_request.rs @@ -4,28 +4,33 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct KvPutRequest { - /// A string representing a key in the key-value database. Maximum length of 512 characters. _Recommended Key Path Format_ Key path components are split by a slash (e.g. `a/b/c` has the path components `[\"a\", \"b\", \"c\"]`). Slashes can be escaped by using a backslash (e.g. `a/b/c/d` has the path components `[\"a\", \"b/c\", \"d\"]`). This format is not enforced by Rivet, but the tools built around Rivet KV work better if this format is used. - #[serde(rename = "key")] - pub key: String, - #[serde(rename = "namespace_id", skip_serializing_if = "Option::is_none")] - pub namespace_id: Option, - /// A JSON object stored in the KV database. A `null` value indicates the entry is deleted. Maximum length of 262,144 bytes when encoded. - #[serde(rename = "value", deserialize_with = "Option::deserialize")] - pub value: Option, + /// A string representing a key in the key-value database. Maximum length of 512 characters. _Recommended Key Path Format_ Key path components are split by a slash (e.g. `a/b/c` has the path components `[\"a\", \"b\", \"c\"]`). Slashes can be escaped by using a backslash (e.g. `a/b/c/d` has the path components `[\"a\", \"b/c\", \"d\"]`). This format is not enforced by Rivet, but the tools built around Rivet KV work better if this format is used. + #[serde(rename = "key")] + pub key: String, + #[serde(rename = "namespace_id", skip_serializing_if = "Option::is_none")] + pub namespace_id: Option, + /// A JSON object stored in the KV database. A `null` value indicates the entry is deleted. Maximum length of 262,144 bytes when encoded. + #[serde(rename = "value", deserialize_with = "Option::deserialize")] + pub value: Option, } impl KvPutRequest { - pub fn new(key: String, value: Option) -> KvPutRequest { - KvPutRequest { - key, - namespace_id: None, - value, - } - } + pub fn new(key: String, value: Option) -> KvPutRequest { + KvPutRequest { + key, + namespace_id: None, + value, + } + } } + + diff --git a/sdks/rust/src/models/matchmaker_create_lobby_response.rs b/sdks/rust/src/models/matchmaker_create_lobby_response.rs index 718e39ed..5ffb7abe 100644 --- a/sdks/rust/src/models/matchmaker_create_lobby_response.rs +++ b/sdks/rust/src/models/matchmaker_create_lobby_response.rs @@ -4,30 +4,31 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerCreateLobbyResponse { - #[serde(rename = "lobby")] - pub lobby: Box, - #[serde(rename = "player")] - pub player: Box, - #[serde(rename = "ports")] - pub ports: ::std::collections::HashMap, + #[serde(rename = "lobby")] + pub lobby: Box, + #[serde(rename = "player")] + pub player: Box, + #[serde(rename = "ports")] + pub ports: ::std::collections::HashMap, } impl MatchmakerCreateLobbyResponse { - pub fn new( - lobby: crate::models::MatchmakerJoinLobby, - player: crate::models::MatchmakerJoinPlayer, - ports: ::std::collections::HashMap, - ) -> MatchmakerCreateLobbyResponse { - MatchmakerCreateLobbyResponse { - lobby: Box::new(lobby), - player: Box::new(player), - ports, - } - } + pub fn new(lobby: crate::models::MatchmakerJoinLobby, player: crate::models::MatchmakerJoinPlayer, ports: ::std::collections::HashMap) -> MatchmakerCreateLobbyResponse { + MatchmakerCreateLobbyResponse { + lobby: Box::new(lobby), + player: Box::new(player), + ports, + } + } } + + diff --git a/sdks/rust/src/models/matchmaker_custom_lobby_publicity.rs b/sdks/rust/src/models/matchmaker_custom_lobby_publicity.rs index 884f37ca..c9bcd098 100644 --- a/sdks/rust/src/models/matchmaker_custom_lobby_publicity.rs +++ b/sdks/rust/src/models/matchmaker_custom_lobby_publicity.rs @@ -4,30 +4,36 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ -/// + +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum MatchmakerCustomLobbyPublicity { - #[serde(rename = "public")] - Public, - #[serde(rename = "private")] - Private, + #[serde(rename = "public")] + Public, + #[serde(rename = "private")] + Private, + } impl ToString for MatchmakerCustomLobbyPublicity { - fn to_string(&self) -> String { - match self { - Self::Public => String::from("public"), - Self::Private => String::from("private"), - } - } + fn to_string(&self) -> String { + match self { + Self::Public => String::from("public"), + Self::Private => String::from("private"), + } + } } impl Default for MatchmakerCustomLobbyPublicity { - fn default() -> MatchmakerCustomLobbyPublicity { - Self::Public - } + fn default() -> MatchmakerCustomLobbyPublicity { + Self::Public + } } + + + + diff --git a/sdks/rust/src/models/matchmaker_find_lobby_response.rs b/sdks/rust/src/models/matchmaker_find_lobby_response.rs index 29a51231..21fb1f5f 100644 --- a/sdks/rust/src/models/matchmaker_find_lobby_response.rs +++ b/sdks/rust/src/models/matchmaker_find_lobby_response.rs @@ -4,30 +4,31 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerFindLobbyResponse { - #[serde(rename = "lobby")] - pub lobby: Box, - #[serde(rename = "player")] - pub player: Box, - #[serde(rename = "ports")] - pub ports: ::std::collections::HashMap, + #[serde(rename = "lobby")] + pub lobby: Box, + #[serde(rename = "player")] + pub player: Box, + #[serde(rename = "ports")] + pub ports: ::std::collections::HashMap, } impl MatchmakerFindLobbyResponse { - pub fn new( - lobby: crate::models::MatchmakerJoinLobby, - player: crate::models::MatchmakerJoinPlayer, - ports: ::std::collections::HashMap, - ) -> MatchmakerFindLobbyResponse { - MatchmakerFindLobbyResponse { - lobby: Box::new(lobby), - player: Box::new(player), - ports, - } - } + pub fn new(lobby: crate::models::MatchmakerJoinLobby, player: crate::models::MatchmakerJoinPlayer, ports: ::std::collections::HashMap) -> MatchmakerFindLobbyResponse { + MatchmakerFindLobbyResponse { + lobby: Box::new(lobby), + player: Box::new(player), + ports, + } + } } + + diff --git a/sdks/rust/src/models/matchmaker_game_mode_info.rs b/sdks/rust/src/models/matchmaker_game_mode_info.rs index bd584c42..f3ce9bd2 100644 --- a/sdks/rust/src/models/matchmaker_game_mode_info.rs +++ b/sdks/rust/src/models/matchmaker_game_mode_info.rs @@ -4,22 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// MatchmakerGameModeInfo : A game mode that the player can join. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerGameModeInfo { - /// A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short. - #[serde(rename = "game_mode_id")] - pub game_mode_id: String, + /// A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short. + #[serde(rename = "game_mode_id")] + pub game_mode_id: String, } impl MatchmakerGameModeInfo { - /// A game mode that the player can join. - pub fn new(game_mode_id: String) -> MatchmakerGameModeInfo { - MatchmakerGameModeInfo { game_mode_id } - } + /// A game mode that the player can join. + pub fn new(game_mode_id: String) -> MatchmakerGameModeInfo { + MatchmakerGameModeInfo { + game_mode_id, + } + } } + + diff --git a/sdks/rust/src/models/matchmaker_game_mode_statistics.rs b/sdks/rust/src/models/matchmaker_game_mode_statistics.rs index 6ebb4990..6d659af6 100644 --- a/sdks/rust/src/models/matchmaker_game_mode_statistics.rs +++ b/sdks/rust/src/models/matchmaker_game_mode_statistics.rs @@ -4,26 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerGameModeStatistics { - #[serde(rename = "player_count")] - pub player_count: i64, - #[serde(rename = "regions")] - pub regions: ::std::collections::HashMap, + #[serde(rename = "player_count")] + pub player_count: i64, + #[serde(rename = "regions")] + pub regions: ::std::collections::HashMap, } impl MatchmakerGameModeStatistics { - pub fn new( - player_count: i64, - regions: ::std::collections::HashMap, - ) -> MatchmakerGameModeStatistics { - MatchmakerGameModeStatistics { - player_count, - regions, - } - } + pub fn new(player_count: i64, regions: ::std::collections::HashMap) -> MatchmakerGameModeStatistics { + MatchmakerGameModeStatistics { + player_count, + regions, + } + } } + + diff --git a/sdks/rust/src/models/matchmaker_get_statistics_response.rs b/sdks/rust/src/models/matchmaker_get_statistics_response.rs index c6e5ec4b..478315ef 100644 --- a/sdks/rust/src/models/matchmaker_get_statistics_response.rs +++ b/sdks/rust/src/models/matchmaker_get_statistics_response.rs @@ -4,30 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerGetStatisticsResponse { - #[serde(rename = "game_modes")] - pub game_modes: - ::std::collections::HashMap, - #[serde(rename = "player_count")] - pub player_count: i64, + #[serde(rename = "game_modes")] + pub game_modes: ::std::collections::HashMap, + #[serde(rename = "player_count")] + pub player_count: i64, } impl MatchmakerGetStatisticsResponse { - pub fn new( - game_modes: ::std::collections::HashMap< - String, - crate::models::MatchmakerGameModeStatistics, - >, - player_count: i64, - ) -> MatchmakerGetStatisticsResponse { - MatchmakerGetStatisticsResponse { - game_modes, - player_count, - } - } + pub fn new(game_modes: ::std::collections::HashMap, player_count: i64) -> MatchmakerGetStatisticsResponse { + MatchmakerGetStatisticsResponse { + game_modes, + player_count, + } + } } + + diff --git a/sdks/rust/src/models/matchmaker_join_lobby.rs b/sdks/rust/src/models/matchmaker_join_lobby.rs index 17794385..7ec950a9 100644 --- a/sdks/rust/src/models/matchmaker_join_lobby.rs +++ b/sdks/rust/src/models/matchmaker_join_lobby.rs @@ -4,38 +4,37 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// MatchmakerJoinLobby : A matchmaker lobby. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerJoinLobby { - #[serde(rename = "lobby_id")] - pub lobby_id: uuid::Uuid, - #[serde(rename = "player")] - pub player: Box, - /// **Deprecated** - #[serde(rename = "ports")] - pub ports: ::std::collections::HashMap, - #[serde(rename = "region")] - pub region: Box, + #[serde(rename = "lobby_id")] + pub lobby_id: uuid::Uuid, + #[serde(rename = "player")] + pub player: Box, + /// **Deprecated** + #[serde(rename = "ports")] + pub ports: ::std::collections::HashMap, + #[serde(rename = "region")] + pub region: Box, } impl MatchmakerJoinLobby { - /// A matchmaker lobby. - pub fn new( - lobby_id: uuid::Uuid, - player: crate::models::MatchmakerJoinPlayer, - ports: ::std::collections::HashMap, - region: crate::models::MatchmakerJoinRegion, - ) -> MatchmakerJoinLobby { - MatchmakerJoinLobby { - lobby_id, - player: Box::new(player), - ports, - region: Box::new(region), - } - } + /// A matchmaker lobby. + pub fn new(lobby_id: uuid::Uuid, player: crate::models::MatchmakerJoinPlayer, ports: ::std::collections::HashMap, region: crate::models::MatchmakerJoinRegion) -> MatchmakerJoinLobby { + MatchmakerJoinLobby { + lobby_id, + player: Box::new(player), + ports, + region: Box::new(region), + } + } } + + diff --git a/sdks/rust/src/models/matchmaker_join_lobby_response.rs b/sdks/rust/src/models/matchmaker_join_lobby_response.rs index 04487ac9..46a2d23c 100644 --- a/sdks/rust/src/models/matchmaker_join_lobby_response.rs +++ b/sdks/rust/src/models/matchmaker_join_lobby_response.rs @@ -4,30 +4,31 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerJoinLobbyResponse { - #[serde(rename = "lobby")] - pub lobby: Box, - #[serde(rename = "player")] - pub player: Box, - #[serde(rename = "ports")] - pub ports: ::std::collections::HashMap, + #[serde(rename = "lobby")] + pub lobby: Box, + #[serde(rename = "player")] + pub player: Box, + #[serde(rename = "ports")] + pub ports: ::std::collections::HashMap, } impl MatchmakerJoinLobbyResponse { - pub fn new( - lobby: crate::models::MatchmakerJoinLobby, - player: crate::models::MatchmakerJoinPlayer, - ports: ::std::collections::HashMap, - ) -> MatchmakerJoinLobbyResponse { - MatchmakerJoinLobbyResponse { - lobby: Box::new(lobby), - player: Box::new(player), - ports, - } - } + pub fn new(lobby: crate::models::MatchmakerJoinLobby, player: crate::models::MatchmakerJoinPlayer, ports: ::std::collections::HashMap) -> MatchmakerJoinLobbyResponse { + MatchmakerJoinLobbyResponse { + lobby: Box::new(lobby), + player: Box::new(player), + ports, + } + } } + + diff --git a/sdks/rust/src/models/matchmaker_join_player.rs b/sdks/rust/src/models/matchmaker_join_player.rs index 67272ec7..807bf355 100644 --- a/sdks/rust/src/models/matchmaker_join_player.rs +++ b/sdks/rust/src/models/matchmaker_join_player.rs @@ -4,22 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// MatchmakerJoinPlayer : A matchmaker lobby player. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerJoinPlayer { - /// Documentation at https://jwt.io/ - #[serde(rename = "token")] - pub token: String, + /// Documentation at https://jwt.io/ + #[serde(rename = "token")] + pub token: String, } impl MatchmakerJoinPlayer { - /// A matchmaker lobby player. - pub fn new(token: String) -> MatchmakerJoinPlayer { - MatchmakerJoinPlayer { token } - } + /// A matchmaker lobby player. + pub fn new(token: String) -> MatchmakerJoinPlayer { + MatchmakerJoinPlayer { + token, + } + } } + + diff --git a/sdks/rust/src/models/matchmaker_join_port.rs b/sdks/rust/src/models/matchmaker_join_port.rs index 79d253bd..5e11cbbd 100644 --- a/sdks/rust/src/models/matchmaker_join_port.rs +++ b/sdks/rust/src/models/matchmaker_join_port.rs @@ -4,35 +4,40 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerJoinPort { - /// The host for the given port. Will be null if using a port range. - #[serde(rename = "host", skip_serializing_if = "Option::is_none")] - pub host: Option, - #[serde(rename = "hostname")] - pub hostname: String, - /// Whether or not this lobby port uses TLS. You cannot mix a non-TLS and TLS ports. - #[serde(rename = "is_tls")] - pub is_tls: bool, - /// The port number for this lobby. Will be null if using a port range. - #[serde(rename = "port", skip_serializing_if = "Option::is_none")] - pub port: Option, - #[serde(rename = "port_range", skip_serializing_if = "Option::is_none")] - pub port_range: Option>, + /// The host for the given port. Will be null if using a port range. + #[serde(rename = "host", skip_serializing_if = "Option::is_none")] + pub host: Option, + #[serde(rename = "hostname")] + pub hostname: String, + /// Whether or not this lobby port uses TLS. You cannot mix a non-TLS and TLS ports. + #[serde(rename = "is_tls")] + pub is_tls: bool, + /// The port number for this lobby. Will be null if using a port range. + #[serde(rename = "port", skip_serializing_if = "Option::is_none")] + pub port: Option, + #[serde(rename = "port_range", skip_serializing_if = "Option::is_none")] + pub port_range: Option>, } impl MatchmakerJoinPort { - pub fn new(hostname: String, is_tls: bool) -> MatchmakerJoinPort { - MatchmakerJoinPort { - host: None, - hostname, - is_tls, - port: None, - port_range: None, - } - } + pub fn new(hostname: String, is_tls: bool) -> MatchmakerJoinPort { + MatchmakerJoinPort { + host: None, + hostname, + is_tls, + port: None, + port_range: None, + } + } } + + diff --git a/sdks/rust/src/models/matchmaker_join_port_range.rs b/sdks/rust/src/models/matchmaker_join_port_range.rs index a86d9aa8..98a5de93 100644 --- a/sdks/rust/src/models/matchmaker_join_port_range.rs +++ b/sdks/rust/src/models/matchmaker_join_port_range.rs @@ -4,25 +4,32 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// MatchmakerJoinPortRange : Inclusive range of ports that can be connected to. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerJoinPortRange { - /// Maximum port that can be connected to. Inclusive range. - #[serde(rename = "max")] - pub max: i32, - /// Minimum port that can be connected to. Inclusive range. - #[serde(rename = "min")] - pub min: i32, + /// Maximum port that can be connected to. Inclusive range. + #[serde(rename = "max")] + pub max: i32, + /// Minimum port that can be connected to. Inclusive range. + #[serde(rename = "min")] + pub min: i32, } impl MatchmakerJoinPortRange { - /// Inclusive range of ports that can be connected to. - pub fn new(max: i32, min: i32) -> MatchmakerJoinPortRange { - MatchmakerJoinPortRange { max, min } - } + /// Inclusive range of ports that can be connected to. + pub fn new(max: i32, min: i32) -> MatchmakerJoinPortRange { + MatchmakerJoinPortRange { + max, + min, + } + } } + + diff --git a/sdks/rust/src/models/matchmaker_join_region.rs b/sdks/rust/src/models/matchmaker_join_region.rs index 5e4bf967..2cb6b3cc 100644 --- a/sdks/rust/src/models/matchmaker_join_region.rs +++ b/sdks/rust/src/models/matchmaker_join_region.rs @@ -4,28 +4,32 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// MatchmakerJoinRegion : A matchmaker lobby region. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerJoinRegion { - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - /// A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short. - #[serde(rename = "region_id")] - pub region_id: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + /// A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short. + #[serde(rename = "region_id")] + pub region_id: String, } impl MatchmakerJoinRegion { - /// A matchmaker lobby region. - pub fn new(display_name: String, region_id: String) -> MatchmakerJoinRegion { - MatchmakerJoinRegion { - display_name, - region_id, - } - } + /// A matchmaker lobby region. + pub fn new(display_name: String, region_id: String) -> MatchmakerJoinRegion { + MatchmakerJoinRegion { + display_name, + region_id, + } + } } + + diff --git a/sdks/rust/src/models/matchmaker_list_lobbies_response.rs b/sdks/rust/src/models/matchmaker_list_lobbies_response.rs index 806d94c9..e274aa02 100644 --- a/sdks/rust/src/models/matchmaker_list_lobbies_response.rs +++ b/sdks/rust/src/models/matchmaker_list_lobbies_response.rs @@ -4,30 +4,31 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerListLobbiesResponse { - #[serde(rename = "game_modes")] - pub game_modes: Vec, - #[serde(rename = "lobbies")] - pub lobbies: Vec, - #[serde(rename = "regions")] - pub regions: Vec, + #[serde(rename = "game_modes")] + pub game_modes: Vec, + #[serde(rename = "lobbies")] + pub lobbies: Vec, + #[serde(rename = "regions")] + pub regions: Vec, } impl MatchmakerListLobbiesResponse { - pub fn new( - game_modes: Vec, - lobbies: Vec, - regions: Vec, - ) -> MatchmakerListLobbiesResponse { - MatchmakerListLobbiesResponse { - game_modes, - lobbies, - regions, - } - } + pub fn new(game_modes: Vec, lobbies: Vec, regions: Vec) -> MatchmakerListLobbiesResponse { + MatchmakerListLobbiesResponse { + game_modes, + lobbies, + regions, + } + } } + + diff --git a/sdks/rust/src/models/matchmaker_list_regions_response.rs b/sdks/rust/src/models/matchmaker_list_regions_response.rs index 9d6b0694..63ac29d7 100644 --- a/sdks/rust/src/models/matchmaker_list_regions_response.rs +++ b/sdks/rust/src/models/matchmaker_list_regions_response.rs @@ -4,18 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerListRegionsResponse { - #[serde(rename = "regions")] - pub regions: Vec, + #[serde(rename = "regions")] + pub regions: Vec, } impl MatchmakerListRegionsResponse { - pub fn new(regions: Vec) -> MatchmakerListRegionsResponse { - MatchmakerListRegionsResponse { regions } - } + pub fn new(regions: Vec) -> MatchmakerListRegionsResponse { + MatchmakerListRegionsResponse { + regions, + } + } } + + diff --git a/sdks/rust/src/models/matchmaker_lobbies_create_request.rs b/sdks/rust/src/models/matchmaker_lobbies_create_request.rs index d36b12e1..5a2e7d8b 100644 --- a/sdks/rust/src/models/matchmaker_lobbies_create_request.rs +++ b/sdks/rust/src/models/matchmaker_lobbies_create_request.rs @@ -4,51 +4,46 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerLobbiesCreateRequest { - #[serde(rename = "captcha", skip_serializing_if = "Option::is_none")] - pub captcha: Option>, - #[serde(rename = "game_mode")] - pub game_mode: String, - #[serde( - rename = "lobby_config", - default, - with = "::serde_with::rust::double_option", - skip_serializing_if = "Option::is_none" - )] - pub lobby_config: Option>, - #[serde(rename = "max_players", skip_serializing_if = "Option::is_none")] - pub max_players: Option, - #[serde(rename = "publicity", skip_serializing_if = "Option::is_none")] - pub publicity: Option, - #[serde(rename = "region", skip_serializing_if = "Option::is_none")] - pub region: Option, - #[serde(rename = "tags", skip_serializing_if = "Option::is_none")] - pub tags: Option<::std::collections::HashMap>, - #[serde( - rename = "verification_data", - default, - with = "::serde_with::rust::double_option", - skip_serializing_if = "Option::is_none" - )] - pub verification_data: Option>, + #[serde(rename = "captcha", skip_serializing_if = "Option::is_none")] + pub captcha: Option>, + #[serde(rename = "game_mode")] + pub game_mode: String, + #[serde(rename = "lobby_config", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub lobby_config: Option>, + #[serde(rename = "max_players", skip_serializing_if = "Option::is_none")] + pub max_players: Option, + #[serde(rename = "publicity", skip_serializing_if = "Option::is_none")] + pub publicity: Option, + #[serde(rename = "region", skip_serializing_if = "Option::is_none")] + pub region: Option, + #[serde(rename = "tags", skip_serializing_if = "Option::is_none")] + pub tags: Option<::std::collections::HashMap>, + #[serde(rename = "verification_data", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub verification_data: Option>, } impl MatchmakerLobbiesCreateRequest { - pub fn new(game_mode: String) -> MatchmakerLobbiesCreateRequest { - MatchmakerLobbiesCreateRequest { - captcha: None, - game_mode, - lobby_config: None, - max_players: None, - publicity: None, - region: None, - tags: None, - verification_data: None, - } - } + pub fn new(game_mode: String) -> MatchmakerLobbiesCreateRequest { + MatchmakerLobbiesCreateRequest { + captcha: None, + game_mode, + lobby_config: None, + max_players: None, + publicity: None, + region: None, + tags: None, + verification_data: None, + } + } } + + diff --git a/sdks/rust/src/models/matchmaker_lobbies_find_request.rs b/sdks/rust/src/models/matchmaker_lobbies_find_request.rs index bb3b8cde..1ef9a40d 100644 --- a/sdks/rust/src/models/matchmaker_lobbies_find_request.rs +++ b/sdks/rust/src/models/matchmaker_lobbies_find_request.rs @@ -4,46 +4,43 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerLobbiesFindRequest { - #[serde(rename = "captcha", skip_serializing_if = "Option::is_none")] - pub captcha: Option>, - #[serde(rename = "game_modes")] - pub game_modes: Vec, - #[serde(rename = "max_players", skip_serializing_if = "Option::is_none")] - pub max_players: Option, - #[serde( - rename = "prevent_auto_create_lobby", - skip_serializing_if = "Option::is_none" - )] - pub prevent_auto_create_lobby: Option, - #[serde(rename = "regions", skip_serializing_if = "Option::is_none")] - pub regions: Option>, - #[serde(rename = "tags", skip_serializing_if = "Option::is_none")] - pub tags: Option<::std::collections::HashMap>, - #[serde( - rename = "verification_data", - default, - with = "::serde_with::rust::double_option", - skip_serializing_if = "Option::is_none" - )] - pub verification_data: Option>, + #[serde(rename = "captcha", skip_serializing_if = "Option::is_none")] + pub captcha: Option>, + #[serde(rename = "game_modes")] + pub game_modes: Vec, + #[serde(rename = "max_players", skip_serializing_if = "Option::is_none")] + pub max_players: Option, + #[serde(rename = "prevent_auto_create_lobby", skip_serializing_if = "Option::is_none")] + pub prevent_auto_create_lobby: Option, + #[serde(rename = "regions", skip_serializing_if = "Option::is_none")] + pub regions: Option>, + #[serde(rename = "tags", skip_serializing_if = "Option::is_none")] + pub tags: Option<::std::collections::HashMap>, + #[serde(rename = "verification_data", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub verification_data: Option>, } impl MatchmakerLobbiesFindRequest { - pub fn new(game_modes: Vec) -> MatchmakerLobbiesFindRequest { - MatchmakerLobbiesFindRequest { - captcha: None, - game_modes, - max_players: None, - prevent_auto_create_lobby: None, - regions: None, - tags: None, - verification_data: None, - } - } + pub fn new(game_modes: Vec) -> MatchmakerLobbiesFindRequest { + MatchmakerLobbiesFindRequest { + captcha: None, + game_modes, + max_players: None, + prevent_auto_create_lobby: None, + regions: None, + tags: None, + verification_data: None, + } + } } + + diff --git a/sdks/rust/src/models/matchmaker_lobbies_join_request.rs b/sdks/rust/src/models/matchmaker_lobbies_join_request.rs index cd7265f1..a54e2a76 100644 --- a/sdks/rust/src/models/matchmaker_lobbies_join_request.rs +++ b/sdks/rust/src/models/matchmaker_lobbies_join_request.rs @@ -4,31 +4,31 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerLobbiesJoinRequest { - #[serde(rename = "captcha", skip_serializing_if = "Option::is_none")] - pub captcha: Option>, - #[serde(rename = "lobby_id")] - pub lobby_id: String, - #[serde( - rename = "verification_data", - default, - with = "::serde_with::rust::double_option", - skip_serializing_if = "Option::is_none" - )] - pub verification_data: Option>, + #[serde(rename = "captcha", skip_serializing_if = "Option::is_none")] + pub captcha: Option>, + #[serde(rename = "lobby_id")] + pub lobby_id: String, + #[serde(rename = "verification_data", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub verification_data: Option>, } impl MatchmakerLobbiesJoinRequest { - pub fn new(lobby_id: String) -> MatchmakerLobbiesJoinRequest { - MatchmakerLobbiesJoinRequest { - captcha: None, - lobby_id, - verification_data: None, - } - } + pub fn new(lobby_id: String) -> MatchmakerLobbiesJoinRequest { + MatchmakerLobbiesJoinRequest { + captcha: None, + lobby_id, + verification_data: None, + } + } } + + diff --git a/sdks/rust/src/models/matchmaker_lobbies_set_closed_request.rs b/sdks/rust/src/models/matchmaker_lobbies_set_closed_request.rs index c9edb57c..706039c7 100644 --- a/sdks/rust/src/models/matchmaker_lobbies_set_closed_request.rs +++ b/sdks/rust/src/models/matchmaker_lobbies_set_closed_request.rs @@ -4,18 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerLobbiesSetClosedRequest { - #[serde(rename = "is_closed")] - pub is_closed: bool, + #[serde(rename = "is_closed")] + pub is_closed: bool, } impl MatchmakerLobbiesSetClosedRequest { - pub fn new(is_closed: bool) -> MatchmakerLobbiesSetClosedRequest { - MatchmakerLobbiesSetClosedRequest { is_closed } - } + pub fn new(is_closed: bool) -> MatchmakerLobbiesSetClosedRequest { + MatchmakerLobbiesSetClosedRequest { + is_closed, + } + } } + + diff --git a/sdks/rust/src/models/matchmaker_lobby_info.rs b/sdks/rust/src/models/matchmaker_lobby_info.rs index e3564668..2d3d6ac6 100644 --- a/sdks/rust/src/models/matchmaker_lobby_info.rs +++ b/sdks/rust/src/models/matchmaker_lobby_info.rs @@ -4,57 +4,48 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// MatchmakerLobbyInfo : A public lobby in the lobby list. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerLobbyInfo { - #[serde(rename = "game_mode_id")] - pub game_mode_id: String, - #[serde(rename = "lobby_id")] - pub lobby_id: uuid::Uuid, - #[serde(rename = "max_players_direct")] - pub max_players_direct: i32, - #[serde(rename = "max_players_normal")] - pub max_players_normal: i32, - #[serde(rename = "max_players_party")] - pub max_players_party: i32, - #[serde(rename = "region_id")] - pub region_id: String, - #[serde( - rename = "state", - default, - with = "::serde_with::rust::double_option", - skip_serializing_if = "Option::is_none" - )] - pub state: Option>, - #[serde(rename = "total_player_count")] - pub total_player_count: i32, + #[serde(rename = "game_mode_id")] + pub game_mode_id: String, + #[serde(rename = "lobby_id")] + pub lobby_id: uuid::Uuid, + #[serde(rename = "max_players_direct")] + pub max_players_direct: i32, + #[serde(rename = "max_players_normal")] + pub max_players_normal: i32, + #[serde(rename = "max_players_party")] + pub max_players_party: i32, + #[serde(rename = "region_id")] + pub region_id: String, + #[serde(rename = "state", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub state: Option>, + #[serde(rename = "total_player_count")] + pub total_player_count: i32, } impl MatchmakerLobbyInfo { - /// A public lobby in the lobby list. - pub fn new( - game_mode_id: String, - lobby_id: uuid::Uuid, - max_players_direct: i32, - max_players_normal: i32, - max_players_party: i32, - region_id: String, - total_player_count: i32, - ) -> MatchmakerLobbyInfo { - MatchmakerLobbyInfo { - game_mode_id, - lobby_id, - max_players_direct, - max_players_normal, - max_players_party, - region_id, - state: None, - total_player_count, - } - } + /// A public lobby in the lobby list. + pub fn new(game_mode_id: String, lobby_id: uuid::Uuid, max_players_direct: i32, max_players_normal: i32, max_players_party: i32, region_id: String, total_player_count: i32) -> MatchmakerLobbyInfo { + MatchmakerLobbyInfo { + game_mode_id, + lobby_id, + max_players_direct, + max_players_normal, + max_players_party, + region_id, + state: None, + total_player_count, + } + } } + + diff --git a/sdks/rust/src/models/matchmaker_players_connected_request.rs b/sdks/rust/src/models/matchmaker_players_connected_request.rs index dda65a73..de50dbcb 100644 --- a/sdks/rust/src/models/matchmaker_players_connected_request.rs +++ b/sdks/rust/src/models/matchmaker_players_connected_request.rs @@ -4,18 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerPlayersConnectedRequest { - #[serde(rename = "player_token")] - pub player_token: String, + #[serde(rename = "player_token")] + pub player_token: String, } impl MatchmakerPlayersConnectedRequest { - pub fn new(player_token: String) -> MatchmakerPlayersConnectedRequest { - MatchmakerPlayersConnectedRequest { player_token } - } + pub fn new(player_token: String) -> MatchmakerPlayersConnectedRequest { + MatchmakerPlayersConnectedRequest { + player_token, + } + } } + + diff --git a/sdks/rust/src/models/matchmaker_region_info.rs b/sdks/rust/src/models/matchmaker_region_info.rs index 27869634..95fddd3a 100644 --- a/sdks/rust/src/models/matchmaker_region_info.rs +++ b/sdks/rust/src/models/matchmaker_region_info.rs @@ -4,44 +4,42 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// MatchmakerRegionInfo : A region that the player can connect to. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerRegionInfo { - #[serde(rename = "datacenter_coord")] - pub datacenter_coord: Box, - #[serde(rename = "datacenter_distance_from_client")] - pub datacenter_distance_from_client: Box, - /// Represent a resource's readable display name. - #[serde(rename = "provider_display_name")] - pub provider_display_name: String, - /// Represent a resource's readable display name. - #[serde(rename = "region_display_name")] - pub region_display_name: String, - /// A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short. - #[serde(rename = "region_id")] - pub region_id: String, + #[serde(rename = "datacenter_coord")] + pub datacenter_coord: Box, + #[serde(rename = "datacenter_distance_from_client")] + pub datacenter_distance_from_client: Box, + /// Represent a resource's readable display name. + #[serde(rename = "provider_display_name")] + pub provider_display_name: String, + /// Represent a resource's readable display name. + #[serde(rename = "region_display_name")] + pub region_display_name: String, + /// A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short. + #[serde(rename = "region_id")] + pub region_id: String, } impl MatchmakerRegionInfo { - /// A region that the player can connect to. - pub fn new( - datacenter_coord: crate::models::GeoCoord, - datacenter_distance_from_client: crate::models::GeoDistance, - provider_display_name: String, - region_display_name: String, - region_id: String, - ) -> MatchmakerRegionInfo { - MatchmakerRegionInfo { - datacenter_coord: Box::new(datacenter_coord), - datacenter_distance_from_client: Box::new(datacenter_distance_from_client), - provider_display_name, - region_display_name, - region_id, - } - } + /// A region that the player can connect to. + pub fn new(datacenter_coord: crate::models::GeoCoord, datacenter_distance_from_client: crate::models::GeoDistance, provider_display_name: String, region_display_name: String, region_id: String) -> MatchmakerRegionInfo { + MatchmakerRegionInfo { + datacenter_coord: Box::new(datacenter_coord), + datacenter_distance_from_client: Box::new(datacenter_distance_from_client), + provider_display_name, + region_display_name, + region_id, + } + } } + + diff --git a/sdks/rust/src/models/matchmaker_region_statistics.rs b/sdks/rust/src/models/matchmaker_region_statistics.rs index 8d4f4ff0..49be5115 100644 --- a/sdks/rust/src/models/matchmaker_region_statistics.rs +++ b/sdks/rust/src/models/matchmaker_region_statistics.rs @@ -4,18 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerRegionStatistics { - #[serde(rename = "player_count")] - pub player_count: i64, + #[serde(rename = "player_count")] + pub player_count: i64, } impl MatchmakerRegionStatistics { - pub fn new(player_count: i64) -> MatchmakerRegionStatistics { - MatchmakerRegionStatistics { player_count } - } + pub fn new(player_count: i64) -> MatchmakerRegionStatistics { + MatchmakerRegionStatistics { + player_count, + } + } } + + diff --git a/sdks/rust/src/models/mod.rs b/sdks/rust/src/models/mod.rs index b0881fb9..a41ff696 100644 --- a/sdks/rust/src/models/mod.rs +++ b/sdks/rust/src/models/mod.rs @@ -24,6 +24,8 @@ pub mod admin_clusters_pool; pub use self::admin_clusters_pool::AdminClustersPool; pub mod admin_clusters_pool_type; pub use self::admin_clusters_pool_type::AdminClustersPoolType; +pub mod admin_clusters_pool_update; +pub use self::admin_clusters_pool_update::AdminClustersPoolUpdate; pub mod admin_clusters_provider; pub use self::admin_clusters_provider::AdminClustersProvider; pub mod admin_clusters_server; @@ -130,6 +132,8 @@ pub mod cloud_games_create_game_version_request; pub use self::cloud_games_create_game_version_request::CloudGamesCreateGameVersionRequest; pub mod cloud_games_create_game_version_response; pub use self::cloud_games_create_game_version_response::CloudGamesCreateGameVersionResponse; +pub mod cloud_games_create_service_token_response; +pub use self::cloud_games_create_service_token_response::CloudGamesCreateServiceTokenResponse; pub mod cloud_games_delete_matchmaker_lobby_response; pub use self::cloud_games_delete_matchmaker_lobby_response::CloudGamesDeleteMatchmakerLobbyResponse; pub mod cloud_games_export_lobby_logs_request; @@ -366,6 +370,16 @@ pub mod ee_backend_update_variable; pub use self::ee_backend_update_variable::EeBackendUpdateVariable; pub mod ee_backend_variable; pub use self::ee_backend_variable::EeBackendVariable; +pub mod ee_billing_game_usage; +pub use self::ee_billing_game_usage::EeBillingGameUsage; +pub mod ee_billing_group; +pub use self::ee_billing_group::EeBillingGroup; +pub mod ee_billing_plan; +pub use self::ee_billing_plan::EeBillingPlan; +pub mod ee_billing_region_usage; +pub use self::ee_billing_region_usage::EeBillingRegionUsage; +pub mod ee_billing_subscription; +pub use self::ee_billing_subscription::EeBillingSubscription; pub mod ee_cloud_analytics_variant_query; pub use self::ee_cloud_analytics_variant_query::EeCloudAnalyticsVariantQuery; pub mod ee_cloud_avg_play_duration_by_game_mode_data_set; @@ -424,16 +438,8 @@ pub mod ee_cloud_destroyed_lobbies_by_failure_data_set; pub use self::ee_cloud_destroyed_lobbies_by_failure_data_set::EeCloudDestroyedLobbiesByFailureDataSet; pub mod ee_cloud_failed_lobbies_data_set; pub use self::ee_cloud_failed_lobbies_data_set::EeCloudFailedLobbiesDataSet; -pub mod ee_cloud_games_billing_dynamic_servers_capacity_region; -pub use self::ee_cloud_games_billing_dynamic_servers_capacity_region::EeCloudGamesBillingDynamicServersCapacityRegion; -pub mod ee_cloud_games_billing_dynamic_servers_capacity_region_config; -pub use self::ee_cloud_games_billing_dynamic_servers_capacity_region_config::EeCloudGamesBillingDynamicServersCapacityRegionConfig; pub mod ee_cloud_games_billing_get_response; pub use self::ee_cloud_games_billing_get_response::EeCloudGamesBillingGetResponse; -pub mod ee_cloud_games_billing_plan; -pub use self::ee_cloud_games_billing_plan::EeCloudGamesBillingPlan; -pub mod ee_cloud_games_billing_plan_config; -pub use self::ee_cloud_games_billing_plan_config::EeCloudGamesBillingPlanConfig; pub mod ee_cloud_games_billing_update_plan_request; pub use self::ee_cloud_games_billing_update_plan_request::EeCloudGamesBillingUpdatePlanRequest; pub mod ee_cloud_games_namespaces_get_analytics_response; @@ -448,8 +454,8 @@ pub mod ee_cloud_groups_billing_create_stripe_portal_session_response; pub use self::ee_cloud_groups_billing_create_stripe_portal_session_response::EeCloudGroupsBillingCreateStripePortalSessionResponse; pub mod ee_cloud_groups_billing_get_billing_response; pub use self::ee_cloud_groups_billing_get_billing_response::EeCloudGroupsBillingGetBillingResponse; -pub mod ee_cloud_groups_billing_group; -pub use self::ee_cloud_groups_billing_group::EeCloudGroupsBillingGroup; +pub mod ee_cloud_groups_billing_get_billing_usage_response; +pub use self::ee_cloud_groups_billing_get_billing_usage_response::EeCloudGroupsBillingGetBillingUsageResponse; pub mod ee_cloud_groups_billing_stripe_portal_session_intent; pub use self::ee_cloud_groups_billing_stripe_portal_session_intent::EeCloudGroupsBillingStripePortalSessionIntent; pub mod ee_cloud_lobby_count_by_game_mode_data_set; @@ -722,6 +728,32 @@ pub mod provision_datacenters_get_tls_response; pub use self::provision_datacenters_get_tls_response::ProvisionDatacentersGetTlsResponse; pub mod provision_servers_get_info_response; pub use self::provision_servers_get_info_response::ProvisionServersGetInfoResponse; +pub mod servers_create_server_network_request; +pub use self::servers_create_server_network_request::ServersCreateServerNetworkRequest; +pub mod servers_create_server_port_request; +pub use self::servers_create_server_port_request::ServersCreateServerPortRequest; +pub mod servers_create_server_request; +pub use self::servers_create_server_request::ServersCreateServerRequest; +pub mod servers_create_server_response; +pub use self::servers_create_server_response::ServersCreateServerResponse; +pub mod servers_destroy_server_response; +pub use self::servers_destroy_server_response::ServersDestroyServerResponse; +pub mod servers_get_server_response; +pub use self::servers_get_server_response::ServersGetServerResponse; +pub mod servers_network; +pub use self::servers_network::ServersNetwork; +pub mod servers_network_mode; +pub use self::servers_network_mode::ServersNetworkMode; +pub mod servers_port; +pub use self::servers_port::ServersPort; +pub mod servers_port_protocol; +pub use self::servers_port_protocol::ServersPortProtocol; +pub mod servers_port_routing; +pub use self::servers_port_routing::ServersPortRouting; +pub mod servers_resources; +pub use self::servers_resources::ServersResources; +pub mod servers_server; +pub use self::servers_server::ServersServer; pub mod upload_prepare_file; pub use self::upload_prepare_file::UploadPrepareFile; pub mod upload_presigned_request; diff --git a/sdks/rust/src/models/portal_get_game_profile_response.rs b/sdks/rust/src/models/portal_get_game_profile_response.rs index 010a490c..564536c9 100644 --- a/sdks/rust/src/models/portal_get_game_profile_response.rs +++ b/sdks/rust/src/models/portal_get_game_profile_response.rs @@ -4,26 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct PortalGetGameProfileResponse { - #[serde(rename = "game")] - pub game: Box, - #[serde(rename = "watch")] - pub watch: Box, + #[serde(rename = "game")] + pub game: Box, + #[serde(rename = "watch")] + pub watch: Box, } impl PortalGetGameProfileResponse { - pub fn new( - game: crate::models::GameProfile, - watch: crate::models::WatchResponse, - ) -> PortalGetGameProfileResponse { - PortalGetGameProfileResponse { - game: Box::new(game), - watch: Box::new(watch), - } - } + pub fn new(game: crate::models::GameProfile, watch: crate::models::WatchResponse) -> PortalGetGameProfileResponse { + PortalGetGameProfileResponse { + game: Box::new(game), + watch: Box::new(watch), + } + } } + + diff --git a/sdks/rust/src/models/portal_get_suggested_games_response.rs b/sdks/rust/src/models/portal_get_suggested_games_response.rs index 3eb9423d..97d9b24c 100644 --- a/sdks/rust/src/models/portal_get_suggested_games_response.rs +++ b/sdks/rust/src/models/portal_get_suggested_games_response.rs @@ -4,27 +4,29 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct PortalGetSuggestedGamesResponse { - /// A list of game summaries. - #[serde(rename = "games")] - pub games: Vec, - #[serde(rename = "watch")] - pub watch: Box, + /// A list of game summaries. + #[serde(rename = "games")] + pub games: Vec, + #[serde(rename = "watch")] + pub watch: Box, } impl PortalGetSuggestedGamesResponse { - pub fn new( - games: Vec, - watch: crate::models::WatchResponse, - ) -> PortalGetSuggestedGamesResponse { - PortalGetSuggestedGamesResponse { - games, - watch: Box::new(watch), - } - } + pub fn new(games: Vec, watch: crate::models::WatchResponse) -> PortalGetSuggestedGamesResponse { + PortalGetSuggestedGamesResponse { + games, + watch: Box::new(watch), + } + } } + + diff --git a/sdks/rust/src/models/portal_notification_register_firebase_service.rs b/sdks/rust/src/models/portal_notification_register_firebase_service.rs index 26d7afbb..8b5b0c1f 100644 --- a/sdks/rust/src/models/portal_notification_register_firebase_service.rs +++ b/sdks/rust/src/models/portal_notification_register_firebase_service.rs @@ -4,18 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct PortalNotificationRegisterFirebaseService { - #[serde(rename = "access_key")] - pub access_key: String, + #[serde(rename = "access_key")] + pub access_key: String, } impl PortalNotificationRegisterFirebaseService { - pub fn new(access_key: String) -> PortalNotificationRegisterFirebaseService { - PortalNotificationRegisterFirebaseService { access_key } - } + pub fn new(access_key: String) -> PortalNotificationRegisterFirebaseService { + PortalNotificationRegisterFirebaseService { + access_key, + } + } } + + diff --git a/sdks/rust/src/models/portal_notification_register_service.rs b/sdks/rust/src/models/portal_notification_register_service.rs index 69ebee47..fecb3d23 100644 --- a/sdks/rust/src/models/portal_notification_register_service.rs +++ b/sdks/rust/src/models/portal_notification_register_service.rs @@ -4,18 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct PortalNotificationRegisterService { - #[serde(rename = "firebase", skip_serializing_if = "Option::is_none")] - pub firebase: Option>, + #[serde(rename = "firebase", skip_serializing_if = "Option::is_none")] + pub firebase: Option>, } impl PortalNotificationRegisterService { - pub fn new() -> PortalNotificationRegisterService { - PortalNotificationRegisterService { firebase: None } - } + pub fn new() -> PortalNotificationRegisterService { + PortalNotificationRegisterService { + firebase: None, + } + } } + + diff --git a/sdks/rust/src/models/portal_notification_unregister_service.rs b/sdks/rust/src/models/portal_notification_unregister_service.rs index baf27255..d019c981 100644 --- a/sdks/rust/src/models/portal_notification_unregister_service.rs +++ b/sdks/rust/src/models/portal_notification_unregister_service.rs @@ -4,27 +4,33 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ -/// + +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum PortalNotificationUnregisterService { - #[serde(rename = "firebase")] - Firebase, + #[serde(rename = "firebase")] + Firebase, + } impl ToString for PortalNotificationUnregisterService { - fn to_string(&self) -> String { - match self { - Self::Firebase => String::from("firebase"), - } - } + fn to_string(&self) -> String { + match self { + Self::Firebase => String::from("firebase"), + } + } } impl Default for PortalNotificationUnregisterService { - fn default() -> PortalNotificationUnregisterService { - Self::Firebase - } + fn default() -> PortalNotificationUnregisterService { + Self::Firebase + } } + + + + diff --git a/sdks/rust/src/models/provision_datacenters_get_tls_response.rs b/sdks/rust/src/models/provision_datacenters_get_tls_response.rs index b003ad76..3f004c1e 100644 --- a/sdks/rust/src/models/provision_datacenters_get_tls_response.rs +++ b/sdks/rust/src/models/provision_datacenters_get_tls_response.rs @@ -4,26 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ProvisionDatacentersGetTlsResponse { - #[serde(rename = "job_cert_pem")] - pub job_cert_pem: String, - #[serde(rename = "job_private_key_pem")] - pub job_private_key_pem: String, + #[serde(rename = "job_cert_pem")] + pub job_cert_pem: String, + #[serde(rename = "job_private_key_pem")] + pub job_private_key_pem: String, } impl ProvisionDatacentersGetTlsResponse { - pub fn new( - job_cert_pem: String, - job_private_key_pem: String, - ) -> ProvisionDatacentersGetTlsResponse { - ProvisionDatacentersGetTlsResponse { - job_cert_pem, - job_private_key_pem, - } - } + pub fn new(job_cert_pem: String, job_private_key_pem: String) -> ProvisionDatacentersGetTlsResponse { + ProvisionDatacentersGetTlsResponse { + job_cert_pem, + job_private_key_pem, + } + } } + + diff --git a/sdks/rust/src/models/provision_servers_get_info_response.rs b/sdks/rust/src/models/provision_servers_get_info_response.rs index 4f97b5af..7d581a75 100644 --- a/sdks/rust/src/models/provision_servers_get_info_response.rs +++ b/sdks/rust/src/models/provision_servers_get_info_response.rs @@ -4,38 +4,37 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ + + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ProvisionServersGetInfoResponse { - #[serde(rename = "cluster_id")] - pub cluster_id: uuid::Uuid, - #[serde(rename = "datacenter_id")] - pub datacenter_id: uuid::Uuid, - #[serde(rename = "name")] - pub name: String, - #[serde(rename = "server_id")] - pub server_id: uuid::Uuid, - #[serde(rename = "vlan_ip")] - pub vlan_ip: String, + #[serde(rename = "cluster_id")] + pub cluster_id: uuid::Uuid, + #[serde(rename = "datacenter_id")] + pub datacenter_id: uuid::Uuid, + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "server_id")] + pub server_id: uuid::Uuid, + #[serde(rename = "vlan_ip")] + pub vlan_ip: String, } impl ProvisionServersGetInfoResponse { - pub fn new( - cluster_id: uuid::Uuid, - datacenter_id: uuid::Uuid, - name: String, - server_id: uuid::Uuid, - vlan_ip: String, - ) -> ProvisionServersGetInfoResponse { - ProvisionServersGetInfoResponse { - cluster_id, - datacenter_id, - name, - server_id, - vlan_ip, - } - } + pub fn new(cluster_id: uuid::Uuid, datacenter_id: uuid::Uuid, name: String, server_id: uuid::Uuid, vlan_ip: String) -> ProvisionServersGetInfoResponse { + ProvisionServersGetInfoResponse { + cluster_id, + datacenter_id, + name, + server_id, + vlan_ip, + } + } } + + diff --git a/sdks/rust/src/models/servers_create_server_network_request.rs b/sdks/rust/src/models/servers_create_server_network_request.rs new file mode 100644 index 00000000..535c76ae --- /dev/null +++ b/sdks/rust/src/models/servers_create_server_network_request.rs @@ -0,0 +1,31 @@ +/* + * Rivet API EE + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct ServersCreateServerNetworkRequest { + #[serde(rename = "mode", skip_serializing_if = "Option::is_none")] + pub mode: Option, + #[serde(rename = "ports")] + pub ports: ::std::collections::HashMap, +} + +impl ServersCreateServerNetworkRequest { + pub fn new(ports: ::std::collections::HashMap) -> ServersCreateServerNetworkRequest { + ServersCreateServerNetworkRequest { + mode: None, + ports, + } + } +} + + diff --git a/sdks/rust/src/models/servers_create_server_port_request.rs b/sdks/rust/src/models/servers_create_server_port_request.rs new file mode 100644 index 00000000..8a232891 --- /dev/null +++ b/sdks/rust/src/models/servers_create_server_port_request.rs @@ -0,0 +1,34 @@ +/* + * Rivet API EE + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct ServersCreateServerPortRequest { + #[serde(rename = "protocol")] + pub protocol: crate::models::ServersPortProtocol, + #[serde(rename = "routing", skip_serializing_if = "Option::is_none")] + pub routing: Option>, + #[serde(rename = "server_port", skip_serializing_if = "Option::is_none")] + pub server_port: Option, +} + +impl ServersCreateServerPortRequest { + pub fn new(protocol: crate::models::ServersPortProtocol) -> ServersCreateServerPortRequest { + ServersCreateServerPortRequest { + protocol, + routing: None, + server_port: None, + } + } +} + + diff --git a/sdks/rust/src/models/servers_create_server_request.rs b/sdks/rust/src/models/servers_create_server_request.rs new file mode 100644 index 00000000..f9cf95a1 --- /dev/null +++ b/sdks/rust/src/models/servers_create_server_request.rs @@ -0,0 +1,51 @@ +/* + * Rivet API EE + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct ServersCreateServerRequest { + #[serde(rename = "arguments", skip_serializing_if = "Option::is_none")] + pub arguments: Option>, + /// The name ID of the datacenter + #[serde(rename = "datacenter")] + pub datacenter: String, + #[serde(rename = "environment", skip_serializing_if = "Option::is_none")] + pub environment: Option<::std::collections::HashMap>, + #[serde(rename = "image_id")] + pub image_id: uuid::Uuid, + /// The duration to wait for in milliseconds before killing the server. This should be set to a safe default, and can be overridden during a DELETE request if needed. + #[serde(rename = "kill_timeout", skip_serializing_if = "Option::is_none")] + pub kill_timeout: Option, + #[serde(rename = "metadata", deserialize_with = "Option::deserialize")] + pub metadata: Option, + #[serde(rename = "network")] + pub network: Box, + #[serde(rename = "resources")] + pub resources: Box, +} + +impl ServersCreateServerRequest { + pub fn new(datacenter: String, image_id: uuid::Uuid, metadata: Option, network: crate::models::ServersCreateServerNetworkRequest, resources: crate::models::ServersResources) -> ServersCreateServerRequest { + ServersCreateServerRequest { + arguments: None, + datacenter, + environment: None, + image_id, + kill_timeout: None, + metadata, + network: Box::new(network), + resources: Box::new(resources), + } + } +} + + diff --git a/sdks/rust/src/models/servers_create_server_response.rs b/sdks/rust/src/models/servers_create_server_response.rs new file mode 100644 index 00000000..3a1e0671 --- /dev/null +++ b/sdks/rust/src/models/servers_create_server_response.rs @@ -0,0 +1,28 @@ +/* + * Rivet API EE + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct ServersCreateServerResponse { + #[serde(rename = "server")] + pub server: Box, +} + +impl ServersCreateServerResponse { + pub fn new(server: crate::models::ServersServer) -> ServersCreateServerResponse { + ServersCreateServerResponse { + server: Box::new(server), + } + } +} + + diff --git a/sdks/rust/src/models/servers_destroy_server_response.rs b/sdks/rust/src/models/servers_destroy_server_response.rs new file mode 100644 index 00000000..95571df2 --- /dev/null +++ b/sdks/rust/src/models/servers_destroy_server_response.rs @@ -0,0 +1,28 @@ +/* + * Rivet API EE + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct ServersDestroyServerResponse { + #[serde(rename = "server_id")] + pub server_id: uuid::Uuid, +} + +impl ServersDestroyServerResponse { + pub fn new(server_id: uuid::Uuid) -> ServersDestroyServerResponse { + ServersDestroyServerResponse { + server_id, + } + } +} + + diff --git a/sdks/rust/src/models/servers_get_server_response.rs b/sdks/rust/src/models/servers_get_server_response.rs new file mode 100644 index 00000000..24aa1d6e --- /dev/null +++ b/sdks/rust/src/models/servers_get_server_response.rs @@ -0,0 +1,28 @@ +/* + * Rivet API EE + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct ServersGetServerResponse { + #[serde(rename = "server")] + pub server: Box, +} + +impl ServersGetServerResponse { + pub fn new(server: crate::models::ServersServer) -> ServersGetServerResponse { + ServersGetServerResponse { + server: Box::new(server), + } + } +} + + diff --git a/sdks/rust/src/models/servers_network.rs b/sdks/rust/src/models/servers_network.rs new file mode 100644 index 00000000..709acb01 --- /dev/null +++ b/sdks/rust/src/models/servers_network.rs @@ -0,0 +1,31 @@ +/* + * Rivet API EE + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct ServersNetwork { + #[serde(rename = "mode", skip_serializing_if = "Option::is_none")] + pub mode: Option, + #[serde(rename = "ports")] + pub ports: ::std::collections::HashMap, +} + +impl ServersNetwork { + pub fn new(ports: ::std::collections::HashMap) -> ServersNetwork { + ServersNetwork { + mode: None, + ports, + } + } +} + + diff --git a/sdks/rust/src/models/servers_network_mode.rs b/sdks/rust/src/models/servers_network_mode.rs new file mode 100644 index 00000000..cc9f7ac2 --- /dev/null +++ b/sdks/rust/src/models/servers_network_mode.rs @@ -0,0 +1,39 @@ +/* + * Rivet API EE + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ServersNetworkMode { + #[serde(rename = "bridge")] + Bridge, + #[serde(rename = "host")] + Host, + +} + +impl ToString for ServersNetworkMode { + fn to_string(&self) -> String { + match self { + Self::Bridge => String::from("bridge"), + Self::Host => String::from("host"), + } + } +} + +impl Default for ServersNetworkMode { + fn default() -> ServersNetworkMode { + Self::Bridge + } +} + + + + diff --git a/sdks/rust/src/models/servers_port.rs b/sdks/rust/src/models/servers_port.rs new file mode 100644 index 00000000..7a4def04 --- /dev/null +++ b/sdks/rust/src/models/servers_port.rs @@ -0,0 +1,40 @@ +/* + * Rivet API EE + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct ServersPort { + #[serde(rename = "protocol")] + pub protocol: crate::models::ServersPortProtocol, + #[serde(rename = "public_hostname", skip_serializing_if = "Option::is_none")] + pub public_hostname: Option, + #[serde(rename = "public_port", skip_serializing_if = "Option::is_none")] + pub public_port: Option, + #[serde(rename = "routing")] + pub routing: Box, + #[serde(rename = "server_port", skip_serializing_if = "Option::is_none")] + pub server_port: Option, +} + +impl ServersPort { + pub fn new(protocol: crate::models::ServersPortProtocol, routing: crate::models::ServersPortRouting) -> ServersPort { + ServersPort { + protocol, + public_hostname: None, + public_port: None, + routing: Box::new(routing), + server_port: None, + } + } +} + + diff --git a/sdks/rust/src/models/servers_port_protocol.rs b/sdks/rust/src/models/servers_port_protocol.rs new file mode 100644 index 00000000..e0352058 --- /dev/null +++ b/sdks/rust/src/models/servers_port_protocol.rs @@ -0,0 +1,48 @@ +/* + * Rivet API EE + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ServersPortProtocol { + #[serde(rename = "http")] + Http, + #[serde(rename = "https")] + Https, + #[serde(rename = "tcp")] + Tcp, + #[serde(rename = "tcp_tls")] + TcpTls, + #[serde(rename = "udp")] + Udp, + +} + +impl ToString for ServersPortProtocol { + fn to_string(&self) -> String { + match self { + Self::Http => String::from("http"), + Self::Https => String::from("https"), + Self::Tcp => String::from("tcp"), + Self::TcpTls => String::from("tcp_tls"), + Self::Udp => String::from("udp"), + } + } +} + +impl Default for ServersPortProtocol { + fn default() -> ServersPortProtocol { + Self::Http + } +} + + + + diff --git a/sdks/rust/src/models/servers_port_routing.rs b/sdks/rust/src/models/servers_port_routing.rs new file mode 100644 index 00000000..5dcbfea3 --- /dev/null +++ b/sdks/rust/src/models/servers_port_routing.rs @@ -0,0 +1,31 @@ +/* + * Rivet API EE + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct ServersPortRouting { + #[serde(rename = "game_guard", skip_serializing_if = "Option::is_none")] + pub game_guard: Option, + #[serde(rename = "host", skip_serializing_if = "Option::is_none")] + pub host: Option, +} + +impl ServersPortRouting { + pub fn new() -> ServersPortRouting { + ServersPortRouting { + game_guard: None, + host: None, + } + } +} + + diff --git a/sdks/rust/src/models/servers_resources.rs b/sdks/rust/src/models/servers_resources.rs new file mode 100644 index 00000000..9a608b0f --- /dev/null +++ b/sdks/rust/src/models/servers_resources.rs @@ -0,0 +1,33 @@ +/* + * Rivet API EE + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct ServersResources { + /// The number of CPU cores in millicores, or 1/1000 of a core. For example, 1/8 of a core would be 125 millicores, and 1 core would be 1000 millicores. + #[serde(rename = "cpu")] + pub cpu: i32, + /// The amount of memory in megabytes + #[serde(rename = "memory")] + pub memory: i32, +} + +impl ServersResources { + pub fn new(cpu: i32, memory: i32) -> ServersResources { + ServersResources { + cpu, + memory, + } + } +} + + diff --git a/sdks/rust/src/models/servers_server.rs b/sdks/rust/src/models/servers_server.rs new file mode 100644 index 00000000..4c0423cc --- /dev/null +++ b/sdks/rust/src/models/servers_server.rs @@ -0,0 +1,65 @@ +/* + * Rivet API EE + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct ServersServer { + #[serde(rename = "arguments", skip_serializing_if = "Option::is_none")] + pub arguments: Option>, + #[serde(rename = "cluster_id")] + pub cluster_id: uuid::Uuid, + #[serde(rename = "create_ts")] + pub create_ts: i64, + #[serde(rename = "datacenter_id")] + pub datacenter_id: uuid::Uuid, + #[serde(rename = "destroy_ts", skip_serializing_if = "Option::is_none")] + pub destroy_ts: Option, + #[serde(rename = "environment", skip_serializing_if = "Option::is_none")] + pub environment: Option<::std::collections::HashMap>, + #[serde(rename = "game_id")] + pub game_id: uuid::Uuid, + #[serde(rename = "image_id")] + pub image_id: uuid::Uuid, + /// The duration to wait for in milliseconds before killing the server. This should be set to a safe default, and can be overridden during a DELETE request if needed. + #[serde(rename = "kill_timeout", skip_serializing_if = "Option::is_none")] + pub kill_timeout: Option, + #[serde(rename = "metadata", deserialize_with = "Option::deserialize")] + pub metadata: Option, + #[serde(rename = "network")] + pub network: Box, + #[serde(rename = "resources")] + pub resources: Box, + #[serde(rename = "server_id")] + pub server_id: uuid::Uuid, +} + +impl ServersServer { + pub fn new(cluster_id: uuid::Uuid, create_ts: i64, datacenter_id: uuid::Uuid, game_id: uuid::Uuid, image_id: uuid::Uuid, metadata: Option, network: crate::models::ServersNetwork, resources: crate::models::ServersResources, server_id: uuid::Uuid) -> ServersServer { + ServersServer { + arguments: None, + cluster_id, + create_ts, + datacenter_id, + destroy_ts: None, + environment: None, + game_id, + image_id, + kill_timeout: None, + metadata, + network: Box::new(network), + resources: Box::new(resources), + server_id, + } + } +} + + diff --git a/sdks/rust/src/models/upload_prepare_file.rs b/sdks/rust/src/models/upload_prepare_file.rs index 695ff86d..4a965d6b 100644 --- a/sdks/rust/src/models/upload_prepare_file.rs +++ b/sdks/rust/src/models/upload_prepare_file.rs @@ -4,32 +4,36 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// UploadPrepareFile : A file being prepared to upload. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct UploadPrepareFile { - /// Unsigned 64 bit integer. - #[serde(rename = "content_length")] - pub content_length: i64, - /// The MIME type of the file. - #[serde(rename = "content_type", skip_serializing_if = "Option::is_none")] - pub content_type: Option, - /// The path/filename of the file. - #[serde(rename = "path")] - pub path: String, + /// Unsigned 64 bit integer. + #[serde(rename = "content_length")] + pub content_length: i64, + /// The MIME type of the file. + #[serde(rename = "content_type", skip_serializing_if = "Option::is_none")] + pub content_type: Option, + /// The path/filename of the file. + #[serde(rename = "path")] + pub path: String, } impl UploadPrepareFile { - /// A file being prepared to upload. - pub fn new(content_length: i64, path: String) -> UploadPrepareFile { - UploadPrepareFile { - content_length, - content_type: None, - path, - } - } + /// A file being prepared to upload. + pub fn new(content_length: i64, path: String) -> UploadPrepareFile { + UploadPrepareFile { + content_length, + content_type: None, + path, + } + } } + + diff --git a/sdks/rust/src/models/upload_presigned_request.rs b/sdks/rust/src/models/upload_presigned_request.rs index cb49080d..3bdb150f 100644 --- a/sdks/rust/src/models/upload_presigned_request.rs +++ b/sdks/rust/src/models/upload_presigned_request.rs @@ -4,41 +4,40 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// UploadPresignedRequest : A presigned request used to upload files. Upload your file to the given URL via a PUT request. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct UploadPresignedRequest { - /// The byte offset for this multipart chunk. Always 0 if not a multipart upload. - #[serde(rename = "byte_offset")] - pub byte_offset: i64, - /// Expected size of this upload. - #[serde(rename = "content_length")] - pub content_length: i64, - /// The name of the file to upload. This is the same as the one given in the upload prepare file. - #[serde(rename = "path")] - pub path: String, - /// The URL of the presigned request for which to upload your file to. - #[serde(rename = "url")] - pub url: String, + /// The byte offset for this multipart chunk. Always 0 if not a multipart upload. + #[serde(rename = "byte_offset")] + pub byte_offset: i64, + /// Expected size of this upload. + #[serde(rename = "content_length")] + pub content_length: i64, + /// The name of the file to upload. This is the same as the one given in the upload prepare file. + #[serde(rename = "path")] + pub path: String, + /// The URL of the presigned request for which to upload your file to. + #[serde(rename = "url")] + pub url: String, } impl UploadPresignedRequest { - /// A presigned request used to upload files. Upload your file to the given URL via a PUT request. - pub fn new( - byte_offset: i64, - content_length: i64, - path: String, - url: String, - ) -> UploadPresignedRequest { - UploadPresignedRequest { - byte_offset, - content_length, - path, - url, - } - } + /// A presigned request used to upload files. Upload your file to the given URL via a PUT request. + pub fn new(byte_offset: i64, content_length: i64, path: String, url: String) -> UploadPresignedRequest { + UploadPresignedRequest { + byte_offset, + content_length, + path, + url, + } + } } + + diff --git a/sdks/rust/src/models/validation_error.rs b/sdks/rust/src/models/validation_error.rs index ccb17a08..d62b6edf 100644 --- a/sdks/rust/src/models/validation_error.rs +++ b/sdks/rust/src/models/validation_error.rs @@ -4,22 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// ValidationError : An error given by failed content validation. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ValidationError { - /// A list of strings denoting the origin of a validation error. - #[serde(rename = "path")] - pub path: Vec, + /// A list of strings denoting the origin of a validation error. + #[serde(rename = "path")] + pub path: Vec, } impl ValidationError { - /// An error given by failed content validation. - pub fn new(path: Vec) -> ValidationError { - ValidationError { path } - } + /// An error given by failed content validation. + pub fn new(path: Vec) -> ValidationError { + ValidationError { + path, + } + } } + + diff --git a/sdks/rust/src/models/watch_response.rs b/sdks/rust/src/models/watch_response.rs index 4dc1eb43..e87f2744 100644 --- a/sdks/rust/src/models/watch_response.rs +++ b/sdks/rust/src/models/watch_response.rs @@ -4,22 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// WatchResponse : Provided by watchable endpoints used in blocking loops. + + #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct WatchResponse { - /// Index indicating the version of the data responded. Pass this to `WatchQuery` to block and wait for the next response. - #[serde(rename = "index")] - pub index: String, + /// Index indicating the version of the data responded. Pass this to `WatchQuery` to block and wait for the next response. + #[serde(rename = "index")] + pub index: String, } impl WatchResponse { - /// Provided by watchable endpoints used in blocking loops. - pub fn new(index: String) -> WatchResponse { - WatchResponse { index } - } + /// Provided by watchable endpoints used in blocking loops. + pub fn new(index: String) -> WatchResponse { + WatchResponse { + index, + } + } } + +