From dcc96745bee13f6c6f1c7d7b7fd0b2676af6b16a Mon Sep 17 00:00:00 2001 From: Justin Date: Wed, 8 May 2024 16:00:43 -0700 Subject: [PATCH 1/2] updating swagger.json to latest from cirrus and generating new SDKs --- csharp/.openapi-generator/FILES | 103 +- csharp/README.md | 68 +- csharp/api/openapi.yaml | 1774 ++++- csharp/docs/AppV1Api.md | 3 + ...LatestDeploymentAndBuildAllOfDeployment.md | 9 +- csharp/docs/AuthV1Api.md | 32 +- csharp/docs/BillingV1Api.md | 1 + csharp/docs/Build.md | 10 +- csharp/docs/BuildV1Api.md | 102 +- csharp/docs/BuildV2Api.md | 495 ++ csharp/docs/ConnectionInfoV2.md | 2 +- csharp/docs/CreateBuildParams.md | 2 +- csharp/docs/CreateUserInvite.md | 10 + csharp/docs/Deployment.md | 2 +- csharp/docs/DeploymentConfig.md | 2 +- csharp/docs/DeploymentConfigV2.md | 17 + csharp/docs/DeploymentV1Api.md | 82 +- csharp/docs/DeploymentV2.md | 21 + csharp/docs/DeploymentV2Api.md | 396 + csharp/docs/DeploymentV2EnvInner.md | 11 + csharp/docs/DiscoveryV1Api.md | 24 +- csharp/docs/DiscoveryV2Api.md | 92 + csharp/docs/GoogleIdTokenObject.md | 10 + csharp/docs/InviteStatusAccepted.md | 11 + csharp/docs/InviteStatusPending.md | 10 + csharp/docs/InviteStatusRejected.md | 11 + csharp/docs/InviteStatusRescinded.md | 12 + csharp/docs/LobbyV2Api.md | 1 + csharp/docs/LogV1Api.md | 40 +- csharp/docs/ManagementV1Api.md | 9 +- csharp/docs/NewUserInfo.md | 11 + csharp/docs/NicknameObject.md | 10 + csharp/docs/OrgInvitesPage.md | 10 + csharp/docs/OrgPermission.md | 15 + csharp/docs/OrganizationInviteStatus.md | 12 + csharp/docs/OrganizationsV1Api.md | 557 ++ csharp/docs/PingEndpointsInner.md | 12 + csharp/docs/PlayerTokenObject.md | 10 + csharp/docs/ProcessesV2Api.md | 99 + csharp/docs/RescindUserInvite.md | 10 + csharp/docs/RoomConnectionData.md | 14 + csharp/docs/RoomConnectionDataAllOf.md | 10 + csharp/docs/RoomReadyStatus.md | 9 + csharp/docs/RoomV1Api.md | 3 + csharp/docs/RoomV2Api.md | 32 +- csharp/docs/VerificationEmailSuccess.md | 9 + .../Api/BuildV2ApiTests.cs | 120 + .../Api/DeploymentV2ApiTests.cs | 107 + .../Api/DiscoveryV2ApiTests.cs | 67 + .../Api/OrganizationsV1ApiTests.cs | 126 + .../Model/CreateUserInviteTests.cs | 66 + .../Model/DeploymentConfigV2Tests.cs | 122 + .../Model/DeploymentV2EnvInnerTests.cs | 74 + .../Model/DeploymentV2Tests.cs | 154 + .../Model/GoogleIdTokenObjectTests.cs | 66 + .../Model/InviteStatusAcceptedTests.cs | 74 + .../Model/InviteStatusPendingTests.cs | 66 + .../Model/InviteStatusRejectedTests.cs | 74 + .../Model/InviteStatusRescindedTests.cs | 82 + .../Model/NewUserInfoTests.cs | 74 + .../Model/NicknameObjectTests.cs | 66 + .../Model/OrgInvitesPageTests.cs | 66 + .../Model/OrgPermissionTests.cs | 106 + .../Model/OrganizationInviteStatusTests.cs | 82 + .../Model/PingEndpointsInnerTests.cs | 82 + .../Model/PlayerTokenObjectTests.cs | 66 + .../Model/RescindUserInviteTests.cs | 66 + .../Model/RoomConnectionDataAllOfTests.cs | 66 + .../Model/RoomConnectionDataTests.cs | 98 + .../Model/RoomReadyStatusTests.cs | 58 + .../Model/VerificationEmailSuccessTests.cs | 58 + csharp/src/Hathora.Cloud.Sdk/Api/AuthV1Api.cs | 194 +- .../src/Hathora.Cloud.Sdk/Api/BuildV1Api.cs | 188 +- .../src/Hathora.Cloud.Sdk/Api/BuildV2Api.cs | 1161 +++ .../Hathora.Cloud.Sdk/Api/DeploymentV1Api.cs | 148 +- .../Hathora.Cloud.Sdk/Api/DeploymentV2Api.cs | 951 +++ .../Hathora.Cloud.Sdk/Api/DiscoveryV1Api.cs | 72 +- .../Hathora.Cloud.Sdk/Api/DiscoveryV2Api.cs | 335 + csharp/src/Hathora.Cloud.Sdk/Api/LogV1Api.cs | 184 +- .../Hathora.Cloud.Sdk/Api/ManagementV1Api.cs | 42 +- .../Api/OrganizationsV1Api.cs | 1273 ++++ .../Hathora.Cloud.Sdk/Api/ProcessesV2Api.cs | 192 + csharp/src/Hathora.Cloud.Sdk/Api/RoomV2Api.cs | 82 +- ...LatestDeploymentAndBuildAllOfDeployment.cs | 82 +- csharp/src/Hathora.Cloud.Sdk/Model/Build.cs | 28 +- .../Model/ConnectionInfoV2.cs | 31 +- .../Model/CreateBuildParams.cs | 6 +- .../Model/CreateUserInvite.cs | 144 + .../src/Hathora.Cloud.Sdk/Model/Deployment.cs | 4 +- .../Model/DeploymentConfig.cs | 4 +- .../Model/DeploymentConfigV2.cs | 259 + .../Hathora.Cloud.Sdk/Model/DeploymentV2.cs | 358 + .../Model/DeploymentV2EnvInner.cs | 169 + .../Model/GoogleIdTokenObject.cs | 146 + .../Model/InviteStatusAccepted.cs | 174 + .../Model/InviteStatusPending.cs | 149 + .../Model/InviteStatusRejected.cs | 174 + .../Model/InviteStatusRescinded.cs | 194 + csharp/src/Hathora.Cloud.Sdk/Model/Lobby.cs | 2 +- .../Hathora.Cloud.Sdk/Model/NewUserInfo.cs | 167 + .../Hathora.Cloud.Sdk/Model/NicknameObject.cs | 146 + .../Hathora.Cloud.Sdk/Model/OrgInvitesPage.cs | 145 + .../Hathora.Cloud.Sdk/Model/OrgPermission.cs | 253 + .../Model/OrganizationInviteStatus.cs | 332 + .../Model/PingEndpointsInner.cs | 172 + .../Model/PlayerTokenObject.cs | 146 + csharp/src/Hathora.Cloud.Sdk/Model/Region.cs | 8 +- .../Model/RescindUserInvite.cs | 144 + .../Model/RoomConnectionData.cs | 227 + .../Model/RoomConnectionDataAllOf.cs | 146 + .../Model/RoomReadyStatus.cs | 47 + .../Model/VerificationEmailSuccess.cs | 41 + java/.openapi-generator/FILES | 66 +- java/README.md | 68 +- java/api/openapi.yaml | 2570 +++++-- java/docs/AppV1Api.md | 3 + ...LatestDeploymentAndBuildAllOfDeployment.md | 19 +- java/docs/AuthV1Api.md | 26 +- java/docs/BillingV1Api.md | 1 + java/docs/Build.md | 10 +- java/docs/BuildV1Api.md | 62 +- java/docs/BuildV2Api.md | 374 + java/docs/ConnectionInfoV2.md | 11 +- java/docs/CreateBuildParams.md | 2 +- java/docs/CreateUserInvite.md | 13 + java/docs/Deployment.md | 2 +- java/docs/DeploymentConfig.md | 2 +- java/docs/DeploymentConfigV2.md | 20 + java/docs/DeploymentV1Api.md | 50 +- java/docs/DeploymentV2.md | 24 + java/docs/DeploymentV2Api.md | 297 + java/docs/DeploymentV2EnvInner.md | 14 + java/docs/DiscoveryV1Api.md | 16 +- java/docs/DiscoveryV2Api.md | 67 + java/docs/GoogleIdTokenObject.md | 13 + java/docs/InviteStatusAccepted.md | 22 + java/docs/InviteStatusPending.md | 21 + java/docs/InviteStatusRejected.md | 22 + java/docs/InviteStatusRescinded.md | 23 + java/docs/LobbyV1Api.md | 6 +- java/docs/LobbyV2Api.md | 3 +- java/docs/LobbyV3Api.md | 2 +- java/docs/LogV1Api.md | 34 +- java/docs/ManagementV1Api.md | 7 +- java/docs/NewUserInfo.md | 14 + java/docs/NicknameObject.md | 13 + java/docs/OrgInvitesPage.md | 13 + java/docs/OrgPermission.md | 18 + java/docs/OrganizationInviteStatus.md | 23 + java/docs/OrganizationsV1Api.md | 418 ++ java/docs/PingEndpointsInner.md | 15 + java/docs/PlayerTokenObject.md | 13 + java/docs/ProcessesV1Api.md | 4 +- java/docs/ProcessesV2Api.md | 74 + java/docs/Region.md | 2 + java/docs/RescindUserInvite.md | 13 + java/docs/RoomConnectionData.md | 17 + java/docs/RoomConnectionDataAllOf.md | 13 + java/docs/RoomReadyStatus.md | 13 + java/docs/RoomV1Api.md | 3 + java/docs/RoomV2Api.md | 22 +- java/docs/VerificationEmailSuccess.md | 11 + .../main/java/com/hathora/client/JSON.java | 27 +- .../java/com/hathora/client/api/AppV1Api.java | 12 + .../com/hathora/client/api/AuthV1Api.java | 106 +- .../com/hathora/client/api/BillingV1Api.java | 4 + .../com/hathora/client/api/BuildV1Api.java | 173 +- .../com/hathora/client/api/BuildV2Api.java | 813 +++ .../hathora/client/api/DeploymentV1Api.java | 138 +- .../hathora/client/api/DeploymentV2Api.java | 644 ++ .../hathora/client/api/DiscoveryV1Api.java | 45 +- .../hathora/client/api/DiscoveryV2Api.java | 189 + .../com/hathora/client/api/LobbyV2Api.java | 4 + .../java/com/hathora/client/api/LogV1Api.java | 73 +- .../hathora/client/api/ManagementV1Api.java | 22 +- .../client/api/OrganizationsV1Api.java | 884 +++ .../hathora/client/api/ProcessesV2Api.java | 149 + .../com/hathora/client/api/RoomV1Api.java | 12 + .../com/hathora/client/api/RoomV2Api.java | 67 +- ...testDeploymentAndBuildAllOfDeployment.java | 176 +- .../java/com/hathora/client/model/Build.java | 16 +- .../client/model/ConnectionInfoV2.java | 61 +- .../client/model/CreateBuildParams.java | 2 +- .../client/model/CreateUserInvite.java | 288 + .../com/hathora/client/model/Deployment.java | 14 +- .../client/model/DeploymentConfig.java | 14 +- .../client/model/DeploymentConfigV2.java | 543 ++ .../hathora/client/model/DeploymentV2.java | 666 ++ .../client/model/DeploymentV2EnvInner.java | 321 + .../client/model/GoogleIdTokenObject.java | 288 + .../client/model/InviteStatusAccepted.java | 366 + .../client/model/InviteStatusPending.java | 333 + .../client/model/InviteStatusRejected.java | 366 + .../client/model/InviteStatusRescinded.java | 398 + .../java/com/hathora/client/model/Lobby.java | 12 + .../com/hathora/client/model/NewUserInfo.java | 321 + .../hathora/client/model/NicknameObject.java | 288 + .../hathora/client/model/OrgInvitesPage.java | 306 + .../hathora/client/model/OrgPermission.java | 448 ++ .../model/OrganizationInviteStatus.java | 380 + .../client/model/PingEndpointsInner.java | 349 + .../client/model/PlayerTokenObject.java | 288 + .../java/com/hathora/client/model/Region.java | 4 +- .../client/model/RescindUserInvite.java | 288 + .../client/model/RoomConnectionData.java | 436 ++ .../client/model/RoomConnectionDataAllOf.java | 288 + .../hathora/client/model/RoomReadyStatus.java | 73 + .../model/VerificationEmailSuccess.java | 71 + swagger.json | 6419 +---------------- typescript/.openapi-generator/FILES | 33 +- typescript/src/apis/AuthV1Api.ts | 76 +- typescript/src/apis/BuildV1Api.ts | 85 +- typescript/src/apis/BuildV2Api.ts | 378 + typescript/src/apis/DeploymentV1Api.ts | 66 +- typescript/src/apis/DeploymentV2Api.ts | 290 + typescript/src/apis/DiscoveryV1Api.ts | 27 +- typescript/src/apis/DiscoveryV2Api.ts | 78 + typescript/src/apis/LogV1Api.ts | 56 +- typescript/src/apis/ManagementV1Api.ts | 16 +- typescript/src/apis/OrganizationsV1Api.ts | 375 + typescript/src/apis/ProcessesV2Api.ts | 62 + typescript/src/apis/RoomV2Api.ts | 33 +- typescript/src/apis/index.ts | 4 + ...LatestDeploymentAndBuildAllOfDeployment.ts | 70 +- typescript/src/models/Build.ts | 8 +- typescript/src/models/ConnectionInfoV2.ts | 27 +- typescript/src/models/CreateBuildParams.ts | 2 +- typescript/src/models/CreateUserInvite.ts | 66 + typescript/src/models/Deployment.ts | 18 +- typescript/src/models/DeploymentConfig.ts | 18 +- typescript/src/models/DeploymentConfigV2.ts | 148 + typescript/src/models/DeploymentV2.ts | 179 + typescript/src/models/DeploymentV2EnvInner.ts | 75 + typescript/src/models/GoogleIdTokenObject.ts | 66 + typescript/src/models/InviteStatusAccepted.ts | 85 + typescript/src/models/InviteStatusPending.ts | 76 + typescript/src/models/InviteStatusRejected.ts | 85 + .../src/models/InviteStatusRescinded.ts | 93 + typescript/src/models/Lobby.ts | 2 +- typescript/src/models/NewUserInfo.ts | 75 + typescript/src/models/NicknameObject.ts | 66 + typescript/src/models/OrgInvitesPage.ts | 73 + typescript/src/models/OrgPermission.ts | 118 + .../src/models/OrganizationInviteStatus.ts | 119 + typescript/src/models/PingEndpointsInner.ts | 91 + typescript/src/models/PlayerTokenObject.ts | 66 + typescript/src/models/Region.ts | 3 +- typescript/src/models/RescindUserInvite.ts | 66 + typescript/src/models/RoomConnectionData.ts | 115 + .../src/models/RoomConnectionDataAllOf.ts | 66 + typescript/src/models/RoomReadyStatus.ts | 38 + .../src/models/VerificationEmailSuccess.ts | 37 + typescript/src/models/index.ts | 29 +- 253 files changed, 31193 insertions(+), 9111 deletions(-) create mode 100644 csharp/docs/BuildV2Api.md create mode 100644 csharp/docs/CreateUserInvite.md create mode 100644 csharp/docs/DeploymentConfigV2.md create mode 100644 csharp/docs/DeploymentV2.md create mode 100644 csharp/docs/DeploymentV2Api.md create mode 100644 csharp/docs/DeploymentV2EnvInner.md create mode 100644 csharp/docs/DiscoveryV2Api.md create mode 100644 csharp/docs/GoogleIdTokenObject.md create mode 100644 csharp/docs/InviteStatusAccepted.md create mode 100644 csharp/docs/InviteStatusPending.md create mode 100644 csharp/docs/InviteStatusRejected.md create mode 100644 csharp/docs/InviteStatusRescinded.md create mode 100644 csharp/docs/NewUserInfo.md create mode 100644 csharp/docs/NicknameObject.md create mode 100644 csharp/docs/OrgInvitesPage.md create mode 100644 csharp/docs/OrgPermission.md create mode 100644 csharp/docs/OrganizationInviteStatus.md create mode 100644 csharp/docs/OrganizationsV1Api.md create mode 100644 csharp/docs/PingEndpointsInner.md create mode 100644 csharp/docs/PlayerTokenObject.md create mode 100644 csharp/docs/RescindUserInvite.md create mode 100644 csharp/docs/RoomConnectionData.md create mode 100644 csharp/docs/RoomConnectionDataAllOf.md create mode 100644 csharp/docs/RoomReadyStatus.md create mode 100644 csharp/docs/VerificationEmailSuccess.md create mode 100644 csharp/src/Hathora.Cloud.Sdk.Test/Api/BuildV2ApiTests.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk.Test/Api/DeploymentV2ApiTests.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk.Test/Api/DiscoveryV2ApiTests.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk.Test/Api/OrganizationsV1ApiTests.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk.Test/Model/CreateUserInviteTests.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk.Test/Model/DeploymentConfigV2Tests.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk.Test/Model/DeploymentV2EnvInnerTests.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk.Test/Model/DeploymentV2Tests.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk.Test/Model/GoogleIdTokenObjectTests.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk.Test/Model/InviteStatusAcceptedTests.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk.Test/Model/InviteStatusPendingTests.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk.Test/Model/InviteStatusRejectedTests.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk.Test/Model/InviteStatusRescindedTests.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk.Test/Model/NewUserInfoTests.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk.Test/Model/NicknameObjectTests.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk.Test/Model/OrgInvitesPageTests.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk.Test/Model/OrgPermissionTests.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk.Test/Model/OrganizationInviteStatusTests.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk.Test/Model/PingEndpointsInnerTests.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk.Test/Model/PlayerTokenObjectTests.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk.Test/Model/RescindUserInviteTests.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk.Test/Model/RoomConnectionDataAllOfTests.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk.Test/Model/RoomConnectionDataTests.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk.Test/Model/RoomReadyStatusTests.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk.Test/Model/VerificationEmailSuccessTests.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk/Api/BuildV2Api.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk/Api/DeploymentV2Api.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk/Api/DiscoveryV2Api.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk/Api/OrganizationsV1Api.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk/Model/CreateUserInvite.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk/Model/DeploymentConfigV2.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk/Model/DeploymentV2.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk/Model/DeploymentV2EnvInner.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk/Model/GoogleIdTokenObject.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk/Model/InviteStatusAccepted.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk/Model/InviteStatusPending.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk/Model/InviteStatusRejected.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk/Model/InviteStatusRescinded.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk/Model/NewUserInfo.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk/Model/NicknameObject.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk/Model/OrgInvitesPage.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk/Model/OrgPermission.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk/Model/OrganizationInviteStatus.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk/Model/PingEndpointsInner.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk/Model/PlayerTokenObject.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk/Model/RescindUserInvite.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk/Model/RoomConnectionData.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk/Model/RoomConnectionDataAllOf.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk/Model/RoomReadyStatus.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk/Model/VerificationEmailSuccess.cs create mode 100644 java/docs/BuildV2Api.md create mode 100644 java/docs/CreateUserInvite.md create mode 100644 java/docs/DeploymentConfigV2.md create mode 100644 java/docs/DeploymentV2.md create mode 100644 java/docs/DeploymentV2Api.md create mode 100644 java/docs/DeploymentV2EnvInner.md create mode 100644 java/docs/DiscoveryV2Api.md create mode 100644 java/docs/GoogleIdTokenObject.md create mode 100644 java/docs/InviteStatusAccepted.md create mode 100644 java/docs/InviteStatusPending.md create mode 100644 java/docs/InviteStatusRejected.md create mode 100644 java/docs/InviteStatusRescinded.md create mode 100644 java/docs/NewUserInfo.md create mode 100644 java/docs/NicknameObject.md create mode 100644 java/docs/OrgInvitesPage.md create mode 100644 java/docs/OrgPermission.md create mode 100644 java/docs/OrganizationInviteStatus.md create mode 100644 java/docs/OrganizationsV1Api.md create mode 100644 java/docs/PingEndpointsInner.md create mode 100644 java/docs/PlayerTokenObject.md create mode 100644 java/docs/RescindUserInvite.md create mode 100644 java/docs/RoomConnectionData.md create mode 100644 java/docs/RoomConnectionDataAllOf.md create mode 100644 java/docs/RoomReadyStatus.md create mode 100644 java/docs/VerificationEmailSuccess.md create mode 100644 java/src/main/java/com/hathora/client/api/BuildV2Api.java create mode 100644 java/src/main/java/com/hathora/client/api/DeploymentV2Api.java create mode 100644 java/src/main/java/com/hathora/client/api/DiscoveryV2Api.java create mode 100644 java/src/main/java/com/hathora/client/api/OrganizationsV1Api.java create mode 100644 java/src/main/java/com/hathora/client/model/CreateUserInvite.java create mode 100644 java/src/main/java/com/hathora/client/model/DeploymentConfigV2.java create mode 100644 java/src/main/java/com/hathora/client/model/DeploymentV2.java create mode 100644 java/src/main/java/com/hathora/client/model/DeploymentV2EnvInner.java create mode 100644 java/src/main/java/com/hathora/client/model/GoogleIdTokenObject.java create mode 100644 java/src/main/java/com/hathora/client/model/InviteStatusAccepted.java create mode 100644 java/src/main/java/com/hathora/client/model/InviteStatusPending.java create mode 100644 java/src/main/java/com/hathora/client/model/InviteStatusRejected.java create mode 100644 java/src/main/java/com/hathora/client/model/InviteStatusRescinded.java create mode 100644 java/src/main/java/com/hathora/client/model/NewUserInfo.java create mode 100644 java/src/main/java/com/hathora/client/model/NicknameObject.java create mode 100644 java/src/main/java/com/hathora/client/model/OrgInvitesPage.java create mode 100644 java/src/main/java/com/hathora/client/model/OrgPermission.java create mode 100644 java/src/main/java/com/hathora/client/model/OrganizationInviteStatus.java create mode 100644 java/src/main/java/com/hathora/client/model/PingEndpointsInner.java create mode 100644 java/src/main/java/com/hathora/client/model/PlayerTokenObject.java create mode 100644 java/src/main/java/com/hathora/client/model/RescindUserInvite.java create mode 100644 java/src/main/java/com/hathora/client/model/RoomConnectionData.java create mode 100644 java/src/main/java/com/hathora/client/model/RoomConnectionDataAllOf.java create mode 100644 java/src/main/java/com/hathora/client/model/RoomReadyStatus.java create mode 100644 java/src/main/java/com/hathora/client/model/VerificationEmailSuccess.java create mode 100644 typescript/src/apis/BuildV2Api.ts create mode 100644 typescript/src/apis/DeploymentV2Api.ts create mode 100644 typescript/src/apis/DiscoveryV2Api.ts create mode 100644 typescript/src/apis/OrganizationsV1Api.ts create mode 100644 typescript/src/models/CreateUserInvite.ts create mode 100644 typescript/src/models/DeploymentConfigV2.ts create mode 100644 typescript/src/models/DeploymentV2.ts create mode 100644 typescript/src/models/DeploymentV2EnvInner.ts create mode 100644 typescript/src/models/GoogleIdTokenObject.ts create mode 100644 typescript/src/models/InviteStatusAccepted.ts create mode 100644 typescript/src/models/InviteStatusPending.ts create mode 100644 typescript/src/models/InviteStatusRejected.ts create mode 100644 typescript/src/models/InviteStatusRescinded.ts create mode 100644 typescript/src/models/NewUserInfo.ts create mode 100644 typescript/src/models/NicknameObject.ts create mode 100644 typescript/src/models/OrgInvitesPage.ts create mode 100644 typescript/src/models/OrgPermission.ts create mode 100644 typescript/src/models/OrganizationInviteStatus.ts create mode 100644 typescript/src/models/PingEndpointsInner.ts create mode 100644 typescript/src/models/PlayerTokenObject.ts create mode 100644 typescript/src/models/RescindUserInvite.ts create mode 100644 typescript/src/models/RoomConnectionData.ts create mode 100644 typescript/src/models/RoomConnectionDataAllOf.ts create mode 100644 typescript/src/models/RoomReadyStatus.ts create mode 100644 typescript/src/models/VerificationEmailSuccess.ts diff --git a/csharp/.openapi-generator/FILES b/csharp/.openapi-generator/FILES index 9a4eed2..4bb36e5 100644 --- a/csharp/.openapi-generator/FILES +++ b/csharp/.openapi-generator/FILES @@ -19,6 +19,7 @@ docs/Build.md docs/BuildRegionalContainerTagsInner.md docs/BuildStatus.md docs/BuildV1Api.md +docs/BuildV2Api.md docs/CardBrand.md docs/CardPaymentMethod.md docs/ConnectionInfo.md @@ -30,17 +31,24 @@ docs/CreateLobbyV3Params.md docs/CreateOrgToken.md docs/CreatePrivateLobbyRequest.md docs/CreateRoomParams.md -docs/CreateRoomResponse.md -docs/CreateRoomResponseAllOf.md +docs/CreateUserInvite.md docs/CreatedOrgToken.md docs/CustomerPortalUrl.md docs/Deployment.md docs/DeploymentConfig.md -docs/DeploymentEnvInner.md +docs/DeploymentConfigV2.md docs/DeploymentV1Api.md -docs/DiscoveryResponseInner.md +docs/DeploymentV2.md +docs/DeploymentV2Api.md +docs/DeploymentV2EnvInner.md docs/DiscoveryV1Api.md +docs/DiscoveryV2Api.md docs/ExposedPort.md +docs/GoogleIdTokenObject.md +docs/InviteStatusAccepted.md +docs/InviteStatusPending.md +docs/InviteStatusRejected.md +docs/InviteStatusRescinded.md docs/Invoice.md docs/InvoiceStatus.md docs/LinkPaymentMethod.md @@ -52,19 +60,24 @@ docs/LobbyV3.md docs/LobbyV3Api.md docs/LobbyVisibility.md docs/LogV1Api.md -docs/LoginGoogleRequest.md -docs/LoginNicknameRequest.md -docs/LoginResponse.md docs/ManagementV1Api.md docs/MetricName.md docs/MetricValue.md docs/MetricsV1Api.md +docs/NewUserInfo.md +docs/NicknameObject.md +docs/OrgInvitesPage.md +docs/OrgPermission.md docs/OrgToken.md docs/OrgTokenStatus.md docs/OrgTokensV1Api.md +docs/OrganizationInviteStatus.md +docs/OrganizationsV1Api.md docs/PartialCardCardPaymentMethodAchAchPaymentMethodLinkLinkPaymentMethod.md docs/PickRoomExcludeKeyofRoomAllocations.md +docs/PingEndpointsInner.md docs/PlanName.md +docs/PlayerTokenObject.md docs/Process.md docs/ProcessStatus.md docs/ProcessV2.md @@ -74,8 +87,12 @@ docs/ProcessesV1Api.md docs/ProcessesV2Api.md docs/RecordPartialMetricNameMetricValueArray.md docs/Region.md +docs/RescindUserInvite.md docs/Room.md docs/RoomAllocation.md +docs/RoomConnectionData.md +docs/RoomConnectionDataAllOf.md +docs/RoomReadyStatus.md docs/RoomStatus.md docs/RoomV1Api.md docs/RoomV2Api.md @@ -84,27 +101,43 @@ docs/StartingConnectionInfo.md docs/TransportType.md docs/UpdateRoomConfigParams.md docs/VerificationEmailRequest.md -docs/VerificationEmailResponse.md +docs/VerificationEmailSuccess.md git_push.sh -src/Hathora.Cloud.Sdk.Test/Api/OrgTokensV1ApiTests.cs +src/Hathora.Cloud.Sdk.Test/Api/BuildV2ApiTests.cs +src/Hathora.Cloud.Sdk.Test/Api/DeploymentV2ApiTests.cs +src/Hathora.Cloud.Sdk.Test/Api/DiscoveryV2ApiTests.cs +src/Hathora.Cloud.Sdk.Test/Api/OrganizationsV1ApiTests.cs src/Hathora.Cloud.Sdk.Test/Hathora.Cloud.Sdk.Test.asmdef -src/Hathora.Cloud.Sdk.Test/Model/ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOfTests.cs -src/Hathora.Cloud.Sdk.Test/Model/ApplicationWithLatestDeploymentAndBuildAllOfDeploymentTests.cs -src/Hathora.Cloud.Sdk.Test/Model/ApplicationWithLatestDeploymentAndBuildAllOfTests.cs -src/Hathora.Cloud.Sdk.Test/Model/ApplicationWithLatestDeploymentAndBuildTests.cs -src/Hathora.Cloud.Sdk.Test/Model/BuildStatusTests.cs -src/Hathora.Cloud.Sdk.Test/Model/CreateOrgTokenTests.cs -src/Hathora.Cloud.Sdk.Test/Model/CreatedOrgTokenTests.cs -src/Hathora.Cloud.Sdk.Test/Model/InvoiceStatusTests.cs -src/Hathora.Cloud.Sdk.Test/Model/ListOrgTokensTests.cs -src/Hathora.Cloud.Sdk.Test/Model/OrgTokenStatusTests.cs -src/Hathora.Cloud.Sdk.Test/Model/OrgTokenTests.cs +src/Hathora.Cloud.Sdk.Test/Model/CreateUserInviteTests.cs +src/Hathora.Cloud.Sdk.Test/Model/DeploymentConfigV2Tests.cs +src/Hathora.Cloud.Sdk.Test/Model/DeploymentV2EnvInnerTests.cs +src/Hathora.Cloud.Sdk.Test/Model/DeploymentV2Tests.cs +src/Hathora.Cloud.Sdk.Test/Model/GoogleIdTokenObjectTests.cs +src/Hathora.Cloud.Sdk.Test/Model/InviteStatusAcceptedTests.cs +src/Hathora.Cloud.Sdk.Test/Model/InviteStatusPendingTests.cs +src/Hathora.Cloud.Sdk.Test/Model/InviteStatusRejectedTests.cs +src/Hathora.Cloud.Sdk.Test/Model/InviteStatusRescindedTests.cs +src/Hathora.Cloud.Sdk.Test/Model/NewUserInfoTests.cs +src/Hathora.Cloud.Sdk.Test/Model/NicknameObjectTests.cs +src/Hathora.Cloud.Sdk.Test/Model/OrgInvitesPageTests.cs +src/Hathora.Cloud.Sdk.Test/Model/OrgPermissionTests.cs +src/Hathora.Cloud.Sdk.Test/Model/OrganizationInviteStatusTests.cs +src/Hathora.Cloud.Sdk.Test/Model/PingEndpointsInnerTests.cs +src/Hathora.Cloud.Sdk.Test/Model/PlayerTokenObjectTests.cs +src/Hathora.Cloud.Sdk.Test/Model/RescindUserInviteTests.cs +src/Hathora.Cloud.Sdk.Test/Model/RoomConnectionDataAllOfTests.cs +src/Hathora.Cloud.Sdk.Test/Model/RoomConnectionDataTests.cs +src/Hathora.Cloud.Sdk.Test/Model/RoomReadyStatusTests.cs +src/Hathora.Cloud.Sdk.Test/Model/VerificationEmailSuccessTests.cs src/Hathora.Cloud.Sdk/Api/AppV1Api.cs src/Hathora.Cloud.Sdk/Api/AuthV1Api.cs src/Hathora.Cloud.Sdk/Api/BillingV1Api.cs src/Hathora.Cloud.Sdk/Api/BuildV1Api.cs +src/Hathora.Cloud.Sdk/Api/BuildV2Api.cs src/Hathora.Cloud.Sdk/Api/DeploymentV1Api.cs +src/Hathora.Cloud.Sdk/Api/DeploymentV2Api.cs src/Hathora.Cloud.Sdk/Api/DiscoveryV1Api.cs +src/Hathora.Cloud.Sdk/Api/DiscoveryV2Api.cs src/Hathora.Cloud.Sdk/Api/LobbyV1Api.cs src/Hathora.Cloud.Sdk/Api/LobbyV2Api.cs src/Hathora.Cloud.Sdk/Api/LobbyV3Api.cs @@ -112,6 +145,7 @@ src/Hathora.Cloud.Sdk/Api/LogV1Api.cs src/Hathora.Cloud.Sdk/Api/ManagementV1Api.cs src/Hathora.Cloud.Sdk/Api/MetricsV1Api.cs src/Hathora.Cloud.Sdk/Api/OrgTokensV1Api.cs +src/Hathora.Cloud.Sdk/Api/OrganizationsV1Api.cs src/Hathora.Cloud.Sdk/Api/ProcessesV1Api.cs src/Hathora.Cloud.Sdk/Api/ProcessesV2Api.cs src/Hathora.Cloud.Sdk/Api/RoomV1Api.cs @@ -160,15 +194,20 @@ src/Hathora.Cloud.Sdk/Model/CreateLobbyV3Params.cs src/Hathora.Cloud.Sdk/Model/CreateOrgToken.cs src/Hathora.Cloud.Sdk/Model/CreatePrivateLobbyRequest.cs src/Hathora.Cloud.Sdk/Model/CreateRoomParams.cs -src/Hathora.Cloud.Sdk/Model/CreateRoomResponse.cs -src/Hathora.Cloud.Sdk/Model/CreateRoomResponseAllOf.cs +src/Hathora.Cloud.Sdk/Model/CreateUserInvite.cs src/Hathora.Cloud.Sdk/Model/CreatedOrgToken.cs src/Hathora.Cloud.Sdk/Model/CustomerPortalUrl.cs src/Hathora.Cloud.Sdk/Model/Deployment.cs src/Hathora.Cloud.Sdk/Model/DeploymentConfig.cs -src/Hathora.Cloud.Sdk/Model/DeploymentEnvInner.cs -src/Hathora.Cloud.Sdk/Model/DiscoveryResponseInner.cs +src/Hathora.Cloud.Sdk/Model/DeploymentConfigV2.cs +src/Hathora.Cloud.Sdk/Model/DeploymentV2.cs +src/Hathora.Cloud.Sdk/Model/DeploymentV2EnvInner.cs src/Hathora.Cloud.Sdk/Model/ExposedPort.cs +src/Hathora.Cloud.Sdk/Model/GoogleIdTokenObject.cs +src/Hathora.Cloud.Sdk/Model/InviteStatusAccepted.cs +src/Hathora.Cloud.Sdk/Model/InviteStatusPending.cs +src/Hathora.Cloud.Sdk/Model/InviteStatusRejected.cs +src/Hathora.Cloud.Sdk/Model/InviteStatusRescinded.cs src/Hathora.Cloud.Sdk/Model/Invoice.cs src/Hathora.Cloud.Sdk/Model/InvoiceStatus.cs src/Hathora.Cloud.Sdk/Model/LinkPaymentMethod.cs @@ -176,16 +215,20 @@ src/Hathora.Cloud.Sdk/Model/ListOrgTokens.cs src/Hathora.Cloud.Sdk/Model/Lobby.cs src/Hathora.Cloud.Sdk/Model/LobbyV3.cs src/Hathora.Cloud.Sdk/Model/LobbyVisibility.cs -src/Hathora.Cloud.Sdk/Model/LoginGoogleRequest.cs -src/Hathora.Cloud.Sdk/Model/LoginNicknameRequest.cs -src/Hathora.Cloud.Sdk/Model/LoginResponse.cs src/Hathora.Cloud.Sdk/Model/MetricName.cs src/Hathora.Cloud.Sdk/Model/MetricValue.cs +src/Hathora.Cloud.Sdk/Model/NewUserInfo.cs +src/Hathora.Cloud.Sdk/Model/NicknameObject.cs +src/Hathora.Cloud.Sdk/Model/OrgInvitesPage.cs +src/Hathora.Cloud.Sdk/Model/OrgPermission.cs src/Hathora.Cloud.Sdk/Model/OrgToken.cs src/Hathora.Cloud.Sdk/Model/OrgTokenStatus.cs +src/Hathora.Cloud.Sdk/Model/OrganizationInviteStatus.cs src/Hathora.Cloud.Sdk/Model/PartialCardCardPaymentMethodAchAchPaymentMethodLinkLinkPaymentMethod.cs src/Hathora.Cloud.Sdk/Model/PickRoomExcludeKeyofRoomAllocations.cs +src/Hathora.Cloud.Sdk/Model/PingEndpointsInner.cs src/Hathora.Cloud.Sdk/Model/PlanName.cs +src/Hathora.Cloud.Sdk/Model/PlayerTokenObject.cs src/Hathora.Cloud.Sdk/Model/Process.cs src/Hathora.Cloud.Sdk/Model/ProcessStatus.cs src/Hathora.Cloud.Sdk/Model/ProcessV2.cs @@ -193,12 +236,16 @@ src/Hathora.Cloud.Sdk/Model/ProcessWithRooms.cs src/Hathora.Cloud.Sdk/Model/ProcessWithRoomsAllOf.cs src/Hathora.Cloud.Sdk/Model/RecordPartialMetricNameMetricValueArray.cs src/Hathora.Cloud.Sdk/Model/Region.cs +src/Hathora.Cloud.Sdk/Model/RescindUserInvite.cs src/Hathora.Cloud.Sdk/Model/Room.cs src/Hathora.Cloud.Sdk/Model/RoomAllocation.cs +src/Hathora.Cloud.Sdk/Model/RoomConnectionData.cs +src/Hathora.Cloud.Sdk/Model/RoomConnectionDataAllOf.cs +src/Hathora.Cloud.Sdk/Model/RoomReadyStatus.cs src/Hathora.Cloud.Sdk/Model/RoomStatus.cs src/Hathora.Cloud.Sdk/Model/SetLobbyStateParams.cs src/Hathora.Cloud.Sdk/Model/StartingConnectionInfo.cs src/Hathora.Cloud.Sdk/Model/TransportType.cs src/Hathora.Cloud.Sdk/Model/UpdateRoomConfigParams.cs src/Hathora.Cloud.Sdk/Model/VerificationEmailRequest.cs -src/Hathora.Cloud.Sdk/Model/VerificationEmailResponse.cs +src/Hathora.Cloud.Sdk/Model/VerificationEmailSuccess.cs diff --git a/csharp/README.md b/csharp/README.md index 59bf929..71106ec 100644 --- a/csharp/README.md +++ b/csharp/README.md @@ -103,16 +103,26 @@ Class | Method | HTTP request | Description *BillingV1Api* | [**GetInvoices**](BillingV1Api.md#getinvoices) | **GET** /billing/v1/invoices | *BillingV1Api* | [**GetPaymentMethod**](BillingV1Api.md#getpaymentmethod) | **GET** /billing/v1/paymentmethod | *BillingV1Api* | [**InitStripeCustomerPortalUrl**](BillingV1Api.md#initstripecustomerportalurl) | **POST** /billing/v1/customerportalurl | -*BuildV1Api* | [**CreateBuild**](BuildV1Api.md#createbuild) | **POST** /builds/v1/{appId}/create | -*BuildV1Api* | [**DeleteBuild**](BuildV1Api.md#deletebuild) | **DELETE** /builds/v1/{appId}/delete/{buildId} | -*BuildV1Api* | [**GetBuildInfo**](BuildV1Api.md#getbuildinfo) | **GET** /builds/v1/{appId}/info/{buildId} | -*BuildV1Api* | [**GetBuilds**](BuildV1Api.md#getbuilds) | **GET** /builds/v1/{appId}/list | -*BuildV1Api* | [**RunBuild**](BuildV1Api.md#runbuild) | **POST** /builds/v1/{appId}/run/{buildId} | -*DeploymentV1Api* | [**CreateDeployment**](DeploymentV1Api.md#createdeployment) | **POST** /deployments/v1/{appId}/create/{buildId} | -*DeploymentV1Api* | [**GetDeploymentInfo**](DeploymentV1Api.md#getdeploymentinfo) | **GET** /deployments/v1/{appId}/info/{deploymentId} | -*DeploymentV1Api* | [**GetDeployments**](DeploymentV1Api.md#getdeployments) | **GET** /deployments/v1/{appId}/list | -*DeploymentV1Api* | [**GetLatestDeployment**](DeploymentV1Api.md#getlatestdeployment) | **GET** /deployments/v1/{appId}/latest | -*DiscoveryV1Api* | [**GetPingServiceEndpoints**](DiscoveryV1Api.md#getpingserviceendpoints) | **GET** /discovery/v1/ping | +*BuildV1Api* | [**CreateBuildDeprecated**](BuildV1Api.md#createbuilddeprecated) | **POST** /builds/v1/{appId}/create | +*BuildV1Api* | [**DeleteBuildDeprecated**](BuildV1Api.md#deletebuilddeprecated) | **DELETE** /builds/v1/{appId}/delete/{buildId} | +*BuildV1Api* | [**GetBuildInfoDeprecated**](BuildV1Api.md#getbuildinfodeprecated) | **GET** /builds/v1/{appId}/info/{buildId} | +*BuildV1Api* | [**GetBuildsDeprecated**](BuildV1Api.md#getbuildsdeprecated) | **GET** /builds/v1/{appId}/list | +*BuildV1Api* | [**RunBuildDeprecated**](BuildV1Api.md#runbuilddeprecated) | **POST** /builds/v1/{appId}/run/{buildId} | +*BuildV2Api* | [**CreateBuild**](BuildV2Api.md#createbuild) | **POST** /builds/v2/{appId}/create | +*BuildV2Api* | [**DeleteBuild**](BuildV2Api.md#deletebuild) | **DELETE** /builds/v2/{appId}/delete/{buildId} | +*BuildV2Api* | [**GetBuildInfo**](BuildV2Api.md#getbuildinfo) | **GET** /builds/v2/{appId}/info/{buildId} | +*BuildV2Api* | [**GetBuilds**](BuildV2Api.md#getbuilds) | **GET** /builds/v2/{appId}/list | +*BuildV2Api* | [**RunBuild**](BuildV2Api.md#runbuild) | **POST** /builds/v2/{appId}/run/{buildId} | +*DeploymentV1Api* | [**CreateDeploymentDeprecated**](DeploymentV1Api.md#createdeploymentdeprecated) | **POST** /deployments/v1/{appId}/create/{buildId} | +*DeploymentV1Api* | [**GetDeploymentInfoDeprecated**](DeploymentV1Api.md#getdeploymentinfodeprecated) | **GET** /deployments/v1/{appId}/info/{deploymentId} | +*DeploymentV1Api* | [**GetDeploymentsDeprecated**](DeploymentV1Api.md#getdeploymentsdeprecated) | **GET** /deployments/v1/{appId}/list | +*DeploymentV1Api* | [**GetLatestDeploymentDeprecated**](DeploymentV1Api.md#getlatestdeploymentdeprecated) | **GET** /deployments/v1/{appId}/latest | +*DeploymentV2Api* | [**CreateDeployment**](DeploymentV2Api.md#createdeployment) | **POST** /deployments/v2/{appId}/create/{buildId} | +*DeploymentV2Api* | [**GetDeploymentInfo**](DeploymentV2Api.md#getdeploymentinfo) | **GET** /deployments/v2/{appId}/info/{deploymentId} | +*DeploymentV2Api* | [**GetDeployments**](DeploymentV2Api.md#getdeployments) | **GET** /deployments/v2/{appId}/list | +*DeploymentV2Api* | [**GetLatestDeployment**](DeploymentV2Api.md#getlatestdeployment) | **GET** /deployments/v2/{appId}/latest | +*DiscoveryV1Api* | [**GetPingServiceEndpointsDeprecated**](DiscoveryV1Api.md#getpingserviceendpointsdeprecated) | **GET** /discovery/v1/ping | +*DiscoveryV2Api* | [**GetPingServiceEndpoints**](DiscoveryV2Api.md#getpingserviceendpoints) | **GET** /discovery/v2/ping | *LobbyV1Api* | [**CreatePrivateLobbyDeprecated**](LobbyV1Api.md#createprivatelobbydeprecated) | **POST** /lobby/v1/{appId}/create/private | *LobbyV1Api* | [**CreatePublicLobbyDeprecated**](LobbyV1Api.md#createpubliclobbydeprecated) | **POST** /lobby/v1/{appId}/create/public | *LobbyV1Api* | [**ListActivePublicLobbiesDeprecatedV1**](LobbyV1Api.md#listactivepubliclobbiesdeprecatedv1) | **GET** /lobby/v1/{appId}/list | @@ -136,9 +146,16 @@ Class | Method | HTTP request | Description *OrgTokensV1Api* | [**CreateOrgToken**](OrgTokensV1Api.md#createorgtoken) | **POST** /tokens/v1/orgs/{orgId}/create | *OrgTokensV1Api* | [**GetOrgTokens**](OrgTokensV1Api.md#getorgtokens) | **GET** /tokens/v1/orgs/{orgId} | *OrgTokensV1Api* | [**RevokeOrgToken**](OrgTokensV1Api.md#revokeorgtoken) | **POST** /tokens/v1/orgs/{orgId}/tokens/{orgTokenId}/revoke | +*OrganizationsV1Api* | [**AcceptInvite**](OrganizationsV1Api.md#acceptinvite) | **POST** /orgs/v1/{orgId}/invites/accept | +*OrganizationsV1Api* | [**GetOrgPendingInvites**](OrganizationsV1Api.md#getorgpendinginvites) | **GET** /orgs/v1/{orgId}/invites/pending | +*OrganizationsV1Api* | [**GetUserPendingInvites**](OrganizationsV1Api.md#getuserpendinginvites) | **GET** /orgs/v1/user/invites/pending | +*OrganizationsV1Api* | [**InviteUser**](OrganizationsV1Api.md#inviteuser) | **PUT** /orgs/v1/{orgId}/invites | +*OrganizationsV1Api* | [**RejectInvite**](OrganizationsV1Api.md#rejectinvite) | **POST** /orgs/v1/{orgId}/invites/reject | +*OrganizationsV1Api* | [**RescindInvite**](OrganizationsV1Api.md#rescindinvite) | **POST** /orgs/v1/{orgId}/invites/rescind | *ProcessesV1Api* | [**GetProcessInfoDeprecated**](ProcessesV1Api.md#getprocessinfodeprecated) | **GET** /processes/v1/{appId}/info/{processId} | *ProcessesV1Api* | [**GetRunningProcesses**](ProcessesV1Api.md#getrunningprocesses) | **GET** /processes/v1/{appId}/list/running | *ProcessesV1Api* | [**GetStoppedProcesses**](ProcessesV1Api.md#getstoppedprocesses) | **GET** /processes/v1/{appId}/list/stopped | +*ProcessesV2Api* | [**CreateProcess**](ProcessesV2Api.md#createprocess) | **POST** /processes/v2/{appId}/create/{region} | *ProcessesV2Api* | [**GetLatestProcesses**](ProcessesV2Api.md#getlatestprocesses) | **GET** /processes/v2/{appId}/list/latest | *ProcessesV2Api* | [**GetProcessInfo**](ProcessesV2Api.md#getprocessinfo) | **GET** /processes/v2/{appId}/info/{processId} | *ProcessesV2Api* | [**StopProcess**](ProcessesV2Api.md#stopprocess) | **POST** /processes/v2/{appId}/stop/{processId} | @@ -155,7 +172,7 @@ Class | Method | HTTP request | Description *RoomV2Api* | [**GetConnectionInfo**](RoomV2Api.md#getconnectioninfo) | **GET** /rooms/v2/{appId}/connectioninfo/{roomId} | *RoomV2Api* | [**GetInactiveRoomsForProcess**](RoomV2Api.md#getinactiveroomsforprocess) | **GET** /rooms/v2/{appId}/list/{processId}/inactive | *RoomV2Api* | [**GetRoomInfo**](RoomV2Api.md#getroominfo) | **GET** /rooms/v2/{appId}/info/{roomId} | -*RoomV2Api* | [**SuspendRoom**](RoomV2Api.md#suspendroom) | **POST** /rooms/v2/{appId}/suspend/{roomId} | +*RoomV2Api* | [**SuspendRoomV2Deprecated**](RoomV2Api.md#suspendroomv2deprecated) | **POST** /rooms/v2/{appId}/suspend/{roomId} | *RoomV2Api* | [**UpdateRoomConfig**](RoomV2Api.md#updateroomconfig) | **POST** /rooms/v2/{appId}/update/{roomId} | @@ -187,15 +204,20 @@ Class | Method | HTTP request | Description - [Model.CreateOrgToken](CreateOrgToken.md) - [Model.CreatePrivateLobbyRequest](CreatePrivateLobbyRequest.md) - [Model.CreateRoomParams](CreateRoomParams.md) - - [Model.CreateRoomResponse](CreateRoomResponse.md) - - [Model.CreateRoomResponseAllOf](CreateRoomResponseAllOf.md) + - [Model.CreateUserInvite](CreateUserInvite.md) - [Model.CreatedOrgToken](CreatedOrgToken.md) - [Model.CustomerPortalUrl](CustomerPortalUrl.md) - [Model.Deployment](Deployment.md) - [Model.DeploymentConfig](DeploymentConfig.md) - - [Model.DeploymentEnvInner](DeploymentEnvInner.md) - - [Model.DiscoveryResponseInner](DiscoveryResponseInner.md) + - [Model.DeploymentConfigV2](DeploymentConfigV2.md) + - [Model.DeploymentV2](DeploymentV2.md) + - [Model.DeploymentV2EnvInner](DeploymentV2EnvInner.md) - [Model.ExposedPort](ExposedPort.md) + - [Model.GoogleIdTokenObject](GoogleIdTokenObject.md) + - [Model.InviteStatusAccepted](InviteStatusAccepted.md) + - [Model.InviteStatusPending](InviteStatusPending.md) + - [Model.InviteStatusRejected](InviteStatusRejected.md) + - [Model.InviteStatusRescinded](InviteStatusRescinded.md) - [Model.Invoice](Invoice.md) - [Model.InvoiceStatus](InvoiceStatus.md) - [Model.LinkPaymentMethod](LinkPaymentMethod.md) @@ -203,16 +225,20 @@ Class | Method | HTTP request | Description - [Model.Lobby](Lobby.md) - [Model.LobbyV3](LobbyV3.md) - [Model.LobbyVisibility](LobbyVisibility.md) - - [Model.LoginGoogleRequest](LoginGoogleRequest.md) - - [Model.LoginNicknameRequest](LoginNicknameRequest.md) - - [Model.LoginResponse](LoginResponse.md) - [Model.MetricName](MetricName.md) - [Model.MetricValue](MetricValue.md) + - [Model.NewUserInfo](NewUserInfo.md) + - [Model.NicknameObject](NicknameObject.md) + - [Model.OrgInvitesPage](OrgInvitesPage.md) + - [Model.OrgPermission](OrgPermission.md) - [Model.OrgToken](OrgToken.md) - [Model.OrgTokenStatus](OrgTokenStatus.md) + - [Model.OrganizationInviteStatus](OrganizationInviteStatus.md) - [Model.PartialCardCardPaymentMethodAchAchPaymentMethodLinkLinkPaymentMethod](PartialCardCardPaymentMethodAchAchPaymentMethodLinkLinkPaymentMethod.md) - [Model.PickRoomExcludeKeyofRoomAllocations](PickRoomExcludeKeyofRoomAllocations.md) + - [Model.PingEndpointsInner](PingEndpointsInner.md) - [Model.PlanName](PlanName.md) + - [Model.PlayerTokenObject](PlayerTokenObject.md) - [Model.Process](Process.md) - [Model.ProcessStatus](ProcessStatus.md) - [Model.ProcessV2](ProcessV2.md) @@ -220,15 +246,19 @@ Class | Method | HTTP request | Description - [Model.ProcessWithRoomsAllOf](ProcessWithRoomsAllOf.md) - [Model.RecordPartialMetricNameMetricValueArray](RecordPartialMetricNameMetricValueArray.md) - [Model.Region](Region.md) + - [Model.RescindUserInvite](RescindUserInvite.md) - [Model.Room](Room.md) - [Model.RoomAllocation](RoomAllocation.md) + - [Model.RoomConnectionData](RoomConnectionData.md) + - [Model.RoomConnectionDataAllOf](RoomConnectionDataAllOf.md) + - [Model.RoomReadyStatus](RoomReadyStatus.md) - [Model.RoomStatus](RoomStatus.md) - [Model.SetLobbyStateParams](SetLobbyStateParams.md) - [Model.StartingConnectionInfo](StartingConnectionInfo.md) - [Model.TransportType](TransportType.md) - [Model.UpdateRoomConfigParams](UpdateRoomConfigParams.md) - [Model.VerificationEmailRequest](VerificationEmailRequest.md) - - [Model.VerificationEmailResponse](VerificationEmailResponse.md) + - [Model.VerificationEmailSuccess](VerificationEmailSuccess.md) diff --git a/csharp/api/openapi.yaml b/csharp/api/openapi.yaml index c6fd42b..5ff80cd 100644 --- a/csharp/api/openapi.yaml +++ b/csharp/api/openapi.yaml @@ -14,36 +14,46 @@ tags: - description: "Operations that allow you to generate a Hathora-signed [JSON web token\ \ (JWT)](https://jwt.io/) for [player authentication](https://hathora.dev/docs/lobbies-and-matchmaking/auth-service)." name: AuthV1 +- description: ' ' + name: BillingV1 - description: "Operations that allow you create and manage your [builds](https://hathora.dev/docs/concepts/hathora-entities#build)." + name: BuildV2 +- description: "Deprecated. Use [BuildV2](https://hathora.dev/api#tag/BuildV2)." name: BuildV1 - description: "Operations that allow you configure and manage an application's [build](https://hathora.dev/docs/concepts/hathora-entities#build)\ \ at runtime." + name: DeploymentV2 +- description: "Deprecated. Use [DeploymentV2](https://hathora.dev/api#tag/DeploymentV2)." name: DeploymentV1 - description: Service that allows clients to directly ping all Hathora regions to get latency information name: DiscoveryV1 - description: "Operations to create and manage lobbies using our [Lobby Service](https://hathora.dev/docs/lobbies-and-matchmaking/lobby-service)." name: LobbyV3 +- description: "Deprecated. Use [LobbyV3](https://hathora.dev/api#tag/LobbyV3)." + name: LobbyV2 +- description: "Deprecated. Use [LobbyV3](https://hathora.dev/api#tag/LobbyV3)." + name: LobbyV1 - description: "Operations to get logs by [applications](https://hathora.dev/docs/concepts/hathora-entities#application),\ \ [processes](https://hathora.dev/docs/concepts/hathora-entities#process), and\ \ [deployments](https://hathora.dev/docs/concepts/hathora-entities#deployment).\ \ We store 20GB of logs data." name: LogV1 +- description: ' ' + name: ManagementV1 - description: "Operations to get metrics by [process](https://hathora.dev/docs/concepts/hathora-entities#process).\ \ We store 72 hours of metrics data." name: MetricsV1 - description: "Operations to get data on active and stopped [processes](https://hathora.dev/docs/concepts/hathora-entities#process)." name: ProcessesV2 -- description: "Operations to create, manage, and connect to [rooms](https://hathora.dev/docs/concepts/hathora-entities#room)." - name: RoomV2 -- description: "Deprecated. Use [LobbyV3](https://hathora.dev/api#tag/LobbyV3)." - name: LobbyV1 -- description: "Deprecated. Use [LobbyV3](https://hathora.dev/api#tag/LobbyV3)." - name: LobbyV2 - description: "Deprecated. Use [ProcessesV2](https://hathora.dev/api#tag/ProcessesV2)." name: ProcessesV1 +- description: "Operations to create, manage, and connect to [rooms](https://hathora.dev/docs/concepts/hathora-entities#room)." + name: RoomV2 - description: "Deprecated. Use [RoomV2](https://hathora.dev/api#tag/RoomV2)." name: RoomV1 +- description: ' ' + name: OrgTokensV1 paths: /apps/v1/list: get: @@ -94,6 +104,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "500": content: application/json: @@ -148,6 +164,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "500": content: application/json: @@ -222,6 +244,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "500": content: application/json: @@ -249,7 +277,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/LoginResponse' + $ref: '#/components/schemas/PlayerTokenObject' description: Ok "404": content: @@ -276,14 +304,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/LoginNicknameRequest' + $ref: '#/components/schemas/NicknameObject' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/LoginResponse' + $ref: '#/components/schemas/PlayerTokenObject' description: Ok "404": content: @@ -310,14 +338,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/LoginGoogleRequest' + $ref: '#/components/schemas/GoogleIdTokenObject' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/LoginResponse' + $ref: '#/components/schemas/PlayerTokenObject' description: Ok "401": content: @@ -424,6 +452,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" security: - hathoraDevToken: [] tags: @@ -459,9 +493,10 @@ paths: - BillingV1 /builds/v1/{appId}/list: get: + deprecated: true description: "Returns an array of [builds](https://hathora.dev/docs/concepts/hathora-entities#build)\ \ for an [application](https://hathora.dev/docs/concepts/hathora-entities#application)." - operationId: GetBuilds + operationId: GetBuildsDeprecated parameters: - explode: false in: path @@ -497,8 +532,9 @@ paths: - BuildV1 /builds/v1/{appId}/info/{buildId}: get: + deprecated: true description: "Get details for a [build](https://hathora.dev/docs/concepts/hathora-entities#build)." - operationId: GetBuildInfo + operationId: GetBuildInfoDeprecated parameters: - explode: false in: path @@ -539,11 +575,12 @@ paths: - BuildV1 /builds/v1/{appId}/create: post: + deprecated: true description: "Creates a new [build](https://hathora.dev/docs/concepts/hathora-entities#build).\ \ Responds with a `buildId` that you must pass to [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild)\ \ to build the game server artifact. You can optionally pass in a `buildTag`\ \ to associate an external version with a build." - operationId: CreateBuild + operationId: CreateBuildDeprecated parameters: - explode: false in: path @@ -577,6 +614,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "500": content: application/json: @@ -589,9 +632,10 @@ paths: - BuildV1 /builds/v1/{appId}/run/{buildId}: post: + deprecated: true description: "Builds a game server artifact from a tarball you provide. Pass\ \ in the `buildId` generated from [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild)." - operationId: RunBuild + operationId: RunBuildDeprecated parameters: - explode: false in: path @@ -611,7 +655,7 @@ paths: content: multipart/form-data: schema: - $ref: '#/components/schemas/RunBuild_request' + $ref: '#/components/schemas/RunBuildDeprecated_request' required: true responses: "200": @@ -633,6 +677,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "500": content: application/json: @@ -645,9 +695,10 @@ paths: - BuildV1 /builds/v1/{appId}/delete/{buildId}: delete: + deprecated: true description: "Delete a [build](https://hathora.dev/docs/concepts/hathora-entities#build).\ \ All associated metadata is deleted." - operationId: DeleteBuild + operationId: DeleteBuildDeprecated parameters: - explode: false in: path @@ -694,11 +745,11 @@ paths: - hathoraDevToken: [] tags: - BuildV1 - /deployments/v1/{appId}/list: + /builds/v2/{appId}/list: get: - description: "Returns an array of [deployments](https://hathora.dev/docs/concepts/hathora-entities#deployment)\ + description: "Returns an array of [builds](https://hathora.dev/docs/concepts/hathora-entities#build)\ \ for an [application](https://hathora.dev/docs/concepts/hathora-entities#application)." - operationId: GetDeployments + operationId: GetBuilds parameters: - explode: false in: path @@ -713,7 +764,7 @@ paths: application/json: schema: items: - $ref: '#/components/schemas/Deployment' + $ref: '#/components/schemas/Build' type: array description: Ok "401": @@ -731,12 +782,11 @@ paths: security: - hathoraDevToken: [] tags: - - DeploymentV1 - /deployments/v1/{appId}/latest: + - BuildV2 + /builds/v2/{appId}/info/{buildId}: get: - description: "Get the latest [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment)\ - \ for an [application](https://hathora.dev/docs/concepts/hathora-entities#application)." - operationId: GetLatestDeployment + description: "Get details for a [build](https://hathora.dev/docs/concepts/hathora-entities#build)." + operationId: GetBuildInfo parameters: - explode: false in: path @@ -745,12 +795,19 @@ paths: schema: $ref: '#/components/schemas/AppId' style: simple + - explode: false + in: path + name: buildId + required: true + schema: + $ref: '#/components/schemas/BuildId' + style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Deployment' + $ref: '#/components/schemas/Build' description: Ok "401": content: @@ -767,11 +824,14 @@ paths: security: - hathoraDevToken: [] tags: - - DeploymentV1 - /deployments/v1/{appId}/info/{deploymentId}: - get: - description: "Get details for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment)." - operationId: GetDeploymentInfo + - BuildV2 + /builds/v2/{appId}/create: + post: + description: "Creates a new [build](https://hathora.dev/docs/concepts/hathora-entities#build).\ + \ Responds with a `buildId` that you must pass to [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild)\ + \ to build the game server artifact. You can optionally pass in a `buildTag`\ + \ to associate an external version with a build." + operationId: CreateBuild parameters: - explode: false in: path @@ -780,20 +840,19 @@ paths: schema: $ref: '#/components/schemas/AppId' style: simple - - explode: false - in: path - name: deploymentId + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateBuildParams' required: true - schema: - $ref: '#/components/schemas/DeploymentId' - style: simple responses: - "200": + "201": content: application/json: schema: - $ref: '#/components/schemas/Deployment' - description: Ok + $ref: '#/components/schemas/Build' + description: "" "401": content: application/json: @@ -806,16 +865,27 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" security: - hathoraDevToken: [] tags: - - DeploymentV1 - /deployments/v1/{appId}/create/{buildId}: + - BuildV2 + /builds/v2/{appId}/run/{buildId}: post: - description: "Create a new [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment).\ - \ Creating a new deployment means all new rooms created will use the latest\ - \ deployment configuration, but existing games in progress will not be affected." - operationId: CreateDeployment + description: "Builds a game server artifact from a tarball you provide. Pass\ + \ in the `buildId` generated from [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild)." + operationId: RunBuild parameters: - explode: false in: path @@ -833,23 +903,18 @@ paths: style: simple requestBody: content: - application/json: + multipart/form-data: schema: - $ref: '#/components/schemas/DeploymentConfig' + $ref: '#/components/schemas/RunBuildDeprecated_request' required: true responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/Deployment' - description: "" - "400": + "200": content: - application/json: + application/octet-stream: schema: - $ref: '#/components/schemas/ApiError' - description: "" + format: binary + type: string + description: Ok "401": content: application/json: @@ -862,7 +927,7 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" - "422": + "429": content: application/json: schema: @@ -877,29 +942,12 @@ paths: security: - hathoraDevToken: [] tags: - - DeploymentV1 - /discovery/v1/ping: - get: - description: "Returns an array of all regions with a host and port that a client\ - \ can directly ping. Open a websocket connection to `wss://:/ws`\ - \ and send a packet. To calculate ping, measure the time it takes to get an\ - \ echo packet back." - operationId: GetPingServiceEndpoints - parameters: [] - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/DiscoveryResponse' - description: Ok - security: [] - tags: - - DiscoveryV1 - /lobby/v1/{appId}/create/private: - post: - deprecated: true - operationId: CreatePrivateLobbyDeprecated + - BuildV2 + /builds/v2/{appId}/delete/{buildId}: + delete: + description: "Delete a [build](https://hathora.dev/docs/concepts/hathora-entities#build).\ + \ All associated metadata is deleted." + operationId: DeleteBuild parameters: - explode: false in: path @@ -908,46 +956,22 @@ paths: schema: $ref: '#/components/schemas/AppId' style: simple - - explode: true - in: query - name: region - required: false - schema: - $ref: '#/components/schemas/Region' - style: form - - explode: true - in: query - name: local - required: false + - explode: false + in: path + name: buildId + required: true schema: - default: false - type: boolean - style: form + $ref: '#/components/schemas/BuildId' + style: simple responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/RoomId' - description: Ok - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ApiError' - description: "" + "204": + description: No content "401": content: application/json: schema: $ref: '#/components/schemas/ApiError' description: "" - "402": - content: - application/json: - schema: - $ref: '#/components/schemas/ApiError' - description: "" "404": content: application/json: @@ -973,13 +997,15 @@ paths: $ref: '#/components/schemas/ApiError' description: "" security: - - playerAuth: [] + - hathoraDevToken: [] tags: - - LobbyV1 - /lobby/v1/{appId}/create/public: - post: + - BuildV2 + /deployments/v1/{appId}/list: + get: deprecated: true - operationId: CreatePublicLobbyDeprecated + description: "Returns an array of [deployments](https://hathora.dev/docs/concepts/hathora-entities#deployment)\ + \ for an [application](https://hathora.dev/docs/concepts/hathora-entities#application)." + operationId: GetDeploymentsDeprecated parameters: - explode: false in: path @@ -988,53 +1014,540 @@ paths: schema: $ref: '#/components/schemas/AppId' style: simple - - explode: true - in: query - name: region - required: false - schema: - $ref: '#/components/schemas/Region' - style: form - - explode: true - in: query - name: local - required: false - schema: - default: false - type: boolean - style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/RoomId' + items: + $ref: '#/components/schemas/Deployment' + type: array description: Ok - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ApiError' - description: "" "401": content: application/json: schema: $ref: '#/components/schemas/ApiError' description: "" - "402": - content: - application/json: - schema: - $ref: '#/components/schemas/ApiError' - description: "" "404": content: application/json: schema: $ref: '#/components/schemas/ApiError' description: "" - "422": + security: + - hathoraDevToken: [] + tags: + - DeploymentV1 + /deployments/v1/{appId}/latest: + get: + deprecated: true + description: "Get the latest [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment)\ + \ for an [application](https://hathora.dev/docs/concepts/hathora-entities#application)." + operationId: GetLatestDeploymentDeprecated + parameters: + - explode: false + in: path + name: appId + required: true + schema: + $ref: '#/components/schemas/AppId' + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Deployment' + description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + security: + - hathoraDevToken: [] + tags: + - DeploymentV1 + /deployments/v1/{appId}/info/{deploymentId}: + get: + deprecated: true + description: "Get details for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment)." + operationId: GetDeploymentInfoDeprecated + parameters: + - explode: false + in: path + name: appId + required: true + schema: + $ref: '#/components/schemas/AppId' + style: simple + - explode: false + in: path + name: deploymentId + required: true + schema: + $ref: '#/components/schemas/DeploymentId' + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Deployment' + description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + security: + - hathoraDevToken: [] + tags: + - DeploymentV1 + /deployments/v1/{appId}/create/{buildId}: + post: + deprecated: true + description: "Create a new [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment).\ + \ Creating a new deployment means all new rooms created will use the latest\ + \ deployment configuration, but existing games in progress will not be affected." + operationId: CreateDeploymentDeprecated + parameters: + - explode: false + in: path + name: appId + required: true + schema: + $ref: '#/components/schemas/AppId' + style: simple + - explode: false + in: path + name: buildId + required: true + schema: + $ref: '#/components/schemas/BuildId' + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DeploymentConfig' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Deployment' + description: "" + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + security: + - hathoraDevToken: [] + tags: + - DeploymentV1 + /deployments/v2/{appId}/list: + get: + description: "Returns an array of [deployments](https://hathora.dev/docs/concepts/hathora-entities#deployment)\ + \ for an [application](https://hathora.dev/docs/concepts/hathora-entities#application)." + operationId: GetDeployments + parameters: + - explode: false + in: path + name: appId + required: true + schema: + $ref: '#/components/schemas/AppId' + style: simple + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/DeploymentV2' + type: array + description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + security: + - hathoraDevToken: [] + tags: + - DeploymentV2 + /deployments/v2/{appId}/latest: + get: + description: "Get the latest [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment)\ + \ for an [application](https://hathora.dev/docs/concepts/hathora-entities#application)." + operationId: GetLatestDeployment + parameters: + - explode: false + in: path + name: appId + required: true + schema: + $ref: '#/components/schemas/AppId' + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DeploymentV2' + description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + security: + - hathoraDevToken: [] + tags: + - DeploymentV2 + /deployments/v2/{appId}/info/{deploymentId}: + get: + description: "Get details for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment)." + operationId: GetDeploymentInfo + parameters: + - explode: false + in: path + name: appId + required: true + schema: + $ref: '#/components/schemas/AppId' + style: simple + - explode: false + in: path + name: deploymentId + required: true + schema: + $ref: '#/components/schemas/DeploymentId' + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DeploymentV2' + description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + security: + - hathoraDevToken: [] + tags: + - DeploymentV2 + /deployments/v2/{appId}/create/{buildId}: + post: + description: "Create a new [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment).\ + \ Creating a new deployment means all new rooms created will use the latest\ + \ deployment configuration, but existing games in progress will not be affected." + operationId: CreateDeployment + parameters: + - explode: false + in: path + name: appId + required: true + schema: + $ref: '#/components/schemas/AppId' + style: simple + - explode: false + in: path + name: buildId + required: true + schema: + $ref: '#/components/schemas/BuildId' + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DeploymentConfigV2' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/DeploymentV2' + description: "" + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + security: + - hathoraDevToken: [] + tags: + - DeploymentV2 + /discovery/v1/ping: + get: + deprecated: true + description: "Returns an array of V1 regions with a host and port that a client\ + \ can directly ping. Open a websocket connection to `wss://:/ws`\ + \ and send a packet. To calculate ping, measure the time it takes to get an\ + \ echo packet back." + operationId: GetPingServiceEndpointsDeprecated + parameters: [] + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PingEndpoints' + description: Ok + security: [] + tags: + - DiscoveryV1 + /discovery/v2/ping: + get: + description: "Returns an array of all regions with a host and port that a client\ + \ can directly ping. Open a websocket connection to `wss://:/ws`\ + \ and send a packet. To calculate ping, measure the time it takes to get an\ + \ echo packet back." + operationId: GetPingServiceEndpoints + parameters: [] + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PingEndpoints' + description: Ok + security: [] + tags: + - DiscoveryV2 + /lobby/v1/{appId}/create/private: + post: + deprecated: true + operationId: CreatePrivateLobbyDeprecated + parameters: + - explode: false + in: path + name: appId + required: true + schema: + $ref: '#/components/schemas/AppId' + style: simple + - explode: true + in: query + name: region + required: false + schema: + $ref: '#/components/schemas/Region' + style: form + - explode: true + in: query + name: local + required: false + schema: + default: false + type: boolean + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RoomId' + description: Ok + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "402": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + security: + - playerAuth: [] + tags: + - LobbyV1 + /lobby/v1/{appId}/create/public: + post: + deprecated: true + operationId: CreatePublicLobbyDeprecated + parameters: + - explode: false + in: path + name: appId + required: true + schema: + $ref: '#/components/schemas/AppId' + style: simple + - explode: true + in: query + name: region + required: false + schema: + $ref: '#/components/schemas/Region' + style: form + - explode: true + in: query + name: local + required: false + schema: + default: false + type: boolean + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RoomId' + description: Ok + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "402": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "422": content: application/json: schema: @@ -1544,6 +2057,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" security: - hathoraDevToken: [] tags: @@ -1780,9 +2299,9 @@ paths: responses: "200": content: - text/plain: + application/octet-stream: schema: - format: byte + format: binary type: string description: Ok "401": @@ -1838,9 +2357,9 @@ paths: responses: "200": content: - text/plain: + application/octet-stream: schema: - format: byte + format: binary type: string description: Ok "400": @@ -1899,9 +2418,9 @@ paths: responses: "200": content: - text/plain: + application/octet-stream: schema: - format: byte + format: binary type: string description: Ok "400": @@ -1970,9 +2489,9 @@ paths: responses: "200": content: - text/plain: + application/octet-stream: schema: - format: byte + format: binary type: string description: Ok "401": @@ -2006,7 +2525,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/VerificationEmailResponse' + $ref: '#/components/schemas/VerificationEmailSuccess' description: Ok "401": content: @@ -2014,6 +2533,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "500": content: application/json: @@ -2087,7 +2612,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/MetricsResponse' + $ref: '#/components/schemas/MetricsData' description: Ok "401": content: @@ -2117,6 +2642,233 @@ paths: - hathoraDevToken: [] tags: - MetricsV1 + /orgs/v1/{orgId}/invites: + put: + operationId: InviteUser + parameters: + - explode: false + in: path + name: orgId + required: true + schema: + $ref: '#/components/schemas/OrgId' + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateUserInvite' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/OrgPermission' + description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + security: + - hathoraDevToken: [] + tags: + - OrganizationsV1 + /orgs/v1/{orgId}/invites/rescind: + post: + operationId: RescindInvite + parameters: + - explode: false + in: path + name: orgId + required: true + schema: + $ref: '#/components/schemas/OrgId' + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RescindUserInvite' + required: true + responses: + "204": + description: No content + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + security: + - hathoraDevToken: [] + tags: + - OrganizationsV1 + /orgs/v1/{orgId}/invites/pending: + get: + operationId: GetOrgPendingInvites + parameters: + - explode: false + in: path + name: orgId + required: true + schema: + $ref: '#/components/schemas/OrgId' + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/OrgInvitesPage' + description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + security: + - hathoraDevToken: [] + tags: + - OrganizationsV1 + /orgs/v1/user/invites/pending: + get: + operationId: GetUserPendingInvites + parameters: [] + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/OrgInvitesPage' + description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + security: + - hathoraDevToken: [] + tags: + - OrganizationsV1 + /orgs/v1/{orgId}/invites/accept: + post: + operationId: AcceptInvite + parameters: + - explode: false + in: path + name: orgId + required: true + schema: + $ref: '#/components/schemas/OrgId' + style: simple + responses: + "204": + description: No content + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + security: + - hathoraDevToken: [] + tags: + - OrganizationsV1 + /orgs/v1/{orgId}/invites/reject: + post: + operationId: RejectInvite + parameters: + - explode: false + in: path + name: orgId + required: true + schema: + $ref: '#/components/schemas/OrgId' + style: simple + responses: + "204": + description: No content + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + security: + - hathoraDevToken: [] + tags: + - OrganizationsV1 /processes/v1/{appId}/list/running: get: deprecated: true @@ -2349,7 +3101,52 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" - "404": + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + security: + - hathoraDevToken: [] + tags: + - ProcessesV2 + /processes/v2/{appId}/stop/{processId}: + post: + description: "Stops a [process](https://hathora.dev/docs/concepts/hathora-entities#process)\ + \ immediately." + operationId: StopProcess + parameters: + - explode: false + in: path + name: appId + required: true + schema: + $ref: '#/components/schemas/AppId' + style: simple + - explode: false + in: path + name: processId + required: true + schema: + $ref: '#/components/schemas/ProcessId' + style: simple + responses: + "204": + description: No content + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "500": content: application/json: schema: @@ -2359,11 +3156,13 @@ paths: - hathoraDevToken: [] tags: - ProcessesV2 - /processes/v2/{appId}/stop/{processId}: + /processes/v2/{appId}/create/{region}: post: - description: "Stops a [process](https://hathora.dev/docs/concepts/hathora-entities#process)\ - \ immediately." - operationId: StopProcess + description: "Creates a [process](https://hathora.dev/docs/concepts/hathora-entities#process)\ + \ without a room. Use this to pre-allocate processes ahead of time so that\ + \ subsequent room assignment via [CreateRoom()](https://hathora.dev/api#tag/RoomV2/operation/CreateRoom)\ + \ can be instant." + operationId: CreateProcess parameters: - explode: false in: path @@ -2374,20 +3173,30 @@ paths: style: simple - explode: false in: path - name: processId + name: region required: true schema: - $ref: '#/components/schemas/ProcessId' + $ref: '#/components/schemas/Region' style: simple responses: - "204": - description: No content + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ProcessV2' + description: "" "401": content: application/json: schema: $ref: '#/components/schemas/ApiError' description: "" + "402": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -2466,6 +3275,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "500": content: application/json: @@ -2640,6 +3455,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "500": content: application/json: @@ -2684,6 +3505,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "500": content: application/json: @@ -2780,7 +3607,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateRoomResponse' + $ref: '#/components/schemas/RoomConnectionData' description: "" "400": content: @@ -2812,6 +3639,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "500": content: application/json: @@ -2989,6 +3822,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "500": content: application/json: @@ -3001,10 +3840,11 @@ paths: - RoomV2 /rooms/v2/{appId}/suspend/{roomId}: post: + deprecated: true description: "Suspend a [room](https://hathora.dev/docs/concepts/hathora-entities#room).\ \ The room is unallocated from the process but can be rescheduled later using\ \ the same `roomId`." - operationId: SuspendRoom + operationId: SuspendRoomV2Deprecated parameters: - explode: false in: path @@ -3035,6 +3875,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "500": content: application/json: @@ -3138,6 +3984,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "500": content: application/json: @@ -3433,24 +4285,6 @@ components: - port - transportType type: object - PlanName: - description: |- - A plan defines how much CPU and memory is required to run an instance of your game server. - - `tiny`: shared core, 1gb memory - - `small`: 1 core, 2gb memory - - `medium`: 2 core, 4gb memory - - `large`: 4 core, 8gb memory - enum: - - tiny - - small - - medium - - large - example: tiny - type: string NumRoomsPerProcess: description: "Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room)\ \ can be scheduled in a process." @@ -3459,18 +4293,24 @@ components: maximum: 10000 minimum: 1 type: integer - Deployment: - description: Deployment is a versioned configuration for a build that describes - runtime behavior. + DeploymentV2: example: + createdAt: 2000-01-23T04:56:07.000+00:00 requestedCPU: 0.5 defaultContainerPort: port: 8000 name: default transportType: null roomsPerProcess: 3 - planName: tiny + additionalContainerPorts: + transportType: tcp + port: 4000 + name: debug + createdBy: google-oauth2|107030234048588177467 + deploymentId: 1 + appId: app-af469a92-5b45-4565-b3c4-b79878de67d2 buildId: 1 + requestedMemoryMB: 1024 env: - name: EULA value: "TRUE" @@ -3483,20 +4323,8 @@ components: - name: EULA value: "TRUE" idleTimeoutEnabled: true - createdAt: 2000-01-23T04:56:07.000+00:00 - additionalContainerPorts: - transportType: tcp - port: 4000 - name: debug - createdBy: google-oauth2|107030234048588177467 - deploymentId: 1 - appId: app-af469a92-5b45-4565-b3c4-b79878de67d2 - containerPort: 0.8008281904610115 - transportType: tcp - requestedMemoryMB: 1024 properties: idleTimeoutEnabled: - default: true description: |- Option to shut down processes that have had no new connections or rooms for five minutes. @@ -3505,7 +4333,7 @@ components: description: The environment variable that our process will have access to at runtime. items: - $ref: '#/components/schemas/Deployment_env_inner' + $ref: '#/components/schemas/DeploymentV2_env_inner' maxItems: 100 type: array roomsPerProcess: @@ -3516,8 +4344,6 @@ components: maximum: 10000 minimum: 1 type: integer - planName: - $ref: '#/components/schemas/PlanName' additionalContainerPorts: description: Additional ports your server listens on. example: @@ -3530,17 +4356,6 @@ components: type: array defaultContainerPort: $ref: '#/components/schemas/ContainerPort' - transportType: - deprecated: true - enum: - - tcp - - udp - - tls - type: string - containerPort: - deprecated: true - format: double - type: number createdAt: description: When the deployment was created. format: date-time @@ -3552,8 +4367,8 @@ components: requestedMemoryMB: description: The amount of memory allocated to your process. example: 1024 - format: int32 - type: integer + format: double + type: number requestedCPU: description: The number of cores allocated to your process. example: 0.5 @@ -3577,17 +4392,15 @@ components: - additionalContainerPorts - appId - buildId - - containerPort - createdAt - createdBy - defaultContainerPort - deploymentId - env - - planName + - idleTimeoutEnabled - requestedCPU - requestedMemoryMB - roomsPerProcess - - transportType type: object BuildStatus: enum: @@ -3609,10 +4422,11 @@ components: - Tokyo - Sydney - Sao_Paulo + - Dallas type: string BuildTag: description: "Tag to associate an external version with a build. It is accessible\ - \ via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV1/operation/GetBuildInfo)." + \ via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV2/operation/GetBuildInfo)." example: 0.1.14-14c793 maxLength: 1000 type: string @@ -3646,7 +4460,7 @@ components: type: array imageSize: description: The size (in bytes) of the Docker image built by Hathora. - format: int32 + format: int64 type: integer status: $ref: '#/components/schemas/BuildStatus' @@ -3656,19 +4470,19 @@ components: nullable: true type: string finishedAt: - description: "When [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild)\ + description: "When [`RunBuild()`](https://hathora.dev/api#tag/BuildV2/operation/RunBuild)\ \ finished executing." format: date-time nullable: true type: string startedAt: - description: "When [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild)\ + description: "When [`RunBuild()`](https://hathora.dev/api#tag/BuildV2/operation/RunBuild)\ \ is called." format: date-time nullable: true type: string createdAt: - description: "When [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild)\ + description: "When [`CreateBuild()`](https://hathora.dev/api#tag/BuildV2/operation/CreateBuild)\ \ is called." format: date-time type: string @@ -3730,7 +4544,7 @@ components: required: - message type: object - LoginResponse: + PlayerTokenObject: example: token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0eXBlIjoiYW5vbnltb3VzIiwiaWQiOiJ3aDA4eWN3eTJwOSIsIm5hbWUiOiJqaXR0ZXJ5LXNhbG1vbi1ndWxsIiwiaWF0IjoxNjg5MzQ5MTk3fQ.-LzlPhZw2tw0ycZ229IRHwwmINGKWNPFMDrXOphLjEk properties: @@ -3741,7 +4555,7 @@ components: required: - token type: object - LoginNicknameRequest: + NicknameObject: example: nickname: squiddytwoshoes properties: @@ -3752,7 +4566,7 @@ components: required: - nickname type: object - LoginGoogleRequest: + GoogleIdTokenObject: example: idToken: eyJhbGciOiJSUzI1NiIsImtpZCI6ImZkNDhhNzUxMzhkOWQ0OGYwYWE2MzVlZjU2OWM0ZTE5NmY3YWU4ZDYiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJhY2NvdW50cy5nb29nbGUuY29tIiwiYXpwIjoiODQ4NDEyODI2Nzg4LW00bXNyYjZxNDRkbTJ1ZTNrZ3Z1aTBmcTdrZGE1NWxzLmFwcHMuZ29vZ2xldXNlcmNvbnRlbnQuY29tIiwiYXVkIjoiODQ4NDEyODI2Nzg4LW00bXNyYjZxNDRkbTJ1ZTNrZ3Z1aTBmcTdrZGE1NWxzLmFwcHMuZ29vZ2xldXNlcmNvbnRlbnQuY29tIiwic3ViIjoiMTE0NTQyMzMwNzI3MTU2MTMzNzc2IiwiZW1haWwiOiJocGFdkeivmeuzQGdtYWlsLmNvbSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJhdF9oYXNoIjoidno1NGhhdTNxbnVR properties: @@ -3857,38 +4671,186 @@ components: amountDue: format: double type: number - pdfUrl: - type: string - dueDate: + pdfUrl: + type: string + dueDate: + format: date-time + type: string + year: + format: double + type: number + month: + format: double + type: number + id: + type: string + required: + - amountDue + - dueDate + - id + - month + - pdfUrl + - status + - year + type: object + CreateBuildParams: + example: + buildTag: 0.1.14-14c793 + properties: + buildTag: + description: "Tag to associate an external version with a build. It is accessible\ + \ via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV2/operation/GetBuildInfo)." + example: 0.1.14-14c793 + maxLength: 1000 + type: string + type: object + PlanName: + description: |- + A plan defines how much CPU and memory is required to run an instance of your game server. + + `tiny`: shared core, 1gb memory + + `small`: 1 core, 2gb memory + + `medium`: 2 core, 4gb memory + + `large`: 4 core, 8gb memory + enum: + - tiny + - small + - medium + - large + example: tiny + type: string + Deployment: + description: Deployment is a versioned configuration for a build that describes + runtime behavior. + example: + requestedCPU: 0.5 + defaultContainerPort: + port: 8000 + name: default + transportType: null + roomsPerProcess: 3 + planName: tiny + buildId: 1 + env: + - name: EULA + value: "TRUE" + - name: EULA + value: "TRUE" + - name: EULA + value: "TRUE" + - name: EULA + value: "TRUE" + - name: EULA + value: "TRUE" + idleTimeoutEnabled: true + createdAt: 2000-01-23T04:56:07.000+00:00 + additionalContainerPorts: + transportType: tcp + port: 4000 + name: debug + createdBy: google-oauth2|107030234048588177467 + deploymentId: 1 + appId: app-af469a92-5b45-4565-b3c4-b79878de67d2 + containerPort: 0.8008281904610115 + transportType: tcp + requestedMemoryMB: 1024 + properties: + idleTimeoutEnabled: + default: true + description: |- + Option to shut down processes that have had no new connections or rooms + for five minutes. + type: boolean + env: + description: The environment variable that our process will have access + to at runtime. + items: + $ref: '#/components/schemas/DeploymentV2_env_inner' + maxItems: 100 + type: array + roomsPerProcess: + description: "Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room)\ + \ can be scheduled in a process." + example: 3 + format: int32 + maximum: 10000 + minimum: 1 + type: integer + planName: + $ref: '#/components/schemas/PlanName' + additionalContainerPorts: + description: Additional ports your server listens on. + example: + transportType: tcp + port: 4000 + name: debug + items: + $ref: '#/components/schemas/ContainerPort' + maxItems: 2 + type: array + defaultContainerPort: + $ref: '#/components/schemas/ContainerPort' + transportType: + deprecated: true + enum: + - tcp + - udp + - tls + type: string + containerPort: + deprecated: true + format: double + type: number + createdAt: + description: When the deployment was created. format: date-time type: string - year: - format: double - type: number - month: + createdBy: + description: UserId or email address for the user that created the deployment. + example: google-oauth2|107030234048588177467 + type: string + requestedMemoryMB: + description: The amount of memory allocated to your process. + example: 1024 + format: int32 + type: integer + requestedCPU: + description: The number of cores allocated to your process. + example: 0.5 format: double type: number - id: + deploymentId: + description: System generated id for a deployment. Increments by 1. + example: 1 + format: int32 + type: integer + buildId: + description: System generated id for a build. Increments by 1. + example: 1 + format: int32 + type: integer + appId: + description: System generated unique identifier for an application. + example: app-af469a92-5b45-4565-b3c4-b79878de67d2 type: string required: - - amountDue - - dueDate - - id - - month - - pdfUrl - - status - - year - type: object - CreateBuildParams: - example: - buildTag: 0.1.14-14c793 - properties: - buildTag: - description: "Tag to associate an external version with a build. It is accessible\ - \ via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV1/operation/GetBuildInfo)." - example: 0.1.14-14c793 - maxLength: 1000 - type: string + - additionalContainerPorts + - appId + - buildId + - containerPort + - createdAt + - createdBy + - defaultContainerPort + - deploymentId + - env + - planName + - requestedCPU + - requestedMemoryMB + - roomsPerProcess + - transportType type: object DeploymentConfig: description: User specified deployment configuration for your application at @@ -3928,7 +4890,7 @@ components: description: The environment variable that our process will have access to at runtime. items: - $ref: '#/components/schemas/Deployment_env_inner' + $ref: '#/components/schemas/DeploymentV2_env_inner' maxItems: 100 type: array roomsPerProcess: @@ -3963,13 +4925,94 @@ components: - roomsPerProcess - transportType type: object - DiscoveryResponse: + DeploymentConfigV2: + example: + requestedCPU: 0.5 + roomsPerProcess: 3 + additionalContainerPorts: + - port: 8000 + name: default + transportType: null + - port: 8000 + name: default + transportType: null + containerPort: 4000 + transportType: null + requestedMemoryMB: 1024 + env: + - name: EULA + value: "TRUE" + - name: EULA + value: "TRUE" + - name: EULA + value: "TRUE" + - name: EULA + value: "TRUE" + - name: EULA + value: "TRUE" + idleTimeoutEnabled: true + properties: + idleTimeoutEnabled: + description: |- + Option to shut down processes that have had no new connections or rooms + for five minutes. + type: boolean + env: + description: The environment variable that our process will have access + to at runtime. + items: + $ref: '#/components/schemas/DeploymentV2_env_inner' + maxItems: 100 + type: array + roomsPerProcess: + description: "Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room)\ + \ can be scheduled in a process." + example: 3 + format: int32 + maximum: 10000 + minimum: 1 + type: integer + additionalContainerPorts: + description: Additional ports your server listens on. + items: + $ref: '#/components/schemas/ContainerPort' + maxItems: 2 + type: array + transportType: + $ref: '#/components/schemas/TransportType' + containerPort: + description: Default port the server listens on. + example: 4000 + format: int32 + maximum: 65535 + minimum: 1 + type: integer + requestedMemoryMB: + description: The amount of memory allocated to your process. + example: 1024 + format: double + type: number + requestedCPU: + description: The number of cores allocated to your process. + example: 0.5 + format: double + type: number + required: + - containerPort + - env + - idleTimeoutEnabled + - requestedCPU + - requestedMemoryMB + - roomsPerProcess + - transportType + type: object + PingEndpoints: example: - region: Seattle host: ping.hathora.dev port: 2000 items: - $ref: '#/components/schemas/DiscoveryResponse_inner' + $ref: '#/components/schemas/PingEndpoints_inner' type: array RoomId: description: |- @@ -4028,6 +5071,7 @@ components: additionalProperties: false description: JSON blob to store metadata for a room. Must be smaller than 1MB. + nullable: true type: object initialConfig: additionalProperties: false @@ -4205,18 +5249,11 @@ components: game server. example: cbfcddd2-0006-43ae-996c-995fff7bed2e type: string - VerificationEmailResponse: - example: - status: success - properties: - status: - enum: - - success - nullable: false - type: string - required: - - status - type: object + VerificationEmailSuccess: + enum: + - success + nullable: false + type: string VerificationEmailRequest: example: userId: userId @@ -4226,6 +5263,16 @@ components: required: - userId type: object + NewUserInfo: + properties: + email: + type: string + user_id: + type: string + required: + - email + - user_id + type: object MetricValue: example: value: 0.8008281904610115 @@ -4291,7 +5338,7 @@ components: $ref: '#/components/schemas/MetricValue' type: array type: object - MetricsResponse: + MetricsData: $ref: '#/components/schemas/Record_Partial_MetricName_.MetricValue-Array_' MetricName: description: Available metrics to query over time. @@ -4306,6 +5353,158 @@ components: description: Width of time in seconds to group data. format: int32 type: integer + UserId: + description: System generated unique identifier for a user. Not guaranteed to + have a specific format. + example: auth0|646bdf96f7fb73d04c8c84db + type: string + InviteStatusPending: + properties: + type: + enum: + - pending + nullable: false + type: string + required: + - type + type: object + InviteStatusAccepted: + properties: + userId: + description: System generated unique identifier for a user. Not guaranteed + to have a specific format. + example: auth0|646bdf96f7fb73d04c8c84db + type: string + type: + enum: + - accepted + nullable: false + type: string + required: + - type + - userId + type: object + InviteStatusRejected: + properties: + userId: + description: System generated unique identifier for a user. Not guaranteed + to have a specific format. + example: auth0|646bdf96f7fb73d04c8c84db + type: string + type: + enum: + - rejected + nullable: false + type: string + required: + - type + - userId + type: object + InviteStatusRescinded: + properties: + rescindedBy: + description: System generated unique identifier for a user. Not guaranteed + to have a specific format. + example: auth0|646bdf96f7fb73d04c8c84db + type: string + userId: + description: System generated unique identifier for a user. Not guaranteed + to have a specific format. + example: auth0|646bdf96f7fb73d04c8c84db + type: string + type: + enum: + - rescinded + nullable: false + type: string + required: + - rescindedBy + - type + type: object + OrganizationInviteStatus: + anyOf: + - $ref: '#/components/schemas/InviteStatusPending' + - $ref: '#/components/schemas/InviteStatusAccepted' + - $ref: '#/components/schemas/InviteStatusRejected' + - $ref: '#/components/schemas/InviteStatusRescinded' + OrgPermission: + example: + createdAt: 2000-01-23T04:56:07.000+00:00 + invitedBy: auth0|646bdf96f7fb73d04c8c84db + userEmail: userEmail + orgId: org-6f706e83-0ec1-437a-9a46-7d4281eb2f39 + updatedAt: 2000-01-23T04:56:07.000+00:00 + status: null + properties: + updatedAt: + format: date-time + type: string + createdAt: + format: date-time + type: string + status: + $ref: '#/components/schemas/OrganizationInviteStatus' + userEmail: + type: string + invitedBy: + description: System generated unique identifier for a user. Not guaranteed + to have a specific format. + example: auth0|646bdf96f7fb73d04c8c84db + type: string + orgId: + description: System generated unique identifier for an organization. Not + guaranteed to have a specific format. + example: org-6f706e83-0ec1-437a-9a46-7d4281eb2f39 + type: string + required: + - createdAt + - invitedBy + - orgId + - status + - updatedAt + - userEmail + type: object + CreateUserInvite: + example: + userEmail: userEmail + properties: + userEmail: + type: string + required: + - userEmail + type: object + RescindUserInvite: + example: + userEmail: userEmail + properties: + userEmail: + type: string + required: + - userEmail + type: object + OrgInvitesPage: + example: + invites: + - createdAt: 2000-01-23T04:56:07.000+00:00 + invitedBy: auth0|646bdf96f7fb73d04c8c84db + userEmail: userEmail + orgId: org-6f706e83-0ec1-437a-9a46-7d4281eb2f39 + updatedAt: 2000-01-23T04:56:07.000+00:00 + status: null + - createdAt: 2000-01-23T04:56:07.000+00:00 + invitedBy: auth0|646bdf96f7fb73d04c8c84db + userEmail: userEmail + orgId: org-6f706e83-0ec1-437a-9a46-7d4281eb2f39 + updatedAt: 2000-01-23T04:56:07.000+00:00 + status: null + properties: + invites: + items: + $ref: '#/components/schemas/OrgPermission' + type: array + required: + - invites + type: object ExposedPort: description: Connection details for an active process. example: @@ -4821,6 +6020,11 @@ components: - $ref: '#/components/schemas/StartingConnectionInfo' - $ref: '#/components/schemas/ActiveConnectionInfo' description: Connection information to the default port. + RoomReadyStatus: + enum: + - active + - starting + type: string ConnectionInfoV2: description: Connection information for the default and additional ports. example: @@ -4835,7 +6039,7 @@ components: port: 72941 transportType: tcp roomId: 2swovpy1fnunu - status: active + status: null properties: additionalExposedPorts: example: @@ -4850,13 +6054,7 @@ components: exposedPort: $ref: '#/components/schemas/ExposedPort' status: - description: '`exposedPort` will only be available when the `status` of - a room is "active".' - enum: - - starting - - active - example: active - type: string + $ref: '#/components/schemas/RoomReadyStatus' roomId: description: |- Unique identifier to a game session or match. Use the default system generated ID or overwrite it with your own. @@ -4871,10 +6069,10 @@ components: - roomId - status type: object - CreateRoomResponse: + RoomConnectionData: allOf: - $ref: '#/components/schemas/ConnectionInfoV2' - - $ref: '#/components/schemas/CreateRoomResponse_allOf' + - $ref: '#/components/schemas/RoomConnectionData_allOf' UpdateRoomConfigParams: example: roomConfig: "{\"name\":\"my-room\"}" @@ -4999,7 +6197,7 @@ components: required: - name type: object - RunBuild_request: + RunBuildDeprecated_request: properties: file: format: binary @@ -5033,7 +6231,7 @@ components: required: - clientId type: object - Deployment_env_inner: + DeploymentV2_env_inner: example: name: EULA value: "TRUE" @@ -5074,7 +6272,7 @@ components: type: object ApplicationWithLatestDeploymentAndBuild_allOf_deployment: allOf: - - $ref: '#/components/schemas/Deployment' + - $ref: '#/components/schemas/DeploymentV2' - $ref: '#/components/schemas/ApplicationWithLatestDeploymentAndBuild_allOf_deployment_allOf' ApplicationWithLatestDeploymentAndBuild_allOf: properties: @@ -5082,7 +6280,7 @@ components: $ref: '#/components/schemas/ApplicationWithLatestDeploymentAndBuild_allOf_deployment' type: object example: null - DiscoveryResponse_inner: + PingEndpoints_inner: properties: port: format: double @@ -5110,7 +6308,7 @@ components: - totalRooms type: object example: null - CreateRoomResponse_allOf: + RoomConnectionData_allOf: properties: processId: description: System generated unique identifier to a runtime instance of diff --git a/csharp/docs/AppV1Api.md b/csharp/docs/AppV1Api.md index e1b1314..9eb954e 100644 --- a/csharp/docs/AppV1Api.md +++ b/csharp/docs/AppV1Api.md @@ -101,6 +101,7 @@ catch (ApiException e) | **201** | | - | | **401** | | - | | **422** | | - | +| **429** | | - | | **500** | | - | [[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) @@ -192,6 +193,7 @@ void (empty response body) | **204** | No content | - | | **401** | | - | | **404** | | - | +| **429** | | - | | **500** | | - | [[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) @@ -471,6 +473,7 @@ catch (ApiException e) | **401** | | - | | **404** | | - | | **422** | | - | +| **429** | | - | | **500** | | - | [[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/csharp/docs/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.md b/csharp/docs/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.md index 281517d..545d353 100644 --- a/csharp/docs/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.md +++ b/csharp/docs/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.md @@ -4,17 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**IdleTimeoutEnabled** | **bool** | Option to shut down processes that have had no new connections or rooms for five minutes. | [optional] [default to true] -**Env** | [**List<DeploymentEnvInner>**](DeploymentEnvInner.md) | The environment variable that our process will have access to at runtime. | +**IdleTimeoutEnabled** | **bool** | Option to shut down processes that have had no new connections or rooms for five minutes. | +**Env** | [**List<DeploymentV2EnvInner>**](DeploymentV2EnvInner.md) | The environment variable that our process will have access to at runtime. | **RoomsPerProcess** | **int** | Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. | -**PlanName** | **PlanName** | | **AdditionalContainerPorts** | [**List<ContainerPort>**](ContainerPort.md) | Additional ports your server listens on. | **DefaultContainerPort** | [**ContainerPort**](ContainerPort.md) | | -**TransportType** | **string** | | -**ContainerPort** | **double** | | **CreatedAt** | **DateTime** | When the deployment was created. | **CreatedBy** | **string** | UserId or email address for the user that created the deployment. | -**RequestedMemoryMB** | **int** | The amount of memory allocated to your process. | +**RequestedMemoryMB** | **double** | The amount of memory allocated to your process. | **RequestedCPU** | **double** | The number of cores allocated to your process. | **DeploymentId** | **int** | System generated id for a deployment. Increments by 1. | **BuildId** | **int** | System generated id for a build. Increments by 1. | diff --git a/csharp/docs/AuthV1Api.md b/csharp/docs/AuthV1Api.md index 5fba88d..e20f0b6 100644 --- a/csharp/docs/AuthV1Api.md +++ b/csharp/docs/AuthV1Api.md @@ -10,7 +10,7 @@ All URIs are relative to *https://api.hathora.dev* # **LoginAnonymous** -> LoginResponse LoginAnonymous (string appId) +> PlayerTokenObject LoginAnonymous (string appId) @@ -37,7 +37,7 @@ namespace Example try { - LoginResponse result = apiInstance.LoginAnonymous(appId); + PlayerTokenObject result = apiInstance.LoginAnonymous(appId); Debug.WriteLine(result); } catch (ApiException e) @@ -57,7 +57,7 @@ This returns an ApiResponse object which contains the response data, status code ```csharp try { - ApiResponse response = apiInstance.LoginAnonymousWithHttpInfo(appId); + ApiResponse response = apiInstance.LoginAnonymousWithHttpInfo(appId); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); @@ -78,7 +78,7 @@ catch (ApiException e) ### Return type -[**LoginResponse**](LoginResponse.md) +[**PlayerTokenObject**](PlayerTokenObject.md) ### Authorization @@ -100,7 +100,7 @@ No authorization required # **LoginGoogle** -> LoginResponse LoginGoogle (string appId, LoginGoogleRequest loginGoogleRequest) +> PlayerTokenObject LoginGoogle (string appId, GoogleIdTokenObject googleIdTokenObject) @@ -124,11 +124,11 @@ namespace Example config.BasePath = "https://api.hathora.dev"; var apiInstance = new AuthV1Api(config); var appId = "appId_example"; // string | - var loginGoogleRequest = new LoginGoogleRequest(); // LoginGoogleRequest | + var googleIdTokenObject = new GoogleIdTokenObject(); // GoogleIdTokenObject | try { - LoginResponse result = apiInstance.LoginGoogle(appId, loginGoogleRequest); + PlayerTokenObject result = apiInstance.LoginGoogle(appId, googleIdTokenObject); Debug.WriteLine(result); } catch (ApiException e) @@ -148,7 +148,7 @@ This returns an ApiResponse object which contains the response data, status code ```csharp try { - ApiResponse response = apiInstance.LoginGoogleWithHttpInfo(appId, loginGoogleRequest); + ApiResponse response = apiInstance.LoginGoogleWithHttpInfo(appId, googleIdTokenObject); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); @@ -166,11 +166,11 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| | **appId** | **string** | | | -| **loginGoogleRequest** | [**LoginGoogleRequest**](LoginGoogleRequest.md) | | | +| **googleIdTokenObject** | [**GoogleIdTokenObject**](GoogleIdTokenObject.md) | | | ### Return type -[**LoginResponse**](LoginResponse.md) +[**PlayerTokenObject**](PlayerTokenObject.md) ### Authorization @@ -193,7 +193,7 @@ No authorization required # **LoginNickname** -> LoginResponse LoginNickname (string appId, LoginNicknameRequest loginNicknameRequest) +> PlayerTokenObject LoginNickname (string appId, NicknameObject nicknameObject) @@ -217,11 +217,11 @@ namespace Example config.BasePath = "https://api.hathora.dev"; var apiInstance = new AuthV1Api(config); var appId = "appId_example"; // string | - var loginNicknameRequest = new LoginNicknameRequest(); // LoginNicknameRequest | + var nicknameObject = new NicknameObject(); // NicknameObject | try { - LoginResponse result = apiInstance.LoginNickname(appId, loginNicknameRequest); + PlayerTokenObject result = apiInstance.LoginNickname(appId, nicknameObject); Debug.WriteLine(result); } catch (ApiException e) @@ -241,7 +241,7 @@ This returns an ApiResponse object which contains the response data, status code ```csharp try { - ApiResponse response = apiInstance.LoginNicknameWithHttpInfo(appId, loginNicknameRequest); + ApiResponse response = apiInstance.LoginNicknameWithHttpInfo(appId, nicknameObject); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); @@ -259,11 +259,11 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| | **appId** | **string** | | | -| **loginNicknameRequest** | [**LoginNicknameRequest**](LoginNicknameRequest.md) | | | +| **nicknameObject** | [**NicknameObject**](NicknameObject.md) | | | ### Return type -[**LoginResponse**](LoginResponse.md) +[**PlayerTokenObject**](PlayerTokenObject.md) ### Authorization diff --git a/csharp/docs/BillingV1Api.md b/csharp/docs/BillingV1Api.md index 3c23173..5b901db 100644 --- a/csharp/docs/BillingV1Api.md +++ b/csharp/docs/BillingV1Api.md @@ -360,6 +360,7 @@ catch (ApiException e) | **200** | Ok | - | | **401** | | - | | **404** | | - | +| **429** | | - | [[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/csharp/docs/Build.md b/csharp/docs/Build.md index 149cd4a..5124a59 100644 --- a/csharp/docs/Build.md +++ b/csharp/docs/Build.md @@ -5,14 +5,14 @@ A build represents a game server artifact and its associated metadata. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**BuildTag** | **string** | Tag to associate an external version with a build. It is accessible via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV1/operation/GetBuildInfo). | [optional] +**BuildTag** | **string** | Tag to associate an external version with a build. It is accessible via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV2/operation/GetBuildInfo). | [optional] **RegionalContainerTags** | [**List<BuildRegionalContainerTagsInner>**](BuildRegionalContainerTagsInner.md) | | -**ImageSize** | **int** | The size (in bytes) of the Docker image built by Hathora. | +**ImageSize** | **long** | The size (in bytes) of the Docker image built by Hathora. | **Status** | **BuildStatus** | | **DeletedAt** | **DateTime?** | When the build was deleted. | -**FinishedAt** | **DateTime?** | When [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) finished executing. | -**StartedAt** | **DateTime?** | When [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) is called. | -**CreatedAt** | **DateTime** | When [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild) is called. | +**FinishedAt** | **DateTime?** | When [`RunBuild()`](https://hathora.dev/api#tag/BuildV2/operation/RunBuild) finished executing. | +**StartedAt** | **DateTime?** | When [`RunBuild()`](https://hathora.dev/api#tag/BuildV2/operation/RunBuild) is called. | +**CreatedAt** | **DateTime** | When [`CreateBuild()`](https://hathora.dev/api#tag/BuildV2/operation/CreateBuild) is called. | **CreatedBy** | **string** | UserId or email address for the user that created the build. | **BuildId** | **int** | System generated id for a build. Increments by 1. | **AppId** | **string** | System generated unique identifier for an application. | diff --git a/csharp/docs/BuildV1Api.md b/csharp/docs/BuildV1Api.md index 7c9b486..61a1425 100644 --- a/csharp/docs/BuildV1Api.md +++ b/csharp/docs/BuildV1Api.md @@ -4,15 +4,15 @@ All URIs are relative to *https://api.hathora.dev* | Method | HTTP request | Description | |--------|--------------|-------------| -| [**CreateBuild**](BuildV1Api.md#createbuild) | **POST** /builds/v1/{appId}/create | | -| [**DeleteBuild**](BuildV1Api.md#deletebuild) | **DELETE** /builds/v1/{appId}/delete/{buildId} | | -| [**GetBuildInfo**](BuildV1Api.md#getbuildinfo) | **GET** /builds/v1/{appId}/info/{buildId} | | -| [**GetBuilds**](BuildV1Api.md#getbuilds) | **GET** /builds/v1/{appId}/list | | -| [**RunBuild**](BuildV1Api.md#runbuild) | **POST** /builds/v1/{appId}/run/{buildId} | | +| [**CreateBuildDeprecated**](BuildV1Api.md#createbuilddeprecated) | **POST** /builds/v1/{appId}/create | | +| [**DeleteBuildDeprecated**](BuildV1Api.md#deletebuilddeprecated) | **DELETE** /builds/v1/{appId}/delete/{buildId} | | +| [**GetBuildInfoDeprecated**](BuildV1Api.md#getbuildinfodeprecated) | **GET** /builds/v1/{appId}/info/{buildId} | | +| [**GetBuildsDeprecated**](BuildV1Api.md#getbuildsdeprecated) | **GET** /builds/v1/{appId}/list | | +| [**RunBuildDeprecated**](BuildV1Api.md#runbuilddeprecated) | **POST** /builds/v1/{appId}/run/{buildId} | | - -# **CreateBuild** -> Build CreateBuild (string appId, CreateBuildParams createBuildParams) + +# **CreateBuildDeprecated** +> Build CreateBuildDeprecated (string appId, CreateBuildParams createBuildParams) @@ -28,7 +28,7 @@ using Hathora.Cloud.Sdk.Model; namespace Example { - public class CreateBuildExample + public class CreateBuildDeprecatedExample { public static void Main() { @@ -43,12 +43,12 @@ namespace Example try { - Build result = apiInstance.CreateBuild(appId, createBuildParams); + Build result = apiInstance.CreateBuildDeprecated(appId, createBuildParams); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling BuildV1Api.CreateBuild: " + e.Message); + Debug.Print("Exception when calling BuildV1Api.CreateBuildDeprecated: " + e.Message); Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } @@ -57,20 +57,20 @@ namespace Example } ``` -#### Using the CreateBuildWithHttpInfo variant +#### Using the CreateBuildDeprecatedWithHttpInfo variant This returns an ApiResponse object which contains the response data, status code and headers. ```csharp try { - ApiResponse response = apiInstance.CreateBuildWithHttpInfo(appId, createBuildParams); + ApiResponse response = apiInstance.CreateBuildDeprecatedWithHttpInfo(appId, createBuildParams); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); } catch (ApiException e) { - Debug.Print("Exception when calling BuildV1Api.CreateBuildWithHttpInfo: " + e.Message); + Debug.Print("Exception when calling BuildV1Api.CreateBuildDeprecatedWithHttpInfo: " + e.Message); Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } @@ -103,13 +103,14 @@ catch (ApiException e) | **201** | | - | | **401** | | - | | **404** | | - | +| **429** | | - | | **500** | | - | [[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) - -# **DeleteBuild** -> void DeleteBuild (string appId, int buildId) + +# **DeleteBuildDeprecated** +> void DeleteBuildDeprecated (string appId, int buildId) @@ -125,7 +126,7 @@ using Hathora.Cloud.Sdk.Model; namespace Example { - public class DeleteBuildExample + public class DeleteBuildDeprecatedExample { public static void Main() { @@ -140,11 +141,11 @@ namespace Example try { - apiInstance.DeleteBuild(appId, buildId); + apiInstance.DeleteBuildDeprecated(appId, buildId); } catch (ApiException e) { - Debug.Print("Exception when calling BuildV1Api.DeleteBuild: " + e.Message); + Debug.Print("Exception when calling BuildV1Api.DeleteBuildDeprecated: " + e.Message); Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } @@ -153,17 +154,17 @@ namespace Example } ``` -#### Using the DeleteBuildWithHttpInfo variant +#### Using the DeleteBuildDeprecatedWithHttpInfo variant This returns an ApiResponse object which contains the response data, status code and headers. ```csharp try { - apiInstance.DeleteBuildWithHttpInfo(appId, buildId); + apiInstance.DeleteBuildDeprecatedWithHttpInfo(appId, buildId); } catch (ApiException e) { - Debug.Print("Exception when calling BuildV1Api.DeleteBuildWithHttpInfo: " + e.Message); + Debug.Print("Exception when calling BuildV1Api.DeleteBuildDeprecatedWithHttpInfo: " + e.Message); Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } @@ -201,9 +202,9 @@ void (empty response body) [[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) - -# **GetBuildInfo** -> Build GetBuildInfo (string appId, int buildId) + +# **GetBuildInfoDeprecated** +> Build GetBuildInfoDeprecated (string appId, int buildId) @@ -219,7 +220,7 @@ using Hathora.Cloud.Sdk.Model; namespace Example { - public class GetBuildInfoExample + public class GetBuildInfoDeprecatedExample { public static void Main() { @@ -234,12 +235,12 @@ namespace Example try { - Build result = apiInstance.GetBuildInfo(appId, buildId); + Build result = apiInstance.GetBuildInfoDeprecated(appId, buildId); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling BuildV1Api.GetBuildInfo: " + e.Message); + Debug.Print("Exception when calling BuildV1Api.GetBuildInfoDeprecated: " + e.Message); Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } @@ -248,20 +249,20 @@ namespace Example } ``` -#### Using the GetBuildInfoWithHttpInfo variant +#### Using the GetBuildInfoDeprecatedWithHttpInfo variant This returns an ApiResponse object which contains the response data, status code and headers. ```csharp try { - ApiResponse response = apiInstance.GetBuildInfoWithHttpInfo(appId, buildId); + ApiResponse response = apiInstance.GetBuildInfoDeprecatedWithHttpInfo(appId, buildId); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); } catch (ApiException e) { - Debug.Print("Exception when calling BuildV1Api.GetBuildInfoWithHttpInfo: " + e.Message); + Debug.Print("Exception when calling BuildV1Api.GetBuildInfoDeprecatedWithHttpInfo: " + e.Message); Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } @@ -297,9 +298,9 @@ catch (ApiException e) [[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) - -# **GetBuilds** -> List<Build> GetBuilds (string appId) + +# **GetBuildsDeprecated** +> List<Build> GetBuildsDeprecated (string appId) @@ -315,7 +316,7 @@ using Hathora.Cloud.Sdk.Model; namespace Example { - public class GetBuildsExample + public class GetBuildsDeprecatedExample { public static void Main() { @@ -329,12 +330,12 @@ namespace Example try { - List result = apiInstance.GetBuilds(appId); + List result = apiInstance.GetBuildsDeprecated(appId); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling BuildV1Api.GetBuilds: " + e.Message); + Debug.Print("Exception when calling BuildV1Api.GetBuildsDeprecated: " + e.Message); Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } @@ -343,20 +344,20 @@ namespace Example } ``` -#### Using the GetBuildsWithHttpInfo variant +#### Using the GetBuildsDeprecatedWithHttpInfo variant This returns an ApiResponse object which contains the response data, status code and headers. ```csharp try { - ApiResponse> response = apiInstance.GetBuildsWithHttpInfo(appId); + ApiResponse> response = apiInstance.GetBuildsDeprecatedWithHttpInfo(appId); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); } catch (ApiException e) { - Debug.Print("Exception when calling BuildV1Api.GetBuildsWithHttpInfo: " + e.Message); + Debug.Print("Exception when calling BuildV1Api.GetBuildsDeprecatedWithHttpInfo: " + e.Message); Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } @@ -391,9 +392,9 @@ catch (ApiException e) [[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) - -# **RunBuild** -> byte[] RunBuild (string appId, int buildId, System.IO.Stream file) + +# **RunBuildDeprecated** +> byte[] RunBuildDeprecated (string appId, int buildId, System.IO.Stream file) @@ -409,7 +410,7 @@ using Hathora.Cloud.Sdk.Model; namespace Example { - public class RunBuildExample + public class RunBuildDeprecatedExample { public static void Main() { @@ -425,12 +426,12 @@ namespace Example try { - byte[] result = apiInstance.RunBuild(appId, buildId, file); + byte[] result = apiInstance.RunBuildDeprecated(appId, buildId, file); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling BuildV1Api.RunBuild: " + e.Message); + Debug.Print("Exception when calling BuildV1Api.RunBuildDeprecated: " + e.Message); Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } @@ -439,20 +440,20 @@ namespace Example } ``` -#### Using the RunBuildWithHttpInfo variant +#### Using the RunBuildDeprecatedWithHttpInfo variant This returns an ApiResponse object which contains the response data, status code and headers. ```csharp try { - ApiResponse response = apiInstance.RunBuildWithHttpInfo(appId, buildId, file); + ApiResponse response = apiInstance.RunBuildDeprecatedWithHttpInfo(appId, buildId, file); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); } catch (ApiException e) { - Debug.Print("Exception when calling BuildV1Api.RunBuildWithHttpInfo: " + e.Message); + Debug.Print("Exception when calling BuildV1Api.RunBuildDeprecatedWithHttpInfo: " + e.Message); Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } @@ -486,6 +487,7 @@ catch (ApiException e) | **200** | Ok | - | | **401** | | - | | **404** | | - | +| **429** | | - | | **500** | | - | [[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/csharp/docs/BuildV2Api.md b/csharp/docs/BuildV2Api.md new file mode 100644 index 0000000..4f611e1 --- /dev/null +++ b/csharp/docs/BuildV2Api.md @@ -0,0 +1,495 @@ +# Hathora.Cloud.Sdk.Api.BuildV2Api + +All URIs are relative to *https://api.hathora.dev* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**CreateBuild**](BuildV2Api.md#createbuild) | **POST** /builds/v2/{appId}/create | | +| [**DeleteBuild**](BuildV2Api.md#deletebuild) | **DELETE** /builds/v2/{appId}/delete/{buildId} | | +| [**GetBuildInfo**](BuildV2Api.md#getbuildinfo) | **GET** /builds/v2/{appId}/info/{buildId} | | +| [**GetBuilds**](BuildV2Api.md#getbuilds) | **GET** /builds/v2/{appId}/list | | +| [**RunBuild**](BuildV2Api.md#runbuild) | **POST** /builds/v2/{appId}/run/{buildId} | | + + +# **CreateBuild** +> Build CreateBuild (string appId, CreateBuildParams createBuildParams) + + + +Creates a new [build](https://hathora.dev/docs/concepts/hathora-entities#build). Responds with a `buildId` that you must pass to [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) to build the game server artifact. You can optionally pass in a `buildTag` to associate an external version with a build. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Client; +using Hathora.Cloud.Sdk.Model; + +namespace Example +{ + public class CreateBuildExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.hathora.dev"; + // Configure Bearer token for authorization: hathoraDevToken + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new BuildV2Api(config); + var appId = "appId_example"; // string | + var createBuildParams = new CreateBuildParams(); // CreateBuildParams | + + try + { + Build result = apiInstance.CreateBuild(appId, createBuildParams); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling BuildV2Api.CreateBuild: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the CreateBuildWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.CreateBuildWithHttpInfo(appId, createBuildParams); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling BuildV2Api.CreateBuildWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **appId** | **string** | | | +| **createBuildParams** | [**CreateBuildParams**](CreateBuildParams.md) | | | + +### Return type + +[**Build**](Build.md) + +### Authorization + +[hathoraDevToken](../README.md#hathoraDevToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | | - | +| **401** | | - | +| **404** | | - | +| **429** | | - | +| **500** | | - | + +[[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) + + +# **DeleteBuild** +> void DeleteBuild (string appId, int buildId) + + + +Delete a [build](https://hathora.dev/docs/concepts/hathora-entities#build). All associated metadata is deleted. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Client; +using Hathora.Cloud.Sdk.Model; + +namespace Example +{ + public class DeleteBuildExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.hathora.dev"; + // Configure Bearer token for authorization: hathoraDevToken + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new BuildV2Api(config); + var appId = "appId_example"; // string | + var buildId = 56; // int | + + try + { + apiInstance.DeleteBuild(appId, buildId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling BuildV2Api.DeleteBuild: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DeleteBuildWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + apiInstance.DeleteBuildWithHttpInfo(appId, buildId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling BuildV2Api.DeleteBuildWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **appId** | **string** | | | +| **buildId** | **int** | | | + +### Return type + +void (empty response body) + +### Authorization + +[hathoraDevToken](../README.md#hathoraDevToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No content | - | +| **401** | | - | +| **404** | | - | +| **422** | | - | +| **429** | | - | +| **500** | | - | + +[[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) + + +# **GetBuildInfo** +> Build GetBuildInfo (string appId, int buildId) + + + +Get details for a [build](https://hathora.dev/docs/concepts/hathora-entities#build). + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Client; +using Hathora.Cloud.Sdk.Model; + +namespace Example +{ + public class GetBuildInfoExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.hathora.dev"; + // Configure Bearer token for authorization: hathoraDevToken + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new BuildV2Api(config); + var appId = "appId_example"; // string | + var buildId = 56; // int | + + try + { + Build result = apiInstance.GetBuildInfo(appId, buildId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling BuildV2Api.GetBuildInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetBuildInfoWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.GetBuildInfoWithHttpInfo(appId, buildId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling BuildV2Api.GetBuildInfoWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **appId** | **string** | | | +| **buildId** | **int** | | | + +### Return type + +[**Build**](Build.md) + +### Authorization + +[hathoraDevToken](../README.md#hathoraDevToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | +| **401** | | - | +| **404** | | - | + +[[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) + + +# **GetBuilds** +> List<Build> GetBuilds (string appId) + + + +Returns an array of [builds](https://hathora.dev/docs/concepts/hathora-entities#build) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Client; +using Hathora.Cloud.Sdk.Model; + +namespace Example +{ + public class GetBuildsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.hathora.dev"; + // Configure Bearer token for authorization: hathoraDevToken + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new BuildV2Api(config); + var appId = "appId_example"; // string | + + try + { + List result = apiInstance.GetBuilds(appId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling BuildV2Api.GetBuilds: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetBuildsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse> response = apiInstance.GetBuildsWithHttpInfo(appId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling BuildV2Api.GetBuildsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **appId** | **string** | | | + +### Return type + +[**List<Build>**](Build.md) + +### Authorization + +[hathoraDevToken](../README.md#hathoraDevToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | +| **401** | | - | +| **404** | | - | + +[[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) + + +# **RunBuild** +> System.IO.Stream RunBuild (string appId, int buildId, System.IO.Stream file) + + + +Builds a game server artifact from a tarball you provide. Pass in the `buildId` generated from [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild). + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Client; +using Hathora.Cloud.Sdk.Model; + +namespace Example +{ + public class RunBuildExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.hathora.dev"; + // Configure Bearer token for authorization: hathoraDevToken + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new BuildV2Api(config); + var appId = "appId_example"; // string | + var buildId = 56; // int | + var file = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | + + try + { + System.IO.Stream result = apiInstance.RunBuild(appId, buildId, file); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling BuildV2Api.RunBuild: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the RunBuildWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.RunBuildWithHttpInfo(appId, buildId, file); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling BuildV2Api.RunBuildWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **appId** | **string** | | | +| **buildId** | **int** | | | +| **file** | **System.IO.Stream****System.IO.Stream** | | | + +### Return type + +**System.IO.Stream** + +### Authorization + +[hathoraDevToken](../README.md#hathoraDevToken) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/octet-stream, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | +| **401** | | - | +| **404** | | - | +| **429** | | - | +| **500** | | - | + +[[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/csharp/docs/ConnectionInfoV2.md b/csharp/docs/ConnectionInfoV2.md index 4bf3856..8d41b66 100644 --- a/csharp/docs/ConnectionInfoV2.md +++ b/csharp/docs/ConnectionInfoV2.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **AdditionalExposedPorts** | [**List<ExposedPort>**](ExposedPort.md) | | **ExposedPort** | [**ExposedPort**](ExposedPort.md) | | [optional] -**Status** | **string** | `exposedPort` will only be available when the `status` of a room is \"active\". | +**Status** | **RoomReadyStatus** | | **RoomId** | **string** | Unique identifier to a game session or match. Use the default system generated ID or overwrite it with your own. Note: error will be returned if `roomId` is not globally unique. | [[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/csharp/docs/CreateBuildParams.md b/csharp/docs/CreateBuildParams.md index 1639bdd..965065c 100644 --- a/csharp/docs/CreateBuildParams.md +++ b/csharp/docs/CreateBuildParams.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**BuildTag** | **string** | Tag to associate an external version with a build. It is accessible via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV1/operation/GetBuildInfo). | [optional] +**BuildTag** | **string** | Tag to associate an external version with a build. It is accessible via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV2/operation/GetBuildInfo). | [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/csharp/docs/CreateUserInvite.md b/csharp/docs/CreateUserInvite.md new file mode 100644 index 0000000..413c546 --- /dev/null +++ b/csharp/docs/CreateUserInvite.md @@ -0,0 +1,10 @@ +# Hathora.Cloud.Sdk.Model.CreateUserInvite + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**UserEmail** | **string** | | + +[[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/csharp/docs/Deployment.md b/csharp/docs/Deployment.md index c0e2631..f36569d 100644 --- a/csharp/docs/Deployment.md +++ b/csharp/docs/Deployment.md @@ -6,7 +6,7 @@ Deployment is a versioned configuration for a build that describes runtime behav Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **IdleTimeoutEnabled** | **bool** | Option to shut down processes that have had no new connections or rooms for five minutes. | [optional] [default to true] -**Env** | [**List<DeploymentEnvInner>**](DeploymentEnvInner.md) | The environment variable that our process will have access to at runtime. | +**Env** | [**List<DeploymentV2EnvInner>**](DeploymentV2EnvInner.md) | The environment variable that our process will have access to at runtime. | **RoomsPerProcess** | **int** | Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. | **PlanName** | **PlanName** | | **AdditionalContainerPorts** | [**List<ContainerPort>**](ContainerPort.md) | Additional ports your server listens on. | diff --git a/csharp/docs/DeploymentConfig.md b/csharp/docs/DeploymentConfig.md index d649c6c..38c8b99 100644 --- a/csharp/docs/DeploymentConfig.md +++ b/csharp/docs/DeploymentConfig.md @@ -6,7 +6,7 @@ User specified deployment configuration for your application at runtime. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **IdleTimeoutEnabled** | **bool** | Option to shut down processes that have had no new connections or rooms for five minutes. | [optional] [default to true] -**Env** | [**List<DeploymentEnvInner>**](DeploymentEnvInner.md) | The environment variable that our process will have access to at runtime. | +**Env** | [**List<DeploymentV2EnvInner>**](DeploymentV2EnvInner.md) | The environment variable that our process will have access to at runtime. | **RoomsPerProcess** | **int** | Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. | **PlanName** | **PlanName** | | **AdditionalContainerPorts** | [**List<ContainerPort>**](ContainerPort.md) | Additional ports your server listens on. | [optional] diff --git a/csharp/docs/DeploymentConfigV2.md b/csharp/docs/DeploymentConfigV2.md new file mode 100644 index 0000000..c3a36e4 --- /dev/null +++ b/csharp/docs/DeploymentConfigV2.md @@ -0,0 +1,17 @@ +# Hathora.Cloud.Sdk.Model.DeploymentConfigV2 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IdleTimeoutEnabled** | **bool** | Option to shut down processes that have had no new connections or rooms for five minutes. | +**Env** | [**List<DeploymentV2EnvInner>**](DeploymentV2EnvInner.md) | The environment variable that our process will have access to at runtime. | +**RoomsPerProcess** | **int** | Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. | +**AdditionalContainerPorts** | [**List<ContainerPort>**](ContainerPort.md) | Additional ports your server listens on. | [optional] +**TransportType** | **TransportType** | | +**ContainerPort** | **int** | Default port the server listens on. | +**RequestedMemoryMB** | **double** | The amount of memory allocated to your process. | +**RequestedCPU** | **double** | The number of cores allocated to your process. | + +[[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/csharp/docs/DeploymentV1Api.md b/csharp/docs/DeploymentV1Api.md index 9c05e2f..551dffa 100644 --- a/csharp/docs/DeploymentV1Api.md +++ b/csharp/docs/DeploymentV1Api.md @@ -4,14 +4,14 @@ All URIs are relative to *https://api.hathora.dev* | Method | HTTP request | Description | |--------|--------------|-------------| -| [**CreateDeployment**](DeploymentV1Api.md#createdeployment) | **POST** /deployments/v1/{appId}/create/{buildId} | | -| [**GetDeploymentInfo**](DeploymentV1Api.md#getdeploymentinfo) | **GET** /deployments/v1/{appId}/info/{deploymentId} | | -| [**GetDeployments**](DeploymentV1Api.md#getdeployments) | **GET** /deployments/v1/{appId}/list | | -| [**GetLatestDeployment**](DeploymentV1Api.md#getlatestdeployment) | **GET** /deployments/v1/{appId}/latest | | +| [**CreateDeploymentDeprecated**](DeploymentV1Api.md#createdeploymentdeprecated) | **POST** /deployments/v1/{appId}/create/{buildId} | | +| [**GetDeploymentInfoDeprecated**](DeploymentV1Api.md#getdeploymentinfodeprecated) | **GET** /deployments/v1/{appId}/info/{deploymentId} | | +| [**GetDeploymentsDeprecated**](DeploymentV1Api.md#getdeploymentsdeprecated) | **GET** /deployments/v1/{appId}/list | | +| [**GetLatestDeploymentDeprecated**](DeploymentV1Api.md#getlatestdeploymentdeprecated) | **GET** /deployments/v1/{appId}/latest | | - -# **CreateDeployment** -> Deployment CreateDeployment (string appId, int buildId, DeploymentConfig deploymentConfig) + +# **CreateDeploymentDeprecated** +> Deployment CreateDeploymentDeprecated (string appId, int buildId, DeploymentConfig deploymentConfig) @@ -27,7 +27,7 @@ using Hathora.Cloud.Sdk.Model; namespace Example { - public class CreateDeploymentExample + public class CreateDeploymentDeprecatedExample { public static void Main() { @@ -43,12 +43,12 @@ namespace Example try { - Deployment result = apiInstance.CreateDeployment(appId, buildId, deploymentConfig); + Deployment result = apiInstance.CreateDeploymentDeprecated(appId, buildId, deploymentConfig); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DeploymentV1Api.CreateDeployment: " + e.Message); + Debug.Print("Exception when calling DeploymentV1Api.CreateDeploymentDeprecated: " + e.Message); Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } @@ -57,20 +57,20 @@ namespace Example } ``` -#### Using the CreateDeploymentWithHttpInfo variant +#### Using the CreateDeploymentDeprecatedWithHttpInfo variant This returns an ApiResponse object which contains the response data, status code and headers. ```csharp try { - ApiResponse response = apiInstance.CreateDeploymentWithHttpInfo(appId, buildId, deploymentConfig); + ApiResponse response = apiInstance.CreateDeploymentDeprecatedWithHttpInfo(appId, buildId, deploymentConfig); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); } catch (ApiException e) { - Debug.Print("Exception when calling DeploymentV1Api.CreateDeploymentWithHttpInfo: " + e.Message); + Debug.Print("Exception when calling DeploymentV1Api.CreateDeploymentDeprecatedWithHttpInfo: " + e.Message); Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } @@ -105,14 +105,14 @@ catch (ApiException e) | **400** | | - | | **401** | | - | | **404** | | - | -| **422** | | - | +| **429** | | - | | **500** | | - | [[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) - -# **GetDeploymentInfo** -> Deployment GetDeploymentInfo (string appId, int deploymentId) + +# **GetDeploymentInfoDeprecated** +> Deployment GetDeploymentInfoDeprecated (string appId, int deploymentId) @@ -128,7 +128,7 @@ using Hathora.Cloud.Sdk.Model; namespace Example { - public class GetDeploymentInfoExample + public class GetDeploymentInfoDeprecatedExample { public static void Main() { @@ -143,12 +143,12 @@ namespace Example try { - Deployment result = apiInstance.GetDeploymentInfo(appId, deploymentId); + Deployment result = apiInstance.GetDeploymentInfoDeprecated(appId, deploymentId); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DeploymentV1Api.GetDeploymentInfo: " + e.Message); + Debug.Print("Exception when calling DeploymentV1Api.GetDeploymentInfoDeprecated: " + e.Message); Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } @@ -157,20 +157,20 @@ namespace Example } ``` -#### Using the GetDeploymentInfoWithHttpInfo variant +#### Using the GetDeploymentInfoDeprecatedWithHttpInfo variant This returns an ApiResponse object which contains the response data, status code and headers. ```csharp try { - ApiResponse response = apiInstance.GetDeploymentInfoWithHttpInfo(appId, deploymentId); + ApiResponse response = apiInstance.GetDeploymentInfoDeprecatedWithHttpInfo(appId, deploymentId); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); } catch (ApiException e) { - Debug.Print("Exception when calling DeploymentV1Api.GetDeploymentInfoWithHttpInfo: " + e.Message); + Debug.Print("Exception when calling DeploymentV1Api.GetDeploymentInfoDeprecatedWithHttpInfo: " + e.Message); Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } @@ -206,9 +206,9 @@ catch (ApiException e) [[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) - -# **GetDeployments** -> List<Deployment> GetDeployments (string appId) + +# **GetDeploymentsDeprecated** +> List<Deployment> GetDeploymentsDeprecated (string appId) @@ -224,7 +224,7 @@ using Hathora.Cloud.Sdk.Model; namespace Example { - public class GetDeploymentsExample + public class GetDeploymentsDeprecatedExample { public static void Main() { @@ -238,12 +238,12 @@ namespace Example try { - List result = apiInstance.GetDeployments(appId); + List result = apiInstance.GetDeploymentsDeprecated(appId); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DeploymentV1Api.GetDeployments: " + e.Message); + Debug.Print("Exception when calling DeploymentV1Api.GetDeploymentsDeprecated: " + e.Message); Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } @@ -252,20 +252,20 @@ namespace Example } ``` -#### Using the GetDeploymentsWithHttpInfo variant +#### Using the GetDeploymentsDeprecatedWithHttpInfo variant This returns an ApiResponse object which contains the response data, status code and headers. ```csharp try { - ApiResponse> response = apiInstance.GetDeploymentsWithHttpInfo(appId); + ApiResponse> response = apiInstance.GetDeploymentsDeprecatedWithHttpInfo(appId); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); } catch (ApiException e) { - Debug.Print("Exception when calling DeploymentV1Api.GetDeploymentsWithHttpInfo: " + e.Message); + Debug.Print("Exception when calling DeploymentV1Api.GetDeploymentsDeprecatedWithHttpInfo: " + e.Message); Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } @@ -300,9 +300,9 @@ catch (ApiException e) [[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) - -# **GetLatestDeployment** -> Deployment GetLatestDeployment (string appId) + +# **GetLatestDeploymentDeprecated** +> Deployment GetLatestDeploymentDeprecated (string appId) @@ -318,7 +318,7 @@ using Hathora.Cloud.Sdk.Model; namespace Example { - public class GetLatestDeploymentExample + public class GetLatestDeploymentDeprecatedExample { public static void Main() { @@ -332,12 +332,12 @@ namespace Example try { - Deployment result = apiInstance.GetLatestDeployment(appId); + Deployment result = apiInstance.GetLatestDeploymentDeprecated(appId); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DeploymentV1Api.GetLatestDeployment: " + e.Message); + Debug.Print("Exception when calling DeploymentV1Api.GetLatestDeploymentDeprecated: " + e.Message); Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } @@ -346,20 +346,20 @@ namespace Example } ``` -#### Using the GetLatestDeploymentWithHttpInfo variant +#### Using the GetLatestDeploymentDeprecatedWithHttpInfo variant This returns an ApiResponse object which contains the response data, status code and headers. ```csharp try { - ApiResponse response = apiInstance.GetLatestDeploymentWithHttpInfo(appId); + ApiResponse response = apiInstance.GetLatestDeploymentDeprecatedWithHttpInfo(appId); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); } catch (ApiException e) { - Debug.Print("Exception when calling DeploymentV1Api.GetLatestDeploymentWithHttpInfo: " + e.Message); + Debug.Print("Exception when calling DeploymentV1Api.GetLatestDeploymentDeprecatedWithHttpInfo: " + e.Message); Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } diff --git a/csharp/docs/DeploymentV2.md b/csharp/docs/DeploymentV2.md new file mode 100644 index 0000000..db9d3c6 --- /dev/null +++ b/csharp/docs/DeploymentV2.md @@ -0,0 +1,21 @@ +# Hathora.Cloud.Sdk.Model.DeploymentV2 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IdleTimeoutEnabled** | **bool** | Option to shut down processes that have had no new connections or rooms for five minutes. | +**Env** | [**List<DeploymentV2EnvInner>**](DeploymentV2EnvInner.md) | The environment variable that our process will have access to at runtime. | +**RoomsPerProcess** | **int** | Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. | +**AdditionalContainerPorts** | [**List<ContainerPort>**](ContainerPort.md) | Additional ports your server listens on. | +**DefaultContainerPort** | [**ContainerPort**](ContainerPort.md) | | +**CreatedAt** | **DateTime** | When the deployment was created. | +**CreatedBy** | **string** | UserId or email address for the user that created the deployment. | +**RequestedMemoryMB** | **double** | The amount of memory allocated to your process. | +**RequestedCPU** | **double** | The number of cores allocated to your process. | +**DeploymentId** | **int** | System generated id for a deployment. Increments by 1. | +**BuildId** | **int** | System generated id for a build. Increments by 1. | +**AppId** | **string** | System generated unique identifier for an application. | + +[[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/csharp/docs/DeploymentV2Api.md b/csharp/docs/DeploymentV2Api.md new file mode 100644 index 0000000..5301bcf --- /dev/null +++ b/csharp/docs/DeploymentV2Api.md @@ -0,0 +1,396 @@ +# Hathora.Cloud.Sdk.Api.DeploymentV2Api + +All URIs are relative to *https://api.hathora.dev* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**CreateDeployment**](DeploymentV2Api.md#createdeployment) | **POST** /deployments/v2/{appId}/create/{buildId} | | +| [**GetDeploymentInfo**](DeploymentV2Api.md#getdeploymentinfo) | **GET** /deployments/v2/{appId}/info/{deploymentId} | | +| [**GetDeployments**](DeploymentV2Api.md#getdeployments) | **GET** /deployments/v2/{appId}/list | | +| [**GetLatestDeployment**](DeploymentV2Api.md#getlatestdeployment) | **GET** /deployments/v2/{appId}/latest | | + + +# **CreateDeployment** +> DeploymentV2 CreateDeployment (string appId, int buildId, DeploymentConfigV2 deploymentConfigV2) + + + +Create a new [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). Creating a new deployment means all new rooms created will use the latest deployment configuration, but existing games in progress will not be affected. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Client; +using Hathora.Cloud.Sdk.Model; + +namespace Example +{ + public class CreateDeploymentExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.hathora.dev"; + // Configure Bearer token for authorization: hathoraDevToken + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new DeploymentV2Api(config); + var appId = "appId_example"; // string | + var buildId = 56; // int | + var deploymentConfigV2 = new DeploymentConfigV2(); // DeploymentConfigV2 | + + try + { + DeploymentV2 result = apiInstance.CreateDeployment(appId, buildId, deploymentConfigV2); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling DeploymentV2Api.CreateDeployment: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the CreateDeploymentWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.CreateDeploymentWithHttpInfo(appId, buildId, deploymentConfigV2); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DeploymentV2Api.CreateDeploymentWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **appId** | **string** | | | +| **buildId** | **int** | | | +| **deploymentConfigV2** | [**DeploymentConfigV2**](DeploymentConfigV2.md) | | | + +### Return type + +[**DeploymentV2**](DeploymentV2.md) + +### Authorization + +[hathoraDevToken](../README.md#hathoraDevToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | | - | +| **400** | | - | +| **401** | | - | +| **404** | | - | +| **429** | | - | +| **500** | | - | + +[[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) + + +# **GetDeploymentInfo** +> DeploymentV2 GetDeploymentInfo (string appId, int deploymentId) + + + +Get details for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Client; +using Hathora.Cloud.Sdk.Model; + +namespace Example +{ + public class GetDeploymentInfoExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.hathora.dev"; + // Configure Bearer token for authorization: hathoraDevToken + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new DeploymentV2Api(config); + var appId = "appId_example"; // string | + var deploymentId = 56; // int | + + try + { + DeploymentV2 result = apiInstance.GetDeploymentInfo(appId, deploymentId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling DeploymentV2Api.GetDeploymentInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetDeploymentInfoWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.GetDeploymentInfoWithHttpInfo(appId, deploymentId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DeploymentV2Api.GetDeploymentInfoWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **appId** | **string** | | | +| **deploymentId** | **int** | | | + +### Return type + +[**DeploymentV2**](DeploymentV2.md) + +### Authorization + +[hathoraDevToken](../README.md#hathoraDevToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | +| **401** | | - | +| **404** | | - | + +[[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) + + +# **GetDeployments** +> List<DeploymentV2> GetDeployments (string appId) + + + +Returns an array of [deployments](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Client; +using Hathora.Cloud.Sdk.Model; + +namespace Example +{ + public class GetDeploymentsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.hathora.dev"; + // Configure Bearer token for authorization: hathoraDevToken + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new DeploymentV2Api(config); + var appId = "appId_example"; // string | + + try + { + List result = apiInstance.GetDeployments(appId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling DeploymentV2Api.GetDeployments: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetDeploymentsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse> response = apiInstance.GetDeploymentsWithHttpInfo(appId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DeploymentV2Api.GetDeploymentsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **appId** | **string** | | | + +### Return type + +[**List<DeploymentV2>**](DeploymentV2.md) + +### Authorization + +[hathoraDevToken](../README.md#hathoraDevToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | +| **401** | | - | +| **404** | | - | + +[[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) + + +# **GetLatestDeployment** +> DeploymentV2 GetLatestDeployment (string appId) + + + +Get the latest [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Client; +using Hathora.Cloud.Sdk.Model; + +namespace Example +{ + public class GetLatestDeploymentExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.hathora.dev"; + // Configure Bearer token for authorization: hathoraDevToken + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new DeploymentV2Api(config); + var appId = "appId_example"; // string | + + try + { + DeploymentV2 result = apiInstance.GetLatestDeployment(appId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling DeploymentV2Api.GetLatestDeployment: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetLatestDeploymentWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.GetLatestDeploymentWithHttpInfo(appId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DeploymentV2Api.GetLatestDeploymentWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **appId** | **string** | | | + +### Return type + +[**DeploymentV2**](DeploymentV2.md) + +### Authorization + +[hathoraDevToken](../README.md#hathoraDevToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | +| **401** | | - | +| **404** | | - | + +[[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/csharp/docs/DeploymentV2EnvInner.md b/csharp/docs/DeploymentV2EnvInner.md new file mode 100644 index 0000000..eade502 --- /dev/null +++ b/csharp/docs/DeploymentV2EnvInner.md @@ -0,0 +1,11 @@ +# Hathora.Cloud.Sdk.Model.DeploymentV2EnvInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**Name** | **string** | | + +[[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/csharp/docs/DiscoveryV1Api.md b/csharp/docs/DiscoveryV1Api.md index 0515af1..3bd2261 100644 --- a/csharp/docs/DiscoveryV1Api.md +++ b/csharp/docs/DiscoveryV1Api.md @@ -4,15 +4,15 @@ All URIs are relative to *https://api.hathora.dev* | Method | HTTP request | Description | |--------|--------------|-------------| -| [**GetPingServiceEndpoints**](DiscoveryV1Api.md#getpingserviceendpoints) | **GET** /discovery/v1/ping | | +| [**GetPingServiceEndpointsDeprecated**](DiscoveryV1Api.md#getpingserviceendpointsdeprecated) | **GET** /discovery/v1/ping | | - -# **GetPingServiceEndpoints** -> List<DiscoveryResponseInner> GetPingServiceEndpoints () + +# **GetPingServiceEndpointsDeprecated** +> List<PingEndpointsInner> GetPingServiceEndpointsDeprecated () -Returns an array of all regions with a host and port that a client can directly ping. Open a websocket connection to `wss://:/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. +Returns an array of V1 regions with a host and port that a client can directly ping. Open a websocket connection to `wss://:/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. ### Example ```csharp @@ -24,7 +24,7 @@ using Hathora.Cloud.Sdk.Model; namespace Example { - public class GetPingServiceEndpointsExample + public class GetPingServiceEndpointsDeprecatedExample { public static void Main() { @@ -34,12 +34,12 @@ namespace Example try { - List result = apiInstance.GetPingServiceEndpoints(); + List result = apiInstance.GetPingServiceEndpointsDeprecated(); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DiscoveryV1Api.GetPingServiceEndpoints: " + e.Message); + Debug.Print("Exception when calling DiscoveryV1Api.GetPingServiceEndpointsDeprecated: " + e.Message); Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } @@ -48,20 +48,20 @@ namespace Example } ``` -#### Using the GetPingServiceEndpointsWithHttpInfo variant +#### Using the GetPingServiceEndpointsDeprecatedWithHttpInfo variant This returns an ApiResponse object which contains the response data, status code and headers. ```csharp try { - ApiResponse> response = apiInstance.GetPingServiceEndpointsWithHttpInfo(); + ApiResponse> response = apiInstance.GetPingServiceEndpointsDeprecatedWithHttpInfo(); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); } catch (ApiException e) { - Debug.Print("Exception when calling DiscoveryV1Api.GetPingServiceEndpointsWithHttpInfo: " + e.Message); + Debug.Print("Exception when calling DiscoveryV1Api.GetPingServiceEndpointsDeprecatedWithHttpInfo: " + e.Message); Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } @@ -71,7 +71,7 @@ catch (ApiException e) This endpoint does not need any parameter. ### Return type -[**List<DiscoveryResponseInner>**](DiscoveryResponseInner.md) +[**List<PingEndpointsInner>**](PingEndpointsInner.md) ### Authorization diff --git a/csharp/docs/DiscoveryV2Api.md b/csharp/docs/DiscoveryV2Api.md new file mode 100644 index 0000000..3320126 --- /dev/null +++ b/csharp/docs/DiscoveryV2Api.md @@ -0,0 +1,92 @@ +# Hathora.Cloud.Sdk.Api.DiscoveryV2Api + +All URIs are relative to *https://api.hathora.dev* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**GetPingServiceEndpoints**](DiscoveryV2Api.md#getpingserviceendpoints) | **GET** /discovery/v2/ping | | + + +# **GetPingServiceEndpoints** +> List<PingEndpointsInner> GetPingServiceEndpoints () + + + +Returns an array of all regions with a host and port that a client can directly ping. Open a websocket connection to `wss://:/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Client; +using Hathora.Cloud.Sdk.Model; + +namespace Example +{ + public class GetPingServiceEndpointsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.hathora.dev"; + var apiInstance = new DiscoveryV2Api(config); + + try + { + List result = apiInstance.GetPingServiceEndpoints(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling DiscoveryV2Api.GetPingServiceEndpoints: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetPingServiceEndpointsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse> response = apiInstance.GetPingServiceEndpointsWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DiscoveryV2Api.GetPingServiceEndpointsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +[**List<PingEndpointsInner>**](PingEndpointsInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | + +[[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/csharp/docs/GoogleIdTokenObject.md b/csharp/docs/GoogleIdTokenObject.md new file mode 100644 index 0000000..4493784 --- /dev/null +++ b/csharp/docs/GoogleIdTokenObject.md @@ -0,0 +1,10 @@ +# Hathora.Cloud.Sdk.Model.GoogleIdTokenObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IdToken** | **string** | A Google-signed OIDC ID token representing a player's authenticated identity. Learn how to get an `idToken` [here](https://cloud.google.com/docs/authentication/get-id-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/csharp/docs/InviteStatusAccepted.md b/csharp/docs/InviteStatusAccepted.md new file mode 100644 index 0000000..43d46e5 --- /dev/null +++ b/csharp/docs/InviteStatusAccepted.md @@ -0,0 +1,11 @@ +# Hathora.Cloud.Sdk.Model.InviteStatusAccepted + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**UserId** | **string** | System generated unique identifier for a user. Not guaranteed to have a specific format. | +**Type** | **string** | | + +[[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/csharp/docs/InviteStatusPending.md b/csharp/docs/InviteStatusPending.md new file mode 100644 index 0000000..f587fe1 --- /dev/null +++ b/csharp/docs/InviteStatusPending.md @@ -0,0 +1,10 @@ +# Hathora.Cloud.Sdk.Model.InviteStatusPending + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | + +[[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/csharp/docs/InviteStatusRejected.md b/csharp/docs/InviteStatusRejected.md new file mode 100644 index 0000000..531f49c --- /dev/null +++ b/csharp/docs/InviteStatusRejected.md @@ -0,0 +1,11 @@ +# Hathora.Cloud.Sdk.Model.InviteStatusRejected + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**UserId** | **string** | System generated unique identifier for a user. Not guaranteed to have a specific format. | +**Type** | **string** | | + +[[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/csharp/docs/InviteStatusRescinded.md b/csharp/docs/InviteStatusRescinded.md new file mode 100644 index 0000000..38bda02 --- /dev/null +++ b/csharp/docs/InviteStatusRescinded.md @@ -0,0 +1,12 @@ +# Hathora.Cloud.Sdk.Model.InviteStatusRescinded + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RescindedBy** | **string** | System generated unique identifier for a user. Not guaranteed to have a specific format. | +**UserId** | **string** | System generated unique identifier for a user. Not guaranteed to have a specific format. | [optional] +**Type** | **string** | | + +[[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/csharp/docs/LobbyV2Api.md b/csharp/docs/LobbyV2Api.md index 953e591..c9111a7 100644 --- a/csharp/docs/LobbyV2Api.md +++ b/csharp/docs/LobbyV2Api.md @@ -697,6 +697,7 @@ catch (ApiException e) | **401** | | - | | **404** | | - | | **422** | | - | +| **429** | | - | [[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/csharp/docs/LogV1Api.md b/csharp/docs/LogV1Api.md index 3a38a98..7b9c312 100644 --- a/csharp/docs/LogV1Api.md +++ b/csharp/docs/LogV1Api.md @@ -11,7 +11,7 @@ All URIs are relative to *https://api.hathora.dev* # **DownloadLogForProcess** -> byte[] DownloadLogForProcess (string appId, string processId) +> System.IO.Stream DownloadLogForProcess (string appId, string processId) @@ -42,7 +42,7 @@ namespace Example try { - byte[] result = apiInstance.DownloadLogForProcess(appId, processId); + System.IO.Stream result = apiInstance.DownloadLogForProcess(appId, processId); Debug.WriteLine(result); } catch (ApiException e) @@ -62,7 +62,7 @@ This returns an ApiResponse object which contains the response data, status code ```csharp try { - ApiResponse response = apiInstance.DownloadLogForProcessWithHttpInfo(appId, processId); + ApiResponse response = apiInstance.DownloadLogForProcessWithHttpInfo(appId, processId); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); @@ -84,7 +84,7 @@ catch (ApiException e) ### Return type -**byte[]** +**System.IO.Stream** ### Authorization @@ -93,7 +93,7 @@ catch (ApiException e) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: text/plain, application/json + - **Accept**: application/octet-stream, application/json ### HTTP response details @@ -109,7 +109,7 @@ catch (ApiException e) # **GetLogsForApp** -> byte[] GetLogsForApp (string appId, bool? follow = null, int? tailLines = null, Region? region = null) +> System.IO.Stream GetLogsForApp (string appId, bool? follow = null, int? tailLines = null, Region? region = null) @@ -142,7 +142,7 @@ namespace Example try { - byte[] result = apiInstance.GetLogsForApp(appId, follow, tailLines, region); + System.IO.Stream result = apiInstance.GetLogsForApp(appId, follow, tailLines, region); Debug.WriteLine(result); } catch (ApiException e) @@ -162,7 +162,7 @@ This returns an ApiResponse object which contains the response data, status code ```csharp try { - ApiResponse response = apiInstance.GetLogsForAppWithHttpInfo(appId, follow, tailLines, region); + ApiResponse response = apiInstance.GetLogsForAppWithHttpInfo(appId, follow, tailLines, region); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); @@ -186,7 +186,7 @@ catch (ApiException e) ### Return type -**byte[]** +**System.IO.Stream** ### Authorization @@ -195,7 +195,7 @@ catch (ApiException e) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: text/plain, application/json + - **Accept**: application/octet-stream, application/json ### HTTP response details @@ -209,7 +209,7 @@ catch (ApiException e) # **GetLogsForDeployment** -> byte[] GetLogsForDeployment (string appId, int deploymentId, bool? follow = null, int? tailLines = null) +> System.IO.Stream GetLogsForDeployment (string appId, int deploymentId, bool? follow = null, int? tailLines = null) @@ -242,7 +242,7 @@ namespace Example try { - byte[] result = apiInstance.GetLogsForDeployment(appId, deploymentId, follow, tailLines); + System.IO.Stream result = apiInstance.GetLogsForDeployment(appId, deploymentId, follow, tailLines); Debug.WriteLine(result); } catch (ApiException e) @@ -262,7 +262,7 @@ This returns an ApiResponse object which contains the response data, status code ```csharp try { - ApiResponse response = apiInstance.GetLogsForDeploymentWithHttpInfo(appId, deploymentId, follow, tailLines); + ApiResponse response = apiInstance.GetLogsForDeploymentWithHttpInfo(appId, deploymentId, follow, tailLines); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); @@ -286,7 +286,7 @@ catch (ApiException e) ### Return type -**byte[]** +**System.IO.Stream** ### Authorization @@ -295,7 +295,7 @@ catch (ApiException e) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: text/plain, application/json + - **Accept**: application/octet-stream, application/json ### HTTP response details @@ -309,7 +309,7 @@ catch (ApiException e) # **GetLogsForProcess** -> byte[] GetLogsForProcess (string appId, string processId, bool? follow = null, int? tailLines = null) +> System.IO.Stream GetLogsForProcess (string appId, string processId, bool? follow = null, int? tailLines = null) @@ -342,7 +342,7 @@ namespace Example try { - byte[] result = apiInstance.GetLogsForProcess(appId, processId, follow, tailLines); + System.IO.Stream result = apiInstance.GetLogsForProcess(appId, processId, follow, tailLines); Debug.WriteLine(result); } catch (ApiException e) @@ -362,7 +362,7 @@ This returns an ApiResponse object which contains the response data, status code ```csharp try { - ApiResponse response = apiInstance.GetLogsForProcessWithHttpInfo(appId, processId, follow, tailLines); + ApiResponse response = apiInstance.GetLogsForProcessWithHttpInfo(appId, processId, follow, tailLines); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); @@ -386,7 +386,7 @@ catch (ApiException e) ### Return type -**byte[]** +**System.IO.Stream** ### Authorization @@ -395,7 +395,7 @@ catch (ApiException e) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: text/plain, application/json + - **Accept**: application/octet-stream, application/json ### HTTP response details diff --git a/csharp/docs/ManagementV1Api.md b/csharp/docs/ManagementV1Api.md index 52c1e10..8e4d009 100644 --- a/csharp/docs/ManagementV1Api.md +++ b/csharp/docs/ManagementV1Api.md @@ -8,7 +8,7 @@ All URIs are relative to *https://api.hathora.dev* # **SendVerificationEmail** -> VerificationEmailResponse SendVerificationEmail (VerificationEmailRequest verificationEmailRequest) +> VerificationEmailSuccess SendVerificationEmail (VerificationEmailRequest verificationEmailRequest) @@ -33,7 +33,7 @@ namespace Example try { - VerificationEmailResponse result = apiInstance.SendVerificationEmail(verificationEmailRequest); + VerificationEmailSuccess result = apiInstance.SendVerificationEmail(verificationEmailRequest); Debug.WriteLine(result); } catch (ApiException e) @@ -53,7 +53,7 @@ This returns an ApiResponse object which contains the response data, status code ```csharp try { - ApiResponse response = apiInstance.SendVerificationEmailWithHttpInfo(verificationEmailRequest); + ApiResponse response = apiInstance.SendVerificationEmailWithHttpInfo(verificationEmailRequest); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); @@ -74,7 +74,7 @@ catch (ApiException e) ### Return type -[**VerificationEmailResponse**](VerificationEmailResponse.md) +[**VerificationEmailSuccess**](VerificationEmailSuccess.md) ### Authorization @@ -91,6 +91,7 @@ No authorization required |-------------|-------------|------------------| | **200** | Ok | - | | **401** | | - | +| **429** | | - | | **500** | | - | [[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/csharp/docs/NewUserInfo.md b/csharp/docs/NewUserInfo.md new file mode 100644 index 0000000..0b4dba7 --- /dev/null +++ b/csharp/docs/NewUserInfo.md @@ -0,0 +1,11 @@ +# Hathora.Cloud.Sdk.Model.NewUserInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | | +**UserId** | **string** | | + +[[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/csharp/docs/NicknameObject.md b/csharp/docs/NicknameObject.md new file mode 100644 index 0000000..6679c1e --- /dev/null +++ b/csharp/docs/NicknameObject.md @@ -0,0 +1,10 @@ +# Hathora.Cloud.Sdk.Model.NicknameObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Nickname** | **string** | An alias to represent a player. | + +[[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/csharp/docs/OrgInvitesPage.md b/csharp/docs/OrgInvitesPage.md new file mode 100644 index 0000000..0d41f78 --- /dev/null +++ b/csharp/docs/OrgInvitesPage.md @@ -0,0 +1,10 @@ +# Hathora.Cloud.Sdk.Model.OrgInvitesPage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Invites** | [**List<OrgPermission>**](OrgPermission.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/csharp/docs/OrgPermission.md b/csharp/docs/OrgPermission.md new file mode 100644 index 0000000..21cc74b --- /dev/null +++ b/csharp/docs/OrgPermission.md @@ -0,0 +1,15 @@ +# Hathora.Cloud.Sdk.Model.OrgPermission + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**UpdatedAt** | **DateTime** | | +**CreatedAt** | **DateTime** | | +**Status** | [**OrganizationInviteStatus**](OrganizationInviteStatus.md) | | +**UserEmail** | **string** | | +**InvitedBy** | **string** | System generated unique identifier for a user. Not guaranteed to have a specific format. | +**OrgId** | **string** | System generated unique identifier for an organization. Not guaranteed to have a specific format. | + +[[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/csharp/docs/OrganizationInviteStatus.md b/csharp/docs/OrganizationInviteStatus.md new file mode 100644 index 0000000..54ab1e8 --- /dev/null +++ b/csharp/docs/OrganizationInviteStatus.md @@ -0,0 +1,12 @@ +# Hathora.Cloud.Sdk.Model.OrganizationInviteStatus + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | +**UserId** | **string** | System generated unique identifier for a user. Not guaranteed to have a specific format. | +**RescindedBy** | **string** | System generated unique identifier for a user. Not guaranteed to have a specific format. | + +[[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/csharp/docs/OrganizationsV1Api.md b/csharp/docs/OrganizationsV1Api.md new file mode 100644 index 0000000..3f70dc5 --- /dev/null +++ b/csharp/docs/OrganizationsV1Api.md @@ -0,0 +1,557 @@ +# Hathora.Cloud.Sdk.Api.OrganizationsV1Api + +All URIs are relative to *https://api.hathora.dev* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**AcceptInvite**](OrganizationsV1Api.md#acceptinvite) | **POST** /orgs/v1/{orgId}/invites/accept | | +| [**GetOrgPendingInvites**](OrganizationsV1Api.md#getorgpendinginvites) | **GET** /orgs/v1/{orgId}/invites/pending | | +| [**GetUserPendingInvites**](OrganizationsV1Api.md#getuserpendinginvites) | **GET** /orgs/v1/user/invites/pending | | +| [**InviteUser**](OrganizationsV1Api.md#inviteuser) | **PUT** /orgs/v1/{orgId}/invites | | +| [**RejectInvite**](OrganizationsV1Api.md#rejectinvite) | **POST** /orgs/v1/{orgId}/invites/reject | | +| [**RescindInvite**](OrganizationsV1Api.md#rescindinvite) | **POST** /orgs/v1/{orgId}/invites/rescind | | + + +# **AcceptInvite** +> void AcceptInvite (string orgId) + + + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Client; +using Hathora.Cloud.Sdk.Model; + +namespace Example +{ + public class AcceptInviteExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.hathora.dev"; + // Configure Bearer token for authorization: hathoraDevToken + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new OrganizationsV1Api(config); + var orgId = "orgId_example"; // string | + + try + { + apiInstance.AcceptInvite(orgId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OrganizationsV1Api.AcceptInvite: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the AcceptInviteWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + apiInstance.AcceptInviteWithHttpInfo(orgId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OrganizationsV1Api.AcceptInviteWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **orgId** | **string** | | | + +### Return type + +void (empty response body) + +### Authorization + +[hathoraDevToken](../README.md#hathoraDevToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No content | - | +| **401** | | - | +| **404** | | - | +| **429** | | - | + +[[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) + + +# **GetOrgPendingInvites** +> OrgInvitesPage GetOrgPendingInvites (string orgId) + + + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Client; +using Hathora.Cloud.Sdk.Model; + +namespace Example +{ + public class GetOrgPendingInvitesExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.hathora.dev"; + // Configure Bearer token for authorization: hathoraDevToken + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new OrganizationsV1Api(config); + var orgId = "orgId_example"; // string | + + try + { + OrgInvitesPage result = apiInstance.GetOrgPendingInvites(orgId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OrganizationsV1Api.GetOrgPendingInvites: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetOrgPendingInvitesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.GetOrgPendingInvitesWithHttpInfo(orgId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OrganizationsV1Api.GetOrgPendingInvitesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **orgId** | **string** | | | + +### Return type + +[**OrgInvitesPage**](OrgInvitesPage.md) + +### Authorization + +[hathoraDevToken](../README.md#hathoraDevToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | +| **401** | | - | +| **429** | | - | + +[[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) + + +# **GetUserPendingInvites** +> OrgInvitesPage GetUserPendingInvites () + + + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Client; +using Hathora.Cloud.Sdk.Model; + +namespace Example +{ + public class GetUserPendingInvitesExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.hathora.dev"; + // Configure Bearer token for authorization: hathoraDevToken + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new OrganizationsV1Api(config); + + try + { + OrgInvitesPage result = apiInstance.GetUserPendingInvites(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OrganizationsV1Api.GetUserPendingInvites: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetUserPendingInvitesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.GetUserPendingInvitesWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OrganizationsV1Api.GetUserPendingInvitesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters +This endpoint does not need any parameter. +### Return type + +[**OrgInvitesPage**](OrgInvitesPage.md) + +### Authorization + +[hathoraDevToken](../README.md#hathoraDevToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | +| **401** | | - | +| **429** | | - | + +[[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) + + +# **InviteUser** +> OrgPermission InviteUser (string orgId, CreateUserInvite createUserInvite) + + + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Client; +using Hathora.Cloud.Sdk.Model; + +namespace Example +{ + public class InviteUserExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.hathora.dev"; + // Configure Bearer token for authorization: hathoraDevToken + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new OrganizationsV1Api(config); + var orgId = "orgId_example"; // string | + var createUserInvite = new CreateUserInvite(); // CreateUserInvite | + + try + { + OrgPermission result = apiInstance.InviteUser(orgId, createUserInvite); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OrganizationsV1Api.InviteUser: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the InviteUserWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.InviteUserWithHttpInfo(orgId, createUserInvite); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OrganizationsV1Api.InviteUserWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **orgId** | **string** | | | +| **createUserInvite** | [**CreateUserInvite**](CreateUserInvite.md) | | | + +### Return type + +[**OrgPermission**](OrgPermission.md) + +### Authorization + +[hathoraDevToken](../README.md#hathoraDevToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | +| **401** | | - | +| **422** | | - | +| **429** | | - | + +[[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) + + +# **RejectInvite** +> void RejectInvite (string orgId) + + + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Client; +using Hathora.Cloud.Sdk.Model; + +namespace Example +{ + public class RejectInviteExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.hathora.dev"; + // Configure Bearer token for authorization: hathoraDevToken + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new OrganizationsV1Api(config); + var orgId = "orgId_example"; // string | + + try + { + apiInstance.RejectInvite(orgId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OrganizationsV1Api.RejectInvite: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the RejectInviteWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + apiInstance.RejectInviteWithHttpInfo(orgId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OrganizationsV1Api.RejectInviteWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **orgId** | **string** | | | + +### Return type + +void (empty response body) + +### Authorization + +[hathoraDevToken](../README.md#hathoraDevToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No content | - | +| **401** | | - | +| **404** | | - | +| **429** | | - | + +[[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) + + +# **RescindInvite** +> void RescindInvite (string orgId, RescindUserInvite rescindUserInvite) + + + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Client; +using Hathora.Cloud.Sdk.Model; + +namespace Example +{ + public class RescindInviteExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.hathora.dev"; + // Configure Bearer token for authorization: hathoraDevToken + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new OrganizationsV1Api(config); + var orgId = "orgId_example"; // string | + var rescindUserInvite = new RescindUserInvite(); // RescindUserInvite | + + try + { + apiInstance.RescindInvite(orgId, rescindUserInvite); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OrganizationsV1Api.RescindInvite: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the RescindInviteWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + apiInstance.RescindInviteWithHttpInfo(orgId, rescindUserInvite); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling OrganizationsV1Api.RescindInviteWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **orgId** | **string** | | | +| **rescindUserInvite** | [**RescindUserInvite**](RescindUserInvite.md) | | | + +### Return type + +void (empty response body) + +### Authorization + +[hathoraDevToken](../README.md#hathoraDevToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No content | - | +| **401** | | - | +| **404** | | - | +| **429** | | - | +| **500** | | - | + +[[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/csharp/docs/PingEndpointsInner.md b/csharp/docs/PingEndpointsInner.md new file mode 100644 index 0000000..1bf90ff --- /dev/null +++ b/csharp/docs/PingEndpointsInner.md @@ -0,0 +1,12 @@ +# Hathora.Cloud.Sdk.Model.PingEndpointsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Port** | **double** | | +**Host** | **string** | | +**Region** | **Region** | | + +[[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/csharp/docs/PlayerTokenObject.md b/csharp/docs/PlayerTokenObject.md new file mode 100644 index 0000000..1126d24 --- /dev/null +++ b/csharp/docs/PlayerTokenObject.md @@ -0,0 +1,10 @@ +# Hathora.Cloud.Sdk.Model.PlayerTokenObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Token** | **string** | A unique Hathora-signed JWT player 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/csharp/docs/ProcessesV2Api.md b/csharp/docs/ProcessesV2Api.md index e104785..1d3c455 100644 --- a/csharp/docs/ProcessesV2Api.md +++ b/csharp/docs/ProcessesV2Api.md @@ -4,10 +4,109 @@ All URIs are relative to *https://api.hathora.dev* | Method | HTTP request | Description | |--------|--------------|-------------| +| [**CreateProcess**](ProcessesV2Api.md#createprocess) | **POST** /processes/v2/{appId}/create/{region} | | | [**GetLatestProcesses**](ProcessesV2Api.md#getlatestprocesses) | **GET** /processes/v2/{appId}/list/latest | | | [**GetProcessInfo**](ProcessesV2Api.md#getprocessinfo) | **GET** /processes/v2/{appId}/info/{processId} | | | [**StopProcess**](ProcessesV2Api.md#stopprocess) | **POST** /processes/v2/{appId}/stop/{processId} | | + +# **CreateProcess** +> ProcessV2 CreateProcess (string appId, Region region) + + + +Creates a [process](https://hathora.dev/docs/concepts/hathora-entities#process) without a room. Use this to pre-allocate processes ahead of time so that subsequent room assignment via [CreateRoom()](https://hathora.dev/api#tag/RoomV2/operation/CreateRoom) can be instant. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Client; +using Hathora.Cloud.Sdk.Model; + +namespace Example +{ + public class CreateProcessExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.hathora.dev"; + // Configure Bearer token for authorization: hathoraDevToken + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new ProcessesV2Api(config); + var appId = "appId_example"; // string | + var region = (Region) "Seattle"; // Region | + + try + { + ProcessV2 result = apiInstance.CreateProcess(appId, region); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProcessesV2Api.CreateProcess: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the CreateProcessWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.CreateProcessWithHttpInfo(appId, region); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ProcessesV2Api.CreateProcessWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **appId** | **string** | | | +| **region** | **Region** | | | + +### Return type + +[**ProcessV2**](ProcessV2.md) + +### Authorization + +[hathoraDevToken](../README.md#hathoraDevToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | | - | +| **401** | | - | +| **402** | | - | +| **404** | | - | +| **500** | | - | + +[[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) + # **GetLatestProcesses** > List<ProcessV2> GetLatestProcesses (string appId, List status = null, List region = null) diff --git a/csharp/docs/RescindUserInvite.md b/csharp/docs/RescindUserInvite.md new file mode 100644 index 0000000..0ddb942 --- /dev/null +++ b/csharp/docs/RescindUserInvite.md @@ -0,0 +1,10 @@ +# Hathora.Cloud.Sdk.Model.RescindUserInvite + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**UserEmail** | **string** | | + +[[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/csharp/docs/RoomConnectionData.md b/csharp/docs/RoomConnectionData.md new file mode 100644 index 0000000..4d58512 --- /dev/null +++ b/csharp/docs/RoomConnectionData.md @@ -0,0 +1,14 @@ +# Hathora.Cloud.Sdk.Model.RoomConnectionData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AdditionalExposedPorts** | [**List<ExposedPort>**](ExposedPort.md) | | +**ExposedPort** | [**ExposedPort**](ExposedPort.md) | | [optional] +**Status** | **RoomReadyStatus** | | +**RoomId** | **string** | Unique identifier to a game session or match. Use the default system generated ID or overwrite it with your own. Note: error will be returned if `roomId` is not globally unique. | +**ProcessId** | **string** | System generated unique identifier to a runtime instance of your game server. | + +[[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/csharp/docs/RoomConnectionDataAllOf.md b/csharp/docs/RoomConnectionDataAllOf.md new file mode 100644 index 0000000..0950677 --- /dev/null +++ b/csharp/docs/RoomConnectionDataAllOf.md @@ -0,0 +1,10 @@ +# Hathora.Cloud.Sdk.Model.RoomConnectionDataAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ProcessId** | **string** | System generated unique identifier to a runtime instance of your game server. | + +[[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/csharp/docs/RoomReadyStatus.md b/csharp/docs/RoomReadyStatus.md new file mode 100644 index 0000000..fef4fde --- /dev/null +++ b/csharp/docs/RoomReadyStatus.md @@ -0,0 +1,9 @@ +# Hathora.Cloud.Sdk.Model.RoomReadyStatus + +## 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/csharp/docs/RoomV1Api.md b/csharp/docs/RoomV1Api.md index 12ccfe4..13b446e 100644 --- a/csharp/docs/RoomV1Api.md +++ b/csharp/docs/RoomV1Api.md @@ -108,6 +108,7 @@ catch (ApiException e) | **402** | | - | | **403** | | - | | **404** | | - | +| **429** | | - | | **500** | | - | [[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) @@ -199,6 +200,7 @@ void (empty response body) | **204** | No content | - | | **401** | | - | | **404** | | - | +| **429** | | - | | **500** | | - | [[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) @@ -665,6 +667,7 @@ void (empty response body) | **204** | No content | - | | **401** | | - | | **404** | | - | +| **429** | | - | | **500** | | - | [[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/csharp/docs/RoomV2Api.md b/csharp/docs/RoomV2Api.md index 8562fbf..b65c066 100644 --- a/csharp/docs/RoomV2Api.md +++ b/csharp/docs/RoomV2Api.md @@ -10,12 +10,12 @@ All URIs are relative to *https://api.hathora.dev* | [**GetConnectionInfo**](RoomV2Api.md#getconnectioninfo) | **GET** /rooms/v2/{appId}/connectioninfo/{roomId} | | | [**GetInactiveRoomsForProcess**](RoomV2Api.md#getinactiveroomsforprocess) | **GET** /rooms/v2/{appId}/list/{processId}/inactive | | | [**GetRoomInfo**](RoomV2Api.md#getroominfo) | **GET** /rooms/v2/{appId}/info/{roomId} | | -| [**SuspendRoom**](RoomV2Api.md#suspendroom) | **POST** /rooms/v2/{appId}/suspend/{roomId} | | +| [**SuspendRoomV2Deprecated**](RoomV2Api.md#suspendroomv2deprecated) | **POST** /rooms/v2/{appId}/suspend/{roomId} | | | [**UpdateRoomConfig**](RoomV2Api.md#updateroomconfig) | **POST** /rooms/v2/{appId}/update/{roomId} | | # **CreateRoom** -> CreateRoomResponse CreateRoom (string appId, CreateRoomParams createRoomParams, string roomId = null) +> RoomConnectionData CreateRoom (string appId, CreateRoomParams createRoomParams, string roomId = null) @@ -47,7 +47,7 @@ namespace Example try { - CreateRoomResponse result = apiInstance.CreateRoom(appId, createRoomParams, roomId); + RoomConnectionData result = apiInstance.CreateRoom(appId, createRoomParams, roomId); Debug.WriteLine(result); } catch (ApiException e) @@ -67,7 +67,7 @@ This returns an ApiResponse object which contains the response data, status code ```csharp try { - ApiResponse response = apiInstance.CreateRoomWithHttpInfo(appId, createRoomParams, roomId); + ApiResponse response = apiInstance.CreateRoomWithHttpInfo(appId, createRoomParams, roomId); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); @@ -90,7 +90,7 @@ catch (ApiException e) ### Return type -[**CreateRoomResponse**](CreateRoomResponse.md) +[**RoomConnectionData**](RoomConnectionData.md) ### Authorization @@ -111,6 +111,7 @@ catch (ApiException e) | **402** | | - | | **403** | | - | | **404** | | - | +| **429** | | - | | **500** | | - | [[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) @@ -204,6 +205,7 @@ void (empty response body) | **204** | No content | - | | **401** | | - | | **404** | | - | +| **429** | | - | | **500** | | - | [[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) @@ -591,9 +593,9 @@ catch (ApiException e) [[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) - -# **SuspendRoom** -> void SuspendRoom (string appId, string roomId) + +# **SuspendRoomV2Deprecated** +> void SuspendRoomV2Deprecated (string appId, string roomId) @@ -609,7 +611,7 @@ using Hathora.Cloud.Sdk.Model; namespace Example { - public class SuspendRoomExample + public class SuspendRoomV2DeprecatedExample { public static void Main() { @@ -624,11 +626,11 @@ namespace Example try { - apiInstance.SuspendRoom(appId, roomId); + apiInstance.SuspendRoomV2Deprecated(appId, roomId); } catch (ApiException e) { - Debug.Print("Exception when calling RoomV2Api.SuspendRoom: " + e.Message); + Debug.Print("Exception when calling RoomV2Api.SuspendRoomV2Deprecated: " + e.Message); Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } @@ -637,17 +639,17 @@ namespace Example } ``` -#### Using the SuspendRoomWithHttpInfo variant +#### Using the SuspendRoomV2DeprecatedWithHttpInfo variant This returns an ApiResponse object which contains the response data, status code and headers. ```csharp try { - apiInstance.SuspendRoomWithHttpInfo(appId, roomId); + apiInstance.SuspendRoomV2DeprecatedWithHttpInfo(appId, roomId); } catch (ApiException e) { - Debug.Print("Exception when calling RoomV2Api.SuspendRoomWithHttpInfo: " + e.Message); + Debug.Print("Exception when calling RoomV2Api.SuspendRoomV2DeprecatedWithHttpInfo: " + e.Message); Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } @@ -680,6 +682,7 @@ void (empty response body) | **204** | No content | - | | **401** | | - | | **404** | | - | +| **429** | | - | | **500** | | - | [[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) @@ -773,6 +776,7 @@ void (empty response body) | **204** | No content | - | | **401** | | - | | **404** | | - | +| **429** | | - | | **500** | | - | [[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/csharp/docs/VerificationEmailSuccess.md b/csharp/docs/VerificationEmailSuccess.md new file mode 100644 index 0000000..912ea9f --- /dev/null +++ b/csharp/docs/VerificationEmailSuccess.md @@ -0,0 +1,9 @@ +# Hathora.Cloud.Sdk.Model.VerificationEmailSuccess + +## 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/csharp/src/Hathora.Cloud.Sdk.Test/Api/BuildV2ApiTests.cs b/csharp/src/Hathora.Cloud.Sdk.Test/Api/BuildV2ApiTests.cs new file mode 100644 index 0000000..b244a26 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk.Test/Api/BuildV2ApiTests.cs @@ -0,0 +1,120 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using NUnit.Framework; + +using Hathora.Cloud.Sdk.Client; +using Hathora.Cloud.Sdk.Api; +// uncomment below to import models +//using Hathora.Cloud.Sdk.Model; + +namespace Hathora.Cloud.Sdk.Test.Api +{ + /// + /// Class for testing BuildV2Api + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class BuildV2ApiTests : IDisposable + { + private BuildV2Api instance; + + public BuildV2ApiTests() + { + instance = new BuildV2Api(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of BuildV2Api + /// + [Test] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' BuildV2Api + //Assert.IsType(instance); + } + + /// + /// Test CreateBuild + /// + [Test] + public void CreateBuildTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string appId = null; + //CreateBuildParams createBuildParams = null; + //var response = instance.CreateBuild(appId, createBuildParams); + //Assert.IsType(response); + } + + /// + /// Test DeleteBuild + /// + [Test] + public void DeleteBuildTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string appId = null; + //int buildId = null; + //instance.DeleteBuild(appId, buildId); + } + + /// + /// Test GetBuildInfo + /// + [Test] + public void GetBuildInfoTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string appId = null; + //int buildId = null; + //var response = instance.GetBuildInfo(appId, buildId); + //Assert.IsType(response); + } + + /// + /// Test GetBuilds + /// + [Test] + public void GetBuildsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string appId = null; + //var response = instance.GetBuilds(appId); + //Assert.IsType>(response); + } + + /// + /// Test RunBuild + /// + [Test] + public void RunBuildTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string appId = null; + //int buildId = null; + //System.IO.Stream file = null; + //var response = instance.RunBuild(appId, buildId, file); + //Assert.IsType(response); + } + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk.Test/Api/DeploymentV2ApiTests.cs b/csharp/src/Hathora.Cloud.Sdk.Test/Api/DeploymentV2ApiTests.cs new file mode 100644 index 0000000..ba05485 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk.Test/Api/DeploymentV2ApiTests.cs @@ -0,0 +1,107 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using NUnit.Framework; + +using Hathora.Cloud.Sdk.Client; +using Hathora.Cloud.Sdk.Api; +// uncomment below to import models +//using Hathora.Cloud.Sdk.Model; + +namespace Hathora.Cloud.Sdk.Test.Api +{ + /// + /// Class for testing DeploymentV2Api + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class DeploymentV2ApiTests : IDisposable + { + private DeploymentV2Api instance; + + public DeploymentV2ApiTests() + { + instance = new DeploymentV2Api(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of DeploymentV2Api + /// + [Test] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' DeploymentV2Api + //Assert.IsType(instance); + } + + /// + /// Test CreateDeployment + /// + [Test] + public void CreateDeploymentTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string appId = null; + //int buildId = null; + //DeploymentConfigV2 deploymentConfigV2 = null; + //var response = instance.CreateDeployment(appId, buildId, deploymentConfigV2); + //Assert.IsType(response); + } + + /// + /// Test GetDeploymentInfo + /// + [Test] + public void GetDeploymentInfoTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string appId = null; + //int deploymentId = null; + //var response = instance.GetDeploymentInfo(appId, deploymentId); + //Assert.IsType(response); + } + + /// + /// Test GetDeployments + /// + [Test] + public void GetDeploymentsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string appId = null; + //var response = instance.GetDeployments(appId); + //Assert.IsType>(response); + } + + /// + /// Test GetLatestDeployment + /// + [Test] + public void GetLatestDeploymentTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string appId = null; + //var response = instance.GetLatestDeployment(appId); + //Assert.IsType(response); + } + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk.Test/Api/DiscoveryV2ApiTests.cs b/csharp/src/Hathora.Cloud.Sdk.Test/Api/DiscoveryV2ApiTests.cs new file mode 100644 index 0000000..dc5a854 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk.Test/Api/DiscoveryV2ApiTests.cs @@ -0,0 +1,67 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using NUnit.Framework; + +using Hathora.Cloud.Sdk.Client; +using Hathora.Cloud.Sdk.Api; +// uncomment below to import models +//using Hathora.Cloud.Sdk.Model; + +namespace Hathora.Cloud.Sdk.Test.Api +{ + /// + /// Class for testing DiscoveryV2Api + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class DiscoveryV2ApiTests : IDisposable + { + private DiscoveryV2Api instance; + + public DiscoveryV2ApiTests() + { + instance = new DiscoveryV2Api(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of DiscoveryV2Api + /// + [Test] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' DiscoveryV2Api + //Assert.IsType(instance); + } + + /// + /// Test GetPingServiceEndpoints + /// + [Test] + public void GetPingServiceEndpointsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.GetPingServiceEndpoints(); + //Assert.IsType>(response); + } + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk.Test/Api/OrganizationsV1ApiTests.cs b/csharp/src/Hathora.Cloud.Sdk.Test/Api/OrganizationsV1ApiTests.cs new file mode 100644 index 0000000..94a9bc7 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk.Test/Api/OrganizationsV1ApiTests.cs @@ -0,0 +1,126 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using NUnit.Framework; + +using Hathora.Cloud.Sdk.Client; +using Hathora.Cloud.Sdk.Api; +// uncomment below to import models +//using Hathora.Cloud.Sdk.Model; + +namespace Hathora.Cloud.Sdk.Test.Api +{ + /// + /// Class for testing OrganizationsV1Api + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class OrganizationsV1ApiTests : IDisposable + { + private OrganizationsV1Api instance; + + public OrganizationsV1ApiTests() + { + instance = new OrganizationsV1Api(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of OrganizationsV1Api + /// + [Test] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' OrganizationsV1Api + //Assert.IsType(instance); + } + + /// + /// Test AcceptInvite + /// + [Test] + public void AcceptInviteTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string orgId = null; + //instance.AcceptInvite(orgId); + } + + /// + /// Test GetOrgPendingInvites + /// + [Test] + public void GetOrgPendingInvitesTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string orgId = null; + //var response = instance.GetOrgPendingInvites(orgId); + //Assert.IsType(response); + } + + /// + /// Test GetUserPendingInvites + /// + [Test] + public void GetUserPendingInvitesTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.GetUserPendingInvites(); + //Assert.IsType(response); + } + + /// + /// Test InviteUser + /// + [Test] + public void InviteUserTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string orgId = null; + //CreateUserInvite createUserInvite = null; + //var response = instance.InviteUser(orgId, createUserInvite); + //Assert.IsType(response); + } + + /// + /// Test RejectInvite + /// + [Test] + public void RejectInviteTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string orgId = null; + //instance.RejectInvite(orgId); + } + + /// + /// Test RescindInvite + /// + [Test] + public void RescindInviteTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string orgId = null; + //RescindUserInvite rescindUserInvite = null; + //instance.RescindInvite(orgId, rescindUserInvite); + } + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk.Test/Model/CreateUserInviteTests.cs b/csharp/src/Hathora.Cloud.Sdk.Test/Model/CreateUserInviteTests.cs new file mode 100644 index 0000000..36ab0f1 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk.Test/Model/CreateUserInviteTests.cs @@ -0,0 +1,66 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Model; +using Hathora.Cloud.Sdk.Client; +using System.Reflection; +using Newtonsoft.Json; +using NUnit.Framework; + +namespace Hathora.Cloud.Sdk.Test.Model +{ + /// + /// Class for testing CreateUserInvite + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class CreateUserInviteTests : IDisposable + { + // TODO uncomment below to declare an instance variable for CreateUserInvite + //private CreateUserInvite instance; + + public CreateUserInviteTests() + { + // TODO uncomment below to create an instance of CreateUserInvite + //instance = new CreateUserInvite(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of CreateUserInvite + /// + [Test] + public void CreateUserInviteInstanceTest() + { + // TODO uncomment below to test "IsType" CreateUserInvite + //Assert.IsType(instance); + } + + /// + /// Test the property 'UserEmail' + /// + [Test] + public void UserEmailTest() + { + // TODO unit test for the property 'UserEmail' + } + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk.Test/Model/DeploymentConfigV2Tests.cs b/csharp/src/Hathora.Cloud.Sdk.Test/Model/DeploymentConfigV2Tests.cs new file mode 100644 index 0000000..92950a0 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk.Test/Model/DeploymentConfigV2Tests.cs @@ -0,0 +1,122 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Model; +using Hathora.Cloud.Sdk.Client; +using System.Reflection; +using Newtonsoft.Json; +using NUnit.Framework; + +namespace Hathora.Cloud.Sdk.Test.Model +{ + /// + /// Class for testing DeploymentConfigV2 + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class DeploymentConfigV2Tests : IDisposable + { + // TODO uncomment below to declare an instance variable for DeploymentConfigV2 + //private DeploymentConfigV2 instance; + + public DeploymentConfigV2Tests() + { + // TODO uncomment below to create an instance of DeploymentConfigV2 + //instance = new DeploymentConfigV2(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of DeploymentConfigV2 + /// + [Test] + public void DeploymentConfigV2InstanceTest() + { + // TODO uncomment below to test "IsType" DeploymentConfigV2 + //Assert.IsType(instance); + } + + /// + /// Test the property 'IdleTimeoutEnabled' + /// + [Test] + public void IdleTimeoutEnabledTest() + { + // TODO unit test for the property 'IdleTimeoutEnabled' + } + /// + /// Test the property 'Env' + /// + [Test] + public void EnvTest() + { + // TODO unit test for the property 'Env' + } + /// + /// Test the property 'RoomsPerProcess' + /// + [Test] + public void RoomsPerProcessTest() + { + // TODO unit test for the property 'RoomsPerProcess' + } + /// + /// Test the property 'AdditionalContainerPorts' + /// + [Test] + public void AdditionalContainerPortsTest() + { + // TODO unit test for the property 'AdditionalContainerPorts' + } + /// + /// Test the property 'TransportType' + /// + [Test] + public void TransportTypeTest() + { + // TODO unit test for the property 'TransportType' + } + /// + /// Test the property 'ContainerPort' + /// + [Test] + public void ContainerPortTest() + { + // TODO unit test for the property 'ContainerPort' + } + /// + /// Test the property 'RequestedMemoryMB' + /// + [Test] + public void RequestedMemoryMBTest() + { + // TODO unit test for the property 'RequestedMemoryMB' + } + /// + /// Test the property 'RequestedCPU' + /// + [Test] + public void RequestedCPUTest() + { + // TODO unit test for the property 'RequestedCPU' + } + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk.Test/Model/DeploymentV2EnvInnerTests.cs b/csharp/src/Hathora.Cloud.Sdk.Test/Model/DeploymentV2EnvInnerTests.cs new file mode 100644 index 0000000..e092cf3 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk.Test/Model/DeploymentV2EnvInnerTests.cs @@ -0,0 +1,74 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Model; +using Hathora.Cloud.Sdk.Client; +using System.Reflection; +using Newtonsoft.Json; +using NUnit.Framework; + +namespace Hathora.Cloud.Sdk.Test.Model +{ + /// + /// Class for testing DeploymentV2EnvInner + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class DeploymentV2EnvInnerTests : IDisposable + { + // TODO uncomment below to declare an instance variable for DeploymentV2EnvInner + //private DeploymentV2EnvInner instance; + + public DeploymentV2EnvInnerTests() + { + // TODO uncomment below to create an instance of DeploymentV2EnvInner + //instance = new DeploymentV2EnvInner(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of DeploymentV2EnvInner + /// + [Test] + public void DeploymentV2EnvInnerInstanceTest() + { + // TODO uncomment below to test "IsType" DeploymentV2EnvInner + //Assert.IsType(instance); + } + + /// + /// Test the property 'Value' + /// + [Test] + public void ValueTest() + { + // TODO unit test for the property 'Value' + } + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk.Test/Model/DeploymentV2Tests.cs b/csharp/src/Hathora.Cloud.Sdk.Test/Model/DeploymentV2Tests.cs new file mode 100644 index 0000000..448741f --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk.Test/Model/DeploymentV2Tests.cs @@ -0,0 +1,154 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Model; +using Hathora.Cloud.Sdk.Client; +using System.Reflection; +using Newtonsoft.Json; +using NUnit.Framework; + +namespace Hathora.Cloud.Sdk.Test.Model +{ + /// + /// Class for testing DeploymentV2 + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class DeploymentV2Tests : IDisposable + { + // TODO uncomment below to declare an instance variable for DeploymentV2 + //private DeploymentV2 instance; + + public DeploymentV2Tests() + { + // TODO uncomment below to create an instance of DeploymentV2 + //instance = new DeploymentV2(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of DeploymentV2 + /// + [Test] + public void DeploymentV2InstanceTest() + { + // TODO uncomment below to test "IsType" DeploymentV2 + //Assert.IsType(instance); + } + + /// + /// Test the property 'IdleTimeoutEnabled' + /// + [Test] + public void IdleTimeoutEnabledTest() + { + // TODO unit test for the property 'IdleTimeoutEnabled' + } + /// + /// Test the property 'Env' + /// + [Test] + public void EnvTest() + { + // TODO unit test for the property 'Env' + } + /// + /// Test the property 'RoomsPerProcess' + /// + [Test] + public void RoomsPerProcessTest() + { + // TODO unit test for the property 'RoomsPerProcess' + } + /// + /// Test the property 'AdditionalContainerPorts' + /// + [Test] + public void AdditionalContainerPortsTest() + { + // TODO unit test for the property 'AdditionalContainerPorts' + } + /// + /// Test the property 'DefaultContainerPort' + /// + [Test] + public void DefaultContainerPortTest() + { + // TODO unit test for the property 'DefaultContainerPort' + } + /// + /// Test the property 'CreatedAt' + /// + [Test] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'CreatedBy' + /// + [Test] + public void CreatedByTest() + { + // TODO unit test for the property 'CreatedBy' + } + /// + /// Test the property 'RequestedMemoryMB' + /// + [Test] + public void RequestedMemoryMBTest() + { + // TODO unit test for the property 'RequestedMemoryMB' + } + /// + /// Test the property 'RequestedCPU' + /// + [Test] + public void RequestedCPUTest() + { + // TODO unit test for the property 'RequestedCPU' + } + /// + /// Test the property 'DeploymentId' + /// + [Test] + public void DeploymentIdTest() + { + // TODO unit test for the property 'DeploymentId' + } + /// + /// Test the property 'BuildId' + /// + [Test] + public void BuildIdTest() + { + // TODO unit test for the property 'BuildId' + } + /// + /// Test the property 'AppId' + /// + [Test] + public void AppIdTest() + { + // TODO unit test for the property 'AppId' + } + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk.Test/Model/GoogleIdTokenObjectTests.cs b/csharp/src/Hathora.Cloud.Sdk.Test/Model/GoogleIdTokenObjectTests.cs new file mode 100644 index 0000000..d099d32 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk.Test/Model/GoogleIdTokenObjectTests.cs @@ -0,0 +1,66 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Model; +using Hathora.Cloud.Sdk.Client; +using System.Reflection; +using Newtonsoft.Json; +using NUnit.Framework; + +namespace Hathora.Cloud.Sdk.Test.Model +{ + /// + /// Class for testing GoogleIdTokenObject + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class GoogleIdTokenObjectTests : IDisposable + { + // TODO uncomment below to declare an instance variable for GoogleIdTokenObject + //private GoogleIdTokenObject instance; + + public GoogleIdTokenObjectTests() + { + // TODO uncomment below to create an instance of GoogleIdTokenObject + //instance = new GoogleIdTokenObject(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of GoogleIdTokenObject + /// + [Test] + public void GoogleIdTokenObjectInstanceTest() + { + // TODO uncomment below to test "IsType" GoogleIdTokenObject + //Assert.IsType(instance); + } + + /// + /// Test the property 'IdToken' + /// + [Test] + public void IdTokenTest() + { + // TODO unit test for the property 'IdToken' + } + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk.Test/Model/InviteStatusAcceptedTests.cs b/csharp/src/Hathora.Cloud.Sdk.Test/Model/InviteStatusAcceptedTests.cs new file mode 100644 index 0000000..6be7370 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk.Test/Model/InviteStatusAcceptedTests.cs @@ -0,0 +1,74 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Model; +using Hathora.Cloud.Sdk.Client; +using System.Reflection; +using Newtonsoft.Json; +using NUnit.Framework; + +namespace Hathora.Cloud.Sdk.Test.Model +{ + /// + /// Class for testing InviteStatusAccepted + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class InviteStatusAcceptedTests : IDisposable + { + // TODO uncomment below to declare an instance variable for InviteStatusAccepted + //private InviteStatusAccepted instance; + + public InviteStatusAcceptedTests() + { + // TODO uncomment below to create an instance of InviteStatusAccepted + //instance = new InviteStatusAccepted(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of InviteStatusAccepted + /// + [Test] + public void InviteStatusAcceptedInstanceTest() + { + // TODO uncomment below to test "IsType" InviteStatusAccepted + //Assert.IsType(instance); + } + + /// + /// Test the property 'UserId' + /// + [Test] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'Type' + /// + [Test] + public void TypeTest() + { + // TODO unit test for the property 'Type' + } + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk.Test/Model/InviteStatusPendingTests.cs b/csharp/src/Hathora.Cloud.Sdk.Test/Model/InviteStatusPendingTests.cs new file mode 100644 index 0000000..415ba0a --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk.Test/Model/InviteStatusPendingTests.cs @@ -0,0 +1,66 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Model; +using Hathora.Cloud.Sdk.Client; +using System.Reflection; +using Newtonsoft.Json; +using NUnit.Framework; + +namespace Hathora.Cloud.Sdk.Test.Model +{ + /// + /// Class for testing InviteStatusPending + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class InviteStatusPendingTests : IDisposable + { + // TODO uncomment below to declare an instance variable for InviteStatusPending + //private InviteStatusPending instance; + + public InviteStatusPendingTests() + { + // TODO uncomment below to create an instance of InviteStatusPending + //instance = new InviteStatusPending(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of InviteStatusPending + /// + [Test] + public void InviteStatusPendingInstanceTest() + { + // TODO uncomment below to test "IsType" InviteStatusPending + //Assert.IsType(instance); + } + + /// + /// Test the property 'Type' + /// + [Test] + public void TypeTest() + { + // TODO unit test for the property 'Type' + } + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk.Test/Model/InviteStatusRejectedTests.cs b/csharp/src/Hathora.Cloud.Sdk.Test/Model/InviteStatusRejectedTests.cs new file mode 100644 index 0000000..8b67ab2 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk.Test/Model/InviteStatusRejectedTests.cs @@ -0,0 +1,74 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Model; +using Hathora.Cloud.Sdk.Client; +using System.Reflection; +using Newtonsoft.Json; +using NUnit.Framework; + +namespace Hathora.Cloud.Sdk.Test.Model +{ + /// + /// Class for testing InviteStatusRejected + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class InviteStatusRejectedTests : IDisposable + { + // TODO uncomment below to declare an instance variable for InviteStatusRejected + //private InviteStatusRejected instance; + + public InviteStatusRejectedTests() + { + // TODO uncomment below to create an instance of InviteStatusRejected + //instance = new InviteStatusRejected(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of InviteStatusRejected + /// + [Test] + public void InviteStatusRejectedInstanceTest() + { + // TODO uncomment below to test "IsType" InviteStatusRejected + //Assert.IsType(instance); + } + + /// + /// Test the property 'UserId' + /// + [Test] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'Type' + /// + [Test] + public void TypeTest() + { + // TODO unit test for the property 'Type' + } + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk.Test/Model/InviteStatusRescindedTests.cs b/csharp/src/Hathora.Cloud.Sdk.Test/Model/InviteStatusRescindedTests.cs new file mode 100644 index 0000000..0a2402d --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk.Test/Model/InviteStatusRescindedTests.cs @@ -0,0 +1,82 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Model; +using Hathora.Cloud.Sdk.Client; +using System.Reflection; +using Newtonsoft.Json; +using NUnit.Framework; + +namespace Hathora.Cloud.Sdk.Test.Model +{ + /// + /// Class for testing InviteStatusRescinded + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class InviteStatusRescindedTests : IDisposable + { + // TODO uncomment below to declare an instance variable for InviteStatusRescinded + //private InviteStatusRescinded instance; + + public InviteStatusRescindedTests() + { + // TODO uncomment below to create an instance of InviteStatusRescinded + //instance = new InviteStatusRescinded(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of InviteStatusRescinded + /// + [Test] + public void InviteStatusRescindedInstanceTest() + { + // TODO uncomment below to test "IsType" InviteStatusRescinded + //Assert.IsType(instance); + } + + /// + /// Test the property 'RescindedBy' + /// + [Test] + public void RescindedByTest() + { + // TODO unit test for the property 'RescindedBy' + } + /// + /// Test the property 'UserId' + /// + [Test] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'Type' + /// + [Test] + public void TypeTest() + { + // TODO unit test for the property 'Type' + } + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk.Test/Model/NewUserInfoTests.cs b/csharp/src/Hathora.Cloud.Sdk.Test/Model/NewUserInfoTests.cs new file mode 100644 index 0000000..88ad70c --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk.Test/Model/NewUserInfoTests.cs @@ -0,0 +1,74 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Model; +using Hathora.Cloud.Sdk.Client; +using System.Reflection; +using Newtonsoft.Json; +using NUnit.Framework; + +namespace Hathora.Cloud.Sdk.Test.Model +{ + /// + /// Class for testing NewUserInfo + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class NewUserInfoTests : IDisposable + { + // TODO uncomment below to declare an instance variable for NewUserInfo + //private NewUserInfo instance; + + public NewUserInfoTests() + { + // TODO uncomment below to create an instance of NewUserInfo + //instance = new NewUserInfo(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of NewUserInfo + /// + [Test] + public void NewUserInfoInstanceTest() + { + // TODO uncomment below to test "IsType" NewUserInfo + //Assert.IsType(instance); + } + + /// + /// Test the property 'Email' + /// + [Test] + public void EmailTest() + { + // TODO unit test for the property 'Email' + } + /// + /// Test the property 'UserId' + /// + [Test] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk.Test/Model/NicknameObjectTests.cs b/csharp/src/Hathora.Cloud.Sdk.Test/Model/NicknameObjectTests.cs new file mode 100644 index 0000000..6ca52e5 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk.Test/Model/NicknameObjectTests.cs @@ -0,0 +1,66 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Model; +using Hathora.Cloud.Sdk.Client; +using System.Reflection; +using Newtonsoft.Json; +using NUnit.Framework; + +namespace Hathora.Cloud.Sdk.Test.Model +{ + /// + /// Class for testing NicknameObject + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class NicknameObjectTests : IDisposable + { + // TODO uncomment below to declare an instance variable for NicknameObject + //private NicknameObject instance; + + public NicknameObjectTests() + { + // TODO uncomment below to create an instance of NicknameObject + //instance = new NicknameObject(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of NicknameObject + /// + [Test] + public void NicknameObjectInstanceTest() + { + // TODO uncomment below to test "IsType" NicknameObject + //Assert.IsType(instance); + } + + /// + /// Test the property 'Nickname' + /// + [Test] + public void NicknameTest() + { + // TODO unit test for the property 'Nickname' + } + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk.Test/Model/OrgInvitesPageTests.cs b/csharp/src/Hathora.Cloud.Sdk.Test/Model/OrgInvitesPageTests.cs new file mode 100644 index 0000000..0f28e79 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk.Test/Model/OrgInvitesPageTests.cs @@ -0,0 +1,66 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Model; +using Hathora.Cloud.Sdk.Client; +using System.Reflection; +using Newtonsoft.Json; +using NUnit.Framework; + +namespace Hathora.Cloud.Sdk.Test.Model +{ + /// + /// Class for testing OrgInvitesPage + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class OrgInvitesPageTests : IDisposable + { + // TODO uncomment below to declare an instance variable for OrgInvitesPage + //private OrgInvitesPage instance; + + public OrgInvitesPageTests() + { + // TODO uncomment below to create an instance of OrgInvitesPage + //instance = new OrgInvitesPage(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of OrgInvitesPage + /// + [Test] + public void OrgInvitesPageInstanceTest() + { + // TODO uncomment below to test "IsType" OrgInvitesPage + //Assert.IsType(instance); + } + + /// + /// Test the property 'Invites' + /// + [Test] + public void InvitesTest() + { + // TODO unit test for the property 'Invites' + } + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk.Test/Model/OrgPermissionTests.cs b/csharp/src/Hathora.Cloud.Sdk.Test/Model/OrgPermissionTests.cs new file mode 100644 index 0000000..4ab36a3 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk.Test/Model/OrgPermissionTests.cs @@ -0,0 +1,106 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Model; +using Hathora.Cloud.Sdk.Client; +using System.Reflection; +using Newtonsoft.Json; +using NUnit.Framework; + +namespace Hathora.Cloud.Sdk.Test.Model +{ + /// + /// Class for testing OrgPermission + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class OrgPermissionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for OrgPermission + //private OrgPermission instance; + + public OrgPermissionTests() + { + // TODO uncomment below to create an instance of OrgPermission + //instance = new OrgPermission(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of OrgPermission + /// + [Test] + public void OrgPermissionInstanceTest() + { + // TODO uncomment below to test "IsType" OrgPermission + //Assert.IsType(instance); + } + + /// + /// Test the property 'UpdatedAt' + /// + [Test] + public void UpdatedAtTest() + { + // TODO unit test for the property 'UpdatedAt' + } + /// + /// Test the property 'CreatedAt' + /// + [Test] + public void CreatedAtTest() + { + // TODO unit test for the property 'CreatedAt' + } + /// + /// Test the property 'Status' + /// + [Test] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + /// + /// Test the property 'UserEmail' + /// + [Test] + public void UserEmailTest() + { + // TODO unit test for the property 'UserEmail' + } + /// + /// Test the property 'InvitedBy' + /// + [Test] + public void InvitedByTest() + { + // TODO unit test for the property 'InvitedBy' + } + /// + /// Test the property 'OrgId' + /// + [Test] + public void OrgIdTest() + { + // TODO unit test for the property 'OrgId' + } + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk.Test/Model/OrganizationInviteStatusTests.cs b/csharp/src/Hathora.Cloud.Sdk.Test/Model/OrganizationInviteStatusTests.cs new file mode 100644 index 0000000..992554b --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk.Test/Model/OrganizationInviteStatusTests.cs @@ -0,0 +1,82 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Model; +using Hathora.Cloud.Sdk.Client; +using System.Reflection; +using Newtonsoft.Json; +using NUnit.Framework; + +namespace Hathora.Cloud.Sdk.Test.Model +{ + /// + /// Class for testing OrganizationInviteStatus + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class OrganizationInviteStatusTests : IDisposable + { + // TODO uncomment below to declare an instance variable for OrganizationInviteStatus + //private OrganizationInviteStatus instance; + + public OrganizationInviteStatusTests() + { + // TODO uncomment below to create an instance of OrganizationInviteStatus + //instance = new OrganizationInviteStatus(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of OrganizationInviteStatus + /// + [Test] + public void OrganizationInviteStatusInstanceTest() + { + // TODO uncomment below to test "IsType" OrganizationInviteStatus + //Assert.IsType(instance); + } + + /// + /// Test the property 'Type' + /// + [Test] + public void TypeTest() + { + // TODO unit test for the property 'Type' + } + /// + /// Test the property 'UserId' + /// + [Test] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'RescindedBy' + /// + [Test] + public void RescindedByTest() + { + // TODO unit test for the property 'RescindedBy' + } + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk.Test/Model/PingEndpointsInnerTests.cs b/csharp/src/Hathora.Cloud.Sdk.Test/Model/PingEndpointsInnerTests.cs new file mode 100644 index 0000000..201237c --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk.Test/Model/PingEndpointsInnerTests.cs @@ -0,0 +1,82 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Model; +using Hathora.Cloud.Sdk.Client; +using System.Reflection; +using Newtonsoft.Json; +using NUnit.Framework; + +namespace Hathora.Cloud.Sdk.Test.Model +{ + /// + /// Class for testing PingEndpointsInner + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PingEndpointsInnerTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PingEndpointsInner + //private PingEndpointsInner instance; + + public PingEndpointsInnerTests() + { + // TODO uncomment below to create an instance of PingEndpointsInner + //instance = new PingEndpointsInner(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PingEndpointsInner + /// + [Test] + public void PingEndpointsInnerInstanceTest() + { + // TODO uncomment below to test "IsType" PingEndpointsInner + //Assert.IsType(instance); + } + + /// + /// Test the property 'Port' + /// + [Test] + public void PortTest() + { + // TODO unit test for the property 'Port' + } + /// + /// Test the property 'Host' + /// + [Test] + public void HostTest() + { + // TODO unit test for the property 'Host' + } + /// + /// Test the property 'Region' + /// + [Test] + public void RegionTest() + { + // TODO unit test for the property 'Region' + } + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk.Test/Model/PlayerTokenObjectTests.cs b/csharp/src/Hathora.Cloud.Sdk.Test/Model/PlayerTokenObjectTests.cs new file mode 100644 index 0000000..59f9510 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk.Test/Model/PlayerTokenObjectTests.cs @@ -0,0 +1,66 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Model; +using Hathora.Cloud.Sdk.Client; +using System.Reflection; +using Newtonsoft.Json; +using NUnit.Framework; + +namespace Hathora.Cloud.Sdk.Test.Model +{ + /// + /// Class for testing PlayerTokenObject + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PlayerTokenObjectTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PlayerTokenObject + //private PlayerTokenObject instance; + + public PlayerTokenObjectTests() + { + // TODO uncomment below to create an instance of PlayerTokenObject + //instance = new PlayerTokenObject(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PlayerTokenObject + /// + [Test] + public void PlayerTokenObjectInstanceTest() + { + // TODO uncomment below to test "IsType" PlayerTokenObject + //Assert.IsType(instance); + } + + /// + /// Test the property 'Token' + /// + [Test] + public void TokenTest() + { + // TODO unit test for the property 'Token' + } + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk.Test/Model/RescindUserInviteTests.cs b/csharp/src/Hathora.Cloud.Sdk.Test/Model/RescindUserInviteTests.cs new file mode 100644 index 0000000..56c2795 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk.Test/Model/RescindUserInviteTests.cs @@ -0,0 +1,66 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Model; +using Hathora.Cloud.Sdk.Client; +using System.Reflection; +using Newtonsoft.Json; +using NUnit.Framework; + +namespace Hathora.Cloud.Sdk.Test.Model +{ + /// + /// Class for testing RescindUserInvite + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class RescindUserInviteTests : IDisposable + { + // TODO uncomment below to declare an instance variable for RescindUserInvite + //private RescindUserInvite instance; + + public RescindUserInviteTests() + { + // TODO uncomment below to create an instance of RescindUserInvite + //instance = new RescindUserInvite(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of RescindUserInvite + /// + [Test] + public void RescindUserInviteInstanceTest() + { + // TODO uncomment below to test "IsType" RescindUserInvite + //Assert.IsType(instance); + } + + /// + /// Test the property 'UserEmail' + /// + [Test] + public void UserEmailTest() + { + // TODO unit test for the property 'UserEmail' + } + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk.Test/Model/RoomConnectionDataAllOfTests.cs b/csharp/src/Hathora.Cloud.Sdk.Test/Model/RoomConnectionDataAllOfTests.cs new file mode 100644 index 0000000..e93474a --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk.Test/Model/RoomConnectionDataAllOfTests.cs @@ -0,0 +1,66 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Model; +using Hathora.Cloud.Sdk.Client; +using System.Reflection; +using Newtonsoft.Json; +using NUnit.Framework; + +namespace Hathora.Cloud.Sdk.Test.Model +{ + /// + /// Class for testing RoomConnectionDataAllOf + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class RoomConnectionDataAllOfTests : IDisposable + { + // TODO uncomment below to declare an instance variable for RoomConnectionDataAllOf + //private RoomConnectionDataAllOf instance; + + public RoomConnectionDataAllOfTests() + { + // TODO uncomment below to create an instance of RoomConnectionDataAllOf + //instance = new RoomConnectionDataAllOf(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of RoomConnectionDataAllOf + /// + [Test] + public void RoomConnectionDataAllOfInstanceTest() + { + // TODO uncomment below to test "IsType" RoomConnectionDataAllOf + //Assert.IsType(instance); + } + + /// + /// Test the property 'ProcessId' + /// + [Test] + public void ProcessIdTest() + { + // TODO unit test for the property 'ProcessId' + } + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk.Test/Model/RoomConnectionDataTests.cs b/csharp/src/Hathora.Cloud.Sdk.Test/Model/RoomConnectionDataTests.cs new file mode 100644 index 0000000..36e4fde --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk.Test/Model/RoomConnectionDataTests.cs @@ -0,0 +1,98 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Model; +using Hathora.Cloud.Sdk.Client; +using System.Reflection; +using Newtonsoft.Json; +using NUnit.Framework; + +namespace Hathora.Cloud.Sdk.Test.Model +{ + /// + /// Class for testing RoomConnectionData + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class RoomConnectionDataTests : IDisposable + { + // TODO uncomment below to declare an instance variable for RoomConnectionData + //private RoomConnectionData instance; + + public RoomConnectionDataTests() + { + // TODO uncomment below to create an instance of RoomConnectionData + //instance = new RoomConnectionData(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of RoomConnectionData + /// + [Test] + public void RoomConnectionDataInstanceTest() + { + // TODO uncomment below to test "IsType" RoomConnectionData + //Assert.IsType(instance); + } + + /// + /// Test the property 'AdditionalExposedPorts' + /// + [Test] + public void AdditionalExposedPortsTest() + { + // TODO unit test for the property 'AdditionalExposedPorts' + } + /// + /// Test the property 'ExposedPort' + /// + [Test] + public void ExposedPortTest() + { + // TODO unit test for the property 'ExposedPort' + } + /// + /// Test the property 'Status' + /// + [Test] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + /// + /// Test the property 'RoomId' + /// + [Test] + public void RoomIdTest() + { + // TODO unit test for the property 'RoomId' + } + /// + /// Test the property 'ProcessId' + /// + [Test] + public void ProcessIdTest() + { + // TODO unit test for the property 'ProcessId' + } + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk.Test/Model/RoomReadyStatusTests.cs b/csharp/src/Hathora.Cloud.Sdk.Test/Model/RoomReadyStatusTests.cs new file mode 100644 index 0000000..c1b0694 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk.Test/Model/RoomReadyStatusTests.cs @@ -0,0 +1,58 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Model; +using Hathora.Cloud.Sdk.Client; +using System.Reflection; +using Newtonsoft.Json; +using NUnit.Framework; + +namespace Hathora.Cloud.Sdk.Test.Model +{ + /// + /// Class for testing RoomReadyStatus + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class RoomReadyStatusTests : IDisposable + { + // TODO uncomment below to declare an instance variable for RoomReadyStatus + //private RoomReadyStatus instance; + + public RoomReadyStatusTests() + { + // TODO uncomment below to create an instance of RoomReadyStatus + //instance = new RoomReadyStatus(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of RoomReadyStatus + /// + [Test] + public void RoomReadyStatusInstanceTest() + { + // TODO uncomment below to test "IsType" RoomReadyStatus + //Assert.IsType(instance); + } + + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk.Test/Model/VerificationEmailSuccessTests.cs b/csharp/src/Hathora.Cloud.Sdk.Test/Model/VerificationEmailSuccessTests.cs new file mode 100644 index 0000000..faf9d55 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk.Test/Model/VerificationEmailSuccessTests.cs @@ -0,0 +1,58 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Hathora.Cloud.Sdk.Api; +using Hathora.Cloud.Sdk.Model; +using Hathora.Cloud.Sdk.Client; +using System.Reflection; +using Newtonsoft.Json; +using NUnit.Framework; + +namespace Hathora.Cloud.Sdk.Test.Model +{ + /// + /// Class for testing VerificationEmailSuccess + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class VerificationEmailSuccessTests : IDisposable + { + // TODO uncomment below to declare an instance variable for VerificationEmailSuccess + //private VerificationEmailSuccess instance; + + public VerificationEmailSuccessTests() + { + // TODO uncomment below to create an instance of VerificationEmailSuccess + //instance = new VerificationEmailSuccess(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of VerificationEmailSuccess + /// + [Test] + public void VerificationEmailSuccessInstanceTest() + { + // TODO uncomment below to test "IsType" VerificationEmailSuccess + //Assert.IsType(instance); + } + + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk/Api/AuthV1Api.cs b/csharp/src/Hathora.Cloud.Sdk/Api/AuthV1Api.cs index e57eccc..4ce3050 100644 --- a/csharp/src/Hathora.Cloud.Sdk/Api/AuthV1Api.cs +++ b/csharp/src/Hathora.Cloud.Sdk/Api/AuthV1Api.cs @@ -34,8 +34,8 @@ public interface IAuthV1ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// - /// LoginResponse - LoginResponse LoginAnonymous(string appId); + /// PlayerTokenObject + PlayerTokenObject LoginAnonymous(string appId); /// /// @@ -45,8 +45,8 @@ public interface IAuthV1ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// - /// ApiResponse of LoginResponse - ApiResponse LoginAnonymousWithHttpInfo(string appId); + /// ApiResponse of PlayerTokenObject + ApiResponse LoginAnonymousWithHttpInfo(string appId); /// /// /// @@ -55,9 +55,9 @@ public interface IAuthV1ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// - /// - /// LoginResponse - LoginResponse LoginGoogle(string appId, LoginGoogleRequest loginGoogleRequest); + /// + /// PlayerTokenObject + PlayerTokenObject LoginGoogle(string appId, GoogleIdTokenObject googleIdTokenObject); /// /// @@ -67,9 +67,9 @@ public interface IAuthV1ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// - /// - /// ApiResponse of LoginResponse - ApiResponse LoginGoogleWithHttpInfo(string appId, LoginGoogleRequest loginGoogleRequest); + /// + /// ApiResponse of PlayerTokenObject + ApiResponse LoginGoogleWithHttpInfo(string appId, GoogleIdTokenObject googleIdTokenObject); /// /// /// @@ -78,9 +78,9 @@ public interface IAuthV1ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// - /// - /// LoginResponse - LoginResponse LoginNickname(string appId, LoginNicknameRequest loginNicknameRequest); + /// + /// PlayerTokenObject + PlayerTokenObject LoginNickname(string appId, NicknameObject nicknameObject); /// /// @@ -90,9 +90,9 @@ public interface IAuthV1ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// - /// - /// ApiResponse of LoginResponse - ApiResponse LoginNicknameWithHttpInfo(string appId, LoginNicknameRequest loginNicknameRequest); + /// + /// ApiResponse of PlayerTokenObject + ApiResponse LoginNicknameWithHttpInfo(string appId, NicknameObject nicknameObject); #endregion Synchronous Operations } @@ -111,8 +111,8 @@ public interface IAuthV1ApiAsync : IApiAccessor /// Thrown when fails to make API call /// /// Cancellation Token to cancel the request. - /// Task of LoginResponse - System.Threading.Tasks.Task LoginAnonymousAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of PlayerTokenObject + System.Threading.Tasks.Task LoginAnonymousAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -123,8 +123,8 @@ public interface IAuthV1ApiAsync : IApiAccessor /// Thrown when fails to make API call /// /// Cancellation Token to cancel the request. - /// Task of ApiResponse (LoginResponse) - System.Threading.Tasks.Task> LoginAnonymousWithHttpInfoAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (PlayerTokenObject) + System.Threading.Tasks.Task> LoginAnonymousWithHttpInfoAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -133,10 +133,10 @@ public interface IAuthV1ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// - /// + /// /// Cancellation Token to cancel the request. - /// Task of LoginResponse - System.Threading.Tasks.Task LoginGoogleAsync(string appId, LoginGoogleRequest loginGoogleRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of PlayerTokenObject + System.Threading.Tasks.Task LoginGoogleAsync(string appId, GoogleIdTokenObject googleIdTokenObject, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -146,10 +146,10 @@ public interface IAuthV1ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// - /// + /// /// Cancellation Token to cancel the request. - /// Task of ApiResponse (LoginResponse) - System.Threading.Tasks.Task> LoginGoogleWithHttpInfoAsync(string appId, LoginGoogleRequest loginGoogleRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (PlayerTokenObject) + System.Threading.Tasks.Task> LoginGoogleWithHttpInfoAsync(string appId, GoogleIdTokenObject googleIdTokenObject, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -158,10 +158,10 @@ public interface IAuthV1ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// - /// + /// /// Cancellation Token to cancel the request. - /// Task of LoginResponse - System.Threading.Tasks.Task LoginNicknameAsync(string appId, LoginNicknameRequest loginNicknameRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of PlayerTokenObject + System.Threading.Tasks.Task LoginNicknameAsync(string appId, NicknameObject nicknameObject, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -171,10 +171,10 @@ public interface IAuthV1ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// - /// + /// /// Cancellation Token to cancel the request. - /// Task of ApiResponse (LoginResponse) - System.Threading.Tasks.Task> LoginNicknameWithHttpInfoAsync(string appId, LoginNicknameRequest loginNicknameRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (PlayerTokenObject) + System.Threading.Tasks.Task> LoginNicknameWithHttpInfoAsync(string appId, NicknameObject nicknameObject, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -324,10 +324,10 @@ public Hathora.Cloud.Sdk.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// - /// LoginResponse - public LoginResponse LoginAnonymous(string appId) + /// PlayerTokenObject + public PlayerTokenObject LoginAnonymous(string appId) { - Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = LoginAnonymousWithHttpInfo(appId); + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = LoginAnonymousWithHttpInfo(appId); return localVarResponse.Data; } @@ -336,8 +336,8 @@ public LoginResponse LoginAnonymous(string appId) /// /// Thrown when fails to make API call /// - /// ApiResponse of LoginResponse - public Hathora.Cloud.Sdk.Client.ApiResponse LoginAnonymousWithHttpInfo(string appId) + /// ApiResponse of PlayerTokenObject + public Hathora.Cloud.Sdk.Client.ApiResponse LoginAnonymousWithHttpInfo(string appId) { // verify the required parameter 'appId' is set if (appId == null) @@ -363,7 +363,7 @@ public Hathora.Cloud.Sdk.Client.ApiResponse LoginAnonymousWithHtt // make the HTTP request - var localVarResponse = this.Client.Post("/auth/v1/{appId}/login/anonymous", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/auth/v1/{appId}/login/anonymous", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { @@ -380,14 +380,14 @@ public Hathora.Cloud.Sdk.Client.ApiResponse LoginAnonymousWithHtt /// Thrown when fails to make API call /// /// Cancellation Token to cancel the request. - /// Task of LoginResponse - public async System.Threading.Tasks.Task LoginAnonymousAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of PlayerTokenObject + public async System.Threading.Tasks.Task LoginAnonymousAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var task = LoginAnonymousWithHttpInfoAsync(appId, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL - Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task.ConfigureAwait(false); + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task.ConfigureAwait(false); #else - Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task; + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task; #endif return localVarResponse.Data; } @@ -398,8 +398,8 @@ public async System.Threading.Tasks.Task LoginAnonymousAsync(stri /// Thrown when fails to make API call /// /// Cancellation Token to cancel the request. - /// Task of ApiResponse (LoginResponse) - public async System.Threading.Tasks.Task> LoginAnonymousWithHttpInfoAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (PlayerTokenObject) + public async System.Threading.Tasks.Task> LoginAnonymousWithHttpInfoAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) @@ -428,7 +428,7 @@ public async System.Threading.Tasks.Task("/auth/v1/{appId}/login/anonymous", localVarRequestOptions, this.Configuration, cancellationToken); + var task = this.AsynchronousClient.PostAsync("/auth/v1/{appId}/login/anonymous", localVarRequestOptions, this.Configuration, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL var localVarResponse = await task.ConfigureAwait(false); @@ -450,11 +450,11 @@ public async System.Threading.Tasks.Task /// Thrown when fails to make API call /// - /// - /// LoginResponse - public LoginResponse LoginGoogle(string appId, LoginGoogleRequest loginGoogleRequest) + /// + /// PlayerTokenObject + public PlayerTokenObject LoginGoogle(string appId, GoogleIdTokenObject googleIdTokenObject) { - Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = LoginGoogleWithHttpInfo(appId, loginGoogleRequest); + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = LoginGoogleWithHttpInfo(appId, googleIdTokenObject); return localVarResponse.Data; } @@ -463,17 +463,17 @@ public LoginResponse LoginGoogle(string appId, LoginGoogleRequest loginGoogleReq /// /// Thrown when fails to make API call /// - /// - /// ApiResponse of LoginResponse - public Hathora.Cloud.Sdk.Client.ApiResponse LoginGoogleWithHttpInfo(string appId, LoginGoogleRequest loginGoogleRequest) + /// + /// ApiResponse of PlayerTokenObject + public Hathora.Cloud.Sdk.Client.ApiResponse LoginGoogleWithHttpInfo(string appId, GoogleIdTokenObject googleIdTokenObject) { // verify the required parameter 'appId' is set if (appId == null) throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling AuthV1Api->LoginGoogle"); - // verify the required parameter 'loginGoogleRequest' is set - if (loginGoogleRequest == null) - throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'loginGoogleRequest' when calling AuthV1Api->LoginGoogle"); + // verify the required parameter 'googleIdTokenObject' is set + if (googleIdTokenObject == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'googleIdTokenObject' when calling AuthV1Api->LoginGoogle"); Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); @@ -493,11 +493,11 @@ public Hathora.Cloud.Sdk.Client.ApiResponse LoginGoogleWithHttpIn if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("appId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.Data = loginGoogleRequest; + localVarRequestOptions.Data = googleIdTokenObject; // make the HTTP request - var localVarResponse = this.Client.Post("/auth/v1/{appId}/login/google", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/auth/v1/{appId}/login/google", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { @@ -513,16 +513,16 @@ public Hathora.Cloud.Sdk.Client.ApiResponse LoginGoogleWithHttpIn /// /// Thrown when fails to make API call /// - /// + /// /// Cancellation Token to cancel the request. - /// Task of LoginResponse - public async System.Threading.Tasks.Task LoginGoogleAsync(string appId, LoginGoogleRequest loginGoogleRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of PlayerTokenObject + public async System.Threading.Tasks.Task LoginGoogleAsync(string appId, GoogleIdTokenObject googleIdTokenObject, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - var task = LoginGoogleWithHttpInfoAsync(appId, loginGoogleRequest, cancellationToken); + var task = LoginGoogleWithHttpInfoAsync(appId, googleIdTokenObject, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL - Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task.ConfigureAwait(false); + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task.ConfigureAwait(false); #else - Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task; + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task; #endif return localVarResponse.Data; } @@ -532,18 +532,18 @@ public async System.Threading.Tasks.Task LoginGoogleAsync(string /// /// Thrown when fails to make API call /// - /// + /// /// Cancellation Token to cancel the request. - /// Task of ApiResponse (LoginResponse) - public async System.Threading.Tasks.Task> LoginGoogleWithHttpInfoAsync(string appId, LoginGoogleRequest loginGoogleRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (PlayerTokenObject) + public async System.Threading.Tasks.Task> LoginGoogleWithHttpInfoAsync(string appId, GoogleIdTokenObject googleIdTokenObject, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling AuthV1Api->LoginGoogle"); - // verify the required parameter 'loginGoogleRequest' is set - if (loginGoogleRequest == null) - throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'loginGoogleRequest' when calling AuthV1Api->LoginGoogle"); + // verify the required parameter 'googleIdTokenObject' is set + if (googleIdTokenObject == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'googleIdTokenObject' when calling AuthV1Api->LoginGoogle"); Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); @@ -565,12 +565,12 @@ public async System.Threading.Tasks.Task("/auth/v1/{appId}/login/google", localVarRequestOptions, this.Configuration, cancellationToken); + var task = this.AsynchronousClient.PostAsync("/auth/v1/{appId}/login/google", localVarRequestOptions, this.Configuration, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL var localVarResponse = await task.ConfigureAwait(false); @@ -592,11 +592,11 @@ public async System.Threading.Tasks.Task /// Thrown when fails to make API call /// - /// - /// LoginResponse - public LoginResponse LoginNickname(string appId, LoginNicknameRequest loginNicknameRequest) + /// + /// PlayerTokenObject + public PlayerTokenObject LoginNickname(string appId, NicknameObject nicknameObject) { - Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = LoginNicknameWithHttpInfo(appId, loginNicknameRequest); + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = LoginNicknameWithHttpInfo(appId, nicknameObject); return localVarResponse.Data; } @@ -605,17 +605,17 @@ public LoginResponse LoginNickname(string appId, LoginNicknameRequest loginNickn /// /// Thrown when fails to make API call /// - /// - /// ApiResponse of LoginResponse - public Hathora.Cloud.Sdk.Client.ApiResponse LoginNicknameWithHttpInfo(string appId, LoginNicknameRequest loginNicknameRequest) + /// + /// ApiResponse of PlayerTokenObject + public Hathora.Cloud.Sdk.Client.ApiResponse LoginNicknameWithHttpInfo(string appId, NicknameObject nicknameObject) { // verify the required parameter 'appId' is set if (appId == null) throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling AuthV1Api->LoginNickname"); - // verify the required parameter 'loginNicknameRequest' is set - if (loginNicknameRequest == null) - throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'loginNicknameRequest' when calling AuthV1Api->LoginNickname"); + // verify the required parameter 'nicknameObject' is set + if (nicknameObject == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'nicknameObject' when calling AuthV1Api->LoginNickname"); Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); @@ -635,11 +635,11 @@ public Hathora.Cloud.Sdk.Client.ApiResponse LoginNicknameWithHttp if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("appId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.Data = loginNicknameRequest; + localVarRequestOptions.Data = nicknameObject; // make the HTTP request - var localVarResponse = this.Client.Post("/auth/v1/{appId}/login/nickname", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/auth/v1/{appId}/login/nickname", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { @@ -655,16 +655,16 @@ public Hathora.Cloud.Sdk.Client.ApiResponse LoginNicknameWithHttp /// /// Thrown when fails to make API call /// - /// + /// /// Cancellation Token to cancel the request. - /// Task of LoginResponse - public async System.Threading.Tasks.Task LoginNicknameAsync(string appId, LoginNicknameRequest loginNicknameRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of PlayerTokenObject + public async System.Threading.Tasks.Task LoginNicknameAsync(string appId, NicknameObject nicknameObject, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - var task = LoginNicknameWithHttpInfoAsync(appId, loginNicknameRequest, cancellationToken); + var task = LoginNicknameWithHttpInfoAsync(appId, nicknameObject, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL - Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task.ConfigureAwait(false); + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task.ConfigureAwait(false); #else - Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task; + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task; #endif return localVarResponse.Data; } @@ -674,18 +674,18 @@ public async System.Threading.Tasks.Task LoginNicknameAsync(strin /// /// Thrown when fails to make API call /// - /// + /// /// Cancellation Token to cancel the request. - /// Task of ApiResponse (LoginResponse) - public async System.Threading.Tasks.Task> LoginNicknameWithHttpInfoAsync(string appId, LoginNicknameRequest loginNicknameRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (PlayerTokenObject) + public async System.Threading.Tasks.Task> LoginNicknameWithHttpInfoAsync(string appId, NicknameObject nicknameObject, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling AuthV1Api->LoginNickname"); - // verify the required parameter 'loginNicknameRequest' is set - if (loginNicknameRequest == null) - throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'loginNicknameRequest' when calling AuthV1Api->LoginNickname"); + // verify the required parameter 'nicknameObject' is set + if (nicknameObject == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'nicknameObject' when calling AuthV1Api->LoginNickname"); Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); @@ -707,12 +707,12 @@ public async System.Threading.Tasks.Task("/auth/v1/{appId}/login/nickname", localVarRequestOptions, this.Configuration, cancellationToken); + var task = this.AsynchronousClient.PostAsync("/auth/v1/{appId}/login/nickname", localVarRequestOptions, this.Configuration, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL var localVarResponse = await task.ConfigureAwait(false); diff --git a/csharp/src/Hathora.Cloud.Sdk/Api/BuildV1Api.cs b/csharp/src/Hathora.Cloud.Sdk/Api/BuildV1Api.cs index b54c775..f74a7b8 100644 --- a/csharp/src/Hathora.Cloud.Sdk/Api/BuildV1Api.cs +++ b/csharp/src/Hathora.Cloud.Sdk/Api/BuildV1Api.cs @@ -36,7 +36,8 @@ public interface IBuildV1ApiSync : IApiAccessor /// /// /// Build - Build CreateBuild(string appId, CreateBuildParams createBuildParams); + [Obsolete] + Build CreateBuildDeprecated(string appId, CreateBuildParams createBuildParams); /// /// @@ -48,7 +49,8 @@ public interface IBuildV1ApiSync : IApiAccessor /// /// /// ApiResponse of Build - ApiResponse CreateBuildWithHttpInfo(string appId, CreateBuildParams createBuildParams); + [Obsolete] + ApiResponse CreateBuildDeprecatedWithHttpInfo(string appId, CreateBuildParams createBuildParams); /// /// /// @@ -59,7 +61,8 @@ public interface IBuildV1ApiSync : IApiAccessor /// /// /// - void DeleteBuild(string appId, int buildId); + [Obsolete] + void DeleteBuildDeprecated(string appId, int buildId); /// /// @@ -71,7 +74,8 @@ public interface IBuildV1ApiSync : IApiAccessor /// /// /// ApiResponse of Object(void) - ApiResponse DeleteBuildWithHttpInfo(string appId, int buildId); + [Obsolete] + ApiResponse DeleteBuildDeprecatedWithHttpInfo(string appId, int buildId); /// /// /// @@ -82,7 +86,8 @@ public interface IBuildV1ApiSync : IApiAccessor /// /// /// Build - Build GetBuildInfo(string appId, int buildId); + [Obsolete] + Build GetBuildInfoDeprecated(string appId, int buildId); /// /// @@ -94,7 +99,8 @@ public interface IBuildV1ApiSync : IApiAccessor /// /// /// ApiResponse of Build - ApiResponse GetBuildInfoWithHttpInfo(string appId, int buildId); + [Obsolete] + ApiResponse GetBuildInfoDeprecatedWithHttpInfo(string appId, int buildId); /// /// /// @@ -104,7 +110,8 @@ public interface IBuildV1ApiSync : IApiAccessor /// Thrown when fails to make API call /// /// List<Build> - List GetBuilds(string appId); + [Obsolete] + List GetBuildsDeprecated(string appId); /// /// @@ -115,7 +122,8 @@ public interface IBuildV1ApiSync : IApiAccessor /// Thrown when fails to make API call /// /// ApiResponse of List<Build> - ApiResponse> GetBuildsWithHttpInfo(string appId); + [Obsolete] + ApiResponse> GetBuildsDeprecatedWithHttpInfo(string appId); /// /// /// @@ -127,7 +135,8 @@ public interface IBuildV1ApiSync : IApiAccessor /// /// /// byte[] - byte[] RunBuild(string appId, int buildId, System.IO.Stream file); + [Obsolete] + byte[] RunBuildDeprecated(string appId, int buildId, System.IO.Stream file); /// /// @@ -140,7 +149,8 @@ public interface IBuildV1ApiSync : IApiAccessor /// /// /// ApiResponse of byte[] - ApiResponse RunBuildWithHttpInfo(string appId, int buildId, System.IO.Stream file); + [Obsolete] + ApiResponse RunBuildDeprecatedWithHttpInfo(string appId, int buildId, System.IO.Stream file); #endregion Synchronous Operations } @@ -161,7 +171,8 @@ public interface IBuildV1ApiAsync : IApiAccessor /// /// Cancellation Token to cancel the request. /// Task of Build - System.Threading.Tasks.Task CreateBuildAsync(string appId, CreateBuildParams createBuildParams, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + [Obsolete] + System.Threading.Tasks.Task CreateBuildDeprecatedAsync(string appId, CreateBuildParams createBuildParams, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -174,7 +185,8 @@ public interface IBuildV1ApiAsync : IApiAccessor /// /// Cancellation Token to cancel the request. /// Task of ApiResponse (Build) - System.Threading.Tasks.Task> CreateBuildWithHttpInfoAsync(string appId, CreateBuildParams createBuildParams, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + [Obsolete] + System.Threading.Tasks.Task> CreateBuildDeprecatedWithHttpInfoAsync(string appId, CreateBuildParams createBuildParams, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -186,7 +198,8 @@ public interface IBuildV1ApiAsync : IApiAccessor /// /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeleteBuildAsync(string appId, int buildId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + [Obsolete] + System.Threading.Tasks.Task DeleteBuildDeprecatedAsync(string appId, int buildId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -199,7 +212,8 @@ public interface IBuildV1ApiAsync : IApiAccessor /// /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteBuildWithHttpInfoAsync(string appId, int buildId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + [Obsolete] + System.Threading.Tasks.Task> DeleteBuildDeprecatedWithHttpInfoAsync(string appId, int buildId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -211,7 +225,8 @@ public interface IBuildV1ApiAsync : IApiAccessor /// /// Cancellation Token to cancel the request. /// Task of Build - System.Threading.Tasks.Task GetBuildInfoAsync(string appId, int buildId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + [Obsolete] + System.Threading.Tasks.Task GetBuildInfoDeprecatedAsync(string appId, int buildId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -224,7 +239,8 @@ public interface IBuildV1ApiAsync : IApiAccessor /// /// Cancellation Token to cancel the request. /// Task of ApiResponse (Build) - System.Threading.Tasks.Task> GetBuildInfoWithHttpInfoAsync(string appId, int buildId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + [Obsolete] + System.Threading.Tasks.Task> GetBuildInfoDeprecatedWithHttpInfoAsync(string appId, int buildId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -235,7 +251,8 @@ public interface IBuildV1ApiAsync : IApiAccessor /// /// Cancellation Token to cancel the request. /// Task of List<Build> - System.Threading.Tasks.Task> GetBuildsAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + [Obsolete] + System.Threading.Tasks.Task> GetBuildsDeprecatedAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -247,7 +264,8 @@ public interface IBuildV1ApiAsync : IApiAccessor /// /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Build>) - System.Threading.Tasks.Task>> GetBuildsWithHttpInfoAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + [Obsolete] + System.Threading.Tasks.Task>> GetBuildsDeprecatedWithHttpInfoAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -260,7 +278,8 @@ public interface IBuildV1ApiAsync : IApiAccessor /// /// Cancellation Token to cancel the request. /// Task of byte[] - System.Threading.Tasks.Task RunBuildAsync(string appId, int buildId, System.IO.Stream file, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + [Obsolete] + System.Threading.Tasks.Task RunBuildDeprecatedAsync(string appId, int buildId, System.IO.Stream file, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -274,7 +293,8 @@ public interface IBuildV1ApiAsync : IApiAccessor /// /// Cancellation Token to cancel the request. /// Task of ApiResponse (byte[]) - System.Threading.Tasks.Task> RunBuildWithHttpInfoAsync(string appId, int buildId, System.IO.Stream file, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + [Obsolete] + System.Threading.Tasks.Task> RunBuildDeprecatedWithHttpInfoAsync(string appId, int buildId, System.IO.Stream file, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -426,9 +446,10 @@ public Hathora.Cloud.Sdk.Client.ExceptionFactory ExceptionFactory /// /// /// Build - public Build CreateBuild(string appId, CreateBuildParams createBuildParams) + [Obsolete] + public Build CreateBuildDeprecated(string appId, CreateBuildParams createBuildParams) { - Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = CreateBuildWithHttpInfo(appId, createBuildParams); + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = CreateBuildDeprecatedWithHttpInfo(appId, createBuildParams); return localVarResponse.Data; } @@ -439,15 +460,16 @@ public Build CreateBuild(string appId, CreateBuildParams createBuildParams) /// /// /// ApiResponse of Build - public Hathora.Cloud.Sdk.Client.ApiResponse CreateBuildWithHttpInfo(string appId, CreateBuildParams createBuildParams) + [Obsolete] + public Hathora.Cloud.Sdk.Client.ApiResponse CreateBuildDeprecatedWithHttpInfo(string appId, CreateBuildParams createBuildParams) { // verify the required parameter 'appId' is set if (appId == null) - throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling BuildV1Api->CreateBuild"); + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling BuildV1Api->CreateBuildDeprecated"); // verify the required parameter 'createBuildParams' is set if (createBuildParams == null) - throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'createBuildParams' when calling BuildV1Api->CreateBuild"); + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'createBuildParams' when calling BuildV1Api->CreateBuildDeprecated"); Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); @@ -481,7 +503,7 @@ public Hathora.Cloud.Sdk.Client.ApiResponse CreateBuildWithHttpInfo(strin if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("CreateBuild", localVarResponse); + Exception _exception = this.ExceptionFactory("CreateBuildDeprecated", localVarResponse); if (_exception != null) throw _exception; } @@ -496,9 +518,10 @@ public Hathora.Cloud.Sdk.Client.ApiResponse CreateBuildWithHttpInfo(strin /// /// Cancellation Token to cancel the request. /// Task of Build - public async System.Threading.Tasks.Task CreateBuildAsync(string appId, CreateBuildParams createBuildParams, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + [Obsolete] + public async System.Threading.Tasks.Task CreateBuildDeprecatedAsync(string appId, CreateBuildParams createBuildParams, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - var task = CreateBuildWithHttpInfoAsync(appId, createBuildParams, cancellationToken); + var task = CreateBuildDeprecatedWithHttpInfoAsync(appId, createBuildParams, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task.ConfigureAwait(false); #else @@ -515,15 +538,16 @@ public async System.Threading.Tasks.Task CreateBuildAsync(string appId, C /// /// Cancellation Token to cancel the request. /// Task of ApiResponse (Build) - public async System.Threading.Tasks.Task> CreateBuildWithHttpInfoAsync(string appId, CreateBuildParams createBuildParams, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + [Obsolete] + public async System.Threading.Tasks.Task> CreateBuildDeprecatedWithHttpInfoAsync(string appId, CreateBuildParams createBuildParams, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) - throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling BuildV1Api->CreateBuild"); + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling BuildV1Api->CreateBuildDeprecated"); // verify the required parameter 'createBuildParams' is set if (createBuildParams == null) - throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'createBuildParams' when calling BuildV1Api->CreateBuild"); + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'createBuildParams' when calling BuildV1Api->CreateBuildDeprecated"); Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); @@ -566,7 +590,7 @@ public async System.Threading.Tasks.Task /// /// - public void DeleteBuild(string appId, int buildId) + [Obsolete] + public void DeleteBuildDeprecated(string appId, int buildId) { - DeleteBuildWithHttpInfo(appId, buildId); + DeleteBuildDeprecatedWithHttpInfo(appId, buildId); } /// @@ -592,11 +617,12 @@ public void DeleteBuild(string appId, int buildId) /// /// /// ApiResponse of Object(void) - public Hathora.Cloud.Sdk.Client.ApiResponse DeleteBuildWithHttpInfo(string appId, int buildId) + [Obsolete] + public Hathora.Cloud.Sdk.Client.ApiResponse DeleteBuildDeprecatedWithHttpInfo(string appId, int buildId) { // verify the required parameter 'appId' is set if (appId == null) - throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling BuildV1Api->DeleteBuild"); + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling BuildV1Api->DeleteBuildDeprecated"); Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); @@ -629,7 +655,7 @@ public Hathora.Cloud.Sdk.Client.ApiResponse DeleteBuildWithHttpInfo(stri if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("DeleteBuild", localVarResponse); + Exception _exception = this.ExceptionFactory("DeleteBuildDeprecated", localVarResponse); if (_exception != null) throw _exception; } @@ -644,9 +670,10 @@ public Hathora.Cloud.Sdk.Client.ApiResponse DeleteBuildWithHttpInfo(stri /// /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeleteBuildAsync(string appId, int buildId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + [Obsolete] + public async System.Threading.Tasks.Task DeleteBuildDeprecatedAsync(string appId, int buildId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - var task = DeleteBuildWithHttpInfoAsync(appId, buildId, cancellationToken); + var task = DeleteBuildDeprecatedWithHttpInfoAsync(appId, buildId, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL await task.ConfigureAwait(false); #else @@ -662,11 +689,12 @@ public async System.Threading.Tasks.Task DeleteBuildAsync(string appId, int buil /// /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteBuildWithHttpInfoAsync(string appId, int buildId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + [Obsolete] + public async System.Threading.Tasks.Task> DeleteBuildDeprecatedWithHttpInfoAsync(string appId, int buildId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) - throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling BuildV1Api->DeleteBuild"); + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling BuildV1Api->DeleteBuildDeprecated"); Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); @@ -708,7 +736,7 @@ public async System.Threading.Tasks.Task /// /// Build - public Build GetBuildInfo(string appId, int buildId) + [Obsolete] + public Build GetBuildInfoDeprecated(string appId, int buildId) { - Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = GetBuildInfoWithHttpInfo(appId, buildId); + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = GetBuildInfoDeprecatedWithHttpInfo(appId, buildId); return localVarResponse.Data; } @@ -735,11 +764,12 @@ public Build GetBuildInfo(string appId, int buildId) /// /// /// ApiResponse of Build - public Hathora.Cloud.Sdk.Client.ApiResponse GetBuildInfoWithHttpInfo(string appId, int buildId) + [Obsolete] + public Hathora.Cloud.Sdk.Client.ApiResponse GetBuildInfoDeprecatedWithHttpInfo(string appId, int buildId) { // verify the required parameter 'appId' is set if (appId == null) - throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling BuildV1Api->GetBuildInfo"); + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling BuildV1Api->GetBuildInfoDeprecated"); Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); @@ -772,7 +802,7 @@ public Hathora.Cloud.Sdk.Client.ApiResponse GetBuildInfoWithHttpInfo(stri if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("GetBuildInfo", localVarResponse); + Exception _exception = this.ExceptionFactory("GetBuildInfoDeprecated", localVarResponse); if (_exception != null) throw _exception; } @@ -787,9 +817,10 @@ public Hathora.Cloud.Sdk.Client.ApiResponse GetBuildInfoWithHttpInfo(stri /// /// Cancellation Token to cancel the request. /// Task of Build - public async System.Threading.Tasks.Task GetBuildInfoAsync(string appId, int buildId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + [Obsolete] + public async System.Threading.Tasks.Task GetBuildInfoDeprecatedAsync(string appId, int buildId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - var task = GetBuildInfoWithHttpInfoAsync(appId, buildId, cancellationToken); + var task = GetBuildInfoDeprecatedWithHttpInfoAsync(appId, buildId, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task.ConfigureAwait(false); #else @@ -806,11 +837,12 @@ public async System.Threading.Tasks.Task GetBuildInfoAsync(string appId, /// /// Cancellation Token to cancel the request. /// Task of ApiResponse (Build) - public async System.Threading.Tasks.Task> GetBuildInfoWithHttpInfoAsync(string appId, int buildId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + [Obsolete] + public async System.Threading.Tasks.Task> GetBuildInfoDeprecatedWithHttpInfoAsync(string appId, int buildId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) - throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling BuildV1Api->GetBuildInfo"); + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling BuildV1Api->GetBuildInfoDeprecated"); Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); @@ -852,7 +884,7 @@ public async System.Threading.Tasks.TaskThrown when fails to make API call /// /// List<Build> - public List GetBuilds(string appId) + [Obsolete] + public List GetBuildsDeprecated(string appId) { - Hathora.Cloud.Sdk.Client.ApiResponse> localVarResponse = GetBuildsWithHttpInfo(appId); + Hathora.Cloud.Sdk.Client.ApiResponse> localVarResponse = GetBuildsDeprecatedWithHttpInfo(appId); return localVarResponse.Data; } @@ -877,11 +910,12 @@ public List GetBuilds(string appId) /// Thrown when fails to make API call /// /// ApiResponse of List<Build> - public Hathora.Cloud.Sdk.Client.ApiResponse> GetBuildsWithHttpInfo(string appId) + [Obsolete] + public Hathora.Cloud.Sdk.Client.ApiResponse> GetBuildsDeprecatedWithHttpInfo(string appId) { // verify the required parameter 'appId' is set if (appId == null) - throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling BuildV1Api->GetBuilds"); + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling BuildV1Api->GetBuildsDeprecated"); Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); @@ -913,7 +947,7 @@ public Hathora.Cloud.Sdk.Client.ApiResponse> GetBuildsWithHttpInfo(s if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("GetBuilds", localVarResponse); + Exception _exception = this.ExceptionFactory("GetBuildsDeprecated", localVarResponse); if (_exception != null) throw _exception; } @@ -927,9 +961,10 @@ public Hathora.Cloud.Sdk.Client.ApiResponse> GetBuildsWithHttpInfo(s /// /// Cancellation Token to cancel the request. /// Task of List<Build> - public async System.Threading.Tasks.Task> GetBuildsAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + [Obsolete] + public async System.Threading.Tasks.Task> GetBuildsDeprecatedAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - var task = GetBuildsWithHttpInfoAsync(appId, cancellationToken); + var task = GetBuildsDeprecatedWithHttpInfoAsync(appId, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL Hathora.Cloud.Sdk.Client.ApiResponse> localVarResponse = await task.ConfigureAwait(false); #else @@ -945,11 +980,12 @@ public async System.Threading.Tasks.Task> GetBuildsAsync(string appI /// /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Build>) - public async System.Threading.Tasks.Task>> GetBuildsWithHttpInfoAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + [Obsolete] + public async System.Threading.Tasks.Task>> GetBuildsDeprecatedWithHttpInfoAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) - throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling BuildV1Api->GetBuilds"); + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling BuildV1Api->GetBuildsDeprecated"); Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); @@ -990,7 +1026,7 @@ public async System.Threading.Tasks.Task /// /// byte[] - public byte[] RunBuild(string appId, int buildId, System.IO.Stream file) + [Obsolete] + public byte[] RunBuildDeprecated(string appId, int buildId, System.IO.Stream file) { - Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = RunBuildWithHttpInfo(appId, buildId, file); + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = RunBuildDeprecatedWithHttpInfo(appId, buildId, file); return localVarResponse.Data; } @@ -1019,15 +1056,16 @@ public byte[] RunBuild(string appId, int buildId, System.IO.Stream file) /// /// /// ApiResponse of byte[] - public Hathora.Cloud.Sdk.Client.ApiResponse RunBuildWithHttpInfo(string appId, int buildId, System.IO.Stream file) + [Obsolete] + public Hathora.Cloud.Sdk.Client.ApiResponse RunBuildDeprecatedWithHttpInfo(string appId, int buildId, System.IO.Stream file) { // verify the required parameter 'appId' is set if (appId == null) - throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling BuildV1Api->RunBuild"); + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling BuildV1Api->RunBuildDeprecated"); // verify the required parameter 'file' is set if (file == null) - throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'file' when calling BuildV1Api->RunBuild"); + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'file' when calling BuildV1Api->RunBuildDeprecated"); Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); @@ -1062,7 +1100,7 @@ public Hathora.Cloud.Sdk.Client.ApiResponse RunBuildWithHttpInfo(string if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("RunBuild", localVarResponse); + Exception _exception = this.ExceptionFactory("RunBuildDeprecated", localVarResponse); if (_exception != null) throw _exception; } @@ -1078,9 +1116,10 @@ public Hathora.Cloud.Sdk.Client.ApiResponse RunBuildWithHttpInfo(string /// /// Cancellation Token to cancel the request. /// Task of byte[] - public async System.Threading.Tasks.Task RunBuildAsync(string appId, int buildId, System.IO.Stream file, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + [Obsolete] + public async System.Threading.Tasks.Task RunBuildDeprecatedAsync(string appId, int buildId, System.IO.Stream file, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - var task = RunBuildWithHttpInfoAsync(appId, buildId, file, cancellationToken); + var task = RunBuildDeprecatedWithHttpInfoAsync(appId, buildId, file, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task.ConfigureAwait(false); #else @@ -1098,15 +1137,16 @@ public async System.Threading.Tasks.Task RunBuildAsync(string appId, int /// /// Cancellation Token to cancel the request. /// Task of ApiResponse (byte[]) - public async System.Threading.Tasks.Task> RunBuildWithHttpInfoAsync(string appId, int buildId, System.IO.Stream file, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + [Obsolete] + public async System.Threading.Tasks.Task> RunBuildDeprecatedWithHttpInfoAsync(string appId, int buildId, System.IO.Stream file, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) - throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling BuildV1Api->RunBuild"); + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling BuildV1Api->RunBuildDeprecated"); // verify the required parameter 'file' is set if (file == null) - throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'file' when calling BuildV1Api->RunBuild"); + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'file' when calling BuildV1Api->RunBuildDeprecated"); Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); @@ -1151,7 +1191,7 @@ public async System.Threading.Tasks.Task + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IBuildV2ApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// + /// + /// + /// Creates a new [build](https://hathora.dev/docs/concepts/hathora-entities#build). Responds with a `buildId` that you must pass to [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) to build the game server artifact. You can optionally pass in a `buildTag` to associate an external version with a build. + /// + /// Thrown when fails to make API call + /// + /// + /// Build + Build CreateBuild(string appId, CreateBuildParams createBuildParams); + + /// + /// + /// + /// + /// Creates a new [build](https://hathora.dev/docs/concepts/hathora-entities#build). Responds with a `buildId` that you must pass to [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) to build the game server artifact. You can optionally pass in a `buildTag` to associate an external version with a build. + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of Build + ApiResponse CreateBuildWithHttpInfo(string appId, CreateBuildParams createBuildParams); + /// + /// + /// + /// + /// Delete a [build](https://hathora.dev/docs/concepts/hathora-entities#build). All associated metadata is deleted. + /// + /// Thrown when fails to make API call + /// + /// + /// + void DeleteBuild(string appId, int buildId); + + /// + /// + /// + /// + /// Delete a [build](https://hathora.dev/docs/concepts/hathora-entities#build). All associated metadata is deleted. + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of Object(void) + ApiResponse DeleteBuildWithHttpInfo(string appId, int buildId); + /// + /// + /// + /// + /// Get details for a [build](https://hathora.dev/docs/concepts/hathora-entities#build). + /// + /// Thrown when fails to make API call + /// + /// + /// Build + Build GetBuildInfo(string appId, int buildId); + + /// + /// + /// + /// + /// Get details for a [build](https://hathora.dev/docs/concepts/hathora-entities#build). + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of Build + ApiResponse GetBuildInfoWithHttpInfo(string appId, int buildId); + /// + /// + /// + /// + /// Returns an array of [builds](https://hathora.dev/docs/concepts/hathora-entities#build) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + /// + /// Thrown when fails to make API call + /// + /// List<Build> + List GetBuilds(string appId); + + /// + /// + /// + /// + /// Returns an array of [builds](https://hathora.dev/docs/concepts/hathora-entities#build) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of List<Build> + ApiResponse> GetBuildsWithHttpInfo(string appId); + /// + /// + /// + /// + /// Builds a game server artifact from a tarball you provide. Pass in the `buildId` generated from [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild). + /// + /// Thrown when fails to make API call + /// + /// + /// + /// System.IO.Stream + System.IO.Stream RunBuild(string appId, int buildId, System.IO.Stream file); + + /// + /// + /// + /// + /// Builds a game server artifact from a tarball you provide. Pass in the `buildId` generated from [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild). + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of System.IO.Stream + ApiResponse RunBuildWithHttpInfo(string appId, int buildId, System.IO.Stream file); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IBuildV2ApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// + /// + /// + /// Creates a new [build](https://hathora.dev/docs/concepts/hathora-entities#build). Responds with a `buildId` that you must pass to [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) to build the game server artifact. You can optionally pass in a `buildTag` to associate an external version with a build. + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of Build + System.Threading.Tasks.Task CreateBuildAsync(string appId, CreateBuildParams createBuildParams, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Creates a new [build](https://hathora.dev/docs/concepts/hathora-entities#build). Responds with a `buildId` that you must pass to [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) to build the game server artifact. You can optionally pass in a `buildTag` to associate an external version with a build. + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Build) + System.Threading.Tasks.Task> CreateBuildWithHttpInfoAsync(string appId, CreateBuildParams createBuildParams, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Delete a [build](https://hathora.dev/docs/concepts/hathora-entities#build). All associated metadata is deleted. + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteBuildAsync(string appId, int buildId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Delete a [build](https://hathora.dev/docs/concepts/hathora-entities#build). All associated metadata is deleted. + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteBuildWithHttpInfoAsync(string appId, int buildId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Get details for a [build](https://hathora.dev/docs/concepts/hathora-entities#build). + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of Build + System.Threading.Tasks.Task GetBuildInfoAsync(string appId, int buildId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Get details for a [build](https://hathora.dev/docs/concepts/hathora-entities#build). + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Build) + System.Threading.Tasks.Task> GetBuildInfoWithHttpInfoAsync(string appId, int buildId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Returns an array of [builds](https://hathora.dev/docs/concepts/hathora-entities#build) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of List<Build> + System.Threading.Tasks.Task> GetBuildsAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Returns an array of [builds](https://hathora.dev/docs/concepts/hathora-entities#build) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<Build>) + System.Threading.Tasks.Task>> GetBuildsWithHttpInfoAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Builds a game server artifact from a tarball you provide. Pass in the `buildId` generated from [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild). + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel the request. + /// Task of System.IO.Stream + System.Threading.Tasks.Task RunBuildAsync(string appId, int buildId, System.IO.Stream file, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Builds a game server artifact from a tarball you provide. Pass in the `buildId` generated from [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild). + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (System.IO.Stream) + System.Threading.Tasks.Task> RunBuildWithHttpInfoAsync(string appId, int buildId, System.IO.Stream file, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IBuildV2Api : IBuildV2ApiSync, IBuildV2ApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class BuildV2Api : IDisposable, IBuildV2Api + { + private Hathora.Cloud.Sdk.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. + /// It's better to reuse the HttpClient and HttpClientHandler. + /// + /// + public BuildV2Api() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. + /// It's better to reuse the HttpClient and HttpClientHandler. + /// + /// The target service's base path in URL format. + /// + /// + public BuildV2Api(string basePath) + { + this.Configuration = Hathora.Cloud.Sdk.Client.Configuration.MergeConfigurations( + Hathora.Cloud.Sdk.Client.GlobalConfiguration.Instance, + new Hathora.Cloud.Sdk.Client.Configuration { BasePath = basePath } + ); + this.ApiClient = new Hathora.Cloud.Sdk.Client.ApiClient(this.Configuration.BasePath); + this.Client = this.ApiClient; + this.AsynchronousClient = this.ApiClient; + this.ExceptionFactory = Hathora.Cloud.Sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class using Configuration object. + /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. + /// It's better to reuse the HttpClient and HttpClientHandler. + /// + /// An instance of Configuration. + /// + /// + public BuildV2Api(Hathora.Cloud.Sdk.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = Hathora.Cloud.Sdk.Client.Configuration.MergeConfigurations( + Hathora.Cloud.Sdk.Client.GlobalConfiguration.Instance, + configuration + ); + this.ApiClient = new Hathora.Cloud.Sdk.Client.ApiClient(this.Configuration.BasePath); + this.Client = this.ApiClient; + this.AsynchronousClient = this.ApiClient; + ExceptionFactory = Hathora.Cloud.Sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + /// + public BuildV2Api(Hathora.Cloud.Sdk.Client.ISynchronousClient client, Hathora.Cloud.Sdk.Client.IAsynchronousClient asyncClient, Hathora.Cloud.Sdk.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = Hathora.Cloud.Sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Disposes resources if they were created by us + /// + public void Dispose() + { + this.ApiClient?.Dispose(); + } + + /// + /// Holds the ApiClient if created + /// + public Hathora.Cloud.Sdk.Client.ApiClient ApiClient { get; set; } = null; + + /// + /// The client for accessing this underlying API asynchronously. + /// + public Hathora.Cloud.Sdk.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public Hathora.Cloud.Sdk.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public Hathora.Cloud.Sdk.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public Hathora.Cloud.Sdk.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Creates a new [build](https://hathora.dev/docs/concepts/hathora-entities#build). Responds with a `buildId` that you must pass to [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) to build the game server artifact. You can optionally pass in a `buildTag` to associate an external version with a build. + /// + /// Thrown when fails to make API call + /// + /// + /// Build + public Build CreateBuild(string appId, CreateBuildParams createBuildParams) + { + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = CreateBuildWithHttpInfo(appId, createBuildParams); + return localVarResponse.Data; + } + + /// + /// Creates a new [build](https://hathora.dev/docs/concepts/hathora-entities#build). Responds with a `buildId` that you must pass to [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) to build the game server artifact. You can optionally pass in a `buildTag` to associate an external version with a build. + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of Build + public Hathora.Cloud.Sdk.Client.ApiResponse CreateBuildWithHttpInfo(string appId, CreateBuildParams createBuildParams) + { + // verify the required parameter 'appId' is set + if (appId == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling BuildV2Api->CreateBuild"); + + // verify the required parameter 'createBuildParams' is set + if (createBuildParams == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'createBuildParams' when calling BuildV2Api->CreateBuild"); + + Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("appId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.Data = createBuildParams; + + // authentication (hathoraDevToken) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/builds/v2/{appId}/create", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateBuild", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Creates a new [build](https://hathora.dev/docs/concepts/hathora-entities#build). Responds with a `buildId` that you must pass to [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) to build the game server artifact. You can optionally pass in a `buildTag` to associate an external version with a build. + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of Build + public async System.Threading.Tasks.Task CreateBuildAsync(string appId, CreateBuildParams createBuildParams, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var task = CreateBuildWithHttpInfoAsync(appId, createBuildParams, cancellationToken); +#if UNITY_EDITOR || !UNITY_WEBGL + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task.ConfigureAwait(false); +#else + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task; +#endif + return localVarResponse.Data; + } + + /// + /// Creates a new [build](https://hathora.dev/docs/concepts/hathora-entities#build). Responds with a `buildId` that you must pass to [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) to build the game server artifact. You can optionally pass in a `buildTag` to associate an external version with a build. + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Build) + public async System.Threading.Tasks.Task> CreateBuildWithHttpInfoAsync(string appId, CreateBuildParams createBuildParams, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'appId' is set + if (appId == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling BuildV2Api->CreateBuild"); + + // verify the required parameter 'createBuildParams' is set + if (createBuildParams == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'createBuildParams' when calling BuildV2Api->CreateBuild"); + + + Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("appId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.Data = createBuildParams; + + // authentication (hathoraDevToken) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + + var task = this.AsynchronousClient.PostAsync("/builds/v2/{appId}/create", localVarRequestOptions, this.Configuration, cancellationToken); + +#if UNITY_EDITOR || !UNITY_WEBGL + var localVarResponse = await task.ConfigureAwait(false); +#else + var localVarResponse = await task; +#endif + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateBuild", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Delete a [build](https://hathora.dev/docs/concepts/hathora-entities#build). All associated metadata is deleted. + /// + /// Thrown when fails to make API call + /// + /// + /// + public void DeleteBuild(string appId, int buildId) + { + DeleteBuildWithHttpInfo(appId, buildId); + } + + /// + /// Delete a [build](https://hathora.dev/docs/concepts/hathora-entities#build). All associated metadata is deleted. + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of Object(void) + public Hathora.Cloud.Sdk.Client.ApiResponse DeleteBuildWithHttpInfo(string appId, int buildId) + { + // verify the required parameter 'appId' is set + if (appId == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling BuildV2Api->DeleteBuild"); + + Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("appId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("buildId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(buildId)); // path parameter + + // authentication (hathoraDevToken) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/builds/v2/{appId}/delete/{buildId}", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteBuild", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Delete a [build](https://hathora.dev/docs/concepts/hathora-entities#build). All associated metadata is deleted. + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task DeleteBuildAsync(string appId, int buildId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var task = DeleteBuildWithHttpInfoAsync(appId, buildId, cancellationToken); +#if UNITY_EDITOR || !UNITY_WEBGL + await task.ConfigureAwait(false); +#else + await task; +#endif + } + + /// + /// Delete a [build](https://hathora.dev/docs/concepts/hathora-entities#build). All associated metadata is deleted. + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteBuildWithHttpInfoAsync(string appId, int buildId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'appId' is set + if (appId == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling BuildV2Api->DeleteBuild"); + + + Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("appId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("buildId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(buildId)); // path parameter + + // authentication (hathoraDevToken) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + + var task = this.AsynchronousClient.DeleteAsync("/builds/v2/{appId}/delete/{buildId}", localVarRequestOptions, this.Configuration, cancellationToken); + +#if UNITY_EDITOR || !UNITY_WEBGL + var localVarResponse = await task.ConfigureAwait(false); +#else + var localVarResponse = await task; +#endif + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteBuild", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Get details for a [build](https://hathora.dev/docs/concepts/hathora-entities#build). + /// + /// Thrown when fails to make API call + /// + /// + /// Build + public Build GetBuildInfo(string appId, int buildId) + { + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = GetBuildInfoWithHttpInfo(appId, buildId); + return localVarResponse.Data; + } + + /// + /// Get details for a [build](https://hathora.dev/docs/concepts/hathora-entities#build). + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of Build + public Hathora.Cloud.Sdk.Client.ApiResponse GetBuildInfoWithHttpInfo(string appId, int buildId) + { + // verify the required parameter 'appId' is set + if (appId == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling BuildV2Api->GetBuildInfo"); + + Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("appId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("buildId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(buildId)); // path parameter + + // authentication (hathoraDevToken) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/builds/v2/{appId}/info/{buildId}", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetBuildInfo", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Get details for a [build](https://hathora.dev/docs/concepts/hathora-entities#build). + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of Build + public async System.Threading.Tasks.Task GetBuildInfoAsync(string appId, int buildId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var task = GetBuildInfoWithHttpInfoAsync(appId, buildId, cancellationToken); +#if UNITY_EDITOR || !UNITY_WEBGL + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task.ConfigureAwait(false); +#else + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task; +#endif + return localVarResponse.Data; + } + + /// + /// Get details for a [build](https://hathora.dev/docs/concepts/hathora-entities#build). + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Build) + public async System.Threading.Tasks.Task> GetBuildInfoWithHttpInfoAsync(string appId, int buildId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'appId' is set + if (appId == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling BuildV2Api->GetBuildInfo"); + + + Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("appId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("buildId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(buildId)); // path parameter + + // authentication (hathoraDevToken) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + + var task = this.AsynchronousClient.GetAsync("/builds/v2/{appId}/info/{buildId}", localVarRequestOptions, this.Configuration, cancellationToken); + +#if UNITY_EDITOR || !UNITY_WEBGL + var localVarResponse = await task.ConfigureAwait(false); +#else + var localVarResponse = await task; +#endif + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetBuildInfo", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Returns an array of [builds](https://hathora.dev/docs/concepts/hathora-entities#build) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + /// + /// Thrown when fails to make API call + /// + /// List<Build> + public List GetBuilds(string appId) + { + Hathora.Cloud.Sdk.Client.ApiResponse> localVarResponse = GetBuildsWithHttpInfo(appId); + return localVarResponse.Data; + } + + /// + /// Returns an array of [builds](https://hathora.dev/docs/concepts/hathora-entities#build) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of List<Build> + public Hathora.Cloud.Sdk.Client.ApiResponse> GetBuildsWithHttpInfo(string appId) + { + // verify the required parameter 'appId' is set + if (appId == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling BuildV2Api->GetBuilds"); + + Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("appId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(appId)); // path parameter + + // authentication (hathoraDevToken) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Get>("/builds/v2/{appId}/list", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetBuilds", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Returns an array of [builds](https://hathora.dev/docs/concepts/hathora-entities#build) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of List<Build> + public async System.Threading.Tasks.Task> GetBuildsAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var task = GetBuildsWithHttpInfoAsync(appId, cancellationToken); +#if UNITY_EDITOR || !UNITY_WEBGL + Hathora.Cloud.Sdk.Client.ApiResponse> localVarResponse = await task.ConfigureAwait(false); +#else + Hathora.Cloud.Sdk.Client.ApiResponse> localVarResponse = await task; +#endif + return localVarResponse.Data; + } + + /// + /// Returns an array of [builds](https://hathora.dev/docs/concepts/hathora-entities#build) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<Build>) + public async System.Threading.Tasks.Task>> GetBuildsWithHttpInfoAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'appId' is set + if (appId == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling BuildV2Api->GetBuilds"); + + + Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("appId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(appId)); // path parameter + + // authentication (hathoraDevToken) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + + var task = this.AsynchronousClient.GetAsync>("/builds/v2/{appId}/list", localVarRequestOptions, this.Configuration, cancellationToken); + +#if UNITY_EDITOR || !UNITY_WEBGL + var localVarResponse = await task.ConfigureAwait(false); +#else + var localVarResponse = await task; +#endif + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetBuilds", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Builds a game server artifact from a tarball you provide. Pass in the `buildId` generated from [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild). + /// + /// Thrown when fails to make API call + /// + /// + /// + /// System.IO.Stream + public System.IO.Stream RunBuild(string appId, int buildId, System.IO.Stream file) + { + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = RunBuildWithHttpInfo(appId, buildId, file); + return localVarResponse.Data; + } + + /// + /// Builds a game server artifact from a tarball you provide. Pass in the `buildId` generated from [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild). + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of System.IO.Stream + public Hathora.Cloud.Sdk.Client.ApiResponse RunBuildWithHttpInfo(string appId, int buildId, System.IO.Stream file) + { + // verify the required parameter 'appId' is set + if (appId == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling BuildV2Api->RunBuild"); + + // verify the required parameter 'file' is set + if (file == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'file' when calling BuildV2Api->RunBuild"); + + Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "multipart/form-data" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/octet-stream", + "application/json" + }; + + var localVarContentType = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("appId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("buildId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(buildId)); // path parameter + + // authentication (hathoraDevToken) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/builds/v2/{appId}/run/{buildId}", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RunBuild", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Builds a game server artifact from a tarball you provide. Pass in the `buildId` generated from [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild). + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel the request. + /// Task of System.IO.Stream + public async System.Threading.Tasks.Task RunBuildAsync(string appId, int buildId, System.IO.Stream file, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var task = RunBuildWithHttpInfoAsync(appId, buildId, file, cancellationToken); +#if UNITY_EDITOR || !UNITY_WEBGL + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task.ConfigureAwait(false); +#else + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task; +#endif + return localVarResponse.Data; + } + + /// + /// Builds a game server artifact from a tarball you provide. Pass in the `buildId` generated from [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild). + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (System.IO.Stream) + public async System.Threading.Tasks.Task> RunBuildWithHttpInfoAsync(string appId, int buildId, System.IO.Stream file, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'appId' is set + if (appId == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling BuildV2Api->RunBuild"); + + // verify the required parameter 'file' is set + if (file == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'file' when calling BuildV2Api->RunBuild"); + + + Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "multipart/form-data" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/octet-stream", + "application/json" + }; + + + var localVarContentType = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("appId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("buildId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(buildId)); // path parameter + + // authentication (hathoraDevToken) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + + var task = this.AsynchronousClient.PostAsync("/builds/v2/{appId}/run/{buildId}", localVarRequestOptions, this.Configuration, cancellationToken); + +#if UNITY_EDITOR || !UNITY_WEBGL + var localVarResponse = await task.ConfigureAwait(false); +#else + var localVarResponse = await task; +#endif + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RunBuild", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk/Api/DeploymentV1Api.cs b/csharp/src/Hathora.Cloud.Sdk/Api/DeploymentV1Api.cs index ab54d43..7e03391 100644 --- a/csharp/src/Hathora.Cloud.Sdk/Api/DeploymentV1Api.cs +++ b/csharp/src/Hathora.Cloud.Sdk/Api/DeploymentV1Api.cs @@ -37,7 +37,8 @@ public interface IDeploymentV1ApiSync : IApiAccessor /// /// /// Deployment - Deployment CreateDeployment(string appId, int buildId, DeploymentConfig deploymentConfig); + [Obsolete] + Deployment CreateDeploymentDeprecated(string appId, int buildId, DeploymentConfig deploymentConfig); /// /// @@ -50,7 +51,8 @@ public interface IDeploymentV1ApiSync : IApiAccessor /// /// /// ApiResponse of Deployment - ApiResponse CreateDeploymentWithHttpInfo(string appId, int buildId, DeploymentConfig deploymentConfig); + [Obsolete] + ApiResponse CreateDeploymentDeprecatedWithHttpInfo(string appId, int buildId, DeploymentConfig deploymentConfig); /// /// /// @@ -61,7 +63,8 @@ public interface IDeploymentV1ApiSync : IApiAccessor /// /// /// Deployment - Deployment GetDeploymentInfo(string appId, int deploymentId); + [Obsolete] + Deployment GetDeploymentInfoDeprecated(string appId, int deploymentId); /// /// @@ -73,7 +76,8 @@ public interface IDeploymentV1ApiSync : IApiAccessor /// /// /// ApiResponse of Deployment - ApiResponse GetDeploymentInfoWithHttpInfo(string appId, int deploymentId); + [Obsolete] + ApiResponse GetDeploymentInfoDeprecatedWithHttpInfo(string appId, int deploymentId); /// /// /// @@ -83,7 +87,8 @@ public interface IDeploymentV1ApiSync : IApiAccessor /// Thrown when fails to make API call /// /// List<Deployment> - List GetDeployments(string appId); + [Obsolete] + List GetDeploymentsDeprecated(string appId); /// /// @@ -94,7 +99,8 @@ public interface IDeploymentV1ApiSync : IApiAccessor /// Thrown when fails to make API call /// /// ApiResponse of List<Deployment> - ApiResponse> GetDeploymentsWithHttpInfo(string appId); + [Obsolete] + ApiResponse> GetDeploymentsDeprecatedWithHttpInfo(string appId); /// /// /// @@ -104,7 +110,8 @@ public interface IDeploymentV1ApiSync : IApiAccessor /// Thrown when fails to make API call /// /// Deployment - Deployment GetLatestDeployment(string appId); + [Obsolete] + Deployment GetLatestDeploymentDeprecated(string appId); /// /// @@ -115,7 +122,8 @@ public interface IDeploymentV1ApiSync : IApiAccessor /// Thrown when fails to make API call /// /// ApiResponse of Deployment - ApiResponse GetLatestDeploymentWithHttpInfo(string appId); + [Obsolete] + ApiResponse GetLatestDeploymentDeprecatedWithHttpInfo(string appId); #endregion Synchronous Operations } @@ -137,7 +145,8 @@ public interface IDeploymentV1ApiAsync : IApiAccessor /// /// Cancellation Token to cancel the request. /// Task of Deployment - System.Threading.Tasks.Task CreateDeploymentAsync(string appId, int buildId, DeploymentConfig deploymentConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + [Obsolete] + System.Threading.Tasks.Task CreateDeploymentDeprecatedAsync(string appId, int buildId, DeploymentConfig deploymentConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -151,7 +160,8 @@ public interface IDeploymentV1ApiAsync : IApiAccessor /// /// Cancellation Token to cancel the request. /// Task of ApiResponse (Deployment) - System.Threading.Tasks.Task> CreateDeploymentWithHttpInfoAsync(string appId, int buildId, DeploymentConfig deploymentConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + [Obsolete] + System.Threading.Tasks.Task> CreateDeploymentDeprecatedWithHttpInfoAsync(string appId, int buildId, DeploymentConfig deploymentConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -163,7 +173,8 @@ public interface IDeploymentV1ApiAsync : IApiAccessor /// /// Cancellation Token to cancel the request. /// Task of Deployment - System.Threading.Tasks.Task GetDeploymentInfoAsync(string appId, int deploymentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + [Obsolete] + System.Threading.Tasks.Task GetDeploymentInfoDeprecatedAsync(string appId, int deploymentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -176,7 +187,8 @@ public interface IDeploymentV1ApiAsync : IApiAccessor /// /// Cancellation Token to cancel the request. /// Task of ApiResponse (Deployment) - System.Threading.Tasks.Task> GetDeploymentInfoWithHttpInfoAsync(string appId, int deploymentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + [Obsolete] + System.Threading.Tasks.Task> GetDeploymentInfoDeprecatedWithHttpInfoAsync(string appId, int deploymentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -187,7 +199,8 @@ public interface IDeploymentV1ApiAsync : IApiAccessor /// /// Cancellation Token to cancel the request. /// Task of List<Deployment> - System.Threading.Tasks.Task> GetDeploymentsAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + [Obsolete] + System.Threading.Tasks.Task> GetDeploymentsDeprecatedAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -199,7 +212,8 @@ public interface IDeploymentV1ApiAsync : IApiAccessor /// /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Deployment>) - System.Threading.Tasks.Task>> GetDeploymentsWithHttpInfoAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + [Obsolete] + System.Threading.Tasks.Task>> GetDeploymentsDeprecatedWithHttpInfoAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -210,7 +224,8 @@ public interface IDeploymentV1ApiAsync : IApiAccessor /// /// Cancellation Token to cancel the request. /// Task of Deployment - System.Threading.Tasks.Task GetLatestDeploymentAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + [Obsolete] + System.Threading.Tasks.Task GetLatestDeploymentDeprecatedAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -222,7 +237,8 @@ public interface IDeploymentV1ApiAsync : IApiAccessor /// /// Cancellation Token to cancel the request. /// Task of ApiResponse (Deployment) - System.Threading.Tasks.Task> GetLatestDeploymentWithHttpInfoAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + [Obsolete] + System.Threading.Tasks.Task> GetLatestDeploymentDeprecatedWithHttpInfoAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -375,9 +391,10 @@ public Hathora.Cloud.Sdk.Client.ExceptionFactory ExceptionFactory /// /// /// Deployment - public Deployment CreateDeployment(string appId, int buildId, DeploymentConfig deploymentConfig) + [Obsolete] + public Deployment CreateDeploymentDeprecated(string appId, int buildId, DeploymentConfig deploymentConfig) { - Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = CreateDeploymentWithHttpInfo(appId, buildId, deploymentConfig); + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = CreateDeploymentDeprecatedWithHttpInfo(appId, buildId, deploymentConfig); return localVarResponse.Data; } @@ -389,15 +406,16 @@ public Deployment CreateDeployment(string appId, int buildId, DeploymentConfig d /// /// /// ApiResponse of Deployment - public Hathora.Cloud.Sdk.Client.ApiResponse CreateDeploymentWithHttpInfo(string appId, int buildId, DeploymentConfig deploymentConfig) + [Obsolete] + public Hathora.Cloud.Sdk.Client.ApiResponse CreateDeploymentDeprecatedWithHttpInfo(string appId, int buildId, DeploymentConfig deploymentConfig) { // verify the required parameter 'appId' is set if (appId == null) - throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling DeploymentV1Api->CreateDeployment"); + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling DeploymentV1Api->CreateDeploymentDeprecated"); // verify the required parameter 'deploymentConfig' is set if (deploymentConfig == null) - throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'deploymentConfig' when calling DeploymentV1Api->CreateDeployment"); + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'deploymentConfig' when calling DeploymentV1Api->CreateDeploymentDeprecated"); Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); @@ -432,7 +450,7 @@ public Hathora.Cloud.Sdk.Client.ApiResponse CreateDeploymentWithHttp if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("CreateDeployment", localVarResponse); + Exception _exception = this.ExceptionFactory("CreateDeploymentDeprecated", localVarResponse); if (_exception != null) throw _exception; } @@ -448,9 +466,10 @@ public Hathora.Cloud.Sdk.Client.ApiResponse CreateDeploymentWithHttp /// /// Cancellation Token to cancel the request. /// Task of Deployment - public async System.Threading.Tasks.Task CreateDeploymentAsync(string appId, int buildId, DeploymentConfig deploymentConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + [Obsolete] + public async System.Threading.Tasks.Task CreateDeploymentDeprecatedAsync(string appId, int buildId, DeploymentConfig deploymentConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - var task = CreateDeploymentWithHttpInfoAsync(appId, buildId, deploymentConfig, cancellationToken); + var task = CreateDeploymentDeprecatedWithHttpInfoAsync(appId, buildId, deploymentConfig, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task.ConfigureAwait(false); #else @@ -468,15 +487,16 @@ public async System.Threading.Tasks.Task CreateDeploymentAsync(strin /// /// Cancellation Token to cancel the request. /// Task of ApiResponse (Deployment) - public async System.Threading.Tasks.Task> CreateDeploymentWithHttpInfoAsync(string appId, int buildId, DeploymentConfig deploymentConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + [Obsolete] + public async System.Threading.Tasks.Task> CreateDeploymentDeprecatedWithHttpInfoAsync(string appId, int buildId, DeploymentConfig deploymentConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) - throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling DeploymentV1Api->CreateDeployment"); + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling DeploymentV1Api->CreateDeploymentDeprecated"); // verify the required parameter 'deploymentConfig' is set if (deploymentConfig == null) - throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'deploymentConfig' when calling DeploymentV1Api->CreateDeployment"); + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'deploymentConfig' when calling DeploymentV1Api->CreateDeploymentDeprecated"); Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); @@ -520,7 +540,7 @@ public async System.Threading.Tasks.Task /// /// Deployment - public Deployment GetDeploymentInfo(string appId, int deploymentId) + [Obsolete] + public Deployment GetDeploymentInfoDeprecated(string appId, int deploymentId) { - Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = GetDeploymentInfoWithHttpInfo(appId, deploymentId); + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = GetDeploymentInfoDeprecatedWithHttpInfo(appId, deploymentId); return localVarResponse.Data; } @@ -547,11 +568,12 @@ public Deployment GetDeploymentInfo(string appId, int deploymentId) /// /// /// ApiResponse of Deployment - public Hathora.Cloud.Sdk.Client.ApiResponse GetDeploymentInfoWithHttpInfo(string appId, int deploymentId) + [Obsolete] + public Hathora.Cloud.Sdk.Client.ApiResponse GetDeploymentInfoDeprecatedWithHttpInfo(string appId, int deploymentId) { // verify the required parameter 'appId' is set if (appId == null) - throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling DeploymentV1Api->GetDeploymentInfo"); + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling DeploymentV1Api->GetDeploymentInfoDeprecated"); Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); @@ -584,7 +606,7 @@ public Hathora.Cloud.Sdk.Client.ApiResponse GetDeploymentInfoWithHtt if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("GetDeploymentInfo", localVarResponse); + Exception _exception = this.ExceptionFactory("GetDeploymentInfoDeprecated", localVarResponse); if (_exception != null) throw _exception; } @@ -599,9 +621,10 @@ public Hathora.Cloud.Sdk.Client.ApiResponse GetDeploymentInfoWithHtt /// /// Cancellation Token to cancel the request. /// Task of Deployment - public async System.Threading.Tasks.Task GetDeploymentInfoAsync(string appId, int deploymentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + [Obsolete] + public async System.Threading.Tasks.Task GetDeploymentInfoDeprecatedAsync(string appId, int deploymentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - var task = GetDeploymentInfoWithHttpInfoAsync(appId, deploymentId, cancellationToken); + var task = GetDeploymentInfoDeprecatedWithHttpInfoAsync(appId, deploymentId, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task.ConfigureAwait(false); #else @@ -618,11 +641,12 @@ public async System.Threading.Tasks.Task GetDeploymentInfoAsync(stri /// /// Cancellation Token to cancel the request. /// Task of ApiResponse (Deployment) - public async System.Threading.Tasks.Task> GetDeploymentInfoWithHttpInfoAsync(string appId, int deploymentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + [Obsolete] + public async System.Threading.Tasks.Task> GetDeploymentInfoDeprecatedWithHttpInfoAsync(string appId, int deploymentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) - throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling DeploymentV1Api->GetDeploymentInfo"); + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling DeploymentV1Api->GetDeploymentInfoDeprecated"); Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); @@ -664,7 +688,7 @@ public async System.Threading.Tasks.TaskThrown when fails to make API call /// /// List<Deployment> - public List GetDeployments(string appId) + [Obsolete] + public List GetDeploymentsDeprecated(string appId) { - Hathora.Cloud.Sdk.Client.ApiResponse> localVarResponse = GetDeploymentsWithHttpInfo(appId); + Hathora.Cloud.Sdk.Client.ApiResponse> localVarResponse = GetDeploymentsDeprecatedWithHttpInfo(appId); return localVarResponse.Data; } @@ -689,11 +714,12 @@ public List GetDeployments(string appId) /// Thrown when fails to make API call /// /// ApiResponse of List<Deployment> - public Hathora.Cloud.Sdk.Client.ApiResponse> GetDeploymentsWithHttpInfo(string appId) + [Obsolete] + public Hathora.Cloud.Sdk.Client.ApiResponse> GetDeploymentsDeprecatedWithHttpInfo(string appId) { // verify the required parameter 'appId' is set if (appId == null) - throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling DeploymentV1Api->GetDeployments"); + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling DeploymentV1Api->GetDeploymentsDeprecated"); Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); @@ -725,7 +751,7 @@ public Hathora.Cloud.Sdk.Client.ApiResponse> GetDeploymentsWith if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("GetDeployments", localVarResponse); + Exception _exception = this.ExceptionFactory("GetDeploymentsDeprecated", localVarResponse); if (_exception != null) throw _exception; } @@ -739,9 +765,10 @@ public Hathora.Cloud.Sdk.Client.ApiResponse> GetDeploymentsWith /// /// Cancellation Token to cancel the request. /// Task of List<Deployment> - public async System.Threading.Tasks.Task> GetDeploymentsAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + [Obsolete] + public async System.Threading.Tasks.Task> GetDeploymentsDeprecatedAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - var task = GetDeploymentsWithHttpInfoAsync(appId, cancellationToken); + var task = GetDeploymentsDeprecatedWithHttpInfoAsync(appId, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL Hathora.Cloud.Sdk.Client.ApiResponse> localVarResponse = await task.ConfigureAwait(false); #else @@ -757,11 +784,12 @@ public async System.Threading.Tasks.Task> GetDeploymentsAsync(s /// /// Cancellation Token to cancel the request. /// Task of ApiResponse (List<Deployment>) - public async System.Threading.Tasks.Task>> GetDeploymentsWithHttpInfoAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + [Obsolete] + public async System.Threading.Tasks.Task>> GetDeploymentsDeprecatedWithHttpInfoAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) - throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling DeploymentV1Api->GetDeployments"); + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling DeploymentV1Api->GetDeploymentsDeprecated"); Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); @@ -802,7 +830,7 @@ public async System.Threading.Tasks.TaskThrown when fails to make API call /// /// Deployment - public Deployment GetLatestDeployment(string appId) + [Obsolete] + public Deployment GetLatestDeploymentDeprecated(string appId) { - Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = GetLatestDeploymentWithHttpInfo(appId); + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = GetLatestDeploymentDeprecatedWithHttpInfo(appId); return localVarResponse.Data; } @@ -827,11 +856,12 @@ public Deployment GetLatestDeployment(string appId) /// Thrown when fails to make API call /// /// ApiResponse of Deployment - public Hathora.Cloud.Sdk.Client.ApiResponse GetLatestDeploymentWithHttpInfo(string appId) + [Obsolete] + public Hathora.Cloud.Sdk.Client.ApiResponse GetLatestDeploymentDeprecatedWithHttpInfo(string appId) { // verify the required parameter 'appId' is set if (appId == null) - throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling DeploymentV1Api->GetLatestDeployment"); + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling DeploymentV1Api->GetLatestDeploymentDeprecated"); Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); @@ -863,7 +893,7 @@ public Hathora.Cloud.Sdk.Client.ApiResponse GetLatestDeploymentWithH if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("GetLatestDeployment", localVarResponse); + Exception _exception = this.ExceptionFactory("GetLatestDeploymentDeprecated", localVarResponse); if (_exception != null) throw _exception; } @@ -877,9 +907,10 @@ public Hathora.Cloud.Sdk.Client.ApiResponse GetLatestDeploymentWithH /// /// Cancellation Token to cancel the request. /// Task of Deployment - public async System.Threading.Tasks.Task GetLatestDeploymentAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + [Obsolete] + public async System.Threading.Tasks.Task GetLatestDeploymentDeprecatedAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - var task = GetLatestDeploymentWithHttpInfoAsync(appId, cancellationToken); + var task = GetLatestDeploymentDeprecatedWithHttpInfoAsync(appId, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task.ConfigureAwait(false); #else @@ -895,11 +926,12 @@ public async System.Threading.Tasks.Task GetLatestDeploymentAsync(st /// /// Cancellation Token to cancel the request. /// Task of ApiResponse (Deployment) - public async System.Threading.Tasks.Task> GetLatestDeploymentWithHttpInfoAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + [Obsolete] + public async System.Threading.Tasks.Task> GetLatestDeploymentDeprecatedWithHttpInfoAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) - throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling DeploymentV1Api->GetLatestDeployment"); + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling DeploymentV1Api->GetLatestDeploymentDeprecated"); Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); @@ -940,7 +972,7 @@ public async System.Threading.Tasks.Task + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IDeploymentV2ApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// + /// + /// + /// Create a new [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). Creating a new deployment means all new rooms created will use the latest deployment configuration, but existing games in progress will not be affected. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// DeploymentV2 + DeploymentV2 CreateDeployment(string appId, int buildId, DeploymentConfigV2 deploymentConfigV2); + + /// + /// + /// + /// + /// Create a new [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). Creating a new deployment means all new rooms created will use the latest deployment configuration, but existing games in progress will not be affected. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of DeploymentV2 + ApiResponse CreateDeploymentWithHttpInfo(string appId, int buildId, DeploymentConfigV2 deploymentConfigV2); + /// + /// + /// + /// + /// Get details for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). + /// + /// Thrown when fails to make API call + /// + /// + /// DeploymentV2 + DeploymentV2 GetDeploymentInfo(string appId, int deploymentId); + + /// + /// + /// + /// + /// Get details for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of DeploymentV2 + ApiResponse GetDeploymentInfoWithHttpInfo(string appId, int deploymentId); + /// + /// + /// + /// + /// Returns an array of [deployments](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + /// + /// Thrown when fails to make API call + /// + /// List<DeploymentV2> + List GetDeployments(string appId); + + /// + /// + /// + /// + /// Returns an array of [deployments](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of List<DeploymentV2> + ApiResponse> GetDeploymentsWithHttpInfo(string appId); + /// + /// + /// + /// + /// Get the latest [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + /// + /// Thrown when fails to make API call + /// + /// DeploymentV2 + DeploymentV2 GetLatestDeployment(string appId); + + /// + /// + /// + /// + /// Get the latest [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of DeploymentV2 + ApiResponse GetLatestDeploymentWithHttpInfo(string appId); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IDeploymentV2ApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// + /// + /// + /// Create a new [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). Creating a new deployment means all new rooms created will use the latest deployment configuration, but existing games in progress will not be affected. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel the request. + /// Task of DeploymentV2 + System.Threading.Tasks.Task CreateDeploymentAsync(string appId, int buildId, DeploymentConfigV2 deploymentConfigV2, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Create a new [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). Creating a new deployment means all new rooms created will use the latest deployment configuration, but existing games in progress will not be affected. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (DeploymentV2) + System.Threading.Tasks.Task> CreateDeploymentWithHttpInfoAsync(string appId, int buildId, DeploymentConfigV2 deploymentConfigV2, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Get details for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of DeploymentV2 + System.Threading.Tasks.Task GetDeploymentInfoAsync(string appId, int deploymentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Get details for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (DeploymentV2) + System.Threading.Tasks.Task> GetDeploymentInfoWithHttpInfoAsync(string appId, int deploymentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Returns an array of [deployments](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of List<DeploymentV2> + System.Threading.Tasks.Task> GetDeploymentsAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Returns an array of [deployments](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<DeploymentV2>) + System.Threading.Tasks.Task>> GetDeploymentsWithHttpInfoAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Get the latest [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of DeploymentV2 + System.Threading.Tasks.Task GetLatestDeploymentAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Get the latest [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (DeploymentV2) + System.Threading.Tasks.Task> GetLatestDeploymentWithHttpInfoAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IDeploymentV2Api : IDeploymentV2ApiSync, IDeploymentV2ApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class DeploymentV2Api : IDisposable, IDeploymentV2Api + { + private Hathora.Cloud.Sdk.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. + /// It's better to reuse the HttpClient and HttpClientHandler. + /// + /// + public DeploymentV2Api() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. + /// It's better to reuse the HttpClient and HttpClientHandler. + /// + /// The target service's base path in URL format. + /// + /// + public DeploymentV2Api(string basePath) + { + this.Configuration = Hathora.Cloud.Sdk.Client.Configuration.MergeConfigurations( + Hathora.Cloud.Sdk.Client.GlobalConfiguration.Instance, + new Hathora.Cloud.Sdk.Client.Configuration { BasePath = basePath } + ); + this.ApiClient = new Hathora.Cloud.Sdk.Client.ApiClient(this.Configuration.BasePath); + this.Client = this.ApiClient; + this.AsynchronousClient = this.ApiClient; + this.ExceptionFactory = Hathora.Cloud.Sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class using Configuration object. + /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. + /// It's better to reuse the HttpClient and HttpClientHandler. + /// + /// An instance of Configuration. + /// + /// + public DeploymentV2Api(Hathora.Cloud.Sdk.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = Hathora.Cloud.Sdk.Client.Configuration.MergeConfigurations( + Hathora.Cloud.Sdk.Client.GlobalConfiguration.Instance, + configuration + ); + this.ApiClient = new Hathora.Cloud.Sdk.Client.ApiClient(this.Configuration.BasePath); + this.Client = this.ApiClient; + this.AsynchronousClient = this.ApiClient; + ExceptionFactory = Hathora.Cloud.Sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + /// + public DeploymentV2Api(Hathora.Cloud.Sdk.Client.ISynchronousClient client, Hathora.Cloud.Sdk.Client.IAsynchronousClient asyncClient, Hathora.Cloud.Sdk.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = Hathora.Cloud.Sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Disposes resources if they were created by us + /// + public void Dispose() + { + this.ApiClient?.Dispose(); + } + + /// + /// Holds the ApiClient if created + /// + public Hathora.Cloud.Sdk.Client.ApiClient ApiClient { get; set; } = null; + + /// + /// The client for accessing this underlying API asynchronously. + /// + public Hathora.Cloud.Sdk.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public Hathora.Cloud.Sdk.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public Hathora.Cloud.Sdk.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public Hathora.Cloud.Sdk.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Create a new [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). Creating a new deployment means all new rooms created will use the latest deployment configuration, but existing games in progress will not be affected. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// DeploymentV2 + public DeploymentV2 CreateDeployment(string appId, int buildId, DeploymentConfigV2 deploymentConfigV2) + { + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = CreateDeploymentWithHttpInfo(appId, buildId, deploymentConfigV2); + return localVarResponse.Data; + } + + /// + /// Create a new [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). Creating a new deployment means all new rooms created will use the latest deployment configuration, but existing games in progress will not be affected. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of DeploymentV2 + public Hathora.Cloud.Sdk.Client.ApiResponse CreateDeploymentWithHttpInfo(string appId, int buildId, DeploymentConfigV2 deploymentConfigV2) + { + // verify the required parameter 'appId' is set + if (appId == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling DeploymentV2Api->CreateDeployment"); + + // verify the required parameter 'deploymentConfigV2' is set + if (deploymentConfigV2 == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'deploymentConfigV2' when calling DeploymentV2Api->CreateDeployment"); + + Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("appId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("buildId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(buildId)); // path parameter + localVarRequestOptions.Data = deploymentConfigV2; + + // authentication (hathoraDevToken) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/deployments/v2/{appId}/create/{buildId}", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateDeployment", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Create a new [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). Creating a new deployment means all new rooms created will use the latest deployment configuration, but existing games in progress will not be affected. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel the request. + /// Task of DeploymentV2 + public async System.Threading.Tasks.Task CreateDeploymentAsync(string appId, int buildId, DeploymentConfigV2 deploymentConfigV2, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var task = CreateDeploymentWithHttpInfoAsync(appId, buildId, deploymentConfigV2, cancellationToken); +#if UNITY_EDITOR || !UNITY_WEBGL + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task.ConfigureAwait(false); +#else + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task; +#endif + return localVarResponse.Data; + } + + /// + /// Create a new [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). Creating a new deployment means all new rooms created will use the latest deployment configuration, but existing games in progress will not be affected. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (DeploymentV2) + public async System.Threading.Tasks.Task> CreateDeploymentWithHttpInfoAsync(string appId, int buildId, DeploymentConfigV2 deploymentConfigV2, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'appId' is set + if (appId == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling DeploymentV2Api->CreateDeployment"); + + // verify the required parameter 'deploymentConfigV2' is set + if (deploymentConfigV2 == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'deploymentConfigV2' when calling DeploymentV2Api->CreateDeployment"); + + + Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("appId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("buildId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(buildId)); // path parameter + localVarRequestOptions.Data = deploymentConfigV2; + + // authentication (hathoraDevToken) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + + var task = this.AsynchronousClient.PostAsync("/deployments/v2/{appId}/create/{buildId}", localVarRequestOptions, this.Configuration, cancellationToken); + +#if UNITY_EDITOR || !UNITY_WEBGL + var localVarResponse = await task.ConfigureAwait(false); +#else + var localVarResponse = await task; +#endif + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateDeployment", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Get details for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). + /// + /// Thrown when fails to make API call + /// + /// + /// DeploymentV2 + public DeploymentV2 GetDeploymentInfo(string appId, int deploymentId) + { + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = GetDeploymentInfoWithHttpInfo(appId, deploymentId); + return localVarResponse.Data; + } + + /// + /// Get details for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of DeploymentV2 + public Hathora.Cloud.Sdk.Client.ApiResponse GetDeploymentInfoWithHttpInfo(string appId, int deploymentId) + { + // verify the required parameter 'appId' is set + if (appId == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling DeploymentV2Api->GetDeploymentInfo"); + + Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("appId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("deploymentId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(deploymentId)); // path parameter + + // authentication (hathoraDevToken) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/deployments/v2/{appId}/info/{deploymentId}", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetDeploymentInfo", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Get details for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of DeploymentV2 + public async System.Threading.Tasks.Task GetDeploymentInfoAsync(string appId, int deploymentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var task = GetDeploymentInfoWithHttpInfoAsync(appId, deploymentId, cancellationToken); +#if UNITY_EDITOR || !UNITY_WEBGL + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task.ConfigureAwait(false); +#else + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task; +#endif + return localVarResponse.Data; + } + + /// + /// Get details for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (DeploymentV2) + public async System.Threading.Tasks.Task> GetDeploymentInfoWithHttpInfoAsync(string appId, int deploymentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'appId' is set + if (appId == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling DeploymentV2Api->GetDeploymentInfo"); + + + Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("appId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("deploymentId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(deploymentId)); // path parameter + + // authentication (hathoraDevToken) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + + var task = this.AsynchronousClient.GetAsync("/deployments/v2/{appId}/info/{deploymentId}", localVarRequestOptions, this.Configuration, cancellationToken); + +#if UNITY_EDITOR || !UNITY_WEBGL + var localVarResponse = await task.ConfigureAwait(false); +#else + var localVarResponse = await task; +#endif + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetDeploymentInfo", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Returns an array of [deployments](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + /// + /// Thrown when fails to make API call + /// + /// List<DeploymentV2> + public List GetDeployments(string appId) + { + Hathora.Cloud.Sdk.Client.ApiResponse> localVarResponse = GetDeploymentsWithHttpInfo(appId); + return localVarResponse.Data; + } + + /// + /// Returns an array of [deployments](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of List<DeploymentV2> + public Hathora.Cloud.Sdk.Client.ApiResponse> GetDeploymentsWithHttpInfo(string appId) + { + // verify the required parameter 'appId' is set + if (appId == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling DeploymentV2Api->GetDeployments"); + + Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("appId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(appId)); // path parameter + + // authentication (hathoraDevToken) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Get>("/deployments/v2/{appId}/list", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetDeployments", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Returns an array of [deployments](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of List<DeploymentV2> + public async System.Threading.Tasks.Task> GetDeploymentsAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var task = GetDeploymentsWithHttpInfoAsync(appId, cancellationToken); +#if UNITY_EDITOR || !UNITY_WEBGL + Hathora.Cloud.Sdk.Client.ApiResponse> localVarResponse = await task.ConfigureAwait(false); +#else + Hathora.Cloud.Sdk.Client.ApiResponse> localVarResponse = await task; +#endif + return localVarResponse.Data; + } + + /// + /// Returns an array of [deployments](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<DeploymentV2>) + public async System.Threading.Tasks.Task>> GetDeploymentsWithHttpInfoAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'appId' is set + if (appId == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling DeploymentV2Api->GetDeployments"); + + + Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("appId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(appId)); // path parameter + + // authentication (hathoraDevToken) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + + var task = this.AsynchronousClient.GetAsync>("/deployments/v2/{appId}/list", localVarRequestOptions, this.Configuration, cancellationToken); + +#if UNITY_EDITOR || !UNITY_WEBGL + var localVarResponse = await task.ConfigureAwait(false); +#else + var localVarResponse = await task; +#endif + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetDeployments", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Get the latest [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + /// + /// Thrown when fails to make API call + /// + /// DeploymentV2 + public DeploymentV2 GetLatestDeployment(string appId) + { + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = GetLatestDeploymentWithHttpInfo(appId); + return localVarResponse.Data; + } + + /// + /// Get the latest [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of DeploymentV2 + public Hathora.Cloud.Sdk.Client.ApiResponse GetLatestDeploymentWithHttpInfo(string appId) + { + // verify the required parameter 'appId' is set + if (appId == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling DeploymentV2Api->GetLatestDeployment"); + + Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("appId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(appId)); // path parameter + + // authentication (hathoraDevToken) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/deployments/v2/{appId}/latest", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetLatestDeployment", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Get the latest [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of DeploymentV2 + public async System.Threading.Tasks.Task GetLatestDeploymentAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var task = GetLatestDeploymentWithHttpInfoAsync(appId, cancellationToken); +#if UNITY_EDITOR || !UNITY_WEBGL + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task.ConfigureAwait(false); +#else + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task; +#endif + return localVarResponse.Data; + } + + /// + /// Get the latest [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (DeploymentV2) + public async System.Threading.Tasks.Task> GetLatestDeploymentWithHttpInfoAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'appId' is set + if (appId == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling DeploymentV2Api->GetLatestDeployment"); + + + Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("appId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(appId)); // path parameter + + // authentication (hathoraDevToken) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + + var task = this.AsynchronousClient.GetAsync("/deployments/v2/{appId}/latest", localVarRequestOptions, this.Configuration, cancellationToken); + +#if UNITY_EDITOR || !UNITY_WEBGL + var localVarResponse = await task.ConfigureAwait(false); +#else + var localVarResponse = await task; +#endif + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetLatestDeployment", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk/Api/DiscoveryV1Api.cs b/csharp/src/Hathora.Cloud.Sdk/Api/DiscoveryV1Api.cs index 0e4443a..b03d7e0 100644 --- a/csharp/src/Hathora.Cloud.Sdk/Api/DiscoveryV1Api.cs +++ b/csharp/src/Hathora.Cloud.Sdk/Api/DiscoveryV1Api.cs @@ -30,21 +30,23 @@ public interface IDiscoveryV1ApiSync : IApiAccessor /// /// /// - /// Returns an array of all regions with a host and port that a client can directly ping. Open a websocket connection to `wss://<host>:<port>/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. + /// Returns an array of V1 regions with a host and port that a client can directly ping. Open a websocket connection to `wss://<host>:<port>/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. /// /// Thrown when fails to make API call - /// List<DiscoveryResponseInner> - List GetPingServiceEndpoints(); + /// List<PingEndpointsInner> + [Obsolete] + List GetPingServiceEndpointsDeprecated(); /// /// /// /// - /// Returns an array of all regions with a host and port that a client can directly ping. Open a websocket connection to `wss://<host>:<port>/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. + /// Returns an array of V1 regions with a host and port that a client can directly ping. Open a websocket connection to `wss://<host>:<port>/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. /// /// Thrown when fails to make API call - /// ApiResponse of List<DiscoveryResponseInner> - ApiResponse> GetPingServiceEndpointsWithHttpInfo(); + /// ApiResponse of List<PingEndpointsInner> + [Obsolete] + ApiResponse> GetPingServiceEndpointsDeprecatedWithHttpInfo(); #endregion Synchronous Operations } @@ -58,23 +60,25 @@ public interface IDiscoveryV1ApiAsync : IApiAccessor /// /// /// - /// Returns an array of all regions with a host and port that a client can directly ping. Open a websocket connection to `wss://<host>:<port>/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. + /// Returns an array of V1 regions with a host and port that a client can directly ping. Open a websocket connection to `wss://<host>:<port>/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. /// /// Thrown when fails to make API call /// Cancellation Token to cancel the request. - /// Task of List<DiscoveryResponseInner> - System.Threading.Tasks.Task> GetPingServiceEndpointsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of List<PingEndpointsInner> + [Obsolete] + System.Threading.Tasks.Task> GetPingServiceEndpointsDeprecatedAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// /// - /// Returns an array of all regions with a host and port that a client can directly ping. Open a websocket connection to `wss://<host>:<port>/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. + /// Returns an array of V1 regions with a host and port that a client can directly ping. Open a websocket connection to `wss://<host>:<port>/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. /// /// Thrown when fails to make API call /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<DiscoveryResponseInner>) - System.Threading.Tasks.Task>> GetPingServiceEndpointsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (List<PingEndpointsInner>) + [Obsolete] + System.Threading.Tasks.Task>> GetPingServiceEndpointsDeprecatedWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -220,22 +224,24 @@ public Hathora.Cloud.Sdk.Client.ExceptionFactory ExceptionFactory } /// - /// Returns an array of all regions with a host and port that a client can directly ping. Open a websocket connection to `wss://<host>:<port>/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. + /// Returns an array of V1 regions with a host and port that a client can directly ping. Open a websocket connection to `wss://<host>:<port>/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. /// /// Thrown when fails to make API call - /// List<DiscoveryResponseInner> - public List GetPingServiceEndpoints() + /// List<PingEndpointsInner> + [Obsolete] + public List GetPingServiceEndpointsDeprecated() { - Hathora.Cloud.Sdk.Client.ApiResponse> localVarResponse = GetPingServiceEndpointsWithHttpInfo(); + Hathora.Cloud.Sdk.Client.ApiResponse> localVarResponse = GetPingServiceEndpointsDeprecatedWithHttpInfo(); return localVarResponse.Data; } /// - /// Returns an array of all regions with a host and port that a client can directly ping. Open a websocket connection to `wss://<host>:<port>/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. + /// Returns an array of V1 regions with a host and port that a client can directly ping. Open a websocket connection to `wss://<host>:<port>/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. /// /// Thrown when fails to make API call - /// ApiResponse of List<DiscoveryResponseInner> - public Hathora.Cloud.Sdk.Client.ApiResponse> GetPingServiceEndpointsWithHttpInfo() + /// ApiResponse of List<PingEndpointsInner> + [Obsolete] + public Hathora.Cloud.Sdk.Client.ApiResponse> GetPingServiceEndpointsDeprecatedWithHttpInfo() { Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); @@ -256,11 +262,11 @@ public Hathora.Cloud.Sdk.Client.ApiResponse> GetPin // make the HTTP request - var localVarResponse = this.Client.Get>("/discovery/v1/ping", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get>("/discovery/v1/ping", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("GetPingServiceEndpoints", localVarResponse); + Exception _exception = this.ExceptionFactory("GetPingServiceEndpointsDeprecated", localVarResponse); if (_exception != null) throw _exception; } @@ -268,29 +274,31 @@ public Hathora.Cloud.Sdk.Client.ApiResponse> GetPin } /// - /// Returns an array of all regions with a host and port that a client can directly ping. Open a websocket connection to `wss://<host>:<port>/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. + /// Returns an array of V1 regions with a host and port that a client can directly ping. Open a websocket connection to `wss://<host>:<port>/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. /// /// Thrown when fails to make API call /// Cancellation Token to cancel the request. - /// Task of List<DiscoveryResponseInner> - public async System.Threading.Tasks.Task> GetPingServiceEndpointsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of List<PingEndpointsInner> + [Obsolete] + public async System.Threading.Tasks.Task> GetPingServiceEndpointsDeprecatedAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - var task = GetPingServiceEndpointsWithHttpInfoAsync(cancellationToken); + var task = GetPingServiceEndpointsDeprecatedWithHttpInfoAsync(cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL - Hathora.Cloud.Sdk.Client.ApiResponse> localVarResponse = await task.ConfigureAwait(false); + Hathora.Cloud.Sdk.Client.ApiResponse> localVarResponse = await task.ConfigureAwait(false); #else - Hathora.Cloud.Sdk.Client.ApiResponse> localVarResponse = await task; + Hathora.Cloud.Sdk.Client.ApiResponse> localVarResponse = await task; #endif return localVarResponse.Data; } /// - /// Returns an array of all regions with a host and port that a client can directly ping. Open a websocket connection to `wss://<host>:<port>/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. + /// Returns an array of V1 regions with a host and port that a client can directly ping. Open a websocket connection to `wss://<host>:<port>/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. /// /// Thrown when fails to make API call /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<DiscoveryResponseInner>) - public async System.Threading.Tasks.Task>> GetPingServiceEndpointsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (List<PingEndpointsInner>) + [Obsolete] + public async System.Threading.Tasks.Task>> GetPingServiceEndpointsDeprecatedWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); @@ -314,7 +322,7 @@ public async System.Threading.Tasks.Task>("/discovery/v1/ping", localVarRequestOptions, this.Configuration, cancellationToken); + var task = this.AsynchronousClient.GetAsync>("/discovery/v1/ping", localVarRequestOptions, this.Configuration, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL var localVarResponse = await task.ConfigureAwait(false); @@ -324,7 +332,7 @@ public async System.Threading.Tasks.Task + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IDiscoveryV2ApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// + /// + /// + /// Returns an array of all regions with a host and port that a client can directly ping. Open a websocket connection to `wss://<host>:<port>/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. + /// + /// Thrown when fails to make API call + /// List<PingEndpointsInner> + List GetPingServiceEndpoints(); + + /// + /// + /// + /// + /// Returns an array of all regions with a host and port that a client can directly ping. Open a websocket connection to `wss://<host>:<port>/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. + /// + /// Thrown when fails to make API call + /// ApiResponse of List<PingEndpointsInner> + ApiResponse> GetPingServiceEndpointsWithHttpInfo(); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IDiscoveryV2ApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// + /// + /// + /// Returns an array of all regions with a host and port that a client can directly ping. Open a websocket connection to `wss://<host>:<port>/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. + /// + /// Thrown when fails to make API call + /// Cancellation Token to cancel the request. + /// Task of List<PingEndpointsInner> + System.Threading.Tasks.Task> GetPingServiceEndpointsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Returns an array of all regions with a host and port that a client can directly ping. Open a websocket connection to `wss://<host>:<port>/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. + /// + /// Thrown when fails to make API call + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<PingEndpointsInner>) + System.Threading.Tasks.Task>> GetPingServiceEndpointsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IDiscoveryV2Api : IDiscoveryV2ApiSync, IDiscoveryV2ApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class DiscoveryV2Api : IDisposable, IDiscoveryV2Api + { + private Hathora.Cloud.Sdk.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. + /// It's better to reuse the HttpClient and HttpClientHandler. + /// + /// + public DiscoveryV2Api() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. + /// It's better to reuse the HttpClient and HttpClientHandler. + /// + /// The target service's base path in URL format. + /// + /// + public DiscoveryV2Api(string basePath) + { + this.Configuration = Hathora.Cloud.Sdk.Client.Configuration.MergeConfigurations( + Hathora.Cloud.Sdk.Client.GlobalConfiguration.Instance, + new Hathora.Cloud.Sdk.Client.Configuration { BasePath = basePath } + ); + this.ApiClient = new Hathora.Cloud.Sdk.Client.ApiClient(this.Configuration.BasePath); + this.Client = this.ApiClient; + this.AsynchronousClient = this.ApiClient; + this.ExceptionFactory = Hathora.Cloud.Sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class using Configuration object. + /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. + /// It's better to reuse the HttpClient and HttpClientHandler. + /// + /// An instance of Configuration. + /// + /// + public DiscoveryV2Api(Hathora.Cloud.Sdk.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = Hathora.Cloud.Sdk.Client.Configuration.MergeConfigurations( + Hathora.Cloud.Sdk.Client.GlobalConfiguration.Instance, + configuration + ); + this.ApiClient = new Hathora.Cloud.Sdk.Client.ApiClient(this.Configuration.BasePath); + this.Client = this.ApiClient; + this.AsynchronousClient = this.ApiClient; + ExceptionFactory = Hathora.Cloud.Sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + /// + public DiscoveryV2Api(Hathora.Cloud.Sdk.Client.ISynchronousClient client, Hathora.Cloud.Sdk.Client.IAsynchronousClient asyncClient, Hathora.Cloud.Sdk.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = Hathora.Cloud.Sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Disposes resources if they were created by us + /// + public void Dispose() + { + this.ApiClient?.Dispose(); + } + + /// + /// Holds the ApiClient if created + /// + public Hathora.Cloud.Sdk.Client.ApiClient ApiClient { get; set; } = null; + + /// + /// The client for accessing this underlying API asynchronously. + /// + public Hathora.Cloud.Sdk.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public Hathora.Cloud.Sdk.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public Hathora.Cloud.Sdk.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public Hathora.Cloud.Sdk.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Returns an array of all regions with a host and port that a client can directly ping. Open a websocket connection to `wss://<host>:<port>/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. + /// + /// Thrown when fails to make API call + /// List<PingEndpointsInner> + public List GetPingServiceEndpoints() + { + Hathora.Cloud.Sdk.Client.ApiResponse> localVarResponse = GetPingServiceEndpointsWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Returns an array of all regions with a host and port that a client can directly ping. Open a websocket connection to `wss://<host>:<port>/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. + /// + /// Thrown when fails to make API call + /// ApiResponse of List<PingEndpointsInner> + public Hathora.Cloud.Sdk.Client.ApiResponse> GetPingServiceEndpointsWithHttpInfo() + { + Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + + + // make the HTTP request + var localVarResponse = this.Client.Get>("/discovery/v2/ping", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetPingServiceEndpoints", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Returns an array of all regions with a host and port that a client can directly ping. Open a websocket connection to `wss://<host>:<port>/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. + /// + /// Thrown when fails to make API call + /// Cancellation Token to cancel the request. + /// Task of List<PingEndpointsInner> + public async System.Threading.Tasks.Task> GetPingServiceEndpointsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var task = GetPingServiceEndpointsWithHttpInfoAsync(cancellationToken); +#if UNITY_EDITOR || !UNITY_WEBGL + Hathora.Cloud.Sdk.Client.ApiResponse> localVarResponse = await task.ConfigureAwait(false); +#else + Hathora.Cloud.Sdk.Client.ApiResponse> localVarResponse = await task; +#endif + return localVarResponse.Data; + } + + /// + /// Returns an array of all regions with a host and port that a client can directly ping. Open a websocket connection to `wss://<host>:<port>/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. + /// + /// Thrown when fails to make API call + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (List<PingEndpointsInner>) + public async System.Threading.Tasks.Task>> GetPingServiceEndpointsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + + + // make the HTTP request + + var task = this.AsynchronousClient.GetAsync>("/discovery/v2/ping", localVarRequestOptions, this.Configuration, cancellationToken); + +#if UNITY_EDITOR || !UNITY_WEBGL + var localVarResponse = await task.ConfigureAwait(false); +#else + var localVarResponse = await task; +#endif + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetPingServiceEndpoints", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk/Api/LogV1Api.cs b/csharp/src/Hathora.Cloud.Sdk/Api/LogV1Api.cs index 17b377b..bf45cff 100644 --- a/csharp/src/Hathora.Cloud.Sdk/Api/LogV1Api.cs +++ b/csharp/src/Hathora.Cloud.Sdk/Api/LogV1Api.cs @@ -35,8 +35,8 @@ public interface ILogV1ApiSync : IApiAccessor /// Thrown when fails to make API call /// /// - /// byte[] - byte[] DownloadLogForProcess(string appId, string processId); + /// System.IO.Stream + System.IO.Stream DownloadLogForProcess(string appId, string processId); /// /// @@ -47,8 +47,8 @@ public interface ILogV1ApiSync : IApiAccessor /// Thrown when fails to make API call /// /// - /// ApiResponse of byte[] - ApiResponse DownloadLogForProcessWithHttpInfo(string appId, string processId); + /// ApiResponse of System.IO.Stream + ApiResponse DownloadLogForProcessWithHttpInfo(string appId, string processId); /// /// /// @@ -60,9 +60,9 @@ public interface ILogV1ApiSync : IApiAccessor /// (optional, default to false) /// (optional) /// (optional) - /// byte[] + /// System.IO.Stream [Obsolete] - byte[] GetLogsForApp(string appId, bool? follow = default(bool?), int? tailLines = default(int?), Region? region = default(Region?)); + System.IO.Stream GetLogsForApp(string appId, bool? follow = default(bool?), int? tailLines = default(int?), Region? region = default(Region?)); /// /// @@ -75,9 +75,9 @@ public interface ILogV1ApiSync : IApiAccessor /// (optional, default to false) /// (optional) /// (optional) - /// ApiResponse of byte[] + /// ApiResponse of System.IO.Stream [Obsolete] - ApiResponse GetLogsForAppWithHttpInfo(string appId, bool? follow = default(bool?), int? tailLines = default(int?), Region? region = default(Region?)); + ApiResponse GetLogsForAppWithHttpInfo(string appId, bool? follow = default(bool?), int? tailLines = default(int?), Region? region = default(Region?)); /// /// /// @@ -89,9 +89,9 @@ public interface ILogV1ApiSync : IApiAccessor /// /// (optional, default to false) /// (optional) - /// byte[] + /// System.IO.Stream [Obsolete] - byte[] GetLogsForDeployment(string appId, int deploymentId, bool? follow = default(bool?), int? tailLines = default(int?)); + System.IO.Stream GetLogsForDeployment(string appId, int deploymentId, bool? follow = default(bool?), int? tailLines = default(int?)); /// /// @@ -104,9 +104,9 @@ public interface ILogV1ApiSync : IApiAccessor /// /// (optional, default to false) /// (optional) - /// ApiResponse of byte[] + /// ApiResponse of System.IO.Stream [Obsolete] - ApiResponse GetLogsForDeploymentWithHttpInfo(string appId, int deploymentId, bool? follow = default(bool?), int? tailLines = default(int?)); + ApiResponse GetLogsForDeploymentWithHttpInfo(string appId, int deploymentId, bool? follow = default(bool?), int? tailLines = default(int?)); /// /// /// @@ -118,8 +118,8 @@ public interface ILogV1ApiSync : IApiAccessor /// /// (optional, default to false) /// (optional) - /// byte[] - byte[] GetLogsForProcess(string appId, string processId, bool? follow = default(bool?), int? tailLines = default(int?)); + /// System.IO.Stream + System.IO.Stream GetLogsForProcess(string appId, string processId, bool? follow = default(bool?), int? tailLines = default(int?)); /// /// @@ -132,8 +132,8 @@ public interface ILogV1ApiSync : IApiAccessor /// /// (optional, default to false) /// (optional) - /// ApiResponse of byte[] - ApiResponse GetLogsForProcessWithHttpInfo(string appId, string processId, bool? follow = default(bool?), int? tailLines = default(int?)); + /// ApiResponse of System.IO.Stream + ApiResponse GetLogsForProcessWithHttpInfo(string appId, string processId, bool? follow = default(bool?), int? tailLines = default(int?)); #endregion Synchronous Operations } @@ -153,8 +153,8 @@ public interface ILogV1ApiAsync : IApiAccessor /// /// /// Cancellation Token to cancel the request. - /// Task of byte[] - System.Threading.Tasks.Task DownloadLogForProcessAsync(string appId, string processId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of System.IO.Stream + System.Threading.Tasks.Task DownloadLogForProcessAsync(string appId, string processId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -166,8 +166,8 @@ public interface ILogV1ApiAsync : IApiAccessor /// /// /// Cancellation Token to cancel the request. - /// Task of ApiResponse (byte[]) - System.Threading.Tasks.Task> DownloadLogForProcessWithHttpInfoAsync(string appId, string processId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (System.IO.Stream) + System.Threading.Tasks.Task> DownloadLogForProcessWithHttpInfoAsync(string appId, string processId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -180,9 +180,9 @@ public interface ILogV1ApiAsync : IApiAccessor /// (optional) /// (optional) /// Cancellation Token to cancel the request. - /// Task of byte[] + /// Task of System.IO.Stream [Obsolete] - System.Threading.Tasks.Task GetLogsForAppAsync(string appId, bool? follow = default(bool?), int? tailLines = default(int?), Region? region = default(Region?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetLogsForAppAsync(string appId, bool? follow = default(bool?), int? tailLines = default(int?), Region? region = default(Region?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -196,9 +196,9 @@ public interface ILogV1ApiAsync : IApiAccessor /// (optional) /// (optional) /// Cancellation Token to cancel the request. - /// Task of ApiResponse (byte[]) + /// Task of ApiResponse (System.IO.Stream) [Obsolete] - System.Threading.Tasks.Task> GetLogsForAppWithHttpInfoAsync(string appId, bool? follow = default(bool?), int? tailLines = default(int?), Region? region = default(Region?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetLogsForAppWithHttpInfoAsync(string appId, bool? follow = default(bool?), int? tailLines = default(int?), Region? region = default(Region?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -211,9 +211,9 @@ public interface ILogV1ApiAsync : IApiAccessor /// (optional, default to false) /// (optional) /// Cancellation Token to cancel the request. - /// Task of byte[] + /// Task of System.IO.Stream [Obsolete] - System.Threading.Tasks.Task GetLogsForDeploymentAsync(string appId, int deploymentId, bool? follow = default(bool?), int? tailLines = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetLogsForDeploymentAsync(string appId, int deploymentId, bool? follow = default(bool?), int? tailLines = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -227,9 +227,9 @@ public interface ILogV1ApiAsync : IApiAccessor /// (optional, default to false) /// (optional) /// Cancellation Token to cancel the request. - /// Task of ApiResponse (byte[]) + /// Task of ApiResponse (System.IO.Stream) [Obsolete] - System.Threading.Tasks.Task> GetLogsForDeploymentWithHttpInfoAsync(string appId, int deploymentId, bool? follow = default(bool?), int? tailLines = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetLogsForDeploymentWithHttpInfoAsync(string appId, int deploymentId, bool? follow = default(bool?), int? tailLines = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -242,8 +242,8 @@ public interface ILogV1ApiAsync : IApiAccessor /// (optional, default to false) /// (optional) /// Cancellation Token to cancel the request. - /// Task of byte[] - System.Threading.Tasks.Task GetLogsForProcessAsync(string appId, string processId, bool? follow = default(bool?), int? tailLines = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of System.IO.Stream + System.Threading.Tasks.Task GetLogsForProcessAsync(string appId, string processId, bool? follow = default(bool?), int? tailLines = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -257,8 +257,8 @@ public interface ILogV1ApiAsync : IApiAccessor /// (optional, default to false) /// (optional) /// Cancellation Token to cancel the request. - /// Task of ApiResponse (byte[]) - System.Threading.Tasks.Task> GetLogsForProcessWithHttpInfoAsync(string appId, string processId, bool? follow = default(bool?), int? tailLines = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (System.IO.Stream) + System.Threading.Tasks.Task> GetLogsForProcessWithHttpInfoAsync(string appId, string processId, bool? follow = default(bool?), int? tailLines = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -409,10 +409,10 @@ public Hathora.Cloud.Sdk.Client.ExceptionFactory ExceptionFactory /// Thrown when fails to make API call /// /// - /// byte[] - public byte[] DownloadLogForProcess(string appId, string processId) + /// System.IO.Stream + public System.IO.Stream DownloadLogForProcess(string appId, string processId) { - Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = DownloadLogForProcessWithHttpInfo(appId, processId); + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = DownloadLogForProcessWithHttpInfo(appId, processId); return localVarResponse.Data; } @@ -422,8 +422,8 @@ public byte[] DownloadLogForProcess(string appId, string processId) /// Thrown when fails to make API call /// /// - /// ApiResponse of byte[] - public Hathora.Cloud.Sdk.Client.ApiResponse DownloadLogForProcessWithHttpInfo(string appId, string processId) + /// ApiResponse of System.IO.Stream + public Hathora.Cloud.Sdk.Client.ApiResponse DownloadLogForProcessWithHttpInfo(string appId, string processId) { // verify the required parameter 'appId' is set if (appId == null) @@ -440,7 +440,7 @@ public Hathora.Cloud.Sdk.Client.ApiResponse DownloadLogForProcessWithHtt // to determine the Accept header string[] _accepts = new string[] { - "text/plain", + "application/octet-stream", "application/json" }; @@ -461,7 +461,7 @@ public Hathora.Cloud.Sdk.Client.ApiResponse DownloadLogForProcessWithHtt } // make the HTTP request - var localVarResponse = this.Client.Get("/logs/v1/{appId}/process/{processId}/download", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get("/logs/v1/{appId}/process/{processId}/download", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { @@ -479,14 +479,14 @@ public Hathora.Cloud.Sdk.Client.ApiResponse DownloadLogForProcessWithHtt /// /// /// Cancellation Token to cancel the request. - /// Task of byte[] - public async System.Threading.Tasks.Task DownloadLogForProcessAsync(string appId, string processId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of System.IO.Stream + public async System.Threading.Tasks.Task DownloadLogForProcessAsync(string appId, string processId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var task = DownloadLogForProcessWithHttpInfoAsync(appId, processId, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL - Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task.ConfigureAwait(false); + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task.ConfigureAwait(false); #else - Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task; + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task; #endif return localVarResponse.Data; } @@ -498,8 +498,8 @@ public async System.Threading.Tasks.Task DownloadLogForProcessAsync(stri /// /// /// Cancellation Token to cancel the request. - /// Task of ApiResponse (byte[]) - public async System.Threading.Tasks.Task> DownloadLogForProcessWithHttpInfoAsync(string appId, string processId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (System.IO.Stream) + public async System.Threading.Tasks.Task> DownloadLogForProcessWithHttpInfoAsync(string appId, string processId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) @@ -517,7 +517,7 @@ public async System.Threading.Tasks.Task("/logs/v1/{appId}/process/{processId}/download", localVarRequestOptions, this.Configuration, cancellationToken); + var task = this.AsynchronousClient.GetAsync("/logs/v1/{appId}/process/{processId}/download", localVarRequestOptions, this.Configuration, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL var localVarResponse = await task.ConfigureAwait(false); @@ -565,11 +565,11 @@ public async System.Threading.Tasks.Task (optional, default to false) /// (optional) /// (optional) - /// byte[] + /// System.IO.Stream [Obsolete] - public byte[] GetLogsForApp(string appId, bool? follow = default(bool?), int? tailLines = default(int?), Region? region = default(Region?)) + public System.IO.Stream GetLogsForApp(string appId, bool? follow = default(bool?), int? tailLines = default(int?), Region? region = default(Region?)) { - Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = GetLogsForAppWithHttpInfo(appId, follow, tailLines, region); + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = GetLogsForAppWithHttpInfo(appId, follow, tailLines, region); return localVarResponse.Data; } @@ -581,9 +581,9 @@ public byte[] GetLogsForApp(string appId, bool? follow = default(bool?), int? ta /// (optional, default to false) /// (optional) /// (optional) - /// ApiResponse of byte[] + /// ApiResponse of System.IO.Stream [Obsolete] - public Hathora.Cloud.Sdk.Client.ApiResponse GetLogsForAppWithHttpInfo(string appId, bool? follow = default(bool?), int? tailLines = default(int?), Region? region = default(Region?)) + public Hathora.Cloud.Sdk.Client.ApiResponse GetLogsForAppWithHttpInfo(string appId, bool? follow = default(bool?), int? tailLines = default(int?), Region? region = default(Region?)) { // verify the required parameter 'appId' is set if (appId == null) @@ -596,7 +596,7 @@ public Hathora.Cloud.Sdk.Client.ApiResponse GetLogsForAppWithHttpInfo(st // to determine the Accept header string[] _accepts = new string[] { - "text/plain", + "application/octet-stream", "application/json" }; @@ -628,7 +628,7 @@ public Hathora.Cloud.Sdk.Client.ApiResponse GetLogsForAppWithHttpInfo(st } // make the HTTP request - var localVarResponse = this.Client.Get("/logs/v1/{appId}/all", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get("/logs/v1/{appId}/all", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { @@ -648,15 +648,15 @@ public Hathora.Cloud.Sdk.Client.ApiResponse GetLogsForAppWithHttpInfo(st /// (optional) /// (optional) /// Cancellation Token to cancel the request. - /// Task of byte[] + /// Task of System.IO.Stream [Obsolete] - public async System.Threading.Tasks.Task GetLogsForAppAsync(string appId, bool? follow = default(bool?), int? tailLines = default(int?), Region? region = default(Region?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetLogsForAppAsync(string appId, bool? follow = default(bool?), int? tailLines = default(int?), Region? region = default(Region?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var task = GetLogsForAppWithHttpInfoAsync(appId, follow, tailLines, region, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL - Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task.ConfigureAwait(false); + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task.ConfigureAwait(false); #else - Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task; + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task; #endif return localVarResponse.Data; } @@ -670,9 +670,9 @@ public async System.Threading.Tasks.Task GetLogsForAppAsync(string appId /// (optional) /// (optional) /// Cancellation Token to cancel the request. - /// Task of ApiResponse (byte[]) + /// Task of ApiResponse (System.IO.Stream) [Obsolete] - public async System.Threading.Tasks.Task> GetLogsForAppWithHttpInfoAsync(string appId, bool? follow = default(bool?), int? tailLines = default(int?), Region? region = default(Region?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetLogsForAppWithHttpInfoAsync(string appId, bool? follow = default(bool?), int? tailLines = default(int?), Region? region = default(Region?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) @@ -686,7 +686,7 @@ public async System.Threading.Tasks.Task("/logs/v1/{appId}/all", localVarRequestOptions, this.Configuration, cancellationToken); + var task = this.AsynchronousClient.GetAsync("/logs/v1/{appId}/all", localVarRequestOptions, this.Configuration, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL var localVarResponse = await task.ConfigureAwait(false); @@ -745,11 +745,11 @@ public async System.Threading.Tasks.Task /// (optional, default to false) /// (optional) - /// byte[] + /// System.IO.Stream [Obsolete] - public byte[] GetLogsForDeployment(string appId, int deploymentId, bool? follow = default(bool?), int? tailLines = default(int?)) + public System.IO.Stream GetLogsForDeployment(string appId, int deploymentId, bool? follow = default(bool?), int? tailLines = default(int?)) { - Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = GetLogsForDeploymentWithHttpInfo(appId, deploymentId, follow, tailLines); + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = GetLogsForDeploymentWithHttpInfo(appId, deploymentId, follow, tailLines); return localVarResponse.Data; } @@ -761,9 +761,9 @@ public byte[] GetLogsForDeployment(string appId, int deploymentId, bool? follow /// /// (optional, default to false) /// (optional) - /// ApiResponse of byte[] + /// ApiResponse of System.IO.Stream [Obsolete] - public Hathora.Cloud.Sdk.Client.ApiResponse GetLogsForDeploymentWithHttpInfo(string appId, int deploymentId, bool? follow = default(bool?), int? tailLines = default(int?)) + public Hathora.Cloud.Sdk.Client.ApiResponse GetLogsForDeploymentWithHttpInfo(string appId, int deploymentId, bool? follow = default(bool?), int? tailLines = default(int?)) { // verify the required parameter 'appId' is set if (appId == null) @@ -776,7 +776,7 @@ public Hathora.Cloud.Sdk.Client.ApiResponse GetLogsForDeploymentWithHttp // to determine the Accept header string[] _accepts = new string[] { - "text/plain", + "application/octet-stream", "application/json" }; @@ -805,7 +805,7 @@ public Hathora.Cloud.Sdk.Client.ApiResponse GetLogsForDeploymentWithHttp } // make the HTTP request - var localVarResponse = this.Client.Get("/logs/v1/{appId}/deployment/{deploymentId}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get("/logs/v1/{appId}/deployment/{deploymentId}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { @@ -825,15 +825,15 @@ public Hathora.Cloud.Sdk.Client.ApiResponse GetLogsForDeploymentWithHttp /// (optional, default to false) /// (optional) /// Cancellation Token to cancel the request. - /// Task of byte[] + /// Task of System.IO.Stream [Obsolete] - public async System.Threading.Tasks.Task GetLogsForDeploymentAsync(string appId, int deploymentId, bool? follow = default(bool?), int? tailLines = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task GetLogsForDeploymentAsync(string appId, int deploymentId, bool? follow = default(bool?), int? tailLines = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var task = GetLogsForDeploymentWithHttpInfoAsync(appId, deploymentId, follow, tailLines, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL - Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task.ConfigureAwait(false); + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task.ConfigureAwait(false); #else - Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task; + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task; #endif return localVarResponse.Data; } @@ -847,9 +847,9 @@ public async System.Threading.Tasks.Task GetLogsForDeploymentAsync(strin /// (optional, default to false) /// (optional) /// Cancellation Token to cancel the request. - /// Task of ApiResponse (byte[]) + /// Task of ApiResponse (System.IO.Stream) [Obsolete] - public async System.Threading.Tasks.Task> GetLogsForDeploymentWithHttpInfoAsync(string appId, int deploymentId, bool? follow = default(bool?), int? tailLines = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetLogsForDeploymentWithHttpInfoAsync(string appId, int deploymentId, bool? follow = default(bool?), int? tailLines = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) @@ -863,7 +863,7 @@ public async System.Threading.Tasks.Task("/logs/v1/{appId}/deployment/{deploymentId}", localVarRequestOptions, this.Configuration, cancellationToken); + var task = this.AsynchronousClient.GetAsync("/logs/v1/{appId}/deployment/{deploymentId}", localVarRequestOptions, this.Configuration, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL var localVarResponse = await task.ConfigureAwait(false); @@ -919,10 +919,10 @@ public async System.Threading.Tasks.Task /// (optional, default to false) /// (optional) - /// byte[] - public byte[] GetLogsForProcess(string appId, string processId, bool? follow = default(bool?), int? tailLines = default(int?)) + /// System.IO.Stream + public System.IO.Stream GetLogsForProcess(string appId, string processId, bool? follow = default(bool?), int? tailLines = default(int?)) { - Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = GetLogsForProcessWithHttpInfo(appId, processId, follow, tailLines); + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = GetLogsForProcessWithHttpInfo(appId, processId, follow, tailLines); return localVarResponse.Data; } @@ -934,8 +934,8 @@ public byte[] GetLogsForProcess(string appId, string processId, bool? follow = d /// /// (optional, default to false) /// (optional) - /// ApiResponse of byte[] - public Hathora.Cloud.Sdk.Client.ApiResponse GetLogsForProcessWithHttpInfo(string appId, string processId, bool? follow = default(bool?), int? tailLines = default(int?)) + /// ApiResponse of System.IO.Stream + public Hathora.Cloud.Sdk.Client.ApiResponse GetLogsForProcessWithHttpInfo(string appId, string processId, bool? follow = default(bool?), int? tailLines = default(int?)) { // verify the required parameter 'appId' is set if (appId == null) @@ -952,7 +952,7 @@ public Hathora.Cloud.Sdk.Client.ApiResponse GetLogsForProcessWithHttpInf // to determine the Accept header string[] _accepts = new string[] { - "text/plain", + "application/octet-stream", "application/json" }; @@ -981,7 +981,7 @@ public Hathora.Cloud.Sdk.Client.ApiResponse GetLogsForProcessWithHttpInf } // make the HTTP request - var localVarResponse = this.Client.Get("/logs/v1/{appId}/process/{processId}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get("/logs/v1/{appId}/process/{processId}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { @@ -1001,14 +1001,14 @@ public Hathora.Cloud.Sdk.Client.ApiResponse GetLogsForProcessWithHttpInf /// (optional, default to false) /// (optional) /// Cancellation Token to cancel the request. - /// Task of byte[] - public async System.Threading.Tasks.Task GetLogsForProcessAsync(string appId, string processId, bool? follow = default(bool?), int? tailLines = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of System.IO.Stream + public async System.Threading.Tasks.Task GetLogsForProcessAsync(string appId, string processId, bool? follow = default(bool?), int? tailLines = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var task = GetLogsForProcessWithHttpInfoAsync(appId, processId, follow, tailLines, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL - Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task.ConfigureAwait(false); + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task.ConfigureAwait(false); #else - Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task; + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task; #endif return localVarResponse.Data; } @@ -1022,8 +1022,8 @@ public async System.Threading.Tasks.Task GetLogsForProcessAsync(string a /// (optional, default to false) /// (optional) /// Cancellation Token to cancel the request. - /// Task of ApiResponse (byte[]) - public async System.Threading.Tasks.Task> GetLogsForProcessWithHttpInfoAsync(string appId, string processId, bool? follow = default(bool?), int? tailLines = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (System.IO.Stream) + public async System.Threading.Tasks.Task> GetLogsForProcessWithHttpInfoAsync(string appId, string processId, bool? follow = default(bool?), int? tailLines = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) @@ -1041,7 +1041,7 @@ public async System.Threading.Tasks.Task("/logs/v1/{appId}/process/{processId}", localVarRequestOptions, this.Configuration, cancellationToken); + var task = this.AsynchronousClient.GetAsync("/logs/v1/{appId}/process/{processId}", localVarRequestOptions, this.Configuration, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL var localVarResponse = await task.ConfigureAwait(false); diff --git a/csharp/src/Hathora.Cloud.Sdk/Api/ManagementV1Api.cs b/csharp/src/Hathora.Cloud.Sdk/Api/ManagementV1Api.cs index 17d13f5..859f310 100644 --- a/csharp/src/Hathora.Cloud.Sdk/Api/ManagementV1Api.cs +++ b/csharp/src/Hathora.Cloud.Sdk/Api/ManagementV1Api.cs @@ -31,8 +31,8 @@ public interface IManagementV1ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// - /// VerificationEmailResponse - VerificationEmailResponse SendVerificationEmail(VerificationEmailRequest verificationEmailRequest); + /// VerificationEmailSuccess + VerificationEmailSuccess SendVerificationEmail(VerificationEmailRequest verificationEmailRequest); /// /// @@ -42,8 +42,8 @@ public interface IManagementV1ApiSync : IApiAccessor /// /// Thrown when fails to make API call /// - /// ApiResponse of VerificationEmailResponse - ApiResponse SendVerificationEmailWithHttpInfo(VerificationEmailRequest verificationEmailRequest); + /// ApiResponse of VerificationEmailSuccess + ApiResponse SendVerificationEmailWithHttpInfo(VerificationEmailRequest verificationEmailRequest); #endregion Synchronous Operations } @@ -62,8 +62,8 @@ public interface IManagementV1ApiAsync : IApiAccessor /// Thrown when fails to make API call /// /// Cancellation Token to cancel the request. - /// Task of VerificationEmailResponse - System.Threading.Tasks.Task SendVerificationEmailAsync(VerificationEmailRequest verificationEmailRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of VerificationEmailSuccess + System.Threading.Tasks.Task SendVerificationEmailAsync(VerificationEmailRequest verificationEmailRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -74,8 +74,8 @@ public interface IManagementV1ApiAsync : IApiAccessor /// Thrown when fails to make API call /// /// Cancellation Token to cancel the request. - /// Task of ApiResponse (VerificationEmailResponse) - System.Threading.Tasks.Task> SendVerificationEmailWithHttpInfoAsync(VerificationEmailRequest verificationEmailRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (VerificationEmailSuccess) + System.Threading.Tasks.Task> SendVerificationEmailWithHttpInfoAsync(VerificationEmailRequest verificationEmailRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -225,10 +225,10 @@ public Hathora.Cloud.Sdk.Client.ExceptionFactory ExceptionFactory /// /// Thrown when fails to make API call /// - /// VerificationEmailResponse - public VerificationEmailResponse SendVerificationEmail(VerificationEmailRequest verificationEmailRequest) + /// VerificationEmailSuccess + public VerificationEmailSuccess SendVerificationEmail(VerificationEmailRequest verificationEmailRequest) { - Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = SendVerificationEmailWithHttpInfo(verificationEmailRequest); + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = SendVerificationEmailWithHttpInfo(verificationEmailRequest); return localVarResponse.Data; } @@ -237,8 +237,8 @@ public VerificationEmailResponse SendVerificationEmail(VerificationEmailRequest /// /// Thrown when fails to make API call /// - /// ApiResponse of VerificationEmailResponse - public Hathora.Cloud.Sdk.Client.ApiResponse SendVerificationEmailWithHttpInfo(VerificationEmailRequest verificationEmailRequest) + /// ApiResponse of VerificationEmailSuccess + public Hathora.Cloud.Sdk.Client.ApiResponse SendVerificationEmailWithHttpInfo(VerificationEmailRequest verificationEmailRequest) { // verify the required parameter 'verificationEmailRequest' is set if (verificationEmailRequest == null) @@ -265,7 +265,7 @@ public Hathora.Cloud.Sdk.Client.ApiResponse SendVerif // make the HTTP request - var localVarResponse = this.Client.Post("/management/v1/sendverificationemail", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/management/v1/sendverificationemail", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { @@ -282,14 +282,14 @@ public Hathora.Cloud.Sdk.Client.ApiResponse SendVerif /// Thrown when fails to make API call /// /// Cancellation Token to cancel the request. - /// Task of VerificationEmailResponse - public async System.Threading.Tasks.Task SendVerificationEmailAsync(VerificationEmailRequest verificationEmailRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of VerificationEmailSuccess + public async System.Threading.Tasks.Task SendVerificationEmailAsync(VerificationEmailRequest verificationEmailRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var task = SendVerificationEmailWithHttpInfoAsync(verificationEmailRequest, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL - Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task.ConfigureAwait(false); + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task.ConfigureAwait(false); #else - Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task; + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task; #endif return localVarResponse.Data; } @@ -300,8 +300,8 @@ public async System.Threading.Tasks.Task SendVerifica /// Thrown when fails to make API call /// /// Cancellation Token to cancel the request. - /// Task of ApiResponse (VerificationEmailResponse) - public async System.Threading.Tasks.Task> SendVerificationEmailWithHttpInfoAsync(VerificationEmailRequest verificationEmailRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (VerificationEmailSuccess) + public async System.Threading.Tasks.Task> SendVerificationEmailWithHttpInfoAsync(VerificationEmailRequest verificationEmailRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'verificationEmailRequest' is set if (verificationEmailRequest == null) @@ -331,7 +331,7 @@ public async System.Threading.Tasks.Task("/management/v1/sendverificationemail", localVarRequestOptions, this.Configuration, cancellationToken); + var task = this.AsynchronousClient.PostAsync("/management/v1/sendverificationemail", localVarRequestOptions, this.Configuration, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL var localVarResponse = await task.ConfigureAwait(false); diff --git a/csharp/src/Hathora.Cloud.Sdk/Api/OrganizationsV1Api.cs b/csharp/src/Hathora.Cloud.Sdk/Api/OrganizationsV1Api.cs new file mode 100644 index 0000000..1f257f5 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk/Api/OrganizationsV1Api.cs @@ -0,0 +1,1273 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using Hathora.Cloud.Sdk.Client; +using Hathora.Cloud.Sdk.Model; + +namespace Hathora.Cloud.Sdk.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IOrganizationsV1ApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + void AcceptInvite(string orgId); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of Object(void) + ApiResponse AcceptInviteWithHttpInfo(string orgId); + /// + /// + /// + /// Thrown when fails to make API call + /// + /// OrgInvitesPage + OrgInvitesPage GetOrgPendingInvites(string orgId); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of OrgInvitesPage + ApiResponse GetOrgPendingInvitesWithHttpInfo(string orgId); + /// + /// + /// + /// Thrown when fails to make API call + /// OrgInvitesPage + OrgInvitesPage GetUserPendingInvites(); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ApiResponse of OrgInvitesPage + ApiResponse GetUserPendingInvitesWithHttpInfo(); + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// OrgPermission + OrgPermission InviteUser(string orgId, CreateUserInvite createUserInvite); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of OrgPermission + ApiResponse InviteUserWithHttpInfo(string orgId, CreateUserInvite createUserInvite); + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + void RejectInvite(string orgId); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of Object(void) + ApiResponse RejectInviteWithHttpInfo(string orgId); + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + void RescindInvite(string orgId, RescindUserInvite rescindUserInvite); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of Object(void) + ApiResponse RescindInviteWithHttpInfo(string orgId, RescindUserInvite rescindUserInvite); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IOrganizationsV1ApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task AcceptInviteAsync(string orgId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> AcceptInviteWithHttpInfoAsync(string orgId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of OrgInvitesPage + System.Threading.Tasks.Task GetOrgPendingInvitesAsync(string orgId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (OrgInvitesPage) + System.Threading.Tasks.Task> GetOrgPendingInvitesWithHttpInfoAsync(string orgId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Cancellation Token to cancel the request. + /// Task of OrgInvitesPage + System.Threading.Tasks.Task GetUserPendingInvitesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (OrgInvitesPage) + System.Threading.Tasks.Task> GetUserPendingInvitesWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of OrgPermission + System.Threading.Tasks.Task InviteUserAsync(string orgId, CreateUserInvite createUserInvite, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (OrgPermission) + System.Threading.Tasks.Task> InviteUserWithHttpInfoAsync(string orgId, CreateUserInvite createUserInvite, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task RejectInviteAsync(string orgId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> RejectInviteWithHttpInfoAsync(string orgId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task RescindInviteAsync(string orgId, RescindUserInvite rescindUserInvite, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> RescindInviteWithHttpInfoAsync(string orgId, RescindUserInvite rescindUserInvite, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IOrganizationsV1Api : IOrganizationsV1ApiSync, IOrganizationsV1ApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class OrganizationsV1Api : IDisposable, IOrganizationsV1Api + { + private Hathora.Cloud.Sdk.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. + /// It's better to reuse the HttpClient and HttpClientHandler. + /// + /// + public OrganizationsV1Api() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. + /// It's better to reuse the HttpClient and HttpClientHandler. + /// + /// The target service's base path in URL format. + /// + /// + public OrganizationsV1Api(string basePath) + { + this.Configuration = Hathora.Cloud.Sdk.Client.Configuration.MergeConfigurations( + Hathora.Cloud.Sdk.Client.GlobalConfiguration.Instance, + new Hathora.Cloud.Sdk.Client.Configuration { BasePath = basePath } + ); + this.ApiClient = new Hathora.Cloud.Sdk.Client.ApiClient(this.Configuration.BasePath); + this.Client = this.ApiClient; + this.AsynchronousClient = this.ApiClient; + this.ExceptionFactory = Hathora.Cloud.Sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class using Configuration object. + /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. + /// It's better to reuse the HttpClient and HttpClientHandler. + /// + /// An instance of Configuration. + /// + /// + public OrganizationsV1Api(Hathora.Cloud.Sdk.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = Hathora.Cloud.Sdk.Client.Configuration.MergeConfigurations( + Hathora.Cloud.Sdk.Client.GlobalConfiguration.Instance, + configuration + ); + this.ApiClient = new Hathora.Cloud.Sdk.Client.ApiClient(this.Configuration.BasePath); + this.Client = this.ApiClient; + this.AsynchronousClient = this.ApiClient; + ExceptionFactory = Hathora.Cloud.Sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + /// + public OrganizationsV1Api(Hathora.Cloud.Sdk.Client.ISynchronousClient client, Hathora.Cloud.Sdk.Client.IAsynchronousClient asyncClient, Hathora.Cloud.Sdk.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = Hathora.Cloud.Sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Disposes resources if they were created by us + /// + public void Dispose() + { + this.ApiClient?.Dispose(); + } + + /// + /// Holds the ApiClient if created + /// + public Hathora.Cloud.Sdk.Client.ApiClient ApiClient { get; set; } = null; + + /// + /// The client for accessing this underlying API asynchronously. + /// + public Hathora.Cloud.Sdk.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public Hathora.Cloud.Sdk.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public Hathora.Cloud.Sdk.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public Hathora.Cloud.Sdk.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + public void AcceptInvite(string orgId) + { + AcceptInviteWithHttpInfo(orgId); + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of Object(void) + public Hathora.Cloud.Sdk.Client.ApiResponse AcceptInviteWithHttpInfo(string orgId) + { + // verify the required parameter 'orgId' is set + if (orgId == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'orgId' when calling OrganizationsV1Api->AcceptInvite"); + + Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("orgId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(orgId)); // path parameter + + // authentication (hathoraDevToken) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/orgs/v1/{orgId}/invites/accept", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("AcceptInvite", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task AcceptInviteAsync(string orgId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var task = AcceptInviteWithHttpInfoAsync(orgId, cancellationToken); +#if UNITY_EDITOR || !UNITY_WEBGL + await task.ConfigureAwait(false); +#else + await task; +#endif + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> AcceptInviteWithHttpInfoAsync(string orgId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'orgId' is set + if (orgId == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'orgId' when calling OrganizationsV1Api->AcceptInvite"); + + + Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("orgId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(orgId)); // path parameter + + // authentication (hathoraDevToken) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + + var task = this.AsynchronousClient.PostAsync("/orgs/v1/{orgId}/invites/accept", localVarRequestOptions, this.Configuration, cancellationToken); + +#if UNITY_EDITOR || !UNITY_WEBGL + var localVarResponse = await task.ConfigureAwait(false); +#else + var localVarResponse = await task; +#endif + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("AcceptInvite", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// OrgInvitesPage + public OrgInvitesPage GetOrgPendingInvites(string orgId) + { + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = GetOrgPendingInvitesWithHttpInfo(orgId); + return localVarResponse.Data; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of OrgInvitesPage + public Hathora.Cloud.Sdk.Client.ApiResponse GetOrgPendingInvitesWithHttpInfo(string orgId) + { + // verify the required parameter 'orgId' is set + if (orgId == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'orgId' when calling OrganizationsV1Api->GetOrgPendingInvites"); + + Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("orgId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(orgId)); // path parameter + + // authentication (hathoraDevToken) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/orgs/v1/{orgId}/invites/pending", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetOrgPendingInvites", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of OrgInvitesPage + public async System.Threading.Tasks.Task GetOrgPendingInvitesAsync(string orgId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var task = GetOrgPendingInvitesWithHttpInfoAsync(orgId, cancellationToken); +#if UNITY_EDITOR || !UNITY_WEBGL + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task.ConfigureAwait(false); +#else + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task; +#endif + return localVarResponse.Data; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (OrgInvitesPage) + public async System.Threading.Tasks.Task> GetOrgPendingInvitesWithHttpInfoAsync(string orgId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'orgId' is set + if (orgId == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'orgId' when calling OrganizationsV1Api->GetOrgPendingInvites"); + + + Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("orgId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(orgId)); // path parameter + + // authentication (hathoraDevToken) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + + var task = this.AsynchronousClient.GetAsync("/orgs/v1/{orgId}/invites/pending", localVarRequestOptions, this.Configuration, cancellationToken); + +#if UNITY_EDITOR || !UNITY_WEBGL + var localVarResponse = await task.ConfigureAwait(false); +#else + var localVarResponse = await task; +#endif + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetOrgPendingInvites", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// OrgInvitesPage + public OrgInvitesPage GetUserPendingInvites() + { + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = GetUserPendingInvitesWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// ApiResponse of OrgInvitesPage + public Hathora.Cloud.Sdk.Client.ApiResponse GetUserPendingInvitesWithHttpInfo() + { + Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + + // authentication (hathoraDevToken) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/orgs/v1/user/invites/pending", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetUserPendingInvites", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// Cancellation Token to cancel the request. + /// Task of OrgInvitesPage + public async System.Threading.Tasks.Task GetUserPendingInvitesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var task = GetUserPendingInvitesWithHttpInfoAsync(cancellationToken); +#if UNITY_EDITOR || !UNITY_WEBGL + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task.ConfigureAwait(false); +#else + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task; +#endif + return localVarResponse.Data; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (OrgInvitesPage) + public async System.Threading.Tasks.Task> GetUserPendingInvitesWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + + // authentication (hathoraDevToken) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + + var task = this.AsynchronousClient.GetAsync("/orgs/v1/user/invites/pending", localVarRequestOptions, this.Configuration, cancellationToken); + +#if UNITY_EDITOR || !UNITY_WEBGL + var localVarResponse = await task.ConfigureAwait(false); +#else + var localVarResponse = await task; +#endif + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetUserPendingInvites", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// OrgPermission + public OrgPermission InviteUser(string orgId, CreateUserInvite createUserInvite) + { + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = InviteUserWithHttpInfo(orgId, createUserInvite); + return localVarResponse.Data; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of OrgPermission + public Hathora.Cloud.Sdk.Client.ApiResponse InviteUserWithHttpInfo(string orgId, CreateUserInvite createUserInvite) + { + // verify the required parameter 'orgId' is set + if (orgId == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'orgId' when calling OrganizationsV1Api->InviteUser"); + + // verify the required parameter 'createUserInvite' is set + if (createUserInvite == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'createUserInvite' when calling OrganizationsV1Api->InviteUser"); + + Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("orgId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(orgId)); // path parameter + localVarRequestOptions.Data = createUserInvite; + + // authentication (hathoraDevToken) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Put("/orgs/v1/{orgId}/invites", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("InviteUser", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of OrgPermission + public async System.Threading.Tasks.Task InviteUserAsync(string orgId, CreateUserInvite createUserInvite, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var task = InviteUserWithHttpInfoAsync(orgId, createUserInvite, cancellationToken); +#if UNITY_EDITOR || !UNITY_WEBGL + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task.ConfigureAwait(false); +#else + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task; +#endif + return localVarResponse.Data; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (OrgPermission) + public async System.Threading.Tasks.Task> InviteUserWithHttpInfoAsync(string orgId, CreateUserInvite createUserInvite, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'orgId' is set + if (orgId == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'orgId' when calling OrganizationsV1Api->InviteUser"); + + // verify the required parameter 'createUserInvite' is set + if (createUserInvite == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'createUserInvite' when calling OrganizationsV1Api->InviteUser"); + + + Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("orgId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(orgId)); // path parameter + localVarRequestOptions.Data = createUserInvite; + + // authentication (hathoraDevToken) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + + var task = this.AsynchronousClient.PutAsync("/orgs/v1/{orgId}/invites", localVarRequestOptions, this.Configuration, cancellationToken); + +#if UNITY_EDITOR || !UNITY_WEBGL + var localVarResponse = await task.ConfigureAwait(false); +#else + var localVarResponse = await task; +#endif + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("InviteUser", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + public void RejectInvite(string orgId) + { + RejectInviteWithHttpInfo(orgId); + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of Object(void) + public Hathora.Cloud.Sdk.Client.ApiResponse RejectInviteWithHttpInfo(string orgId) + { + // verify the required parameter 'orgId' is set + if (orgId == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'orgId' when calling OrganizationsV1Api->RejectInvite"); + + Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("orgId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(orgId)); // path parameter + + // authentication (hathoraDevToken) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/orgs/v1/{orgId}/invites/reject", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RejectInvite", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task RejectInviteAsync(string orgId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var task = RejectInviteWithHttpInfoAsync(orgId, cancellationToken); +#if UNITY_EDITOR || !UNITY_WEBGL + await task.ConfigureAwait(false); +#else + await task; +#endif + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> RejectInviteWithHttpInfoAsync(string orgId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'orgId' is set + if (orgId == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'orgId' when calling OrganizationsV1Api->RejectInvite"); + + + Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("orgId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(orgId)); // path parameter + + // authentication (hathoraDevToken) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + + var task = this.AsynchronousClient.PostAsync("/orgs/v1/{orgId}/invites/reject", localVarRequestOptions, this.Configuration, cancellationToken); + +#if UNITY_EDITOR || !UNITY_WEBGL + var localVarResponse = await task.ConfigureAwait(false); +#else + var localVarResponse = await task; +#endif + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RejectInvite", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + public void RescindInvite(string orgId, RescindUserInvite rescindUserInvite) + { + RescindInviteWithHttpInfo(orgId, rescindUserInvite); + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of Object(void) + public Hathora.Cloud.Sdk.Client.ApiResponse RescindInviteWithHttpInfo(string orgId, RescindUserInvite rescindUserInvite) + { + // verify the required parameter 'orgId' is set + if (orgId == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'orgId' when calling OrganizationsV1Api->RescindInvite"); + + // verify the required parameter 'rescindUserInvite' is set + if (rescindUserInvite == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'rescindUserInvite' when calling OrganizationsV1Api->RescindInvite"); + + Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("orgId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(orgId)); // path parameter + localVarRequestOptions.Data = rescindUserInvite; + + // authentication (hathoraDevToken) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/orgs/v1/{orgId}/invites/rescind", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RescindInvite", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task RescindInviteAsync(string orgId, RescindUserInvite rescindUserInvite, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var task = RescindInviteWithHttpInfoAsync(orgId, rescindUserInvite, cancellationToken); +#if UNITY_EDITOR || !UNITY_WEBGL + await task.ConfigureAwait(false); +#else + await task; +#endif + } + + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> RescindInviteWithHttpInfoAsync(string orgId, RescindUserInvite rescindUserInvite, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'orgId' is set + if (orgId == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'orgId' when calling OrganizationsV1Api->RescindInvite"); + + // verify the required parameter 'rescindUserInvite' is set + if (rescindUserInvite == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'rescindUserInvite' when calling OrganizationsV1Api->RescindInvite"); + + + Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("orgId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(orgId)); // path parameter + localVarRequestOptions.Data = rescindUserInvite; + + // authentication (hathoraDevToken) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + + var task = this.AsynchronousClient.PostAsync("/orgs/v1/{orgId}/invites/rescind", localVarRequestOptions, this.Configuration, cancellationToken); + +#if UNITY_EDITOR || !UNITY_WEBGL + var localVarResponse = await task.ConfigureAwait(false); +#else + var localVarResponse = await task; +#endif + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RescindInvite", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk/Api/ProcessesV2Api.cs b/csharp/src/Hathora.Cloud.Sdk/Api/ProcessesV2Api.cs index b2eb80b..25ea184 100644 --- a/csharp/src/Hathora.Cloud.Sdk/Api/ProcessesV2Api.cs +++ b/csharp/src/Hathora.Cloud.Sdk/Api/ProcessesV2Api.cs @@ -30,6 +30,29 @@ public interface IProcessesV2ApiSync : IApiAccessor /// /// /// + /// Creates a [process](https://hathora.dev/docs/concepts/hathora-entities#process) without a room. Use this to pre-allocate processes ahead of time so that subsequent room assignment via [CreateRoom()](https://hathora.dev/api#tag/RoomV2/operation/CreateRoom) can be instant. + /// + /// Thrown when fails to make API call + /// + /// + /// ProcessV2 + ProcessV2 CreateProcess(string appId, Region region); + + /// + /// + /// + /// + /// Creates a [process](https://hathora.dev/docs/concepts/hathora-entities#process) without a room. Use this to pre-allocate processes ahead of time so that subsequent room assignment via [CreateRoom()](https://hathora.dev/api#tag/RoomV2/operation/CreateRoom) can be instant. + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of ProcessV2 + ApiResponse CreateProcessWithHttpInfo(string appId, Region region); + /// + /// + /// + /// /// Retrieve the 10 most recent [processes](https://hathora.dev/docs/concepts/hathora-entities#process) objects for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). Filter the array by optionally passing in a `status` or `region`. /// /// Thrown when fails to make API call @@ -110,6 +133,31 @@ public interface IProcessesV2ApiAsync : IApiAccessor /// /// /// + /// Creates a [process](https://hathora.dev/docs/concepts/hathora-entities#process) without a room. Use this to pre-allocate processes ahead of time so that subsequent room assignment via [CreateRoom()](https://hathora.dev/api#tag/RoomV2/operation/CreateRoom) can be instant. + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of ProcessV2 + System.Threading.Tasks.Task CreateProcessAsync(string appId, Region region, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Creates a [process](https://hathora.dev/docs/concepts/hathora-entities#process) without a room. Use this to pre-allocate processes ahead of time so that subsequent room assignment via [CreateRoom()](https://hathora.dev/api#tag/RoomV2/operation/CreateRoom) can be instant. + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ProcessV2) + System.Threading.Tasks.Task> CreateProcessWithHttpInfoAsync(string appId, Region region, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// /// Retrieve the 10 most recent [processes](https://hathora.dev/docs/concepts/hathora-entities#process) objects for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). Filter the array by optionally passing in a `status` or `region`. /// /// Thrown when fails to make API call @@ -327,6 +375,150 @@ public Hathora.Cloud.Sdk.Client.ExceptionFactory ExceptionFactory set { _exceptionFactory = value; } } + /// + /// Creates a [process](https://hathora.dev/docs/concepts/hathora-entities#process) without a room. Use this to pre-allocate processes ahead of time so that subsequent room assignment via [CreateRoom()](https://hathora.dev/api#tag/RoomV2/operation/CreateRoom) can be instant. + /// + /// Thrown when fails to make API call + /// + /// + /// ProcessV2 + public ProcessV2 CreateProcess(string appId, Region region) + { + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = CreateProcessWithHttpInfo(appId, region); + return localVarResponse.Data; + } + + /// + /// Creates a [process](https://hathora.dev/docs/concepts/hathora-entities#process) without a room. Use this to pre-allocate processes ahead of time so that subsequent room assignment via [CreateRoom()](https://hathora.dev/api#tag/RoomV2/operation/CreateRoom) can be instant. + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of ProcessV2 + public Hathora.Cloud.Sdk.Client.ApiResponse CreateProcessWithHttpInfo(string appId, Region region) + { + // verify the required parameter 'appId' is set + if (appId == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling ProcessesV2Api->CreateProcess"); + + Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("appId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("region", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(region)); // path parameter + + // authentication (hathoraDevToken) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/processes/v2/{appId}/create/{region}", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateProcess", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Creates a [process](https://hathora.dev/docs/concepts/hathora-entities#process) without a room. Use this to pre-allocate processes ahead of time so that subsequent room assignment via [CreateRoom()](https://hathora.dev/api#tag/RoomV2/operation/CreateRoom) can be instant. + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of ProcessV2 + public async System.Threading.Tasks.Task CreateProcessAsync(string appId, Region region, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var task = CreateProcessWithHttpInfoAsync(appId, region, cancellationToken); +#if UNITY_EDITOR || !UNITY_WEBGL + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task.ConfigureAwait(false); +#else + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task; +#endif + return localVarResponse.Data; + } + + /// + /// Creates a [process](https://hathora.dev/docs/concepts/hathora-entities#process) without a room. Use this to pre-allocate processes ahead of time so that subsequent room assignment via [CreateRoom()](https://hathora.dev/api#tag/RoomV2/operation/CreateRoom) can be instant. + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ProcessV2) + public async System.Threading.Tasks.Task> CreateProcessWithHttpInfoAsync(string appId, Region region, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'appId' is set + if (appId == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling ProcessesV2Api->CreateProcess"); + + + Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Hathora.Cloud.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("appId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("region", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(region)); // path parameter + + // authentication (hathoraDevToken) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + + var task = this.AsynchronousClient.PostAsync("/processes/v2/{appId}/create/{region}", localVarRequestOptions, this.Configuration, cancellationToken); + +#if UNITY_EDITOR || !UNITY_WEBGL + var localVarResponse = await task.ConfigureAwait(false); +#else + var localVarResponse = await task; +#endif + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateProcess", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + /// /// Retrieve the 10 most recent [processes](https://hathora.dev/docs/concepts/hathora-entities#process) objects for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). Filter the array by optionally passing in a `status` or `region`. /// diff --git a/csharp/src/Hathora.Cloud.Sdk/Api/RoomV2Api.cs b/csharp/src/Hathora.Cloud.Sdk/Api/RoomV2Api.cs index 08b4860..80eed3b 100644 --- a/csharp/src/Hathora.Cloud.Sdk/Api/RoomV2Api.cs +++ b/csharp/src/Hathora.Cloud.Sdk/Api/RoomV2Api.cs @@ -36,8 +36,8 @@ public interface IRoomV2ApiSync : IApiAccessor /// /// /// (optional) - /// CreateRoomResponse - CreateRoomResponse CreateRoom(string appId, CreateRoomParams createRoomParams, string roomId = default(string)); + /// RoomConnectionData + RoomConnectionData CreateRoom(string appId, CreateRoomParams createRoomParams, string roomId = default(string)); /// /// @@ -49,8 +49,8 @@ public interface IRoomV2ApiSync : IApiAccessor /// /// /// (optional) - /// ApiResponse of CreateRoomResponse - ApiResponse CreateRoomWithHttpInfo(string appId, CreateRoomParams createRoomParams, string roomId = default(string)); + /// ApiResponse of RoomConnectionData + ApiResponse CreateRoomWithHttpInfo(string appId, CreateRoomParams createRoomParams, string roomId = default(string)); /// /// /// @@ -176,7 +176,8 @@ public interface IRoomV2ApiSync : IApiAccessor /// /// /// - void SuspendRoom(string appId, string roomId); + [Obsolete] + void SuspendRoomV2Deprecated(string appId, string roomId); /// /// @@ -188,7 +189,8 @@ public interface IRoomV2ApiSync : IApiAccessor /// /// /// ApiResponse of Object(void) - ApiResponse SuspendRoomWithHttpInfo(string appId, string roomId); + [Obsolete] + ApiResponse SuspendRoomV2DeprecatedWithHttpInfo(string appId, string roomId); /// /// /// @@ -231,8 +233,8 @@ public interface IRoomV2ApiAsync : IApiAccessor /// /// (optional) /// Cancellation Token to cancel the request. - /// Task of CreateRoomResponse - System.Threading.Tasks.Task CreateRoomAsync(string appId, CreateRoomParams createRoomParams, string roomId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of RoomConnectionData + System.Threading.Tasks.Task CreateRoomAsync(string appId, CreateRoomParams createRoomParams, string roomId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -245,8 +247,8 @@ public interface IRoomV2ApiAsync : IApiAccessor /// /// (optional) /// Cancellation Token to cancel the request. - /// Task of ApiResponse (CreateRoomResponse) - System.Threading.Tasks.Task> CreateRoomWithHttpInfoAsync(string appId, CreateRoomParams createRoomParams, string roomId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (RoomConnectionData) + System.Threading.Tasks.Task> CreateRoomWithHttpInfoAsync(string appId, CreateRoomParams createRoomParams, string roomId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -383,7 +385,8 @@ public interface IRoomV2ApiAsync : IApiAccessor /// /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task SuspendRoomAsync(string appId, string roomId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + [Obsolete] + System.Threading.Tasks.Task SuspendRoomV2DeprecatedAsync(string appId, string roomId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -396,7 +399,8 @@ public interface IRoomV2ApiAsync : IApiAccessor /// /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> SuspendRoomWithHttpInfoAsync(string appId, string roomId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + [Obsolete] + System.Threading.Tasks.Task> SuspendRoomV2DeprecatedWithHttpInfoAsync(string appId, string roomId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -575,10 +579,10 @@ public Hathora.Cloud.Sdk.Client.ExceptionFactory ExceptionFactory /// /// /// (optional) - /// CreateRoomResponse - public CreateRoomResponse CreateRoom(string appId, CreateRoomParams createRoomParams, string roomId = default(string)) + /// RoomConnectionData + public RoomConnectionData CreateRoom(string appId, CreateRoomParams createRoomParams, string roomId = default(string)) { - Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = CreateRoomWithHttpInfo(appId, createRoomParams, roomId); + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = CreateRoomWithHttpInfo(appId, createRoomParams, roomId); return localVarResponse.Data; } @@ -589,8 +593,8 @@ public CreateRoomResponse CreateRoom(string appId, CreateRoomParams createRoomPa /// /// /// (optional) - /// ApiResponse of CreateRoomResponse - public Hathora.Cloud.Sdk.Client.ApiResponse CreateRoomWithHttpInfo(string appId, CreateRoomParams createRoomParams, string roomId = default(string)) + /// ApiResponse of RoomConnectionData + public Hathora.Cloud.Sdk.Client.ApiResponse CreateRoomWithHttpInfo(string appId, CreateRoomParams createRoomParams, string roomId = default(string)) { // verify the required parameter 'appId' is set if (appId == null) @@ -632,7 +636,7 @@ public Hathora.Cloud.Sdk.Client.ApiResponse CreateRoomWithHt } // make the HTTP request - var localVarResponse = this.Client.Post("/rooms/v2/{appId}/create", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/rooms/v2/{appId}/create", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { @@ -651,14 +655,14 @@ public Hathora.Cloud.Sdk.Client.ApiResponse CreateRoomWithHt /// /// (optional) /// Cancellation Token to cancel the request. - /// Task of CreateRoomResponse - public async System.Threading.Tasks.Task CreateRoomAsync(string appId, CreateRoomParams createRoomParams, string roomId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of RoomConnectionData + public async System.Threading.Tasks.Task CreateRoomAsync(string appId, CreateRoomParams createRoomParams, string roomId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var task = CreateRoomWithHttpInfoAsync(appId, createRoomParams, roomId, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL - Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task.ConfigureAwait(false); + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task.ConfigureAwait(false); #else - Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task; + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = await task; #endif return localVarResponse.Data; } @@ -671,8 +675,8 @@ public async System.Threading.Tasks.Task CreateRoomAsync(str /// /// (optional) /// Cancellation Token to cancel the request. - /// Task of ApiResponse (CreateRoomResponse) - public async System.Threading.Tasks.Task> CreateRoomWithHttpInfoAsync(string appId, CreateRoomParams createRoomParams, string roomId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (RoomConnectionData) + public async System.Threading.Tasks.Task> CreateRoomWithHttpInfoAsync(string appId, CreateRoomParams createRoomParams, string roomId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) @@ -717,7 +721,7 @@ public async System.Threading.Tasks.Task("/rooms/v2/{appId}/create", localVarRequestOptions, this.Configuration, cancellationToken); + var task = this.AsynchronousClient.PostAsync("/rooms/v2/{appId}/create", localVarRequestOptions, this.Configuration, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL var localVarResponse = await task.ConfigureAwait(false); @@ -1487,9 +1491,10 @@ public async System.Threading.Tasks.Task /// /// - public void SuspendRoom(string appId, string roomId) + [Obsolete] + public void SuspendRoomV2Deprecated(string appId, string roomId) { - SuspendRoomWithHttpInfo(appId, roomId); + SuspendRoomV2DeprecatedWithHttpInfo(appId, roomId); } /// @@ -1499,15 +1504,16 @@ public void SuspendRoom(string appId, string roomId) /// /// /// ApiResponse of Object(void) - public Hathora.Cloud.Sdk.Client.ApiResponse SuspendRoomWithHttpInfo(string appId, string roomId) + [Obsolete] + public Hathora.Cloud.Sdk.Client.ApiResponse SuspendRoomV2DeprecatedWithHttpInfo(string appId, string roomId) { // verify the required parameter 'appId' is set if (appId == null) - throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling RoomV2Api->SuspendRoom"); + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling RoomV2Api->SuspendRoomV2Deprecated"); // verify the required parameter 'roomId' is set if (roomId == null) - throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'roomId' when calling RoomV2Api->SuspendRoom"); + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'roomId' when calling RoomV2Api->SuspendRoomV2Deprecated"); Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); @@ -1540,7 +1546,7 @@ public Hathora.Cloud.Sdk.Client.ApiResponse SuspendRoomWithHttpInfo(stri if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("SuspendRoom", localVarResponse); + Exception _exception = this.ExceptionFactory("SuspendRoomV2Deprecated", localVarResponse); if (_exception != null) throw _exception; } @@ -1555,9 +1561,10 @@ public Hathora.Cloud.Sdk.Client.ApiResponse SuspendRoomWithHttpInfo(stri /// /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task SuspendRoomAsync(string appId, string roomId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + [Obsolete] + public async System.Threading.Tasks.Task SuspendRoomV2DeprecatedAsync(string appId, string roomId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - var task = SuspendRoomWithHttpInfoAsync(appId, roomId, cancellationToken); + var task = SuspendRoomV2DeprecatedWithHttpInfoAsync(appId, roomId, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL await task.ConfigureAwait(false); #else @@ -1573,15 +1580,16 @@ public async System.Threading.Tasks.Task SuspendRoomAsync(string appId, string r /// /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> SuspendRoomWithHttpInfoAsync(string appId, string roomId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + [Obsolete] + public async System.Threading.Tasks.Task> SuspendRoomV2DeprecatedWithHttpInfoAsync(string appId, string roomId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) - throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling RoomV2Api->SuspendRoom"); + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'appId' when calling RoomV2Api->SuspendRoomV2Deprecated"); // verify the required parameter 'roomId' is set if (roomId == null) - throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'roomId' when calling RoomV2Api->SuspendRoom"); + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'roomId' when calling RoomV2Api->SuspendRoomV2Deprecated"); Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); @@ -1623,7 +1631,7 @@ public async System.Threading.Tasks.Task { - - /// - /// Gets or Sets PlanName - /// - [DataMember(Name = "planName", IsRequired = true, EmitDefaultValue = true)] - public PlanName PlanName { get; set; } - /// - /// Defines TransportType - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum TransportTypeEnum - { - /// - /// Enum Tcp for value: tcp - /// - [EnumMember(Value = "tcp")] - Tcp = 1, - - /// - /// Enum Udp for value: udp - /// - [EnumMember(Value = "udp")] - Udp = 2, - - /// - /// Enum Tls for value: tls - /// - [EnumMember(Value = "tls")] - Tls = 3 - - } - - - /// - /// Gets or Sets TransportType - /// - [DataMember(Name = "transportType", IsRequired = true, EmitDefaultValue = true)] - [Obsolete] - public TransportTypeEnum TransportType { get; set; } /// /// Initializes a new instance of the class. /// @@ -80,14 +41,11 @@ protected ApplicationWithLatestDeploymentAndBuildAllOfDeployment() /// /// Initializes a new instance of the class. /// - /// Option to shut down processes that have had no new connections or rooms for five minutes. (default to true). + /// Option to shut down processes that have had no new connections or rooms for five minutes. (required). /// The environment variable that our process will have access to at runtime. (required). /// Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. (required). - /// planName (required). /// Additional ports your server listens on. (required). /// defaultContainerPort (required). - /// transportType (required). - /// containerPort (required). /// When the deployment was created. (required). /// UserId or email address for the user that created the deployment. (required). /// The amount of memory allocated to your process. (required). @@ -96,8 +54,9 @@ protected ApplicationWithLatestDeploymentAndBuildAllOfDeployment() /// System generated id for a build. Increments by 1. (required). /// System generated unique identifier for an application. (required). /// build (required). - public ApplicationWithLatestDeploymentAndBuildAllOfDeployment(bool idleTimeoutEnabled = true, List env = default(List), int roomsPerProcess = default(int), PlanName planName = default(PlanName), List additionalContainerPorts = default(List), ContainerPort defaultContainerPort = default(ContainerPort), TransportTypeEnum transportType = default(TransportTypeEnum), double containerPort = default(double), DateTime createdAt = default(DateTime), string createdBy = default(string), int requestedMemoryMB = default(int), double requestedCPU = default(double), int deploymentId = default(int), int buildId = default(int), string appId = default(string), Build build = default(Build)) + public ApplicationWithLatestDeploymentAndBuildAllOfDeployment(bool idleTimeoutEnabled = default(bool), List env = default(List), int roomsPerProcess = default(int), List additionalContainerPorts = default(List), ContainerPort defaultContainerPort = default(ContainerPort), DateTime createdAt = default(DateTime), string createdBy = default(string), double requestedMemoryMB = default(double), double requestedCPU = default(double), int deploymentId = default(int), int buildId = default(int), string appId = default(string), Build build = default(Build)) { + this.IdleTimeoutEnabled = idleTimeoutEnabled; // to ensure "env" is required (not null) if (env == null) { @@ -105,7 +64,6 @@ public ApplicationWithLatestDeploymentAndBuildAllOfDeployment(bool idleTimeoutEn } this.Env = env; this.RoomsPerProcess = roomsPerProcess; - this.PlanName = planName; // to ensure "additionalContainerPorts" is required (not null) if (additionalContainerPorts == null) { @@ -118,8 +76,6 @@ public ApplicationWithLatestDeploymentAndBuildAllOfDeployment(bool idleTimeoutEn throw new ArgumentNullException("defaultContainerPort is a required property for ApplicationWithLatestDeploymentAndBuildAllOfDeployment and cannot be null"); } this.DefaultContainerPort = defaultContainerPort; - this.TransportType = transportType; - this.ContainerPort = containerPort; this.CreatedAt = createdAt; // to ensure "createdBy" is required (not null) if (createdBy == null) @@ -143,7 +99,6 @@ public ApplicationWithLatestDeploymentAndBuildAllOfDeployment(bool idleTimeoutEn throw new ArgumentNullException("build is a required property for ApplicationWithLatestDeploymentAndBuildAllOfDeployment and cannot be null"); } this.Build = build; - this.IdleTimeoutEnabled = idleTimeoutEnabled; this.AdditionalProperties = new Dictionary(); } @@ -151,7 +106,7 @@ public ApplicationWithLatestDeploymentAndBuildAllOfDeployment(bool idleTimeoutEn /// Option to shut down processes that have had no new connections or rooms for five minutes. /// /// Option to shut down processes that have had no new connections or rooms for five minutes. - [DataMember(Name = "idleTimeoutEnabled", EmitDefaultValue = true)] + [DataMember(Name = "idleTimeoutEnabled", IsRequired = true, EmitDefaultValue = true)] public bool IdleTimeoutEnabled { get; set; } /// @@ -159,7 +114,7 @@ public ApplicationWithLatestDeploymentAndBuildAllOfDeployment(bool idleTimeoutEn /// /// The environment variable that our process will have access to at runtime. [DataMember(Name = "env", IsRequired = true, EmitDefaultValue = true)] - public List Env { get; set; } + public List Env { get; set; } /// /// Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. @@ -182,13 +137,6 @@ public ApplicationWithLatestDeploymentAndBuildAllOfDeployment(bool idleTimeoutEn [DataMember(Name = "defaultContainerPort", IsRequired = true, EmitDefaultValue = true)] public ContainerPort DefaultContainerPort { get; set; } - /// - /// Gets or Sets ContainerPort - /// - [DataMember(Name = "containerPort", IsRequired = true, EmitDefaultValue = true)] - [Obsolete] - public double ContainerPort { get; set; } - /// /// When the deployment was created. /// @@ -210,7 +158,7 @@ public ApplicationWithLatestDeploymentAndBuildAllOfDeployment(bool idleTimeoutEn /// The amount of memory allocated to your process. /// 1024 [DataMember(Name = "requestedMemoryMB", IsRequired = true, EmitDefaultValue = true)] - public int RequestedMemoryMB { get; set; } + public double RequestedMemoryMB { get; set; } /// /// The number of cores allocated to your process. @@ -267,11 +215,8 @@ public override string ToString() sb.Append(" IdleTimeoutEnabled: ").Append(IdleTimeoutEnabled).Append("\n"); sb.Append(" Env: ").Append(Env).Append("\n"); sb.Append(" RoomsPerProcess: ").Append(RoomsPerProcess).Append("\n"); - sb.Append(" PlanName: ").Append(PlanName).Append("\n"); sb.Append(" AdditionalContainerPorts: ").Append(AdditionalContainerPorts).Append("\n"); sb.Append(" DefaultContainerPort: ").Append(DefaultContainerPort).Append("\n"); - sb.Append(" TransportType: ").Append(TransportType).Append("\n"); - sb.Append(" ContainerPort: ").Append(ContainerPort).Append("\n"); sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); sb.Append(" CreatedBy: ").Append(CreatedBy).Append("\n"); sb.Append(" RequestedMemoryMB: ").Append(RequestedMemoryMB).Append("\n"); @@ -330,10 +275,6 @@ public bool Equals(ApplicationWithLatestDeploymentAndBuildAllOfDeployment input) this.RoomsPerProcess == input.RoomsPerProcess || this.RoomsPerProcess.Equals(input.RoomsPerProcess) ) && - ( - this.PlanName == input.PlanName || - this.PlanName.Equals(input.PlanName) - ) && ( this.AdditionalContainerPorts == input.AdditionalContainerPorts || this.AdditionalContainerPorts != null && @@ -345,14 +286,6 @@ public bool Equals(ApplicationWithLatestDeploymentAndBuildAllOfDeployment input) (this.DefaultContainerPort != null && this.DefaultContainerPort.Equals(input.DefaultContainerPort)) ) && - ( - this.TransportType == input.TransportType || - this.TransportType.Equals(input.TransportType) - ) && - ( - this.ContainerPort == input.ContainerPort || - this.ContainerPort.Equals(input.ContainerPort) - ) && ( this.CreatedAt == input.CreatedAt || (this.CreatedAt != null && @@ -407,7 +340,6 @@ public override int GetHashCode() hashCode = (hashCode * 59) + this.Env.GetHashCode(); } hashCode = (hashCode * 59) + this.RoomsPerProcess.GetHashCode(); - hashCode = (hashCode * 59) + this.PlanName.GetHashCode(); if (this.AdditionalContainerPorts != null) { hashCode = (hashCode * 59) + this.AdditionalContainerPorts.GetHashCode(); @@ -416,8 +348,6 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.DefaultContainerPort.GetHashCode(); } - hashCode = (hashCode * 59) + this.TransportType.GetHashCode(); - hashCode = (hashCode * 59) + this.ContainerPort.GetHashCode(); if (this.CreatedAt != null) { hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/Build.cs b/csharp/src/Hathora.Cloud.Sdk/Model/Build.cs index b90419e..ebc20ba 100644 --- a/csharp/src/Hathora.Cloud.Sdk/Model/Build.cs +++ b/csharp/src/Hathora.Cloud.Sdk/Model/Build.cs @@ -47,18 +47,18 @@ protected Build() /// /// Initializes a new instance of the class. /// - /// Tag to associate an external version with a build. It is accessible via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV1/operation/GetBuildInfo).. + /// Tag to associate an external version with a build. It is accessible via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV2/operation/GetBuildInfo).. /// regionalContainerTags (required). /// The size (in bytes) of the Docker image built by Hathora. (required). /// status (required). /// When the build was deleted. (required). - /// When [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) finished executing. (required). - /// When [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) is called. (required). - /// When [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild) is called. (required). + /// When [`RunBuild()`](https://hathora.dev/api#tag/BuildV2/operation/RunBuild) finished executing. (required). + /// When [`RunBuild()`](https://hathora.dev/api#tag/BuildV2/operation/RunBuild) is called. (required). + /// When [`CreateBuild()`](https://hathora.dev/api#tag/BuildV2/operation/CreateBuild) is called. (required). /// UserId or email address for the user that created the build. (required). /// System generated id for a build. Increments by 1. (required). /// System generated unique identifier for an application. (required). - public Build(string buildTag = default(string), List regionalContainerTags = default(List), int imageSize = default(int), BuildStatus status = default(BuildStatus), DateTime? deletedAt = default(DateTime?), DateTime? finishedAt = default(DateTime?), DateTime? startedAt = default(DateTime?), DateTime createdAt = default(DateTime), string createdBy = default(string), int buildId = default(int), string appId = default(string)) + public Build(string buildTag = default(string), List regionalContainerTags = default(List), long imageSize = default(long), BuildStatus status = default(BuildStatus), DateTime? deletedAt = default(DateTime?), DateTime? finishedAt = default(DateTime?), DateTime? startedAt = default(DateTime?), DateTime createdAt = default(DateTime), string createdBy = default(string), int buildId = default(int), string appId = default(string)) { // to ensure "regionalContainerTags" is required (not null) if (regionalContainerTags == null) @@ -105,9 +105,9 @@ public Build(string buildTag = default(string), List - /// Tag to associate an external version with a build. It is accessible via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV1/operation/GetBuildInfo). + /// Tag to associate an external version with a build. It is accessible via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV2/operation/GetBuildInfo). /// - /// Tag to associate an external version with a build. It is accessible via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV1/operation/GetBuildInfo). + /// Tag to associate an external version with a build. It is accessible via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV2/operation/GetBuildInfo). /// "0.1.14-14c793" [DataMember(Name = "buildTag", EmitDefaultValue = true)] public string BuildTag { get; set; } @@ -124,7 +124,7 @@ public Build(string buildTag = default(string), List /// The size (in bytes) of the Docker image built by Hathora. [DataMember(Name = "imageSize", IsRequired = true, EmitDefaultValue = true)] - public int ImageSize { get; set; } + public long ImageSize { get; set; } /// /// When the build was deleted. @@ -134,23 +134,23 @@ public Build(string buildTag = default(string), List - /// When [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) finished executing. + /// When [`RunBuild()`](https://hathora.dev/api#tag/BuildV2/operation/RunBuild) finished executing. /// - /// When [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) finished executing. + /// When [`RunBuild()`](https://hathora.dev/api#tag/BuildV2/operation/RunBuild) finished executing. [DataMember(Name = "finishedAt", IsRequired = true, EmitDefaultValue = true)] public DateTime? FinishedAt { get; set; } /// - /// When [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) is called. + /// When [`RunBuild()`](https://hathora.dev/api#tag/BuildV2/operation/RunBuild) is called. /// - /// When [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) is called. + /// When [`RunBuild()`](https://hathora.dev/api#tag/BuildV2/operation/RunBuild) is called. [DataMember(Name = "startedAt", IsRequired = true, EmitDefaultValue = true)] public DateTime? StartedAt { get; set; } /// - /// When [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild) is called. + /// When [`CreateBuild()`](https://hathora.dev/api#tag/BuildV2/operation/CreateBuild) is called. /// - /// When [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild) is called. + /// When [`CreateBuild()`](https://hathora.dev/api#tag/BuildV2/operation/CreateBuild) is called. [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] public DateTime CreatedAt { get; set; } diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/ConnectionInfoV2.cs b/csharp/src/Hathora.Cloud.Sdk/Model/ConnectionInfoV2.cs index 8988824..6ba0b57 100644 --- a/csharp/src/Hathora.Cloud.Sdk/Model/ConnectionInfoV2.cs +++ b/csharp/src/Hathora.Cloud.Sdk/Model/ConnectionInfoV2.cs @@ -30,35 +30,12 @@ namespace Hathora.Cloud.Sdk.Model [DataContract(Name = "ConnectionInfoV2")] public partial class ConnectionInfoV2 : IEquatable { - /// - /// `exposedPort` will only be available when the `status` of a room is \"active\". - /// - /// `exposedPort` will only be available when the `status` of a room is \"active\". - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Starting for value: starting - /// - [EnumMember(Value = "starting")] - Starting = 1, - - /// - /// Enum Active for value: active - /// - [EnumMember(Value = "active")] - Active = 2 - - } - /// - /// `exposedPort` will only be available when the `status` of a room is \"active\". + /// Gets or Sets Status /// - /// `exposedPort` will only be available when the `status` of a room is \"active\". - /// "active" [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = true)] - public StatusEnum Status { get; set; } + public RoomReadyStatus Status { get; set; } /// /// Initializes a new instance of the class. /// @@ -72,9 +49,9 @@ protected ConnectionInfoV2() /// /// additionalExposedPorts (required). /// exposedPort. - /// `exposedPort` will only be available when the `status` of a room is \"active\". (required). + /// status (required). /// Unique identifier to a game session or match. Use the default system generated ID or overwrite it with your own. Note: error will be returned if `roomId` is not globally unique. (required). - public ConnectionInfoV2(List additionalExposedPorts = default(List), ExposedPort exposedPort = default(ExposedPort), StatusEnum status = default(StatusEnum), string roomId = default(string)) + public ConnectionInfoV2(List additionalExposedPorts = default(List), ExposedPort exposedPort = default(ExposedPort), RoomReadyStatus status = default(RoomReadyStatus), string roomId = default(string)) { // to ensure "additionalExposedPorts" is required (not null) if (additionalExposedPorts == null) diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/CreateBuildParams.cs b/csharp/src/Hathora.Cloud.Sdk/Model/CreateBuildParams.cs index 36a956e..e05fa25 100644 --- a/csharp/src/Hathora.Cloud.Sdk/Model/CreateBuildParams.cs +++ b/csharp/src/Hathora.Cloud.Sdk/Model/CreateBuildParams.cs @@ -33,7 +33,7 @@ public partial class CreateBuildParams : IEquatable /// /// Initializes a new instance of the class. /// - /// Tag to associate an external version with a build. It is accessible via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV1/operation/GetBuildInfo).. + /// Tag to associate an external version with a build. It is accessible via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV2/operation/GetBuildInfo).. public CreateBuildParams(string buildTag = default(string)) { this.BuildTag = buildTag; @@ -41,9 +41,9 @@ public CreateBuildParams(string buildTag = default(string)) } /// - /// Tag to associate an external version with a build. It is accessible via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV1/operation/GetBuildInfo). + /// Tag to associate an external version with a build. It is accessible via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV2/operation/GetBuildInfo). /// - /// Tag to associate an external version with a build. It is accessible via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV1/operation/GetBuildInfo). + /// Tag to associate an external version with a build. It is accessible via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV2/operation/GetBuildInfo). /// "0.1.14-14c793" [DataMember(Name = "buildTag", EmitDefaultValue = false)] public string BuildTag { get; set; } diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/CreateUserInvite.cs b/csharp/src/Hathora.Cloud.Sdk/Model/CreateUserInvite.cs new file mode 100644 index 0000000..720d2d1 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk/Model/CreateUserInvite.cs @@ -0,0 +1,144 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Hathora.Cloud.Sdk.Client.OpenAPIDateConverter; + +namespace Hathora.Cloud.Sdk.Model +{ + /// + /// CreateUserInvite + /// + [DataContract(Name = "CreateUserInvite")] + public partial class CreateUserInvite : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CreateUserInvite() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// userEmail (required). + public CreateUserInvite(string userEmail = default(string)) + { + // to ensure "userEmail" is required (not null) + if (userEmail == null) + { + throw new ArgumentNullException("userEmail is a required property for CreateUserInvite and cannot be null"); + } + this.UserEmail = userEmail; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets UserEmail + /// + [DataMember(Name = "userEmail", IsRequired = true, EmitDefaultValue = true)] + public string UserEmail { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateUserInvite {\n"); + sb.Append(" UserEmail: ").Append(UserEmail).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateUserInvite); + } + + /// + /// Returns true if CreateUserInvite instances are equal + /// + /// Instance of CreateUserInvite to be compared + /// Boolean + public bool Equals(CreateUserInvite input) + { + if (input == null) + { + return false; + } + return + ( + this.UserEmail == input.UserEmail || + (this.UserEmail != null && + this.UserEmail.Equals(input.UserEmail)) + ) + && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.UserEmail != null) + { + hashCode = (hashCode * 59) + this.UserEmail.GetHashCode(); + } + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/Deployment.cs b/csharp/src/Hathora.Cloud.Sdk/Model/Deployment.cs index 8115d63..6dbbac9 100644 --- a/csharp/src/Hathora.Cloud.Sdk/Model/Deployment.cs +++ b/csharp/src/Hathora.Cloud.Sdk/Model/Deployment.cs @@ -95,7 +95,7 @@ protected Deployment() /// System generated id for a deployment. Increments by 1. (required). /// System generated id for a build. Increments by 1. (required). /// System generated unique identifier for an application. (required). - public Deployment(bool idleTimeoutEnabled = true, List env = default(List), int roomsPerProcess = default(int), PlanName planName = default(PlanName), List additionalContainerPorts = default(List), ContainerPort defaultContainerPort = default(ContainerPort), TransportTypeEnum transportType = default(TransportTypeEnum), double containerPort = default(double), DateTime createdAt = default(DateTime), string createdBy = default(string), int requestedMemoryMB = default(int), double requestedCPU = default(double), int deploymentId = default(int), int buildId = default(int), string appId = default(string)) + public Deployment(bool idleTimeoutEnabled = true, List env = default(List), int roomsPerProcess = default(int), PlanName planName = default(PlanName), List additionalContainerPorts = default(List), ContainerPort defaultContainerPort = default(ContainerPort), TransportTypeEnum transportType = default(TransportTypeEnum), double containerPort = default(double), DateTime createdAt = default(DateTime), string createdBy = default(string), int requestedMemoryMB = default(int), double requestedCPU = default(double), int deploymentId = default(int), int buildId = default(int), string appId = default(string)) { // to ensure "env" is required (not null) if (env == null) @@ -152,7 +152,7 @@ public Deployment(bool idleTimeoutEnabled = true, List env = /// /// The environment variable that our process will have access to at runtime. [DataMember(Name = "env", IsRequired = true, EmitDefaultValue = true)] - public List Env { get; set; } + public List Env { get; set; } /// /// Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/DeploymentConfig.cs b/csharp/src/Hathora.Cloud.Sdk/Model/DeploymentConfig.cs index f384741..53e7de8 100644 --- a/csharp/src/Hathora.Cloud.Sdk/Model/DeploymentConfig.cs +++ b/csharp/src/Hathora.Cloud.Sdk/Model/DeploymentConfig.cs @@ -60,7 +60,7 @@ protected DeploymentConfig() /// Additional ports your server listens on.. /// transportType (required). /// Default port the server listens on. (required). - public DeploymentConfig(bool idleTimeoutEnabled = true, List env = default(List), int roomsPerProcess = default(int), PlanName planName = default(PlanName), List additionalContainerPorts = default(List), TransportType transportType = default(TransportType), int containerPort = default(int)) + public DeploymentConfig(bool idleTimeoutEnabled = true, List env = default(List), int roomsPerProcess = default(int), PlanName planName = default(PlanName), List additionalContainerPorts = default(List), TransportType transportType = default(TransportType), int containerPort = default(int)) { // to ensure "env" is required (not null) if (env == null) @@ -89,7 +89,7 @@ public DeploymentConfig(bool idleTimeoutEnabled = true, List /// /// The environment variable that our process will have access to at runtime. [DataMember(Name = "env", IsRequired = true, EmitDefaultValue = true)] - public List Env { get; set; } + public List Env { get; set; } /// /// Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/DeploymentConfigV2.cs b/csharp/src/Hathora.Cloud.Sdk/Model/DeploymentConfigV2.cs new file mode 100644 index 0000000..68def0f --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk/Model/DeploymentConfigV2.cs @@ -0,0 +1,259 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Hathora.Cloud.Sdk.Client.OpenAPIDateConverter; + +namespace Hathora.Cloud.Sdk.Model +{ + /// + /// DeploymentConfigV2 + /// + [DataContract(Name = "DeploymentConfigV2")] + public partial class DeploymentConfigV2 : IEquatable + { + + /// + /// Gets or Sets TransportType + /// + [DataMember(Name = "transportType", IsRequired = true, EmitDefaultValue = true)] + public TransportType TransportType { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DeploymentConfigV2() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// Option to shut down processes that have had no new connections or rooms for five minutes. (required). + /// The environment variable that our process will have access to at runtime. (required). + /// Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. (required). + /// Additional ports your server listens on.. + /// transportType (required). + /// Default port the server listens on. (required). + /// The amount of memory allocated to your process. (required). + /// The number of cores allocated to your process. (required). + public DeploymentConfigV2(bool idleTimeoutEnabled = default(bool), List env = default(List), int roomsPerProcess = default(int), List additionalContainerPorts = default(List), TransportType transportType = default(TransportType), int containerPort = default(int), double requestedMemoryMB = default(double), double requestedCPU = default(double)) + { + this.IdleTimeoutEnabled = idleTimeoutEnabled; + // to ensure "env" is required (not null) + if (env == null) + { + throw new ArgumentNullException("env is a required property for DeploymentConfigV2 and cannot be null"); + } + this.Env = env; + this.RoomsPerProcess = roomsPerProcess; + this.TransportType = transportType; + this.ContainerPort = containerPort; + this.RequestedMemoryMB = requestedMemoryMB; + this.RequestedCPU = requestedCPU; + this.AdditionalContainerPorts = additionalContainerPorts; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Option to shut down processes that have had no new connections or rooms for five minutes. + /// + /// Option to shut down processes that have had no new connections or rooms for five minutes. + [DataMember(Name = "idleTimeoutEnabled", IsRequired = true, EmitDefaultValue = true)] + public bool IdleTimeoutEnabled { get; set; } + + /// + /// The environment variable that our process will have access to at runtime. + /// + /// The environment variable that our process will have access to at runtime. + [DataMember(Name = "env", IsRequired = true, EmitDefaultValue = true)] + public List Env { get; set; } + + /// + /// Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. + /// + /// Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. + /// 3 + [DataMember(Name = "roomsPerProcess", IsRequired = true, EmitDefaultValue = true)] + public int RoomsPerProcess { get; set; } + + /// + /// Additional ports your server listens on. + /// + /// Additional ports your server listens on. + [DataMember(Name = "additionalContainerPorts", EmitDefaultValue = false)] + public List AdditionalContainerPorts { get; set; } + + /// + /// Default port the server listens on. + /// + /// Default port the server listens on. + /// 4000 + [DataMember(Name = "containerPort", IsRequired = true, EmitDefaultValue = true)] + public int ContainerPort { get; set; } + + /// + /// The amount of memory allocated to your process. + /// + /// The amount of memory allocated to your process. + /// 1024 + [DataMember(Name = "requestedMemoryMB", IsRequired = true, EmitDefaultValue = true)] + public double RequestedMemoryMB { get; set; } + + /// + /// The number of cores allocated to your process. + /// + /// The number of cores allocated to your process. + /// 0.5 + [DataMember(Name = "requestedCPU", IsRequired = true, EmitDefaultValue = true)] + public double RequestedCPU { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DeploymentConfigV2 {\n"); + sb.Append(" IdleTimeoutEnabled: ").Append(IdleTimeoutEnabled).Append("\n"); + sb.Append(" Env: ").Append(Env).Append("\n"); + sb.Append(" RoomsPerProcess: ").Append(RoomsPerProcess).Append("\n"); + sb.Append(" AdditionalContainerPorts: ").Append(AdditionalContainerPorts).Append("\n"); + sb.Append(" TransportType: ").Append(TransportType).Append("\n"); + sb.Append(" ContainerPort: ").Append(ContainerPort).Append("\n"); + sb.Append(" RequestedMemoryMB: ").Append(RequestedMemoryMB).Append("\n"); + sb.Append(" RequestedCPU: ").Append(RequestedCPU).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as DeploymentConfigV2); + } + + /// + /// Returns true if DeploymentConfigV2 instances are equal + /// + /// Instance of DeploymentConfigV2 to be compared + /// Boolean + public bool Equals(DeploymentConfigV2 input) + { + if (input == null) + { + return false; + } + return + ( + this.IdleTimeoutEnabled == input.IdleTimeoutEnabled || + this.IdleTimeoutEnabled.Equals(input.IdleTimeoutEnabled) + ) && + ( + this.Env == input.Env || + this.Env != null && + input.Env != null && + this.Env.SequenceEqual(input.Env) + ) && + ( + this.RoomsPerProcess == input.RoomsPerProcess || + this.RoomsPerProcess.Equals(input.RoomsPerProcess) + ) && + ( + this.AdditionalContainerPorts == input.AdditionalContainerPorts || + this.AdditionalContainerPorts != null && + input.AdditionalContainerPorts != null && + this.AdditionalContainerPorts.SequenceEqual(input.AdditionalContainerPorts) + ) && + ( + this.TransportType == input.TransportType || + this.TransportType.Equals(input.TransportType) + ) && + ( + this.ContainerPort == input.ContainerPort || + this.ContainerPort.Equals(input.ContainerPort) + ) && + ( + this.RequestedMemoryMB == input.RequestedMemoryMB || + this.RequestedMemoryMB.Equals(input.RequestedMemoryMB) + ) && + ( + this.RequestedCPU == input.RequestedCPU || + this.RequestedCPU.Equals(input.RequestedCPU) + ) + && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.IdleTimeoutEnabled.GetHashCode(); + if (this.Env != null) + { + hashCode = (hashCode * 59) + this.Env.GetHashCode(); + } + hashCode = (hashCode * 59) + this.RoomsPerProcess.GetHashCode(); + if (this.AdditionalContainerPorts != null) + { + hashCode = (hashCode * 59) + this.AdditionalContainerPorts.GetHashCode(); + } + hashCode = (hashCode * 59) + this.TransportType.GetHashCode(); + hashCode = (hashCode * 59) + this.ContainerPort.GetHashCode(); + hashCode = (hashCode * 59) + this.RequestedMemoryMB.GetHashCode(); + hashCode = (hashCode * 59) + this.RequestedCPU.GetHashCode(); + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/DeploymentV2.cs b/csharp/src/Hathora.Cloud.Sdk/Model/DeploymentV2.cs new file mode 100644 index 0000000..be8fedc --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk/Model/DeploymentV2.cs @@ -0,0 +1,358 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Hathora.Cloud.Sdk.Client.OpenAPIDateConverter; + +namespace Hathora.Cloud.Sdk.Model +{ + /// + /// DeploymentV2 + /// + [DataContract(Name = "DeploymentV2")] + public partial class DeploymentV2 : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DeploymentV2() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// Option to shut down processes that have had no new connections or rooms for five minutes. (required). + /// The environment variable that our process will have access to at runtime. (required). + /// Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. (required). + /// Additional ports your server listens on. (required). + /// defaultContainerPort (required). + /// When the deployment was created. (required). + /// UserId or email address for the user that created the deployment. (required). + /// The amount of memory allocated to your process. (required). + /// The number of cores allocated to your process. (required). + /// System generated id for a deployment. Increments by 1. (required). + /// System generated id for a build. Increments by 1. (required). + /// System generated unique identifier for an application. (required). + public DeploymentV2(bool idleTimeoutEnabled = default(bool), List env = default(List), int roomsPerProcess = default(int), List additionalContainerPorts = default(List), ContainerPort defaultContainerPort = default(ContainerPort), DateTime createdAt = default(DateTime), string createdBy = default(string), double requestedMemoryMB = default(double), double requestedCPU = default(double), int deploymentId = default(int), int buildId = default(int), string appId = default(string)) + { + this.IdleTimeoutEnabled = idleTimeoutEnabled; + // to ensure "env" is required (not null) + if (env == null) + { + throw new ArgumentNullException("env is a required property for DeploymentV2 and cannot be null"); + } + this.Env = env; + this.RoomsPerProcess = roomsPerProcess; + // to ensure "additionalContainerPorts" is required (not null) + if (additionalContainerPorts == null) + { + throw new ArgumentNullException("additionalContainerPorts is a required property for DeploymentV2 and cannot be null"); + } + this.AdditionalContainerPorts = additionalContainerPorts; + // to ensure "defaultContainerPort" is required (not null) + if (defaultContainerPort == null) + { + throw new ArgumentNullException("defaultContainerPort is a required property for DeploymentV2 and cannot be null"); + } + this.DefaultContainerPort = defaultContainerPort; + this.CreatedAt = createdAt; + // to ensure "createdBy" is required (not null) + if (createdBy == null) + { + throw new ArgumentNullException("createdBy is a required property for DeploymentV2 and cannot be null"); + } + this.CreatedBy = createdBy; + this.RequestedMemoryMB = requestedMemoryMB; + this.RequestedCPU = requestedCPU; + this.DeploymentId = deploymentId; + this.BuildId = buildId; + // to ensure "appId" is required (not null) + if (appId == null) + { + throw new ArgumentNullException("appId is a required property for DeploymentV2 and cannot be null"); + } + this.AppId = appId; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Option to shut down processes that have had no new connections or rooms for five minutes. + /// + /// Option to shut down processes that have had no new connections or rooms for five minutes. + [DataMember(Name = "idleTimeoutEnabled", IsRequired = true, EmitDefaultValue = true)] + public bool IdleTimeoutEnabled { get; set; } + + /// + /// The environment variable that our process will have access to at runtime. + /// + /// The environment variable that our process will have access to at runtime. + [DataMember(Name = "env", IsRequired = true, EmitDefaultValue = true)] + public List Env { get; set; } + + /// + /// Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. + /// + /// Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. + /// 3 + [DataMember(Name = "roomsPerProcess", IsRequired = true, EmitDefaultValue = true)] + public int RoomsPerProcess { get; set; } + + /// + /// Additional ports your server listens on. + /// + /// Additional ports your server listens on. + [DataMember(Name = "additionalContainerPorts", IsRequired = true, EmitDefaultValue = true)] + public List AdditionalContainerPorts { get; set; } + + /// + /// Gets or Sets DefaultContainerPort + /// + [DataMember(Name = "defaultContainerPort", IsRequired = true, EmitDefaultValue = true)] + public ContainerPort DefaultContainerPort { get; set; } + + /// + /// When the deployment was created. + /// + /// When the deployment was created. + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// UserId or email address for the user that created the deployment. + /// + /// UserId or email address for the user that created the deployment. + /// "google-oauth2|107030234048588177467" + [DataMember(Name = "createdBy", IsRequired = true, EmitDefaultValue = true)] + public string CreatedBy { get; set; } + + /// + /// The amount of memory allocated to your process. + /// + /// The amount of memory allocated to your process. + /// 1024 + [DataMember(Name = "requestedMemoryMB", IsRequired = true, EmitDefaultValue = true)] + public double RequestedMemoryMB { get; set; } + + /// + /// The number of cores allocated to your process. + /// + /// The number of cores allocated to your process. + /// 0.5 + [DataMember(Name = "requestedCPU", IsRequired = true, EmitDefaultValue = true)] + public double RequestedCPU { get; set; } + + /// + /// System generated id for a deployment. Increments by 1. + /// + /// System generated id for a deployment. Increments by 1. + /// 1 + [DataMember(Name = "deploymentId", IsRequired = true, EmitDefaultValue = true)] + public int DeploymentId { get; set; } + + /// + /// System generated id for a build. Increments by 1. + /// + /// System generated id for a build. Increments by 1. + /// 1 + [DataMember(Name = "buildId", IsRequired = true, EmitDefaultValue = true)] + public int BuildId { get; set; } + + /// + /// System generated unique identifier for an application. + /// + /// System generated unique identifier for an application. + /// "app-af469a92-5b45-4565-b3c4-b79878de67d2" + [DataMember(Name = "appId", IsRequired = true, EmitDefaultValue = true)] + public string AppId { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DeploymentV2 {\n"); + sb.Append(" IdleTimeoutEnabled: ").Append(IdleTimeoutEnabled).Append("\n"); + sb.Append(" Env: ").Append(Env).Append("\n"); + sb.Append(" RoomsPerProcess: ").Append(RoomsPerProcess).Append("\n"); + sb.Append(" AdditionalContainerPorts: ").Append(AdditionalContainerPorts).Append("\n"); + sb.Append(" DefaultContainerPort: ").Append(DefaultContainerPort).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" CreatedBy: ").Append(CreatedBy).Append("\n"); + sb.Append(" RequestedMemoryMB: ").Append(RequestedMemoryMB).Append("\n"); + sb.Append(" RequestedCPU: ").Append(RequestedCPU).Append("\n"); + sb.Append(" DeploymentId: ").Append(DeploymentId).Append("\n"); + sb.Append(" BuildId: ").Append(BuildId).Append("\n"); + sb.Append(" AppId: ").Append(AppId).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as DeploymentV2); + } + + /// + /// Returns true if DeploymentV2 instances are equal + /// + /// Instance of DeploymentV2 to be compared + /// Boolean + public bool Equals(DeploymentV2 input) + { + if (input == null) + { + return false; + } + return + ( + this.IdleTimeoutEnabled == input.IdleTimeoutEnabled || + this.IdleTimeoutEnabled.Equals(input.IdleTimeoutEnabled) + ) && + ( + this.Env == input.Env || + this.Env != null && + input.Env != null && + this.Env.SequenceEqual(input.Env) + ) && + ( + this.RoomsPerProcess == input.RoomsPerProcess || + this.RoomsPerProcess.Equals(input.RoomsPerProcess) + ) && + ( + this.AdditionalContainerPorts == input.AdditionalContainerPorts || + this.AdditionalContainerPorts != null && + input.AdditionalContainerPorts != null && + this.AdditionalContainerPorts.SequenceEqual(input.AdditionalContainerPorts) + ) && + ( + this.DefaultContainerPort == input.DefaultContainerPort || + (this.DefaultContainerPort != null && + this.DefaultContainerPort.Equals(input.DefaultContainerPort)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.CreatedBy == input.CreatedBy || + (this.CreatedBy != null && + this.CreatedBy.Equals(input.CreatedBy)) + ) && + ( + this.RequestedMemoryMB == input.RequestedMemoryMB || + this.RequestedMemoryMB.Equals(input.RequestedMemoryMB) + ) && + ( + this.RequestedCPU == input.RequestedCPU || + this.RequestedCPU.Equals(input.RequestedCPU) + ) && + ( + this.DeploymentId == input.DeploymentId || + this.DeploymentId.Equals(input.DeploymentId) + ) && + ( + this.BuildId == input.BuildId || + this.BuildId.Equals(input.BuildId) + ) && + ( + this.AppId == input.AppId || + (this.AppId != null && + this.AppId.Equals(input.AppId)) + ) + && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.IdleTimeoutEnabled.GetHashCode(); + if (this.Env != null) + { + hashCode = (hashCode * 59) + this.Env.GetHashCode(); + } + hashCode = (hashCode * 59) + this.RoomsPerProcess.GetHashCode(); + if (this.AdditionalContainerPorts != null) + { + hashCode = (hashCode * 59) + this.AdditionalContainerPorts.GetHashCode(); + } + if (this.DefaultContainerPort != null) + { + hashCode = (hashCode * 59) + this.DefaultContainerPort.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.CreatedBy != null) + { + hashCode = (hashCode * 59) + this.CreatedBy.GetHashCode(); + } + hashCode = (hashCode * 59) + this.RequestedMemoryMB.GetHashCode(); + hashCode = (hashCode * 59) + this.RequestedCPU.GetHashCode(); + hashCode = (hashCode * 59) + this.DeploymentId.GetHashCode(); + hashCode = (hashCode * 59) + this.BuildId.GetHashCode(); + if (this.AppId != null) + { + hashCode = (hashCode * 59) + this.AppId.GetHashCode(); + } + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/DeploymentV2EnvInner.cs b/csharp/src/Hathora.Cloud.Sdk/Model/DeploymentV2EnvInner.cs new file mode 100644 index 0000000..21593a9 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk/Model/DeploymentV2EnvInner.cs @@ -0,0 +1,169 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Hathora.Cloud.Sdk.Client.OpenAPIDateConverter; + +namespace Hathora.Cloud.Sdk.Model +{ + /// + /// DeploymentV2EnvInner + /// + [DataContract(Name = "DeploymentV2_env_inner")] + public partial class DeploymentV2EnvInner : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DeploymentV2EnvInner() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// value (required). + /// name (required). + public DeploymentV2EnvInner(string value = default(string), string name = default(string)) + { + // to ensure "value" is required (not null) + if (value == null) + { + throw new ArgumentNullException("value is a required property for DeploymentV2EnvInner and cannot be null"); + } + this.Value = value; + // to ensure "name" is required (not null) + if (name == null) + { + throw new ArgumentNullException("name is a required property for DeploymentV2EnvInner and cannot be null"); + } + this.Name = name; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets Value + /// + /// "TRUE" + [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = true)] + public string Value { get; set; } + + /// + /// Gets or Sets Name + /// + /// "EULA" + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] + public string Name { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DeploymentV2EnvInner {\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as DeploymentV2EnvInner); + } + + /// + /// Returns true if DeploymentV2EnvInner instances are equal + /// + /// Instance of DeploymentV2EnvInner to be compared + /// Boolean + public bool Equals(DeploymentV2EnvInner input) + { + if (input == null) + { + return false; + } + return + ( + this.Value == input.Value || + (this.Value != null && + this.Value.Equals(input.Value)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) + && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Value != null) + { + hashCode = (hashCode * 59) + this.Value.GetHashCode(); + } + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/GoogleIdTokenObject.cs b/csharp/src/Hathora.Cloud.Sdk/Model/GoogleIdTokenObject.cs new file mode 100644 index 0000000..1ba0cc7 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk/Model/GoogleIdTokenObject.cs @@ -0,0 +1,146 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Hathora.Cloud.Sdk.Client.OpenAPIDateConverter; + +namespace Hathora.Cloud.Sdk.Model +{ + /// + /// GoogleIdTokenObject + /// + [DataContract(Name = "GoogleIdTokenObject")] + public partial class GoogleIdTokenObject : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GoogleIdTokenObject() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// A Google-signed OIDC ID token representing a player's authenticated identity. Learn how to get an `idToken` [here](https://cloud.google.com/docs/authentication/get-id-token). (required). + public GoogleIdTokenObject(string idToken = default(string)) + { + // to ensure "idToken" is required (not null) + if (idToken == null) + { + throw new ArgumentNullException("idToken is a required property for GoogleIdTokenObject and cannot be null"); + } + this.IdToken = idToken; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// A Google-signed OIDC ID token representing a player's authenticated identity. Learn how to get an `idToken` [here](https://cloud.google.com/docs/authentication/get-id-token). + /// + /// A Google-signed OIDC ID token representing a player's authenticated identity. Learn how to get an `idToken` [here](https://cloud.google.com/docs/authentication/get-id-token). + /// "eyJhbGciOiJSUzI1NiIsImtpZCI6ImZkNDhhNzUxMzhkOWQ0OGYwYWE2MzVlZjU2OWM0ZTE5NmY3YWU4ZDYiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJhY2NvdW50cy5nb29nbGUuY29tIiwiYXpwIjoiODQ4NDEyODI2Nzg4LW00bXNyYjZxNDRkbTJ1ZTNrZ3Z1aTBmcTdrZGE1NWxzLmFwcHMuZ29vZ2xldXNlcmNvbnRlbnQuY29tIiwiYXVkIjoiODQ4NDEyODI2Nzg4LW00bXNyYjZxNDRkbTJ1ZTNrZ3Z1aTBmcTdrZGE1NWxzLmFwcHMuZ29vZ2xldXNlcmNvbnRlbnQuY29tIiwic3ViIjoiMTE0NTQyMzMwNzI3MTU2MTMzNzc2IiwiZW1haWwiOiJocGFdkeivmeuzQGdtYWlsLmNvbSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJhdF9oYXNoIjoidno1NGhhdTNxbnVR" + [DataMember(Name = "idToken", IsRequired = true, EmitDefaultValue = true)] + public string IdToken { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class GoogleIdTokenObject {\n"); + sb.Append(" IdToken: ").Append(IdToken).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GoogleIdTokenObject); + } + + /// + /// Returns true if GoogleIdTokenObject instances are equal + /// + /// Instance of GoogleIdTokenObject to be compared + /// Boolean + public bool Equals(GoogleIdTokenObject input) + { + if (input == null) + { + return false; + } + return + ( + this.IdToken == input.IdToken || + (this.IdToken != null && + this.IdToken.Equals(input.IdToken)) + ) + && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.IdToken != null) + { + hashCode = (hashCode * 59) + this.IdToken.GetHashCode(); + } + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/InviteStatusAccepted.cs b/csharp/src/Hathora.Cloud.Sdk/Model/InviteStatusAccepted.cs new file mode 100644 index 0000000..b1fd0ac --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk/Model/InviteStatusAccepted.cs @@ -0,0 +1,174 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Hathora.Cloud.Sdk.Client.OpenAPIDateConverter; + +namespace Hathora.Cloud.Sdk.Model +{ + /// + /// InviteStatusAccepted + /// + [DataContract(Name = "InviteStatusAccepted")] + public partial class InviteStatusAccepted : IEquatable + { + /// + /// Defines Type + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum TypeEnum + { + /// + /// Enum Accepted for value: accepted + /// + [EnumMember(Value = "accepted")] + Accepted = 1 + + } + + + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] + public TypeEnum Type { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected InviteStatusAccepted() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// System generated unique identifier for a user. Not guaranteed to have a specific format. (required). + /// type (required). + public InviteStatusAccepted(string userId = default(string), TypeEnum type = default(TypeEnum)) + { + // to ensure "userId" is required (not null) + if (userId == null) + { + throw new ArgumentNullException("userId is a required property for InviteStatusAccepted and cannot be null"); + } + this.UserId = userId; + this.Type = type; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// System generated unique identifier for a user. Not guaranteed to have a specific format. + /// + /// System generated unique identifier for a user. Not guaranteed to have a specific format. + /// "auth0|646bdf96f7fb73d04c8c84db" + [DataMember(Name = "userId", IsRequired = true, EmitDefaultValue = true)] + public string UserId { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class InviteStatusAccepted {\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as InviteStatusAccepted); + } + + /// + /// Returns true if InviteStatusAccepted instances are equal + /// + /// Instance of InviteStatusAccepted to be compared + /// Boolean + public bool Equals(InviteStatusAccepted input) + { + if (input == null) + { + return false; + } + return + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.Type == input.Type || + this.Type.Equals(input.Type) + ) + && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Type.GetHashCode(); + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/InviteStatusPending.cs b/csharp/src/Hathora.Cloud.Sdk/Model/InviteStatusPending.cs new file mode 100644 index 0000000..6b05b00 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk/Model/InviteStatusPending.cs @@ -0,0 +1,149 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Hathora.Cloud.Sdk.Client.OpenAPIDateConverter; + +namespace Hathora.Cloud.Sdk.Model +{ + /// + /// InviteStatusPending + /// + [DataContract(Name = "InviteStatusPending")] + public partial class InviteStatusPending : IEquatable + { + /// + /// Defines Type + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum TypeEnum + { + /// + /// Enum Pending for value: pending + /// + [EnumMember(Value = "pending")] + Pending = 1 + + } + + + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] + public TypeEnum Type { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected InviteStatusPending() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// type (required). + public InviteStatusPending(TypeEnum type = default(TypeEnum)) + { + this.Type = type; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class InviteStatusPending {\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as InviteStatusPending); + } + + /// + /// Returns true if InviteStatusPending instances are equal + /// + /// Instance of InviteStatusPending to be compared + /// Boolean + public bool Equals(InviteStatusPending input) + { + if (input == null) + { + return false; + } + return + ( + this.Type == input.Type || + this.Type.Equals(input.Type) + ) + && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.Type.GetHashCode(); + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/InviteStatusRejected.cs b/csharp/src/Hathora.Cloud.Sdk/Model/InviteStatusRejected.cs new file mode 100644 index 0000000..5b360c1 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk/Model/InviteStatusRejected.cs @@ -0,0 +1,174 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Hathora.Cloud.Sdk.Client.OpenAPIDateConverter; + +namespace Hathora.Cloud.Sdk.Model +{ + /// + /// InviteStatusRejected + /// + [DataContract(Name = "InviteStatusRejected")] + public partial class InviteStatusRejected : IEquatable + { + /// + /// Defines Type + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum TypeEnum + { + /// + /// Enum Rejected for value: rejected + /// + [EnumMember(Value = "rejected")] + Rejected = 1 + + } + + + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] + public TypeEnum Type { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected InviteStatusRejected() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// System generated unique identifier for a user. Not guaranteed to have a specific format. (required). + /// type (required). + public InviteStatusRejected(string userId = default(string), TypeEnum type = default(TypeEnum)) + { + // to ensure "userId" is required (not null) + if (userId == null) + { + throw new ArgumentNullException("userId is a required property for InviteStatusRejected and cannot be null"); + } + this.UserId = userId; + this.Type = type; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// System generated unique identifier for a user. Not guaranteed to have a specific format. + /// + /// System generated unique identifier for a user. Not guaranteed to have a specific format. + /// "auth0|646bdf96f7fb73d04c8c84db" + [DataMember(Name = "userId", IsRequired = true, EmitDefaultValue = true)] + public string UserId { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class InviteStatusRejected {\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as InviteStatusRejected); + } + + /// + /// Returns true if InviteStatusRejected instances are equal + /// + /// Instance of InviteStatusRejected to be compared + /// Boolean + public bool Equals(InviteStatusRejected input) + { + if (input == null) + { + return false; + } + return + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.Type == input.Type || + this.Type.Equals(input.Type) + ) + && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Type.GetHashCode(); + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/InviteStatusRescinded.cs b/csharp/src/Hathora.Cloud.Sdk/Model/InviteStatusRescinded.cs new file mode 100644 index 0000000..e10fb20 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk/Model/InviteStatusRescinded.cs @@ -0,0 +1,194 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Hathora.Cloud.Sdk.Client.OpenAPIDateConverter; + +namespace Hathora.Cloud.Sdk.Model +{ + /// + /// InviteStatusRescinded + /// + [DataContract(Name = "InviteStatusRescinded")] + public partial class InviteStatusRescinded : IEquatable + { + /// + /// Defines Type + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum TypeEnum + { + /// + /// Enum Rescinded for value: rescinded + /// + [EnumMember(Value = "rescinded")] + Rescinded = 1 + + } + + + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] + public TypeEnum Type { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected InviteStatusRescinded() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// System generated unique identifier for a user. Not guaranteed to have a specific format. (required). + /// System generated unique identifier for a user. Not guaranteed to have a specific format.. + /// type (required). + public InviteStatusRescinded(string rescindedBy = default(string), string userId = default(string), TypeEnum type = default(TypeEnum)) + { + // to ensure "rescindedBy" is required (not null) + if (rescindedBy == null) + { + throw new ArgumentNullException("rescindedBy is a required property for InviteStatusRescinded and cannot be null"); + } + this.RescindedBy = rescindedBy; + this.Type = type; + this.UserId = userId; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// System generated unique identifier for a user. Not guaranteed to have a specific format. + /// + /// System generated unique identifier for a user. Not guaranteed to have a specific format. + /// "auth0|646bdf96f7fb73d04c8c84db" + [DataMember(Name = "rescindedBy", IsRequired = true, EmitDefaultValue = true)] + public string RescindedBy { get; set; } + + /// + /// System generated unique identifier for a user. Not guaranteed to have a specific format. + /// + /// System generated unique identifier for a user. Not guaranteed to have a specific format. + /// "auth0|646bdf96f7fb73d04c8c84db" + [DataMember(Name = "userId", EmitDefaultValue = false)] + public string UserId { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class InviteStatusRescinded {\n"); + sb.Append(" RescindedBy: ").Append(RescindedBy).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as InviteStatusRescinded); + } + + /// + /// Returns true if InviteStatusRescinded instances are equal + /// + /// Instance of InviteStatusRescinded to be compared + /// Boolean + public bool Equals(InviteStatusRescinded input) + { + if (input == null) + { + return false; + } + return + ( + this.RescindedBy == input.RescindedBy || + (this.RescindedBy != null && + this.RescindedBy.Equals(input.RescindedBy)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.Type == input.Type || + this.Type.Equals(input.Type) + ) + && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.RescindedBy != null) + { + hashCode = (hashCode * 59) + this.RescindedBy.GetHashCode(); + } + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Type.GetHashCode(); + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/Lobby.cs b/csharp/src/Hathora.Cloud.Sdk/Model/Lobby.cs index e0bde6f..b6b47ed 100644 --- a/csharp/src/Hathora.Cloud.Sdk/Model/Lobby.cs +++ b/csharp/src/Hathora.Cloud.Sdk/Model/Lobby.cs @@ -115,7 +115,7 @@ public Lobby(string shortCode = default(string), Object state = default(Object), /// JSON blob to store metadata for a room. Must be smaller than 1MB. /// /// JSON blob to store metadata for a room. Must be smaller than 1MB. - [DataMember(Name = "state", EmitDefaultValue = false)] + [DataMember(Name = "state", EmitDefaultValue = true)] public Object State { get; set; } /// diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/NewUserInfo.cs b/csharp/src/Hathora.Cloud.Sdk/Model/NewUserInfo.cs new file mode 100644 index 0000000..f48aa50 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk/Model/NewUserInfo.cs @@ -0,0 +1,167 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Hathora.Cloud.Sdk.Client.OpenAPIDateConverter; + +namespace Hathora.Cloud.Sdk.Model +{ + /// + /// NewUserInfo + /// + [DataContract(Name = "NewUserInfo")] + public partial class NewUserInfo : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected NewUserInfo() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// email (required). + /// userId (required). + public NewUserInfo(string email = default(string), string userId = default(string)) + { + // to ensure "email" is required (not null) + if (email == null) + { + throw new ArgumentNullException("email is a required property for NewUserInfo and cannot be null"); + } + this.Email = email; + // to ensure "userId" is required (not null) + if (userId == null) + { + throw new ArgumentNullException("userId is a required property for NewUserInfo and cannot be null"); + } + this.UserId = userId; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets Email + /// + [DataMember(Name = "email", IsRequired = true, EmitDefaultValue = true)] + public string Email { get; set; } + + /// + /// Gets or Sets UserId + /// + [DataMember(Name = "user_id", IsRequired = true, EmitDefaultValue = true)] + public string UserId { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class NewUserInfo {\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as NewUserInfo); + } + + /// + /// Returns true if NewUserInfo instances are equal + /// + /// Instance of NewUserInfo to be compared + /// Boolean + public bool Equals(NewUserInfo input) + { + if (input == null) + { + return false; + } + return + ( + this.Email == input.Email || + (this.Email != null && + this.Email.Equals(input.Email)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) + && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Email != null) + { + hashCode = (hashCode * 59) + this.Email.GetHashCode(); + } + if (this.UserId != null) + { + hashCode = (hashCode * 59) + this.UserId.GetHashCode(); + } + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/NicknameObject.cs b/csharp/src/Hathora.Cloud.Sdk/Model/NicknameObject.cs new file mode 100644 index 0000000..b1b5554 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk/Model/NicknameObject.cs @@ -0,0 +1,146 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Hathora.Cloud.Sdk.Client.OpenAPIDateConverter; + +namespace Hathora.Cloud.Sdk.Model +{ + /// + /// NicknameObject + /// + [DataContract(Name = "NicknameObject")] + public partial class NicknameObject : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected NicknameObject() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// An alias to represent a player. (required). + public NicknameObject(string nickname = default(string)) + { + // to ensure "nickname" is required (not null) + if (nickname == null) + { + throw new ArgumentNullException("nickname is a required property for NicknameObject and cannot be null"); + } + this.Nickname = nickname; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// An alias to represent a player. + /// + /// An alias to represent a player. + /// "squiddytwoshoes" + [DataMember(Name = "nickname", IsRequired = true, EmitDefaultValue = true)] + public string Nickname { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class NicknameObject {\n"); + sb.Append(" Nickname: ").Append(Nickname).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as NicknameObject); + } + + /// + /// Returns true if NicknameObject instances are equal + /// + /// Instance of NicknameObject to be compared + /// Boolean + public bool Equals(NicknameObject input) + { + if (input == null) + { + return false; + } + return + ( + this.Nickname == input.Nickname || + (this.Nickname != null && + this.Nickname.Equals(input.Nickname)) + ) + && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Nickname != null) + { + hashCode = (hashCode * 59) + this.Nickname.GetHashCode(); + } + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/OrgInvitesPage.cs b/csharp/src/Hathora.Cloud.Sdk/Model/OrgInvitesPage.cs new file mode 100644 index 0000000..9abd161 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk/Model/OrgInvitesPage.cs @@ -0,0 +1,145 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Hathora.Cloud.Sdk.Client.OpenAPIDateConverter; + +namespace Hathora.Cloud.Sdk.Model +{ + /// + /// OrgInvitesPage + /// + [DataContract(Name = "OrgInvitesPage")] + public partial class OrgInvitesPage : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected OrgInvitesPage() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// invites (required). + public OrgInvitesPage(List invites = default(List)) + { + // to ensure "invites" is required (not null) + if (invites == null) + { + throw new ArgumentNullException("invites is a required property for OrgInvitesPage and cannot be null"); + } + this.Invites = invites; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets Invites + /// + [DataMember(Name = "invites", IsRequired = true, EmitDefaultValue = true)] + public List Invites { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class OrgInvitesPage {\n"); + sb.Append(" Invites: ").Append(Invites).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as OrgInvitesPage); + } + + /// + /// Returns true if OrgInvitesPage instances are equal + /// + /// Instance of OrgInvitesPage to be compared + /// Boolean + public bool Equals(OrgInvitesPage input) + { + if (input == null) + { + return false; + } + return + ( + this.Invites == input.Invites || + this.Invites != null && + input.Invites != null && + this.Invites.SequenceEqual(input.Invites) + ) + && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Invites != null) + { + hashCode = (hashCode * 59) + this.Invites.GetHashCode(); + } + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/OrgPermission.cs b/csharp/src/Hathora.Cloud.Sdk/Model/OrgPermission.cs new file mode 100644 index 0000000..b8b9bb7 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk/Model/OrgPermission.cs @@ -0,0 +1,253 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Hathora.Cloud.Sdk.Client.OpenAPIDateConverter; + +namespace Hathora.Cloud.Sdk.Model +{ + /// + /// OrgPermission + /// + [DataContract(Name = "OrgPermission")] + public partial class OrgPermission : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected OrgPermission() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// updatedAt (required). + /// createdAt (required). + /// status (required). + /// userEmail (required). + /// System generated unique identifier for a user. Not guaranteed to have a specific format. (required). + /// System generated unique identifier for an organization. Not guaranteed to have a specific format. (required). + public OrgPermission(DateTime updatedAt = default(DateTime), DateTime createdAt = default(DateTime), OrganizationInviteStatus status = default(OrganizationInviteStatus), string userEmail = default(string), string invitedBy = default(string), string orgId = default(string)) + { + this.UpdatedAt = updatedAt; + this.CreatedAt = createdAt; + // to ensure "status" is required (not null) + if (status == null) + { + throw new ArgumentNullException("status is a required property for OrgPermission and cannot be null"); + } + this.Status = status; + // to ensure "userEmail" is required (not null) + if (userEmail == null) + { + throw new ArgumentNullException("userEmail is a required property for OrgPermission and cannot be null"); + } + this.UserEmail = userEmail; + // to ensure "invitedBy" is required (not null) + if (invitedBy == null) + { + throw new ArgumentNullException("invitedBy is a required property for OrgPermission and cannot be null"); + } + this.InvitedBy = invitedBy; + // to ensure "orgId" is required (not null) + if (orgId == null) + { + throw new ArgumentNullException("orgId is a required property for OrgPermission and cannot be null"); + } + this.OrgId = orgId; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets UpdatedAt + /// + [DataMember(Name = "updatedAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime UpdatedAt { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Gets or Sets Status + /// + [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = true)] + public OrganizationInviteStatus Status { get; set; } + + /// + /// Gets or Sets UserEmail + /// + [DataMember(Name = "userEmail", IsRequired = true, EmitDefaultValue = true)] + public string UserEmail { get; set; } + + /// + /// System generated unique identifier for a user. Not guaranteed to have a specific format. + /// + /// System generated unique identifier for a user. Not guaranteed to have a specific format. + /// "auth0|646bdf96f7fb73d04c8c84db" + [DataMember(Name = "invitedBy", IsRequired = true, EmitDefaultValue = true)] + public string InvitedBy { get; set; } + + /// + /// System generated unique identifier for an organization. Not guaranteed to have a specific format. + /// + /// System generated unique identifier for an organization. Not guaranteed to have a specific format. + /// "org-6f706e83-0ec1-437a-9a46-7d4281eb2f39" + [DataMember(Name = "orgId", IsRequired = true, EmitDefaultValue = true)] + public string OrgId { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class OrgPermission {\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" UserEmail: ").Append(UserEmail).Append("\n"); + sb.Append(" InvitedBy: ").Append(InvitedBy).Append("\n"); + sb.Append(" OrgId: ").Append(OrgId).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as OrgPermission); + } + + /// + /// Returns true if OrgPermission instances are equal + /// + /// Instance of OrgPermission to be compared + /// Boolean + public bool Equals(OrgPermission input) + { + if (input == null) + { + return false; + } + return + ( + this.UpdatedAt == input.UpdatedAt || + (this.UpdatedAt != null && + this.UpdatedAt.Equals(input.UpdatedAt)) + ) && + ( + this.CreatedAt == input.CreatedAt || + (this.CreatedAt != null && + this.CreatedAt.Equals(input.CreatedAt)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ) && + ( + this.UserEmail == input.UserEmail || + (this.UserEmail != null && + this.UserEmail.Equals(input.UserEmail)) + ) && + ( + this.InvitedBy == input.InvitedBy || + (this.InvitedBy != null && + this.InvitedBy.Equals(input.InvitedBy)) + ) && + ( + this.OrgId == input.OrgId || + (this.OrgId != null && + this.OrgId.Equals(input.OrgId)) + ) + && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.UpdatedAt != null) + { + hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.Status != null) + { + hashCode = (hashCode * 59) + this.Status.GetHashCode(); + } + if (this.UserEmail != null) + { + hashCode = (hashCode * 59) + this.UserEmail.GetHashCode(); + } + if (this.InvitedBy != null) + { + hashCode = (hashCode * 59) + this.InvitedBy.GetHashCode(); + } + if (this.OrgId != null) + { + hashCode = (hashCode * 59) + this.OrgId.GetHashCode(); + } + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/OrganizationInviteStatus.cs b/csharp/src/Hathora.Cloud.Sdk/Model/OrganizationInviteStatus.cs new file mode 100644 index 0000000..21e49e2 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk/Model/OrganizationInviteStatus.cs @@ -0,0 +1,332 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Hathora.Cloud.Sdk.Client.OpenAPIDateConverter; +using System.Reflection; + +namespace Hathora.Cloud.Sdk.Model +{ + /// + /// OrganizationInviteStatus + /// + [JsonConverter(typeof(OrganizationInviteStatusJsonConverter))] + [DataContract(Name = "OrganizationInviteStatus")] + public partial class OrganizationInviteStatus : AbstractOpenAPISchema, IEquatable + { + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of InviteStatusPending. + public OrganizationInviteStatus(InviteStatusPending actualInstance) + { + this.IsNullable = false; + this.SchemaType= "anyOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of InviteStatusAccepted. + public OrganizationInviteStatus(InviteStatusAccepted actualInstance) + { + this.IsNullable = false; + this.SchemaType= "anyOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of InviteStatusRejected. + public OrganizationInviteStatus(InviteStatusRejected actualInstance) + { + this.IsNullable = false; + this.SchemaType= "anyOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of InviteStatusRescinded. + public OrganizationInviteStatus(InviteStatusRescinded actualInstance) + { + this.IsNullable = false; + this.SchemaType= "anyOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + + private Object _actualInstance; + + /// + /// Gets or Sets ActualInstance + /// + public override Object ActualInstance + { + get + { + return _actualInstance; + } + set + { + if (value.GetType() == typeof(InviteStatusAccepted)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(InviteStatusPending)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(InviteStatusRejected)) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(InviteStatusRescinded)) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: InviteStatusAccepted, InviteStatusPending, InviteStatusRejected, InviteStatusRescinded"); + } + } + } + + /// + /// Get the actual instance of `InviteStatusPending`. If the actual instance is not `InviteStatusPending`, + /// the InvalidClassException will be thrown + /// + /// An instance of InviteStatusPending + public InviteStatusPending GetInviteStatusPending() + { + return (InviteStatusPending)this.ActualInstance; + } + + /// + /// Get the actual instance of `InviteStatusAccepted`. If the actual instance is not `InviteStatusAccepted`, + /// the InvalidClassException will be thrown + /// + /// An instance of InviteStatusAccepted + public InviteStatusAccepted GetInviteStatusAccepted() + { + return (InviteStatusAccepted)this.ActualInstance; + } + + /// + /// Get the actual instance of `InviteStatusRejected`. If the actual instance is not `InviteStatusRejected`, + /// the InvalidClassException will be thrown + /// + /// An instance of InviteStatusRejected + public InviteStatusRejected GetInviteStatusRejected() + { + return (InviteStatusRejected)this.ActualInstance; + } + + /// + /// Get the actual instance of `InviteStatusRescinded`. If the actual instance is not `InviteStatusRescinded`, + /// the InvalidClassException will be thrown + /// + /// An instance of InviteStatusRescinded + public InviteStatusRescinded GetInviteStatusRescinded() + { + return (InviteStatusRescinded)this.ActualInstance; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class OrganizationInviteStatus {\n"); + sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonConvert.SerializeObject(this.ActualInstance, OrganizationInviteStatus.SerializerSettings); + } + + /// + /// Converts the JSON string into an instance of OrganizationInviteStatus + /// + /// JSON string + /// An instance of OrganizationInviteStatus + public static OrganizationInviteStatus FromJson(string jsonString) + { + OrganizationInviteStatus newOrganizationInviteStatus = null; + + if (string.IsNullOrEmpty(jsonString)) + { + return newOrganizationInviteStatus; + } + + try + { + newOrganizationInviteStatus = new OrganizationInviteStatus(JsonConvert.DeserializeObject(jsonString, OrganizationInviteStatus.SerializerSettings)); + // deserialization is considered successful at this point if no exception has been thrown. + return newOrganizationInviteStatus; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into InviteStatusAccepted: {1}", jsonString, exception.ToString())); + } + + try + { + newOrganizationInviteStatus = new OrganizationInviteStatus(JsonConvert.DeserializeObject(jsonString, OrganizationInviteStatus.SerializerSettings)); + // deserialization is considered successful at this point if no exception has been thrown. + return newOrganizationInviteStatus; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into InviteStatusPending: {1}", jsonString, exception.ToString())); + } + + try + { + newOrganizationInviteStatus = new OrganizationInviteStatus(JsonConvert.DeserializeObject(jsonString, OrganizationInviteStatus.SerializerSettings)); + // deserialization is considered successful at this point if no exception has been thrown. + return newOrganizationInviteStatus; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into InviteStatusRejected: {1}", jsonString, exception.ToString())); + } + + try + { + newOrganizationInviteStatus = new OrganizationInviteStatus(JsonConvert.DeserializeObject(jsonString, OrganizationInviteStatus.SerializerSettings)); + // deserialization is considered successful at this point if no exception has been thrown. + return newOrganizationInviteStatus; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into InviteStatusRescinded: {1}", jsonString, exception.ToString())); + } + + // no match found, throw an exception + throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as OrganizationInviteStatus); + } + + /// + /// Returns true if OrganizationInviteStatus instances are equal + /// + /// Instance of OrganizationInviteStatus to be compared + /// Boolean + public bool Equals(OrganizationInviteStatus input) + { + if (input == null) + return false; + + return this.ActualInstance.Equals(input.ActualInstance); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ActualInstance != null) + hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); + return hashCode; + } + } + + } + + /// + /// Custom JSON converter for OrganizationInviteStatus + /// + public class OrganizationInviteStatusJsonConverter : JsonConverter + { + /// + /// To write the JSON string + /// + /// JSON writer + /// Object to be converted into a JSON string + /// JSON Serializer + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + writer.WriteRawValue((string)(typeof(OrganizationInviteStatus).GetMethod("ToJson").Invoke(value, null))); + } + + /// + /// To convert a JSON string into an object + /// + /// JSON reader + /// Object type + /// Existing value + /// JSON Serializer + /// The object converted from the JSON string + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + { + if(reader.TokenType != JsonToken.Null) + { + return OrganizationInviteStatus.FromJson(JObject.Load(reader).ToString(Formatting.None)); + } + return null; + } + + /// + /// Check if the object can be converted + /// + /// Object type + /// True if the object can be converted + public override bool CanConvert(Type objectType) + { + return false; + } + } + +} diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/PingEndpointsInner.cs b/csharp/src/Hathora.Cloud.Sdk/Model/PingEndpointsInner.cs new file mode 100644 index 0000000..23b6c63 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk/Model/PingEndpointsInner.cs @@ -0,0 +1,172 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Hathora.Cloud.Sdk.Client.OpenAPIDateConverter; + +namespace Hathora.Cloud.Sdk.Model +{ + /// + /// PingEndpointsInner + /// + [DataContract(Name = "PingEndpoints_inner")] + public partial class PingEndpointsInner : IEquatable + { + + /// + /// Gets or Sets Region + /// + [DataMember(Name = "region", IsRequired = true, EmitDefaultValue = true)] + public Region Region { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected PingEndpointsInner() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// port (required). + /// host (required). + /// region (required). + public PingEndpointsInner(double port = default(double), string host = default(string), Region region = default(Region)) + { + this.Port = port; + // to ensure "host" is required (not null) + if (host == null) + { + throw new ArgumentNullException("host is a required property for PingEndpointsInner and cannot be null"); + } + this.Host = host; + this.Region = region; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets Port + /// + [DataMember(Name = "port", IsRequired = true, EmitDefaultValue = true)] + public double Port { get; set; } + + /// + /// Gets or Sets Host + /// + [DataMember(Name = "host", IsRequired = true, EmitDefaultValue = true)] + public string Host { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PingEndpointsInner {\n"); + sb.Append(" Port: ").Append(Port).Append("\n"); + sb.Append(" Host: ").Append(Host).Append("\n"); + sb.Append(" Region: ").Append(Region).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PingEndpointsInner); + } + + /// + /// Returns true if PingEndpointsInner instances are equal + /// + /// Instance of PingEndpointsInner to be compared + /// Boolean + public bool Equals(PingEndpointsInner input) + { + if (input == null) + { + return false; + } + return + ( + this.Port == input.Port || + this.Port.Equals(input.Port) + ) && + ( + this.Host == input.Host || + (this.Host != null && + this.Host.Equals(input.Host)) + ) && + ( + this.Region == input.Region || + this.Region.Equals(input.Region) + ) + && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.Port.GetHashCode(); + if (this.Host != null) + { + hashCode = (hashCode * 59) + this.Host.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Region.GetHashCode(); + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/PlayerTokenObject.cs b/csharp/src/Hathora.Cloud.Sdk/Model/PlayerTokenObject.cs new file mode 100644 index 0000000..42385cc --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk/Model/PlayerTokenObject.cs @@ -0,0 +1,146 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Hathora.Cloud.Sdk.Client.OpenAPIDateConverter; + +namespace Hathora.Cloud.Sdk.Model +{ + /// + /// PlayerTokenObject + /// + [DataContract(Name = "PlayerTokenObject")] + public partial class PlayerTokenObject : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected PlayerTokenObject() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// A unique Hathora-signed JWT player token. (required). + public PlayerTokenObject(string token = default(string)) + { + // to ensure "token" is required (not null) + if (token == null) + { + throw new ArgumentNullException("token is a required property for PlayerTokenObject and cannot be null"); + } + this.Token = token; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// A unique Hathora-signed JWT player token. + /// + /// A unique Hathora-signed JWT player token. + /// "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0eXBlIjoiYW5vbnltb3VzIiwiaWQiOiJ3aDA4eWN3eTJwOSIsIm5hbWUiOiJqaXR0ZXJ5LXNhbG1vbi1ndWxsIiwiaWF0IjoxNjg5MzQ5MTk3fQ.-LzlPhZw2tw0ycZ229IRHwwmINGKWNPFMDrXOphLjEk" + [DataMember(Name = "token", IsRequired = true, EmitDefaultValue = true)] + public string Token { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PlayerTokenObject {\n"); + sb.Append(" Token: ").Append(Token).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PlayerTokenObject); + } + + /// + /// Returns true if PlayerTokenObject instances are equal + /// + /// Instance of PlayerTokenObject to be compared + /// Boolean + public bool Equals(PlayerTokenObject input) + { + if (input == null) + { + return false; + } + return + ( + this.Token == input.Token || + (this.Token != null && + this.Token.Equals(input.Token)) + ) + && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Token != null) + { + hashCode = (hashCode * 59) + this.Token.GetHashCode(); + } + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/Region.cs b/csharp/src/Hathora.Cloud.Sdk/Model/Region.cs index 905d79e..97467c9 100644 --- a/csharp/src/Hathora.Cloud.Sdk/Model/Region.cs +++ b/csharp/src/Hathora.Cloud.Sdk/Model/Region.cs @@ -94,7 +94,13 @@ public enum Region /// Enum SaoPaulo for value: Sao_Paulo /// [EnumMember(Value = "Sao_Paulo")] - SaoPaulo = 11 + SaoPaulo = 11, + + /// + /// Enum Dallas for value: Dallas + /// + [EnumMember(Value = "Dallas")] + Dallas = 12 } diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/RescindUserInvite.cs b/csharp/src/Hathora.Cloud.Sdk/Model/RescindUserInvite.cs new file mode 100644 index 0000000..973d4c4 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk/Model/RescindUserInvite.cs @@ -0,0 +1,144 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Hathora.Cloud.Sdk.Client.OpenAPIDateConverter; + +namespace Hathora.Cloud.Sdk.Model +{ + /// + /// RescindUserInvite + /// + [DataContract(Name = "RescindUserInvite")] + public partial class RescindUserInvite : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RescindUserInvite() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// userEmail (required). + public RescindUserInvite(string userEmail = default(string)) + { + // to ensure "userEmail" is required (not null) + if (userEmail == null) + { + throw new ArgumentNullException("userEmail is a required property for RescindUserInvite and cannot be null"); + } + this.UserEmail = userEmail; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets UserEmail + /// + [DataMember(Name = "userEmail", IsRequired = true, EmitDefaultValue = true)] + public string UserEmail { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RescindUserInvite {\n"); + sb.Append(" UserEmail: ").Append(UserEmail).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as RescindUserInvite); + } + + /// + /// Returns true if RescindUserInvite instances are equal + /// + /// Instance of RescindUserInvite to be compared + /// Boolean + public bool Equals(RescindUserInvite input) + { + if (input == null) + { + return false; + } + return + ( + this.UserEmail == input.UserEmail || + (this.UserEmail != null && + this.UserEmail.Equals(input.UserEmail)) + ) + && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.UserEmail != null) + { + hashCode = (hashCode * 59) + this.UserEmail.GetHashCode(); + } + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/RoomConnectionData.cs b/csharp/src/Hathora.Cloud.Sdk/Model/RoomConnectionData.cs new file mode 100644 index 0000000..77bea66 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk/Model/RoomConnectionData.cs @@ -0,0 +1,227 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Hathora.Cloud.Sdk.Client.OpenAPIDateConverter; + +namespace Hathora.Cloud.Sdk.Model +{ + /// + /// RoomConnectionData + /// + [DataContract(Name = "RoomConnectionData")] + public partial class RoomConnectionData : IEquatable + { + + /// + /// Gets or Sets Status + /// + [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = true)] + public RoomReadyStatus Status { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RoomConnectionData() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// additionalExposedPorts (required). + /// exposedPort. + /// status (required). + /// Unique identifier to a game session or match. Use the default system generated ID or overwrite it with your own. Note: error will be returned if `roomId` is not globally unique. (required). + /// System generated unique identifier to a runtime instance of your game server. (required). + public RoomConnectionData(List additionalExposedPorts = default(List), ExposedPort exposedPort = default(ExposedPort), RoomReadyStatus status = default(RoomReadyStatus), string roomId = default(string), string processId = default(string)) + { + // to ensure "additionalExposedPorts" is required (not null) + if (additionalExposedPorts == null) + { + throw new ArgumentNullException("additionalExposedPorts is a required property for RoomConnectionData and cannot be null"); + } + this.AdditionalExposedPorts = additionalExposedPorts; + this.Status = status; + // to ensure "roomId" is required (not null) + if (roomId == null) + { + throw new ArgumentNullException("roomId is a required property for RoomConnectionData and cannot be null"); + } + this.RoomId = roomId; + // to ensure "processId" is required (not null) + if (processId == null) + { + throw new ArgumentNullException("processId is a required property for RoomConnectionData and cannot be null"); + } + this.ProcessId = processId; + this.ExposedPort = exposedPort; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets AdditionalExposedPorts + /// + [DataMember(Name = "additionalExposedPorts", IsRequired = true, EmitDefaultValue = true)] + public List AdditionalExposedPorts { get; set; } + + /// + /// Gets or Sets ExposedPort + /// + [DataMember(Name = "exposedPort", EmitDefaultValue = false)] + public ExposedPort ExposedPort { get; set; } + + /// + /// Unique identifier to a game session or match. Use the default system generated ID or overwrite it with your own. Note: error will be returned if `roomId` is not globally unique. + /// + /// Unique identifier to a game session or match. Use the default system generated ID or overwrite it with your own. Note: error will be returned if `roomId` is not globally unique. + /// "2swovpy1fnunu" + [DataMember(Name = "roomId", IsRequired = true, EmitDefaultValue = true)] + public string RoomId { get; set; } + + /// + /// System generated unique identifier to a runtime instance of your game server. + /// + /// System generated unique identifier to a runtime instance of your game server. + /// "cbfcddd2-0006-43ae-996c-995fff7bed2e" + [DataMember(Name = "processId", IsRequired = true, EmitDefaultValue = true)] + public string ProcessId { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RoomConnectionData {\n"); + sb.Append(" AdditionalExposedPorts: ").Append(AdditionalExposedPorts).Append("\n"); + sb.Append(" ExposedPort: ").Append(ExposedPort).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" RoomId: ").Append(RoomId).Append("\n"); + sb.Append(" ProcessId: ").Append(ProcessId).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as RoomConnectionData); + } + + /// + /// Returns true if RoomConnectionData instances are equal + /// + /// Instance of RoomConnectionData to be compared + /// Boolean + public bool Equals(RoomConnectionData input) + { + if (input == null) + { + return false; + } + return + ( + this.AdditionalExposedPorts == input.AdditionalExposedPorts || + this.AdditionalExposedPorts != null && + input.AdditionalExposedPorts != null && + this.AdditionalExposedPorts.SequenceEqual(input.AdditionalExposedPorts) + ) && + ( + this.ExposedPort == input.ExposedPort || + (this.ExposedPort != null && + this.ExposedPort.Equals(input.ExposedPort)) + ) && + ( + this.Status == input.Status || + this.Status.Equals(input.Status) + ) && + ( + this.RoomId == input.RoomId || + (this.RoomId != null && + this.RoomId.Equals(input.RoomId)) + ) && + ( + this.ProcessId == input.ProcessId || + (this.ProcessId != null && + this.ProcessId.Equals(input.ProcessId)) + ) + && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.AdditionalExposedPorts != null) + { + hashCode = (hashCode * 59) + this.AdditionalExposedPorts.GetHashCode(); + } + if (this.ExposedPort != null) + { + hashCode = (hashCode * 59) + this.ExposedPort.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Status.GetHashCode(); + if (this.RoomId != null) + { + hashCode = (hashCode * 59) + this.RoomId.GetHashCode(); + } + if (this.ProcessId != null) + { + hashCode = (hashCode * 59) + this.ProcessId.GetHashCode(); + } + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/RoomConnectionDataAllOf.cs b/csharp/src/Hathora.Cloud.Sdk/Model/RoomConnectionDataAllOf.cs new file mode 100644 index 0000000..fa645d8 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk/Model/RoomConnectionDataAllOf.cs @@ -0,0 +1,146 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Hathora.Cloud.Sdk.Client.OpenAPIDateConverter; + +namespace Hathora.Cloud.Sdk.Model +{ + /// + /// RoomConnectionDataAllOf + /// + [DataContract(Name = "RoomConnectionData_allOf")] + public partial class RoomConnectionDataAllOf : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RoomConnectionDataAllOf() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// System generated unique identifier to a runtime instance of your game server. (required). + public RoomConnectionDataAllOf(string processId = default(string)) + { + // to ensure "processId" is required (not null) + if (processId == null) + { + throw new ArgumentNullException("processId is a required property for RoomConnectionDataAllOf and cannot be null"); + } + this.ProcessId = processId; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// System generated unique identifier to a runtime instance of your game server. + /// + /// System generated unique identifier to a runtime instance of your game server. + /// "cbfcddd2-0006-43ae-996c-995fff7bed2e" + [DataMember(Name = "processId", IsRequired = true, EmitDefaultValue = true)] + public string ProcessId { get; set; } + + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RoomConnectionDataAllOf {\n"); + sb.Append(" ProcessId: ").Append(ProcessId).Append("\n"); + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as RoomConnectionDataAllOf); + } + + /// + /// Returns true if RoomConnectionDataAllOf instances are equal + /// + /// Instance of RoomConnectionDataAllOf to be compared + /// Boolean + public bool Equals(RoomConnectionDataAllOf input) + { + if (input == null) + { + return false; + } + return + ( + this.ProcessId == input.ProcessId || + (this.ProcessId != null && + this.ProcessId.Equals(input.ProcessId)) + ) + && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ProcessId != null) + { + hashCode = (hashCode * 59) + this.ProcessId.GetHashCode(); + } + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/RoomReadyStatus.cs b/csharp/src/Hathora.Cloud.Sdk/Model/RoomReadyStatus.cs new file mode 100644 index 0000000..035e367 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk/Model/RoomReadyStatus.cs @@ -0,0 +1,47 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Hathora.Cloud.Sdk.Client.OpenAPIDateConverter; + +namespace Hathora.Cloud.Sdk.Model +{ + /// + /// Defines RoomReadyStatus + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum RoomReadyStatus + { + /// + /// Enum Active for value: active + /// + [EnumMember(Value = "active")] + Active = 1, + + /// + /// Enum Starting for value: starting + /// + [EnumMember(Value = "starting")] + Starting = 2 + + } + +} diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/VerificationEmailSuccess.cs b/csharp/src/Hathora.Cloud.Sdk/Model/VerificationEmailSuccess.cs new file mode 100644 index 0000000..c4eddfc --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk/Model/VerificationEmailSuccess.cs @@ -0,0 +1,41 @@ +/* + * Hathora Cloud API + * + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Hathora.Cloud.Sdk.Client.OpenAPIDateConverter; + +namespace Hathora.Cloud.Sdk.Model +{ + /// + /// Defines VerificationEmailSuccess + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum VerificationEmailSuccess + { + /// + /// Enum Success for value: success + /// + [EnumMember(Value = "success")] + Success = 1 + + } + +} diff --git a/java/.openapi-generator/FILES b/java/.openapi-generator/FILES index 38e97be..c62522c 100644 --- a/java/.openapi-generator/FILES +++ b/java/.openapi-generator/FILES @@ -18,6 +18,7 @@ docs/Build.md docs/BuildRegionalContainerTagsInner.md docs/BuildStatus.md docs/BuildV1Api.md +docs/BuildV2Api.md docs/CardBrand.md docs/CardPaymentMethod.md docs/ConnectionInfo.md @@ -29,17 +30,24 @@ docs/CreateLobbyV3Params.md docs/CreateOrgToken.md docs/CreatePrivateLobbyRequest.md docs/CreateRoomParams.md -docs/CreateRoomResponse.md -docs/CreateRoomResponseAllOf.md +docs/CreateUserInvite.md docs/CreatedOrgToken.md docs/CustomerPortalUrl.md docs/Deployment.md docs/DeploymentConfig.md -docs/DeploymentEnvInner.md +docs/DeploymentConfigV2.md docs/DeploymentV1Api.md -docs/DiscoveryResponseInner.md +docs/DeploymentV2.md +docs/DeploymentV2Api.md +docs/DeploymentV2EnvInner.md docs/DiscoveryV1Api.md +docs/DiscoveryV2Api.md docs/ExposedPort.md +docs/GoogleIdTokenObject.md +docs/InviteStatusAccepted.md +docs/InviteStatusPending.md +docs/InviteStatusRejected.md +docs/InviteStatusRescinded.md docs/Invoice.md docs/InvoiceStatus.md docs/LinkPaymentMethod.md @@ -51,19 +59,24 @@ docs/LobbyV3.md docs/LobbyV3Api.md docs/LobbyVisibility.md docs/LogV1Api.md -docs/LoginGoogleRequest.md -docs/LoginNicknameRequest.md -docs/LoginResponse.md docs/ManagementV1Api.md docs/MetricName.md docs/MetricValue.md docs/MetricsV1Api.md +docs/NewUserInfo.md +docs/NicknameObject.md +docs/OrgInvitesPage.md +docs/OrgPermission.md docs/OrgToken.md docs/OrgTokenStatus.md docs/OrgTokensV1Api.md +docs/OrganizationInviteStatus.md +docs/OrganizationsV1Api.md docs/PartialCardCardPaymentMethodAchAchPaymentMethodLinkLinkPaymentMethod.md docs/PickRoomExcludeKeyofRoomAllocations.md +docs/PingEndpointsInner.md docs/PlanName.md +docs/PlayerTokenObject.md docs/Process.md docs/ProcessStatus.md docs/ProcessV2.md @@ -73,8 +86,12 @@ docs/ProcessesV1Api.md docs/ProcessesV2Api.md docs/RecordPartialMetricNameMetricValueArray.md docs/Region.md +docs/RescindUserInvite.md docs/Room.md docs/RoomAllocation.md +docs/RoomConnectionData.md +docs/RoomConnectionDataAllOf.md +docs/RoomReadyStatus.md docs/RoomStatus.md docs/RoomV1Api.md docs/RoomV2Api.md @@ -83,7 +100,7 @@ docs/StartingConnectionInfo.md docs/TransportType.md docs/UpdateRoomConfigParams.md docs/VerificationEmailRequest.md -docs/VerificationEmailResponse.md +docs/VerificationEmailSuccess.md src/main/java/com/hathora/client/ApiCallback.java src/main/java/com/hathora/client/ApiClient.java src/main/java/com/hathora/client/ApiException.java @@ -101,8 +118,11 @@ src/main/java/com/hathora/client/api/AppV1Api.java src/main/java/com/hathora/client/api/AuthV1Api.java src/main/java/com/hathora/client/api/BillingV1Api.java src/main/java/com/hathora/client/api/BuildV1Api.java +src/main/java/com/hathora/client/api/BuildV2Api.java src/main/java/com/hathora/client/api/DeploymentV1Api.java +src/main/java/com/hathora/client/api/DeploymentV2Api.java src/main/java/com/hathora/client/api/DiscoveryV1Api.java +src/main/java/com/hathora/client/api/DiscoveryV2Api.java src/main/java/com/hathora/client/api/LobbyV1Api.java src/main/java/com/hathora/client/api/LobbyV2Api.java src/main/java/com/hathora/client/api/LobbyV3Api.java @@ -110,6 +130,7 @@ src/main/java/com/hathora/client/api/LogV1Api.java src/main/java/com/hathora/client/api/ManagementV1Api.java src/main/java/com/hathora/client/api/MetricsV1Api.java src/main/java/com/hathora/client/api/OrgTokensV1Api.java +src/main/java/com/hathora/client/api/OrganizationsV1Api.java src/main/java/com/hathora/client/api/ProcessesV1Api.java src/main/java/com/hathora/client/api/ProcessesV2Api.java src/main/java/com/hathora/client/api/RoomV1Api.java @@ -144,15 +165,20 @@ src/main/java/com/hathora/client/model/CreateLobbyV3Params.java src/main/java/com/hathora/client/model/CreateOrgToken.java src/main/java/com/hathora/client/model/CreatePrivateLobbyRequest.java src/main/java/com/hathora/client/model/CreateRoomParams.java -src/main/java/com/hathora/client/model/CreateRoomResponse.java -src/main/java/com/hathora/client/model/CreateRoomResponseAllOf.java +src/main/java/com/hathora/client/model/CreateUserInvite.java src/main/java/com/hathora/client/model/CreatedOrgToken.java src/main/java/com/hathora/client/model/CustomerPortalUrl.java src/main/java/com/hathora/client/model/Deployment.java src/main/java/com/hathora/client/model/DeploymentConfig.java -src/main/java/com/hathora/client/model/DeploymentEnvInner.java -src/main/java/com/hathora/client/model/DiscoveryResponseInner.java +src/main/java/com/hathora/client/model/DeploymentConfigV2.java +src/main/java/com/hathora/client/model/DeploymentV2.java +src/main/java/com/hathora/client/model/DeploymentV2EnvInner.java src/main/java/com/hathora/client/model/ExposedPort.java +src/main/java/com/hathora/client/model/GoogleIdTokenObject.java +src/main/java/com/hathora/client/model/InviteStatusAccepted.java +src/main/java/com/hathora/client/model/InviteStatusPending.java +src/main/java/com/hathora/client/model/InviteStatusRejected.java +src/main/java/com/hathora/client/model/InviteStatusRescinded.java src/main/java/com/hathora/client/model/Invoice.java src/main/java/com/hathora/client/model/InvoiceStatus.java src/main/java/com/hathora/client/model/LinkPaymentMethod.java @@ -160,16 +186,20 @@ src/main/java/com/hathora/client/model/ListOrgTokens.java src/main/java/com/hathora/client/model/Lobby.java src/main/java/com/hathora/client/model/LobbyV3.java src/main/java/com/hathora/client/model/LobbyVisibility.java -src/main/java/com/hathora/client/model/LoginGoogleRequest.java -src/main/java/com/hathora/client/model/LoginNicknameRequest.java -src/main/java/com/hathora/client/model/LoginResponse.java src/main/java/com/hathora/client/model/MetricName.java src/main/java/com/hathora/client/model/MetricValue.java +src/main/java/com/hathora/client/model/NewUserInfo.java +src/main/java/com/hathora/client/model/NicknameObject.java +src/main/java/com/hathora/client/model/OrgInvitesPage.java +src/main/java/com/hathora/client/model/OrgPermission.java src/main/java/com/hathora/client/model/OrgToken.java src/main/java/com/hathora/client/model/OrgTokenStatus.java +src/main/java/com/hathora/client/model/OrganizationInviteStatus.java src/main/java/com/hathora/client/model/PartialCardCardPaymentMethodAchAchPaymentMethodLinkLinkPaymentMethod.java src/main/java/com/hathora/client/model/PickRoomExcludeKeyofRoomAllocations.java +src/main/java/com/hathora/client/model/PingEndpointsInner.java src/main/java/com/hathora/client/model/PlanName.java +src/main/java/com/hathora/client/model/PlayerTokenObject.java src/main/java/com/hathora/client/model/Process.java src/main/java/com/hathora/client/model/ProcessStatus.java src/main/java/com/hathora/client/model/ProcessV2.java @@ -177,12 +207,16 @@ src/main/java/com/hathora/client/model/ProcessWithRooms.java src/main/java/com/hathora/client/model/ProcessWithRoomsAllOf.java src/main/java/com/hathora/client/model/RecordPartialMetricNameMetricValueArray.java src/main/java/com/hathora/client/model/Region.java +src/main/java/com/hathora/client/model/RescindUserInvite.java src/main/java/com/hathora/client/model/Room.java src/main/java/com/hathora/client/model/RoomAllocation.java +src/main/java/com/hathora/client/model/RoomConnectionData.java +src/main/java/com/hathora/client/model/RoomConnectionDataAllOf.java +src/main/java/com/hathora/client/model/RoomReadyStatus.java src/main/java/com/hathora/client/model/RoomStatus.java src/main/java/com/hathora/client/model/SetLobbyStateParams.java src/main/java/com/hathora/client/model/StartingConnectionInfo.java src/main/java/com/hathora/client/model/TransportType.java src/main/java/com/hathora/client/model/UpdateRoomConfigParams.java src/main/java/com/hathora/client/model/VerificationEmailRequest.java -src/main/java/com/hathora/client/model/VerificationEmailResponse.java +src/main/java/com/hathora/client/model/VerificationEmailSuccess.java diff --git a/java/README.md b/java/README.md index 24f3016..a52bbfe 100644 --- a/java/README.md +++ b/java/README.md @@ -130,16 +130,26 @@ Class | Method | HTTP request | Description *BillingV1Api* | [**getInvoices**](docs/BillingV1Api.md#getInvoices) | **GET** /billing/v1/invoices | *BillingV1Api* | [**getPaymentMethod**](docs/BillingV1Api.md#getPaymentMethod) | **GET** /billing/v1/paymentmethod | *BillingV1Api* | [**initStripeCustomerPortalUrl**](docs/BillingV1Api.md#initStripeCustomerPortalUrl) | **POST** /billing/v1/customerportalurl | -*BuildV1Api* | [**createBuild**](docs/BuildV1Api.md#createBuild) | **POST** /builds/v1/{appId}/create | -*BuildV1Api* | [**deleteBuild**](docs/BuildV1Api.md#deleteBuild) | **DELETE** /builds/v1/{appId}/delete/{buildId} | -*BuildV1Api* | [**getBuildInfo**](docs/BuildV1Api.md#getBuildInfo) | **GET** /builds/v1/{appId}/info/{buildId} | -*BuildV1Api* | [**getBuilds**](docs/BuildV1Api.md#getBuilds) | **GET** /builds/v1/{appId}/list | -*BuildV1Api* | [**runBuild**](docs/BuildV1Api.md#runBuild) | **POST** /builds/v1/{appId}/run/{buildId} | -*DeploymentV1Api* | [**createDeployment**](docs/DeploymentV1Api.md#createDeployment) | **POST** /deployments/v1/{appId}/create/{buildId} | -*DeploymentV1Api* | [**getDeploymentInfo**](docs/DeploymentV1Api.md#getDeploymentInfo) | **GET** /deployments/v1/{appId}/info/{deploymentId} | -*DeploymentV1Api* | [**getDeployments**](docs/DeploymentV1Api.md#getDeployments) | **GET** /deployments/v1/{appId}/list | -*DeploymentV1Api* | [**getLatestDeployment**](docs/DeploymentV1Api.md#getLatestDeployment) | **GET** /deployments/v1/{appId}/latest | -*DiscoveryV1Api* | [**getPingServiceEndpoints**](docs/DiscoveryV1Api.md#getPingServiceEndpoints) | **GET** /discovery/v1/ping | +*BuildV1Api* | [**createBuildDeprecated**](docs/BuildV1Api.md#createBuildDeprecated) | **POST** /builds/v1/{appId}/create | +*BuildV1Api* | [**deleteBuildDeprecated**](docs/BuildV1Api.md#deleteBuildDeprecated) | **DELETE** /builds/v1/{appId}/delete/{buildId} | +*BuildV1Api* | [**getBuildInfoDeprecated**](docs/BuildV1Api.md#getBuildInfoDeprecated) | **GET** /builds/v1/{appId}/info/{buildId} | +*BuildV1Api* | [**getBuildsDeprecated**](docs/BuildV1Api.md#getBuildsDeprecated) | **GET** /builds/v1/{appId}/list | +*BuildV1Api* | [**runBuildDeprecated**](docs/BuildV1Api.md#runBuildDeprecated) | **POST** /builds/v1/{appId}/run/{buildId} | +*BuildV2Api* | [**createBuild**](docs/BuildV2Api.md#createBuild) | **POST** /builds/v2/{appId}/create | +*BuildV2Api* | [**deleteBuild**](docs/BuildV2Api.md#deleteBuild) | **DELETE** /builds/v2/{appId}/delete/{buildId} | +*BuildV2Api* | [**getBuildInfo**](docs/BuildV2Api.md#getBuildInfo) | **GET** /builds/v2/{appId}/info/{buildId} | +*BuildV2Api* | [**getBuilds**](docs/BuildV2Api.md#getBuilds) | **GET** /builds/v2/{appId}/list | +*BuildV2Api* | [**runBuild**](docs/BuildV2Api.md#runBuild) | **POST** /builds/v2/{appId}/run/{buildId} | +*DeploymentV1Api* | [**createDeploymentDeprecated**](docs/DeploymentV1Api.md#createDeploymentDeprecated) | **POST** /deployments/v1/{appId}/create/{buildId} | +*DeploymentV1Api* | [**getDeploymentInfoDeprecated**](docs/DeploymentV1Api.md#getDeploymentInfoDeprecated) | **GET** /deployments/v1/{appId}/info/{deploymentId} | +*DeploymentV1Api* | [**getDeploymentsDeprecated**](docs/DeploymentV1Api.md#getDeploymentsDeprecated) | **GET** /deployments/v1/{appId}/list | +*DeploymentV1Api* | [**getLatestDeploymentDeprecated**](docs/DeploymentV1Api.md#getLatestDeploymentDeprecated) | **GET** /deployments/v1/{appId}/latest | +*DeploymentV2Api* | [**createDeployment**](docs/DeploymentV2Api.md#createDeployment) | **POST** /deployments/v2/{appId}/create/{buildId} | +*DeploymentV2Api* | [**getDeploymentInfo**](docs/DeploymentV2Api.md#getDeploymentInfo) | **GET** /deployments/v2/{appId}/info/{deploymentId} | +*DeploymentV2Api* | [**getDeployments**](docs/DeploymentV2Api.md#getDeployments) | **GET** /deployments/v2/{appId}/list | +*DeploymentV2Api* | [**getLatestDeployment**](docs/DeploymentV2Api.md#getLatestDeployment) | **GET** /deployments/v2/{appId}/latest | +*DiscoveryV1Api* | [**getPingServiceEndpointsDeprecated**](docs/DiscoveryV1Api.md#getPingServiceEndpointsDeprecated) | **GET** /discovery/v1/ping | +*DiscoveryV2Api* | [**getPingServiceEndpoints**](docs/DiscoveryV2Api.md#getPingServiceEndpoints) | **GET** /discovery/v2/ping | *LobbyV1Api* | [**createPrivateLobbyDeprecated**](docs/LobbyV1Api.md#createPrivateLobbyDeprecated) | **POST** /lobby/v1/{appId}/create/private | *LobbyV1Api* | [**createPublicLobbyDeprecated**](docs/LobbyV1Api.md#createPublicLobbyDeprecated) | **POST** /lobby/v1/{appId}/create/public | *LobbyV1Api* | [**listActivePublicLobbiesDeprecatedV1**](docs/LobbyV1Api.md#listActivePublicLobbiesDeprecatedV1) | **GET** /lobby/v1/{appId}/list | @@ -163,9 +173,16 @@ Class | Method | HTTP request | Description *OrgTokensV1Api* | [**createOrgToken**](docs/OrgTokensV1Api.md#createOrgToken) | **POST** /tokens/v1/orgs/{orgId}/create | *OrgTokensV1Api* | [**getOrgTokens**](docs/OrgTokensV1Api.md#getOrgTokens) | **GET** /tokens/v1/orgs/{orgId} | *OrgTokensV1Api* | [**revokeOrgToken**](docs/OrgTokensV1Api.md#revokeOrgToken) | **POST** /tokens/v1/orgs/{orgId}/tokens/{orgTokenId}/revoke | +*OrganizationsV1Api* | [**acceptInvite**](docs/OrganizationsV1Api.md#acceptInvite) | **POST** /orgs/v1/{orgId}/invites/accept | +*OrganizationsV1Api* | [**getOrgPendingInvites**](docs/OrganizationsV1Api.md#getOrgPendingInvites) | **GET** /orgs/v1/{orgId}/invites/pending | +*OrganizationsV1Api* | [**getUserPendingInvites**](docs/OrganizationsV1Api.md#getUserPendingInvites) | **GET** /orgs/v1/user/invites/pending | +*OrganizationsV1Api* | [**inviteUser**](docs/OrganizationsV1Api.md#inviteUser) | **PUT** /orgs/v1/{orgId}/invites | +*OrganizationsV1Api* | [**rejectInvite**](docs/OrganizationsV1Api.md#rejectInvite) | **POST** /orgs/v1/{orgId}/invites/reject | +*OrganizationsV1Api* | [**rescindInvite**](docs/OrganizationsV1Api.md#rescindInvite) | **POST** /orgs/v1/{orgId}/invites/rescind | *ProcessesV1Api* | [**getProcessInfoDeprecated**](docs/ProcessesV1Api.md#getProcessInfoDeprecated) | **GET** /processes/v1/{appId}/info/{processId} | *ProcessesV1Api* | [**getRunningProcesses**](docs/ProcessesV1Api.md#getRunningProcesses) | **GET** /processes/v1/{appId}/list/running | *ProcessesV1Api* | [**getStoppedProcesses**](docs/ProcessesV1Api.md#getStoppedProcesses) | **GET** /processes/v1/{appId}/list/stopped | +*ProcessesV2Api* | [**createProcess**](docs/ProcessesV2Api.md#createProcess) | **POST** /processes/v2/{appId}/create/{region} | *ProcessesV2Api* | [**getLatestProcesses**](docs/ProcessesV2Api.md#getLatestProcesses) | **GET** /processes/v2/{appId}/list/latest | *ProcessesV2Api* | [**getProcessInfo**](docs/ProcessesV2Api.md#getProcessInfo) | **GET** /processes/v2/{appId}/info/{processId} | *ProcessesV2Api* | [**stopProcess**](docs/ProcessesV2Api.md#stopProcess) | **POST** /processes/v2/{appId}/stop/{processId} | @@ -182,7 +199,7 @@ Class | Method | HTTP request | Description *RoomV2Api* | [**getConnectionInfo**](docs/RoomV2Api.md#getConnectionInfo) | **GET** /rooms/v2/{appId}/connectioninfo/{roomId} | *RoomV2Api* | [**getInactiveRoomsForProcess**](docs/RoomV2Api.md#getInactiveRoomsForProcess) | **GET** /rooms/v2/{appId}/list/{processId}/inactive | *RoomV2Api* | [**getRoomInfo**](docs/RoomV2Api.md#getRoomInfo) | **GET** /rooms/v2/{appId}/info/{roomId} | -*RoomV2Api* | [**suspendRoom**](docs/RoomV2Api.md#suspendRoom) | **POST** /rooms/v2/{appId}/suspend/{roomId} | +*RoomV2Api* | [**suspendRoomV2Deprecated**](docs/RoomV2Api.md#suspendRoomV2Deprecated) | **POST** /rooms/v2/{appId}/suspend/{roomId} | *RoomV2Api* | [**updateRoomConfig**](docs/RoomV2Api.md#updateRoomConfig) | **POST** /rooms/v2/{appId}/update/{roomId} | @@ -213,15 +230,20 @@ Class | Method | HTTP request | Description - [CreateOrgToken](docs/CreateOrgToken.md) - [CreatePrivateLobbyRequest](docs/CreatePrivateLobbyRequest.md) - [CreateRoomParams](docs/CreateRoomParams.md) - - [CreateRoomResponse](docs/CreateRoomResponse.md) - - [CreateRoomResponseAllOf](docs/CreateRoomResponseAllOf.md) + - [CreateUserInvite](docs/CreateUserInvite.md) - [CreatedOrgToken](docs/CreatedOrgToken.md) - [CustomerPortalUrl](docs/CustomerPortalUrl.md) - [Deployment](docs/Deployment.md) - [DeploymentConfig](docs/DeploymentConfig.md) - - [DeploymentEnvInner](docs/DeploymentEnvInner.md) - - [DiscoveryResponseInner](docs/DiscoveryResponseInner.md) + - [DeploymentConfigV2](docs/DeploymentConfigV2.md) + - [DeploymentV2](docs/DeploymentV2.md) + - [DeploymentV2EnvInner](docs/DeploymentV2EnvInner.md) - [ExposedPort](docs/ExposedPort.md) + - [GoogleIdTokenObject](docs/GoogleIdTokenObject.md) + - [InviteStatusAccepted](docs/InviteStatusAccepted.md) + - [InviteStatusPending](docs/InviteStatusPending.md) + - [InviteStatusRejected](docs/InviteStatusRejected.md) + - [InviteStatusRescinded](docs/InviteStatusRescinded.md) - [Invoice](docs/Invoice.md) - [InvoiceStatus](docs/InvoiceStatus.md) - [LinkPaymentMethod](docs/LinkPaymentMethod.md) @@ -229,16 +251,20 @@ Class | Method | HTTP request | Description - [Lobby](docs/Lobby.md) - [LobbyV3](docs/LobbyV3.md) - [LobbyVisibility](docs/LobbyVisibility.md) - - [LoginGoogleRequest](docs/LoginGoogleRequest.md) - - [LoginNicknameRequest](docs/LoginNicknameRequest.md) - - [LoginResponse](docs/LoginResponse.md) - [MetricName](docs/MetricName.md) - [MetricValue](docs/MetricValue.md) + - [NewUserInfo](docs/NewUserInfo.md) + - [NicknameObject](docs/NicknameObject.md) + - [OrgInvitesPage](docs/OrgInvitesPage.md) + - [OrgPermission](docs/OrgPermission.md) - [OrgToken](docs/OrgToken.md) - [OrgTokenStatus](docs/OrgTokenStatus.md) + - [OrganizationInviteStatus](docs/OrganizationInviteStatus.md) - [PartialCardCardPaymentMethodAchAchPaymentMethodLinkLinkPaymentMethod](docs/PartialCardCardPaymentMethodAchAchPaymentMethodLinkLinkPaymentMethod.md) - [PickRoomExcludeKeyofRoomAllocations](docs/PickRoomExcludeKeyofRoomAllocations.md) + - [PingEndpointsInner](docs/PingEndpointsInner.md) - [PlanName](docs/PlanName.md) + - [PlayerTokenObject](docs/PlayerTokenObject.md) - [Process](docs/Process.md) - [ProcessStatus](docs/ProcessStatus.md) - [ProcessV2](docs/ProcessV2.md) @@ -246,15 +272,19 @@ Class | Method | HTTP request | Description - [ProcessWithRoomsAllOf](docs/ProcessWithRoomsAllOf.md) - [RecordPartialMetricNameMetricValueArray](docs/RecordPartialMetricNameMetricValueArray.md) - [Region](docs/Region.md) + - [RescindUserInvite](docs/RescindUserInvite.md) - [Room](docs/Room.md) - [RoomAllocation](docs/RoomAllocation.md) + - [RoomConnectionData](docs/RoomConnectionData.md) + - [RoomConnectionDataAllOf](docs/RoomConnectionDataAllOf.md) + - [RoomReadyStatus](docs/RoomReadyStatus.md) - [RoomStatus](docs/RoomStatus.md) - [SetLobbyStateParams](docs/SetLobbyStateParams.md) - [StartingConnectionInfo](docs/StartingConnectionInfo.md) - [TransportType](docs/TransportType.md) - [UpdateRoomConfigParams](docs/UpdateRoomConfigParams.md) - [VerificationEmailRequest](docs/VerificationEmailRequest.md) - - [VerificationEmailResponse](docs/VerificationEmailResponse.md) + - [VerificationEmailSuccess](docs/VerificationEmailSuccess.md) ## Documentation for Authorization diff --git a/java/api/openapi.yaml b/java/api/openapi.yaml index 4137708..bd0eb02 100644 --- a/java/api/openapi.yaml +++ b/java/api/openapi.yaml @@ -14,36 +14,46 @@ tags: - description: "Operations that allow you to generate a Hathora-signed [JSON web token\ \ (JWT)](https://jwt.io/) for [player authentication](https://hathora.dev/docs/lobbies-and-matchmaking/auth-service)." name: AuthV1 +- description: ' ' + name: BillingV1 - description: "Operations that allow you create and manage your [builds](https://hathora.dev/docs/concepts/hathora-entities#build)." + name: BuildV2 +- description: "Deprecated. Use [BuildV2](https://hathora.dev/api#tag/BuildV2)." name: BuildV1 - description: "Operations that allow you configure and manage an application's [build](https://hathora.dev/docs/concepts/hathora-entities#build)\ \ at runtime." + name: DeploymentV2 +- description: "Deprecated. Use [DeploymentV2](https://hathora.dev/api#tag/DeploymentV2)." name: DeploymentV1 - description: Service that allows clients to directly ping all Hathora regions to get latency information name: DiscoveryV1 - description: "Operations to create and manage lobbies using our [Lobby Service](https://hathora.dev/docs/lobbies-and-matchmaking/lobby-service)." name: LobbyV3 +- description: "Deprecated. Use [LobbyV3](https://hathora.dev/api#tag/LobbyV3)." + name: LobbyV2 +- description: "Deprecated. Use [LobbyV3](https://hathora.dev/api#tag/LobbyV3)." + name: LobbyV1 - description: "Operations to get logs by [applications](https://hathora.dev/docs/concepts/hathora-entities#application),\ \ [processes](https://hathora.dev/docs/concepts/hathora-entities#process), and\ \ [deployments](https://hathora.dev/docs/concepts/hathora-entities#deployment).\ \ We store 20GB of logs data." name: LogV1 +- description: ' ' + name: ManagementV1 - description: "Operations to get metrics by [process](https://hathora.dev/docs/concepts/hathora-entities#process).\ \ We store 72 hours of metrics data." name: MetricsV1 - description: "Operations to get data on active and stopped [processes](https://hathora.dev/docs/concepts/hathora-entities#process)." name: ProcessesV2 -- description: "Operations to create, manage, and connect to [rooms](https://hathora.dev/docs/concepts/hathora-entities#room)." - name: RoomV2 -- description: "Deprecated. Use [LobbyV3](https://hathora.dev/api#tag/LobbyV3)." - name: LobbyV1 -- description: "Deprecated. Use [LobbyV3](https://hathora.dev/api#tag/LobbyV3)." - name: LobbyV2 - description: "Deprecated. Use [ProcessesV2](https://hathora.dev/api#tag/ProcessesV2)." name: ProcessesV1 +- description: "Operations to create, manage, and connect to [rooms](https://hathora.dev/docs/concepts/hathora-entities#room)." + name: RoomV2 - description: "Deprecated. Use [RoomV2](https://hathora.dev/api#tag/RoomV2)." name: RoomV1 +- description: ' ' + name: OrgTokensV1 paths: /apps/v1/list: get: @@ -95,6 +105,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "500": content: application/json: @@ -151,6 +167,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "500": content: application/json: @@ -228,6 +250,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "500": content: application/json: @@ -256,7 +284,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/LoginResponse' + $ref: '#/components/schemas/PlayerTokenObject' description: Ok "404": content: @@ -284,14 +312,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/LoginNicknameRequest' + $ref: '#/components/schemas/NicknameObject' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/LoginResponse' + $ref: '#/components/schemas/PlayerTokenObject' description: Ok "404": content: @@ -320,14 +348,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/LoginGoogleRequest' + $ref: '#/components/schemas/GoogleIdTokenObject' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/LoginResponse' + $ref: '#/components/schemas/PlayerTokenObject' description: Ok "401": content: @@ -438,6 +466,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" security: - hathoraDevToken: [] tags: @@ -476,9 +510,10 @@ paths: x-accepts: application/json /builds/v1/{appId}/list: get: + deprecated: true description: "Returns an array of [builds](https://hathora.dev/docs/concepts/hathora-entities#build)\ \ for an [application](https://hathora.dev/docs/concepts/hathora-entities#application)." - operationId: GetBuilds + operationId: GetBuildsDeprecated parameters: - explode: false in: path @@ -515,8 +550,9 @@ paths: x-accepts: application/json /builds/v1/{appId}/info/{buildId}: get: + deprecated: true description: "Get details for a [build](https://hathora.dev/docs/concepts/hathora-entities#build)." - operationId: GetBuildInfo + operationId: GetBuildInfoDeprecated parameters: - explode: false in: path @@ -558,11 +594,12 @@ paths: x-accepts: application/json /builds/v1/{appId}/create: post: + deprecated: true description: "Creates a new [build](https://hathora.dev/docs/concepts/hathora-entities#build).\ \ Responds with a `buildId` that you must pass to [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild)\ \ to build the game server artifact. You can optionally pass in a `buildTag`\ \ to associate an external version with a build." - operationId: CreateBuild + operationId: CreateBuildDeprecated parameters: - explode: false in: path @@ -596,6 +633,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "500": content: application/json: @@ -610,9 +653,10 @@ paths: x-accepts: application/json /builds/v1/{appId}/run/{buildId}: post: + deprecated: true description: "Builds a game server artifact from a tarball you provide. Pass\ \ in the `buildId` generated from [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild)." - operationId: RunBuild + operationId: RunBuildDeprecated parameters: - explode: false in: path @@ -632,7 +676,7 @@ paths: content: multipart/form-data: schema: - $ref: '#/components/schemas/RunBuild_request' + $ref: '#/components/schemas/RunBuildDeprecated_request' required: true responses: "200": @@ -654,6 +698,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "500": content: application/json: @@ -668,9 +718,10 @@ paths: x-accepts: application/json /builds/v1/{appId}/delete/{buildId}: delete: + deprecated: true description: "Delete a [build](https://hathora.dev/docs/concepts/hathora-entities#build).\ \ All associated metadata is deleted." - operationId: DeleteBuild + operationId: DeleteBuildDeprecated parameters: - explode: false in: path @@ -718,11 +769,11 @@ paths: tags: - BuildV1 x-accepts: application/json - /deployments/v1/{appId}/list: + /builds/v2/{appId}/list: get: - description: "Returns an array of [deployments](https://hathora.dev/docs/concepts/hathora-entities#deployment)\ + description: "Returns an array of [builds](https://hathora.dev/docs/concepts/hathora-entities#build)\ \ for an [application](https://hathora.dev/docs/concepts/hathora-entities#application)." - operationId: GetDeployments + operationId: GetBuilds parameters: - explode: false in: path @@ -737,7 +788,7 @@ paths: application/json: schema: items: - $ref: '#/components/schemas/Deployment' + $ref: '#/components/schemas/Build' type: array description: Ok "401": @@ -755,13 +806,12 @@ paths: security: - hathoraDevToken: [] tags: - - DeploymentV1 + - BuildV2 x-accepts: application/json - /deployments/v1/{appId}/latest: + /builds/v2/{appId}/info/{buildId}: get: - description: "Get the latest [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment)\ - \ for an [application](https://hathora.dev/docs/concepts/hathora-entities#application)." - operationId: GetLatestDeployment + description: "Get details for a [build](https://hathora.dev/docs/concepts/hathora-entities#build)." + operationId: GetBuildInfo parameters: - explode: false in: path @@ -770,12 +820,19 @@ paths: schema: $ref: '#/components/schemas/AppId' style: simple + - explode: false + in: path + name: buildId + required: true + schema: + $ref: '#/components/schemas/BuildId' + style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Deployment' + $ref: '#/components/schemas/Build' description: Ok "401": content: @@ -792,12 +849,15 @@ paths: security: - hathoraDevToken: [] tags: - - DeploymentV1 + - BuildV2 x-accepts: application/json - /deployments/v1/{appId}/info/{deploymentId}: - get: - description: "Get details for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment)." - operationId: GetDeploymentInfo + /builds/v2/{appId}/create: + post: + description: "Creates a new [build](https://hathora.dev/docs/concepts/hathora-entities#build).\ + \ Responds with a `buildId` that you must pass to [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild)\ + \ to build the game server artifact. You can optionally pass in a `buildTag`\ + \ to associate an external version with a build." + operationId: CreateBuild parameters: - explode: false in: path @@ -806,20 +866,19 @@ paths: schema: $ref: '#/components/schemas/AppId' style: simple - - explode: false - in: path - name: deploymentId + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateBuildParams' required: true - schema: - $ref: '#/components/schemas/DeploymentId' - style: simple responses: - "200": + "201": content: application/json: schema: - $ref: '#/components/schemas/Deployment' - description: Ok + $ref: '#/components/schemas/Build' + description: "" "401": content: application/json: @@ -832,17 +891,29 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" security: - hathoraDevToken: [] tags: - - DeploymentV1 + - BuildV2 + x-content-type: application/json x-accepts: application/json - /deployments/v1/{appId}/create/{buildId}: + /builds/v2/{appId}/run/{buildId}: post: - description: "Create a new [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment).\ - \ Creating a new deployment means all new rooms created will use the latest\ - \ deployment configuration, but existing games in progress will not be affected." - operationId: CreateDeployment + description: "Builds a game server artifact from a tarball you provide. Pass\ + \ in the `buildId` generated from [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild)." + operationId: RunBuild parameters: - explode: false in: path @@ -860,23 +931,18 @@ paths: style: simple requestBody: content: - application/json: + multipart/form-data: schema: - $ref: '#/components/schemas/DeploymentConfig' + $ref: '#/components/schemas/RunBuildDeprecated_request' required: true responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/Deployment' - description: "" - "400": + "200": content: - application/json: + application/octet-stream: schema: - $ref: '#/components/schemas/ApiError' - description: "" + format: binary + type: string + description: Ok "401": content: application/json: @@ -889,7 +955,7 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" - "422": + "429": content: application/json: schema: @@ -904,32 +970,14 @@ paths: security: - hathoraDevToken: [] tags: - - DeploymentV1 - x-content-type: application/json - x-accepts: application/json - /discovery/v1/ping: - get: - description: "Returns an array of all regions with a host and port that a client\ - \ can directly ping. Open a websocket connection to `wss://:/ws`\ - \ and send a packet. To calculate ping, measure the time it takes to get an\ - \ echo packet back." - operationId: GetPingServiceEndpoints - parameters: [] - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/DiscoveryResponse' - description: Ok - security: [] - tags: - - DiscoveryV1 + - BuildV2 + x-content-type: multipart/form-data x-accepts: application/json - /lobby/v1/{appId}/create/private: - post: - deprecated: true - operationId: CreatePrivateLobbyDeprecated + /builds/v2/{appId}/delete/{buildId}: + delete: + description: "Delete a [build](https://hathora.dev/docs/concepts/hathora-entities#build).\ + \ All associated metadata is deleted." + operationId: DeleteBuild parameters: - explode: false in: path @@ -938,46 +986,22 @@ paths: schema: $ref: '#/components/schemas/AppId' style: simple - - explode: true - in: query - name: region - required: false - schema: - $ref: '#/components/schemas/Region' - style: form - - explode: true - in: query - name: local - required: false + - explode: false + in: path + name: buildId + required: true schema: - default: false - type: boolean - style: form + $ref: '#/components/schemas/BuildId' + style: simple responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/RoomId' - description: Ok - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ApiError' - description: "" + "204": + description: No content "401": content: application/json: schema: $ref: '#/components/schemas/ApiError' description: "" - "402": - content: - application/json: - schema: - $ref: '#/components/schemas/ApiError' - description: "" "404": content: application/json: @@ -1003,14 +1027,16 @@ paths: $ref: '#/components/schemas/ApiError' description: "" security: - - playerAuth: [] + - hathoraDevToken: [] tags: - - LobbyV1 + - BuildV2 x-accepts: application/json - /lobby/v1/{appId}/create/public: - post: + /deployments/v1/{appId}/list: + get: deprecated: true - operationId: CreatePublicLobbyDeprecated + description: "Returns an array of [deployments](https://hathora.dev/docs/concepts/hathora-entities#deployment)\ + \ for an [application](https://hathora.dev/docs/concepts/hathora-entities#application)." + operationId: GetDeploymentsDeprecated parameters: - explode: false in: path @@ -1019,79 +1045,75 @@ paths: schema: $ref: '#/components/schemas/AppId' style: simple - - explode: true - in: query - name: region - required: false - schema: - $ref: '#/components/schemas/Region' - style: form - - explode: true - in: query - name: local - required: false - schema: - default: false - type: boolean - style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/RoomId' + items: + $ref: '#/components/schemas/Deployment' + type: array description: Ok - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ApiError' - description: "" "401": content: application/json: schema: $ref: '#/components/schemas/ApiError' description: "" - "402": + "404": content: application/json: schema: $ref: '#/components/schemas/ApiError' description: "" - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/ApiError' - description: "" - "422": + security: + - hathoraDevToken: [] + tags: + - DeploymentV1 + x-accepts: application/json + /deployments/v1/{appId}/latest: + get: + deprecated: true + description: "Get the latest [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment)\ + \ for an [application](https://hathora.dev/docs/concepts/hathora-entities#application)." + operationId: GetLatestDeploymentDeprecated + parameters: + - explode: false + in: path + name: appId + required: true + schema: + $ref: '#/components/schemas/AppId' + style: simple + responses: + "200": content: application/json: schema: - $ref: '#/components/schemas/ApiError' - description: "" - "429": + $ref: '#/components/schemas/Deployment' + description: Ok + "401": content: application/json: schema: $ref: '#/components/schemas/ApiError' description: "" - "500": + "404": content: application/json: schema: $ref: '#/components/schemas/ApiError' description: "" security: - - playerAuth: [] + - hathoraDevToken: [] tags: - - LobbyV1 + - DeploymentV1 x-accepts: application/json - /lobby/v1/{appId}/list: + /deployments/v1/{appId}/info/{deploymentId}: get: deprecated: true - operationId: ListActivePublicLobbiesDeprecatedV1 + description: "Get details for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment)." + operationId: GetDeploymentInfoDeprecated parameters: - explode: false in: path @@ -1100,44 +1122,44 @@ paths: schema: $ref: '#/components/schemas/AppId' style: simple - - explode: true - in: query - name: local - required: false - schema: - default: false - type: boolean - style: form - - explode: true - in: query - name: region - required: false + - explode: false + in: path + name: deploymentId + required: true schema: - $ref: '#/components/schemas/Region' - style: form + $ref: '#/components/schemas/DeploymentId' + style: simple responses: "200": content: application/json: schema: - items: - $ref: '#/components/schemas/Lobby' - type: array + $ref: '#/components/schemas/Deployment' description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: schema: $ref: '#/components/schemas/ApiError' description: "" - security: [] + security: + - hathoraDevToken: [] tags: - - LobbyV1 + - DeploymentV1 x-accepts: application/json - /lobby/v2/{appId}/create/private: + /deployments/v1/{appId}/create/{buildId}: post: deprecated: true - operationId: CreatePrivateLobby + description: "Create a new [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment).\ + \ Creating a new deployment means all new rooms created will use the latest\ + \ deployment configuration, but existing games in progress will not be affected." + operationId: CreateDeploymentDeprecated parameters: - explode: false in: path @@ -1146,25 +1168,25 @@ paths: schema: $ref: '#/components/schemas/AppId' style: simple - - explode: true - in: query - name: roomId - required: false + - explode: false + in: path + name: buildId + required: true schema: - $ref: '#/components/schemas/RoomId' - style: form + $ref: '#/components/schemas/BuildId' + style: simple requestBody: content: application/json: schema: - $ref: '#/components/schemas/CreatePrivateLobby_request' + $ref: '#/components/schemas/DeploymentConfig' required: true responses: "201": content: application/json: schema: - $ref: '#/components/schemas/Lobby' + $ref: '#/components/schemas/Deployment' description: "" "400": content: @@ -1178,24 +1200,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" - "402": - content: - application/json: - schema: - $ref: '#/components/schemas/ApiError' - description: "" "404": content: application/json: schema: $ref: '#/components/schemas/ApiError' description: "" - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/ApiError' - description: "" "429": content: application/json: @@ -1209,15 +1219,16 @@ paths: $ref: '#/components/schemas/ApiError' description: "" security: - - playerAuth: [] + - hathoraDevToken: [] tags: - - LobbyV2 + - DeploymentV1 x-content-type: application/json x-accepts: application/json - /lobby/v2/{appId}/create/public: - post: - deprecated: true - operationId: CreatePublicLobby + /deployments/v2/{appId}/list: + get: + description: "Returns an array of [deployments](https://hathora.dev/docs/concepts/hathora-entities#deployment)\ + \ for an [application](https://hathora.dev/docs/concepts/hathora-entities#application)." + operationId: GetDeployments parameters: - explode: false in: path @@ -1226,39 +1237,53 @@ paths: schema: $ref: '#/components/schemas/AppId' style: simple - - explode: true - in: query - name: roomId - required: false - schema: - $ref: '#/components/schemas/RoomId' - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreatePrivateLobby_request' - required: true responses: - "201": + "200": content: application/json: schema: - $ref: '#/components/schemas/Lobby' - description: "" - "400": + items: + $ref: '#/components/schemas/DeploymentV2' + type: array + description: Ok + "401": content: application/json: schema: $ref: '#/components/schemas/ApiError' description: "" - "401": + "404": content: application/json: schema: $ref: '#/components/schemas/ApiError' description: "" - "402": + security: + - hathoraDevToken: [] + tags: + - DeploymentV2 + x-accepts: application/json + /deployments/v2/{appId}/latest: + get: + description: "Get the latest [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment)\ + \ for an [application](https://hathora.dev/docs/concepts/hathora-entities#application)." + operationId: GetLatestDeployment + parameters: + - explode: false + in: path + name: appId + required: true + schema: + $ref: '#/components/schemas/AppId' + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DeploymentV2' + description: Ok + "401": content: application/json: schema: @@ -1270,34 +1295,60 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" - "422": + security: + - hathoraDevToken: [] + tags: + - DeploymentV2 + x-accepts: application/json + /deployments/v2/{appId}/info/{deploymentId}: + get: + description: "Get details for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment)." + operationId: GetDeploymentInfo + parameters: + - explode: false + in: path + name: appId + required: true + schema: + $ref: '#/components/schemas/AppId' + style: simple + - explode: false + in: path + name: deploymentId + required: true + schema: + $ref: '#/components/schemas/DeploymentId' + style: simple + responses: + "200": content: application/json: schema: - $ref: '#/components/schemas/ApiError' - description: "" - "429": + $ref: '#/components/schemas/DeploymentV2' + description: Ok + "401": content: application/json: schema: $ref: '#/components/schemas/ApiError' description: "" - "500": + "404": content: application/json: schema: $ref: '#/components/schemas/ApiError' description: "" security: - - playerAuth: [] + - hathoraDevToken: [] tags: - - LobbyV2 - x-content-type: application/json + - DeploymentV2 x-accepts: application/json - /lobby/v2/{appId}/create/local: + /deployments/v2/{appId}/create/{buildId}: post: - deprecated: true - operationId: CreateLocalLobby + description: "Create a new [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment).\ + \ Creating a new deployment means all new rooms created will use the latest\ + \ deployment configuration, but existing games in progress will not be affected." + operationId: CreateDeployment parameters: - explode: false in: path @@ -1306,25 +1357,25 @@ paths: schema: $ref: '#/components/schemas/AppId' style: simple - - explode: true - in: query - name: roomId - required: false + - explode: false + in: path + name: buildId + required: true schema: - $ref: '#/components/schemas/RoomId' - style: form + $ref: '#/components/schemas/BuildId' + style: simple requestBody: content: application/json: schema: - $ref: '#/components/schemas/CreatePrivateLobby_request' + $ref: '#/components/schemas/DeploymentConfigV2' required: true responses: "201": content: application/json: schema: - $ref: '#/components/schemas/Lobby' + $ref: '#/components/schemas/DeploymentV2' description: "" "400": content: @@ -1338,24 +1389,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" - "402": - content: - application/json: - schema: - $ref: '#/components/schemas/ApiError' - description: "" "404": content: application/json: schema: $ref: '#/components/schemas/ApiError' description: "" - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/ApiError' - description: "" "429": content: application/json: @@ -1369,23 +1408,57 @@ paths: $ref: '#/components/schemas/ApiError' description: "" security: - - playerAuth: [] + - hathoraDevToken: [] tags: - - LobbyV2 + - DeploymentV2 x-content-type: application/json x-accepts: application/json - /lobby/v2/{appId}/create: - post: + /discovery/v1/ping: + get: deprecated: true - description: "Create a new lobby for an [application](https://hathora.dev/docs/concepts/hathora-entities#application).\ - \ A lobby object is a wrapper around a [room](https://hathora.dev/docs/concepts/hathora-entities#room)\ - \ object. With a lobby, you get additional functionality like configuring\ - \ the visibility of the room, managing the state of a match, and retrieving\ - \ a list of public lobbies to display to players." - operationId: CreateLobbyDeprecated - parameters: - - explode: false - in: path + description: "Returns an array of V1 regions with a host and port that a client\ + \ can directly ping. Open a websocket connection to `wss://:/ws`\ + \ and send a packet. To calculate ping, measure the time it takes to get an\ + \ echo packet back." + operationId: GetPingServiceEndpointsDeprecated + parameters: [] + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PingEndpoints' + description: Ok + security: [] + tags: + - DiscoveryV1 + x-accepts: application/json + /discovery/v2/ping: + get: + description: "Returns an array of all regions with a host and port that a client\ + \ can directly ping. Open a websocket connection to `wss://:/ws`\ + \ and send a packet. To calculate ping, measure the time it takes to get an\ + \ echo packet back." + operationId: GetPingServiceEndpoints + parameters: [] + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PingEndpoints' + description: Ok + security: [] + tags: + - DiscoveryV2 + x-accepts: application/json + /lobby/v1/{appId}/create/private: + post: + deprecated: true + operationId: CreatePrivateLobbyDeprecated + parameters: + - explode: false + in: path name: appId required: true schema: @@ -1393,24 +1466,26 @@ paths: style: simple - explode: true in: query - name: roomId + name: region required: false schema: - $ref: '#/components/schemas/RoomId' + $ref: '#/components/schemas/Region' + style: form + - explode: true + in: query + name: local + required: false + schema: + default: false + type: boolean style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateLobbyParams' - required: true responses: - "201": + "200": content: application/json: schema: - $ref: '#/components/schemas/Lobby' - description: "" + $ref: '#/components/schemas/RoomId' + description: Ok "400": content: application/json: @@ -1456,16 +1531,12 @@ paths: security: - playerAuth: [] tags: - - LobbyV2 - x-content-type: application/json + - LobbyV1 x-accepts: application/json - /lobby/v2/{appId}/list/public: - get: + /lobby/v1/{appId}/create/public: + post: deprecated: true - description: "Get all active lobbies for a an [application](https://hathora.dev/docs/concepts/hathora-entities#application).\ - \ Filter by optionally passing in a `region`. Use this endpoint to display\ - \ all public lobbies that a player can join in the game client." - operationId: ListActivePublicLobbiesDeprecatedV2 + operationId: CreatePublicLobbyDeprecated parameters: - explode: false in: path @@ -1474,33 +1545,79 @@ paths: schema: $ref: '#/components/schemas/AppId' style: simple - - description: "Region to filter by. If omitted, active public lobbies in all\ - \ regions will be returned." - explode: true + - explode: true in: query name: region required: false schema: $ref: '#/components/schemas/Region' style: form + - explode: true + in: query + name: local + required: false + schema: + default: false + type: boolean + style: form responses: "200": content: application/json: schema: - items: - $ref: '#/components/schemas/Lobby' - type: array + $ref: '#/components/schemas/RoomId' description: Ok - security: [] + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "402": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + security: + - playerAuth: [] tags: - - LobbyV2 + - LobbyV1 x-accepts: application/json - /lobby/v2/{appId}/info/{roomId}: + /lobby/v1/{appId}/list: get: deprecated: true - description: Get details for a lobby. - operationId: GetLobbyInfo + operationId: ListActivePublicLobbiesDeprecatedV1 parameters: - explode: false in: path @@ -1509,19 +1626,29 @@ paths: schema: $ref: '#/components/schemas/AppId' style: simple - - explode: false - in: path - name: roomId - required: true + - explode: true + in: query + name: local + required: false schema: - $ref: '#/components/schemas/RoomId' - style: simple + default: false + type: boolean + style: form + - explode: true + in: query + name: region + required: false + schema: + $ref: '#/components/schemas/Region' + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Lobby' + items: + $ref: '#/components/schemas/Lobby' + type: array description: Ok "404": content: @@ -1531,16 +1658,12 @@ paths: description: "" security: [] tags: - - LobbyV2 + - LobbyV1 x-accepts: application/json - /lobby/v2/{appId}/setState/{roomId}: + /lobby/v2/{appId}/create/private: post: deprecated: true - description: Set the state of a lobby. State is intended to be set by the server - and must be smaller than 1MB. Use this endpoint to store match data like live - player count to enforce max number of clients or persist end-game data (i.e. - winner or final scores). - operationId: SetLobbyState + operationId: CreatePrivateLobby parameters: - explode: false in: path @@ -1549,32 +1672,44 @@ paths: schema: $ref: '#/components/schemas/AppId' style: simple - - explode: false - in: path + - explode: true + in: query name: roomId - required: true + required: false schema: $ref: '#/components/schemas/RoomId' - style: simple + style: form requestBody: content: application/json: schema: - $ref: '#/components/schemas/SetLobbyStateParams' + $ref: '#/components/schemas/CreatePrivateLobby_request' required: true responses: - "200": + "201": content: application/json: schema: $ref: '#/components/schemas/Lobby' - description: Ok + description: "" + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "401": content: application/json: schema: $ref: '#/components/schemas/ApiError' description: "" + "402": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -1587,20 +1722,28 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" security: - - hathoraDevToken: [] + - playerAuth: [] tags: - LobbyV2 x-content-type: application/json x-accepts: application/json - /lobby/v3/{appId}/create: + /lobby/v2/{appId}/create/public: post: - description: "Create a new lobby for an [application](https://hathora.dev/docs/concepts/hathora-entities#application).\ - \ A lobby object is a wrapper around a [room](https://hathora.dev/docs/concepts/hathora-entities#room)\ - \ object. With a lobby, you get additional functionality like configuring\ - \ the visibility of the room, managing the state of a match, and retrieving\ - \ a list of public lobbies to display to players." - operationId: CreateLobby + deprecated: true + operationId: CreatePublicLobby parameters: - explode: false in: path @@ -1609,13 +1752,6 @@ paths: schema: $ref: '#/components/schemas/AppId' style: simple - - explode: true - in: query - name: shortCode - required: false - schema: - $ref: '#/components/schemas/ShortCode' - style: form - explode: true in: query name: roomId @@ -1627,14 +1763,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateLobbyV3Params' + $ref: '#/components/schemas/CreatePrivateLobby_request' required: true responses: "201": content: application/json: schema: - $ref: '#/components/schemas/LobbyV3' + $ref: '#/components/schemas/Lobby' description: "" "400": content: @@ -1681,15 +1817,13 @@ paths: security: - playerAuth: [] tags: - - LobbyV3 + - LobbyV2 x-content-type: application/json x-accepts: application/json - /lobby/v3/{appId}/list/public: - get: - description: "Get all active lobbies for a given [application](https://hathora.dev/docs/concepts/hathora-entities#application).\ - \ Filter the array by optionally passing in a `region`. Use this endpoint\ - \ to display all public lobbies that a player can join in the game client." - operationId: ListActivePublicLobbies + /lobby/v2/{appId}/create/local: + post: + deprecated: true + operationId: CreateLocalLobby parameters: - explode: false in: path @@ -1698,31 +1832,563 @@ paths: schema: $ref: '#/components/schemas/AppId' style: simple - - description: "If omitted, active public lobbies in all regions will be returned." - explode: true + - explode: true in: query - name: region + name: roomId required: false schema: - $ref: '#/components/schemas/Region' + $ref: '#/components/schemas/RoomId' style: form - responses: + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreatePrivateLobby_request' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Lobby' + description: "" + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "402": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + security: + - playerAuth: [] + tags: + - LobbyV2 + x-content-type: application/json + x-accepts: application/json + /lobby/v2/{appId}/create: + post: + deprecated: true + description: "Create a new lobby for an [application](https://hathora.dev/docs/concepts/hathora-entities#application).\ + \ A lobby object is a wrapper around a [room](https://hathora.dev/docs/concepts/hathora-entities#room)\ + \ object. With a lobby, you get additional functionality like configuring\ + \ the visibility of the room, managing the state of a match, and retrieving\ + \ a list of public lobbies to display to players." + operationId: CreateLobbyDeprecated + parameters: + - explode: false + in: path + name: appId + required: true + schema: + $ref: '#/components/schemas/AppId' + style: simple + - explode: true + in: query + name: roomId + required: false + schema: + $ref: '#/components/schemas/RoomId' + style: form + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateLobbyParams' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Lobby' + description: "" + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "402": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + security: + - playerAuth: [] + tags: + - LobbyV2 + x-content-type: application/json + x-accepts: application/json + /lobby/v2/{appId}/list/public: + get: + deprecated: true + description: "Get all active lobbies for a an [application](https://hathora.dev/docs/concepts/hathora-entities#application).\ + \ Filter by optionally passing in a `region`. Use this endpoint to display\ + \ all public lobbies that a player can join in the game client." + operationId: ListActivePublicLobbiesDeprecatedV2 + parameters: + - explode: false + in: path + name: appId + required: true + schema: + $ref: '#/components/schemas/AppId' + style: simple + - description: "Region to filter by. If omitted, active public lobbies in all\ + \ regions will be returned." + explode: true + in: query + name: region + required: false + schema: + $ref: '#/components/schemas/Region' + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/Lobby' + type: array + description: Ok + security: [] + tags: + - LobbyV2 + x-accepts: application/json + /lobby/v2/{appId}/info/{roomId}: + get: + deprecated: true + description: Get details for a lobby. + operationId: GetLobbyInfo + parameters: + - explode: false + in: path + name: appId + required: true + schema: + $ref: '#/components/schemas/AppId' + style: simple + - explode: false + in: path + name: roomId + required: true + schema: + $ref: '#/components/schemas/RoomId' + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Lobby' + description: Ok + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + security: [] + tags: + - LobbyV2 + x-accepts: application/json + /lobby/v2/{appId}/setState/{roomId}: + post: + deprecated: true + description: Set the state of a lobby. State is intended to be set by the server + and must be smaller than 1MB. Use this endpoint to store match data like live + player count to enforce max number of clients or persist end-game data (i.e. + winner or final scores). + operationId: SetLobbyState + parameters: + - explode: false + in: path + name: appId + required: true + schema: + $ref: '#/components/schemas/AppId' + style: simple + - explode: false + in: path + name: roomId + required: true + schema: + $ref: '#/components/schemas/RoomId' + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SetLobbyStateParams' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Lobby' + description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + security: + - hathoraDevToken: [] + tags: + - LobbyV2 + x-content-type: application/json + x-accepts: application/json + /lobby/v3/{appId}/create: + post: + description: "Create a new lobby for an [application](https://hathora.dev/docs/concepts/hathora-entities#application).\ + \ A lobby object is a wrapper around a [room](https://hathora.dev/docs/concepts/hathora-entities#room)\ + \ object. With a lobby, you get additional functionality like configuring\ + \ the visibility of the room, managing the state of a match, and retrieving\ + \ a list of public lobbies to display to players." + operationId: CreateLobby + parameters: + - explode: false + in: path + name: appId + required: true + schema: + $ref: '#/components/schemas/AppId' + style: simple + - explode: true + in: query + name: shortCode + required: false + schema: + $ref: '#/components/schemas/ShortCode' + style: form + - explode: true + in: query + name: roomId + required: false + schema: + $ref: '#/components/schemas/RoomId' + style: form + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateLobbyV3Params' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/LobbyV3' + description: "" + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "402": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + security: + - playerAuth: [] + tags: + - LobbyV3 + x-content-type: application/json + x-accepts: application/json + /lobby/v3/{appId}/list/public: + get: + description: "Get all active lobbies for a given [application](https://hathora.dev/docs/concepts/hathora-entities#application).\ + \ Filter the array by optionally passing in a `region`. Use this endpoint\ + \ to display all public lobbies that a player can join in the game client." + operationId: ListActivePublicLobbies + parameters: + - explode: false + in: path + name: appId + required: true + schema: + $ref: '#/components/schemas/AppId' + style: simple + - description: "If omitted, active public lobbies in all regions will be returned." + explode: true + in: query + name: region + required: false + schema: + $ref: '#/components/schemas/Region' + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/LobbyV3' + type: array + description: Ok + security: [] + tags: + - LobbyV3 + x-accepts: application/json + /lobby/v3/{appId}/info/roomid/{roomId}: + get: + description: Get details for a lobby. + operationId: GetLobbyInfoByRoomId + parameters: + - explode: false + in: path + name: appId + required: true + schema: + $ref: '#/components/schemas/AppId' + style: simple + - explode: false + in: path + name: roomId + required: true + schema: + $ref: '#/components/schemas/RoomId' + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LobbyV3' + description: Ok + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + security: [] + tags: + - LobbyV3 + x-accepts: application/json + /lobby/v3/{appId}/info/shortcode/{shortCode}: + get: + description: "Get details for a lobby. If 2 or more lobbies have the same `shortCode`,\ + \ then the most recently created lobby will be returned." + operationId: GetLobbyInfoByShortCode + parameters: + - explode: false + in: path + name: appId + required: true + schema: + $ref: '#/components/schemas/AppId' + style: simple + - explode: false + in: path + name: shortCode + required: true + schema: + $ref: '#/components/schemas/ShortCode' + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LobbyV3' + description: Ok + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + security: [] + tags: + - LobbyV3 + x-accepts: application/json + /logs/v1/{appId}/all: + get: + deprecated: true + description: "Returns a stream of logs for an [application](https://hathora.dev/docs/concepts/hathora-entities#application)\ + \ using `appId`." + operationId: GetLogsForApp + parameters: + - explode: false + in: path + name: appId + required: true + schema: + $ref: '#/components/schemas/AppId' + style: simple + - explode: true + in: query + name: follow + required: false + schema: + $ref: '#/components/schemas/LogsFollow' + style: form + - explode: true + in: query + name: tailLines + required: false + schema: + $ref: '#/components/schemas/TailLines' + style: form + - explode: true + in: query + name: region + required: false + schema: + $ref: '#/components/schemas/Region' + style: form + responses: "200": + content: + application/octet-stream: + schema: + format: binary + type: string + description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "404": content: application/json: schema: - items: - $ref: '#/components/schemas/LobbyV3' - type: array - description: Ok - security: [] + $ref: '#/components/schemas/ApiError' + description: "" + security: + - hathoraDevToken: [] tags: - - LobbyV3 + - LogV1 x-accepts: application/json - /lobby/v3/{appId}/info/roomid/{roomId}: + /logs/v1/{appId}/process/{processId}: get: - description: Get details for a lobby. - operationId: GetLobbyInfoByRoomId + description: "Returns a stream of logs for a [process](https://hathora.dev/docs/concepts/hathora-entities#process)\ + \ using `appId` and `processId`." + operationId: GetLogsForProcess parameters: - explode: false in: path @@ -1733,33 +2399,72 @@ paths: style: simple - explode: false in: path - name: roomId + name: processId required: true schema: - $ref: '#/components/schemas/RoomId' + $ref: '#/components/schemas/ProcessId' style: simple + - explode: true + in: query + name: follow + required: false + schema: + $ref: '#/components/schemas/LogsFollow' + style: form + - explode: true + in: query + name: tailLines + required: false + schema: + $ref: '#/components/schemas/TailLines' + style: form responses: "200": content: - application/json: + application/octet-stream: schema: - $ref: '#/components/schemas/LobbyV3' + format: binary + type: string description: Ok + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: schema: $ref: '#/components/schemas/ApiError' description: "" - security: [] + "410": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + security: + - hathoraDevToken: [] tags: - - LobbyV3 + - LogV1 x-accepts: application/json - /lobby/v3/{appId}/info/shortcode/{shortCode}: + /logs/v1/{appId}/process/{processId}/download: get: - description: "Get details for a lobby. If 2 or more lobbies have the same `shortCode`,\ - \ then the most recently created lobby will be returned." - operationId: GetLobbyInfoByShortCode + description: Download entire log file for a stopped process. + operationId: DownloadLogForProcess parameters: - explode: false in: path @@ -1770,34 +2475,54 @@ paths: style: simple - explode: false in: path - name: shortCode + name: processId required: true schema: - $ref: '#/components/schemas/ShortCode' + $ref: '#/components/schemas/ProcessId' style: simple responses: "200": content: - application/json: + application/octet-stream: schema: - $ref: '#/components/schemas/LobbyV3' + format: binary + type: string description: Ok + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: schema: $ref: '#/components/schemas/ApiError' description: "" - security: [] + "410": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + security: + - hathoraDevToken: [] tags: - - LobbyV3 + - LogV1 x-accepts: application/json - /logs/v1/{appId}/all: + /logs/v1/{appId}/deployment/{deploymentId}: get: deprecated: true - description: "Returns a stream of logs for an [application](https://hathora.dev/docs/concepts/hathora-entities#application)\ - \ using `appId`." - operationId: GetLogsForApp + description: "Returns a stream of logs for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment)\ + \ using `appId` and `deploymentId`." + operationId: GetLogsForDeployment parameters: - explode: false in: path @@ -1806,6 +2531,13 @@ paths: schema: $ref: '#/components/schemas/AppId' style: simple + - explode: false + in: path + name: deploymentId + required: true + schema: + $ref: '#/components/schemas/DeploymentId' + style: simple - explode: true in: query name: follow @@ -1820,19 +2552,12 @@ paths: schema: $ref: '#/components/schemas/TailLines' style: form - - explode: true - in: query - name: region - required: false - schema: - $ref: '#/components/schemas/Region' - style: form responses: "200": content: - text/plain: + application/octet-stream: schema: - format: byte + format: binary type: string description: Ok "401": @@ -1852,11 +2577,51 @@ paths: tags: - LogV1 x-accepts: application/json - /logs/v1/{appId}/process/{processId}: + /management/v1/sendverificationemail: + post: + operationId: SendVerificationEmail + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/VerificationEmailRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/VerificationEmailSuccess' + description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + security: [] + tags: + - ManagementV1 + x-content-type: application/json + x-accepts: application/json + /metrics/v1/{appId}/process/{processId}: get: - description: "Returns a stream of logs for a [process](https://hathora.dev/docs/concepts/hathora-entities#process)\ + description: "Get metrics for a [process](https://hathora.dev/docs/concepts/hathora-entities#process)\ \ using `appId` and `processId`." - operationId: GetLogsForProcess + operationId: GetMetrics parameters: - explode: false in: path @@ -1872,53 +2637,118 @@ paths: schema: $ref: '#/components/schemas/ProcessId' style: simple - - explode: true + - description: Available metrics to query over time. + explode: true in: query - name: follow + name: metrics required: false schema: - $ref: '#/components/schemas/LogsFollow' + default: + - cpu + - memory + - rate_egress + items: + $ref: '#/components/schemas/MetricName' + type: array + style: form + - description: Unix timestamp. Default is current time. + explode: true + in: query + name: end + required: false + schema: + format: double + type: number + style: form + - description: Unix timestamp. Default is -1 hour from `end`. + explode: true + in: query + name: start + required: false + schema: + format: double + type: number style: form - explode: true in: query - name: tailLines + name: step required: false schema: - $ref: '#/components/schemas/TailLines' + $ref: '#/components/schemas/MetricsStep' style: form responses: "200": - content: - text/plain: - schema: - format: byte - type: string - description: Ok - "400": content: application/json: schema: - $ref: '#/components/schemas/ApiError' - description: "" + $ref: '#/components/schemas/MetricsData' + description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + security: + - hathoraDevToken: [] + tags: + - MetricsV1 + x-accepts: application/json + /orgs/v1/{orgId}/invites: + put: + operationId: InviteUser + parameters: + - explode: false + in: path + name: orgId + required: true + schema: + $ref: '#/components/schemas/OrgId' + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateUserInvite' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/OrgPermission' + description: Ok "401": content: application/json: schema: $ref: '#/components/schemas/ApiError' description: "" - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/ApiError' - description: "" - "410": + "422": content: application/json: schema: $ref: '#/components/schemas/ApiError' description: "" - "500": + "429": content: application/json: schema: @@ -1927,54 +2757,48 @@ paths: security: - hathoraDevToken: [] tags: - - LogV1 + - OrganizationsV1 + x-content-type: application/json x-accepts: application/json - /logs/v1/{appId}/process/{processId}/download: - get: - description: Download entire log file for a stopped process. - operationId: DownloadLogForProcess + /orgs/v1/{orgId}/invites/rescind: + post: + operationId: RescindInvite parameters: - explode: false in: path - name: appId + name: orgId required: true schema: - $ref: '#/components/schemas/AppId' + $ref: '#/components/schemas/OrgId' style: simple - - explode: false - in: path - name: processId + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RescindUserInvite' required: true - schema: - $ref: '#/components/schemas/ProcessId' - style: simple responses: - "200": - content: - text/plain: - schema: - format: byte - type: string - description: Ok - "400": + "204": + description: No content + "401": content: application/json: schema: $ref: '#/components/schemas/ApiError' description: "" - "401": + "404": content: application/json: schema: $ref: '#/components/schemas/ApiError' description: "" - "404": + "429": content: application/json: schema: $ref: '#/components/schemas/ApiError' description: "" - "410": + "500": content: application/json: schema: @@ -1983,50 +2807,26 @@ paths: security: - hathoraDevToken: [] tags: - - LogV1 + - OrganizationsV1 + x-content-type: application/json x-accepts: application/json - /logs/v1/{appId}/deployment/{deploymentId}: + /orgs/v1/{orgId}/invites/pending: get: - deprecated: true - description: "Returns a stream of logs for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment)\ - \ using `appId` and `deploymentId`." - operationId: GetLogsForDeployment + operationId: GetOrgPendingInvites parameters: - explode: false in: path - name: appId - required: true - schema: - $ref: '#/components/schemas/AppId' - style: simple - - explode: false - in: path - name: deploymentId + name: orgId required: true schema: - $ref: '#/components/schemas/DeploymentId' + $ref: '#/components/schemas/OrgId' style: simple - - explode: true - in: query - name: follow - required: false - schema: - $ref: '#/components/schemas/LogsFollow' - style: form - - explode: true - in: query - name: tailLines - required: false - schema: - $ref: '#/components/schemas/TailLines' - style: form responses: "200": content: - text/plain: + application/json: schema: - format: byte - type: string + $ref: '#/components/schemas/OrgInvitesPage' description: Ok "401": content: @@ -2034,7 +2834,7 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" - "404": + "429": content: application/json: schema: @@ -2043,24 +2843,18 @@ paths: security: - hathoraDevToken: [] tags: - - LogV1 + - OrganizationsV1 x-accepts: application/json - /management/v1/sendverificationemail: - post: - operationId: SendVerificationEmail + /orgs/v1/user/invites/pending: + get: + operationId: GetUserPendingInvites parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/VerificationEmailRequest' - required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/VerificationEmailResponse' + $ref: '#/components/schemas/OrgInvitesPage' description: Ok "401": content: @@ -2068,102 +2862,81 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" - "500": + "429": content: application/json: schema: $ref: '#/components/schemas/ApiError' description: "" - security: [] + security: + - hathoraDevToken: [] tags: - - ManagementV1 - x-content-type: application/json + - OrganizationsV1 x-accepts: application/json - /metrics/v1/{appId}/process/{processId}: - get: - description: "Get metrics for a [process](https://hathora.dev/docs/concepts/hathora-entities#process)\ - \ using `appId` and `processId`." - operationId: GetMetrics + /orgs/v1/{orgId}/invites/accept: + post: + operationId: AcceptInvite parameters: - explode: false in: path - name: appId - required: true - schema: - $ref: '#/components/schemas/AppId' - style: simple - - explode: false - in: path - name: processId + name: orgId required: true schema: - $ref: '#/components/schemas/ProcessId' + $ref: '#/components/schemas/OrgId' style: simple - - description: Available metrics to query over time. - explode: true - in: query - name: metrics - required: false - schema: - default: - - cpu - - memory - - rate_egress - items: - $ref: '#/components/schemas/MetricName' - type: array - style: form - - description: Unix timestamp. Default is current time. - explode: true - in: query - name: end - required: false - schema: - format: double - type: number - style: form - - description: Unix timestamp. Default is -1 hour from `end`. - explode: true - in: query - name: start - required: false - schema: - format: double - type: number - style: form - - explode: true - in: query - name: step - required: false - schema: - $ref: '#/components/schemas/MetricsStep' - style: form responses: - "200": + "204": + description: No content + "401": content: application/json: schema: - $ref: '#/components/schemas/MetricsResponse' - description: Ok - "401": + $ref: '#/components/schemas/ApiError' + description: "" + "404": content: application/json: schema: $ref: '#/components/schemas/ApiError' description: "" - "404": + "429": content: application/json: schema: $ref: '#/components/schemas/ApiError' description: "" - "422": + security: + - hathoraDevToken: [] + tags: + - OrganizationsV1 + x-accepts: application/json + /orgs/v1/{orgId}/invites/reject: + post: + operationId: RejectInvite + parameters: + - explode: false + in: path + name: orgId + required: true + schema: + $ref: '#/components/schemas/OrgId' + style: simple + responses: + "204": + description: No content + "401": content: application/json: schema: $ref: '#/components/schemas/ApiError' description: "" - "500": + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "429": content: application/json: schema: @@ -2172,7 +2945,7 @@ paths: security: - hathoraDevToken: [] tags: - - MetricsV1 + - OrganizationsV1 x-accepts: application/json /processes/v1/{appId}/list/running: get: @@ -2410,7 +3183,53 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" - "404": + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + security: + - hathoraDevToken: [] + tags: + - ProcessesV2 + x-accepts: application/json + /processes/v2/{appId}/stop/{processId}: + post: + description: "Stops a [process](https://hathora.dev/docs/concepts/hathora-entities#process)\ + \ immediately." + operationId: StopProcess + parameters: + - explode: false + in: path + name: appId + required: true + schema: + $ref: '#/components/schemas/AppId' + style: simple + - explode: false + in: path + name: processId + required: true + schema: + $ref: '#/components/schemas/ProcessId' + style: simple + responses: + "204": + description: No content + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" + "500": content: application/json: schema: @@ -2421,11 +3240,13 @@ paths: tags: - ProcessesV2 x-accepts: application/json - /processes/v2/{appId}/stop/{processId}: + /processes/v2/{appId}/create/{region}: post: - description: "Stops a [process](https://hathora.dev/docs/concepts/hathora-entities#process)\ - \ immediately." - operationId: StopProcess + description: "Creates a [process](https://hathora.dev/docs/concepts/hathora-entities#process)\ + \ without a room. Use this to pre-allocate processes ahead of time so that\ + \ subsequent room assignment via [CreateRoom()](https://hathora.dev/api#tag/RoomV2/operation/CreateRoom)\ + \ can be instant." + operationId: CreateProcess parameters: - explode: false in: path @@ -2436,20 +3257,30 @@ paths: style: simple - explode: false in: path - name: processId + name: region required: true schema: - $ref: '#/components/schemas/ProcessId' + $ref: '#/components/schemas/Region' style: simple responses: - "204": - description: No content + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ProcessV2' + description: "" "401": content: application/json: schema: $ref: '#/components/schemas/ApiError' description: "" + "402": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -2529,6 +3360,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "500": content: application/json: @@ -2708,6 +3545,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "500": content: application/json: @@ -2753,6 +3596,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "500": content: application/json: @@ -2851,7 +3700,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateRoomResponse' + $ref: '#/components/schemas/RoomConnectionData' description: "" "400": content: @@ -2883,6 +3732,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "500": content: application/json: @@ -3065,6 +3920,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "500": content: application/json: @@ -3078,10 +3939,11 @@ paths: x-accepts: application/json /rooms/v2/{appId}/suspend/{roomId}: post: + deprecated: true description: "Suspend a [room](https://hathora.dev/docs/concepts/hathora-entities#room).\ \ The room is unallocated from the process but can be rescheduled later using\ \ the same `roomId`." - operationId: SuspendRoom + operationId: SuspendRoomV2Deprecated parameters: - explode: false in: path @@ -3112,6 +3974,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "500": content: application/json: @@ -3217,6 +4085,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "500": content: application/json: @@ -3518,24 +4392,6 @@ components: - port - transportType type: object - PlanName: - description: |- - A plan defines how much CPU and memory is required to run an instance of your game server. - - `tiny`: shared core, 1gb memory - - `small`: 1 core, 2gb memory - - `medium`: 2 core, 4gb memory - - `large`: 4 core, 8gb memory - enum: - - tiny - - small - - medium - - large - example: tiny - type: string NumRoomsPerProcess: description: "Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room)\ \ can be scheduled in a process." @@ -3544,18 +4400,24 @@ components: maximum: 10000 minimum: 1 type: integer - Deployment: - description: Deployment is a versioned configuration for a build that describes - runtime behavior. + DeploymentV2: example: + createdAt: 2000-01-23T04:56:07.000+00:00 requestedCPU: 0.5 defaultContainerPort: port: 8000 name: default transportType: null roomsPerProcess: 3 - planName: tiny + additionalContainerPorts: + transportType: tcp + port: 4000 + name: debug + createdBy: google-oauth2|107030234048588177467 + deploymentId: 1 + appId: app-af469a92-5b45-4565-b3c4-b79878de67d2 buildId: 1 + requestedMemoryMB: 1024 env: - name: EULA value: "TRUE" @@ -3568,20 +4430,8 @@ components: - name: EULA value: "TRUE" idleTimeoutEnabled: true - createdAt: 2000-01-23T04:56:07.000+00:00 - additionalContainerPorts: - transportType: tcp - port: 4000 - name: debug - createdBy: google-oauth2|107030234048588177467 - deploymentId: 1 - appId: app-af469a92-5b45-4565-b3c4-b79878de67d2 - containerPort: 0.8008281904610115 - transportType: tcp - requestedMemoryMB: 1024 properties: idleTimeoutEnabled: - default: true description: |- Option to shut down processes that have had no new connections or rooms for five minutes. @@ -3590,7 +4440,7 @@ components: description: The environment variable that our process will have access to at runtime. items: - $ref: '#/components/schemas/Deployment_env_inner' + $ref: '#/components/schemas/DeploymentV2_env_inner' maxItems: 100 type: array roomsPerProcess: @@ -3601,8 +4451,6 @@ components: maximum: 10000 minimum: 1 type: integer - planName: - $ref: '#/components/schemas/PlanName' additionalContainerPorts: description: Additional ports your server listens on. example: @@ -3615,17 +4463,6 @@ components: type: array defaultContainerPort: $ref: '#/components/schemas/ContainerPort' - transportType: - deprecated: true - enum: - - tcp - - udp - - tls - type: string - containerPort: - deprecated: true - format: double - type: number createdAt: description: When the deployment was created. format: date-time @@ -3637,8 +4474,8 @@ components: requestedMemoryMB: description: The amount of memory allocated to your process. example: 1024 - format: int32 - type: integer + format: double + type: number requestedCPU: description: The number of cores allocated to your process. example: 0.5 @@ -3662,17 +4499,15 @@ components: - additionalContainerPorts - appId - buildId - - containerPort - createdAt - createdBy - defaultContainerPort - deploymentId - env - - planName + - idleTimeoutEnabled - requestedCPU - requestedMemoryMB - roomsPerProcess - - transportType type: object BuildStatus: enum: @@ -3694,10 +4529,11 @@ components: - Tokyo - Sydney - Sao_Paulo + - Dallas type: string BuildTag: description: "Tag to associate an external version with a build. It is accessible\ - \ via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV1/operation/GetBuildInfo)." + \ via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV2/operation/GetBuildInfo)." example: 0.1.14-14c793 maxLength: 1000 type: string @@ -3731,7 +4567,7 @@ components: type: array imageSize: description: The size (in bytes) of the Docker image built by Hathora. - format: int32 + format: int64 type: integer status: $ref: '#/components/schemas/BuildStatus' @@ -3741,19 +4577,19 @@ components: nullable: true type: string finishedAt: - description: "When [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild)\ + description: "When [`RunBuild()`](https://hathora.dev/api#tag/BuildV2/operation/RunBuild)\ \ finished executing." format: date-time nullable: true type: string startedAt: - description: "When [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild)\ + description: "When [`RunBuild()`](https://hathora.dev/api#tag/BuildV2/operation/RunBuild)\ \ is called." format: date-time nullable: true type: string createdAt: - description: "When [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild)\ + description: "When [`CreateBuild()`](https://hathora.dev/api#tag/BuildV2/operation/CreateBuild)\ \ is called." format: date-time type: string @@ -3815,7 +4651,7 @@ components: required: - message type: object - LoginResponse: + PlayerTokenObject: example: token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0eXBlIjoiYW5vbnltb3VzIiwiaWQiOiJ3aDA4eWN3eTJwOSIsIm5hbWUiOiJqaXR0ZXJ5LXNhbG1vbi1ndWxsIiwiaWF0IjoxNjg5MzQ5MTk3fQ.-LzlPhZw2tw0ycZ229IRHwwmINGKWNPFMDrXOphLjEk properties: @@ -3826,7 +4662,7 @@ components: required: - token type: object - LoginNicknameRequest: + NicknameObject: example: nickname: squiddytwoshoes properties: @@ -3837,7 +4673,7 @@ components: required: - nickname type: object - LoginGoogleRequest: + GoogleIdTokenObject: example: idToken: eyJhbGciOiJSUzI1NiIsImtpZCI6ImZkNDhhNzUxMzhkOWQ0OGYwYWE2MzVlZjU2OWM0ZTE5NmY3YWU4ZDYiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJhY2NvdW50cy5nb29nbGUuY29tIiwiYXpwIjoiODQ4NDEyODI2Nzg4LW00bXNyYjZxNDRkbTJ1ZTNrZ3Z1aTBmcTdrZGE1NWxzLmFwcHMuZ29vZ2xldXNlcmNvbnRlbnQuY29tIiwiYXVkIjoiODQ4NDEyODI2Nzg4LW00bXNyYjZxNDRkbTJ1ZTNrZ3Z1aTBmcTdrZGE1NWxzLmFwcHMuZ29vZ2xldXNlcmNvbnRlbnQuY29tIiwic3ViIjoiMTE0NTQyMzMwNzI3MTU2MTMzNzc2IiwiZW1haWwiOiJocGFdkeivmeuzQGdtYWlsLmNvbSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJhdF9oYXNoIjoidno1NGhhdTNxbnVR properties: @@ -3942,38 +4778,186 @@ components: amountDue: format: double type: number - pdfUrl: - type: string - dueDate: + pdfUrl: + type: string + dueDate: + format: date-time + type: string + year: + format: double + type: number + month: + format: double + type: number + id: + type: string + required: + - amountDue + - dueDate + - id + - month + - pdfUrl + - status + - year + type: object + CreateBuildParams: + example: + buildTag: 0.1.14-14c793 + properties: + buildTag: + description: "Tag to associate an external version with a build. It is accessible\ + \ via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV2/operation/GetBuildInfo)." + example: 0.1.14-14c793 + maxLength: 1000 + type: string + type: object + PlanName: + description: |- + A plan defines how much CPU and memory is required to run an instance of your game server. + + `tiny`: shared core, 1gb memory + + `small`: 1 core, 2gb memory + + `medium`: 2 core, 4gb memory + + `large`: 4 core, 8gb memory + enum: + - tiny + - small + - medium + - large + example: tiny + type: string + Deployment: + description: Deployment is a versioned configuration for a build that describes + runtime behavior. + example: + requestedCPU: 0.5 + defaultContainerPort: + port: 8000 + name: default + transportType: null + roomsPerProcess: 3 + planName: tiny + buildId: 1 + env: + - name: EULA + value: "TRUE" + - name: EULA + value: "TRUE" + - name: EULA + value: "TRUE" + - name: EULA + value: "TRUE" + - name: EULA + value: "TRUE" + idleTimeoutEnabled: true + createdAt: 2000-01-23T04:56:07.000+00:00 + additionalContainerPorts: + transportType: tcp + port: 4000 + name: debug + createdBy: google-oauth2|107030234048588177467 + deploymentId: 1 + appId: app-af469a92-5b45-4565-b3c4-b79878de67d2 + containerPort: 0.8008281904610115 + transportType: tcp + requestedMemoryMB: 1024 + properties: + idleTimeoutEnabled: + default: true + description: |- + Option to shut down processes that have had no new connections or rooms + for five minutes. + type: boolean + env: + description: The environment variable that our process will have access + to at runtime. + items: + $ref: '#/components/schemas/DeploymentV2_env_inner' + maxItems: 100 + type: array + roomsPerProcess: + description: "Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room)\ + \ can be scheduled in a process." + example: 3 + format: int32 + maximum: 10000 + minimum: 1 + type: integer + planName: + $ref: '#/components/schemas/PlanName' + additionalContainerPorts: + description: Additional ports your server listens on. + example: + transportType: tcp + port: 4000 + name: debug + items: + $ref: '#/components/schemas/ContainerPort' + maxItems: 2 + type: array + defaultContainerPort: + $ref: '#/components/schemas/ContainerPort' + transportType: + deprecated: true + enum: + - tcp + - udp + - tls + type: string + containerPort: + deprecated: true + format: double + type: number + createdAt: + description: When the deployment was created. format: date-time type: string - year: - format: double - type: number - month: + createdBy: + description: UserId or email address for the user that created the deployment. + example: google-oauth2|107030234048588177467 + type: string + requestedMemoryMB: + description: The amount of memory allocated to your process. + example: 1024 + format: int32 + type: integer + requestedCPU: + description: The number of cores allocated to your process. + example: 0.5 format: double type: number - id: + deploymentId: + description: System generated id for a deployment. Increments by 1. + example: 1 + format: int32 + type: integer + buildId: + description: System generated id for a build. Increments by 1. + example: 1 + format: int32 + type: integer + appId: + description: System generated unique identifier for an application. + example: app-af469a92-5b45-4565-b3c4-b79878de67d2 type: string required: - - amountDue - - dueDate - - id - - month - - pdfUrl - - status - - year - type: object - CreateBuildParams: - example: - buildTag: 0.1.14-14c793 - properties: - buildTag: - description: "Tag to associate an external version with a build. It is accessible\ - \ via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV1/operation/GetBuildInfo)." - example: 0.1.14-14c793 - maxLength: 1000 - type: string + - additionalContainerPorts + - appId + - buildId + - containerPort + - createdAt + - createdBy + - defaultContainerPort + - deploymentId + - env + - planName + - requestedCPU + - requestedMemoryMB + - roomsPerProcess + - transportType type: object DeploymentConfig: description: User specified deployment configuration for your application at @@ -4013,7 +4997,7 @@ components: description: The environment variable that our process will have access to at runtime. items: - $ref: '#/components/schemas/Deployment_env_inner' + $ref: '#/components/schemas/DeploymentV2_env_inner' maxItems: 100 type: array roomsPerProcess: @@ -4048,13 +5032,94 @@ components: - roomsPerProcess - transportType type: object - DiscoveryResponse: + DeploymentConfigV2: + example: + requestedCPU: 0.5 + roomsPerProcess: 3 + additionalContainerPorts: + - port: 8000 + name: default + transportType: null + - port: 8000 + name: default + transportType: null + containerPort: 4000 + transportType: null + requestedMemoryMB: 1024 + env: + - name: EULA + value: "TRUE" + - name: EULA + value: "TRUE" + - name: EULA + value: "TRUE" + - name: EULA + value: "TRUE" + - name: EULA + value: "TRUE" + idleTimeoutEnabled: true + properties: + idleTimeoutEnabled: + description: |- + Option to shut down processes that have had no new connections or rooms + for five minutes. + type: boolean + env: + description: The environment variable that our process will have access + to at runtime. + items: + $ref: '#/components/schemas/DeploymentV2_env_inner' + maxItems: 100 + type: array + roomsPerProcess: + description: "Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room)\ + \ can be scheduled in a process." + example: 3 + format: int32 + maximum: 10000 + minimum: 1 + type: integer + additionalContainerPorts: + description: Additional ports your server listens on. + items: + $ref: '#/components/schemas/ContainerPort' + maxItems: 2 + type: array + transportType: + $ref: '#/components/schemas/TransportType' + containerPort: + description: Default port the server listens on. + example: 4000 + format: int32 + maximum: 65535 + minimum: 1 + type: integer + requestedMemoryMB: + description: The amount of memory allocated to your process. + example: 1024 + format: double + type: number + requestedCPU: + description: The number of cores allocated to your process. + example: 0.5 + format: double + type: number + required: + - containerPort + - env + - idleTimeoutEnabled + - requestedCPU + - requestedMemoryMB + - roomsPerProcess + - transportType + type: object + PingEndpoints: example: - region: Seattle host: ping.hathora.dev port: 2000 items: - $ref: '#/components/schemas/DiscoveryResponse_inner' + $ref: '#/components/schemas/PingEndpoints_inner' type: array RoomId: description: |- @@ -4113,6 +5178,7 @@ components: additionalProperties: false description: JSON blob to store metadata for a room. Must be smaller than 1MB. + nullable: true type: object initialConfig: additionalProperties: false @@ -4290,18 +5356,11 @@ components: game server. example: cbfcddd2-0006-43ae-996c-995fff7bed2e type: string - VerificationEmailResponse: - example: - status: success - properties: - status: - enum: - - success - nullable: false - type: string - required: - - status - type: object + VerificationEmailSuccess: + enum: + - success + nullable: false + type: string VerificationEmailRequest: example: userId: userId @@ -4311,6 +5370,16 @@ components: required: - userId type: object + NewUserInfo: + properties: + email: + type: string + user_id: + type: string + required: + - email + - user_id + type: object MetricValue: example: value: 0.8008281904610115 @@ -4376,7 +5445,7 @@ components: $ref: '#/components/schemas/MetricValue' type: array type: object - MetricsResponse: + MetricsData: $ref: '#/components/schemas/Record_Partial_MetricName_.MetricValue-Array_' MetricName: description: Available metrics to query over time. @@ -4391,6 +5460,158 @@ components: description: Width of time in seconds to group data. format: int32 type: integer + UserId: + description: System generated unique identifier for a user. Not guaranteed to + have a specific format. + example: auth0|646bdf96f7fb73d04c8c84db + type: string + InviteStatusPending: + properties: + type: + enum: + - pending + nullable: false + type: string + required: + - type + type: object + InviteStatusAccepted: + properties: + userId: + description: System generated unique identifier for a user. Not guaranteed + to have a specific format. + example: auth0|646bdf96f7fb73d04c8c84db + type: string + type: + enum: + - accepted + nullable: false + type: string + required: + - type + - userId + type: object + InviteStatusRejected: + properties: + userId: + description: System generated unique identifier for a user. Not guaranteed + to have a specific format. + example: auth0|646bdf96f7fb73d04c8c84db + type: string + type: + enum: + - rejected + nullable: false + type: string + required: + - type + - userId + type: object + InviteStatusRescinded: + properties: + rescindedBy: + description: System generated unique identifier for a user. Not guaranteed + to have a specific format. + example: auth0|646bdf96f7fb73d04c8c84db + type: string + userId: + description: System generated unique identifier for a user. Not guaranteed + to have a specific format. + example: auth0|646bdf96f7fb73d04c8c84db + type: string + type: + enum: + - rescinded + nullable: false + type: string + required: + - rescindedBy + - type + type: object + OrganizationInviteStatus: + anyOf: + - $ref: '#/components/schemas/InviteStatusPending' + - $ref: '#/components/schemas/InviteStatusAccepted' + - $ref: '#/components/schemas/InviteStatusRejected' + - $ref: '#/components/schemas/InviteStatusRescinded' + OrgPermission: + example: + createdAt: 2000-01-23T04:56:07.000+00:00 + invitedBy: auth0|646bdf96f7fb73d04c8c84db + userEmail: userEmail + orgId: org-6f706e83-0ec1-437a-9a46-7d4281eb2f39 + updatedAt: 2000-01-23T04:56:07.000+00:00 + status: null + properties: + updatedAt: + format: date-time + type: string + createdAt: + format: date-time + type: string + status: + $ref: '#/components/schemas/OrganizationInviteStatus' + userEmail: + type: string + invitedBy: + description: System generated unique identifier for a user. Not guaranteed + to have a specific format. + example: auth0|646bdf96f7fb73d04c8c84db + type: string + orgId: + description: System generated unique identifier for an organization. Not + guaranteed to have a specific format. + example: org-6f706e83-0ec1-437a-9a46-7d4281eb2f39 + type: string + required: + - createdAt + - invitedBy + - orgId + - status + - updatedAt + - userEmail + type: object + CreateUserInvite: + example: + userEmail: userEmail + properties: + userEmail: + type: string + required: + - userEmail + type: object + RescindUserInvite: + example: + userEmail: userEmail + properties: + userEmail: + type: string + required: + - userEmail + type: object + OrgInvitesPage: + example: + invites: + - createdAt: 2000-01-23T04:56:07.000+00:00 + invitedBy: auth0|646bdf96f7fb73d04c8c84db + userEmail: userEmail + orgId: org-6f706e83-0ec1-437a-9a46-7d4281eb2f39 + updatedAt: 2000-01-23T04:56:07.000+00:00 + status: null + - createdAt: 2000-01-23T04:56:07.000+00:00 + invitedBy: auth0|646bdf96f7fb73d04c8c84db + userEmail: userEmail + orgId: org-6f706e83-0ec1-437a-9a46-7d4281eb2f39 + updatedAt: 2000-01-23T04:56:07.000+00:00 + status: null + properties: + invites: + items: + $ref: '#/components/schemas/OrgPermission' + type: array + required: + - invites + type: object ExposedPort: description: Connection details for an active process. example: @@ -4906,6 +6127,11 @@ components: - $ref: '#/components/schemas/StartingConnectionInfo' - $ref: '#/components/schemas/ActiveConnectionInfo' description: Connection information to the default port. + RoomReadyStatus: + enum: + - active + - starting + type: string ConnectionInfoV2: description: Connection information for the default and additional ports. example: @@ -4920,7 +6146,7 @@ components: port: 72941 transportType: tcp roomId: 2swovpy1fnunu - status: active + status: null properties: additionalExposedPorts: example: @@ -4935,13 +6161,7 @@ components: exposedPort: $ref: '#/components/schemas/ExposedPort' status: - description: '`exposedPort` will only be available when the `status` of - a room is "active".' - enum: - - starting - - active - example: active - type: string + $ref: '#/components/schemas/RoomReadyStatus' roomId: description: |- Unique identifier to a game session or match. Use the default system generated ID or overwrite it with your own. @@ -4956,10 +6176,10 @@ components: - roomId - status type: object - CreateRoomResponse: + RoomConnectionData: allOf: - $ref: '#/components/schemas/ConnectionInfoV2' - - $ref: '#/components/schemas/CreateRoomResponse_allOf' + - $ref: '#/components/schemas/RoomConnectionData_allOf' UpdateRoomConfigParams: example: roomConfig: "{\"name\":\"my-room\"}" @@ -5084,7 +6304,7 @@ components: required: - name type: object - RunBuild_request: + RunBuildDeprecated_request: properties: file: format: binary @@ -5118,7 +6338,7 @@ components: required: - clientId type: object - Deployment_env_inner: + DeploymentV2_env_inner: example: name: EULA value: "TRUE" @@ -5159,7 +6379,7 @@ components: type: object ApplicationWithLatestDeploymentAndBuild_allOf_deployment: allOf: - - $ref: '#/components/schemas/Deployment' + - $ref: '#/components/schemas/DeploymentV2' - $ref: '#/components/schemas/ApplicationWithLatestDeploymentAndBuild_allOf_deployment_allOf' ApplicationWithLatestDeploymentAndBuild_allOf: properties: @@ -5167,7 +6387,7 @@ components: $ref: '#/components/schemas/ApplicationWithLatestDeploymentAndBuild_allOf_deployment' type: object example: null - DiscoveryResponse_inner: + PingEndpoints_inner: properties: port: format: double @@ -5195,7 +6415,7 @@ components: - totalRooms type: object example: null - CreateRoomResponse_allOf: + RoomConnectionData_allOf: properties: processId: description: System generated unique identifier to a runtime instance of diff --git a/java/docs/AppV1Api.md b/java/docs/AppV1Api.md index f99103a..a52b426 100644 --- a/java/docs/AppV1Api.md +++ b/java/docs/AppV1Api.md @@ -79,6 +79,7 @@ public class Example { | **201** | | - | | **401** | | - | | **422** | | - | +| **429** | | - | | **500** | | - | @@ -148,6 +149,7 @@ null (empty response body) | **204** | No content | - | | **401** | | - | | **404** | | - | +| **429** | | - | | **500** | | - | @@ -353,5 +355,6 @@ public class Example { | **401** | | - | | **404** | | - | | **422** | | - | +| **429** | | - | | **500** | | - | diff --git a/java/docs/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.md b/java/docs/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.md index 4df861d..e56c51f 100644 --- a/java/docs/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.md +++ b/java/docs/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.md @@ -7,17 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**idleTimeoutEnabled** | **Boolean** | Option to shut down processes that have had no new connections or rooms for five minutes. | [optional] | -|**env** | [**List<DeploymentEnvInner>**](DeploymentEnvInner.md) | The environment variable that our process will have access to at runtime. | | +|**idleTimeoutEnabled** | **Boolean** | Option to shut down processes that have had no new connections or rooms for five minutes. | | +|**env** | [**List<DeploymentV2EnvInner>**](DeploymentV2EnvInner.md) | The environment variable that our process will have access to at runtime. | | |**roomsPerProcess** | **Integer** | Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. | | -|**planName** | **PlanName** | | | |**additionalContainerPorts** | [**List<ContainerPort>**](ContainerPort.md) | Additional ports your server listens on. | | |**defaultContainerPort** | [**ContainerPort**](ContainerPort.md) | | | -|**transportType** | [**TransportTypeEnum**](#TransportTypeEnum) | | | -|**containerPort** | **Double** | | | |**createdAt** | **OffsetDateTime** | When the deployment was created. | | |**createdBy** | **String** | UserId or email address for the user that created the deployment. | | -|**requestedMemoryMB** | **Integer** | The amount of memory allocated to your process. | | +|**requestedMemoryMB** | **Double** | The amount of memory allocated to your process. | | |**requestedCPU** | **Double** | The number of cores allocated to your process. | | |**deploymentId** | **Integer** | System generated id for a deployment. Increments by 1. | | |**buildId** | **Integer** | System generated id for a build. Increments by 1. | | @@ -26,13 +23,3 @@ -## Enum: TransportTypeEnum - -| Name | Value | -|---- | -----| -| TCP | "tcp" | -| UDP | "udp" | -| TLS | "tls" | - - - diff --git a/java/docs/AuthV1Api.md b/java/docs/AuthV1Api.md index eccc7a3..9ceed52 100644 --- a/java/docs/AuthV1Api.md +++ b/java/docs/AuthV1Api.md @@ -11,7 +11,7 @@ All URIs are relative to *https://api.hathora.dev* # **loginAnonymous** -> LoginResponse loginAnonymous(appId) +> PlayerTokenObject loginAnonymous(appId) @@ -34,7 +34,7 @@ public class Example { AuthV1Api apiInstance = new AuthV1Api(defaultClient); String appId = "appId_example"; // String | try { - LoginResponse result = apiInstance.loginAnonymous(appId); + PlayerTokenObject result = apiInstance.loginAnonymous(appId); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AuthV1Api#loginAnonymous"); @@ -55,7 +55,7 @@ public class Example { ### Return type -[**LoginResponse**](LoginResponse.md) +[**PlayerTokenObject**](PlayerTokenObject.md) ### Authorization @@ -74,7 +74,7 @@ No authorization required # **loginGoogle** -> LoginResponse loginGoogle(appId, loginGoogleRequest) +> PlayerTokenObject loginGoogle(appId, googleIdTokenObject) @@ -96,9 +96,9 @@ public class Example { AuthV1Api apiInstance = new AuthV1Api(defaultClient); String appId = "appId_example"; // String | - LoginGoogleRequest loginGoogleRequest = new LoginGoogleRequest(); // LoginGoogleRequest | + GoogleIdTokenObject googleIdTokenObject = new GoogleIdTokenObject(); // GoogleIdTokenObject | try { - LoginResponse result = apiInstance.loginGoogle(appId, loginGoogleRequest); + PlayerTokenObject result = apiInstance.loginGoogle(appId, googleIdTokenObject); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AuthV1Api#loginGoogle"); @@ -116,11 +116,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **appId** | **String**| | | -| **loginGoogleRequest** | [**LoginGoogleRequest**](LoginGoogleRequest.md)| | | +| **googleIdTokenObject** | [**GoogleIdTokenObject**](GoogleIdTokenObject.md)| | | ### Return type -[**LoginResponse**](LoginResponse.md) +[**PlayerTokenObject**](PlayerTokenObject.md) ### Authorization @@ -140,7 +140,7 @@ No authorization required # **loginNickname** -> LoginResponse loginNickname(appId, loginNicknameRequest) +> PlayerTokenObject loginNickname(appId, nicknameObject) @@ -162,9 +162,9 @@ public class Example { AuthV1Api apiInstance = new AuthV1Api(defaultClient); String appId = "appId_example"; // String | - LoginNicknameRequest loginNicknameRequest = new LoginNicknameRequest(); // LoginNicknameRequest | + NicknameObject nicknameObject = new NicknameObject(); // NicknameObject | try { - LoginResponse result = apiInstance.loginNickname(appId, loginNicknameRequest); + PlayerTokenObject result = apiInstance.loginNickname(appId, nicknameObject); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AuthV1Api#loginNickname"); @@ -182,11 +182,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **appId** | **String**| | | -| **loginNicknameRequest** | [**LoginNicknameRequest**](LoginNicknameRequest.md)| | | +| **nicknameObject** | [**NicknameObject**](NicknameObject.md)| | | ### Return type -[**LoginResponse**](LoginResponse.md) +[**PlayerTokenObject**](PlayerTokenObject.md) ### Authorization diff --git a/java/docs/BillingV1Api.md b/java/docs/BillingV1Api.md index 30d1130..4028943 100644 --- a/java/docs/BillingV1Api.md +++ b/java/docs/BillingV1Api.md @@ -266,4 +266,5 @@ public class Example { | **200** | Ok | - | | **401** | | - | | **404** | | - | +| **429** | | - | diff --git a/java/docs/Build.md b/java/docs/Build.md index d243d79..71f3ce3 100644 --- a/java/docs/Build.md +++ b/java/docs/Build.md @@ -8,14 +8,14 @@ A build represents a game server artifact and its associated metadata. | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**buildTag** | **String** | Tag to associate an external version with a build. It is accessible via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV1/operation/GetBuildInfo). | [optional] | +|**buildTag** | **String** | Tag to associate an external version with a build. It is accessible via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV2/operation/GetBuildInfo). | [optional] | |**regionalContainerTags** | [**List<BuildRegionalContainerTagsInner>**](BuildRegionalContainerTagsInner.md) | | | -|**imageSize** | **Integer** | The size (in bytes) of the Docker image built by Hathora. | | +|**imageSize** | **Long** | The size (in bytes) of the Docker image built by Hathora. | | |**status** | **BuildStatus** | | | |**deletedAt** | **OffsetDateTime** | When the build was deleted. | | -|**finishedAt** | **OffsetDateTime** | When [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) finished executing. | | -|**startedAt** | **OffsetDateTime** | When [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) is called. | | -|**createdAt** | **OffsetDateTime** | When [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild) is called. | | +|**finishedAt** | **OffsetDateTime** | When [`RunBuild()`](https://hathora.dev/api#tag/BuildV2/operation/RunBuild) finished executing. | | +|**startedAt** | **OffsetDateTime** | When [`RunBuild()`](https://hathora.dev/api#tag/BuildV2/operation/RunBuild) is called. | | +|**createdAt** | **OffsetDateTime** | When [`CreateBuild()`](https://hathora.dev/api#tag/BuildV2/operation/CreateBuild) is called. | | |**createdBy** | **String** | UserId or email address for the user that created the build. | | |**buildId** | **Integer** | System generated id for a build. Increments by 1. | | |**appId** | **String** | System generated unique identifier for an application. | | diff --git a/java/docs/BuildV1Api.md b/java/docs/BuildV1Api.md index 3a2fa55..681f088 100644 --- a/java/docs/BuildV1Api.md +++ b/java/docs/BuildV1Api.md @@ -4,16 +4,16 @@ All URIs are relative to *https://api.hathora.dev* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**createBuild**](BuildV1Api.md#createBuild) | **POST** /builds/v1/{appId}/create | | -| [**deleteBuild**](BuildV1Api.md#deleteBuild) | **DELETE** /builds/v1/{appId}/delete/{buildId} | | -| [**getBuildInfo**](BuildV1Api.md#getBuildInfo) | **GET** /builds/v1/{appId}/info/{buildId} | | -| [**getBuilds**](BuildV1Api.md#getBuilds) | **GET** /builds/v1/{appId}/list | | -| [**runBuild**](BuildV1Api.md#runBuild) | **POST** /builds/v1/{appId}/run/{buildId} | | +| [**createBuildDeprecated**](BuildV1Api.md#createBuildDeprecated) | **POST** /builds/v1/{appId}/create | | +| [**deleteBuildDeprecated**](BuildV1Api.md#deleteBuildDeprecated) | **DELETE** /builds/v1/{appId}/delete/{buildId} | | +| [**getBuildInfoDeprecated**](BuildV1Api.md#getBuildInfoDeprecated) | **GET** /builds/v1/{appId}/info/{buildId} | | +| [**getBuildsDeprecated**](BuildV1Api.md#getBuildsDeprecated) | **GET** /builds/v1/{appId}/list | | +| [**runBuildDeprecated**](BuildV1Api.md#runBuildDeprecated) | **POST** /builds/v1/{appId}/run/{buildId} | | - -# **createBuild** -> Build createBuild(appId, createBuildParams) + +# **createBuildDeprecated** +> Build createBuildDeprecated(appId, createBuildParams) @@ -42,10 +42,10 @@ public class Example { String appId = "appId_example"; // String | CreateBuildParams createBuildParams = new CreateBuildParams(); // CreateBuildParams | try { - Build result = apiInstance.createBuild(appId, createBuildParams); + Build result = apiInstance.createBuildDeprecated(appId, createBuildParams); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling BuildV1Api#createBuild"); + System.err.println("Exception when calling BuildV1Api#createBuildDeprecated"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -81,11 +81,12 @@ public class Example { | **201** | | - | | **401** | | - | | **404** | | - | +| **429** | | - | | **500** | | - | - -# **deleteBuild** -> deleteBuild(appId, buildId) + +# **deleteBuildDeprecated** +> deleteBuildDeprecated(appId, buildId) @@ -114,9 +115,9 @@ public class Example { String appId = "appId_example"; // String | Integer buildId = 56; // Integer | try { - apiInstance.deleteBuild(appId, buildId); + apiInstance.deleteBuildDeprecated(appId, buildId); } catch (ApiException e) { - System.err.println("Exception when calling BuildV1Api#deleteBuild"); + System.err.println("Exception when calling BuildV1Api#deleteBuildDeprecated"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -155,9 +156,9 @@ null (empty response body) | **422** | | - | | **500** | | - | - -# **getBuildInfo** -> Build getBuildInfo(appId, buildId) + +# **getBuildInfoDeprecated** +> Build getBuildInfoDeprecated(appId, buildId) @@ -186,10 +187,10 @@ public class Example { String appId = "appId_example"; // String | Integer buildId = 56; // Integer | try { - Build result = apiInstance.getBuildInfo(appId, buildId); + Build result = apiInstance.getBuildInfoDeprecated(appId, buildId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling BuildV1Api#getBuildInfo"); + System.err.println("Exception when calling BuildV1Api#getBuildInfoDeprecated"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -226,9 +227,9 @@ public class Example { | **401** | | - | | **404** | | - | - -# **getBuilds** -> List<Build> getBuilds(appId) + +# **getBuildsDeprecated** +> List<Build> getBuildsDeprecated(appId) @@ -256,10 +257,10 @@ public class Example { BuildV1Api apiInstance = new BuildV1Api(defaultClient); String appId = "appId_example"; // String | try { - List result = apiInstance.getBuilds(appId); + List result = apiInstance.getBuildsDeprecated(appId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling BuildV1Api#getBuilds"); + System.err.println("Exception when calling BuildV1Api#getBuildsDeprecated"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -295,9 +296,9 @@ public class Example { | **401** | | - | | **404** | | - | - -# **runBuild** -> byte[] runBuild(appId, buildId, _file) + +# **runBuildDeprecated** +> byte[] runBuildDeprecated(appId, buildId, _file) @@ -327,10 +328,10 @@ public class Example { Integer buildId = 56; // Integer | File _file = new File("/path/to/file"); // File | try { - byte[] result = apiInstance.runBuild(appId, buildId, _file); + byte[] result = apiInstance.runBuildDeprecated(appId, buildId, _file); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling BuildV1Api#runBuild"); + System.err.println("Exception when calling BuildV1Api#runBuildDeprecated"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -367,5 +368,6 @@ public class Example { | **200** | Ok | - | | **401** | | - | | **404** | | - | +| **429** | | - | | **500** | | - | diff --git a/java/docs/BuildV2Api.md b/java/docs/BuildV2Api.md new file mode 100644 index 0000000..97f7d37 --- /dev/null +++ b/java/docs/BuildV2Api.md @@ -0,0 +1,374 @@ +# BuildV2Api + +All URIs are relative to *https://api.hathora.dev* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createBuild**](BuildV2Api.md#createBuild) | **POST** /builds/v2/{appId}/create | | +| [**deleteBuild**](BuildV2Api.md#deleteBuild) | **DELETE** /builds/v2/{appId}/delete/{buildId} | | +| [**getBuildInfo**](BuildV2Api.md#getBuildInfo) | **GET** /builds/v2/{appId}/info/{buildId} | | +| [**getBuilds**](BuildV2Api.md#getBuilds) | **GET** /builds/v2/{appId}/list | | +| [**runBuild**](BuildV2Api.md#runBuild) | **POST** /builds/v2/{appId}/run/{buildId} | | + + + +# **createBuild** +> Build createBuild(appId, createBuildParams) + + + +Creates a new [build](https://hathora.dev/docs/concepts/hathora-entities#build). Responds with a `buildId` that you must pass to [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) to build the game server artifact. You can optionally pass in a `buildTag` to associate an external version with a build. + +### Example +```java +// Import classes: +import com.hathora.client.ApiClient; +import com.hathora.client.ApiException; +import com.hathora.client.Configuration; +import com.hathora.client.auth.*; +import com.hathora.client.models.*; +import com.hathora.client.api.BuildV2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.hathora.dev"); + + // Configure HTTP bearer authorization: hathoraDevToken + HttpBearerAuth hathoraDevToken = (HttpBearerAuth) defaultClient.getAuthentication("hathoraDevToken"); + hathoraDevToken.setBearerToken("BEARER TOKEN"); + + BuildV2Api apiInstance = new BuildV2Api(defaultClient); + String appId = "appId_example"; // String | + CreateBuildParams createBuildParams = new CreateBuildParams(); // CreateBuildParams | + try { + Build result = apiInstance.createBuild(appId, createBuildParams); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BuildV2Api#createBuild"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appId** | **String**| | | +| **createBuildParams** | [**CreateBuildParams**](CreateBuildParams.md)| | | + +### Return type + +[**Build**](Build.md) + +### Authorization + +[hathoraDevToken](../README.md#hathoraDevToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | | - | +| **401** | | - | +| **404** | | - | +| **429** | | - | +| **500** | | - | + + +# **deleteBuild** +> deleteBuild(appId, buildId) + + + +Delete a [build](https://hathora.dev/docs/concepts/hathora-entities#build). All associated metadata is deleted. + +### Example +```java +// Import classes: +import com.hathora.client.ApiClient; +import com.hathora.client.ApiException; +import com.hathora.client.Configuration; +import com.hathora.client.auth.*; +import com.hathora.client.models.*; +import com.hathora.client.api.BuildV2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.hathora.dev"); + + // Configure HTTP bearer authorization: hathoraDevToken + HttpBearerAuth hathoraDevToken = (HttpBearerAuth) defaultClient.getAuthentication("hathoraDevToken"); + hathoraDevToken.setBearerToken("BEARER TOKEN"); + + BuildV2Api apiInstance = new BuildV2Api(defaultClient); + String appId = "appId_example"; // String | + Integer buildId = 56; // Integer | + try { + apiInstance.deleteBuild(appId, buildId); + } catch (ApiException e) { + System.err.println("Exception when calling BuildV2Api#deleteBuild"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appId** | **String**| | | +| **buildId** | **Integer**| | | + +### Return type + +null (empty response body) + +### Authorization + +[hathoraDevToken](../README.md#hathoraDevToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No content | - | +| **401** | | - | +| **404** | | - | +| **422** | | - | +| **429** | | - | +| **500** | | - | + + +# **getBuildInfo** +> Build getBuildInfo(appId, buildId) + + + +Get details for a [build](https://hathora.dev/docs/concepts/hathora-entities#build). + +### Example +```java +// Import classes: +import com.hathora.client.ApiClient; +import com.hathora.client.ApiException; +import com.hathora.client.Configuration; +import com.hathora.client.auth.*; +import com.hathora.client.models.*; +import com.hathora.client.api.BuildV2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.hathora.dev"); + + // Configure HTTP bearer authorization: hathoraDevToken + HttpBearerAuth hathoraDevToken = (HttpBearerAuth) defaultClient.getAuthentication("hathoraDevToken"); + hathoraDevToken.setBearerToken("BEARER TOKEN"); + + BuildV2Api apiInstance = new BuildV2Api(defaultClient); + String appId = "appId_example"; // String | + Integer buildId = 56; // Integer | + try { + Build result = apiInstance.getBuildInfo(appId, buildId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BuildV2Api#getBuildInfo"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appId** | **String**| | | +| **buildId** | **Integer**| | | + +### Return type + +[**Build**](Build.md) + +### Authorization + +[hathoraDevToken](../README.md#hathoraDevToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | +| **401** | | - | +| **404** | | - | + + +# **getBuilds** +> List<Build> getBuilds(appId) + + + +Returns an array of [builds](https://hathora.dev/docs/concepts/hathora-entities#build) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + +### Example +```java +// Import classes: +import com.hathora.client.ApiClient; +import com.hathora.client.ApiException; +import com.hathora.client.Configuration; +import com.hathora.client.auth.*; +import com.hathora.client.models.*; +import com.hathora.client.api.BuildV2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.hathora.dev"); + + // Configure HTTP bearer authorization: hathoraDevToken + HttpBearerAuth hathoraDevToken = (HttpBearerAuth) defaultClient.getAuthentication("hathoraDevToken"); + hathoraDevToken.setBearerToken("BEARER TOKEN"); + + BuildV2Api apiInstance = new BuildV2Api(defaultClient); + String appId = "appId_example"; // String | + try { + List result = apiInstance.getBuilds(appId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BuildV2Api#getBuilds"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appId** | **String**| | | + +### Return type + +[**List<Build>**](Build.md) + +### Authorization + +[hathoraDevToken](../README.md#hathoraDevToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | +| **401** | | - | +| **404** | | - | + + +# **runBuild** +> File runBuild(appId, buildId, _file) + + + +Builds a game server artifact from a tarball you provide. Pass in the `buildId` generated from [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild). + +### Example +```java +// Import classes: +import com.hathora.client.ApiClient; +import com.hathora.client.ApiException; +import com.hathora.client.Configuration; +import com.hathora.client.auth.*; +import com.hathora.client.models.*; +import com.hathora.client.api.BuildV2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.hathora.dev"); + + // Configure HTTP bearer authorization: hathoraDevToken + HttpBearerAuth hathoraDevToken = (HttpBearerAuth) defaultClient.getAuthentication("hathoraDevToken"); + hathoraDevToken.setBearerToken("BEARER TOKEN"); + + BuildV2Api apiInstance = new BuildV2Api(defaultClient); + String appId = "appId_example"; // String | + Integer buildId = 56; // Integer | + File _file = new File("/path/to/file"); // File | + try { + File result = apiInstance.runBuild(appId, buildId, _file); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BuildV2Api#runBuild"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appId** | **String**| | | +| **buildId** | **Integer**| | | +| **_file** | **File**| | | + +### Return type + +[**File**](File.md) + +### Authorization + +[hathoraDevToken](../README.md#hathoraDevToken) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/octet-stream, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | +| **401** | | - | +| **404** | | - | +| **429** | | - | +| **500** | | - | + diff --git a/java/docs/ConnectionInfoV2.md b/java/docs/ConnectionInfoV2.md index a985d1a..b01b6f5 100644 --- a/java/docs/ConnectionInfoV2.md +++ b/java/docs/ConnectionInfoV2.md @@ -10,17 +10,8 @@ Connection information for the default and additional ports. |------------ | ------------- | ------------- | -------------| |**additionalExposedPorts** | [**List<ExposedPort>**](ExposedPort.md) | | | |**exposedPort** | [**ExposedPort**](ExposedPort.md) | | [optional] | -|**status** | [**StatusEnum**](#StatusEnum) | `exposedPort` will only be available when the `status` of a room is \"active\". | | +|**status** | **RoomReadyStatus** | | | |**roomId** | **String** | Unique identifier to a game session or match. Use the default system generated ID or overwrite it with your own. Note: error will be returned if `roomId` is not globally unique. | | -## Enum: StatusEnum - -| Name | Value | -|---- | -----| -| STARTING | "starting" | -| ACTIVE | "active" | - - - diff --git a/java/docs/CreateBuildParams.md b/java/docs/CreateBuildParams.md index cd9ad69..a065f53 100644 --- a/java/docs/CreateBuildParams.md +++ b/java/docs/CreateBuildParams.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**buildTag** | **String** | Tag to associate an external version with a build. It is accessible via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV1/operation/GetBuildInfo). | [optional] | +|**buildTag** | **String** | Tag to associate an external version with a build. It is accessible via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV2/operation/GetBuildInfo). | [optional] | diff --git a/java/docs/CreateUserInvite.md b/java/docs/CreateUserInvite.md new file mode 100644 index 0000000..b705b82 --- /dev/null +++ b/java/docs/CreateUserInvite.md @@ -0,0 +1,13 @@ + + +# CreateUserInvite + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**userEmail** | **String** | | | + + + diff --git a/java/docs/Deployment.md b/java/docs/Deployment.md index 32d7adf..82a08ac 100644 --- a/java/docs/Deployment.md +++ b/java/docs/Deployment.md @@ -9,7 +9,7 @@ Deployment is a versioned configuration for a build that describes runtime behav | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**idleTimeoutEnabled** | **Boolean** | Option to shut down processes that have had no new connections or rooms for five minutes. | [optional] | -|**env** | [**List<DeploymentEnvInner>**](DeploymentEnvInner.md) | The environment variable that our process will have access to at runtime. | | +|**env** | [**List<DeploymentV2EnvInner>**](DeploymentV2EnvInner.md) | The environment variable that our process will have access to at runtime. | | |**roomsPerProcess** | **Integer** | Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. | | |**planName** | **PlanName** | | | |**additionalContainerPorts** | [**List<ContainerPort>**](ContainerPort.md) | Additional ports your server listens on. | | diff --git a/java/docs/DeploymentConfig.md b/java/docs/DeploymentConfig.md index f02e9d3..73508e0 100644 --- a/java/docs/DeploymentConfig.md +++ b/java/docs/DeploymentConfig.md @@ -9,7 +9,7 @@ User specified deployment configuration for your application at runtime. | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**idleTimeoutEnabled** | **Boolean** | Option to shut down processes that have had no new connections or rooms for five minutes. | [optional] | -|**env** | [**List<DeploymentEnvInner>**](DeploymentEnvInner.md) | The environment variable that our process will have access to at runtime. | | +|**env** | [**List<DeploymentV2EnvInner>**](DeploymentV2EnvInner.md) | The environment variable that our process will have access to at runtime. | | |**roomsPerProcess** | **Integer** | Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. | | |**planName** | **PlanName** | | | |**additionalContainerPorts** | [**List<ContainerPort>**](ContainerPort.md) | Additional ports your server listens on. | [optional] | diff --git a/java/docs/DeploymentConfigV2.md b/java/docs/DeploymentConfigV2.md new file mode 100644 index 0000000..4e9fc21 --- /dev/null +++ b/java/docs/DeploymentConfigV2.md @@ -0,0 +1,20 @@ + + +# DeploymentConfigV2 + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**idleTimeoutEnabled** | **Boolean** | Option to shut down processes that have had no new connections or rooms for five minutes. | | +|**env** | [**List<DeploymentV2EnvInner>**](DeploymentV2EnvInner.md) | The environment variable that our process will have access to at runtime. | | +|**roomsPerProcess** | **Integer** | Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. | | +|**additionalContainerPorts** | [**List<ContainerPort>**](ContainerPort.md) | Additional ports your server listens on. | [optional] | +|**transportType** | **TransportType** | | | +|**containerPort** | **Integer** | Default port the server listens on. | | +|**requestedMemoryMB** | **Double** | The amount of memory allocated to your process. | | +|**requestedCPU** | **Double** | The number of cores allocated to your process. | | + + + diff --git a/java/docs/DeploymentV1Api.md b/java/docs/DeploymentV1Api.md index e3ec0bb..42f7587 100644 --- a/java/docs/DeploymentV1Api.md +++ b/java/docs/DeploymentV1Api.md @@ -4,15 +4,15 @@ All URIs are relative to *https://api.hathora.dev* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**createDeployment**](DeploymentV1Api.md#createDeployment) | **POST** /deployments/v1/{appId}/create/{buildId} | | -| [**getDeploymentInfo**](DeploymentV1Api.md#getDeploymentInfo) | **GET** /deployments/v1/{appId}/info/{deploymentId} | | -| [**getDeployments**](DeploymentV1Api.md#getDeployments) | **GET** /deployments/v1/{appId}/list | | -| [**getLatestDeployment**](DeploymentV1Api.md#getLatestDeployment) | **GET** /deployments/v1/{appId}/latest | | +| [**createDeploymentDeprecated**](DeploymentV1Api.md#createDeploymentDeprecated) | **POST** /deployments/v1/{appId}/create/{buildId} | | +| [**getDeploymentInfoDeprecated**](DeploymentV1Api.md#getDeploymentInfoDeprecated) | **GET** /deployments/v1/{appId}/info/{deploymentId} | | +| [**getDeploymentsDeprecated**](DeploymentV1Api.md#getDeploymentsDeprecated) | **GET** /deployments/v1/{appId}/list | | +| [**getLatestDeploymentDeprecated**](DeploymentV1Api.md#getLatestDeploymentDeprecated) | **GET** /deployments/v1/{appId}/latest | | - -# **createDeployment** -> Deployment createDeployment(appId, buildId, deploymentConfig) + +# **createDeploymentDeprecated** +> Deployment createDeploymentDeprecated(appId, buildId, deploymentConfig) @@ -42,10 +42,10 @@ public class Example { Integer buildId = 56; // Integer | DeploymentConfig deploymentConfig = new DeploymentConfig(); // DeploymentConfig | try { - Deployment result = apiInstance.createDeployment(appId, buildId, deploymentConfig); + Deployment result = apiInstance.createDeploymentDeprecated(appId, buildId, deploymentConfig); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DeploymentV1Api#createDeployment"); + System.err.println("Exception when calling DeploymentV1Api#createDeploymentDeprecated"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -83,12 +83,12 @@ public class Example { | **400** | | - | | **401** | | - | | **404** | | - | -| **422** | | - | +| **429** | | - | | **500** | | - | - -# **getDeploymentInfo** -> Deployment getDeploymentInfo(appId, deploymentId) + +# **getDeploymentInfoDeprecated** +> Deployment getDeploymentInfoDeprecated(appId, deploymentId) @@ -117,10 +117,10 @@ public class Example { String appId = "appId_example"; // String | Integer deploymentId = 56; // Integer | try { - Deployment result = apiInstance.getDeploymentInfo(appId, deploymentId); + Deployment result = apiInstance.getDeploymentInfoDeprecated(appId, deploymentId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DeploymentV1Api#getDeploymentInfo"); + System.err.println("Exception when calling DeploymentV1Api#getDeploymentInfoDeprecated"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -157,9 +157,9 @@ public class Example { | **401** | | - | | **404** | | - | - -# **getDeployments** -> List<Deployment> getDeployments(appId) + +# **getDeploymentsDeprecated** +> List<Deployment> getDeploymentsDeprecated(appId) @@ -187,10 +187,10 @@ public class Example { DeploymentV1Api apiInstance = new DeploymentV1Api(defaultClient); String appId = "appId_example"; // String | try { - List result = apiInstance.getDeployments(appId); + List result = apiInstance.getDeploymentsDeprecated(appId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DeploymentV1Api#getDeployments"); + System.err.println("Exception when calling DeploymentV1Api#getDeploymentsDeprecated"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -226,9 +226,9 @@ public class Example { | **401** | | - | | **404** | | - | - -# **getLatestDeployment** -> Deployment getLatestDeployment(appId) + +# **getLatestDeploymentDeprecated** +> Deployment getLatestDeploymentDeprecated(appId) @@ -256,10 +256,10 @@ public class Example { DeploymentV1Api apiInstance = new DeploymentV1Api(defaultClient); String appId = "appId_example"; // String | try { - Deployment result = apiInstance.getLatestDeployment(appId); + Deployment result = apiInstance.getLatestDeploymentDeprecated(appId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DeploymentV1Api#getLatestDeployment"); + System.err.println("Exception when calling DeploymentV1Api#getLatestDeploymentDeprecated"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/java/docs/DeploymentV2.md b/java/docs/DeploymentV2.md new file mode 100644 index 0000000..094d481 --- /dev/null +++ b/java/docs/DeploymentV2.md @@ -0,0 +1,24 @@ + + +# DeploymentV2 + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**idleTimeoutEnabled** | **Boolean** | Option to shut down processes that have had no new connections or rooms for five minutes. | | +|**env** | [**List<DeploymentV2EnvInner>**](DeploymentV2EnvInner.md) | The environment variable that our process will have access to at runtime. | | +|**roomsPerProcess** | **Integer** | Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. | | +|**additionalContainerPorts** | [**List<ContainerPort>**](ContainerPort.md) | Additional ports your server listens on. | | +|**defaultContainerPort** | [**ContainerPort**](ContainerPort.md) | | | +|**createdAt** | **OffsetDateTime** | When the deployment was created. | | +|**createdBy** | **String** | UserId or email address for the user that created the deployment. | | +|**requestedMemoryMB** | **Double** | The amount of memory allocated to your process. | | +|**requestedCPU** | **Double** | The number of cores allocated to your process. | | +|**deploymentId** | **Integer** | System generated id for a deployment. Increments by 1. | | +|**buildId** | **Integer** | System generated id for a build. Increments by 1. | | +|**appId** | **String** | System generated unique identifier for an application. | | + + + diff --git a/java/docs/DeploymentV2Api.md b/java/docs/DeploymentV2Api.md new file mode 100644 index 0000000..1555ca4 --- /dev/null +++ b/java/docs/DeploymentV2Api.md @@ -0,0 +1,297 @@ +# DeploymentV2Api + +All URIs are relative to *https://api.hathora.dev* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createDeployment**](DeploymentV2Api.md#createDeployment) | **POST** /deployments/v2/{appId}/create/{buildId} | | +| [**getDeploymentInfo**](DeploymentV2Api.md#getDeploymentInfo) | **GET** /deployments/v2/{appId}/info/{deploymentId} | | +| [**getDeployments**](DeploymentV2Api.md#getDeployments) | **GET** /deployments/v2/{appId}/list | | +| [**getLatestDeployment**](DeploymentV2Api.md#getLatestDeployment) | **GET** /deployments/v2/{appId}/latest | | + + + +# **createDeployment** +> DeploymentV2 createDeployment(appId, buildId, deploymentConfigV2) + + + +Create a new [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). Creating a new deployment means all new rooms created will use the latest deployment configuration, but existing games in progress will not be affected. + +### Example +```java +// Import classes: +import com.hathora.client.ApiClient; +import com.hathora.client.ApiException; +import com.hathora.client.Configuration; +import com.hathora.client.auth.*; +import com.hathora.client.models.*; +import com.hathora.client.api.DeploymentV2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.hathora.dev"); + + // Configure HTTP bearer authorization: hathoraDevToken + HttpBearerAuth hathoraDevToken = (HttpBearerAuth) defaultClient.getAuthentication("hathoraDevToken"); + hathoraDevToken.setBearerToken("BEARER TOKEN"); + + DeploymentV2Api apiInstance = new DeploymentV2Api(defaultClient); + String appId = "appId_example"; // String | + Integer buildId = 56; // Integer | + DeploymentConfigV2 deploymentConfigV2 = new DeploymentConfigV2(); // DeploymentConfigV2 | + try { + DeploymentV2 result = apiInstance.createDeployment(appId, buildId, deploymentConfigV2); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DeploymentV2Api#createDeployment"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appId** | **String**| | | +| **buildId** | **Integer**| | | +| **deploymentConfigV2** | [**DeploymentConfigV2**](DeploymentConfigV2.md)| | | + +### Return type + +[**DeploymentV2**](DeploymentV2.md) + +### Authorization + +[hathoraDevToken](../README.md#hathoraDevToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | | - | +| **400** | | - | +| **401** | | - | +| **404** | | - | +| **429** | | - | +| **500** | | - | + + +# **getDeploymentInfo** +> DeploymentV2 getDeploymentInfo(appId, deploymentId) + + + +Get details for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). + +### Example +```java +// Import classes: +import com.hathora.client.ApiClient; +import com.hathora.client.ApiException; +import com.hathora.client.Configuration; +import com.hathora.client.auth.*; +import com.hathora.client.models.*; +import com.hathora.client.api.DeploymentV2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.hathora.dev"); + + // Configure HTTP bearer authorization: hathoraDevToken + HttpBearerAuth hathoraDevToken = (HttpBearerAuth) defaultClient.getAuthentication("hathoraDevToken"); + hathoraDevToken.setBearerToken("BEARER TOKEN"); + + DeploymentV2Api apiInstance = new DeploymentV2Api(defaultClient); + String appId = "appId_example"; // String | + Integer deploymentId = 56; // Integer | + try { + DeploymentV2 result = apiInstance.getDeploymentInfo(appId, deploymentId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DeploymentV2Api#getDeploymentInfo"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appId** | **String**| | | +| **deploymentId** | **Integer**| | | + +### Return type + +[**DeploymentV2**](DeploymentV2.md) + +### Authorization + +[hathoraDevToken](../README.md#hathoraDevToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | +| **401** | | - | +| **404** | | - | + + +# **getDeployments** +> List<DeploymentV2> getDeployments(appId) + + + +Returns an array of [deployments](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + +### Example +```java +// Import classes: +import com.hathora.client.ApiClient; +import com.hathora.client.ApiException; +import com.hathora.client.Configuration; +import com.hathora.client.auth.*; +import com.hathora.client.models.*; +import com.hathora.client.api.DeploymentV2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.hathora.dev"); + + // Configure HTTP bearer authorization: hathoraDevToken + HttpBearerAuth hathoraDevToken = (HttpBearerAuth) defaultClient.getAuthentication("hathoraDevToken"); + hathoraDevToken.setBearerToken("BEARER TOKEN"); + + DeploymentV2Api apiInstance = new DeploymentV2Api(defaultClient); + String appId = "appId_example"; // String | + try { + List result = apiInstance.getDeployments(appId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DeploymentV2Api#getDeployments"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appId** | **String**| | | + +### Return type + +[**List<DeploymentV2>**](DeploymentV2.md) + +### Authorization + +[hathoraDevToken](../README.md#hathoraDevToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | +| **401** | | - | +| **404** | | - | + + +# **getLatestDeployment** +> DeploymentV2 getLatestDeployment(appId) + + + +Get the latest [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + +### Example +```java +// Import classes: +import com.hathora.client.ApiClient; +import com.hathora.client.ApiException; +import com.hathora.client.Configuration; +import com.hathora.client.auth.*; +import com.hathora.client.models.*; +import com.hathora.client.api.DeploymentV2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.hathora.dev"); + + // Configure HTTP bearer authorization: hathoraDevToken + HttpBearerAuth hathoraDevToken = (HttpBearerAuth) defaultClient.getAuthentication("hathoraDevToken"); + hathoraDevToken.setBearerToken("BEARER TOKEN"); + + DeploymentV2Api apiInstance = new DeploymentV2Api(defaultClient); + String appId = "appId_example"; // String | + try { + DeploymentV2 result = apiInstance.getLatestDeployment(appId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DeploymentV2Api#getLatestDeployment"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appId** | **String**| | | + +### Return type + +[**DeploymentV2**](DeploymentV2.md) + +### Authorization + +[hathoraDevToken](../README.md#hathoraDevToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | +| **401** | | - | +| **404** | | - | + diff --git a/java/docs/DeploymentV2EnvInner.md b/java/docs/DeploymentV2EnvInner.md new file mode 100644 index 0000000..24a7164 --- /dev/null +++ b/java/docs/DeploymentV2EnvInner.md @@ -0,0 +1,14 @@ + + +# DeploymentV2EnvInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**value** | **String** | | | +|**name** | **String** | | | + + + diff --git a/java/docs/DiscoveryV1Api.md b/java/docs/DiscoveryV1Api.md index e4c845e..331e234 100644 --- a/java/docs/DiscoveryV1Api.md +++ b/java/docs/DiscoveryV1Api.md @@ -4,16 +4,16 @@ All URIs are relative to *https://api.hathora.dev* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**getPingServiceEndpoints**](DiscoveryV1Api.md#getPingServiceEndpoints) | **GET** /discovery/v1/ping | | +| [**getPingServiceEndpointsDeprecated**](DiscoveryV1Api.md#getPingServiceEndpointsDeprecated) | **GET** /discovery/v1/ping | | - -# **getPingServiceEndpoints** -> List<DiscoveryResponseInner> getPingServiceEndpoints() + +# **getPingServiceEndpointsDeprecated** +> List<PingEndpointsInner> getPingServiceEndpointsDeprecated() -Returns an array of all regions with a host and port that a client can directly ping. Open a websocket connection to `wss://<host>:<port>/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. +Returns an array of V1 regions with a host and port that a client can directly ping. Open a websocket connection to `wss://<host>:<port>/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. ### Example ```java @@ -31,10 +31,10 @@ public class Example { DiscoveryV1Api apiInstance = new DiscoveryV1Api(defaultClient); try { - List result = apiInstance.getPingServiceEndpoints(); + List result = apiInstance.getPingServiceEndpointsDeprecated(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DiscoveryV1Api#getPingServiceEndpoints"); + System.err.println("Exception when calling DiscoveryV1Api#getPingServiceEndpointsDeprecated"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -49,7 +49,7 @@ This endpoint does not need any parameter. ### Return type -[**List<DiscoveryResponseInner>**](DiscoveryResponseInner.md) +[**List<PingEndpointsInner>**](PingEndpointsInner.md) ### Authorization diff --git a/java/docs/DiscoveryV2Api.md b/java/docs/DiscoveryV2Api.md new file mode 100644 index 0000000..2557caf --- /dev/null +++ b/java/docs/DiscoveryV2Api.md @@ -0,0 +1,67 @@ +# DiscoveryV2Api + +All URIs are relative to *https://api.hathora.dev* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getPingServiceEndpoints**](DiscoveryV2Api.md#getPingServiceEndpoints) | **GET** /discovery/v2/ping | | + + + +# **getPingServiceEndpoints** +> List<PingEndpointsInner> getPingServiceEndpoints() + + + +Returns an array of all regions with a host and port that a client can directly ping. Open a websocket connection to `wss://<host>:<port>/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. + +### Example +```java +// Import classes: +import com.hathora.client.ApiClient; +import com.hathora.client.ApiException; +import com.hathora.client.Configuration; +import com.hathora.client.models.*; +import com.hathora.client.api.DiscoveryV2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.hathora.dev"); + + DiscoveryV2Api apiInstance = new DiscoveryV2Api(defaultClient); + try { + List result = apiInstance.getPingServiceEndpoints(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DiscoveryV2Api#getPingServiceEndpoints"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List<PingEndpointsInner>**](PingEndpointsInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | + diff --git a/java/docs/GoogleIdTokenObject.md b/java/docs/GoogleIdTokenObject.md new file mode 100644 index 0000000..d04a24e --- /dev/null +++ b/java/docs/GoogleIdTokenObject.md @@ -0,0 +1,13 @@ + + +# GoogleIdTokenObject + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**idToken** | **String** | A Google-signed OIDC ID token representing a player's authenticated identity. Learn how to get an `idToken` [here](https://cloud.google.com/docs/authentication/get-id-token). | | + + + diff --git a/java/docs/InviteStatusAccepted.md b/java/docs/InviteStatusAccepted.md new file mode 100644 index 0000000..f25104b --- /dev/null +++ b/java/docs/InviteStatusAccepted.md @@ -0,0 +1,22 @@ + + +# InviteStatusAccepted + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**userId** | **String** | System generated unique identifier for a user. Not guaranteed to have a specific format. | | +|**type** | [**TypeEnum**](#TypeEnum) | | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| ACCEPTED | "accepted" | + + + diff --git a/java/docs/InviteStatusPending.md b/java/docs/InviteStatusPending.md new file mode 100644 index 0000000..d782332 --- /dev/null +++ b/java/docs/InviteStatusPending.md @@ -0,0 +1,21 @@ + + +# InviteStatusPending + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| PENDING | "pending" | + + + diff --git a/java/docs/InviteStatusRejected.md b/java/docs/InviteStatusRejected.md new file mode 100644 index 0000000..3602858 --- /dev/null +++ b/java/docs/InviteStatusRejected.md @@ -0,0 +1,22 @@ + + +# InviteStatusRejected + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**userId** | **String** | System generated unique identifier for a user. Not guaranteed to have a specific format. | | +|**type** | [**TypeEnum**](#TypeEnum) | | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| REJECTED | "rejected" | + + + diff --git a/java/docs/InviteStatusRescinded.md b/java/docs/InviteStatusRescinded.md new file mode 100644 index 0000000..db17186 --- /dev/null +++ b/java/docs/InviteStatusRescinded.md @@ -0,0 +1,23 @@ + + +# InviteStatusRescinded + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**rescindedBy** | **String** | System generated unique identifier for a user. Not guaranteed to have a specific format. | | +|**userId** | **String** | System generated unique identifier for a user. Not guaranteed to have a specific format. | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| RESCINDED | "rescinded" | + + + diff --git a/java/docs/LobbyV1Api.md b/java/docs/LobbyV1Api.md index fc29ddf..1d57b59 100644 --- a/java/docs/LobbyV1Api.md +++ b/java/docs/LobbyV1Api.md @@ -57,7 +57,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **appId** | **String**| | | -| **region** | [**Region**](.md)| | [optional] [enum: Seattle, Los_Angeles, Washington_DC, Chicago, London, Frankfurt, Mumbai, Singapore, Tokyo, Sydney, Sao_Paulo] | +| **region** | [**Region**](.md)| | [optional] [enum: Seattle, Los_Angeles, Washington_DC, Chicago, London, Frankfurt, Mumbai, Singapore, Tokyo, Sydney, Sao_Paulo, Dallas] | | **local** | **Boolean**| | [optional] [default to false] | ### Return type @@ -133,7 +133,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **appId** | **String**| | | -| **region** | [**Region**](.md)| | [optional] [enum: Seattle, Los_Angeles, Washington_DC, Chicago, London, Frankfurt, Mumbai, Singapore, Tokyo, Sydney, Sao_Paulo] | +| **region** | [**Region**](.md)| | [optional] [enum: Seattle, Los_Angeles, Washington_DC, Chicago, London, Frankfurt, Mumbai, Singapore, Tokyo, Sydney, Sao_Paulo, Dallas] | | **local** | **Boolean**| | [optional] [default to false] | ### Return type @@ -205,7 +205,7 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **appId** | **String**| | | | **local** | **Boolean**| | [optional] [default to false] | -| **region** | [**Region**](.md)| | [optional] [enum: Seattle, Los_Angeles, Washington_DC, Chicago, London, Frankfurt, Mumbai, Singapore, Tokyo, Sydney, Sao_Paulo] | +| **region** | [**Region**](.md)| | [optional] [enum: Seattle, Los_Angeles, Washington_DC, Chicago, London, Frankfurt, Mumbai, Singapore, Tokyo, Sydney, Sao_Paulo, Dallas] | ### Return type diff --git a/java/docs/LobbyV2Api.md b/java/docs/LobbyV2Api.md index e8ab827..d3ce466 100644 --- a/java/docs/LobbyV2Api.md +++ b/java/docs/LobbyV2Api.md @@ -428,7 +428,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **appId** | **String**| | | -| **region** | [**Region**](.md)| Region to filter by. If omitted, active public lobbies in all regions will be returned. | [optional] [enum: Seattle, Los_Angeles, Washington_DC, Chicago, London, Frankfurt, Mumbai, Singapore, Tokyo, Sydney, Sao_Paulo] | +| **region** | [**Region**](.md)| Region to filter by. If omitted, active public lobbies in all regions will be returned. | [optional] [enum: Seattle, Los_Angeles, Washington_DC, Chicago, London, Frankfurt, Mumbai, Singapore, Tokyo, Sydney, Sao_Paulo, Dallas] | ### Return type @@ -521,4 +521,5 @@ public class Example { | **401** | | - | | **404** | | - | | **422** | | - | +| **429** | | - | diff --git a/java/docs/LobbyV3Api.md b/java/docs/LobbyV3Api.md index d335ffa..5372787 100644 --- a/java/docs/LobbyV3Api.md +++ b/java/docs/LobbyV3Api.md @@ -264,7 +264,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **appId** | **String**| | | -| **region** | [**Region**](.md)| If omitted, active public lobbies in all regions will be returned. | [optional] [enum: Seattle, Los_Angeles, Washington_DC, Chicago, London, Frankfurt, Mumbai, Singapore, Tokyo, Sydney, Sao_Paulo] | +| **region** | [**Region**](.md)| If omitted, active public lobbies in all regions will be returned. | [optional] [enum: Seattle, Los_Angeles, Washington_DC, Chicago, London, Frankfurt, Mumbai, Singapore, Tokyo, Sydney, Sao_Paulo, Dallas] | ### Return type diff --git a/java/docs/LogV1Api.md b/java/docs/LogV1Api.md index 9d0d229..bbb565f 100644 --- a/java/docs/LogV1Api.md +++ b/java/docs/LogV1Api.md @@ -12,7 +12,7 @@ All URIs are relative to *https://api.hathora.dev* # **downloadLogForProcess** -> byte[] downloadLogForProcess(appId, processId) +> File downloadLogForProcess(appId, processId) @@ -41,7 +41,7 @@ public class Example { String appId = "appId_example"; // String | String processId = "processId_example"; // String | try { - byte[] result = apiInstance.downloadLogForProcess(appId, processId); + File result = apiInstance.downloadLogForProcess(appId, processId); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling LogV1Api#downloadLogForProcess"); @@ -63,7 +63,7 @@ public class Example { ### Return type -**byte[]** +[**File**](File.md) ### Authorization @@ -72,7 +72,7 @@ public class Example { ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: text/plain, application/json + - **Accept**: application/octet-stream, application/json ### HTTP response details | Status code | Description | Response headers | @@ -85,7 +85,7 @@ public class Example { # **getLogsForApp** -> byte[] getLogsForApp(appId, follow, tailLines, region) +> File getLogsForApp(appId, follow, tailLines, region) @@ -116,7 +116,7 @@ public class Example { Integer tailLines = 56; // Integer | Region region = Region.fromValue("Seattle"); // Region | try { - byte[] result = apiInstance.getLogsForApp(appId, follow, tailLines, region); + File result = apiInstance.getLogsForApp(appId, follow, tailLines, region); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling LogV1Api#getLogsForApp"); @@ -136,11 +136,11 @@ public class Example { | **appId** | **String**| | | | **follow** | **Boolean**| | [optional] [default to false] | | **tailLines** | **Integer**| | [optional] | -| **region** | [**Region**](.md)| | [optional] [enum: Seattle, Los_Angeles, Washington_DC, Chicago, London, Frankfurt, Mumbai, Singapore, Tokyo, Sydney, Sao_Paulo] | +| **region** | [**Region**](.md)| | [optional] [enum: Seattle, Los_Angeles, Washington_DC, Chicago, London, Frankfurt, Mumbai, Singapore, Tokyo, Sydney, Sao_Paulo, Dallas] | ### Return type -**byte[]** +[**File**](File.md) ### Authorization @@ -149,7 +149,7 @@ public class Example { ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: text/plain, application/json + - **Accept**: application/octet-stream, application/json ### HTTP response details | Status code | Description | Response headers | @@ -160,7 +160,7 @@ public class Example { # **getLogsForDeployment** -> byte[] getLogsForDeployment(appId, deploymentId, follow, tailLines) +> File getLogsForDeployment(appId, deploymentId, follow, tailLines) @@ -191,7 +191,7 @@ public class Example { Boolean follow = false; // Boolean | Integer tailLines = 56; // Integer | try { - byte[] result = apiInstance.getLogsForDeployment(appId, deploymentId, follow, tailLines); + File result = apiInstance.getLogsForDeployment(appId, deploymentId, follow, tailLines); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling LogV1Api#getLogsForDeployment"); @@ -215,7 +215,7 @@ public class Example { ### Return type -**byte[]** +[**File**](File.md) ### Authorization @@ -224,7 +224,7 @@ public class Example { ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: text/plain, application/json + - **Accept**: application/octet-stream, application/json ### HTTP response details | Status code | Description | Response headers | @@ -235,7 +235,7 @@ public class Example { # **getLogsForProcess** -> byte[] getLogsForProcess(appId, processId, follow, tailLines) +> File getLogsForProcess(appId, processId, follow, tailLines) @@ -266,7 +266,7 @@ public class Example { Boolean follow = false; // Boolean | Integer tailLines = 56; // Integer | try { - byte[] result = apiInstance.getLogsForProcess(appId, processId, follow, tailLines); + File result = apiInstance.getLogsForProcess(appId, processId, follow, tailLines); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling LogV1Api#getLogsForProcess"); @@ -290,7 +290,7 @@ public class Example { ### Return type -**byte[]** +[**File**](File.md) ### Authorization @@ -299,7 +299,7 @@ public class Example { ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: text/plain, application/json + - **Accept**: application/octet-stream, application/json ### HTTP response details | Status code | Description | Response headers | diff --git a/java/docs/ManagementV1Api.md b/java/docs/ManagementV1Api.md index e78e2dd..1fc3d31 100644 --- a/java/docs/ManagementV1Api.md +++ b/java/docs/ManagementV1Api.md @@ -9,7 +9,7 @@ All URIs are relative to *https://api.hathora.dev* # **sendVerificationEmail** -> VerificationEmailResponse sendVerificationEmail(verificationEmailRequest) +> VerificationEmailSuccess sendVerificationEmail(verificationEmailRequest) @@ -30,7 +30,7 @@ public class Example { ManagementV1Api apiInstance = new ManagementV1Api(defaultClient); VerificationEmailRequest verificationEmailRequest = new VerificationEmailRequest(); // VerificationEmailRequest | try { - VerificationEmailResponse result = apiInstance.sendVerificationEmail(verificationEmailRequest); + VerificationEmailSuccess result = apiInstance.sendVerificationEmail(verificationEmailRequest); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ManagementV1Api#sendVerificationEmail"); @@ -51,7 +51,7 @@ public class Example { ### Return type -[**VerificationEmailResponse**](VerificationEmailResponse.md) +[**VerificationEmailSuccess**](VerificationEmailSuccess.md) ### Authorization @@ -67,5 +67,6 @@ No authorization required |-------------|-------------|------------------| | **200** | Ok | - | | **401** | | - | +| **429** | | - | | **500** | | - | diff --git a/java/docs/NewUserInfo.md b/java/docs/NewUserInfo.md new file mode 100644 index 0000000..3fe8996 --- /dev/null +++ b/java/docs/NewUserInfo.md @@ -0,0 +1,14 @@ + + +# NewUserInfo + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**email** | **String** | | | +|**userId** | **String** | | | + + + diff --git a/java/docs/NicknameObject.md b/java/docs/NicknameObject.md new file mode 100644 index 0000000..b687ea1 --- /dev/null +++ b/java/docs/NicknameObject.md @@ -0,0 +1,13 @@ + + +# NicknameObject + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**nickname** | **String** | An alias to represent a player. | | + + + diff --git a/java/docs/OrgInvitesPage.md b/java/docs/OrgInvitesPage.md new file mode 100644 index 0000000..8e693b9 --- /dev/null +++ b/java/docs/OrgInvitesPage.md @@ -0,0 +1,13 @@ + + +# OrgInvitesPage + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**invites** | [**List<OrgPermission>**](OrgPermission.md) | | | + + + diff --git a/java/docs/OrgPermission.md b/java/docs/OrgPermission.md new file mode 100644 index 0000000..b6af42a --- /dev/null +++ b/java/docs/OrgPermission.md @@ -0,0 +1,18 @@ + + +# OrgPermission + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**updatedAt** | **OffsetDateTime** | | | +|**createdAt** | **OffsetDateTime** | | | +|**status** | [**OrganizationInviteStatus**](OrganizationInviteStatus.md) | | | +|**userEmail** | **String** | | | +|**invitedBy** | **String** | System generated unique identifier for a user. Not guaranteed to have a specific format. | | +|**orgId** | **String** | System generated unique identifier for an organization. Not guaranteed to have a specific format. | | + + + diff --git a/java/docs/OrganizationInviteStatus.md b/java/docs/OrganizationInviteStatus.md new file mode 100644 index 0000000..d160edd --- /dev/null +++ b/java/docs/OrganizationInviteStatus.md @@ -0,0 +1,23 @@ + + +# OrganizationInviteStatus + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | | | +|**userId** | **String** | System generated unique identifier for a user. Not guaranteed to have a specific format. | | +|**rescindedBy** | **String** | System generated unique identifier for a user. Not guaranteed to have a specific format. | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| RESCINDED | "rescinded" | + + + diff --git a/java/docs/OrganizationsV1Api.md b/java/docs/OrganizationsV1Api.md new file mode 100644 index 0000000..87a8237 --- /dev/null +++ b/java/docs/OrganizationsV1Api.md @@ -0,0 +1,418 @@ +# OrganizationsV1Api + +All URIs are relative to *https://api.hathora.dev* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**acceptInvite**](OrganizationsV1Api.md#acceptInvite) | **POST** /orgs/v1/{orgId}/invites/accept | | +| [**getOrgPendingInvites**](OrganizationsV1Api.md#getOrgPendingInvites) | **GET** /orgs/v1/{orgId}/invites/pending | | +| [**getUserPendingInvites**](OrganizationsV1Api.md#getUserPendingInvites) | **GET** /orgs/v1/user/invites/pending | | +| [**inviteUser**](OrganizationsV1Api.md#inviteUser) | **PUT** /orgs/v1/{orgId}/invites | | +| [**rejectInvite**](OrganizationsV1Api.md#rejectInvite) | **POST** /orgs/v1/{orgId}/invites/reject | | +| [**rescindInvite**](OrganizationsV1Api.md#rescindInvite) | **POST** /orgs/v1/{orgId}/invites/rescind | | + + + +# **acceptInvite** +> acceptInvite(orgId) + + + +### Example +```java +// Import classes: +import com.hathora.client.ApiClient; +import com.hathora.client.ApiException; +import com.hathora.client.Configuration; +import com.hathora.client.auth.*; +import com.hathora.client.models.*; +import com.hathora.client.api.OrganizationsV1Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.hathora.dev"); + + // Configure HTTP bearer authorization: hathoraDevToken + HttpBearerAuth hathoraDevToken = (HttpBearerAuth) defaultClient.getAuthentication("hathoraDevToken"); + hathoraDevToken.setBearerToken("BEARER TOKEN"); + + OrganizationsV1Api apiInstance = new OrganizationsV1Api(defaultClient); + String orgId = "orgId_example"; // String | + try { + apiInstance.acceptInvite(orgId); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationsV1Api#acceptInvite"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orgId** | **String**| | | + +### Return type + +null (empty response body) + +### Authorization + +[hathoraDevToken](../README.md#hathoraDevToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No content | - | +| **401** | | - | +| **404** | | - | +| **429** | | - | + + +# **getOrgPendingInvites** +> OrgInvitesPage getOrgPendingInvites(orgId) + + + +### Example +```java +// Import classes: +import com.hathora.client.ApiClient; +import com.hathora.client.ApiException; +import com.hathora.client.Configuration; +import com.hathora.client.auth.*; +import com.hathora.client.models.*; +import com.hathora.client.api.OrganizationsV1Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.hathora.dev"); + + // Configure HTTP bearer authorization: hathoraDevToken + HttpBearerAuth hathoraDevToken = (HttpBearerAuth) defaultClient.getAuthentication("hathoraDevToken"); + hathoraDevToken.setBearerToken("BEARER TOKEN"); + + OrganizationsV1Api apiInstance = new OrganizationsV1Api(defaultClient); + String orgId = "orgId_example"; // String | + try { + OrgInvitesPage result = apiInstance.getOrgPendingInvites(orgId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationsV1Api#getOrgPendingInvites"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orgId** | **String**| | | + +### Return type + +[**OrgInvitesPage**](OrgInvitesPage.md) + +### Authorization + +[hathoraDevToken](../README.md#hathoraDevToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | +| **401** | | - | +| **429** | | - | + + +# **getUserPendingInvites** +> OrgInvitesPage getUserPendingInvites() + + + +### Example +```java +// Import classes: +import com.hathora.client.ApiClient; +import com.hathora.client.ApiException; +import com.hathora.client.Configuration; +import com.hathora.client.auth.*; +import com.hathora.client.models.*; +import com.hathora.client.api.OrganizationsV1Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.hathora.dev"); + + // Configure HTTP bearer authorization: hathoraDevToken + HttpBearerAuth hathoraDevToken = (HttpBearerAuth) defaultClient.getAuthentication("hathoraDevToken"); + hathoraDevToken.setBearerToken("BEARER TOKEN"); + + OrganizationsV1Api apiInstance = new OrganizationsV1Api(defaultClient); + try { + OrgInvitesPage result = apiInstance.getUserPendingInvites(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationsV1Api#getUserPendingInvites"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**OrgInvitesPage**](OrgInvitesPage.md) + +### Authorization + +[hathoraDevToken](../README.md#hathoraDevToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | +| **401** | | - | +| **429** | | - | + + +# **inviteUser** +> OrgPermission inviteUser(orgId, createUserInvite) + + + +### Example +```java +// Import classes: +import com.hathora.client.ApiClient; +import com.hathora.client.ApiException; +import com.hathora.client.Configuration; +import com.hathora.client.auth.*; +import com.hathora.client.models.*; +import com.hathora.client.api.OrganizationsV1Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.hathora.dev"); + + // Configure HTTP bearer authorization: hathoraDevToken + HttpBearerAuth hathoraDevToken = (HttpBearerAuth) defaultClient.getAuthentication("hathoraDevToken"); + hathoraDevToken.setBearerToken("BEARER TOKEN"); + + OrganizationsV1Api apiInstance = new OrganizationsV1Api(defaultClient); + String orgId = "orgId_example"; // String | + CreateUserInvite createUserInvite = new CreateUserInvite(); // CreateUserInvite | + try { + OrgPermission result = apiInstance.inviteUser(orgId, createUserInvite); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationsV1Api#inviteUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orgId** | **String**| | | +| **createUserInvite** | [**CreateUserInvite**](CreateUserInvite.md)| | | + +### Return type + +[**OrgPermission**](OrgPermission.md) + +### Authorization + +[hathoraDevToken](../README.md#hathoraDevToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ok | - | +| **401** | | - | +| **422** | | - | +| **429** | | - | + + +# **rejectInvite** +> rejectInvite(orgId) + + + +### Example +```java +// Import classes: +import com.hathora.client.ApiClient; +import com.hathora.client.ApiException; +import com.hathora.client.Configuration; +import com.hathora.client.auth.*; +import com.hathora.client.models.*; +import com.hathora.client.api.OrganizationsV1Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.hathora.dev"); + + // Configure HTTP bearer authorization: hathoraDevToken + HttpBearerAuth hathoraDevToken = (HttpBearerAuth) defaultClient.getAuthentication("hathoraDevToken"); + hathoraDevToken.setBearerToken("BEARER TOKEN"); + + OrganizationsV1Api apiInstance = new OrganizationsV1Api(defaultClient); + String orgId = "orgId_example"; // String | + try { + apiInstance.rejectInvite(orgId); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationsV1Api#rejectInvite"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orgId** | **String**| | | + +### Return type + +null (empty response body) + +### Authorization + +[hathoraDevToken](../README.md#hathoraDevToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No content | - | +| **401** | | - | +| **404** | | - | +| **429** | | - | + + +# **rescindInvite** +> rescindInvite(orgId, rescindUserInvite) + + + +### Example +```java +// Import classes: +import com.hathora.client.ApiClient; +import com.hathora.client.ApiException; +import com.hathora.client.Configuration; +import com.hathora.client.auth.*; +import com.hathora.client.models.*; +import com.hathora.client.api.OrganizationsV1Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.hathora.dev"); + + // Configure HTTP bearer authorization: hathoraDevToken + HttpBearerAuth hathoraDevToken = (HttpBearerAuth) defaultClient.getAuthentication("hathoraDevToken"); + hathoraDevToken.setBearerToken("BEARER TOKEN"); + + OrganizationsV1Api apiInstance = new OrganizationsV1Api(defaultClient); + String orgId = "orgId_example"; // String | + RescindUserInvite rescindUserInvite = new RescindUserInvite(); // RescindUserInvite | + try { + apiInstance.rescindInvite(orgId, rescindUserInvite); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationsV1Api#rescindInvite"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **orgId** | **String**| | | +| **rescindUserInvite** | [**RescindUserInvite**](RescindUserInvite.md)| | | + +### Return type + +null (empty response body) + +### Authorization + +[hathoraDevToken](../README.md#hathoraDevToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No content | - | +| **401** | | - | +| **404** | | - | +| **429** | | - | +| **500** | | - | + diff --git a/java/docs/PingEndpointsInner.md b/java/docs/PingEndpointsInner.md new file mode 100644 index 0000000..231fd13 --- /dev/null +++ b/java/docs/PingEndpointsInner.md @@ -0,0 +1,15 @@ + + +# PingEndpointsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**port** | **Double** | | | +|**host** | **String** | | | +|**region** | **Region** | | | + + + diff --git a/java/docs/PlayerTokenObject.md b/java/docs/PlayerTokenObject.md new file mode 100644 index 0000000..6e87e5e --- /dev/null +++ b/java/docs/PlayerTokenObject.md @@ -0,0 +1,13 @@ + + +# PlayerTokenObject + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**token** | **String** | A unique Hathora-signed JWT player token. | | + + + diff --git a/java/docs/ProcessesV1Api.md b/java/docs/ProcessesV1Api.md index 9985e69..2c16f75 100644 --- a/java/docs/ProcessesV1Api.md +++ b/java/docs/ProcessesV1Api.md @@ -130,7 +130,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **appId** | **String**| | | -| **region** | [**Region**](.md)| | [optional] [enum: Seattle, Los_Angeles, Washington_DC, Chicago, London, Frankfurt, Mumbai, Singapore, Tokyo, Sydney, Sao_Paulo] | +| **region** | [**Region**](.md)| | [optional] [enum: Seattle, Los_Angeles, Washington_DC, Chicago, London, Frankfurt, Mumbai, Singapore, Tokyo, Sydney, Sao_Paulo, Dallas] | ### Return type @@ -201,7 +201,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **appId** | **String**| | | -| **region** | [**Region**](.md)| | [optional] [enum: Seattle, Los_Angeles, Washington_DC, Chicago, London, Frankfurt, Mumbai, Singapore, Tokyo, Sydney, Sao_Paulo] | +| **region** | [**Region**](.md)| | [optional] [enum: Seattle, Los_Angeles, Washington_DC, Chicago, London, Frankfurt, Mumbai, Singapore, Tokyo, Sydney, Sao_Paulo, Dallas] | ### Return type diff --git a/java/docs/ProcessesV2Api.md b/java/docs/ProcessesV2Api.md index f9ab91f..fa66c0c 100644 --- a/java/docs/ProcessesV2Api.md +++ b/java/docs/ProcessesV2Api.md @@ -4,11 +4,85 @@ All URIs are relative to *https://api.hathora.dev* | Method | HTTP request | Description | |------------- | ------------- | -------------| +| [**createProcess**](ProcessesV2Api.md#createProcess) | **POST** /processes/v2/{appId}/create/{region} | | | [**getLatestProcesses**](ProcessesV2Api.md#getLatestProcesses) | **GET** /processes/v2/{appId}/list/latest | | | [**getProcessInfo**](ProcessesV2Api.md#getProcessInfo) | **GET** /processes/v2/{appId}/info/{processId} | | | [**stopProcess**](ProcessesV2Api.md#stopProcess) | **POST** /processes/v2/{appId}/stop/{processId} | | + +# **createProcess** +> ProcessV2 createProcess(appId, region) + + + +Creates a [process](https://hathora.dev/docs/concepts/hathora-entities#process) without a room. Use this to pre-allocate processes ahead of time so that subsequent room assignment via [CreateRoom()](https://hathora.dev/api#tag/RoomV2/operation/CreateRoom) can be instant. + +### Example +```java +// Import classes: +import com.hathora.client.ApiClient; +import com.hathora.client.ApiException; +import com.hathora.client.Configuration; +import com.hathora.client.auth.*; +import com.hathora.client.models.*; +import com.hathora.client.api.ProcessesV2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.hathora.dev"); + + // Configure HTTP bearer authorization: hathoraDevToken + HttpBearerAuth hathoraDevToken = (HttpBearerAuth) defaultClient.getAuthentication("hathoraDevToken"); + hathoraDevToken.setBearerToken("BEARER TOKEN"); + + ProcessesV2Api apiInstance = new ProcessesV2Api(defaultClient); + String appId = "appId_example"; // String | + Region region = Region.fromValue("Seattle"); // Region | + try { + ProcessV2 result = apiInstance.createProcess(appId, region); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ProcessesV2Api#createProcess"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **appId** | **String**| | | +| **region** | [**Region**](.md)| | [enum: Seattle, Los_Angeles, Washington_DC, Chicago, London, Frankfurt, Mumbai, Singapore, Tokyo, Sydney, Sao_Paulo, Dallas] | + +### Return type + +[**ProcessV2**](ProcessV2.md) + +### Authorization + +[hathoraDevToken](../README.md#hathoraDevToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | | - | +| **401** | | - | +| **402** | | - | +| **404** | | - | +| **500** | | - | + # **getLatestProcesses** > List<ProcessV2> getLatestProcesses(appId, status, region) diff --git a/java/docs/Region.md b/java/docs/Region.md index 3163b1a..37e9558 100644 --- a/java/docs/Region.md +++ b/java/docs/Region.md @@ -27,5 +27,7 @@ * `SAO_PAULO` (value: `"Sao_Paulo"`) +* `DALLAS` (value: `"Dallas"`) + diff --git a/java/docs/RescindUserInvite.md b/java/docs/RescindUserInvite.md new file mode 100644 index 0000000..5efde41 --- /dev/null +++ b/java/docs/RescindUserInvite.md @@ -0,0 +1,13 @@ + + +# RescindUserInvite + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**userEmail** | **String** | | | + + + diff --git a/java/docs/RoomConnectionData.md b/java/docs/RoomConnectionData.md new file mode 100644 index 0000000..a071757 --- /dev/null +++ b/java/docs/RoomConnectionData.md @@ -0,0 +1,17 @@ + + +# RoomConnectionData + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**additionalExposedPorts** | [**List<ExposedPort>**](ExposedPort.md) | | | +|**exposedPort** | [**ExposedPort**](ExposedPort.md) | | [optional] | +|**status** | **RoomReadyStatus** | | | +|**roomId** | **String** | Unique identifier to a game session or match. Use the default system generated ID or overwrite it with your own. Note: error will be returned if `roomId` is not globally unique. | | +|**processId** | **String** | System generated unique identifier to a runtime instance of your game server. | | + + + diff --git a/java/docs/RoomConnectionDataAllOf.md b/java/docs/RoomConnectionDataAllOf.md new file mode 100644 index 0000000..609b0d9 --- /dev/null +++ b/java/docs/RoomConnectionDataAllOf.md @@ -0,0 +1,13 @@ + + +# RoomConnectionDataAllOf + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**processId** | **String** | System generated unique identifier to a runtime instance of your game server. | | + + + diff --git a/java/docs/RoomReadyStatus.md b/java/docs/RoomReadyStatus.md new file mode 100644 index 0000000..1f0f45c --- /dev/null +++ b/java/docs/RoomReadyStatus.md @@ -0,0 +1,13 @@ + + +# RoomReadyStatus + +## Enum + + +* `ACTIVE` (value: `"active"`) + +* `STARTING` (value: `"starting"`) + + + diff --git a/java/docs/RoomV1Api.md b/java/docs/RoomV1Api.md index e73dfe9..bedf83f 100644 --- a/java/docs/RoomV1Api.md +++ b/java/docs/RoomV1Api.md @@ -86,6 +86,7 @@ public class Example { | **402** | | - | | **403** | | - | | **404** | | - | +| **429** | | - | | **500** | | - | @@ -155,6 +156,7 @@ null (empty response body) | **204** | No content | - | | **401** | | - | | **404** | | - | +| **429** | | - | | **500** | | - | @@ -497,5 +499,6 @@ null (empty response body) | **204** | No content | - | | **401** | | - | | **404** | | - | +| **429** | | - | | **500** | | - | diff --git a/java/docs/RoomV2Api.md b/java/docs/RoomV2Api.md index f53efb5..489c44e 100644 --- a/java/docs/RoomV2Api.md +++ b/java/docs/RoomV2Api.md @@ -10,13 +10,13 @@ All URIs are relative to *https://api.hathora.dev* | [**getConnectionInfo**](RoomV2Api.md#getConnectionInfo) | **GET** /rooms/v2/{appId}/connectioninfo/{roomId} | | | [**getInactiveRoomsForProcess**](RoomV2Api.md#getInactiveRoomsForProcess) | **GET** /rooms/v2/{appId}/list/{processId}/inactive | | | [**getRoomInfo**](RoomV2Api.md#getRoomInfo) | **GET** /rooms/v2/{appId}/info/{roomId} | | -| [**suspendRoom**](RoomV2Api.md#suspendRoom) | **POST** /rooms/v2/{appId}/suspend/{roomId} | | +| [**suspendRoomV2Deprecated**](RoomV2Api.md#suspendRoomV2Deprecated) | **POST** /rooms/v2/{appId}/suspend/{roomId} | | | [**updateRoomConfig**](RoomV2Api.md#updateRoomConfig) | **POST** /rooms/v2/{appId}/update/{roomId} | | # **createRoom** -> CreateRoomResponse createRoom(appId, createRoomParams, roomId) +> RoomConnectionData createRoom(appId, createRoomParams, roomId) @@ -46,7 +46,7 @@ public class Example { CreateRoomParams createRoomParams = new CreateRoomParams(); // CreateRoomParams | String roomId = "roomId_example"; // String | try { - CreateRoomResponse result = apiInstance.createRoom(appId, createRoomParams, roomId); + RoomConnectionData result = apiInstance.createRoom(appId, createRoomParams, roomId); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling RoomV2Api#createRoom"); @@ -69,7 +69,7 @@ public class Example { ### Return type -[**CreateRoomResponse**](CreateRoomResponse.md) +[**RoomConnectionData**](RoomConnectionData.md) ### Authorization @@ -89,6 +89,7 @@ public class Example { | **402** | | - | | **403** | | - | | **404** | | - | +| **429** | | - | | **500** | | - | @@ -160,6 +161,7 @@ null (empty response body) | **204** | No content | - | | **401** | | - | | **404** | | - | +| **429** | | - | | **500** | | - | @@ -443,9 +445,9 @@ public class Example { | **401** | | - | | **404** | | - | - -# **suspendRoom** -> suspendRoom(appId, roomId) + +# **suspendRoomV2Deprecated** +> suspendRoomV2Deprecated(appId, roomId) @@ -474,9 +476,9 @@ public class Example { String appId = "appId_example"; // String | String roomId = "roomId_example"; // String | try { - apiInstance.suspendRoom(appId, roomId); + apiInstance.suspendRoomV2Deprecated(appId, roomId); } catch (ApiException e) { - System.err.println("Exception when calling RoomV2Api#suspendRoom"); + System.err.println("Exception when calling RoomV2Api#suspendRoomV2Deprecated"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -512,6 +514,7 @@ null (empty response body) | **204** | No content | - | | **401** | | - | | **404** | | - | +| **429** | | - | | **500** | | - | @@ -583,5 +586,6 @@ null (empty response body) | **204** | No content | - | | **401** | | - | | **404** | | - | +| **429** | | - | | **500** | | - | diff --git a/java/docs/VerificationEmailSuccess.md b/java/docs/VerificationEmailSuccess.md new file mode 100644 index 0000000..ee7740c --- /dev/null +++ b/java/docs/VerificationEmailSuccess.md @@ -0,0 +1,11 @@ + + +# VerificationEmailSuccess + +## Enum + + +* `SUCCESS` (value: `"success"`) + + + diff --git a/java/src/main/java/com/hathora/client/JSON.java b/java/src/main/java/com/hathora/client/JSON.java index 2f52d25..d8a642b 100644 --- a/java/src/main/java/com/hathora/client/JSON.java +++ b/java/src/main/java/com/hathora/client/JSON.java @@ -116,39 +116,50 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.CreateOrgToken.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.CreatePrivateLobbyRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.CreateRoomParams.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.CreateRoomResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.CreateRoomResponseAllOf.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.CreateUserInvite.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.CreatedOrgToken.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.CustomerPortalUrl.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.Deployment.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.DeploymentConfig.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.DeploymentEnvInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.DiscoveryResponseInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.DeploymentConfigV2.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.DeploymentV2.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.DeploymentV2EnvInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.ExposedPort.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.GoogleIdTokenObject.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.InviteStatusAccepted.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.InviteStatusPending.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.InviteStatusRejected.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.InviteStatusRescinded.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.Invoice.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.LinkPaymentMethod.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.ListOrgTokens.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.Lobby.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.LobbyV3.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.LoginGoogleRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.LoginNicknameRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.LoginResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.MetricValue.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.NewUserInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.NicknameObject.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.OrgInvitesPage.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.OrgPermission.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.OrgToken.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.OrganizationInviteStatus.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.PartialCardCardPaymentMethodAchAchPaymentMethodLinkLinkPaymentMethod.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.PickRoomExcludeKeyofRoomAllocations.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.PingEndpointsInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.PlayerTokenObject.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.Process.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.ProcessV2.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.ProcessWithRooms.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.ProcessWithRoomsAllOf.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.RecordPartialMetricNameMetricValueArray.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.RescindUserInvite.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.Room.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.RoomAllocation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.RoomConnectionData.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.RoomConnectionDataAllOf.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.SetLobbyStateParams.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.StartingConnectionInfo.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.UpdateRoomConfigParams.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.VerificationEmailRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.VerificationEmailResponse.CustomTypeAdapterFactory()); gson = gsonBuilder.create(); } diff --git a/java/src/main/java/com/hathora/client/api/AppV1Api.java b/java/src/main/java/com/hathora/client/api/AppV1Api.java index ea44b65..bb18847 100644 --- a/java/src/main/java/com/hathora/client/api/AppV1Api.java +++ b/java/src/main/java/com/hathora/client/api/AppV1Api.java @@ -88,6 +88,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 201 - 401 - 422 - + 429 - 500 - */ @@ -159,6 +160,7 @@ private okhttp3.Call createAppValidateBeforeCall(AppConfig appConfig, final ApiC 201 - 401 - 422 - + 429 - 500 - */ @@ -179,6 +181,7 @@ public Application createApp(AppConfig appConfig) throws ApiException { 201 - 401 - 422 - + 429 - 500 - */ @@ -201,6 +204,7 @@ public ApiResponse createAppWithHttpInfo(AppConfig appConfig) throw 201 - 401 - 422 - + 429 - 500 - */ @@ -223,6 +227,7 @@ public okhttp3.Call createAppAsync(AppConfig appConfig, final ApiCallback 204 No content - 401 - 404 - + 429 - 500 - */ @@ -293,6 +298,7 @@ private okhttp3.Call deleteAppValidateBeforeCall(String appId, final ApiCallback 204 No content - 401 - 404 - + 429 - 500 - */ @@ -312,6 +318,7 @@ public void deleteApp(String appId) throws ApiException { 204 No content - 401 - 404 - + 429 - 500 - */ @@ -333,6 +340,7 @@ public ApiResponse deleteAppWithHttpInfo(String appId) throws ApiException 204 No content - 401 - 404 - + 429 - 500 - */ @@ -600,6 +608,7 @@ public okhttp3.Call getAppsAsync(final ApiCallback 401 - 404 - 422 - + 429 - 500 - */ @@ -679,6 +688,7 @@ private okhttp3.Call updateAppValidateBeforeCall(String appId, AppConfig appConf 401 - 404 - 422 - + 429 - 500 - */ @@ -701,6 +711,7 @@ public Application updateApp(String appId, AppConfig appConfig) throws ApiExcept 401 - 404 - 422 - + 429 - 500 - */ @@ -725,6 +736,7 @@ public ApiResponse updateAppWithHttpInfo(String appId, AppConfig ap 401 - 404 - 422 - + 429 - 500 - */ diff --git a/java/src/main/java/com/hathora/client/api/AuthV1Api.java b/java/src/main/java/com/hathora/client/api/AuthV1Api.java index e751d73..f9b2393 100644 --- a/java/src/main/java/com/hathora/client/api/AuthV1Api.java +++ b/java/src/main/java/com/hathora/client/api/AuthV1Api.java @@ -28,9 +28,9 @@ import com.hathora.client.model.ApiError; -import com.hathora.client.model.LoginGoogleRequest; -import com.hathora.client.model.LoginNicknameRequest; -import com.hathora.client.model.LoginResponse; +import com.hathora.client.model.GoogleIdTokenObject; +import com.hathora.client.model.NicknameObject; +import com.hathora.client.model.PlayerTokenObject; import java.lang.reflect.Type; import java.util.ArrayList; @@ -149,7 +149,7 @@ private okhttp3.Call loginAnonymousValidateBeforeCall(String appId, final ApiCal * * Returns a unique player token for an anonymous user. * @param appId (required) - * @return LoginResponse + * @return PlayerTokenObject * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -158,8 +158,8 @@ private okhttp3.Call loginAnonymousValidateBeforeCall(String appId, final ApiCal
404 -
*/ - public LoginResponse loginAnonymous(String appId) throws ApiException { - ApiResponse localVarResp = loginAnonymousWithHttpInfo(appId); + public PlayerTokenObject loginAnonymous(String appId) throws ApiException { + ApiResponse localVarResp = loginAnonymousWithHttpInfo(appId); return localVarResp.getData(); } @@ -167,7 +167,7 @@ public LoginResponse loginAnonymous(String appId) throws ApiException { * * Returns a unique player token for an anonymous user. * @param appId (required) - * @return ApiResponse<LoginResponse> + * @return ApiResponse<PlayerTokenObject> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -176,9 +176,9 @@ public LoginResponse loginAnonymous(String appId) throws ApiException {
404 -
*/ - public ApiResponse loginAnonymousWithHttpInfo(String appId) throws ApiException { + public ApiResponse loginAnonymousWithHttpInfo(String appId) throws ApiException { okhttp3.Call localVarCall = loginAnonymousValidateBeforeCall(appId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -196,17 +196,17 @@ public ApiResponse loginAnonymousWithHttpInfo(String appId) throw 404 - */ - public okhttp3.Call loginAnonymousAsync(String appId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call loginAnonymousAsync(String appId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = loginAnonymousValidateBeforeCall(appId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for loginGoogle * @param appId (required) - * @param loginGoogleRequest (required) + * @param googleIdTokenObject (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -218,7 +218,7 @@ public okhttp3.Call loginAnonymousAsync(String appId, final ApiCallback 404 - */ - public okhttp3.Call loginGoogleCall(String appId, LoginGoogleRequest loginGoogleRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call loginGoogleCall(String appId, GoogleIdTokenObject googleIdTokenObject, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -232,7 +232,7 @@ public okhttp3.Call loginGoogleCall(String appId, LoginGoogleRequest loginGoogle basePath = null; } - Object localVarPostBody = loginGoogleRequest; + Object localVarPostBody = googleIdTokenObject; // create path and map variables String localVarPath = "/auth/v1/{appId}/login/google" @@ -265,18 +265,18 @@ public okhttp3.Call loginGoogleCall(String appId, LoginGoogleRequest loginGoogle } @SuppressWarnings("rawtypes") - private okhttp3.Call loginGoogleValidateBeforeCall(String appId, LoginGoogleRequest loginGoogleRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call loginGoogleValidateBeforeCall(String appId, GoogleIdTokenObject googleIdTokenObject, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { throw new ApiException("Missing the required parameter 'appId' when calling loginGoogle(Async)"); } - // verify the required parameter 'loginGoogleRequest' is set - if (loginGoogleRequest == null) { - throw new ApiException("Missing the required parameter 'loginGoogleRequest' when calling loginGoogle(Async)"); + // verify the required parameter 'googleIdTokenObject' is set + if (googleIdTokenObject == null) { + throw new ApiException("Missing the required parameter 'googleIdTokenObject' when calling loginGoogle(Async)"); } - return loginGoogleCall(appId, loginGoogleRequest, _callback); + return loginGoogleCall(appId, googleIdTokenObject, _callback); } @@ -284,8 +284,8 @@ private okhttp3.Call loginGoogleValidateBeforeCall(String appId, LoginGoogleRequ * * Returns a unique player token using a Google-signed OIDC `idToken`. * @param appId (required) - * @param loginGoogleRequest (required) - * @return LoginResponse + * @param googleIdTokenObject (required) + * @return PlayerTokenObject * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -295,8 +295,8 @@ private okhttp3.Call loginGoogleValidateBeforeCall(String appId, LoginGoogleRequ
404 -
*/ - public LoginResponse loginGoogle(String appId, LoginGoogleRequest loginGoogleRequest) throws ApiException { - ApiResponse localVarResp = loginGoogleWithHttpInfo(appId, loginGoogleRequest); + public PlayerTokenObject loginGoogle(String appId, GoogleIdTokenObject googleIdTokenObject) throws ApiException { + ApiResponse localVarResp = loginGoogleWithHttpInfo(appId, googleIdTokenObject); return localVarResp.getData(); } @@ -304,8 +304,8 @@ public LoginResponse loginGoogle(String appId, LoginGoogleRequest loginGoogleReq * * Returns a unique player token using a Google-signed OIDC `idToken`. * @param appId (required) - * @param loginGoogleRequest (required) - * @return ApiResponse<LoginResponse> + * @param googleIdTokenObject (required) + * @return ApiResponse<PlayerTokenObject> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -315,9 +315,9 @@ public LoginResponse loginGoogle(String appId, LoginGoogleRequest loginGoogleReq
404 -
*/ - public ApiResponse loginGoogleWithHttpInfo(String appId, LoginGoogleRequest loginGoogleRequest) throws ApiException { - okhttp3.Call localVarCall = loginGoogleValidateBeforeCall(appId, loginGoogleRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse loginGoogleWithHttpInfo(String appId, GoogleIdTokenObject googleIdTokenObject) throws ApiException { + okhttp3.Call localVarCall = loginGoogleValidateBeforeCall(appId, googleIdTokenObject, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -325,7 +325,7 @@ public ApiResponse loginGoogleWithHttpInfo(String appId, LoginGoo * (asynchronously) * Returns a unique player token using a Google-signed OIDC `idToken`. * @param appId (required) - * @param loginGoogleRequest (required) + * @param googleIdTokenObject (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -337,17 +337,17 @@ public ApiResponse loginGoogleWithHttpInfo(String appId, LoginGoo 404 - */ - public okhttp3.Call loginGoogleAsync(String appId, LoginGoogleRequest loginGoogleRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call loginGoogleAsync(String appId, GoogleIdTokenObject googleIdTokenObject, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = loginGoogleValidateBeforeCall(appId, loginGoogleRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = loginGoogleValidateBeforeCall(appId, googleIdTokenObject, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for loginNickname * @param appId (required) - * @param loginNicknameRequest (required) + * @param nicknameObject (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -358,7 +358,7 @@ public okhttp3.Call loginGoogleAsync(String appId, LoginGoogleRequest loginGoogl 404 - */ - public okhttp3.Call loginNicknameCall(String appId, LoginNicknameRequest loginNicknameRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call loginNicknameCall(String appId, NicknameObject nicknameObject, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -372,7 +372,7 @@ public okhttp3.Call loginNicknameCall(String appId, LoginNicknameRequest loginNi basePath = null; } - Object localVarPostBody = loginNicknameRequest; + Object localVarPostBody = nicknameObject; // create path and map variables String localVarPath = "/auth/v1/{appId}/login/nickname" @@ -405,18 +405,18 @@ public okhttp3.Call loginNicknameCall(String appId, LoginNicknameRequest loginNi } @SuppressWarnings("rawtypes") - private okhttp3.Call loginNicknameValidateBeforeCall(String appId, LoginNicknameRequest loginNicknameRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call loginNicknameValidateBeforeCall(String appId, NicknameObject nicknameObject, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { throw new ApiException("Missing the required parameter 'appId' when calling loginNickname(Async)"); } - // verify the required parameter 'loginNicknameRequest' is set - if (loginNicknameRequest == null) { - throw new ApiException("Missing the required parameter 'loginNicknameRequest' when calling loginNickname(Async)"); + // verify the required parameter 'nicknameObject' is set + if (nicknameObject == null) { + throw new ApiException("Missing the required parameter 'nicknameObject' when calling loginNickname(Async)"); } - return loginNicknameCall(appId, loginNicknameRequest, _callback); + return loginNicknameCall(appId, nicknameObject, _callback); } @@ -424,8 +424,8 @@ private okhttp3.Call loginNicknameValidateBeforeCall(String appId, LoginNickname * * Returns a unique player token with a specified nickname for a user. * @param appId (required) - * @param loginNicknameRequest (required) - * @return LoginResponse + * @param nicknameObject (required) + * @return PlayerTokenObject * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -434,8 +434,8 @@ private okhttp3.Call loginNicknameValidateBeforeCall(String appId, LoginNickname
404 -
*/ - public LoginResponse loginNickname(String appId, LoginNicknameRequest loginNicknameRequest) throws ApiException { - ApiResponse localVarResp = loginNicknameWithHttpInfo(appId, loginNicknameRequest); + public PlayerTokenObject loginNickname(String appId, NicknameObject nicknameObject) throws ApiException { + ApiResponse localVarResp = loginNicknameWithHttpInfo(appId, nicknameObject); return localVarResp.getData(); } @@ -443,8 +443,8 @@ public LoginResponse loginNickname(String appId, LoginNicknameRequest loginNickn * * Returns a unique player token with a specified nickname for a user. * @param appId (required) - * @param loginNicknameRequest (required) - * @return ApiResponse<LoginResponse> + * @param nicknameObject (required) + * @return ApiResponse<PlayerTokenObject> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -453,9 +453,9 @@ public LoginResponse loginNickname(String appId, LoginNicknameRequest loginNickn
404 -
*/ - public ApiResponse loginNicknameWithHttpInfo(String appId, LoginNicknameRequest loginNicknameRequest) throws ApiException { - okhttp3.Call localVarCall = loginNicknameValidateBeforeCall(appId, loginNicknameRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse loginNicknameWithHttpInfo(String appId, NicknameObject nicknameObject) throws ApiException { + okhttp3.Call localVarCall = loginNicknameValidateBeforeCall(appId, nicknameObject, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -463,7 +463,7 @@ public ApiResponse loginNicknameWithHttpInfo(String appId, LoginN * (asynchronously) * Returns a unique player token with a specified nickname for a user. * @param appId (required) - * @param loginNicknameRequest (required) + * @param nicknameObject (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -474,10 +474,10 @@ public ApiResponse loginNicknameWithHttpInfo(String appId, LoginN 404 - */ - public okhttp3.Call loginNicknameAsync(String appId, LoginNicknameRequest loginNicknameRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call loginNicknameAsync(String appId, NicknameObject nicknameObject, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = loginNicknameValidateBeforeCall(appId, loginNicknameRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = loginNicknameValidateBeforeCall(appId, nicknameObject, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/java/src/main/java/com/hathora/client/api/BillingV1Api.java b/java/src/main/java/com/hathora/client/api/BillingV1Api.java index 02c4ee7..37d56ce 100644 --- a/java/src/main/java/com/hathora/client/api/BillingV1Api.java +++ b/java/src/main/java/com/hathora/client/api/BillingV1Api.java @@ -455,6 +455,7 @@ public okhttp3.Call getPaymentMethodAsync(final ApiCallback 200 Ok - 401 - 404 - + 429 - */ public okhttp3.Call initStripeCustomerPortalUrlCall(CustomerPortalUrl customerPortalUrl, final ApiCallback _callback) throws ApiException { @@ -525,6 +526,7 @@ private okhttp3.Call initStripeCustomerPortalUrlValidateBeforeCall(CustomerPorta 200 Ok - 401 - 404 - + 429 - */ public String initStripeCustomerPortalUrl(CustomerPortalUrl customerPortalUrl) throws ApiException { @@ -544,6 +546,7 @@ public String initStripeCustomerPortalUrl(CustomerPortalUrl customerPortalUrl) t 200 Ok - 401 - 404 - + 429 - */ public ApiResponse initStripeCustomerPortalUrlWithHttpInfo(CustomerPortalUrl customerPortalUrl) throws ApiException { @@ -565,6 +568,7 @@ public ApiResponse initStripeCustomerPortalUrlWithHttpInfo(CustomerPorta 200 Ok - 401 - 404 - + 429 - */ public okhttp3.Call initStripeCustomerPortalUrlAsync(CustomerPortalUrl customerPortalUrl, final ApiCallback _callback) throws ApiException { diff --git a/java/src/main/java/com/hathora/client/api/BuildV1Api.java b/java/src/main/java/com/hathora/client/api/BuildV1Api.java index 4356081..f175fdd 100644 --- a/java/src/main/java/com/hathora/client/api/BuildV1Api.java +++ b/java/src/main/java/com/hathora/client/api/BuildV1Api.java @@ -77,7 +77,7 @@ public void setCustomBaseUrl(String customBaseUrl) { } /** - * Build call for createBuild + * Build call for createBuildDeprecated * @param appId (required) * @param createBuildParams (required) * @param _callback Callback for upload/download progress @@ -89,10 +89,13 @@ public void setCustomBaseUrl(String customBaseUrl) { 201 - 401 - 404 - + 429 - 500 - + * @deprecated */ - public okhttp3.Call createBuildCall(String appId, CreateBuildParams createBuildParams, final ApiCallback _callback) throws ApiException { + @Deprecated + public okhttp3.Call createBuildDeprecatedCall(String appId, CreateBuildParams createBuildParams, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -138,19 +141,20 @@ public okhttp3.Call createBuildCall(String appId, CreateBuildParams createBuildP return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } + @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call createBuildValidateBeforeCall(String appId, CreateBuildParams createBuildParams, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createBuildDeprecatedValidateBeforeCall(String appId, CreateBuildParams createBuildParams, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling createBuild(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling createBuildDeprecated(Async)"); } // verify the required parameter 'createBuildParams' is set if (createBuildParams == null) { - throw new ApiException("Missing the required parameter 'createBuildParams' when calling createBuild(Async)"); + throw new ApiException("Missing the required parameter 'createBuildParams' when calling createBuildDeprecated(Async)"); } - return createBuildCall(appId, createBuildParams, _callback); + return createBuildDeprecatedCall(appId, createBuildParams, _callback); } @@ -167,11 +171,14 @@ private okhttp3.Call createBuildValidateBeforeCall(String appId, CreateBuildPara 201 - 401 - 404 - + 429 - 500 - + * @deprecated */ - public Build createBuild(String appId, CreateBuildParams createBuildParams) throws ApiException { - ApiResponse localVarResp = createBuildWithHttpInfo(appId, createBuildParams); + @Deprecated + public Build createBuildDeprecated(String appId, CreateBuildParams createBuildParams) throws ApiException { + ApiResponse localVarResp = createBuildDeprecatedWithHttpInfo(appId, createBuildParams); return localVarResp.getData(); } @@ -188,11 +195,14 @@ public Build createBuild(String appId, CreateBuildParams createBuildParams) thro 201 - 401 - 404 - + 429 - 500 - + * @deprecated */ - public ApiResponse createBuildWithHttpInfo(String appId, CreateBuildParams createBuildParams) throws ApiException { - okhttp3.Call localVarCall = createBuildValidateBeforeCall(appId, createBuildParams, null); + @Deprecated + public ApiResponse createBuildDeprecatedWithHttpInfo(String appId, CreateBuildParams createBuildParams) throws ApiException { + okhttp3.Call localVarCall = createBuildDeprecatedValidateBeforeCall(appId, createBuildParams, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -211,18 +221,21 @@ public ApiResponse createBuildWithHttpInfo(String appId, CreateBuildParam 201 - 401 - 404 - + 429 - 500 - + * @deprecated */ - public okhttp3.Call createBuildAsync(String appId, CreateBuildParams createBuildParams, final ApiCallback _callback) throws ApiException { + @Deprecated + public okhttp3.Call createBuildDeprecatedAsync(String appId, CreateBuildParams createBuildParams, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = createBuildValidateBeforeCall(appId, createBuildParams, _callback); + okhttp3.Call localVarCall = createBuildDeprecatedValidateBeforeCall(appId, createBuildParams, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for deleteBuild + * Build call for deleteBuildDeprecated * @param appId (required) * @param buildId (required) * @param _callback Callback for upload/download progress @@ -237,8 +250,10 @@ public okhttp3.Call createBuildAsync(String appId, CreateBuildParams createBuild 422 - 500 - + * @deprecated */ - public okhttp3.Call deleteBuildCall(String appId, Integer buildId, final ApiCallback _callback) throws ApiException { + @Deprecated + public okhttp3.Call deleteBuildDeprecatedCall(String appId, Integer buildId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -284,19 +299,20 @@ public okhttp3.Call deleteBuildCall(String appId, Integer buildId, final ApiCall return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } + @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call deleteBuildValidateBeforeCall(String appId, Integer buildId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteBuildDeprecatedValidateBeforeCall(String appId, Integer buildId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling deleteBuild(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling deleteBuildDeprecated(Async)"); } // verify the required parameter 'buildId' is set if (buildId == null) { - throw new ApiException("Missing the required parameter 'buildId' when calling deleteBuild(Async)"); + throw new ApiException("Missing the required parameter 'buildId' when calling deleteBuildDeprecated(Async)"); } - return deleteBuildCall(appId, buildId, _callback); + return deleteBuildDeprecatedCall(appId, buildId, _callback); } @@ -315,9 +331,11 @@ private okhttp3.Call deleteBuildValidateBeforeCall(String appId, Integer buildId 422 - 500 - + * @deprecated */ - public void deleteBuild(String appId, Integer buildId) throws ApiException { - deleteBuildWithHttpInfo(appId, buildId); + @Deprecated + public void deleteBuildDeprecated(String appId, Integer buildId) throws ApiException { + deleteBuildDeprecatedWithHttpInfo(appId, buildId); } /** @@ -336,9 +354,11 @@ public void deleteBuild(String appId, Integer buildId) throws ApiException { 422 - 500 - + * @deprecated */ - public ApiResponse deleteBuildWithHttpInfo(String appId, Integer buildId) throws ApiException { - okhttp3.Call localVarCall = deleteBuildValidateBeforeCall(appId, buildId, null); + @Deprecated + public ApiResponse deleteBuildDeprecatedWithHttpInfo(String appId, Integer buildId) throws ApiException { + okhttp3.Call localVarCall = deleteBuildDeprecatedValidateBeforeCall(appId, buildId, null); return localVarApiClient.execute(localVarCall); } @@ -359,15 +379,17 @@ public ApiResponse deleteBuildWithHttpInfo(String appId, Integer buildId) 422 - 500 - + * @deprecated */ - public okhttp3.Call deleteBuildAsync(String appId, Integer buildId, final ApiCallback _callback) throws ApiException { + @Deprecated + public okhttp3.Call deleteBuildDeprecatedAsync(String appId, Integer buildId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = deleteBuildValidateBeforeCall(appId, buildId, _callback); + okhttp3.Call localVarCall = deleteBuildDeprecatedValidateBeforeCall(appId, buildId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** - * Build call for getBuildInfo + * Build call for getBuildInfoDeprecated * @param appId (required) * @param buildId (required) * @param _callback Callback for upload/download progress @@ -380,8 +402,10 @@ public okhttp3.Call deleteBuildAsync(String appId, Integer buildId, final ApiCal 401 - 404 - + * @deprecated */ - public okhttp3.Call getBuildInfoCall(String appId, Integer buildId, final ApiCallback _callback) throws ApiException { + @Deprecated + public okhttp3.Call getBuildInfoDeprecatedCall(String appId, Integer buildId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -427,19 +451,20 @@ public okhttp3.Call getBuildInfoCall(String appId, Integer buildId, final ApiCal return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } + @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call getBuildInfoValidateBeforeCall(String appId, Integer buildId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getBuildInfoDeprecatedValidateBeforeCall(String appId, Integer buildId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling getBuildInfo(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling getBuildInfoDeprecated(Async)"); } // verify the required parameter 'buildId' is set if (buildId == null) { - throw new ApiException("Missing the required parameter 'buildId' when calling getBuildInfo(Async)"); + throw new ApiException("Missing the required parameter 'buildId' when calling getBuildInfoDeprecated(Async)"); } - return getBuildInfoCall(appId, buildId, _callback); + return getBuildInfoDeprecatedCall(appId, buildId, _callback); } @@ -457,9 +482,11 @@ private okhttp3.Call getBuildInfoValidateBeforeCall(String appId, Integer buildI 401 - 404 - + * @deprecated */ - public Build getBuildInfo(String appId, Integer buildId) throws ApiException { - ApiResponse localVarResp = getBuildInfoWithHttpInfo(appId, buildId); + @Deprecated + public Build getBuildInfoDeprecated(String appId, Integer buildId) throws ApiException { + ApiResponse localVarResp = getBuildInfoDeprecatedWithHttpInfo(appId, buildId); return localVarResp.getData(); } @@ -477,9 +504,11 @@ public Build getBuildInfo(String appId, Integer buildId) throws ApiException { 401 - 404 - + * @deprecated */ - public ApiResponse getBuildInfoWithHttpInfo(String appId, Integer buildId) throws ApiException { - okhttp3.Call localVarCall = getBuildInfoValidateBeforeCall(appId, buildId, null); + @Deprecated + public ApiResponse getBuildInfoDeprecatedWithHttpInfo(String appId, Integer buildId) throws ApiException { + okhttp3.Call localVarCall = getBuildInfoDeprecatedValidateBeforeCall(appId, buildId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -499,16 +528,18 @@ public ApiResponse getBuildInfoWithHttpInfo(String appId, Integer buildId 401 - 404 - + * @deprecated */ - public okhttp3.Call getBuildInfoAsync(String appId, Integer buildId, final ApiCallback _callback) throws ApiException { + @Deprecated + public okhttp3.Call getBuildInfoDeprecatedAsync(String appId, Integer buildId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getBuildInfoValidateBeforeCall(appId, buildId, _callback); + okhttp3.Call localVarCall = getBuildInfoDeprecatedValidateBeforeCall(appId, buildId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getBuilds + * Build call for getBuildsDeprecated * @param appId (required) * @param _callback Callback for upload/download progress * @return Call to execute @@ -520,8 +551,10 @@ public okhttp3.Call getBuildInfoAsync(String appId, Integer buildId, final ApiCa 401 - 404 - + * @deprecated */ - public okhttp3.Call getBuildsCall(String appId, final ApiCallback _callback) throws ApiException { + @Deprecated + public okhttp3.Call getBuildsDeprecatedCall(String appId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -566,14 +599,15 @@ public okhttp3.Call getBuildsCall(String appId, final ApiCallback _callback) thr return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } + @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call getBuildsValidateBeforeCall(String appId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getBuildsDeprecatedValidateBeforeCall(String appId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling getBuilds(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling getBuildsDeprecated(Async)"); } - return getBuildsCall(appId, _callback); + return getBuildsDeprecatedCall(appId, _callback); } @@ -590,9 +624,11 @@ private okhttp3.Call getBuildsValidateBeforeCall(String appId, final ApiCallback 401 - 404 - + * @deprecated */ - public List getBuilds(String appId) throws ApiException { - ApiResponse> localVarResp = getBuildsWithHttpInfo(appId); + @Deprecated + public List getBuildsDeprecated(String appId) throws ApiException { + ApiResponse> localVarResp = getBuildsDeprecatedWithHttpInfo(appId); return localVarResp.getData(); } @@ -609,9 +645,11 @@ public List getBuilds(String appId) throws ApiException { 401 - 404 - + * @deprecated */ - public ApiResponse> getBuildsWithHttpInfo(String appId) throws ApiException { - okhttp3.Call localVarCall = getBuildsValidateBeforeCall(appId, null); + @Deprecated + public ApiResponse> getBuildsDeprecatedWithHttpInfo(String appId) throws ApiException { + okhttp3.Call localVarCall = getBuildsDeprecatedValidateBeforeCall(appId, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -630,16 +668,18 @@ public ApiResponse> getBuildsWithHttpInfo(String appId) throws ApiEx 401 - 404 - + * @deprecated */ - public okhttp3.Call getBuildsAsync(String appId, final ApiCallback> _callback) throws ApiException { + @Deprecated + public okhttp3.Call getBuildsDeprecatedAsync(String appId, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = getBuildsValidateBeforeCall(appId, _callback); + okhttp3.Call localVarCall = getBuildsDeprecatedValidateBeforeCall(appId, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for runBuild + * Build call for runBuildDeprecated * @param appId (required) * @param buildId (required) * @param _file (required) @@ -652,10 +692,13 @@ public okhttp3.Call getBuildsAsync(String appId, final ApiCallback> 200 Ok - 401 - 404 - + 429 - 500 - + * @deprecated */ - public okhttp3.Call runBuildCall(String appId, Integer buildId, File _file, final ApiCallback _callback) throws ApiException { + @Deprecated + public okhttp3.Call runBuildDeprecatedCall(String appId, Integer buildId, File _file, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -707,24 +750,25 @@ public okhttp3.Call runBuildCall(String appId, Integer buildId, File _file, fina return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } + @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call runBuildValidateBeforeCall(String appId, Integer buildId, File _file, final ApiCallback _callback) throws ApiException { + private okhttp3.Call runBuildDeprecatedValidateBeforeCall(String appId, Integer buildId, File _file, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling runBuild(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling runBuildDeprecated(Async)"); } // verify the required parameter 'buildId' is set if (buildId == null) { - throw new ApiException("Missing the required parameter 'buildId' when calling runBuild(Async)"); + throw new ApiException("Missing the required parameter 'buildId' when calling runBuildDeprecated(Async)"); } // verify the required parameter '_file' is set if (_file == null) { - throw new ApiException("Missing the required parameter '_file' when calling runBuild(Async)"); + throw new ApiException("Missing the required parameter '_file' when calling runBuildDeprecated(Async)"); } - return runBuildCall(appId, buildId, _file, _callback); + return runBuildDeprecatedCall(appId, buildId, _file, _callback); } @@ -742,11 +786,14 @@ private okhttp3.Call runBuildValidateBeforeCall(String appId, Integer buildId, F 200 Ok - 401 - 404 - + 429 - 500 - + * @deprecated */ - public byte[] runBuild(String appId, Integer buildId, File _file) throws ApiException { - ApiResponse localVarResp = runBuildWithHttpInfo(appId, buildId, _file); + @Deprecated + public byte[] runBuildDeprecated(String appId, Integer buildId, File _file) throws ApiException { + ApiResponse localVarResp = runBuildDeprecatedWithHttpInfo(appId, buildId, _file); return localVarResp.getData(); } @@ -764,11 +811,14 @@ public byte[] runBuild(String appId, Integer buildId, File _file) throws ApiExce 200 Ok - 401 - 404 - + 429 - 500 - + * @deprecated */ - public ApiResponse runBuildWithHttpInfo(String appId, Integer buildId, File _file) throws ApiException { - okhttp3.Call localVarCall = runBuildValidateBeforeCall(appId, buildId, _file, null); + @Deprecated + public ApiResponse runBuildDeprecatedWithHttpInfo(String appId, Integer buildId, File _file) throws ApiException { + okhttp3.Call localVarCall = runBuildDeprecatedValidateBeforeCall(appId, buildId, _file, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -788,12 +838,15 @@ public ApiResponse runBuildWithHttpInfo(String appId, Integer buildId, F 200 Ok - 401 - 404 - + 429 - 500 - + * @deprecated */ - public okhttp3.Call runBuildAsync(String appId, Integer buildId, File _file, final ApiCallback _callback) throws ApiException { + @Deprecated + public okhttp3.Call runBuildDeprecatedAsync(String appId, Integer buildId, File _file, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = runBuildValidateBeforeCall(appId, buildId, _file, _callback); + okhttp3.Call localVarCall = runBuildDeprecatedValidateBeforeCall(appId, buildId, _file, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/java/src/main/java/com/hathora/client/api/BuildV2Api.java b/java/src/main/java/com/hathora/client/api/BuildV2Api.java new file mode 100644 index 0000000..fb42e4a --- /dev/null +++ b/java/src/main/java/com/hathora/client/api/BuildV2Api.java @@ -0,0 +1,813 @@ +/* + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.hathora.client.api; + +import com.hathora.client.ApiCallback; +import com.hathora.client.ApiClient; +import com.hathora.client.ApiException; +import com.hathora.client.ApiResponse; +import com.hathora.client.Configuration; +import com.hathora.client.Pair; +import com.hathora.client.ProgressRequestBody; +import com.hathora.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.hathora.client.model.ApiError; +import com.hathora.client.model.Build; +import com.hathora.client.model.CreateBuildParams; +import java.io.File; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.ws.rs.core.GenericType; + +public class BuildV2Api { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public BuildV2Api() { + this(Configuration.getDefaultApiClient()); + } + + public BuildV2Api(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for createBuild + * @param appId (required) + * @param createBuildParams (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
201 -
401 -
404 -
429 -
500 -
+ */ + public okhttp3.Call createBuildCall(String appId, CreateBuildParams createBuildParams, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createBuildParams; + + // create path and map variables + String localVarPath = "/builds/v2/{appId}/create" + .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "hathoraDevToken" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createBuildValidateBeforeCall(String appId, CreateBuildParams createBuildParams, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException("Missing the required parameter 'appId' when calling createBuild(Async)"); + } + + // verify the required parameter 'createBuildParams' is set + if (createBuildParams == null) { + throw new ApiException("Missing the required parameter 'createBuildParams' when calling createBuild(Async)"); + } + + return createBuildCall(appId, createBuildParams, _callback); + + } + + /** + * + * Creates a new [build](https://hathora.dev/docs/concepts/hathora-entities#build). Responds with a `buildId` that you must pass to [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) to build the game server artifact. You can optionally pass in a `buildTag` to associate an external version with a build. + * @param appId (required) + * @param createBuildParams (required) + * @return Build + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
201 -
401 -
404 -
429 -
500 -
+ */ + public Build createBuild(String appId, CreateBuildParams createBuildParams) throws ApiException { + ApiResponse localVarResp = createBuildWithHttpInfo(appId, createBuildParams); + return localVarResp.getData(); + } + + /** + * + * Creates a new [build](https://hathora.dev/docs/concepts/hathora-entities#build). Responds with a `buildId` that you must pass to [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) to build the game server artifact. You can optionally pass in a `buildTag` to associate an external version with a build. + * @param appId (required) + * @param createBuildParams (required) + * @return ApiResponse<Build> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
201 -
401 -
404 -
429 -
500 -
+ */ + public ApiResponse createBuildWithHttpInfo(String appId, CreateBuildParams createBuildParams) throws ApiException { + okhttp3.Call localVarCall = createBuildValidateBeforeCall(appId, createBuildParams, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Creates a new [build](https://hathora.dev/docs/concepts/hathora-entities#build). Responds with a `buildId` that you must pass to [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) to build the game server artifact. You can optionally pass in a `buildTag` to associate an external version with a build. + * @param appId (required) + * @param createBuildParams (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
201 -
401 -
404 -
429 -
500 -
+ */ + public okhttp3.Call createBuildAsync(String appId, CreateBuildParams createBuildParams, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createBuildValidateBeforeCall(appId, createBuildParams, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteBuild + * @param appId (required) + * @param buildId (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
204 No content -
401 -
404 -
422 -
429 -
500 -
+ */ + public okhttp3.Call deleteBuildCall(String appId, Integer buildId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/builds/v2/{appId}/delete/{buildId}" + .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) + .replace("{" + "buildId" + "}", localVarApiClient.escapeString(buildId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "hathoraDevToken" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteBuildValidateBeforeCall(String appId, Integer buildId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException("Missing the required parameter 'appId' when calling deleteBuild(Async)"); + } + + // verify the required parameter 'buildId' is set + if (buildId == null) { + throw new ApiException("Missing the required parameter 'buildId' when calling deleteBuild(Async)"); + } + + return deleteBuildCall(appId, buildId, _callback); + + } + + /** + * + * Delete a [build](https://hathora.dev/docs/concepts/hathora-entities#build). All associated metadata is deleted. + * @param appId (required) + * @param buildId (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
204 No content -
401 -
404 -
422 -
429 -
500 -
+ */ + public void deleteBuild(String appId, Integer buildId) throws ApiException { + deleteBuildWithHttpInfo(appId, buildId); + } + + /** + * + * Delete a [build](https://hathora.dev/docs/concepts/hathora-entities#build). All associated metadata is deleted. + * @param appId (required) + * @param buildId (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
204 No content -
401 -
404 -
422 -
429 -
500 -
+ */ + public ApiResponse deleteBuildWithHttpInfo(String appId, Integer buildId) throws ApiException { + okhttp3.Call localVarCall = deleteBuildValidateBeforeCall(appId, buildId, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) + * Delete a [build](https://hathora.dev/docs/concepts/hathora-entities#build). All associated metadata is deleted. + * @param appId (required) + * @param buildId (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
204 No content -
401 -
404 -
422 -
429 -
500 -
+ */ + public okhttp3.Call deleteBuildAsync(String appId, Integer buildId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteBuildValidateBeforeCall(appId, buildId, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for getBuildInfo + * @param appId (required) + * @param buildId (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Ok -
401 -
404 -
+ */ + public okhttp3.Call getBuildInfoCall(String appId, Integer buildId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/builds/v2/{appId}/info/{buildId}" + .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) + .replace("{" + "buildId" + "}", localVarApiClient.escapeString(buildId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "hathoraDevToken" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getBuildInfoValidateBeforeCall(String appId, Integer buildId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException("Missing the required parameter 'appId' when calling getBuildInfo(Async)"); + } + + // verify the required parameter 'buildId' is set + if (buildId == null) { + throw new ApiException("Missing the required parameter 'buildId' when calling getBuildInfo(Async)"); + } + + return getBuildInfoCall(appId, buildId, _callback); + + } + + /** + * + * Get details for a [build](https://hathora.dev/docs/concepts/hathora-entities#build). + * @param appId (required) + * @param buildId (required) + * @return Build + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Ok -
401 -
404 -
+ */ + public Build getBuildInfo(String appId, Integer buildId) throws ApiException { + ApiResponse localVarResp = getBuildInfoWithHttpInfo(appId, buildId); + return localVarResp.getData(); + } + + /** + * + * Get details for a [build](https://hathora.dev/docs/concepts/hathora-entities#build). + * @param appId (required) + * @param buildId (required) + * @return ApiResponse<Build> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Ok -
401 -
404 -
+ */ + public ApiResponse getBuildInfoWithHttpInfo(String appId, Integer buildId) throws ApiException { + okhttp3.Call localVarCall = getBuildInfoValidateBeforeCall(appId, buildId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Get details for a [build](https://hathora.dev/docs/concepts/hathora-entities#build). + * @param appId (required) + * @param buildId (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Ok -
401 -
404 -
+ */ + public okhttp3.Call getBuildInfoAsync(String appId, Integer buildId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getBuildInfoValidateBeforeCall(appId, buildId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getBuilds + * @param appId (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Ok -
401 -
404 -
+ */ + public okhttp3.Call getBuildsCall(String appId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/builds/v2/{appId}/list" + .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "hathoraDevToken" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getBuildsValidateBeforeCall(String appId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException("Missing the required parameter 'appId' when calling getBuilds(Async)"); + } + + return getBuildsCall(appId, _callback); + + } + + /** + * + * Returns an array of [builds](https://hathora.dev/docs/concepts/hathora-entities#build) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + * @param appId (required) + * @return List<Build> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Ok -
401 -
404 -
+ */ + public List getBuilds(String appId) throws ApiException { + ApiResponse> localVarResp = getBuildsWithHttpInfo(appId); + return localVarResp.getData(); + } + + /** + * + * Returns an array of [builds](https://hathora.dev/docs/concepts/hathora-entities#build) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + * @param appId (required) + * @return ApiResponse<List<Build>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Ok -
401 -
404 -
+ */ + public ApiResponse> getBuildsWithHttpInfo(String appId) throws ApiException { + okhttp3.Call localVarCall = getBuildsValidateBeforeCall(appId, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Returns an array of [builds](https://hathora.dev/docs/concepts/hathora-entities#build) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + * @param appId (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Ok -
401 -
404 -
+ */ + public okhttp3.Call getBuildsAsync(String appId, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getBuildsValidateBeforeCall(appId, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for runBuild + * @param appId (required) + * @param buildId (required) + * @param _file (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Ok -
401 -
404 -
429 -
500 -
+ */ + public okhttp3.Call runBuildCall(String appId, Integer buildId, File _file, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/builds/v2/{appId}/run/{buildId}" + .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) + .replace("{" + "buildId" + "}", localVarApiClient.escapeString(buildId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (_file != null) { + localVarFormParams.put("file", _file); + } + + final String[] localVarAccepts = { + "application/octet-stream", + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "hathoraDevToken" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call runBuildValidateBeforeCall(String appId, Integer buildId, File _file, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException("Missing the required parameter 'appId' when calling runBuild(Async)"); + } + + // verify the required parameter 'buildId' is set + if (buildId == null) { + throw new ApiException("Missing the required parameter 'buildId' when calling runBuild(Async)"); + } + + // verify the required parameter '_file' is set + if (_file == null) { + throw new ApiException("Missing the required parameter '_file' when calling runBuild(Async)"); + } + + return runBuildCall(appId, buildId, _file, _callback); + + } + + /** + * + * Builds a game server artifact from a tarball you provide. Pass in the `buildId` generated from [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild). + * @param appId (required) + * @param buildId (required) + * @param _file (required) + * @return File + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Ok -
401 -
404 -
429 -
500 -
+ */ + public File runBuild(String appId, Integer buildId, File _file) throws ApiException { + ApiResponse localVarResp = runBuildWithHttpInfo(appId, buildId, _file); + return localVarResp.getData(); + } + + /** + * + * Builds a game server artifact from a tarball you provide. Pass in the `buildId` generated from [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild). + * @param appId (required) + * @param buildId (required) + * @param _file (required) + * @return ApiResponse<File> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Ok -
401 -
404 -
429 -
500 -
+ */ + public ApiResponse runBuildWithHttpInfo(String appId, Integer buildId, File _file) throws ApiException { + okhttp3.Call localVarCall = runBuildValidateBeforeCall(appId, buildId, _file, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Builds a game server artifact from a tarball you provide. Pass in the `buildId` generated from [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild). + * @param appId (required) + * @param buildId (required) + * @param _file (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Ok -
401 -
404 -
429 -
500 -
+ */ + public okhttp3.Call runBuildAsync(String appId, Integer buildId, File _file, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = runBuildValidateBeforeCall(appId, buildId, _file, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/java/src/main/java/com/hathora/client/api/DeploymentV1Api.java b/java/src/main/java/com/hathora/client/api/DeploymentV1Api.java index c5ef8a6..671e805 100644 --- a/java/src/main/java/com/hathora/client/api/DeploymentV1Api.java +++ b/java/src/main/java/com/hathora/client/api/DeploymentV1Api.java @@ -76,7 +76,7 @@ public void setCustomBaseUrl(String customBaseUrl) { } /** - * Build call for createDeployment + * Build call for createDeploymentDeprecated * @param appId (required) * @param buildId (required) * @param deploymentConfig (required) @@ -90,11 +90,13 @@ public void setCustomBaseUrl(String customBaseUrl) { 400 - 401 - 404 - - 422 - + 429 - 500 - + * @deprecated */ - public okhttp3.Call createDeploymentCall(String appId, Integer buildId, DeploymentConfig deploymentConfig, final ApiCallback _callback) throws ApiException { + @Deprecated + public okhttp3.Call createDeploymentDeprecatedCall(String appId, Integer buildId, DeploymentConfig deploymentConfig, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -141,24 +143,25 @@ public okhttp3.Call createDeploymentCall(String appId, Integer buildId, Deployme return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } + @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call createDeploymentValidateBeforeCall(String appId, Integer buildId, DeploymentConfig deploymentConfig, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createDeploymentDeprecatedValidateBeforeCall(String appId, Integer buildId, DeploymentConfig deploymentConfig, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling createDeployment(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling createDeploymentDeprecated(Async)"); } // verify the required parameter 'buildId' is set if (buildId == null) { - throw new ApiException("Missing the required parameter 'buildId' when calling createDeployment(Async)"); + throw new ApiException("Missing the required parameter 'buildId' when calling createDeploymentDeprecated(Async)"); } // verify the required parameter 'deploymentConfig' is set if (deploymentConfig == null) { - throw new ApiException("Missing the required parameter 'deploymentConfig' when calling createDeployment(Async)"); + throw new ApiException("Missing the required parameter 'deploymentConfig' when calling createDeploymentDeprecated(Async)"); } - return createDeploymentCall(appId, buildId, deploymentConfig, _callback); + return createDeploymentDeprecatedCall(appId, buildId, deploymentConfig, _callback); } @@ -177,12 +180,14 @@ private okhttp3.Call createDeploymentValidateBeforeCall(String appId, Integer bu 400 - 401 - 404 - - 422 - + 429 - 500 - + * @deprecated */ - public Deployment createDeployment(String appId, Integer buildId, DeploymentConfig deploymentConfig) throws ApiException { - ApiResponse localVarResp = createDeploymentWithHttpInfo(appId, buildId, deploymentConfig); + @Deprecated + public Deployment createDeploymentDeprecated(String appId, Integer buildId, DeploymentConfig deploymentConfig) throws ApiException { + ApiResponse localVarResp = createDeploymentDeprecatedWithHttpInfo(appId, buildId, deploymentConfig); return localVarResp.getData(); } @@ -201,12 +206,14 @@ public Deployment createDeployment(String appId, Integer buildId, DeploymentConf 400 - 401 - 404 - - 422 - + 429 - 500 - + * @deprecated */ - public ApiResponse createDeploymentWithHttpInfo(String appId, Integer buildId, DeploymentConfig deploymentConfig) throws ApiException { - okhttp3.Call localVarCall = createDeploymentValidateBeforeCall(appId, buildId, deploymentConfig, null); + @Deprecated + public ApiResponse createDeploymentDeprecatedWithHttpInfo(String appId, Integer buildId, DeploymentConfig deploymentConfig) throws ApiException { + okhttp3.Call localVarCall = createDeploymentDeprecatedValidateBeforeCall(appId, buildId, deploymentConfig, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -227,19 +234,21 @@ public ApiResponse createDeploymentWithHttpInfo(String appId, Intege 400 - 401 - 404 - - 422 - + 429 - 500 - + * @deprecated */ - public okhttp3.Call createDeploymentAsync(String appId, Integer buildId, DeploymentConfig deploymentConfig, final ApiCallback _callback) throws ApiException { + @Deprecated + public okhttp3.Call createDeploymentDeprecatedAsync(String appId, Integer buildId, DeploymentConfig deploymentConfig, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = createDeploymentValidateBeforeCall(appId, buildId, deploymentConfig, _callback); + okhttp3.Call localVarCall = createDeploymentDeprecatedValidateBeforeCall(appId, buildId, deploymentConfig, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getDeploymentInfo + * Build call for getDeploymentInfoDeprecated * @param appId (required) * @param deploymentId (required) * @param _callback Callback for upload/download progress @@ -252,8 +261,10 @@ public okhttp3.Call createDeploymentAsync(String appId, Integer buildId, Deploym 401 - 404 - + * @deprecated */ - public okhttp3.Call getDeploymentInfoCall(String appId, Integer deploymentId, final ApiCallback _callback) throws ApiException { + @Deprecated + public okhttp3.Call getDeploymentInfoDeprecatedCall(String appId, Integer deploymentId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -299,19 +310,20 @@ public okhttp3.Call getDeploymentInfoCall(String appId, Integer deploymentId, fi return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } + @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call getDeploymentInfoValidateBeforeCall(String appId, Integer deploymentId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getDeploymentInfoDeprecatedValidateBeforeCall(String appId, Integer deploymentId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling getDeploymentInfo(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling getDeploymentInfoDeprecated(Async)"); } // verify the required parameter 'deploymentId' is set if (deploymentId == null) { - throw new ApiException("Missing the required parameter 'deploymentId' when calling getDeploymentInfo(Async)"); + throw new ApiException("Missing the required parameter 'deploymentId' when calling getDeploymentInfoDeprecated(Async)"); } - return getDeploymentInfoCall(appId, deploymentId, _callback); + return getDeploymentInfoDeprecatedCall(appId, deploymentId, _callback); } @@ -329,9 +341,11 @@ private okhttp3.Call getDeploymentInfoValidateBeforeCall(String appId, Integer d 401 - 404 - + * @deprecated */ - public Deployment getDeploymentInfo(String appId, Integer deploymentId) throws ApiException { - ApiResponse localVarResp = getDeploymentInfoWithHttpInfo(appId, deploymentId); + @Deprecated + public Deployment getDeploymentInfoDeprecated(String appId, Integer deploymentId) throws ApiException { + ApiResponse localVarResp = getDeploymentInfoDeprecatedWithHttpInfo(appId, deploymentId); return localVarResp.getData(); } @@ -349,9 +363,11 @@ public Deployment getDeploymentInfo(String appId, Integer deploymentId) throws A 401 - 404 - + * @deprecated */ - public ApiResponse getDeploymentInfoWithHttpInfo(String appId, Integer deploymentId) throws ApiException { - okhttp3.Call localVarCall = getDeploymentInfoValidateBeforeCall(appId, deploymentId, null); + @Deprecated + public ApiResponse getDeploymentInfoDeprecatedWithHttpInfo(String appId, Integer deploymentId) throws ApiException { + okhttp3.Call localVarCall = getDeploymentInfoDeprecatedValidateBeforeCall(appId, deploymentId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -371,16 +387,18 @@ public ApiResponse getDeploymentInfoWithHttpInfo(String appId, Integ 401 - 404 - + * @deprecated */ - public okhttp3.Call getDeploymentInfoAsync(String appId, Integer deploymentId, final ApiCallback _callback) throws ApiException { + @Deprecated + public okhttp3.Call getDeploymentInfoDeprecatedAsync(String appId, Integer deploymentId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getDeploymentInfoValidateBeforeCall(appId, deploymentId, _callback); + okhttp3.Call localVarCall = getDeploymentInfoDeprecatedValidateBeforeCall(appId, deploymentId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getDeployments + * Build call for getDeploymentsDeprecated * @param appId (required) * @param _callback Callback for upload/download progress * @return Call to execute @@ -392,8 +410,10 @@ public okhttp3.Call getDeploymentInfoAsync(String appId, Integer deploymentId, f 401 - 404 - + * @deprecated */ - public okhttp3.Call getDeploymentsCall(String appId, final ApiCallback _callback) throws ApiException { + @Deprecated + public okhttp3.Call getDeploymentsDeprecatedCall(String appId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -438,14 +458,15 @@ public okhttp3.Call getDeploymentsCall(String appId, final ApiCallback _callback return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } + @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call getDeploymentsValidateBeforeCall(String appId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getDeploymentsDeprecatedValidateBeforeCall(String appId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling getDeployments(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling getDeploymentsDeprecated(Async)"); } - return getDeploymentsCall(appId, _callback); + return getDeploymentsDeprecatedCall(appId, _callback); } @@ -462,9 +483,11 @@ private okhttp3.Call getDeploymentsValidateBeforeCall(String appId, final ApiCal 401 - 404 - + * @deprecated */ - public List getDeployments(String appId) throws ApiException { - ApiResponse> localVarResp = getDeploymentsWithHttpInfo(appId); + @Deprecated + public List getDeploymentsDeprecated(String appId) throws ApiException { + ApiResponse> localVarResp = getDeploymentsDeprecatedWithHttpInfo(appId); return localVarResp.getData(); } @@ -481,9 +504,11 @@ public List getDeployments(String appId) throws ApiException { 401 - 404 - + * @deprecated */ - public ApiResponse> getDeploymentsWithHttpInfo(String appId) throws ApiException { - okhttp3.Call localVarCall = getDeploymentsValidateBeforeCall(appId, null); + @Deprecated + public ApiResponse> getDeploymentsDeprecatedWithHttpInfo(String appId) throws ApiException { + okhttp3.Call localVarCall = getDeploymentsDeprecatedValidateBeforeCall(appId, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -502,16 +527,18 @@ public ApiResponse> getDeploymentsWithHttpInfo(String appId) th 401 - 404 - + * @deprecated */ - public okhttp3.Call getDeploymentsAsync(String appId, final ApiCallback> _callback) throws ApiException { + @Deprecated + public okhttp3.Call getDeploymentsDeprecatedAsync(String appId, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = getDeploymentsValidateBeforeCall(appId, _callback); + okhttp3.Call localVarCall = getDeploymentsDeprecatedValidateBeforeCall(appId, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getLatestDeployment + * Build call for getLatestDeploymentDeprecated * @param appId (required) * @param _callback Callback for upload/download progress * @return Call to execute @@ -523,8 +550,10 @@ public okhttp3.Call getDeploymentsAsync(String appId, final ApiCallback 401 - 404 - + * @deprecated */ - public okhttp3.Call getLatestDeploymentCall(String appId, final ApiCallback _callback) throws ApiException { + @Deprecated + public okhttp3.Call getLatestDeploymentDeprecatedCall(String appId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -569,14 +598,15 @@ public okhttp3.Call getLatestDeploymentCall(String appId, final ApiCallback _cal return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } + @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call getLatestDeploymentValidateBeforeCall(String appId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getLatestDeploymentDeprecatedValidateBeforeCall(String appId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling getLatestDeployment(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling getLatestDeploymentDeprecated(Async)"); } - return getLatestDeploymentCall(appId, _callback); + return getLatestDeploymentDeprecatedCall(appId, _callback); } @@ -593,9 +623,11 @@ private okhttp3.Call getLatestDeploymentValidateBeforeCall(String appId, final A 401 - 404 - + * @deprecated */ - public Deployment getLatestDeployment(String appId) throws ApiException { - ApiResponse localVarResp = getLatestDeploymentWithHttpInfo(appId); + @Deprecated + public Deployment getLatestDeploymentDeprecated(String appId) throws ApiException { + ApiResponse localVarResp = getLatestDeploymentDeprecatedWithHttpInfo(appId); return localVarResp.getData(); } @@ -612,9 +644,11 @@ public Deployment getLatestDeployment(String appId) throws ApiException { 401 - 404 - + * @deprecated */ - public ApiResponse getLatestDeploymentWithHttpInfo(String appId) throws ApiException { - okhttp3.Call localVarCall = getLatestDeploymentValidateBeforeCall(appId, null); + @Deprecated + public ApiResponse getLatestDeploymentDeprecatedWithHttpInfo(String appId) throws ApiException { + okhttp3.Call localVarCall = getLatestDeploymentDeprecatedValidateBeforeCall(appId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -633,10 +667,12 @@ public ApiResponse getLatestDeploymentWithHttpInfo(String appId) thr 401 - 404 - + * @deprecated */ - public okhttp3.Call getLatestDeploymentAsync(String appId, final ApiCallback _callback) throws ApiException { + @Deprecated + public okhttp3.Call getLatestDeploymentDeprecatedAsync(String appId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getLatestDeploymentValidateBeforeCall(appId, _callback); + okhttp3.Call localVarCall = getLatestDeploymentDeprecatedValidateBeforeCall(appId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/java/src/main/java/com/hathora/client/api/DeploymentV2Api.java b/java/src/main/java/com/hathora/client/api/DeploymentV2Api.java new file mode 100644 index 0000000..325ff0e --- /dev/null +++ b/java/src/main/java/com/hathora/client/api/DeploymentV2Api.java @@ -0,0 +1,644 @@ +/* + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.hathora.client.api; + +import com.hathora.client.ApiCallback; +import com.hathora.client.ApiClient; +import com.hathora.client.ApiException; +import com.hathora.client.ApiResponse; +import com.hathora.client.Configuration; +import com.hathora.client.Pair; +import com.hathora.client.ProgressRequestBody; +import com.hathora.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.hathora.client.model.ApiError; +import com.hathora.client.model.DeploymentConfigV2; +import com.hathora.client.model.DeploymentV2; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.ws.rs.core.GenericType; + +public class DeploymentV2Api { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public DeploymentV2Api() { + this(Configuration.getDefaultApiClient()); + } + + public DeploymentV2Api(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for createDeployment + * @param appId (required) + * @param buildId (required) + * @param deploymentConfigV2 (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
201 -
400 -
401 -
404 -
429 -
500 -
+ */ + public okhttp3.Call createDeploymentCall(String appId, Integer buildId, DeploymentConfigV2 deploymentConfigV2, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = deploymentConfigV2; + + // create path and map variables + String localVarPath = "/deployments/v2/{appId}/create/{buildId}" + .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) + .replace("{" + "buildId" + "}", localVarApiClient.escapeString(buildId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "hathoraDevToken" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createDeploymentValidateBeforeCall(String appId, Integer buildId, DeploymentConfigV2 deploymentConfigV2, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException("Missing the required parameter 'appId' when calling createDeployment(Async)"); + } + + // verify the required parameter 'buildId' is set + if (buildId == null) { + throw new ApiException("Missing the required parameter 'buildId' when calling createDeployment(Async)"); + } + + // verify the required parameter 'deploymentConfigV2' is set + if (deploymentConfigV2 == null) { + throw new ApiException("Missing the required parameter 'deploymentConfigV2' when calling createDeployment(Async)"); + } + + return createDeploymentCall(appId, buildId, deploymentConfigV2, _callback); + + } + + /** + * + * Create a new [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). Creating a new deployment means all new rooms created will use the latest deployment configuration, but existing games in progress will not be affected. + * @param appId (required) + * @param buildId (required) + * @param deploymentConfigV2 (required) + * @return DeploymentV2 + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
201 -
400 -
401 -
404 -
429 -
500 -
+ */ + public DeploymentV2 createDeployment(String appId, Integer buildId, DeploymentConfigV2 deploymentConfigV2) throws ApiException { + ApiResponse localVarResp = createDeploymentWithHttpInfo(appId, buildId, deploymentConfigV2); + return localVarResp.getData(); + } + + /** + * + * Create a new [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). Creating a new deployment means all new rooms created will use the latest deployment configuration, but existing games in progress will not be affected. + * @param appId (required) + * @param buildId (required) + * @param deploymentConfigV2 (required) + * @return ApiResponse<DeploymentV2> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
201 -
400 -
401 -
404 -
429 -
500 -
+ */ + public ApiResponse createDeploymentWithHttpInfo(String appId, Integer buildId, DeploymentConfigV2 deploymentConfigV2) throws ApiException { + okhttp3.Call localVarCall = createDeploymentValidateBeforeCall(appId, buildId, deploymentConfigV2, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Create a new [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). Creating a new deployment means all new rooms created will use the latest deployment configuration, but existing games in progress will not be affected. + * @param appId (required) + * @param buildId (required) + * @param deploymentConfigV2 (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
201 -
400 -
401 -
404 -
429 -
500 -
+ */ + public okhttp3.Call createDeploymentAsync(String appId, Integer buildId, DeploymentConfigV2 deploymentConfigV2, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createDeploymentValidateBeforeCall(appId, buildId, deploymentConfigV2, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getDeploymentInfo + * @param appId (required) + * @param deploymentId (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Ok -
401 -
404 -
+ */ + public okhttp3.Call getDeploymentInfoCall(String appId, Integer deploymentId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/deployments/v2/{appId}/info/{deploymentId}" + .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) + .replace("{" + "deploymentId" + "}", localVarApiClient.escapeString(deploymentId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "hathoraDevToken" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getDeploymentInfoValidateBeforeCall(String appId, Integer deploymentId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException("Missing the required parameter 'appId' when calling getDeploymentInfo(Async)"); + } + + // verify the required parameter 'deploymentId' is set + if (deploymentId == null) { + throw new ApiException("Missing the required parameter 'deploymentId' when calling getDeploymentInfo(Async)"); + } + + return getDeploymentInfoCall(appId, deploymentId, _callback); + + } + + /** + * + * Get details for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). + * @param appId (required) + * @param deploymentId (required) + * @return DeploymentV2 + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Ok -
401 -
404 -
+ */ + public DeploymentV2 getDeploymentInfo(String appId, Integer deploymentId) throws ApiException { + ApiResponse localVarResp = getDeploymentInfoWithHttpInfo(appId, deploymentId); + return localVarResp.getData(); + } + + /** + * + * Get details for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). + * @param appId (required) + * @param deploymentId (required) + * @return ApiResponse<DeploymentV2> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Ok -
401 -
404 -
+ */ + public ApiResponse getDeploymentInfoWithHttpInfo(String appId, Integer deploymentId) throws ApiException { + okhttp3.Call localVarCall = getDeploymentInfoValidateBeforeCall(appId, deploymentId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Get details for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). + * @param appId (required) + * @param deploymentId (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Ok -
401 -
404 -
+ */ + public okhttp3.Call getDeploymentInfoAsync(String appId, Integer deploymentId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getDeploymentInfoValidateBeforeCall(appId, deploymentId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getDeployments + * @param appId (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Ok -
401 -
404 -
+ */ + public okhttp3.Call getDeploymentsCall(String appId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/deployments/v2/{appId}/list" + .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "hathoraDevToken" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getDeploymentsValidateBeforeCall(String appId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException("Missing the required parameter 'appId' when calling getDeployments(Async)"); + } + + return getDeploymentsCall(appId, _callback); + + } + + /** + * + * Returns an array of [deployments](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + * @param appId (required) + * @return List<DeploymentV2> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Ok -
401 -
404 -
+ */ + public List getDeployments(String appId) throws ApiException { + ApiResponse> localVarResp = getDeploymentsWithHttpInfo(appId); + return localVarResp.getData(); + } + + /** + * + * Returns an array of [deployments](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + * @param appId (required) + * @return ApiResponse<List<DeploymentV2>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Ok -
401 -
404 -
+ */ + public ApiResponse> getDeploymentsWithHttpInfo(String appId) throws ApiException { + okhttp3.Call localVarCall = getDeploymentsValidateBeforeCall(appId, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Returns an array of [deployments](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + * @param appId (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Ok -
401 -
404 -
+ */ + public okhttp3.Call getDeploymentsAsync(String appId, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getDeploymentsValidateBeforeCall(appId, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getLatestDeployment + * @param appId (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Ok -
401 -
404 -
+ */ + public okhttp3.Call getLatestDeploymentCall(String appId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/deployments/v2/{appId}/latest" + .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "hathoraDevToken" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getLatestDeploymentValidateBeforeCall(String appId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException("Missing the required parameter 'appId' when calling getLatestDeployment(Async)"); + } + + return getLatestDeploymentCall(appId, _callback); + + } + + /** + * + * Get the latest [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + * @param appId (required) + * @return DeploymentV2 + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Ok -
401 -
404 -
+ */ + public DeploymentV2 getLatestDeployment(String appId) throws ApiException { + ApiResponse localVarResp = getLatestDeploymentWithHttpInfo(appId); + return localVarResp.getData(); + } + + /** + * + * Get the latest [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + * @param appId (required) + * @return ApiResponse<DeploymentV2> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Ok -
401 -
404 -
+ */ + public ApiResponse getLatestDeploymentWithHttpInfo(String appId) throws ApiException { + okhttp3.Call localVarCall = getLatestDeploymentValidateBeforeCall(appId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Get the latest [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + * @param appId (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Ok -
401 -
404 -
+ */ + public okhttp3.Call getLatestDeploymentAsync(String appId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getLatestDeploymentValidateBeforeCall(appId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/java/src/main/java/com/hathora/client/api/DiscoveryV1Api.java b/java/src/main/java/com/hathora/client/api/DiscoveryV1Api.java index e5afd2c..d80e2c2 100644 --- a/java/src/main/java/com/hathora/client/api/DiscoveryV1Api.java +++ b/java/src/main/java/com/hathora/client/api/DiscoveryV1Api.java @@ -27,7 +27,7 @@ import java.io.IOException; -import com.hathora.client.model.DiscoveryResponseInner; +import com.hathora.client.model.PingEndpointsInner; import java.lang.reflect.Type; import java.util.ArrayList; @@ -74,7 +74,7 @@ public void setCustomBaseUrl(String customBaseUrl) { } /** - * Build call for getPingServiceEndpoints + * Build call for getPingServiceEndpointsDeprecated * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -83,8 +83,10 @@ public void setCustomBaseUrl(String customBaseUrl) { Status Code Description Response Headers 200 Ok - + * @deprecated */ - public okhttp3.Call getPingServiceEndpointsCall(final ApiCallback _callback) throws ApiException { + @Deprecated + public okhttp3.Call getPingServiceEndpointsDeprecatedCall(final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -128,48 +130,53 @@ public okhttp3.Call getPingServiceEndpointsCall(final ApiCallback _callback) thr return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } + @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call getPingServiceEndpointsValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return getPingServiceEndpointsCall(_callback); + private okhttp3.Call getPingServiceEndpointsDeprecatedValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return getPingServiceEndpointsDeprecatedCall(_callback); } /** * - * Returns an array of all regions with a host and port that a client can directly ping. Open a websocket connection to `wss://<host>:<port>/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. - * @return List<DiscoveryResponseInner> + * Returns an array of V1 regions with a host and port that a client can directly ping. Open a websocket connection to `wss://<host>:<port>/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. + * @return List<PingEndpointsInner> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Ok -
+ * @deprecated */ - public List getPingServiceEndpoints() throws ApiException { - ApiResponse> localVarResp = getPingServiceEndpointsWithHttpInfo(); + @Deprecated + public List getPingServiceEndpointsDeprecated() throws ApiException { + ApiResponse> localVarResp = getPingServiceEndpointsDeprecatedWithHttpInfo(); return localVarResp.getData(); } /** * - * Returns an array of all regions with a host and port that a client can directly ping. Open a websocket connection to `wss://<host>:<port>/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. - * @return ApiResponse<List<DiscoveryResponseInner>> + * Returns an array of V1 regions with a host and port that a client can directly ping. Open a websocket connection to `wss://<host>:<port>/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. + * @return ApiResponse<List<PingEndpointsInner>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Ok -
+ * @deprecated */ - public ApiResponse> getPingServiceEndpointsWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = getPingServiceEndpointsValidateBeforeCall(null); - Type localVarReturnType = new TypeToken>(){}.getType(); + @Deprecated + public ApiResponse> getPingServiceEndpointsDeprecatedWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getPingServiceEndpointsDeprecatedValidateBeforeCall(null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Returns an array of all regions with a host and port that a client can directly ping. Open a websocket connection to `wss://<host>:<port>/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. + * Returns an array of V1 regions with a host and port that a client can directly ping. Open a websocket connection to `wss://<host>:<port>/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -178,11 +185,13 @@ public ApiResponse> getPingServiceEndpointsWithHttp Status Code Description Response Headers 200 Ok - + * @deprecated */ - public okhttp3.Call getPingServiceEndpointsAsync(final ApiCallback> _callback) throws ApiException { + @Deprecated + public okhttp3.Call getPingServiceEndpointsDeprecatedAsync(final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = getPingServiceEndpointsValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken>(){}.getType(); + okhttp3.Call localVarCall = getPingServiceEndpointsDeprecatedValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/java/src/main/java/com/hathora/client/api/DiscoveryV2Api.java b/java/src/main/java/com/hathora/client/api/DiscoveryV2Api.java new file mode 100644 index 0000000..05a1f8e --- /dev/null +++ b/java/src/main/java/com/hathora/client/api/DiscoveryV2Api.java @@ -0,0 +1,189 @@ +/* + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.hathora.client.api; + +import com.hathora.client.ApiCallback; +import com.hathora.client.ApiClient; +import com.hathora.client.ApiException; +import com.hathora.client.ApiResponse; +import com.hathora.client.Configuration; +import com.hathora.client.Pair; +import com.hathora.client.ProgressRequestBody; +import com.hathora.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.hathora.client.model.PingEndpointsInner; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.ws.rs.core.GenericType; + +public class DiscoveryV2Api { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public DiscoveryV2Api() { + this(Configuration.getDefaultApiClient()); + } + + public DiscoveryV2Api(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for getPingServiceEndpoints + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Ok -
+ */ + public okhttp3.Call getPingServiceEndpointsCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/discovery/v2/ping"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getPingServiceEndpointsValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return getPingServiceEndpointsCall(_callback); + + } + + /** + * + * Returns an array of all regions with a host and port that a client can directly ping. Open a websocket connection to `wss://<host>:<port>/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. + * @return List<PingEndpointsInner> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Ok -
+ */ + public List getPingServiceEndpoints() throws ApiException { + ApiResponse> localVarResp = getPingServiceEndpointsWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * + * Returns an array of all regions with a host and port that a client can directly ping. Open a websocket connection to `wss://<host>:<port>/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. + * @return ApiResponse<List<PingEndpointsInner>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Ok -
+ */ + public ApiResponse> getPingServiceEndpointsWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getPingServiceEndpointsValidateBeforeCall(null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Returns an array of all regions with a host and port that a client can directly ping. Open a websocket connection to `wss://<host>:<port>/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Ok -
+ */ + public okhttp3.Call getPingServiceEndpointsAsync(final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getPingServiceEndpointsValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/java/src/main/java/com/hathora/client/api/LobbyV2Api.java b/java/src/main/java/com/hathora/client/api/LobbyV2Api.java index 6bb62a8..226c99a 100644 --- a/java/src/main/java/com/hathora/client/api/LobbyV2Api.java +++ b/java/src/main/java/com/hathora/client/api/LobbyV2Api.java @@ -1091,6 +1091,7 @@ public okhttp3.Call listActivePublicLobbiesDeprecatedV2Async(String appId, Regio 401 - 404 - 422 - + 429 - * @deprecated */ @@ -1179,6 +1180,7 @@ private okhttp3.Call setLobbyStateValidateBeforeCall(String appId, String roomId 401 - 404 - 422 - + 429 - * @deprecated */ @@ -1203,6 +1205,7 @@ public Lobby setLobbyState(String appId, String roomId, SetLobbyStateParams setL 401 - 404 - 422 - + 429 - * @deprecated */ @@ -1229,6 +1232,7 @@ public ApiResponse setLobbyStateWithHttpInfo(String appId, String roomId, 401 - 404 - 422 - + 429 - * @deprecated */ diff --git a/java/src/main/java/com/hathora/client/api/LogV1Api.java b/java/src/main/java/com/hathora/client/api/LogV1Api.java index 9255e15..6d7e280 100644 --- a/java/src/main/java/com/hathora/client/api/LogV1Api.java +++ b/java/src/main/java/com/hathora/client/api/LogV1Api.java @@ -28,6 +28,7 @@ import com.hathora.client.model.ApiError; +import java.io.File; import com.hathora.client.model.Region; import java.lang.reflect.Type; @@ -119,7 +120,7 @@ public okhttp3.Call downloadLogForProcessCall(String appId, String processId, fi Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "text/plain", + "application/octet-stream", "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); @@ -159,7 +160,7 @@ private okhttp3.Call downloadLogForProcessValidateBeforeCall(String appId, Strin * Download entire log file for a stopped process. * @param appId (required) * @param processId (required) - * @return byte[] + * @return File * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -171,8 +172,8 @@ private okhttp3.Call downloadLogForProcessValidateBeforeCall(String appId, Strin
410 -
*/ - public byte[] downloadLogForProcess(String appId, String processId) throws ApiException { - ApiResponse localVarResp = downloadLogForProcessWithHttpInfo(appId, processId); + public File downloadLogForProcess(String appId, String processId) throws ApiException { + ApiResponse localVarResp = downloadLogForProcessWithHttpInfo(appId, processId); return localVarResp.getData(); } @@ -181,7 +182,7 @@ public byte[] downloadLogForProcess(String appId, String processId) throws ApiEx * Download entire log file for a stopped process. * @param appId (required) * @param processId (required) - * @return ApiResponse<byte[]> + * @return ApiResponse<File> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -193,9 +194,9 @@ public byte[] downloadLogForProcess(String appId, String processId) throws ApiEx
410 -
*/ - public ApiResponse downloadLogForProcessWithHttpInfo(String appId, String processId) throws ApiException { + public ApiResponse downloadLogForProcessWithHttpInfo(String appId, String processId) throws ApiException { okhttp3.Call localVarCall = downloadLogForProcessValidateBeforeCall(appId, processId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -217,10 +218,10 @@ public ApiResponse downloadLogForProcessWithHttpInfo(String appId, Strin 410 - */ - public okhttp3.Call downloadLogForProcessAsync(String appId, String processId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call downloadLogForProcessAsync(String appId, String processId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = downloadLogForProcessValidateBeforeCall(appId, processId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -282,7 +283,7 @@ public okhttp3.Call getLogsForAppCall(String appId, Boolean follow, Integer tail } final String[] localVarAccepts = { - "text/plain", + "application/octet-stream", "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); @@ -320,7 +321,7 @@ private okhttp3.Call getLogsForAppValidateBeforeCall(String appId, Boolean follo * @param follow (optional, default to false) * @param tailLines (optional) * @param region (optional) - * @return byte[] + * @return File * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -332,8 +333,8 @@ private okhttp3.Call getLogsForAppValidateBeforeCall(String appId, Boolean follo * @deprecated */ @Deprecated - public byte[] getLogsForApp(String appId, Boolean follow, Integer tailLines, Region region) throws ApiException { - ApiResponse localVarResp = getLogsForAppWithHttpInfo(appId, follow, tailLines, region); + public File getLogsForApp(String appId, Boolean follow, Integer tailLines, Region region) throws ApiException { + ApiResponse localVarResp = getLogsForAppWithHttpInfo(appId, follow, tailLines, region); return localVarResp.getData(); } @@ -344,7 +345,7 @@ public byte[] getLogsForApp(String appId, Boolean follow, Integer tailLines, Reg * @param follow (optional, default to false) * @param tailLines (optional) * @param region (optional) - * @return ApiResponse<byte[]> + * @return ApiResponse<File> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
@@ -356,9 +357,9 @@ public byte[] getLogsForApp(String appId, Boolean follow, Integer tailLines, Reg * @deprecated */ @Deprecated - public ApiResponse getLogsForAppWithHttpInfo(String appId, Boolean follow, Integer tailLines, Region region) throws ApiException { + public ApiResponse getLogsForAppWithHttpInfo(String appId, Boolean follow, Integer tailLines, Region region) throws ApiException { okhttp3.Call localVarCall = getLogsForAppValidateBeforeCall(appId, follow, tailLines, region, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -382,10 +383,10 @@ public ApiResponse getLogsForAppWithHttpInfo(String appId, Boolean follo * @deprecated */ @Deprecated - public okhttp3.Call getLogsForAppAsync(String appId, Boolean follow, Integer tailLines, Region region, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getLogsForAppAsync(String appId, Boolean follow, Integer tailLines, Region region, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getLogsForAppValidateBeforeCall(appId, follow, tailLines, region, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -444,7 +445,7 @@ public okhttp3.Call getLogsForDeploymentCall(String appId, Integer deploymentId, } final String[] localVarAccepts = { - "text/plain", + "application/octet-stream", "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); @@ -487,7 +488,7 @@ private okhttp3.Call getLogsForDeploymentValidateBeforeCall(String appId, Intege * @param deploymentId (required) * @param follow (optional, default to false) * @param tailLines (optional) - * @return byte[] + * @return File * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
@@ -499,8 +500,8 @@ private okhttp3.Call getLogsForDeploymentValidateBeforeCall(String appId, Intege * @deprecated */ @Deprecated - public byte[] getLogsForDeployment(String appId, Integer deploymentId, Boolean follow, Integer tailLines) throws ApiException { - ApiResponse localVarResp = getLogsForDeploymentWithHttpInfo(appId, deploymentId, follow, tailLines); + public File getLogsForDeployment(String appId, Integer deploymentId, Boolean follow, Integer tailLines) throws ApiException { + ApiResponse localVarResp = getLogsForDeploymentWithHttpInfo(appId, deploymentId, follow, tailLines); return localVarResp.getData(); } @@ -511,7 +512,7 @@ public byte[] getLogsForDeployment(String appId, Integer deploymentId, Boolean f * @param deploymentId (required) * @param follow (optional, default to false) * @param tailLines (optional) - * @return ApiResponse<byte[]> + * @return ApiResponse<File> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
@@ -523,9 +524,9 @@ public byte[] getLogsForDeployment(String appId, Integer deploymentId, Boolean f * @deprecated */ @Deprecated - public ApiResponse getLogsForDeploymentWithHttpInfo(String appId, Integer deploymentId, Boolean follow, Integer tailLines) throws ApiException { + public ApiResponse getLogsForDeploymentWithHttpInfo(String appId, Integer deploymentId, Boolean follow, Integer tailLines) throws ApiException { okhttp3.Call localVarCall = getLogsForDeploymentValidateBeforeCall(appId, deploymentId, follow, tailLines, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -549,10 +550,10 @@ public ApiResponse getLogsForDeploymentWithHttpInfo(String appId, Intege * @deprecated */ @Deprecated - public okhttp3.Call getLogsForDeploymentAsync(String appId, Integer deploymentId, Boolean follow, Integer tailLines, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getLogsForDeploymentAsync(String appId, Integer deploymentId, Boolean follow, Integer tailLines, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getLogsForDeploymentValidateBeforeCall(appId, deploymentId, follow, tailLines, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -612,7 +613,7 @@ public okhttp3.Call getLogsForProcessCall(String appId, String processId, Boolea } final String[] localVarAccepts = { - "text/plain", + "application/octet-stream", "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); @@ -654,7 +655,7 @@ private okhttp3.Call getLogsForProcessValidateBeforeCall(String appId, String pr * @param processId (required) * @param follow (optional, default to false) * @param tailLines (optional) - * @return byte[] + * @return File * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
@@ -667,8 +668,8 @@ private okhttp3.Call getLogsForProcessValidateBeforeCall(String appId, String pr
500 -
*/ - public byte[] getLogsForProcess(String appId, String processId, Boolean follow, Integer tailLines) throws ApiException { - ApiResponse localVarResp = getLogsForProcessWithHttpInfo(appId, processId, follow, tailLines); + public File getLogsForProcess(String appId, String processId, Boolean follow, Integer tailLines) throws ApiException { + ApiResponse localVarResp = getLogsForProcessWithHttpInfo(appId, processId, follow, tailLines); return localVarResp.getData(); } @@ -679,7 +680,7 @@ public byte[] getLogsForProcess(String appId, String processId, Boolean follow, * @param processId (required) * @param follow (optional, default to false) * @param tailLines (optional) - * @return ApiResponse<byte[]> + * @return ApiResponse<File> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -692,9 +693,9 @@ public byte[] getLogsForProcess(String appId, String processId, Boolean follow,
500 -
*/ - public ApiResponse getLogsForProcessWithHttpInfo(String appId, String processId, Boolean follow, Integer tailLines) throws ApiException { + public ApiResponse getLogsForProcessWithHttpInfo(String appId, String processId, Boolean follow, Integer tailLines) throws ApiException { okhttp3.Call localVarCall = getLogsForProcessValidateBeforeCall(appId, processId, follow, tailLines, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -719,10 +720,10 @@ public ApiResponse getLogsForProcessWithHttpInfo(String appId, String pr 500 - */ - public okhttp3.Call getLogsForProcessAsync(String appId, String processId, Boolean follow, Integer tailLines, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getLogsForProcessAsync(String appId, String processId, Boolean follow, Integer tailLines, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getLogsForProcessValidateBeforeCall(appId, processId, follow, tailLines, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/java/src/main/java/com/hathora/client/api/ManagementV1Api.java b/java/src/main/java/com/hathora/client/api/ManagementV1Api.java index 089c66c..2bd90c3 100644 --- a/java/src/main/java/com/hathora/client/api/ManagementV1Api.java +++ b/java/src/main/java/com/hathora/client/api/ManagementV1Api.java @@ -29,7 +29,7 @@ import com.hathora.client.model.ApiError; import com.hathora.client.model.VerificationEmailRequest; -import com.hathora.client.model.VerificationEmailResponse; +import com.hathora.client.model.VerificationEmailSuccess; import java.lang.reflect.Type; import java.util.ArrayList; @@ -86,6 +86,7 @@ public void setCustomBaseUrl(String customBaseUrl) { Status Code Description Response Headers 200 Ok - 401 - + 429 - 500 - */ @@ -149,18 +150,19 @@ private okhttp3.Call sendVerificationEmailValidateBeforeCall(VerificationEmailRe * * * @param verificationEmailRequest (required) - * @return VerificationEmailResponse + * @return VerificationEmailSuccess * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details +
Status Code Description Response Headers
200 Ok -
401 -
429 -
500 -
*/ - public VerificationEmailResponse sendVerificationEmail(VerificationEmailRequest verificationEmailRequest) throws ApiException { - ApiResponse localVarResp = sendVerificationEmailWithHttpInfo(verificationEmailRequest); + public VerificationEmailSuccess sendVerificationEmail(VerificationEmailRequest verificationEmailRequest) throws ApiException { + ApiResponse localVarResp = sendVerificationEmailWithHttpInfo(verificationEmailRequest); return localVarResp.getData(); } @@ -168,19 +170,20 @@ public VerificationEmailResponse sendVerificationEmail(VerificationEmailRequest * * * @param verificationEmailRequest (required) - * @return ApiResponse<VerificationEmailResponse> + * @return ApiResponse<VerificationEmailSuccess> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details +
Status Code Description Response Headers
200 Ok -
401 -
429 -
500 -
*/ - public ApiResponse sendVerificationEmailWithHttpInfo(VerificationEmailRequest verificationEmailRequest) throws ApiException { + public ApiResponse sendVerificationEmailWithHttpInfo(VerificationEmailRequest verificationEmailRequest) throws ApiException { okhttp3.Call localVarCall = sendVerificationEmailValidateBeforeCall(verificationEmailRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -196,13 +199,14 @@ public ApiResponse sendVerificationEmailWithHttpInfo( Status Code Description Response Headers 200 Ok - 401 - + 429 - 500 - */ - public okhttp3.Call sendVerificationEmailAsync(VerificationEmailRequest verificationEmailRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call sendVerificationEmailAsync(VerificationEmailRequest verificationEmailRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = sendVerificationEmailValidateBeforeCall(verificationEmailRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/java/src/main/java/com/hathora/client/api/OrganizationsV1Api.java b/java/src/main/java/com/hathora/client/api/OrganizationsV1Api.java new file mode 100644 index 0000000..ee467a0 --- /dev/null +++ b/java/src/main/java/com/hathora/client/api/OrganizationsV1Api.java @@ -0,0 +1,884 @@ +/* + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.hathora.client.api; + +import com.hathora.client.ApiCallback; +import com.hathora.client.ApiClient; +import com.hathora.client.ApiException; +import com.hathora.client.ApiResponse; +import com.hathora.client.Configuration; +import com.hathora.client.Pair; +import com.hathora.client.ProgressRequestBody; +import com.hathora.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.hathora.client.model.ApiError; +import com.hathora.client.model.CreateUserInvite; +import com.hathora.client.model.OrgInvitesPage; +import com.hathora.client.model.OrgPermission; +import com.hathora.client.model.RescindUserInvite; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.ws.rs.core.GenericType; + +public class OrganizationsV1Api { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public OrganizationsV1Api() { + this(Configuration.getDefaultApiClient()); + } + + public OrganizationsV1Api(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for acceptInvite + * @param orgId (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
204 No content -
401 -
404 -
429 -
+ */ + public okhttp3.Call acceptInviteCall(String orgId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/orgs/v1/{orgId}/invites/accept" + .replace("{" + "orgId" + "}", localVarApiClient.escapeString(orgId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "hathoraDevToken" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call acceptInviteValidateBeforeCall(String orgId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'orgId' is set + if (orgId == null) { + throw new ApiException("Missing the required parameter 'orgId' when calling acceptInvite(Async)"); + } + + return acceptInviteCall(orgId, _callback); + + } + + /** + * + * + * @param orgId (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
204 No content -
401 -
404 -
429 -
+ */ + public void acceptInvite(String orgId) throws ApiException { + acceptInviteWithHttpInfo(orgId); + } + + /** + * + * + * @param orgId (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
204 No content -
401 -
404 -
429 -
+ */ + public ApiResponse acceptInviteWithHttpInfo(String orgId) throws ApiException { + okhttp3.Call localVarCall = acceptInviteValidateBeforeCall(orgId, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) + * + * @param orgId (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
204 No content -
401 -
404 -
429 -
+ */ + public okhttp3.Call acceptInviteAsync(String orgId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = acceptInviteValidateBeforeCall(orgId, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for getOrgPendingInvites + * @param orgId (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Ok -
401 -
429 -
+ */ + public okhttp3.Call getOrgPendingInvitesCall(String orgId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/orgs/v1/{orgId}/invites/pending" + .replace("{" + "orgId" + "}", localVarApiClient.escapeString(orgId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "hathoraDevToken" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getOrgPendingInvitesValidateBeforeCall(String orgId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'orgId' is set + if (orgId == null) { + throw new ApiException("Missing the required parameter 'orgId' when calling getOrgPendingInvites(Async)"); + } + + return getOrgPendingInvitesCall(orgId, _callback); + + } + + /** + * + * + * @param orgId (required) + * @return OrgInvitesPage + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Ok -
401 -
429 -
+ */ + public OrgInvitesPage getOrgPendingInvites(String orgId) throws ApiException { + ApiResponse localVarResp = getOrgPendingInvitesWithHttpInfo(orgId); + return localVarResp.getData(); + } + + /** + * + * + * @param orgId (required) + * @return ApiResponse<OrgInvitesPage> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Ok -
401 -
429 -
+ */ + public ApiResponse getOrgPendingInvitesWithHttpInfo(String orgId) throws ApiException { + okhttp3.Call localVarCall = getOrgPendingInvitesValidateBeforeCall(orgId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * + * @param orgId (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Ok -
401 -
429 -
+ */ + public okhttp3.Call getOrgPendingInvitesAsync(String orgId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getOrgPendingInvitesValidateBeforeCall(orgId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getUserPendingInvites + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Ok -
401 -
429 -
+ */ + public okhttp3.Call getUserPendingInvitesCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/orgs/v1/user/invites/pending"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "hathoraDevToken" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getUserPendingInvitesValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return getUserPendingInvitesCall(_callback); + + } + + /** + * + * + * @return OrgInvitesPage + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Ok -
401 -
429 -
+ */ + public OrgInvitesPage getUserPendingInvites() throws ApiException { + ApiResponse localVarResp = getUserPendingInvitesWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * + * + * @return ApiResponse<OrgInvitesPage> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Ok -
401 -
429 -
+ */ + public ApiResponse getUserPendingInvitesWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getUserPendingInvitesValidateBeforeCall(null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Ok -
401 -
429 -
+ */ + public okhttp3.Call getUserPendingInvitesAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getUserPendingInvitesValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for inviteUser + * @param orgId (required) + * @param createUserInvite (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Ok -
401 -
422 -
429 -
+ */ + public okhttp3.Call inviteUserCall(String orgId, CreateUserInvite createUserInvite, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createUserInvite; + + // create path and map variables + String localVarPath = "/orgs/v1/{orgId}/invites" + .replace("{" + "orgId" + "}", localVarApiClient.escapeString(orgId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "hathoraDevToken" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call inviteUserValidateBeforeCall(String orgId, CreateUserInvite createUserInvite, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'orgId' is set + if (orgId == null) { + throw new ApiException("Missing the required parameter 'orgId' when calling inviteUser(Async)"); + } + + // verify the required parameter 'createUserInvite' is set + if (createUserInvite == null) { + throw new ApiException("Missing the required parameter 'createUserInvite' when calling inviteUser(Async)"); + } + + return inviteUserCall(orgId, createUserInvite, _callback); + + } + + /** + * + * + * @param orgId (required) + * @param createUserInvite (required) + * @return OrgPermission + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Ok -
401 -
422 -
429 -
+ */ + public OrgPermission inviteUser(String orgId, CreateUserInvite createUserInvite) throws ApiException { + ApiResponse localVarResp = inviteUserWithHttpInfo(orgId, createUserInvite); + return localVarResp.getData(); + } + + /** + * + * + * @param orgId (required) + * @param createUserInvite (required) + * @return ApiResponse<OrgPermission> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Ok -
401 -
422 -
429 -
+ */ + public ApiResponse inviteUserWithHttpInfo(String orgId, CreateUserInvite createUserInvite) throws ApiException { + okhttp3.Call localVarCall = inviteUserValidateBeforeCall(orgId, createUserInvite, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * + * @param orgId (required) + * @param createUserInvite (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Ok -
401 -
422 -
429 -
+ */ + public okhttp3.Call inviteUserAsync(String orgId, CreateUserInvite createUserInvite, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = inviteUserValidateBeforeCall(orgId, createUserInvite, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for rejectInvite + * @param orgId (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
204 No content -
401 -
404 -
429 -
+ */ + public okhttp3.Call rejectInviteCall(String orgId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/orgs/v1/{orgId}/invites/reject" + .replace("{" + "orgId" + "}", localVarApiClient.escapeString(orgId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "hathoraDevToken" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call rejectInviteValidateBeforeCall(String orgId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'orgId' is set + if (orgId == null) { + throw new ApiException("Missing the required parameter 'orgId' when calling rejectInvite(Async)"); + } + + return rejectInviteCall(orgId, _callback); + + } + + /** + * + * + * @param orgId (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
204 No content -
401 -
404 -
429 -
+ */ + public void rejectInvite(String orgId) throws ApiException { + rejectInviteWithHttpInfo(orgId); + } + + /** + * + * + * @param orgId (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
204 No content -
401 -
404 -
429 -
+ */ + public ApiResponse rejectInviteWithHttpInfo(String orgId) throws ApiException { + okhttp3.Call localVarCall = rejectInviteValidateBeforeCall(orgId, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) + * + * @param orgId (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
204 No content -
401 -
404 -
429 -
+ */ + public okhttp3.Call rejectInviteAsync(String orgId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = rejectInviteValidateBeforeCall(orgId, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for rescindInvite + * @param orgId (required) + * @param rescindUserInvite (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
204 No content -
401 -
404 -
429 -
500 -
+ */ + public okhttp3.Call rescindInviteCall(String orgId, RescindUserInvite rescindUserInvite, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = rescindUserInvite; + + // create path and map variables + String localVarPath = "/orgs/v1/{orgId}/invites/rescind" + .replace("{" + "orgId" + "}", localVarApiClient.escapeString(orgId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "hathoraDevToken" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call rescindInviteValidateBeforeCall(String orgId, RescindUserInvite rescindUserInvite, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'orgId' is set + if (orgId == null) { + throw new ApiException("Missing the required parameter 'orgId' when calling rescindInvite(Async)"); + } + + // verify the required parameter 'rescindUserInvite' is set + if (rescindUserInvite == null) { + throw new ApiException("Missing the required parameter 'rescindUserInvite' when calling rescindInvite(Async)"); + } + + return rescindInviteCall(orgId, rescindUserInvite, _callback); + + } + + /** + * + * + * @param orgId (required) + * @param rescindUserInvite (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
204 No content -
401 -
404 -
429 -
500 -
+ */ + public void rescindInvite(String orgId, RescindUserInvite rescindUserInvite) throws ApiException { + rescindInviteWithHttpInfo(orgId, rescindUserInvite); + } + + /** + * + * + * @param orgId (required) + * @param rescindUserInvite (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
204 No content -
401 -
404 -
429 -
500 -
+ */ + public ApiResponse rescindInviteWithHttpInfo(String orgId, RescindUserInvite rescindUserInvite) throws ApiException { + okhttp3.Call localVarCall = rescindInviteValidateBeforeCall(orgId, rescindUserInvite, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) + * + * @param orgId (required) + * @param rescindUserInvite (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
204 No content -
401 -
404 -
429 -
500 -
+ */ + public okhttp3.Call rescindInviteAsync(String orgId, RescindUserInvite rescindUserInvite, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = rescindInviteValidateBeforeCall(orgId, rescindUserInvite, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } +} diff --git a/java/src/main/java/com/hathora/client/api/ProcessesV2Api.java b/java/src/main/java/com/hathora/client/api/ProcessesV2Api.java index 68d5d7b..10f0e89 100644 --- a/java/src/main/java/com/hathora/client/api/ProcessesV2Api.java +++ b/java/src/main/java/com/hathora/client/api/ProcessesV2Api.java @@ -76,6 +76,155 @@ public void setCustomBaseUrl(String customBaseUrl) { this.localCustomBaseUrl = customBaseUrl; } + /** + * Build call for createProcess + * @param appId (required) + * @param region (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
201 -
401 -
402 -
404 -
500 -
+ */ + public okhttp3.Call createProcessCall(String appId, Region region, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/processes/v2/{appId}/create/{region}" + .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) + .replace("{" + "region" + "}", localVarApiClient.escapeString(region.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "hathoraDevToken" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createProcessValidateBeforeCall(String appId, Region region, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException("Missing the required parameter 'appId' when calling createProcess(Async)"); + } + + // verify the required parameter 'region' is set + if (region == null) { + throw new ApiException("Missing the required parameter 'region' when calling createProcess(Async)"); + } + + return createProcessCall(appId, region, _callback); + + } + + /** + * + * Creates a [process](https://hathora.dev/docs/concepts/hathora-entities#process) without a room. Use this to pre-allocate processes ahead of time so that subsequent room assignment via [CreateRoom()](https://hathora.dev/api#tag/RoomV2/operation/CreateRoom) can be instant. + * @param appId (required) + * @param region (required) + * @return ProcessV2 + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
201 -
401 -
402 -
404 -
500 -
+ */ + public ProcessV2 createProcess(String appId, Region region) throws ApiException { + ApiResponse localVarResp = createProcessWithHttpInfo(appId, region); + return localVarResp.getData(); + } + + /** + * + * Creates a [process](https://hathora.dev/docs/concepts/hathora-entities#process) without a room. Use this to pre-allocate processes ahead of time so that subsequent room assignment via [CreateRoom()](https://hathora.dev/api#tag/RoomV2/operation/CreateRoom) can be instant. + * @param appId (required) + * @param region (required) + * @return ApiResponse<ProcessV2> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
201 -
401 -
402 -
404 -
500 -
+ */ + public ApiResponse createProcessWithHttpInfo(String appId, Region region) throws ApiException { + okhttp3.Call localVarCall = createProcessValidateBeforeCall(appId, region, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Creates a [process](https://hathora.dev/docs/concepts/hathora-entities#process) without a room. Use this to pre-allocate processes ahead of time so that subsequent room assignment via [CreateRoom()](https://hathora.dev/api#tag/RoomV2/operation/CreateRoom) can be instant. + * @param appId (required) + * @param region (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
201 -
401 -
402 -
404 -
500 -
+ */ + public okhttp3.Call createProcessAsync(String appId, Region region, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createProcessValidateBeforeCall(appId, region, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for getLatestProcesses * @param appId (required) diff --git a/java/src/main/java/com/hathora/client/api/RoomV1Api.java b/java/src/main/java/com/hathora/client/api/RoomV1Api.java index b732085..535378e 100644 --- a/java/src/main/java/com/hathora/client/api/RoomV1Api.java +++ b/java/src/main/java/com/hathora/client/api/RoomV1Api.java @@ -94,6 +94,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 402 - 403 - 404 - + 429 - 500 - * @deprecated @@ -183,6 +184,7 @@ private okhttp3.Call createRoomDeprecatedValidateBeforeCall(String appId, Create 402 - 403 - 404 - + 429 - 500 - * @deprecated @@ -210,6 +212,7 @@ public String createRoomDeprecated(String appId, CreateRoomParams createRoomPara 402 - 403 - 404 - + 429 - 500 - * @deprecated @@ -239,6 +242,7 @@ public ApiResponse createRoomDeprecatedWithHttpInfo(String appId, Create 402 - 403 - 404 - + 429 - 500 - * @deprecated @@ -264,6 +268,7 @@ public okhttp3.Call createRoomDeprecatedAsync(String appId, CreateRoomParams cre 204 No content - 401 - 404 - + 429 - 500 - * @deprecated @@ -344,6 +349,7 @@ private okhttp3.Call destroyRoomDeprecatedValidateBeforeCall(String appId, Strin 204 No content - 401 - 404 - + 429 - 500 - * @deprecated @@ -366,6 +372,7 @@ public void destroyRoomDeprecated(String appId, String roomId) throws ApiExcepti 204 No content - 401 - 404 - + 429 - 500 - * @deprecated @@ -390,6 +397,7 @@ public ApiResponse destroyRoomDeprecatedWithHttpInfo(String appId, String 204 No content - 401 - 404 - + 429 - 500 - * @deprecated @@ -1022,6 +1030,7 @@ public okhttp3.Call getRoomInfoDeprecatedAsync(String appId, String roomId, fina 204 No content - 401 - 404 - + 429 - 500 - * @deprecated @@ -1102,6 +1111,7 @@ private okhttp3.Call suspendRoomDeprecatedValidateBeforeCall(String appId, Strin 204 No content - 401 - 404 - + 429 - 500 - * @deprecated @@ -1124,6 +1134,7 @@ public void suspendRoomDeprecated(String appId, String roomId) throws ApiExcepti 204 No content - 401 - 404 - + 429 - 500 - * @deprecated @@ -1148,6 +1159,7 @@ public ApiResponse suspendRoomDeprecatedWithHttpInfo(String appId, String 204 No content - 401 - 404 - + 429 - 500 - * @deprecated diff --git a/java/src/main/java/com/hathora/client/api/RoomV2Api.java b/java/src/main/java/com/hathora/client/api/RoomV2Api.java index 6f35416..a868421 100644 --- a/java/src/main/java/com/hathora/client/api/RoomV2Api.java +++ b/java/src/main/java/com/hathora/client/api/RoomV2Api.java @@ -30,9 +30,9 @@ import com.hathora.client.model.ApiError; import com.hathora.client.model.ConnectionInfoV2; import com.hathora.client.model.CreateRoomParams; -import com.hathora.client.model.CreateRoomResponse; import com.hathora.client.model.PickRoomExcludeKeyofRoomAllocations; import com.hathora.client.model.Room; +import com.hathora.client.model.RoomConnectionData; import com.hathora.client.model.UpdateRoomConfigParams; import java.lang.reflect.Type; @@ -96,6 +96,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 402 - 403 - 404 - + 429 - 500 - */ @@ -171,7 +172,7 @@ private okhttp3.Call createRoomValidateBeforeCall(String appId, CreateRoomParams * @param appId (required) * @param createRoomParams (required) * @param roomId (optional) - * @return CreateRoomResponse + * @return RoomConnectionData * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -182,11 +183,12 @@ private okhttp3.Call createRoomValidateBeforeCall(String appId, CreateRoomParams +
402 -
403 -
404 -
429 -
500 -
*/ - public CreateRoomResponse createRoom(String appId, CreateRoomParams createRoomParams, String roomId) throws ApiException { - ApiResponse localVarResp = createRoomWithHttpInfo(appId, createRoomParams, roomId); + public RoomConnectionData createRoom(String appId, CreateRoomParams createRoomParams, String roomId) throws ApiException { + ApiResponse localVarResp = createRoomWithHttpInfo(appId, createRoomParams, roomId); return localVarResp.getData(); } @@ -196,7 +198,7 @@ public CreateRoomResponse createRoom(String appId, CreateRoomParams createRoomPa * @param appId (required) * @param createRoomParams (required) * @param roomId (optional) - * @return ApiResponse<CreateRoomResponse> + * @return ApiResponse<RoomConnectionData> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -207,12 +209,13 @@ public CreateRoomResponse createRoom(String appId, CreateRoomParams createRoomPa +
402 -
403 -
404 -
429 -
500 -
*/ - public ApiResponse createRoomWithHttpInfo(String appId, CreateRoomParams createRoomParams, String roomId) throws ApiException { + public ApiResponse createRoomWithHttpInfo(String appId, CreateRoomParams createRoomParams, String roomId) throws ApiException { okhttp3.Call localVarCall = createRoomValidateBeforeCall(appId, createRoomParams, roomId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -234,13 +237,14 @@ public ApiResponse createRoomWithHttpInfo(String appId, Crea 402 - 403 - 404 - + 429 - 500 - */ - public okhttp3.Call createRoomAsync(String appId, CreateRoomParams createRoomParams, String roomId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createRoomAsync(String appId, CreateRoomParams createRoomParams, String roomId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createRoomValidateBeforeCall(appId, createRoomParams, roomId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -257,6 +261,7 @@ public okhttp3.Call createRoomAsync(String appId, CreateRoomParams createRoomPar 204 No content - 401 - 404 - + 429 - 500 - */ @@ -334,6 +339,7 @@ private okhttp3.Call destroyRoomValidateBeforeCall(String appId, String roomId, 204 No content - 401 - 404 - + 429 - 500 - */ @@ -354,6 +360,7 @@ public void destroyRoom(String appId, String roomId) throws ApiException { 204 No content - 401 - 404 - + 429 - 500 - */ @@ -376,6 +383,7 @@ public ApiResponse destroyRoomWithHttpInfo(String appId, String roomId) th 204 No content - 401 - 404 - + 429 - 500 - */ @@ -958,7 +966,7 @@ public okhttp3.Call getRoomInfoAsync(String appId, String roomId, final ApiCallb return localVarCall; } /** - * Build call for suspendRoom + * Build call for suspendRoomV2Deprecated * @param appId (required) * @param roomId (required) * @param _callback Callback for upload/download progress @@ -970,10 +978,13 @@ public okhttp3.Call getRoomInfoAsync(String appId, String roomId, final ApiCallb 204 No content - 401 - 404 - + 429 - 500 - + * @deprecated */ - public okhttp3.Call suspendRoomCall(String appId, String roomId, final ApiCallback _callback) throws ApiException { + @Deprecated + public okhttp3.Call suspendRoomV2DeprecatedCall(String appId, String roomId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1019,19 +1030,20 @@ public okhttp3.Call suspendRoomCall(String appId, String roomId, final ApiCallba return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } + @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call suspendRoomValidateBeforeCall(String appId, String roomId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call suspendRoomV2DeprecatedValidateBeforeCall(String appId, String roomId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling suspendRoom(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling suspendRoomV2Deprecated(Async)"); } // verify the required parameter 'roomId' is set if (roomId == null) { - throw new ApiException("Missing the required parameter 'roomId' when calling suspendRoom(Async)"); + throw new ApiException("Missing the required parameter 'roomId' when calling suspendRoomV2Deprecated(Async)"); } - return suspendRoomCall(appId, roomId, _callback); + return suspendRoomV2DeprecatedCall(appId, roomId, _callback); } @@ -1047,11 +1059,14 @@ private okhttp3.Call suspendRoomValidateBeforeCall(String appId, String roomId, 204 No content - 401 - 404 - + 429 - 500 - + * @deprecated */ - public void suspendRoom(String appId, String roomId) throws ApiException { - suspendRoomWithHttpInfo(appId, roomId); + @Deprecated + public void suspendRoomV2Deprecated(String appId, String roomId) throws ApiException { + suspendRoomV2DeprecatedWithHttpInfo(appId, roomId); } /** @@ -1067,11 +1082,14 @@ public void suspendRoom(String appId, String roomId) throws ApiException { 204 No content - 401 - 404 - + 429 - 500 - + * @deprecated */ - public ApiResponse suspendRoomWithHttpInfo(String appId, String roomId) throws ApiException { - okhttp3.Call localVarCall = suspendRoomValidateBeforeCall(appId, roomId, null); + @Deprecated + public ApiResponse suspendRoomV2DeprecatedWithHttpInfo(String appId, String roomId) throws ApiException { + okhttp3.Call localVarCall = suspendRoomV2DeprecatedValidateBeforeCall(appId, roomId, null); return localVarApiClient.execute(localVarCall); } @@ -1089,12 +1107,15 @@ public ApiResponse suspendRoomWithHttpInfo(String appId, String roomId) th 204 No content - 401 - 404 - + 429 - 500 - + * @deprecated */ - public okhttp3.Call suspendRoomAsync(String appId, String roomId, final ApiCallback _callback) throws ApiException { + @Deprecated + public okhttp3.Call suspendRoomV2DeprecatedAsync(String appId, String roomId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = suspendRoomValidateBeforeCall(appId, roomId, _callback); + okhttp3.Call localVarCall = suspendRoomV2DeprecatedValidateBeforeCall(appId, roomId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } @@ -1112,6 +1133,7 @@ public okhttp3.Call suspendRoomAsync(String appId, String roomId, final ApiCallb 204 No content - 401 - 404 - + 429 - 500 - */ @@ -1196,6 +1218,7 @@ private okhttp3.Call updateRoomConfigValidateBeforeCall(String appId, String roo 204 No content - 401 - 404 - + 429 - 500 - */ @@ -1217,6 +1240,7 @@ public void updateRoomConfig(String appId, String roomId, UpdateRoomConfigParams 204 No content - 401 - 404 - + 429 - 500 - */ @@ -1240,6 +1264,7 @@ public ApiResponse updateRoomConfigWithHttpInfo(String appId, String roomI 204 No content - 401 - 404 - + 429 - 500 - */ diff --git a/java/src/main/java/com/hathora/client/model/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.java b/java/src/main/java/com/hathora/client/model/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.java index 3cb6401..6040868 100644 --- a/java/src/main/java/com/hathora/client/model/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.java +++ b/java/src/main/java/com/hathora/client/model/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.java @@ -22,8 +22,7 @@ import com.google.gson.stream.JsonWriter; import com.hathora.client.model.Build; import com.hathora.client.model.ContainerPort; -import com.hathora.client.model.DeploymentEnvInner; -import com.hathora.client.model.PlanName; +import com.hathora.client.model.DeploymentV2EnvInner; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; @@ -57,20 +56,16 @@ public class ApplicationWithLatestDeploymentAndBuildAllOfDeployment { public static final String SERIALIZED_NAME_IDLE_TIMEOUT_ENABLED = "idleTimeoutEnabled"; @SerializedName(SERIALIZED_NAME_IDLE_TIMEOUT_ENABLED) - private Boolean idleTimeoutEnabled = true; + private Boolean idleTimeoutEnabled; public static final String SERIALIZED_NAME_ENV = "env"; @SerializedName(SERIALIZED_NAME_ENV) - private List env = new ArrayList<>(); + private List env = new ArrayList<>(); public static final String SERIALIZED_NAME_ROOMS_PER_PROCESS = "roomsPerProcess"; @SerializedName(SERIALIZED_NAME_ROOMS_PER_PROCESS) private Integer roomsPerProcess; - public static final String SERIALIZED_NAME_PLAN_NAME = "planName"; - @SerializedName(SERIALIZED_NAME_PLAN_NAME) - private PlanName planName; - public static final String SERIALIZED_NAME_ADDITIONAL_CONTAINER_PORTS = "additionalContainerPorts"; @SerializedName(SERIALIZED_NAME_ADDITIONAL_CONTAINER_PORTS) private List additionalContainerPorts = new ArrayList<>(); @@ -79,63 +74,6 @@ public class ApplicationWithLatestDeploymentAndBuildAllOfDeployment { @SerializedName(SERIALIZED_NAME_DEFAULT_CONTAINER_PORT) private ContainerPort defaultContainerPort; - /** - * Gets or Sets transportType - */ - @JsonAdapter(TransportTypeEnum.Adapter.class) - public enum TransportTypeEnum { - TCP("tcp"), - - UDP("udp"), - - TLS("tls"); - - private String value; - - TransportTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TransportTypeEnum fromValue(String value) { - for (TransportTypeEnum b : TransportTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TransportTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TransportTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TransportTypeEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_TRANSPORT_TYPE = "transportType"; - @SerializedName(SERIALIZED_NAME_TRANSPORT_TYPE) - private TransportTypeEnum transportType; - - public static final String SERIALIZED_NAME_CONTAINER_PORT = "containerPort"; - @SerializedName(SERIALIZED_NAME_CONTAINER_PORT) - private Double containerPort; - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; @SerializedName(SERIALIZED_NAME_CREATED_AT) private OffsetDateTime createdAt; @@ -146,7 +84,7 @@ public TransportTypeEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_REQUESTED_MEMORY_M_B = "requestedMemoryMB"; @SerializedName(SERIALIZED_NAME_REQUESTED_MEMORY_M_B) - private Integer requestedMemoryMB; + private Double requestedMemoryMB; public static final String SERIALIZED_NAME_REQUESTED_C_P_U = "requestedCPU"; @SerializedName(SERIALIZED_NAME_REQUESTED_C_P_U) @@ -181,7 +119,7 @@ public ApplicationWithLatestDeploymentAndBuildAllOfDeployment idleTimeoutEnabled * Option to shut down processes that have had no new connections or rooms for five minutes. * @return idleTimeoutEnabled **/ - @javax.annotation.Nullable + @javax.annotation.Nonnull public Boolean getIdleTimeoutEnabled() { return idleTimeoutEnabled; @@ -193,13 +131,13 @@ public void setIdleTimeoutEnabled(Boolean idleTimeoutEnabled) { } - public ApplicationWithLatestDeploymentAndBuildAllOfDeployment env(List env) { + public ApplicationWithLatestDeploymentAndBuildAllOfDeployment env(List env) { this.env = env; return this; } - public ApplicationWithLatestDeploymentAndBuildAllOfDeployment addEnvItem(DeploymentEnvInner envItem) { + public ApplicationWithLatestDeploymentAndBuildAllOfDeployment addEnvItem(DeploymentV2EnvInner envItem) { if (this.env == null) { this.env = new ArrayList<>(); } @@ -213,12 +151,12 @@ public ApplicationWithLatestDeploymentAndBuildAllOfDeployment addEnvItem(Deploym **/ @javax.annotation.Nonnull - public List getEnv() { + public List getEnv() { return env; } - public void setEnv(List env) { + public void setEnv(List env) { this.env = env; } @@ -247,28 +185,6 @@ public void setRoomsPerProcess(Integer roomsPerProcess) { } - public ApplicationWithLatestDeploymentAndBuildAllOfDeployment planName(PlanName planName) { - - this.planName = planName; - return this; - } - - /** - * Get planName - * @return planName - **/ - @javax.annotation.Nonnull - - public PlanName getPlanName() { - return planName; - } - - - public void setPlanName(PlanName planName) { - this.planName = planName; - } - - public ApplicationWithLatestDeploymentAndBuildAllOfDeployment additionalContainerPorts(List additionalContainerPorts) { this.additionalContainerPorts = additionalContainerPorts; @@ -321,54 +237,6 @@ public void setDefaultContainerPort(ContainerPort defaultContainerPort) { } - public ApplicationWithLatestDeploymentAndBuildAllOfDeployment transportType(TransportTypeEnum transportType) { - - this.transportType = transportType; - return this; - } - - /** - * Get transportType - * @return transportType - * @deprecated - **/ - @Deprecated - @javax.annotation.Nonnull - - public TransportTypeEnum getTransportType() { - return transportType; - } - - - public void setTransportType(TransportTypeEnum transportType) { - this.transportType = transportType; - } - - - public ApplicationWithLatestDeploymentAndBuildAllOfDeployment containerPort(Double containerPort) { - - this.containerPort = containerPort; - return this; - } - - /** - * Get containerPort - * @return containerPort - * @deprecated - **/ - @Deprecated - @javax.annotation.Nonnull - - public Double getContainerPort() { - return containerPort; - } - - - public void setContainerPort(Double containerPort) { - this.containerPort = containerPort; - } - - public ApplicationWithLatestDeploymentAndBuildAllOfDeployment createdAt(OffsetDateTime createdAt) { this.createdAt = createdAt; @@ -413,7 +281,7 @@ public void setCreatedBy(String createdBy) { } - public ApplicationWithLatestDeploymentAndBuildAllOfDeployment requestedMemoryMB(Integer requestedMemoryMB) { + public ApplicationWithLatestDeploymentAndBuildAllOfDeployment requestedMemoryMB(Double requestedMemoryMB) { this.requestedMemoryMB = requestedMemoryMB; return this; @@ -425,12 +293,12 @@ public ApplicationWithLatestDeploymentAndBuildAllOfDeployment requestedMemoryMB( **/ @javax.annotation.Nonnull - public Integer getRequestedMemoryMB() { + public Double getRequestedMemoryMB() { return requestedMemoryMB; } - public void setRequestedMemoryMB(Integer requestedMemoryMB) { + public void setRequestedMemoryMB(Double requestedMemoryMB) { this.requestedMemoryMB = requestedMemoryMB; } @@ -602,11 +470,8 @@ public boolean equals(Object o) { return Objects.equals(this.idleTimeoutEnabled, applicationWithLatestDeploymentAndBuildAllOfDeployment.idleTimeoutEnabled) && Objects.equals(this.env, applicationWithLatestDeploymentAndBuildAllOfDeployment.env) && Objects.equals(this.roomsPerProcess, applicationWithLatestDeploymentAndBuildAllOfDeployment.roomsPerProcess) && - Objects.equals(this.planName, applicationWithLatestDeploymentAndBuildAllOfDeployment.planName) && Objects.equals(this.additionalContainerPorts, applicationWithLatestDeploymentAndBuildAllOfDeployment.additionalContainerPorts) && Objects.equals(this.defaultContainerPort, applicationWithLatestDeploymentAndBuildAllOfDeployment.defaultContainerPort) && - Objects.equals(this.transportType, applicationWithLatestDeploymentAndBuildAllOfDeployment.transportType) && - Objects.equals(this.containerPort, applicationWithLatestDeploymentAndBuildAllOfDeployment.containerPort) && Objects.equals(this.createdAt, applicationWithLatestDeploymentAndBuildAllOfDeployment.createdAt) && Objects.equals(this.createdBy, applicationWithLatestDeploymentAndBuildAllOfDeployment.createdBy) && Objects.equals(this.requestedMemoryMB, applicationWithLatestDeploymentAndBuildAllOfDeployment.requestedMemoryMB) && @@ -620,7 +485,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(idleTimeoutEnabled, env, roomsPerProcess, planName, additionalContainerPorts, defaultContainerPort, transportType, containerPort, createdAt, createdBy, requestedMemoryMB, requestedCPU, deploymentId, buildId, appId, build, additionalProperties); + return Objects.hash(idleTimeoutEnabled, env, roomsPerProcess, additionalContainerPorts, defaultContainerPort, createdAt, createdBy, requestedMemoryMB, requestedCPU, deploymentId, buildId, appId, build, additionalProperties); } @Override @@ -630,11 +495,8 @@ public String toString() { sb.append(" idleTimeoutEnabled: ").append(toIndentedString(idleTimeoutEnabled)).append("\n"); sb.append(" env: ").append(toIndentedString(env)).append("\n"); sb.append(" roomsPerProcess: ").append(toIndentedString(roomsPerProcess)).append("\n"); - sb.append(" planName: ").append(toIndentedString(planName)).append("\n"); sb.append(" additionalContainerPorts: ").append(toIndentedString(additionalContainerPorts)).append("\n"); sb.append(" defaultContainerPort: ").append(toIndentedString(defaultContainerPort)).append("\n"); - sb.append(" transportType: ").append(toIndentedString(transportType)).append("\n"); - sb.append(" containerPort: ").append(toIndentedString(containerPort)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); sb.append(" requestedMemoryMB: ").append(toIndentedString(requestedMemoryMB)).append("\n"); @@ -669,11 +531,8 @@ private String toIndentedString(Object o) { openapiFields.add("idleTimeoutEnabled"); openapiFields.add("env"); openapiFields.add("roomsPerProcess"); - openapiFields.add("planName"); openapiFields.add("additionalContainerPorts"); openapiFields.add("defaultContainerPort"); - openapiFields.add("transportType"); - openapiFields.add("containerPort"); openapiFields.add("createdAt"); openapiFields.add("createdBy"); openapiFields.add("requestedMemoryMB"); @@ -685,13 +544,11 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("idleTimeoutEnabled"); openapiRequiredFields.add("env"); openapiRequiredFields.add("roomsPerProcess"); - openapiRequiredFields.add("planName"); openapiRequiredFields.add("additionalContainerPorts"); openapiRequiredFields.add("defaultContainerPort"); - openapiRequiredFields.add("transportType"); - openapiRequiredFields.add("containerPort"); openapiRequiredFields.add("createdAt"); openapiRequiredFields.add("createdBy"); openapiRequiredFields.add("requestedMemoryMB"); @@ -729,7 +586,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayenv = jsonObj.getAsJsonArray("env"); // validate the required field `env` (array) for (int i = 0; i < jsonArrayenv.size(); i++) { - DeploymentEnvInner.validateJsonObject(jsonArrayenv.get(i).getAsJsonObject()); + DeploymentV2EnvInner.validateJsonObject(jsonArrayenv.get(i).getAsJsonObject()); }; // ensure the json data is an array if (!jsonObj.get("additionalContainerPorts").isJsonArray()) { @@ -743,9 +600,6 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { }; // validate the required field `defaultContainerPort` ContainerPort.validateJsonObject(jsonObj.getAsJsonObject("defaultContainerPort")); - if (!jsonObj.get("transportType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transportType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transportType").toString())); - } if (!jsonObj.get("createdBy").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `createdBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("createdBy").toString())); } diff --git a/java/src/main/java/com/hathora/client/model/Build.java b/java/src/main/java/com/hathora/client/model/Build.java index 49ea8f3..192cddc 100644 --- a/java/src/main/java/com/hathora/client/model/Build.java +++ b/java/src/main/java/com/hathora/client/model/Build.java @@ -64,7 +64,7 @@ public class Build { public static final String SERIALIZED_NAME_IMAGE_SIZE = "imageSize"; @SerializedName(SERIALIZED_NAME_IMAGE_SIZE) - private Integer imageSize; + private Long imageSize; public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) @@ -108,7 +108,7 @@ public Build buildTag(String buildTag) { } /** - * Tag to associate an external version with a build. It is accessible via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV1/operation/GetBuildInfo). + * Tag to associate an external version with a build. It is accessible via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV2/operation/GetBuildInfo). * @return buildTag **/ @javax.annotation.Nullable @@ -155,7 +155,7 @@ public void setRegionalContainerTags(List regio } - public Build imageSize(Integer imageSize) { + public Build imageSize(Long imageSize) { this.imageSize = imageSize; return this; @@ -167,12 +167,12 @@ public Build imageSize(Integer imageSize) { **/ @javax.annotation.Nonnull - public Integer getImageSize() { + public Long getImageSize() { return imageSize; } - public void setImageSize(Integer imageSize) { + public void setImageSize(Long imageSize) { this.imageSize = imageSize; } @@ -228,7 +228,7 @@ public Build finishedAt(OffsetDateTime finishedAt) { } /** - * When [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) finished executing. + * When [`RunBuild()`](https://hathora.dev/api#tag/BuildV2/operation/RunBuild) finished executing. * @return finishedAt **/ @javax.annotation.Nullable @@ -250,7 +250,7 @@ public Build startedAt(OffsetDateTime startedAt) { } /** - * When [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) is called. + * When [`RunBuild()`](https://hathora.dev/api#tag/BuildV2/operation/RunBuild) is called. * @return startedAt **/ @javax.annotation.Nullable @@ -272,7 +272,7 @@ public Build createdAt(OffsetDateTime createdAt) { } /** - * When [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild) is called. + * When [`CreateBuild()`](https://hathora.dev/api#tag/BuildV2/operation/CreateBuild) is called. * @return createdAt **/ @javax.annotation.Nonnull diff --git a/java/src/main/java/com/hathora/client/model/ConnectionInfoV2.java b/java/src/main/java/com/hathora/client/model/ConnectionInfoV2.java index 332f517..3a97c54 100644 --- a/java/src/main/java/com/hathora/client/model/ConnectionInfoV2.java +++ b/java/src/main/java/com/hathora/client/model/ConnectionInfoV2.java @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import com.hathora.client.model.ExposedPort; +import com.hathora.client.model.RoomReadyStatus; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -59,56 +60,9 @@ public class ConnectionInfoV2 { @SerializedName(SERIALIZED_NAME_EXPOSED_PORT) private ExposedPort exposedPort; - /** - * `exposedPort` will only be available when the `status` of a room is \"active\". - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - STARTING("starting"), - - ACTIVE("active"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); - } - } - } - public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) - private StatusEnum status; + private RoomReadyStatus status; public static final String SERIALIZED_NAME_ROOM_ID = "roomId"; @SerializedName(SERIALIZED_NAME_ROOM_ID) @@ -169,24 +123,24 @@ public void setExposedPort(ExposedPort exposedPort) { } - public ConnectionInfoV2 status(StatusEnum status) { + public ConnectionInfoV2 status(RoomReadyStatus status) { this.status = status; return this; } /** - * `exposedPort` will only be available when the `status` of a room is \"active\". + * Get status * @return status **/ @javax.annotation.Nonnull - public StatusEnum getStatus() { + public RoomReadyStatus getStatus() { return status; } - public void setStatus(StatusEnum status) { + public void setStatus(RoomReadyStatus status) { this.status = status; } @@ -355,9 +309,6 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj.get("exposedPort") != null && !jsonObj.get("exposedPort").isJsonNull()) { ExposedPort.validateJsonObject(jsonObj.getAsJsonObject("exposedPort")); } - if (!jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); - } if (!jsonObj.get("roomId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `roomId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("roomId").toString())); } diff --git a/java/src/main/java/com/hathora/client/model/CreateBuildParams.java b/java/src/main/java/com/hathora/client/model/CreateBuildParams.java index 195b539..b78b970 100644 --- a/java/src/main/java/com/hathora/client/model/CreateBuildParams.java +++ b/java/src/main/java/com/hathora/client/model/CreateBuildParams.java @@ -62,7 +62,7 @@ public CreateBuildParams buildTag(String buildTag) { } /** - * Tag to associate an external version with a build. It is accessible via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV1/operation/GetBuildInfo). + * Tag to associate an external version with a build. It is accessible via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV2/operation/GetBuildInfo). * @return buildTag **/ @javax.annotation.Nullable diff --git a/java/src/main/java/com/hathora/client/model/CreateUserInvite.java b/java/src/main/java/com/hathora/client/model/CreateUserInvite.java new file mode 100644 index 0000000..03caf3f --- /dev/null +++ b/java/src/main/java/com/hathora/client/model/CreateUserInvite.java @@ -0,0 +1,288 @@ +/* + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.hathora.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.hathora.client.JSON; + +/** + * CreateUserInvite + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateUserInvite { + public static final String SERIALIZED_NAME_USER_EMAIL = "userEmail"; + @SerializedName(SERIALIZED_NAME_USER_EMAIL) + private String userEmail; + + public CreateUserInvite() { + } + + public CreateUserInvite userEmail(String userEmail) { + + this.userEmail = userEmail; + return this; + } + + /** + * Get userEmail + * @return userEmail + **/ + @javax.annotation.Nonnull + + public String getUserEmail() { + return userEmail; + } + + + public void setUserEmail(String userEmail) { + this.userEmail = userEmail; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateUserInvite instance itself + */ + public CreateUserInvite putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateUserInvite createUserInvite = (CreateUserInvite) o; + return Objects.equals(this.userEmail, createUserInvite.userEmail)&& + Objects.equals(this.additionalProperties, createUserInvite.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(userEmail, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateUserInvite {\n"); + sb.append(" userEmail: ").append(toIndentedString(userEmail)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("userEmail"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("userEmail"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CreateUserInvite + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CreateUserInvite.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateUserInvite is not found in the empty JSON string", CreateUserInvite.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateUserInvite.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("userEmail").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `userEmail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userEmail").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateUserInvite.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateUserInvite' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateUserInvite.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateUserInvite value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateUserInvite read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CreateUserInvite instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateUserInvite given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateUserInvite + * @throws IOException if the JSON string is invalid with respect to CreateUserInvite + */ + public static CreateUserInvite fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateUserInvite.class); + } + + /** + * Convert an instance of CreateUserInvite to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/java/src/main/java/com/hathora/client/model/Deployment.java b/java/src/main/java/com/hathora/client/model/Deployment.java index d74608a..3ca3649 100644 --- a/java/src/main/java/com/hathora/client/model/Deployment.java +++ b/java/src/main/java/com/hathora/client/model/Deployment.java @@ -21,7 +21,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import com.hathora.client.model.ContainerPort; -import com.hathora.client.model.DeploymentEnvInner; +import com.hathora.client.model.DeploymentV2EnvInner; import com.hathora.client.model.PlanName; import java.io.IOException; import java.time.OffsetDateTime; @@ -60,7 +60,7 @@ public class Deployment { public static final String SERIALIZED_NAME_ENV = "env"; @SerializedName(SERIALIZED_NAME_ENV) - private List env = new ArrayList<>(); + private List env = new ArrayList<>(); public static final String SERIALIZED_NAME_ROOMS_PER_PROCESS = "roomsPerProcess"; @SerializedName(SERIALIZED_NAME_ROOMS_PER_PROCESS) @@ -188,13 +188,13 @@ public void setIdleTimeoutEnabled(Boolean idleTimeoutEnabled) { } - public Deployment env(List env) { + public Deployment env(List env) { this.env = env; return this; } - public Deployment addEnvItem(DeploymentEnvInner envItem) { + public Deployment addEnvItem(DeploymentV2EnvInner envItem) { if (this.env == null) { this.env = new ArrayList<>(); } @@ -208,12 +208,12 @@ public Deployment addEnvItem(DeploymentEnvInner envItem) { **/ @javax.annotation.Nonnull - public List getEnv() { + public List getEnv() { return env; } - public void setEnv(List env) { + public void setEnv(List env) { this.env = env; } @@ -698,7 +698,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayenv = jsonObj.getAsJsonArray("env"); // validate the required field `env` (array) for (int i = 0; i < jsonArrayenv.size(); i++) { - DeploymentEnvInner.validateJsonObject(jsonArrayenv.get(i).getAsJsonObject()); + DeploymentV2EnvInner.validateJsonObject(jsonArrayenv.get(i).getAsJsonObject()); }; // ensure the json data is an array if (!jsonObj.get("additionalContainerPorts").isJsonArray()) { diff --git a/java/src/main/java/com/hathora/client/model/DeploymentConfig.java b/java/src/main/java/com/hathora/client/model/DeploymentConfig.java index cea6d3f..14cfbd3 100644 --- a/java/src/main/java/com/hathora/client/model/DeploymentConfig.java +++ b/java/src/main/java/com/hathora/client/model/DeploymentConfig.java @@ -21,7 +21,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import com.hathora.client.model.ContainerPort; -import com.hathora.client.model.DeploymentEnvInner; +import com.hathora.client.model.DeploymentV2EnvInner; import com.hathora.client.model.PlanName; import com.hathora.client.model.TransportType; import java.io.IOException; @@ -60,7 +60,7 @@ public class DeploymentConfig { public static final String SERIALIZED_NAME_ENV = "env"; @SerializedName(SERIALIZED_NAME_ENV) - private List env = new ArrayList<>(); + private List env = new ArrayList<>(); public static final String SERIALIZED_NAME_ROOMS_PER_PROCESS = "roomsPerProcess"; @SerializedName(SERIALIZED_NAME_ROOMS_PER_PROCESS) @@ -107,13 +107,13 @@ public void setIdleTimeoutEnabled(Boolean idleTimeoutEnabled) { } - public DeploymentConfig env(List env) { + public DeploymentConfig env(List env) { this.env = env; return this; } - public DeploymentConfig addEnvItem(DeploymentEnvInner envItem) { + public DeploymentConfig addEnvItem(DeploymentV2EnvInner envItem) { if (this.env == null) { this.env = new ArrayList<>(); } @@ -127,12 +127,12 @@ public DeploymentConfig addEnvItem(DeploymentEnvInner envItem) { **/ @javax.annotation.Nonnull - public List getEnv() { + public List getEnv() { return env; } - public void setEnv(List env) { + public void setEnv(List env) { this.env = env; } @@ -406,7 +406,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArrayenv = jsonObj.getAsJsonArray("env"); // validate the required field `env` (array) for (int i = 0; i < jsonArrayenv.size(); i++) { - DeploymentEnvInner.validateJsonObject(jsonArrayenv.get(i).getAsJsonObject()); + DeploymentV2EnvInner.validateJsonObject(jsonArrayenv.get(i).getAsJsonObject()); }; if (jsonObj.get("additionalContainerPorts") != null && !jsonObj.get("additionalContainerPorts").isJsonNull()) { JsonArray jsonArrayadditionalContainerPorts = jsonObj.getAsJsonArray("additionalContainerPorts"); diff --git a/java/src/main/java/com/hathora/client/model/DeploymentConfigV2.java b/java/src/main/java/com/hathora/client/model/DeploymentConfigV2.java new file mode 100644 index 0000000..9c085a8 --- /dev/null +++ b/java/src/main/java/com/hathora/client/model/DeploymentConfigV2.java @@ -0,0 +1,543 @@ +/* + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.hathora.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.hathora.client.model.ContainerPort; +import com.hathora.client.model.DeploymentV2EnvInner; +import com.hathora.client.model.TransportType; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.hathora.client.JSON; + +/** + * DeploymentConfigV2 + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DeploymentConfigV2 { + public static final String SERIALIZED_NAME_IDLE_TIMEOUT_ENABLED = "idleTimeoutEnabled"; + @SerializedName(SERIALIZED_NAME_IDLE_TIMEOUT_ENABLED) + private Boolean idleTimeoutEnabled; + + public static final String SERIALIZED_NAME_ENV = "env"; + @SerializedName(SERIALIZED_NAME_ENV) + private List env = new ArrayList<>(); + + public static final String SERIALIZED_NAME_ROOMS_PER_PROCESS = "roomsPerProcess"; + @SerializedName(SERIALIZED_NAME_ROOMS_PER_PROCESS) + private Integer roomsPerProcess; + + public static final String SERIALIZED_NAME_ADDITIONAL_CONTAINER_PORTS = "additionalContainerPorts"; + @SerializedName(SERIALIZED_NAME_ADDITIONAL_CONTAINER_PORTS) + private List additionalContainerPorts; + + public static final String SERIALIZED_NAME_TRANSPORT_TYPE = "transportType"; + @SerializedName(SERIALIZED_NAME_TRANSPORT_TYPE) + private TransportType transportType; + + public static final String SERIALIZED_NAME_CONTAINER_PORT = "containerPort"; + @SerializedName(SERIALIZED_NAME_CONTAINER_PORT) + private Integer containerPort; + + public static final String SERIALIZED_NAME_REQUESTED_MEMORY_M_B = "requestedMemoryMB"; + @SerializedName(SERIALIZED_NAME_REQUESTED_MEMORY_M_B) + private Double requestedMemoryMB; + + public static final String SERIALIZED_NAME_REQUESTED_C_P_U = "requestedCPU"; + @SerializedName(SERIALIZED_NAME_REQUESTED_C_P_U) + private Double requestedCPU; + + public DeploymentConfigV2() { + } + + public DeploymentConfigV2 idleTimeoutEnabled(Boolean idleTimeoutEnabled) { + + this.idleTimeoutEnabled = idleTimeoutEnabled; + return this; + } + + /** + * Option to shut down processes that have had no new connections or rooms for five minutes. + * @return idleTimeoutEnabled + **/ + @javax.annotation.Nonnull + + public Boolean getIdleTimeoutEnabled() { + return idleTimeoutEnabled; + } + + + public void setIdleTimeoutEnabled(Boolean idleTimeoutEnabled) { + this.idleTimeoutEnabled = idleTimeoutEnabled; + } + + + public DeploymentConfigV2 env(List env) { + + this.env = env; + return this; + } + + public DeploymentConfigV2 addEnvItem(DeploymentV2EnvInner envItem) { + if (this.env == null) { + this.env = new ArrayList<>(); + } + this.env.add(envItem); + return this; + } + + /** + * The environment variable that our process will have access to at runtime. + * @return env + **/ + @javax.annotation.Nonnull + + public List getEnv() { + return env; + } + + + public void setEnv(List env) { + this.env = env; + } + + + public DeploymentConfigV2 roomsPerProcess(Integer roomsPerProcess) { + + this.roomsPerProcess = roomsPerProcess; + return this; + } + + /** + * Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. + * minimum: 1 + * maximum: 10000 + * @return roomsPerProcess + **/ + @javax.annotation.Nonnull + + public Integer getRoomsPerProcess() { + return roomsPerProcess; + } + + + public void setRoomsPerProcess(Integer roomsPerProcess) { + this.roomsPerProcess = roomsPerProcess; + } + + + public DeploymentConfigV2 additionalContainerPorts(List additionalContainerPorts) { + + this.additionalContainerPorts = additionalContainerPorts; + return this; + } + + public DeploymentConfigV2 addAdditionalContainerPortsItem(ContainerPort additionalContainerPortsItem) { + if (this.additionalContainerPorts == null) { + this.additionalContainerPorts = new ArrayList<>(); + } + this.additionalContainerPorts.add(additionalContainerPortsItem); + return this; + } + + /** + * Additional ports your server listens on. + * @return additionalContainerPorts + **/ + @javax.annotation.Nullable + + public List getAdditionalContainerPorts() { + return additionalContainerPorts; + } + + + public void setAdditionalContainerPorts(List additionalContainerPorts) { + this.additionalContainerPorts = additionalContainerPorts; + } + + + public DeploymentConfigV2 transportType(TransportType transportType) { + + this.transportType = transportType; + return this; + } + + /** + * Get transportType + * @return transportType + **/ + @javax.annotation.Nonnull + + public TransportType getTransportType() { + return transportType; + } + + + public void setTransportType(TransportType transportType) { + this.transportType = transportType; + } + + + public DeploymentConfigV2 containerPort(Integer containerPort) { + + this.containerPort = containerPort; + return this; + } + + /** + * Default port the server listens on. + * minimum: 1 + * maximum: 65535 + * @return containerPort + **/ + @javax.annotation.Nonnull + + public Integer getContainerPort() { + return containerPort; + } + + + public void setContainerPort(Integer containerPort) { + this.containerPort = containerPort; + } + + + public DeploymentConfigV2 requestedMemoryMB(Double requestedMemoryMB) { + + this.requestedMemoryMB = requestedMemoryMB; + return this; + } + + /** + * The amount of memory allocated to your process. + * @return requestedMemoryMB + **/ + @javax.annotation.Nonnull + + public Double getRequestedMemoryMB() { + return requestedMemoryMB; + } + + + public void setRequestedMemoryMB(Double requestedMemoryMB) { + this.requestedMemoryMB = requestedMemoryMB; + } + + + public DeploymentConfigV2 requestedCPU(Double requestedCPU) { + + this.requestedCPU = requestedCPU; + return this; + } + + /** + * The number of cores allocated to your process. + * @return requestedCPU + **/ + @javax.annotation.Nonnull + + public Double getRequestedCPU() { + return requestedCPU; + } + + + public void setRequestedCPU(Double requestedCPU) { + this.requestedCPU = requestedCPU; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the DeploymentConfigV2 instance itself + */ + public DeploymentConfigV2 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeploymentConfigV2 deploymentConfigV2 = (DeploymentConfigV2) o; + return Objects.equals(this.idleTimeoutEnabled, deploymentConfigV2.idleTimeoutEnabled) && + Objects.equals(this.env, deploymentConfigV2.env) && + Objects.equals(this.roomsPerProcess, deploymentConfigV2.roomsPerProcess) && + Objects.equals(this.additionalContainerPorts, deploymentConfigV2.additionalContainerPorts) && + Objects.equals(this.transportType, deploymentConfigV2.transportType) && + Objects.equals(this.containerPort, deploymentConfigV2.containerPort) && + Objects.equals(this.requestedMemoryMB, deploymentConfigV2.requestedMemoryMB) && + Objects.equals(this.requestedCPU, deploymentConfigV2.requestedCPU)&& + Objects.equals(this.additionalProperties, deploymentConfigV2.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(idleTimeoutEnabled, env, roomsPerProcess, additionalContainerPorts, transportType, containerPort, requestedMemoryMB, requestedCPU, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeploymentConfigV2 {\n"); + sb.append(" idleTimeoutEnabled: ").append(toIndentedString(idleTimeoutEnabled)).append("\n"); + sb.append(" env: ").append(toIndentedString(env)).append("\n"); + sb.append(" roomsPerProcess: ").append(toIndentedString(roomsPerProcess)).append("\n"); + sb.append(" additionalContainerPorts: ").append(toIndentedString(additionalContainerPorts)).append("\n"); + sb.append(" transportType: ").append(toIndentedString(transportType)).append("\n"); + sb.append(" containerPort: ").append(toIndentedString(containerPort)).append("\n"); + sb.append(" requestedMemoryMB: ").append(toIndentedString(requestedMemoryMB)).append("\n"); + sb.append(" requestedCPU: ").append(toIndentedString(requestedCPU)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("idleTimeoutEnabled"); + openapiFields.add("env"); + openapiFields.add("roomsPerProcess"); + openapiFields.add("additionalContainerPorts"); + openapiFields.add("transportType"); + openapiFields.add("containerPort"); + openapiFields.add("requestedMemoryMB"); + openapiFields.add("requestedCPU"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("idleTimeoutEnabled"); + openapiRequiredFields.add("env"); + openapiRequiredFields.add("roomsPerProcess"); + openapiRequiredFields.add("transportType"); + openapiRequiredFields.add("containerPort"); + openapiRequiredFields.add("requestedMemoryMB"); + openapiRequiredFields.add("requestedCPU"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to DeploymentConfigV2 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!DeploymentConfigV2.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DeploymentConfigV2 is not found in the empty JSON string", DeploymentConfigV2.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DeploymentConfigV2.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + // ensure the json data is an array + if (!jsonObj.get("env").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `env` to be an array in the JSON string but got `%s`", jsonObj.get("env").toString())); + } + + JsonArray jsonArrayenv = jsonObj.getAsJsonArray("env"); + // validate the required field `env` (array) + for (int i = 0; i < jsonArrayenv.size(); i++) { + DeploymentV2EnvInner.validateJsonObject(jsonArrayenv.get(i).getAsJsonObject()); + }; + if (jsonObj.get("additionalContainerPorts") != null && !jsonObj.get("additionalContainerPorts").isJsonNull()) { + JsonArray jsonArrayadditionalContainerPorts = jsonObj.getAsJsonArray("additionalContainerPorts"); + if (jsonArrayadditionalContainerPorts != null) { + // ensure the json data is an array + if (!jsonObj.get("additionalContainerPorts").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `additionalContainerPorts` to be an array in the JSON string but got `%s`", jsonObj.get("additionalContainerPorts").toString())); + } + + // validate the optional field `additionalContainerPorts` (array) + for (int i = 0; i < jsonArrayadditionalContainerPorts.size(); i++) { + ContainerPort.validateJsonObject(jsonArrayadditionalContainerPorts.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DeploymentConfigV2.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DeploymentConfigV2' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DeploymentConfigV2.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DeploymentConfigV2 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public DeploymentConfigV2 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + DeploymentConfigV2 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of DeploymentConfigV2 given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeploymentConfigV2 + * @throws IOException if the JSON string is invalid with respect to DeploymentConfigV2 + */ + public static DeploymentConfigV2 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DeploymentConfigV2.class); + } + + /** + * Convert an instance of DeploymentConfigV2 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/java/src/main/java/com/hathora/client/model/DeploymentV2.java b/java/src/main/java/com/hathora/client/model/DeploymentV2.java new file mode 100644 index 0000000..67c72f3 --- /dev/null +++ b/java/src/main/java/com/hathora/client/model/DeploymentV2.java @@ -0,0 +1,666 @@ +/* + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.hathora.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.hathora.client.model.ContainerPort; +import com.hathora.client.model.DeploymentV2EnvInner; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.hathora.client.JSON; + +/** + * DeploymentV2 + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DeploymentV2 { + public static final String SERIALIZED_NAME_IDLE_TIMEOUT_ENABLED = "idleTimeoutEnabled"; + @SerializedName(SERIALIZED_NAME_IDLE_TIMEOUT_ENABLED) + private Boolean idleTimeoutEnabled; + + public static final String SERIALIZED_NAME_ENV = "env"; + @SerializedName(SERIALIZED_NAME_ENV) + private List env = new ArrayList<>(); + + public static final String SERIALIZED_NAME_ROOMS_PER_PROCESS = "roomsPerProcess"; + @SerializedName(SERIALIZED_NAME_ROOMS_PER_PROCESS) + private Integer roomsPerProcess; + + public static final String SERIALIZED_NAME_ADDITIONAL_CONTAINER_PORTS = "additionalContainerPorts"; + @SerializedName(SERIALIZED_NAME_ADDITIONAL_CONTAINER_PORTS) + private List additionalContainerPorts = new ArrayList<>(); + + public static final String SERIALIZED_NAME_DEFAULT_CONTAINER_PORT = "defaultContainerPort"; + @SerializedName(SERIALIZED_NAME_DEFAULT_CONTAINER_PORT) + private ContainerPort defaultContainerPort; + + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + @SerializedName(SERIALIZED_NAME_CREATED_AT) + private OffsetDateTime createdAt; + + public static final String SERIALIZED_NAME_CREATED_BY = "createdBy"; + @SerializedName(SERIALIZED_NAME_CREATED_BY) + private String createdBy; + + public static final String SERIALIZED_NAME_REQUESTED_MEMORY_M_B = "requestedMemoryMB"; + @SerializedName(SERIALIZED_NAME_REQUESTED_MEMORY_M_B) + private Double requestedMemoryMB; + + public static final String SERIALIZED_NAME_REQUESTED_C_P_U = "requestedCPU"; + @SerializedName(SERIALIZED_NAME_REQUESTED_C_P_U) + private Double requestedCPU; + + public static final String SERIALIZED_NAME_DEPLOYMENT_ID = "deploymentId"; + @SerializedName(SERIALIZED_NAME_DEPLOYMENT_ID) + private Integer deploymentId; + + public static final String SERIALIZED_NAME_BUILD_ID = "buildId"; + @SerializedName(SERIALIZED_NAME_BUILD_ID) + private Integer buildId; + + public static final String SERIALIZED_NAME_APP_ID = "appId"; + @SerializedName(SERIALIZED_NAME_APP_ID) + private String appId; + + public DeploymentV2() { + } + + public DeploymentV2 idleTimeoutEnabled(Boolean idleTimeoutEnabled) { + + this.idleTimeoutEnabled = idleTimeoutEnabled; + return this; + } + + /** + * Option to shut down processes that have had no new connections or rooms for five minutes. + * @return idleTimeoutEnabled + **/ + @javax.annotation.Nonnull + + public Boolean getIdleTimeoutEnabled() { + return idleTimeoutEnabled; + } + + + public void setIdleTimeoutEnabled(Boolean idleTimeoutEnabled) { + this.idleTimeoutEnabled = idleTimeoutEnabled; + } + + + public DeploymentV2 env(List env) { + + this.env = env; + return this; + } + + public DeploymentV2 addEnvItem(DeploymentV2EnvInner envItem) { + if (this.env == null) { + this.env = new ArrayList<>(); + } + this.env.add(envItem); + return this; + } + + /** + * The environment variable that our process will have access to at runtime. + * @return env + **/ + @javax.annotation.Nonnull + + public List getEnv() { + return env; + } + + + public void setEnv(List env) { + this.env = env; + } + + + public DeploymentV2 roomsPerProcess(Integer roomsPerProcess) { + + this.roomsPerProcess = roomsPerProcess; + return this; + } + + /** + * Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. + * minimum: 1 + * maximum: 10000 + * @return roomsPerProcess + **/ + @javax.annotation.Nonnull + + public Integer getRoomsPerProcess() { + return roomsPerProcess; + } + + + public void setRoomsPerProcess(Integer roomsPerProcess) { + this.roomsPerProcess = roomsPerProcess; + } + + + public DeploymentV2 additionalContainerPorts(List additionalContainerPorts) { + + this.additionalContainerPorts = additionalContainerPorts; + return this; + } + + public DeploymentV2 addAdditionalContainerPortsItem(ContainerPort additionalContainerPortsItem) { + if (this.additionalContainerPorts == null) { + this.additionalContainerPorts = new ArrayList<>(); + } + this.additionalContainerPorts.add(additionalContainerPortsItem); + return this; + } + + /** + * Additional ports your server listens on. + * @return additionalContainerPorts + **/ + @javax.annotation.Nonnull + + public List getAdditionalContainerPorts() { + return additionalContainerPorts; + } + + + public void setAdditionalContainerPorts(List additionalContainerPorts) { + this.additionalContainerPorts = additionalContainerPorts; + } + + + public DeploymentV2 defaultContainerPort(ContainerPort defaultContainerPort) { + + this.defaultContainerPort = defaultContainerPort; + return this; + } + + /** + * Get defaultContainerPort + * @return defaultContainerPort + **/ + @javax.annotation.Nonnull + + public ContainerPort getDefaultContainerPort() { + return defaultContainerPort; + } + + + public void setDefaultContainerPort(ContainerPort defaultContainerPort) { + this.defaultContainerPort = defaultContainerPort; + } + + + public DeploymentV2 createdAt(OffsetDateTime createdAt) { + + this.createdAt = createdAt; + return this; + } + + /** + * When the deployment was created. + * @return createdAt + **/ + @javax.annotation.Nonnull + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public DeploymentV2 createdBy(String createdBy) { + + this.createdBy = createdBy; + return this; + } + + /** + * UserId or email address for the user that created the deployment. + * @return createdBy + **/ + @javax.annotation.Nonnull + + public String getCreatedBy() { + return createdBy; + } + + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + + public DeploymentV2 requestedMemoryMB(Double requestedMemoryMB) { + + this.requestedMemoryMB = requestedMemoryMB; + return this; + } + + /** + * The amount of memory allocated to your process. + * @return requestedMemoryMB + **/ + @javax.annotation.Nonnull + + public Double getRequestedMemoryMB() { + return requestedMemoryMB; + } + + + public void setRequestedMemoryMB(Double requestedMemoryMB) { + this.requestedMemoryMB = requestedMemoryMB; + } + + + public DeploymentV2 requestedCPU(Double requestedCPU) { + + this.requestedCPU = requestedCPU; + return this; + } + + /** + * The number of cores allocated to your process. + * @return requestedCPU + **/ + @javax.annotation.Nonnull + + public Double getRequestedCPU() { + return requestedCPU; + } + + + public void setRequestedCPU(Double requestedCPU) { + this.requestedCPU = requestedCPU; + } + + + public DeploymentV2 deploymentId(Integer deploymentId) { + + this.deploymentId = deploymentId; + return this; + } + + /** + * System generated id for a deployment. Increments by 1. + * @return deploymentId + **/ + @javax.annotation.Nonnull + + public Integer getDeploymentId() { + return deploymentId; + } + + + public void setDeploymentId(Integer deploymentId) { + this.deploymentId = deploymentId; + } + + + public DeploymentV2 buildId(Integer buildId) { + + this.buildId = buildId; + return this; + } + + /** + * System generated id for a build. Increments by 1. + * @return buildId + **/ + @javax.annotation.Nonnull + + public Integer getBuildId() { + return buildId; + } + + + public void setBuildId(Integer buildId) { + this.buildId = buildId; + } + + + public DeploymentV2 appId(String appId) { + + this.appId = appId; + return this; + } + + /** + * System generated unique identifier for an application. + * @return appId + **/ + @javax.annotation.Nonnull + + public String getAppId() { + return appId; + } + + + public void setAppId(String appId) { + this.appId = appId; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the DeploymentV2 instance itself + */ + public DeploymentV2 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeploymentV2 deploymentV2 = (DeploymentV2) o; + return Objects.equals(this.idleTimeoutEnabled, deploymentV2.idleTimeoutEnabled) && + Objects.equals(this.env, deploymentV2.env) && + Objects.equals(this.roomsPerProcess, deploymentV2.roomsPerProcess) && + Objects.equals(this.additionalContainerPorts, deploymentV2.additionalContainerPorts) && + Objects.equals(this.defaultContainerPort, deploymentV2.defaultContainerPort) && + Objects.equals(this.createdAt, deploymentV2.createdAt) && + Objects.equals(this.createdBy, deploymentV2.createdBy) && + Objects.equals(this.requestedMemoryMB, deploymentV2.requestedMemoryMB) && + Objects.equals(this.requestedCPU, deploymentV2.requestedCPU) && + Objects.equals(this.deploymentId, deploymentV2.deploymentId) && + Objects.equals(this.buildId, deploymentV2.buildId) && + Objects.equals(this.appId, deploymentV2.appId)&& + Objects.equals(this.additionalProperties, deploymentV2.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(idleTimeoutEnabled, env, roomsPerProcess, additionalContainerPorts, defaultContainerPort, createdAt, createdBy, requestedMemoryMB, requestedCPU, deploymentId, buildId, appId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeploymentV2 {\n"); + sb.append(" idleTimeoutEnabled: ").append(toIndentedString(idleTimeoutEnabled)).append("\n"); + sb.append(" env: ").append(toIndentedString(env)).append("\n"); + sb.append(" roomsPerProcess: ").append(toIndentedString(roomsPerProcess)).append("\n"); + sb.append(" additionalContainerPorts: ").append(toIndentedString(additionalContainerPorts)).append("\n"); + sb.append(" defaultContainerPort: ").append(toIndentedString(defaultContainerPort)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); + sb.append(" requestedMemoryMB: ").append(toIndentedString(requestedMemoryMB)).append("\n"); + sb.append(" requestedCPU: ").append(toIndentedString(requestedCPU)).append("\n"); + sb.append(" deploymentId: ").append(toIndentedString(deploymentId)).append("\n"); + sb.append(" buildId: ").append(toIndentedString(buildId)).append("\n"); + sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("idleTimeoutEnabled"); + openapiFields.add("env"); + openapiFields.add("roomsPerProcess"); + openapiFields.add("additionalContainerPorts"); + openapiFields.add("defaultContainerPort"); + openapiFields.add("createdAt"); + openapiFields.add("createdBy"); + openapiFields.add("requestedMemoryMB"); + openapiFields.add("requestedCPU"); + openapiFields.add("deploymentId"); + openapiFields.add("buildId"); + openapiFields.add("appId"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("idleTimeoutEnabled"); + openapiRequiredFields.add("env"); + openapiRequiredFields.add("roomsPerProcess"); + openapiRequiredFields.add("additionalContainerPorts"); + openapiRequiredFields.add("defaultContainerPort"); + openapiRequiredFields.add("createdAt"); + openapiRequiredFields.add("createdBy"); + openapiRequiredFields.add("requestedMemoryMB"); + openapiRequiredFields.add("requestedCPU"); + openapiRequiredFields.add("deploymentId"); + openapiRequiredFields.add("buildId"); + openapiRequiredFields.add("appId"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to DeploymentV2 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!DeploymentV2.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DeploymentV2 is not found in the empty JSON string", DeploymentV2.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DeploymentV2.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + // ensure the json data is an array + if (!jsonObj.get("env").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `env` to be an array in the JSON string but got `%s`", jsonObj.get("env").toString())); + } + + JsonArray jsonArrayenv = jsonObj.getAsJsonArray("env"); + // validate the required field `env` (array) + for (int i = 0; i < jsonArrayenv.size(); i++) { + DeploymentV2EnvInner.validateJsonObject(jsonArrayenv.get(i).getAsJsonObject()); + }; + // ensure the json data is an array + if (!jsonObj.get("additionalContainerPorts").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `additionalContainerPorts` to be an array in the JSON string but got `%s`", jsonObj.get("additionalContainerPorts").toString())); + } + + JsonArray jsonArrayadditionalContainerPorts = jsonObj.getAsJsonArray("additionalContainerPorts"); + // validate the required field `additionalContainerPorts` (array) + for (int i = 0; i < jsonArrayadditionalContainerPorts.size(); i++) { + ContainerPort.validateJsonObject(jsonArrayadditionalContainerPorts.get(i).getAsJsonObject()); + }; + // validate the required field `defaultContainerPort` + ContainerPort.validateJsonObject(jsonObj.getAsJsonObject("defaultContainerPort")); + if (!jsonObj.get("createdBy").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `createdBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("createdBy").toString())); + } + if (!jsonObj.get("appId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `appId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DeploymentV2.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DeploymentV2' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DeploymentV2.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DeploymentV2 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public DeploymentV2 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + DeploymentV2 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of DeploymentV2 given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeploymentV2 + * @throws IOException if the JSON string is invalid with respect to DeploymentV2 + */ + public static DeploymentV2 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DeploymentV2.class); + } + + /** + * Convert an instance of DeploymentV2 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/java/src/main/java/com/hathora/client/model/DeploymentV2EnvInner.java b/java/src/main/java/com/hathora/client/model/DeploymentV2EnvInner.java new file mode 100644 index 0000000..7e4de6b --- /dev/null +++ b/java/src/main/java/com/hathora/client/model/DeploymentV2EnvInner.java @@ -0,0 +1,321 @@ +/* + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.hathora.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.hathora.client.JSON; + +/** + * DeploymentV2EnvInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DeploymentV2EnvInner { + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + private String value; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public DeploymentV2EnvInner() { + } + + public DeploymentV2EnvInner value(String value) { + + this.value = value; + return this; + } + + /** + * Get value + * @return value + **/ + @javax.annotation.Nonnull + + public String getValue() { + return value; + } + + + public void setValue(String value) { + this.value = value; + } + + + public DeploymentV2EnvInner name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nonnull + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the DeploymentV2EnvInner instance itself + */ + public DeploymentV2EnvInner putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeploymentV2EnvInner deploymentV2EnvInner = (DeploymentV2EnvInner) o; + return Objects.equals(this.value, deploymentV2EnvInner.value) && + Objects.equals(this.name, deploymentV2EnvInner.name)&& + Objects.equals(this.additionalProperties, deploymentV2EnvInner.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(value, name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeploymentV2EnvInner {\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("value"); + openapiFields.add("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("value"); + openapiRequiredFields.add("name"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to DeploymentV2EnvInner + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!DeploymentV2EnvInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DeploymentV2EnvInner is not found in the empty JSON string", DeploymentV2EnvInner.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DeploymentV2EnvInner.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DeploymentV2EnvInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DeploymentV2EnvInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DeploymentV2EnvInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DeploymentV2EnvInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public DeploymentV2EnvInner read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + DeploymentV2EnvInner instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of DeploymentV2EnvInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of DeploymentV2EnvInner + * @throws IOException if the JSON string is invalid with respect to DeploymentV2EnvInner + */ + public static DeploymentV2EnvInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DeploymentV2EnvInner.class); + } + + /** + * Convert an instance of DeploymentV2EnvInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/java/src/main/java/com/hathora/client/model/GoogleIdTokenObject.java b/java/src/main/java/com/hathora/client/model/GoogleIdTokenObject.java new file mode 100644 index 0000000..ecd1b1f --- /dev/null +++ b/java/src/main/java/com/hathora/client/model/GoogleIdTokenObject.java @@ -0,0 +1,288 @@ +/* + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.hathora.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.hathora.client.JSON; + +/** + * GoogleIdTokenObject + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GoogleIdTokenObject { + public static final String SERIALIZED_NAME_ID_TOKEN = "idToken"; + @SerializedName(SERIALIZED_NAME_ID_TOKEN) + private String idToken; + + public GoogleIdTokenObject() { + } + + public GoogleIdTokenObject idToken(String idToken) { + + this.idToken = idToken; + return this; + } + + /** + * A Google-signed OIDC ID token representing a player's authenticated identity. Learn how to get an `idToken` [here](https://cloud.google.com/docs/authentication/get-id-token). + * @return idToken + **/ + @javax.annotation.Nonnull + + public String getIdToken() { + return idToken; + } + + + public void setIdToken(String idToken) { + this.idToken = idToken; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the GoogleIdTokenObject instance itself + */ + public GoogleIdTokenObject putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GoogleIdTokenObject googleIdTokenObject = (GoogleIdTokenObject) o; + return Objects.equals(this.idToken, googleIdTokenObject.idToken)&& + Objects.equals(this.additionalProperties, googleIdTokenObject.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(idToken, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GoogleIdTokenObject {\n"); + sb.append(" idToken: ").append(toIndentedString(idToken)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("idToken"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("idToken"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to GoogleIdTokenObject + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!GoogleIdTokenObject.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in GoogleIdTokenObject is not found in the empty JSON string", GoogleIdTokenObject.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : GoogleIdTokenObject.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("idToken").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `idToken` to be a primitive type in the JSON string but got `%s`", jsonObj.get("idToken").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GoogleIdTokenObject.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GoogleIdTokenObject' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GoogleIdTokenObject.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GoogleIdTokenObject value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public GoogleIdTokenObject read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + GoogleIdTokenObject instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GoogleIdTokenObject given an JSON string + * + * @param jsonString JSON string + * @return An instance of GoogleIdTokenObject + * @throws IOException if the JSON string is invalid with respect to GoogleIdTokenObject + */ + public static GoogleIdTokenObject fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GoogleIdTokenObject.class); + } + + /** + * Convert an instance of GoogleIdTokenObject to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/java/src/main/java/com/hathora/client/model/InviteStatusAccepted.java b/java/src/main/java/com/hathora/client/model/InviteStatusAccepted.java new file mode 100644 index 0000000..d1bffc5 --- /dev/null +++ b/java/src/main/java/com/hathora/client/model/InviteStatusAccepted.java @@ -0,0 +1,366 @@ +/* + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.hathora.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.hathora.client.JSON; + +/** + * InviteStatusAccepted + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class InviteStatusAccepted { + public static final String SERIALIZED_NAME_USER_ID = "userId"; + @SerializedName(SERIALIZED_NAME_USER_ID) + private String userId; + + /** + * Gets or Sets type + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + ACCEPTED("accepted"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private TypeEnum type; + + public InviteStatusAccepted() { + } + + public InviteStatusAccepted userId(String userId) { + + this.userId = userId; + return this; + } + + /** + * System generated unique identifier for a user. Not guaranteed to have a specific format. + * @return userId + **/ + @javax.annotation.Nonnull + + public String getUserId() { + return userId; + } + + + public void setUserId(String userId) { + this.userId = userId; + } + + + public InviteStatusAccepted type(TypeEnum type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nonnull + + public TypeEnum getType() { + return type; + } + + + public void setType(TypeEnum type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the InviteStatusAccepted instance itself + */ + public InviteStatusAccepted putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InviteStatusAccepted inviteStatusAccepted = (InviteStatusAccepted) o; + return Objects.equals(this.userId, inviteStatusAccepted.userId) && + Objects.equals(this.type, inviteStatusAccepted.type)&& + Objects.equals(this.additionalProperties, inviteStatusAccepted.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(userId, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InviteStatusAccepted {\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("userId"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("userId"); + openapiRequiredFields.add("type"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to InviteStatusAccepted + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!InviteStatusAccepted.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InviteStatusAccepted is not found in the empty JSON string", InviteStatusAccepted.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : InviteStatusAccepted.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("userId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `userId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userId").toString())); + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InviteStatusAccepted.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InviteStatusAccepted' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InviteStatusAccepted.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InviteStatusAccepted value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public InviteStatusAccepted read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + InviteStatusAccepted instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InviteStatusAccepted given an JSON string + * + * @param jsonString JSON string + * @return An instance of InviteStatusAccepted + * @throws IOException if the JSON string is invalid with respect to InviteStatusAccepted + */ + public static InviteStatusAccepted fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InviteStatusAccepted.class); + } + + /** + * Convert an instance of InviteStatusAccepted to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/java/src/main/java/com/hathora/client/model/InviteStatusPending.java b/java/src/main/java/com/hathora/client/model/InviteStatusPending.java new file mode 100644 index 0000000..272eeb9 --- /dev/null +++ b/java/src/main/java/com/hathora/client/model/InviteStatusPending.java @@ -0,0 +1,333 @@ +/* + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.hathora.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.hathora.client.JSON; + +/** + * InviteStatusPending + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class InviteStatusPending { + /** + * Gets or Sets type + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + PENDING("pending"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private TypeEnum type; + + public InviteStatusPending() { + } + + public InviteStatusPending type(TypeEnum type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nonnull + + public TypeEnum getType() { + return type; + } + + + public void setType(TypeEnum type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the InviteStatusPending instance itself + */ + public InviteStatusPending putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InviteStatusPending inviteStatusPending = (InviteStatusPending) o; + return Objects.equals(this.type, inviteStatusPending.type)&& + Objects.equals(this.additionalProperties, inviteStatusPending.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InviteStatusPending {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to InviteStatusPending + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!InviteStatusPending.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InviteStatusPending is not found in the empty JSON string", InviteStatusPending.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : InviteStatusPending.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InviteStatusPending.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InviteStatusPending' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InviteStatusPending.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InviteStatusPending value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public InviteStatusPending read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + InviteStatusPending instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InviteStatusPending given an JSON string + * + * @param jsonString JSON string + * @return An instance of InviteStatusPending + * @throws IOException if the JSON string is invalid with respect to InviteStatusPending + */ + public static InviteStatusPending fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InviteStatusPending.class); + } + + /** + * Convert an instance of InviteStatusPending to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/java/src/main/java/com/hathora/client/model/InviteStatusRejected.java b/java/src/main/java/com/hathora/client/model/InviteStatusRejected.java new file mode 100644 index 0000000..e602eda --- /dev/null +++ b/java/src/main/java/com/hathora/client/model/InviteStatusRejected.java @@ -0,0 +1,366 @@ +/* + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.hathora.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.hathora.client.JSON; + +/** + * InviteStatusRejected + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class InviteStatusRejected { + public static final String SERIALIZED_NAME_USER_ID = "userId"; + @SerializedName(SERIALIZED_NAME_USER_ID) + private String userId; + + /** + * Gets or Sets type + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + REJECTED("rejected"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private TypeEnum type; + + public InviteStatusRejected() { + } + + public InviteStatusRejected userId(String userId) { + + this.userId = userId; + return this; + } + + /** + * System generated unique identifier for a user. Not guaranteed to have a specific format. + * @return userId + **/ + @javax.annotation.Nonnull + + public String getUserId() { + return userId; + } + + + public void setUserId(String userId) { + this.userId = userId; + } + + + public InviteStatusRejected type(TypeEnum type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nonnull + + public TypeEnum getType() { + return type; + } + + + public void setType(TypeEnum type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the InviteStatusRejected instance itself + */ + public InviteStatusRejected putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InviteStatusRejected inviteStatusRejected = (InviteStatusRejected) o; + return Objects.equals(this.userId, inviteStatusRejected.userId) && + Objects.equals(this.type, inviteStatusRejected.type)&& + Objects.equals(this.additionalProperties, inviteStatusRejected.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(userId, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InviteStatusRejected {\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("userId"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("userId"); + openapiRequiredFields.add("type"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to InviteStatusRejected + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!InviteStatusRejected.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InviteStatusRejected is not found in the empty JSON string", InviteStatusRejected.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : InviteStatusRejected.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("userId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `userId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userId").toString())); + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InviteStatusRejected.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InviteStatusRejected' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InviteStatusRejected.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InviteStatusRejected value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public InviteStatusRejected read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + InviteStatusRejected instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InviteStatusRejected given an JSON string + * + * @param jsonString JSON string + * @return An instance of InviteStatusRejected + * @throws IOException if the JSON string is invalid with respect to InviteStatusRejected + */ + public static InviteStatusRejected fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InviteStatusRejected.class); + } + + /** + * Convert an instance of InviteStatusRejected to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/java/src/main/java/com/hathora/client/model/InviteStatusRescinded.java b/java/src/main/java/com/hathora/client/model/InviteStatusRescinded.java new file mode 100644 index 0000000..8a61fe6 --- /dev/null +++ b/java/src/main/java/com/hathora/client/model/InviteStatusRescinded.java @@ -0,0 +1,398 @@ +/* + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.hathora.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.hathora.client.JSON; + +/** + * InviteStatusRescinded + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class InviteStatusRescinded { + public static final String SERIALIZED_NAME_RESCINDED_BY = "rescindedBy"; + @SerializedName(SERIALIZED_NAME_RESCINDED_BY) + private String rescindedBy; + + public static final String SERIALIZED_NAME_USER_ID = "userId"; + @SerializedName(SERIALIZED_NAME_USER_ID) + private String userId; + + /** + * Gets or Sets type + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + RESCINDED("rescinded"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private TypeEnum type; + + public InviteStatusRescinded() { + } + + public InviteStatusRescinded rescindedBy(String rescindedBy) { + + this.rescindedBy = rescindedBy; + return this; + } + + /** + * System generated unique identifier for a user. Not guaranteed to have a specific format. + * @return rescindedBy + **/ + @javax.annotation.Nonnull + + public String getRescindedBy() { + return rescindedBy; + } + + + public void setRescindedBy(String rescindedBy) { + this.rescindedBy = rescindedBy; + } + + + public InviteStatusRescinded userId(String userId) { + + this.userId = userId; + return this; + } + + /** + * System generated unique identifier for a user. Not guaranteed to have a specific format. + * @return userId + **/ + @javax.annotation.Nullable + + public String getUserId() { + return userId; + } + + + public void setUserId(String userId) { + this.userId = userId; + } + + + public InviteStatusRescinded type(TypeEnum type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nonnull + + public TypeEnum getType() { + return type; + } + + + public void setType(TypeEnum type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the InviteStatusRescinded instance itself + */ + public InviteStatusRescinded putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InviteStatusRescinded inviteStatusRescinded = (InviteStatusRescinded) o; + return Objects.equals(this.rescindedBy, inviteStatusRescinded.rescindedBy) && + Objects.equals(this.userId, inviteStatusRescinded.userId) && + Objects.equals(this.type, inviteStatusRescinded.type)&& + Objects.equals(this.additionalProperties, inviteStatusRescinded.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(rescindedBy, userId, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InviteStatusRescinded {\n"); + sb.append(" rescindedBy: ").append(toIndentedString(rescindedBy)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("rescindedBy"); + openapiFields.add("userId"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("rescindedBy"); + openapiRequiredFields.add("type"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to InviteStatusRescinded + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!InviteStatusRescinded.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InviteStatusRescinded is not found in the empty JSON string", InviteStatusRescinded.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : InviteStatusRescinded.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("rescindedBy").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `rescindedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rescindedBy").toString())); + } + if ((jsonObj.get("userId") != null && !jsonObj.get("userId").isJsonNull()) && !jsonObj.get("userId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `userId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userId").toString())); + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InviteStatusRescinded.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InviteStatusRescinded' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InviteStatusRescinded.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InviteStatusRescinded value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public InviteStatusRescinded read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + InviteStatusRescinded instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InviteStatusRescinded given an JSON string + * + * @param jsonString JSON string + * @return An instance of InviteStatusRescinded + * @throws IOException if the JSON string is invalid with respect to InviteStatusRescinded + */ + public static InviteStatusRescinded fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InviteStatusRescinded.class); + } + + /** + * Convert an instance of InviteStatusRescinded to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/java/src/main/java/com/hathora/client/model/Lobby.java b/java/src/main/java/com/hathora/client/model/Lobby.java index 677696b..51e6791 100644 --- a/java/src/main/java/com/hathora/client/model/Lobby.java +++ b/java/src/main/java/com/hathora/client/model/Lobby.java @@ -24,6 +24,7 @@ import com.hathora.client.model.Region; import java.io.IOException; import java.time.OffsetDateTime; +import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -383,11 +384,22 @@ public boolean equals(Object o) { Objects.equals(this.additionalProperties, lobby.additionalProperties); } + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + @Override public int hashCode() { return Objects.hash(shortCode, state, initialConfig, createdAt, createdBy, local, visibility, region, roomId, appId, additionalProperties); } + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/java/src/main/java/com/hathora/client/model/NewUserInfo.java b/java/src/main/java/com/hathora/client/model/NewUserInfo.java new file mode 100644 index 0000000..330979a --- /dev/null +++ b/java/src/main/java/com/hathora/client/model/NewUserInfo.java @@ -0,0 +1,321 @@ +/* + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.hathora.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.hathora.client.JSON; + +/** + * NewUserInfo + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class NewUserInfo { + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public static final String SERIALIZED_NAME_USER_ID = "user_id"; + @SerializedName(SERIALIZED_NAME_USER_ID) + private String userId; + + public NewUserInfo() { + } + + public NewUserInfo email(String email) { + + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @javax.annotation.Nonnull + + public String getEmail() { + return email; + } + + + public void setEmail(String email) { + this.email = email; + } + + + public NewUserInfo userId(String userId) { + + this.userId = userId; + return this; + } + + /** + * Get userId + * @return userId + **/ + @javax.annotation.Nonnull + + public String getUserId() { + return userId; + } + + + public void setUserId(String userId) { + this.userId = userId; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the NewUserInfo instance itself + */ + public NewUserInfo putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NewUserInfo newUserInfo = (NewUserInfo) o; + return Objects.equals(this.email, newUserInfo.email) && + Objects.equals(this.userId, newUserInfo.userId)&& + Objects.equals(this.additionalProperties, newUserInfo.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(email, userId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NewUserInfo {\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("email"); + openapiFields.add("user_id"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("email"); + openapiRequiredFields.add("user_id"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to NewUserInfo + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!NewUserInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in NewUserInfo is not found in the empty JSON string", NewUserInfo.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : NewUserInfo.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if (!jsonObj.get("user_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `user_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user_id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!NewUserInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'NewUserInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(NewUserInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, NewUserInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public NewUserInfo read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + NewUserInfo instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of NewUserInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of NewUserInfo + * @throws IOException if the JSON string is invalid with respect to NewUserInfo + */ + public static NewUserInfo fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, NewUserInfo.class); + } + + /** + * Convert an instance of NewUserInfo to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/java/src/main/java/com/hathora/client/model/NicknameObject.java b/java/src/main/java/com/hathora/client/model/NicknameObject.java new file mode 100644 index 0000000..d4f8a34 --- /dev/null +++ b/java/src/main/java/com/hathora/client/model/NicknameObject.java @@ -0,0 +1,288 @@ +/* + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.hathora.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.hathora.client.JSON; + +/** + * NicknameObject + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class NicknameObject { + public static final String SERIALIZED_NAME_NICKNAME = "nickname"; + @SerializedName(SERIALIZED_NAME_NICKNAME) + private String nickname; + + public NicknameObject() { + } + + public NicknameObject nickname(String nickname) { + + this.nickname = nickname; + return this; + } + + /** + * An alias to represent a player. + * @return nickname + **/ + @javax.annotation.Nonnull + + public String getNickname() { + return nickname; + } + + + public void setNickname(String nickname) { + this.nickname = nickname; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the NicknameObject instance itself + */ + public NicknameObject putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NicknameObject nicknameObject = (NicknameObject) o; + return Objects.equals(this.nickname, nicknameObject.nickname)&& + Objects.equals(this.additionalProperties, nicknameObject.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(nickname, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NicknameObject {\n"); + sb.append(" nickname: ").append(toIndentedString(nickname)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("nickname"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("nickname"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to NicknameObject + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!NicknameObject.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in NicknameObject is not found in the empty JSON string", NicknameObject.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : NicknameObject.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("nickname").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `nickname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nickname").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!NicknameObject.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'NicknameObject' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(NicknameObject.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, NicknameObject value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public NicknameObject read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + NicknameObject instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of NicknameObject given an JSON string + * + * @param jsonString JSON string + * @return An instance of NicknameObject + * @throws IOException if the JSON string is invalid with respect to NicknameObject + */ + public static NicknameObject fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, NicknameObject.class); + } + + /** + * Convert an instance of NicknameObject to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/java/src/main/java/com/hathora/client/model/OrgInvitesPage.java b/java/src/main/java/com/hathora/client/model/OrgInvitesPage.java new file mode 100644 index 0000000..c969041 --- /dev/null +++ b/java/src/main/java/com/hathora/client/model/OrgInvitesPage.java @@ -0,0 +1,306 @@ +/* + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.hathora.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.hathora.client.model.OrgPermission; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.hathora.client.JSON; + +/** + * OrgInvitesPage + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class OrgInvitesPage { + public static final String SERIALIZED_NAME_INVITES = "invites"; + @SerializedName(SERIALIZED_NAME_INVITES) + private List invites = new ArrayList<>(); + + public OrgInvitesPage() { + } + + public OrgInvitesPage invites(List invites) { + + this.invites = invites; + return this; + } + + public OrgInvitesPage addInvitesItem(OrgPermission invitesItem) { + if (this.invites == null) { + this.invites = new ArrayList<>(); + } + this.invites.add(invitesItem); + return this; + } + + /** + * Get invites + * @return invites + **/ + @javax.annotation.Nonnull + + public List getInvites() { + return invites; + } + + + public void setInvites(List invites) { + this.invites = invites; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the OrgInvitesPage instance itself + */ + public OrgInvitesPage putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrgInvitesPage orgInvitesPage = (OrgInvitesPage) o; + return Objects.equals(this.invites, orgInvitesPage.invites)&& + Objects.equals(this.additionalProperties, orgInvitesPage.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(invites, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrgInvitesPage {\n"); + sb.append(" invites: ").append(toIndentedString(invites)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("invites"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("invites"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to OrgInvitesPage + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!OrgInvitesPage.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrgInvitesPage is not found in the empty JSON string", OrgInvitesPage.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : OrgInvitesPage.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + // ensure the json data is an array + if (!jsonObj.get("invites").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `invites` to be an array in the JSON string but got `%s`", jsonObj.get("invites").toString())); + } + + JsonArray jsonArrayinvites = jsonObj.getAsJsonArray("invites"); + // validate the required field `invites` (array) + for (int i = 0; i < jsonArrayinvites.size(); i++) { + OrgPermission.validateJsonObject(jsonArrayinvites.get(i).getAsJsonObject()); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrgInvitesPage.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrgInvitesPage' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrgInvitesPage.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrgInvitesPage value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public OrgInvitesPage read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + OrgInvitesPage instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrgInvitesPage given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrgInvitesPage + * @throws IOException if the JSON string is invalid with respect to OrgInvitesPage + */ + public static OrgInvitesPage fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrgInvitesPage.class); + } + + /** + * Convert an instance of OrgInvitesPage to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/java/src/main/java/com/hathora/client/model/OrgPermission.java b/java/src/main/java/com/hathora/client/model/OrgPermission.java new file mode 100644 index 0000000..f417754 --- /dev/null +++ b/java/src/main/java/com/hathora/client/model/OrgPermission.java @@ -0,0 +1,448 @@ +/* + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.hathora.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.hathora.client.model.OrganizationInviteStatus; +import java.io.IOException; +import java.time.OffsetDateTime; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.hathora.client.JSON; + +/** + * OrgPermission + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class OrgPermission { + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + private OffsetDateTime updatedAt; + + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + @SerializedName(SERIALIZED_NAME_CREATED_AT) + private OffsetDateTime createdAt; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private OrganizationInviteStatus status; + + public static final String SERIALIZED_NAME_USER_EMAIL = "userEmail"; + @SerializedName(SERIALIZED_NAME_USER_EMAIL) + private String userEmail; + + public static final String SERIALIZED_NAME_INVITED_BY = "invitedBy"; + @SerializedName(SERIALIZED_NAME_INVITED_BY) + private String invitedBy; + + public static final String SERIALIZED_NAME_ORG_ID = "orgId"; + @SerializedName(SERIALIZED_NAME_ORG_ID) + private String orgId; + + public OrgPermission() { + } + + public OrgPermission updatedAt(OffsetDateTime updatedAt) { + + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + **/ + @javax.annotation.Nonnull + + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + public OrgPermission createdAt(OffsetDateTime createdAt) { + + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @javax.annotation.Nonnull + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public OrgPermission status(OrganizationInviteStatus status) { + + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @javax.annotation.Nonnull + + public OrganizationInviteStatus getStatus() { + return status; + } + + + public void setStatus(OrganizationInviteStatus status) { + this.status = status; + } + + + public OrgPermission userEmail(String userEmail) { + + this.userEmail = userEmail; + return this; + } + + /** + * Get userEmail + * @return userEmail + **/ + @javax.annotation.Nonnull + + public String getUserEmail() { + return userEmail; + } + + + public void setUserEmail(String userEmail) { + this.userEmail = userEmail; + } + + + public OrgPermission invitedBy(String invitedBy) { + + this.invitedBy = invitedBy; + return this; + } + + /** + * System generated unique identifier for a user. Not guaranteed to have a specific format. + * @return invitedBy + **/ + @javax.annotation.Nonnull + + public String getInvitedBy() { + return invitedBy; + } + + + public void setInvitedBy(String invitedBy) { + this.invitedBy = invitedBy; + } + + + public OrgPermission orgId(String orgId) { + + this.orgId = orgId; + return this; + } + + /** + * System generated unique identifier for an organization. Not guaranteed to have a specific format. + * @return orgId + **/ + @javax.annotation.Nonnull + + public String getOrgId() { + return orgId; + } + + + public void setOrgId(String orgId) { + this.orgId = orgId; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the OrgPermission instance itself + */ + public OrgPermission putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrgPermission orgPermission = (OrgPermission) o; + return Objects.equals(this.updatedAt, orgPermission.updatedAt) && + Objects.equals(this.createdAt, orgPermission.createdAt) && + Objects.equals(this.status, orgPermission.status) && + Objects.equals(this.userEmail, orgPermission.userEmail) && + Objects.equals(this.invitedBy, orgPermission.invitedBy) && + Objects.equals(this.orgId, orgPermission.orgId)&& + Objects.equals(this.additionalProperties, orgPermission.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(updatedAt, createdAt, status, userEmail, invitedBy, orgId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrgPermission {\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" userEmail: ").append(toIndentedString(userEmail)).append("\n"); + sb.append(" invitedBy: ").append(toIndentedString(invitedBy)).append("\n"); + sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("updatedAt"); + openapiFields.add("createdAt"); + openapiFields.add("status"); + openapiFields.add("userEmail"); + openapiFields.add("invitedBy"); + openapiFields.add("orgId"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("updatedAt"); + openapiRequiredFields.add("createdAt"); + openapiRequiredFields.add("status"); + openapiRequiredFields.add("userEmail"); + openapiRequiredFields.add("invitedBy"); + openapiRequiredFields.add("orgId"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to OrgPermission + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!OrgPermission.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrgPermission is not found in the empty JSON string", OrgPermission.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : OrgPermission.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + // validate the required field `status` + OrganizationInviteStatus.validateJsonObject(jsonObj.getAsJsonObject("status")); + if (!jsonObj.get("userEmail").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `userEmail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userEmail").toString())); + } + if (!jsonObj.get("invitedBy").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `invitedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invitedBy").toString())); + } + if (!jsonObj.get("orgId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `orgId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("orgId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrgPermission.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrgPermission' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrgPermission.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrgPermission value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public OrgPermission read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + OrgPermission instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrgPermission given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrgPermission + * @throws IOException if the JSON string is invalid with respect to OrgPermission + */ + public static OrgPermission fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrgPermission.class); + } + + /** + * Convert an instance of OrgPermission to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/java/src/main/java/com/hathora/client/model/OrganizationInviteStatus.java b/java/src/main/java/com/hathora/client/model/OrganizationInviteStatus.java new file mode 100644 index 0000000..98a66c5 --- /dev/null +++ b/java/src/main/java/com/hathora/client/model/OrganizationInviteStatus.java @@ -0,0 +1,380 @@ +/* + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.hathora.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.hathora.client.model.InviteStatusAccepted; +import com.hathora.client.model.InviteStatusPending; +import com.hathora.client.model.InviteStatusRejected; +import com.hathora.client.model.InviteStatusRescinded; +import java.io.IOException; + +import javax.ws.rs.core.GenericType; + +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.HashMap; +import java.util.Map; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.JsonPrimitive; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; + +import com.hathora.client.JSON; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class OrganizationInviteStatus extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(OrganizationInviteStatus.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrganizationInviteStatus.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrganizationInviteStatus' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterInviteStatusAccepted = gson.getDelegateAdapter(this, TypeToken.get(InviteStatusAccepted.class)); + final TypeAdapter adapterInviteStatusPending = gson.getDelegateAdapter(this, TypeToken.get(InviteStatusPending.class)); + final TypeAdapter adapterInviteStatusRejected = gson.getDelegateAdapter(this, TypeToken.get(InviteStatusRejected.class)); + final TypeAdapter adapterInviteStatusRescinded = gson.getDelegateAdapter(this, TypeToken.get(InviteStatusRescinded.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrganizationInviteStatus value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `InviteStatusAccepted` + if (value.getActualInstance() instanceof InviteStatusAccepted) { + JsonObject obj = adapterInviteStatusAccepted.toJsonTree((InviteStatusAccepted)value.getActualInstance()).getAsJsonObject(); + elementAdapter.write(out, obj); + return; + } + + // check if the actual instance is of the type `InviteStatusPending` + if (value.getActualInstance() instanceof InviteStatusPending) { + JsonObject obj = adapterInviteStatusPending.toJsonTree((InviteStatusPending)value.getActualInstance()).getAsJsonObject(); + elementAdapter.write(out, obj); + return; + } + + // check if the actual instance is of the type `InviteStatusRejected` + if (value.getActualInstance() instanceof InviteStatusRejected) { + JsonObject obj = adapterInviteStatusRejected.toJsonTree((InviteStatusRejected)value.getActualInstance()).getAsJsonObject(); + elementAdapter.write(out, obj); + return; + } + + // check if the actual instance is of the type `InviteStatusRescinded` + if (value.getActualInstance() instanceof InviteStatusRescinded) { + JsonObject obj = adapterInviteStatusRescinded.toJsonTree((InviteStatusRescinded)value.getActualInstance()).getAsJsonObject(); + elementAdapter.write(out, obj); + return; + } + + throw new IOException("Failed to serialize as the type doesn't match anyOf schemas: InviteStatusAccepted, InviteStatusPending, InviteStatusRejected, InviteStatusRescinded"); + } + + @Override + public OrganizationInviteStatus read(JsonReader in) throws IOException { + Object deserialized = null; + JsonObject jsonObject = elementAdapter.read(in).getAsJsonObject(); + + // deserialize InviteStatusAccepted + try { + // validate the JSON object to see if any exception is thrown + InviteStatusAccepted.validateJsonObject(jsonObject); + log.log(Level.FINER, "Input data matches schema 'InviteStatusAccepted'"); + OrganizationInviteStatus ret = new OrganizationInviteStatus(); + ret.setActualInstance(adapterInviteStatusAccepted.fromJsonTree(jsonObject)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'InviteStatusAccepted'", e); + } + + // deserialize InviteStatusPending + try { + // validate the JSON object to see if any exception is thrown + InviteStatusPending.validateJsonObject(jsonObject); + log.log(Level.FINER, "Input data matches schema 'InviteStatusPending'"); + OrganizationInviteStatus ret = new OrganizationInviteStatus(); + ret.setActualInstance(adapterInviteStatusPending.fromJsonTree(jsonObject)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'InviteStatusPending'", e); + } + + // deserialize InviteStatusRejected + try { + // validate the JSON object to see if any exception is thrown + InviteStatusRejected.validateJsonObject(jsonObject); + log.log(Level.FINER, "Input data matches schema 'InviteStatusRejected'"); + OrganizationInviteStatus ret = new OrganizationInviteStatus(); + ret.setActualInstance(adapterInviteStatusRejected.fromJsonTree(jsonObject)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'InviteStatusRejected'", e); + } + + // deserialize InviteStatusRescinded + try { + // validate the JSON object to see if any exception is thrown + InviteStatusRescinded.validateJsonObject(jsonObject); + log.log(Level.FINER, "Input data matches schema 'InviteStatusRescinded'"); + OrganizationInviteStatus ret = new OrganizationInviteStatus(); + ret.setActualInstance(adapterInviteStatusRescinded.fromJsonTree(jsonObject)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'InviteStatusRescinded'", e); + } + + + throw new IOException(String.format("Failed deserialization for OrganizationInviteStatus: no class matched. JSON: %s", jsonObject.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in anyOf + public static final Map schemas = new HashMap(); + + public OrganizationInviteStatus() { + super("anyOf", Boolean.FALSE); + } + + public OrganizationInviteStatus(InviteStatusAccepted o) { + super("anyOf", Boolean.FALSE); + setActualInstance(o); + } + + public OrganizationInviteStatus(InviteStatusPending o) { + super("anyOf", Boolean.FALSE); + setActualInstance(o); + } + + public OrganizationInviteStatus(InviteStatusRejected o) { + super("anyOf", Boolean.FALSE); + setActualInstance(o); + } + + public OrganizationInviteStatus(InviteStatusRescinded o) { + super("anyOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("InviteStatusAccepted", new GenericType() { + }); + schemas.put("InviteStatusPending", new GenericType() { + }); + schemas.put("InviteStatusRejected", new GenericType() { + }); + schemas.put("InviteStatusRescinded", new GenericType() { + }); + } + + @Override + public Map getSchemas() { + return OrganizationInviteStatus.schemas; + } + + /** + * Set the instance that matches the anyOf child schema, check + * the instance parameter is valid against the anyOf child schemas: + * InviteStatusAccepted, InviteStatusPending, InviteStatusRejected, InviteStatusRescinded + * + * It could be an instance of the 'anyOf' schemas. + * The anyOf child schemas may themselves be a composed schema (allOf, anyOf, anyOf). + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof InviteStatusAccepted) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof InviteStatusPending) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof InviteStatusRejected) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof InviteStatusRescinded) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be InviteStatusAccepted, InviteStatusPending, InviteStatusRejected, InviteStatusRescinded"); + } + + /** + * Get the actual instance, which can be the following: + * InviteStatusAccepted, InviteStatusPending, InviteStatusRejected, InviteStatusRescinded + * + * @return The actual instance (InviteStatusAccepted, InviteStatusPending, InviteStatusRejected, InviteStatusRescinded) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `InviteStatusAccepted`. If the actual instance is not `InviteStatusAccepted`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `InviteStatusAccepted` + * @throws ClassCastException if the instance is not `InviteStatusAccepted` + */ + public InviteStatusAccepted getInviteStatusAccepted() throws ClassCastException { + return (InviteStatusAccepted)super.getActualInstance(); + } + + /** + * Get the actual instance of `InviteStatusPending`. If the actual instance is not `InviteStatusPending`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `InviteStatusPending` + * @throws ClassCastException if the instance is not `InviteStatusPending` + */ + public InviteStatusPending getInviteStatusPending() throws ClassCastException { + return (InviteStatusPending)super.getActualInstance(); + } + + /** + * Get the actual instance of `InviteStatusRejected`. If the actual instance is not `InviteStatusRejected`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `InviteStatusRejected` + * @throws ClassCastException if the instance is not `InviteStatusRejected` + */ + public InviteStatusRejected getInviteStatusRejected() throws ClassCastException { + return (InviteStatusRejected)super.getActualInstance(); + } + + /** + * Get the actual instance of `InviteStatusRescinded`. If the actual instance is not `InviteStatusRescinded`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `InviteStatusRescinded` + * @throws ClassCastException if the instance is not `InviteStatusRescinded` + */ + public InviteStatusRescinded getInviteStatusRescinded() throws ClassCastException { + return (InviteStatusRescinded)super.getActualInstance(); + } + + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to OrganizationInviteStatus + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + // validate anyOf schemas one by one + int validCount = 0; + // validate the json string with InviteStatusAccepted + try { + InviteStatusAccepted.validateJsonObject(jsonObj); + return; // return earlier as at least one schema is valid with respect to the Json object + //validCount++; + } catch (Exception e) { + // continue to the next one + } + // validate the json string with InviteStatusPending + try { + InviteStatusPending.validateJsonObject(jsonObj); + return; // return earlier as at least one schema is valid with respect to the Json object + //validCount++; + } catch (Exception e) { + // continue to the next one + } + // validate the json string with InviteStatusRejected + try { + InviteStatusRejected.validateJsonObject(jsonObj); + return; // return earlier as at least one schema is valid with respect to the Json object + //validCount++; + } catch (Exception e) { + // continue to the next one + } + // validate the json string with InviteStatusRescinded + try { + InviteStatusRescinded.validateJsonObject(jsonObj); + return; // return earlier as at least one schema is valid with respect to the Json object + //validCount++; + } catch (Exception e) { + // continue to the next one + } + if (validCount == 0) { + throw new IOException(String.format("The JSON string is invalid for OrganizationInviteStatus with anyOf schemas: InviteStatusAccepted, InviteStatusPending, InviteStatusRejected, InviteStatusRescinded. JSON: %s", jsonObj.toString())); + } + } + + /** + * Create an instance of OrganizationInviteStatus given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrganizationInviteStatus + * @throws IOException if the JSON string is invalid with respect to OrganizationInviteStatus + */ + public static OrganizationInviteStatus fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrganizationInviteStatus.class); + } + + /** + * Convert an instance of OrganizationInviteStatus to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/java/src/main/java/com/hathora/client/model/PingEndpointsInner.java b/java/src/main/java/com/hathora/client/model/PingEndpointsInner.java new file mode 100644 index 0000000..44c46be --- /dev/null +++ b/java/src/main/java/com/hathora/client/model/PingEndpointsInner.java @@ -0,0 +1,349 @@ +/* + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.hathora.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.hathora.client.model.Region; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.hathora.client.JSON; + +/** + * PingEndpointsInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PingEndpointsInner { + public static final String SERIALIZED_NAME_PORT = "port"; + @SerializedName(SERIALIZED_NAME_PORT) + private Double port; + + public static final String SERIALIZED_NAME_HOST = "host"; + @SerializedName(SERIALIZED_NAME_HOST) + private String host; + + public static final String SERIALIZED_NAME_REGION = "region"; + @SerializedName(SERIALIZED_NAME_REGION) + private Region region; + + public PingEndpointsInner() { + } + + public PingEndpointsInner port(Double port) { + + this.port = port; + return this; + } + + /** + * Get port + * @return port + **/ + @javax.annotation.Nonnull + + public Double getPort() { + return port; + } + + + public void setPort(Double port) { + this.port = port; + } + + + public PingEndpointsInner host(String host) { + + this.host = host; + return this; + } + + /** + * Get host + * @return host + **/ + @javax.annotation.Nonnull + + public String getHost() { + return host; + } + + + public void setHost(String host) { + this.host = host; + } + + + public PingEndpointsInner region(Region region) { + + this.region = region; + return this; + } + + /** + * Get region + * @return region + **/ + @javax.annotation.Nonnull + + public Region getRegion() { + return region; + } + + + public void setRegion(Region region) { + this.region = region; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the PingEndpointsInner instance itself + */ + public PingEndpointsInner putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PingEndpointsInner pingEndpointsInner = (PingEndpointsInner) o; + return Objects.equals(this.port, pingEndpointsInner.port) && + Objects.equals(this.host, pingEndpointsInner.host) && + Objects.equals(this.region, pingEndpointsInner.region)&& + Objects.equals(this.additionalProperties, pingEndpointsInner.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(port, host, region, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PingEndpointsInner {\n"); + sb.append(" port: ").append(toIndentedString(port)).append("\n"); + sb.append(" host: ").append(toIndentedString(host)).append("\n"); + sb.append(" region: ").append(toIndentedString(region)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("port"); + openapiFields.add("host"); + openapiFields.add("region"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("port"); + openapiRequiredFields.add("host"); + openapiRequiredFields.add("region"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to PingEndpointsInner + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!PingEndpointsInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PingEndpointsInner is not found in the empty JSON string", PingEndpointsInner.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PingEndpointsInner.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("host").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `host` to be a primitive type in the JSON string but got `%s`", jsonObj.get("host").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PingEndpointsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PingEndpointsInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PingEndpointsInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PingEndpointsInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public PingEndpointsInner read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + PingEndpointsInner instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PingEndpointsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of PingEndpointsInner + * @throws IOException if the JSON string is invalid with respect to PingEndpointsInner + */ + public static PingEndpointsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PingEndpointsInner.class); + } + + /** + * Convert an instance of PingEndpointsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/java/src/main/java/com/hathora/client/model/PlayerTokenObject.java b/java/src/main/java/com/hathora/client/model/PlayerTokenObject.java new file mode 100644 index 0000000..521e53a --- /dev/null +++ b/java/src/main/java/com/hathora/client/model/PlayerTokenObject.java @@ -0,0 +1,288 @@ +/* + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.hathora.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.hathora.client.JSON; + +/** + * PlayerTokenObject + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PlayerTokenObject { + public static final String SERIALIZED_NAME_TOKEN = "token"; + @SerializedName(SERIALIZED_NAME_TOKEN) + private String token; + + public PlayerTokenObject() { + } + + public PlayerTokenObject token(String token) { + + this.token = token; + return this; + } + + /** + * A unique Hathora-signed JWT player token. + * @return token + **/ + @javax.annotation.Nonnull + + public String getToken() { + return token; + } + + + public void setToken(String token) { + this.token = token; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the PlayerTokenObject instance itself + */ + public PlayerTokenObject putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlayerTokenObject playerTokenObject = (PlayerTokenObject) o; + return Objects.equals(this.token, playerTokenObject.token)&& + Objects.equals(this.additionalProperties, playerTokenObject.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(token, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PlayerTokenObject {\n"); + sb.append(" token: ").append(toIndentedString(token)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("token"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("token"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to PlayerTokenObject + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!PlayerTokenObject.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PlayerTokenObject is not found in the empty JSON string", PlayerTokenObject.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PlayerTokenObject.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("token").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("token").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PlayerTokenObject.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PlayerTokenObject' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PlayerTokenObject.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PlayerTokenObject value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public PlayerTokenObject read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + PlayerTokenObject instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PlayerTokenObject given an JSON string + * + * @param jsonString JSON string + * @return An instance of PlayerTokenObject + * @throws IOException if the JSON string is invalid with respect to PlayerTokenObject + */ + public static PlayerTokenObject fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PlayerTokenObject.class); + } + + /** + * Convert an instance of PlayerTokenObject to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/java/src/main/java/com/hathora/client/model/Region.java b/java/src/main/java/com/hathora/client/model/Region.java index 9c71984..333a568 100644 --- a/java/src/main/java/com/hathora/client/model/Region.java +++ b/java/src/main/java/com/hathora/client/model/Region.java @@ -49,7 +49,9 @@ public enum Region { SYDNEY("Sydney"), - SAO_PAULO("Sao_Paulo"); + SAO_PAULO("Sao_Paulo"), + + DALLAS("Dallas"); private String value; diff --git a/java/src/main/java/com/hathora/client/model/RescindUserInvite.java b/java/src/main/java/com/hathora/client/model/RescindUserInvite.java new file mode 100644 index 0000000..6fa0dac --- /dev/null +++ b/java/src/main/java/com/hathora/client/model/RescindUserInvite.java @@ -0,0 +1,288 @@ +/* + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.hathora.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.hathora.client.JSON; + +/** + * RescindUserInvite + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RescindUserInvite { + public static final String SERIALIZED_NAME_USER_EMAIL = "userEmail"; + @SerializedName(SERIALIZED_NAME_USER_EMAIL) + private String userEmail; + + public RescindUserInvite() { + } + + public RescindUserInvite userEmail(String userEmail) { + + this.userEmail = userEmail; + return this; + } + + /** + * Get userEmail + * @return userEmail + **/ + @javax.annotation.Nonnull + + public String getUserEmail() { + return userEmail; + } + + + public void setUserEmail(String userEmail) { + this.userEmail = userEmail; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RescindUserInvite instance itself + */ + public RescindUserInvite putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RescindUserInvite rescindUserInvite = (RescindUserInvite) o; + return Objects.equals(this.userEmail, rescindUserInvite.userEmail)&& + Objects.equals(this.additionalProperties, rescindUserInvite.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(userEmail, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RescindUserInvite {\n"); + sb.append(" userEmail: ").append(toIndentedString(userEmail)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("userEmail"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("userEmail"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to RescindUserInvite + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!RescindUserInvite.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RescindUserInvite is not found in the empty JSON string", RescindUserInvite.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : RescindUserInvite.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("userEmail").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `userEmail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userEmail").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RescindUserInvite.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RescindUserInvite' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RescindUserInvite.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RescindUserInvite value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RescindUserInvite read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + RescindUserInvite instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RescindUserInvite given an JSON string + * + * @param jsonString JSON string + * @return An instance of RescindUserInvite + * @throws IOException if the JSON string is invalid with respect to RescindUserInvite + */ + public static RescindUserInvite fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RescindUserInvite.class); + } + + /** + * Convert an instance of RescindUserInvite to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/java/src/main/java/com/hathora/client/model/RoomConnectionData.java b/java/src/main/java/com/hathora/client/model/RoomConnectionData.java new file mode 100644 index 0000000..9b37bf2 --- /dev/null +++ b/java/src/main/java/com/hathora/client/model/RoomConnectionData.java @@ -0,0 +1,436 @@ +/* + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.hathora.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.hathora.client.model.ExposedPort; +import com.hathora.client.model.RoomReadyStatus; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.hathora.client.JSON; + +/** + * RoomConnectionData + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RoomConnectionData { + public static final String SERIALIZED_NAME_ADDITIONAL_EXPOSED_PORTS = "additionalExposedPorts"; + @SerializedName(SERIALIZED_NAME_ADDITIONAL_EXPOSED_PORTS) + private List additionalExposedPorts = new ArrayList<>(); + + public static final String SERIALIZED_NAME_EXPOSED_PORT = "exposedPort"; + @SerializedName(SERIALIZED_NAME_EXPOSED_PORT) + private ExposedPort exposedPort; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private RoomReadyStatus status; + + public static final String SERIALIZED_NAME_ROOM_ID = "roomId"; + @SerializedName(SERIALIZED_NAME_ROOM_ID) + private String roomId; + + public static final String SERIALIZED_NAME_PROCESS_ID = "processId"; + @SerializedName(SERIALIZED_NAME_PROCESS_ID) + private String processId; + + public RoomConnectionData() { + } + + public RoomConnectionData additionalExposedPorts(List additionalExposedPorts) { + + this.additionalExposedPorts = additionalExposedPorts; + return this; + } + + public RoomConnectionData addAdditionalExposedPortsItem(ExposedPort additionalExposedPortsItem) { + if (this.additionalExposedPorts == null) { + this.additionalExposedPorts = new ArrayList<>(); + } + this.additionalExposedPorts.add(additionalExposedPortsItem); + return this; + } + + /** + * Get additionalExposedPorts + * @return additionalExposedPorts + **/ + @javax.annotation.Nonnull + + public List getAdditionalExposedPorts() { + return additionalExposedPorts; + } + + + public void setAdditionalExposedPorts(List additionalExposedPorts) { + this.additionalExposedPorts = additionalExposedPorts; + } + + + public RoomConnectionData exposedPort(ExposedPort exposedPort) { + + this.exposedPort = exposedPort; + return this; + } + + /** + * Get exposedPort + * @return exposedPort + **/ + @javax.annotation.Nullable + + public ExposedPort getExposedPort() { + return exposedPort; + } + + + public void setExposedPort(ExposedPort exposedPort) { + this.exposedPort = exposedPort; + } + + + public RoomConnectionData status(RoomReadyStatus status) { + + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @javax.annotation.Nonnull + + public RoomReadyStatus getStatus() { + return status; + } + + + public void setStatus(RoomReadyStatus status) { + this.status = status; + } + + + public RoomConnectionData roomId(String roomId) { + + this.roomId = roomId; + return this; + } + + /** + * Unique identifier to a game session or match. Use the default system generated ID or overwrite it with your own. Note: error will be returned if `roomId` is not globally unique. + * @return roomId + **/ + @javax.annotation.Nonnull + + public String getRoomId() { + return roomId; + } + + + public void setRoomId(String roomId) { + this.roomId = roomId; + } + + + public RoomConnectionData processId(String processId) { + + this.processId = processId; + return this; + } + + /** + * System generated unique identifier to a runtime instance of your game server. + * @return processId + **/ + @javax.annotation.Nonnull + + public String getProcessId() { + return processId; + } + + + public void setProcessId(String processId) { + this.processId = processId; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RoomConnectionData instance itself + */ + public RoomConnectionData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RoomConnectionData roomConnectionData = (RoomConnectionData) o; + return Objects.equals(this.additionalExposedPorts, roomConnectionData.additionalExposedPorts) && + Objects.equals(this.exposedPort, roomConnectionData.exposedPort) && + Objects.equals(this.status, roomConnectionData.status) && + Objects.equals(this.roomId, roomConnectionData.roomId) && + Objects.equals(this.processId, roomConnectionData.processId)&& + Objects.equals(this.additionalProperties, roomConnectionData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(additionalExposedPorts, exposedPort, status, roomId, processId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RoomConnectionData {\n"); + sb.append(" additionalExposedPorts: ").append(toIndentedString(additionalExposedPorts)).append("\n"); + sb.append(" exposedPort: ").append(toIndentedString(exposedPort)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" roomId: ").append(toIndentedString(roomId)).append("\n"); + sb.append(" processId: ").append(toIndentedString(processId)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("additionalExposedPorts"); + openapiFields.add("exposedPort"); + openapiFields.add("status"); + openapiFields.add("roomId"); + openapiFields.add("processId"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("additionalExposedPorts"); + openapiRequiredFields.add("status"); + openapiRequiredFields.add("roomId"); + openapiRequiredFields.add("processId"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to RoomConnectionData + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!RoomConnectionData.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RoomConnectionData is not found in the empty JSON string", RoomConnectionData.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : RoomConnectionData.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + // ensure the json data is an array + if (!jsonObj.get("additionalExposedPorts").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `additionalExposedPorts` to be an array in the JSON string but got `%s`", jsonObj.get("additionalExposedPorts").toString())); + } + + JsonArray jsonArrayadditionalExposedPorts = jsonObj.getAsJsonArray("additionalExposedPorts"); + // validate the required field `additionalExposedPorts` (array) + for (int i = 0; i < jsonArrayadditionalExposedPorts.size(); i++) { + ExposedPort.validateJsonObject(jsonArrayadditionalExposedPorts.get(i).getAsJsonObject()); + }; + // validate the optional field `exposedPort` + if (jsonObj.get("exposedPort") != null && !jsonObj.get("exposedPort").isJsonNull()) { + ExposedPort.validateJsonObject(jsonObj.getAsJsonObject("exposedPort")); + } + if (!jsonObj.get("roomId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `roomId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("roomId").toString())); + } + if (!jsonObj.get("processId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `processId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("processId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RoomConnectionData.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RoomConnectionData' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RoomConnectionData.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RoomConnectionData value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RoomConnectionData read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + RoomConnectionData instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RoomConnectionData given an JSON string + * + * @param jsonString JSON string + * @return An instance of RoomConnectionData + * @throws IOException if the JSON string is invalid with respect to RoomConnectionData + */ + public static RoomConnectionData fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RoomConnectionData.class); + } + + /** + * Convert an instance of RoomConnectionData to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/java/src/main/java/com/hathora/client/model/RoomConnectionDataAllOf.java b/java/src/main/java/com/hathora/client/model/RoomConnectionDataAllOf.java new file mode 100644 index 0000000..76759e5 --- /dev/null +++ b/java/src/main/java/com/hathora/client/model/RoomConnectionDataAllOf.java @@ -0,0 +1,288 @@ +/* + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.hathora.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.hathora.client.JSON; + +/** + * RoomConnectionDataAllOf + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RoomConnectionDataAllOf { + public static final String SERIALIZED_NAME_PROCESS_ID = "processId"; + @SerializedName(SERIALIZED_NAME_PROCESS_ID) + private String processId; + + public RoomConnectionDataAllOf() { + } + + public RoomConnectionDataAllOf processId(String processId) { + + this.processId = processId; + return this; + } + + /** + * System generated unique identifier to a runtime instance of your game server. + * @return processId + **/ + @javax.annotation.Nonnull + + public String getProcessId() { + return processId; + } + + + public void setProcessId(String processId) { + this.processId = processId; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RoomConnectionDataAllOf instance itself + */ + public RoomConnectionDataAllOf putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RoomConnectionDataAllOf roomConnectionDataAllOf = (RoomConnectionDataAllOf) o; + return Objects.equals(this.processId, roomConnectionDataAllOf.processId)&& + Objects.equals(this.additionalProperties, roomConnectionDataAllOf.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(processId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RoomConnectionDataAllOf {\n"); + sb.append(" processId: ").append(toIndentedString(processId)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("processId"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("processId"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to RoomConnectionDataAllOf + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!RoomConnectionDataAllOf.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RoomConnectionDataAllOf is not found in the empty JSON string", RoomConnectionDataAllOf.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : RoomConnectionDataAllOf.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("processId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `processId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("processId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RoomConnectionDataAllOf.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RoomConnectionDataAllOf' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RoomConnectionDataAllOf.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RoomConnectionDataAllOf value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RoomConnectionDataAllOf read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + RoomConnectionDataAllOf instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RoomConnectionDataAllOf given an JSON string + * + * @param jsonString JSON string + * @return An instance of RoomConnectionDataAllOf + * @throws IOException if the JSON string is invalid with respect to RoomConnectionDataAllOf + */ + public static RoomConnectionDataAllOf fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RoomConnectionDataAllOf.class); + } + + /** + * Convert an instance of RoomConnectionDataAllOf to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/java/src/main/java/com/hathora/client/model/RoomReadyStatus.java b/java/src/main/java/com/hathora/client/model/RoomReadyStatus.java new file mode 100644 index 0000000..be00030 --- /dev/null +++ b/java/src/main/java/com/hathora/client/model/RoomReadyStatus.java @@ -0,0 +1,73 @@ +/* + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.hathora.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Gets or Sets RoomReadyStatus + */ +@JsonAdapter(RoomReadyStatus.Adapter.class) +public enum RoomReadyStatus { + + ACTIVE("active"), + + STARTING("starting"); + + private String value; + + RoomReadyStatus(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static RoomReadyStatus fromValue(String value) { + for (RoomReadyStatus b : RoomReadyStatus.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final RoomReadyStatus enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public RoomReadyStatus read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return RoomReadyStatus.fromValue(value); + } + } +} + diff --git a/java/src/main/java/com/hathora/client/model/VerificationEmailSuccess.java b/java/src/main/java/com/hathora/client/model/VerificationEmailSuccess.java new file mode 100644 index 0000000..b3caa0e --- /dev/null +++ b/java/src/main/java/com/hathora/client/model/VerificationEmailSuccess.java @@ -0,0 +1,71 @@ +/* + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.hathora.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Gets or Sets VerificationEmailSuccess + */ +@JsonAdapter(VerificationEmailSuccess.Adapter.class) +public enum VerificationEmailSuccess { + + SUCCESS("success"); + + private String value; + + VerificationEmailSuccess(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static VerificationEmailSuccess fromValue(String value) { + for (VerificationEmailSuccess b : VerificationEmailSuccess.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final VerificationEmailSuccess enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public VerificationEmailSuccess read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return VerificationEmailSuccess.fromValue(value); + } + } +} + diff --git a/swagger.json b/swagger.json index 3377b91..0b49c42 100644 --- a/swagger.json +++ b/swagger.json @@ -1,6418 +1 @@ -{ - "components": { - "examples": {}, - "headers": {}, - "parameters": {}, - "requestBodies": {}, - "responses": {}, - "schemas": { - "AppName": { - "type": "string", - "example": "minecraft", - "description": "Readable name for an application. Must be unique within an organization.", - "maxLength": 64, - "pattern": "^[a-z0-9-]+$" - }, - "AppId": { - "type": "string", - "example": "app-af469a92-5b45-4565-b3c4-b79878de67d2", - "description": "System generated unique identifier for an application." - }, - "Record_string.never_": { - "properties": {}, - "type": "object", - "description": "Construct a type with a set of properties K of type T" - }, - "AuthConfiguration": { - "properties": { - "google": { - "properties": { - "clientId": { - "type": "string", - "description": "A Google generated token representing the developer's credentials for [Google's API Console](https://console.cloud.google.com/apis/dashboard?pli=1&project=discourse-login-388921). Learn how to get a `clientId` [here](https://developers.google.com/identity/gsi/web/guides/get-google-api-clientid)." - } - }, - "required": ["clientId"], - "type": "object", - "description": "Enable google auth for your application." - }, - "nickname": { - "$ref": "#/components/schemas/Record_string.never_", - "description": "Enable nickname auth for your application." - }, - "anonymous": { - "$ref": "#/components/schemas/Record_string.never_", - "description": "Enable anonymous auth for your application." - } - }, - "type": "object", - "description": "Configure [player authentication](https://hathora.dev/docs/lobbies-and-matchmaking/auth-service) for your application. Use Hathora's built-in auth providers or use your own [custom authentication](https://hathora.dev/docs/lobbies-and-matchmaking/auth-service#custom-auth-provider)." - }, - "OrgId": { - "type": "string", - "example": "org-6f706e83-0ec1-437a-9a46-7d4281eb2f39", - "description": "System generated unique identifier for an organization. Not guaranteed to have a specific format." - }, - "Application": { - "properties": { - "deletedBy": { - "type": "string", - "nullable": true, - "description": "UserId or email address for the user that deleted the application.", - "example": "google-oauth2|107030234048588177467" - }, - "deletedAt": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "When the application was deleted." - }, - "createdAt": { - "type": "string", - "format": "date-time", - "description": "When the application was created." - }, - "createdBy": { - "type": "string", - "description": "UserId or email address for the user that created the application.", - "example": "google-oauth2|107030234048588177467" - }, - "orgId": { - "$ref": "#/components/schemas/OrgId" - }, - "authConfiguration": { - "$ref": "#/components/schemas/AuthConfiguration", - "description": "Used to authenticate player requests. Use your own authentication or Hathora's Auth Client." - }, - "appSecret": { - "type": "string", - "description": "Secret that is used for identity and access management.", - "example": "secret-6f706e83-0ec1-437a-9a46-7d4281eb2f39" - }, - "appId": { - "$ref": "#/components/schemas/AppId" - }, - "appName": { - "$ref": "#/components/schemas/AppName" - } - }, - "required": [ - "deletedBy", - "deletedAt", - "createdAt", - "createdBy", - "orgId", - "authConfiguration", - "appSecret", - "appId", - "appName" - ], - "type": "object", - "description": "An application object is the top level namespace for the game server." - }, - "BuildId": { - "type": "integer", - "format": "int32", - "example": 1, - "description": "System generated id for a build. Increments by 1." - }, - "DeploymentId": { - "type": "integer", - "format": "int32", - "example": 1, - "description": "System generated id for a deployment. Increments by 1." - }, - "TransportType": { - "type": "string", - "enum": ["tcp", "udp", "tls"], - "description": "Transport type specifies the underlying communication protocol to the exposed port." - }, - "ContainerPort": { - "properties": { - "transportType": { - "$ref": "#/components/schemas/TransportType" - }, - "port": { - "type": "integer", - "format": "int32", - "example": 8000, - "minimum": 1, - "maximum": 65535 - }, - "name": { - "type": "string", - "description": "Readable name for the port.", - "example": "default", - "minLength": 1, - "maxLength": 100, - "pattern": "^[a-z][a-z0-9-]*$" - } - }, - "required": ["transportType", "port", "name"], - "type": "object", - "description": "A container port object represents the transport configruations for how your server will listen." - }, - "PlanName": { - "type": "string", - "enum": ["tiny", "small", "medium", "large"], - "example": "tiny", - "description": "A plan defines how much CPU and memory is required to run an instance of your game server.\n\n`tiny`: shared core, 1gb memory\n\n`small`: 1 core, 2gb memory\n\n`medium`: 2 core, 4gb memory\n\n`large`: 4 core, 8gb memory" - }, - "NumRoomsPerProcess": { - "type": "integer", - "format": "int32", - "example": 3, - "description": "Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process.", - "minimum": 1, - "maximum": 10000 - }, - "Deployment": { - "properties": { - "idleTimeoutEnabled": { - "type": "boolean", - "description": "Option to shut down processes that have had no new connections or rooms\nfor five minutes.", - "default": "true" - }, - "env": { - "items": { - "properties": { - "value": { - "type": "string", - "example": "TRUE", - "maxLength": 5000 - }, - "name": { - "type": "string", - "example": "EULA", - "minLength": 1, - "maxLength": 100, - "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$" - } - }, - "required": ["value", "name"], - "type": "object" - }, - "type": "array", - "description": "The environment variable that our process will have access to at runtime.", - "maxItems": 100 - }, - "roomsPerProcess": { - "$ref": "#/components/schemas/NumRoomsPerProcess" - }, - "planName": { - "$ref": "#/components/schemas/PlanName" - }, - "additionalContainerPorts": { - "items": { - "$ref": "#/components/schemas/ContainerPort" - }, - "type": "array", - "description": "Additional ports your server listens on.", - "example": { - "transportType": "tcp", - "port": 4000, - "name": "debug" - }, - "maxItems": 2 - }, - "defaultContainerPort": { - "$ref": "#/components/schemas/ContainerPort", - "description": "Describes the primary port your process listens on." - }, - "transportType": { - "type": "string", - "enum": ["tcp", "udp", "tls"], - "deprecated": true - }, - "containerPort": { - "type": "number", - "format": "double", - "deprecated": true - }, - "createdAt": { - "type": "string", - "format": "date-time", - "description": "When the deployment was created." - }, - "createdBy": { - "type": "string", - "description": "UserId or email address for the user that created the deployment.", - "example": "google-oauth2|107030234048588177467" - }, - "requestedMemoryMB": { - "type": "integer", - "format": "int32", - "description": "The amount of memory allocated to your process.", - "example": 1024 - }, - "requestedCPU": { - "type": "number", - "format": "double", - "description": "The number of cores allocated to your process.", - "example": 0.5 - }, - "deploymentId": { - "$ref": "#/components/schemas/DeploymentId" - }, - "buildId": { - "$ref": "#/components/schemas/BuildId" - }, - "appId": { - "$ref": "#/components/schemas/AppId" - } - }, - "required": [ - "env", - "roomsPerProcess", - "planName", - "additionalContainerPorts", - "defaultContainerPort", - "transportType", - "containerPort", - "createdAt", - "createdBy", - "requestedMemoryMB", - "requestedCPU", - "deploymentId", - "buildId", - "appId" - ], - "type": "object", - "description": "Deployment is a versioned configuration for a build that describes runtime behavior." - }, - "BuildStatus": { - "type": "string", - "enum": ["created", "running", "succeeded", "failed"] - }, - "Region": { - "type": "string", - "enum": [ - "Seattle", - "Los_Angeles", - "Washington_DC", - "Chicago", - "London", - "Frankfurt", - "Mumbai", - "Singapore", - "Tokyo", - "Sydney", - "Sao_Paulo" - ] - }, - "BuildTag": { - "type": "string", - "example": "0.1.14-14c793", - "description": "Tag to associate an external version with a build. It is accessible via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV1/operation/GetBuildInfo).", - "maxLength": 1000 - }, - "Build": { - "properties": { - "buildTag": { - "allOf": [ - { - "$ref": "#/components/schemas/BuildTag" - } - ], - "nullable": true - }, - "regionalContainerTags": { - "items": { - "properties": { - "containerTag": { - "type": "string" - }, - "region": { - "$ref": "#/components/schemas/Region" - } - }, - "required": ["containerTag", "region"], - "type": "object" - }, - "type": "array", - "deprecated": true - }, - "imageSize": { - "type": "integer", - "format": "int32", - "description": "The size (in bytes) of the Docker image built by Hathora." - }, - "status": { - "$ref": "#/components/schemas/BuildStatus", - "description": "Current status of your build.\n\n`created`: a build was created but not yet run\n\n`running`: the build process is actively executing\n\n`succeeded`: the game server artifact was successfully built and stored in the Hathora registries\n\n`failed`: the build process was unsuccessful, most likely due to an error with the `Dockerfile`" - }, - "deletedAt": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "When the build was deleted." - }, - "finishedAt": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "When [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) finished executing." - }, - "startedAt": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "When [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) is called." - }, - "createdAt": { - "type": "string", - "format": "date-time", - "description": "When [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild) is called." - }, - "createdBy": { - "type": "string", - "description": "UserId or email address for the user that created the build.", - "example": "google-oauth2|107030234048588177467" - }, - "buildId": { - "$ref": "#/components/schemas/BuildId" - }, - "appId": { - "$ref": "#/components/schemas/AppId" - } - }, - "required": [ - "regionalContainerTags", - "imageSize", - "status", - "deletedAt", - "finishedAt", - "startedAt", - "createdAt", - "createdBy", - "buildId", - "appId" - ], - "type": "object", - "description": "A build represents a game server artifact and its associated metadata." - }, - "ApplicationWithLatestDeploymentAndBuild": { - "allOf": [ - { - "$ref": "#/components/schemas/Application" - }, - { - "properties": { - "deployment": { - "allOf": [ - { - "$ref": "#/components/schemas/Deployment" - }, - { - "properties": { - "build": { - "$ref": "#/components/schemas/Build" - } - }, - "required": ["build"], - "type": "object" - } - ] - } - }, - "type": "object" - } - ] - }, - "AppConfig": { - "properties": { - "authConfiguration": { - "$ref": "#/components/schemas/AuthConfiguration" - }, - "appName": { - "$ref": "#/components/schemas/AppName" - } - }, - "required": ["authConfiguration", "appName"], - "type": "object" - }, - "ApiError": { - "properties": { - "message": { - "type": "string" - } - }, - "required": ["message"], - "type": "object" - }, - "LoginResponse": { - "properties": { - "token": { - "type": "string", - "description": "A unique Hathora-signed JWT player token.", - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0eXBlIjoiYW5vbnltb3VzIiwiaWQiOiJ3aDA4eWN3eTJwOSIsIm5hbWUiOiJqaXR0ZXJ5LXNhbG1vbi1ndWxsIiwiaWF0IjoxNjg5MzQ5MTk3fQ.-LzlPhZw2tw0ycZ229IRHwwmINGKWNPFMDrXOphLjEk" - } - }, - "required": ["token"], - "type": "object" - }, - "LoginNicknameRequest": { - "properties": { - "nickname": { - "type": "string", - "description": "An alias to represent a player.", - "example": "squiddytwoshoes" - } - }, - "required": ["nickname"], - "type": "object" - }, - "LoginGoogleRequest": { - "properties": { - "idToken": { - "type": "string", - "description": "A Google-signed OIDC ID token representing a player's authenticated identity. Learn how to get an `idToken` [here](https://cloud.google.com/docs/authentication/get-id-token).", - "example": "eyJhbGciOiJSUzI1NiIsImtpZCI6ImZkNDhhNzUxMzhkOWQ0OGYwYWE2MzVlZjU2OWM0ZTE5NmY3YWU4ZDYiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJhY2NvdW50cy5nb29nbGUuY29tIiwiYXpwIjoiODQ4NDEyODI2Nzg4LW00bXNyYjZxNDRkbTJ1ZTNrZ3Z1aTBmcTdrZGE1NWxzLmFwcHMuZ29vZ2xldXNlcmNvbnRlbnQuY29tIiwiYXVkIjoiODQ4NDEyODI2Nzg4LW00bXNyYjZxNDRkbTJ1ZTNrZ3Z1aTBmcTdrZGE1NWxzLmFwcHMuZ29vZ2xldXNlcmNvbnRlbnQuY29tIiwic3ViIjoiMTE0NTQyMzMwNzI3MTU2MTMzNzc2IiwiZW1haWwiOiJocGFdkeivmeuzQGdtYWlsLmNvbSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJhdF9oYXNoIjoidno1NGhhdTNxbnVR" - } - }, - "required": ["idToken"], - "type": "object" - }, - "CardBrand": { - "type": "string", - "enum": ["amex", "cartes_bancaires", "diners", "discover", "jcb", "mastercard", "visa", "unionpay", "card"] - }, - "CardPaymentMethod": { - "properties": { - "last4": { - "type": "string" - }, - "brand": { - "$ref": "#/components/schemas/CardBrand" - } - }, - "required": ["last4", "brand"], - "type": "object" - }, - "AchPaymentMethod": { - "properties": { - "last4": { - "type": "string" - }, - "bankName": { - "type": "string" - } - }, - "type": "object" - }, - "LinkPaymentMethod": { - "properties": { - "email": { - "type": "string" - } - }, - "type": "object" - }, - "Partial__card-CardPaymentMethod--ach-AchPaymentMethod--link-LinkPaymentMethod--__": { - "properties": { - "card": { - "$ref": "#/components/schemas/CardPaymentMethod" - }, - "ach": { - "$ref": "#/components/schemas/AchPaymentMethod" - }, - "link": { - "$ref": "#/components/schemas/LinkPaymentMethod" - } - }, - "type": "object", - "description": "Make all properties in T optional" - }, - "PaymentMethod": { - "$ref": "#/components/schemas/Partial__card-CardPaymentMethod--ach-AchPaymentMethod--link-LinkPaymentMethod--__" - }, - "CustomerPortalUrl": { - "properties": { - "returnUrl": { - "type": "string" - } - }, - "required": ["returnUrl"], - "type": "object" - }, - "InvoiceStatus": { - "type": "string", - "enum": ["pending", "paid", "overdue"] - }, - "Invoice": { - "properties": { - "status": { - "$ref": "#/components/schemas/InvoiceStatus" - }, - "amountDue": { - "type": "number", - "format": "double" - }, - "pdfUrl": { - "type": "string" - }, - "dueDate": { - "type": "string", - "format": "date-time" - }, - "year": { - "type": "number", - "format": "double" - }, - "month": { - "type": "number", - "format": "double" - }, - "id": { - "type": "string" - } - }, - "required": ["status", "amountDue", "pdfUrl", "dueDate", "year", "month", "id"], - "type": "object" - }, - "CreateBuildParams": { - "properties": { - "buildTag": { - "$ref": "#/components/schemas/BuildTag" - } - }, - "type": "object" - }, - "DeploymentConfig": { - "properties": { - "idleTimeoutEnabled": { - "type": "boolean", - "description": "Option to shut down processes that have had no new connections or rooms\nfor five minutes.", - "default": "true" - }, - "env": { - "items": { - "properties": { - "value": { - "type": "string", - "example": "TRUE", - "maxLength": 5000 - }, - "name": { - "type": "string", - "example": "EULA", - "minLength": 1, - "maxLength": 100, - "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$" - } - }, - "required": ["value", "name"], - "type": "object" - }, - "type": "array", - "description": "The environment variable that our process will have access to at runtime.", - "maxItems": 100 - }, - "roomsPerProcess": { - "$ref": "#/components/schemas/NumRoomsPerProcess" - }, - "planName": { - "$ref": "#/components/schemas/PlanName" - }, - "additionalContainerPorts": { - "items": { - "$ref": "#/components/schemas/ContainerPort" - }, - "type": "array", - "description": "Additional ports your server listens on.", - "maxItems": 2 - }, - "transportType": { - "$ref": "#/components/schemas/TransportType" - }, - "containerPort": { - "type": "integer", - "format": "int32", - "description": "Default port the server listens on.", - "example": 4000, - "minimum": 1, - "maximum": 65535 - } - }, - "required": ["env", "roomsPerProcess", "planName", "transportType", "containerPort"], - "type": "object", - "description": "User specified deployment configuration for your application at runtime." - }, - "DiscoveryResponse": { - "items": { - "properties": { - "port": { - "type": "number", - "format": "double" - }, - "host": { - "type": "string" - }, - "region": { - "$ref": "#/components/schemas/Region" - } - }, - "required": ["port", "host", "region"], - "type": "object" - }, - "type": "array", - "example": [ - { - "region": "Seattle", - "host": "ping.hathora.dev", - "port": 2000 - } - ] - }, - "RoomId": { - "type": "string", - "example": "2swovpy1fnunu", - "description": "Unique identifier to a game session or match. Use the default system generated ID or overwrite it with your own.\nNote: error will be returned if `roomId` is not globally unique.", - "minLength": 1, - "maxLength": 100, - "pattern": "^[a-zA-Z0-9_-]*$" - }, - "LobbyVisibility": { - "type": "string", - "enum": ["private", "public", "local"], - "example": "private", - "description": "Types of lobbies a player can create.\n\n`private`: the player who created the room must share the roomId with their friends\n\n`public`: visible in the public lobby list, anyone can join\n\n`local`: for testing with a server running locally" - }, - "LobbyInitialConfig": { - "additionalProperties": false, - "type": "object", - "description": "User input to initialize the game state. Object must be smaller than 64KB." - }, - "ShortCode": { - "type": "string", - "example": "LFG4", - "description": "User-defined identifier for a lobby.", - "maxLength": 100 - }, - "Lobby": { - "properties": { - "shortCode": { - "allOf": [ - { - "$ref": "#/components/schemas/ShortCode" - } - ], - "nullable": true - }, - "state": { - "additionalProperties": false, - "type": "object", - "description": "JSON blob to store metadata for a room. Must be smaller than 1MB." - }, - "initialConfig": { - "$ref": "#/components/schemas/LobbyInitialConfig" - }, - "createdAt": { - "type": "string", - "format": "date-time", - "description": "When the lobby was created." - }, - "createdBy": { - "type": "string", - "description": "UserId or email address for the user that created the lobby.", - "example": "google-oauth2|107030234048588177467" - }, - "local": { - "type": "boolean", - "deprecated": true - }, - "visibility": { - "$ref": "#/components/schemas/LobbyVisibility" - }, - "region": { - "$ref": "#/components/schemas/Region" - }, - "roomId": { - "$ref": "#/components/schemas/RoomId" - }, - "appId": { - "$ref": "#/components/schemas/AppId" - } - }, - "required": [ - "shortCode", - "initialConfig", - "createdAt", - "createdBy", - "local", - "visibility", - "region", - "roomId", - "appId" - ], - "type": "object", - "description": "A lobby object allows you to store and manage metadata for your rooms." - }, - "CreateLobbyParams": { - "properties": { - "visibility": { - "$ref": "#/components/schemas/LobbyVisibility" - }, - "initialConfig": { - "$ref": "#/components/schemas/LobbyInitialConfig" - }, - "region": { - "$ref": "#/components/schemas/Region" - } - }, - "required": ["visibility", "initialConfig", "region"], - "type": "object" - }, - "SetLobbyStateParams": { - "properties": { - "state": { - "additionalProperties": false, - "type": "object", - "description": "JSON blob to store metadata for a room. Must be smaller than 1MB." - } - }, - "required": ["state"], - "type": "object" - }, - "RoomConfig": { - "type": "string", - "example": "{\"name\":\"my-room\"}", - "description": "Optional configuration parameters for the room. Can be any string including stringified JSON. It is accessible from the room via [`GetRoomInfo()`](https://hathora.dev/api#tag/RoomV2/operation/GetRoomInfo).", - "maxLength": 10000 - }, - "LobbyV3": { - "properties": { - "shortCode": { - "$ref": "#/components/schemas/ShortCode", - "description": "User defined identifier for a lobby, defaults to `roomId`" - }, - "createdAt": { - "type": "string", - "format": "date-time", - "description": "When the lobby was created." - }, - "createdBy": { - "type": "string", - "description": "UserId or email address for the user that created the lobby.", - "example": "google-oauth2|107030234048588177467" - }, - "roomConfig": { - "allOf": [ - { - "$ref": "#/components/schemas/RoomConfig" - } - ], - "nullable": true - }, - "visibility": { - "$ref": "#/components/schemas/LobbyVisibility" - }, - "region": { - "$ref": "#/components/schemas/Region" - }, - "roomId": { - "$ref": "#/components/schemas/RoomId", - "description": "Hathora generated identifier for a room, unique for a given application (including stopped rooms)" - }, - "appId": { - "$ref": "#/components/schemas/AppId" - } - }, - "required": ["shortCode", "createdAt", "createdBy", "roomConfig", "visibility", "region", "roomId", "appId"], - "type": "object", - "description": "A lobby object allows you to store and manage metadata for your rooms." - }, - "CreateLobbyV3Params": { - "properties": { - "visibility": { - "$ref": "#/components/schemas/LobbyVisibility" - }, - "roomConfig": { - "$ref": "#/components/schemas/RoomConfig" - }, - "region": { - "$ref": "#/components/schemas/Region" - } - }, - "required": ["visibility", "region"], - "type": "object" - }, - "LogsFollow": { - "type": "boolean", - "default": "false", - "description": "Stream logs in realtime." - }, - "TailLines": { - "type": "integer", - "format": "int32", - "default": "100", - "example": 100, - "description": "Number of lines to return from most recent logs history.", - "minimum": 1, - "maximum": 5000 - }, - "ProcessId": { - "type": "string", - "example": "cbfcddd2-0006-43ae-996c-995fff7bed2e", - "description": "System generated unique identifier to a runtime instance of your game server." - }, - "VerificationEmailResponse": { - "properties": { - "status": { - "type": "string", - "enum": ["success"], - "nullable": false - } - }, - "required": ["status"], - "type": "object" - }, - "VerificationEmailRequest": { - "properties": { - "userId": { - "type": "string" - } - }, - "required": ["userId"], - "type": "object" - }, - "MetricValue": { - "properties": { - "value": { - "type": "number", - "format": "double" - }, - "timestamp": { - "type": "number", - "format": "double" - } - }, - "required": ["value", "timestamp"], - "type": "object" - }, - "Record_Partial_MetricName_.MetricValue-Array_": { - "properties": { - "cpu": { - "items": { - "$ref": "#/components/schemas/MetricValue" - }, - "type": "array" - }, - "memory": { - "items": { - "$ref": "#/components/schemas/MetricValue" - }, - "type": "array" - }, - "rate_egress": { - "items": { - "$ref": "#/components/schemas/MetricValue" - }, - "type": "array" - }, - "total_egress": { - "items": { - "$ref": "#/components/schemas/MetricValue" - }, - "type": "array" - }, - "active_connections": { - "items": { - "$ref": "#/components/schemas/MetricValue" - }, - "type": "array" - } - }, - "type": "object", - "description": "Construct a type with a set of properties K of type T" - }, - "MetricsResponse": { - "$ref": "#/components/schemas/Record_Partial_MetricName_.MetricValue-Array_" - }, - "MetricName": { - "type": "string", - "enum": ["cpu", "memory", "rate_egress", "total_egress", "active_connections"], - "description": "Available metrics to query over time." - }, - "MetricsStep": { - "type": "integer", - "format": "int32", - "default": "60", - "description": "Width of time in seconds to group data." - }, - "ExposedPort": { - "properties": { - "transportType": { - "$ref": "#/components/schemas/TransportType" - }, - "port": { - "type": "integer", - "format": "int32" - }, - "host": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": ["transportType", "port", "host", "name"], - "type": "object", - "example": { - "host": "1.proxy.hathora.dev", - "name": "default", - "port": 34567, - "transportType": "tcp" - }, - "description": "Connection details for an active process." - }, - "Process": { - "properties": { - "egressedBytes": { - "type": "integer", - "format": "int32", - "description": "Measures network traffic leaving the process in bytes.", - "example": 435 - }, - "idleSince": { - "type": "string", - "format": "date-time", - "nullable": true, - "deprecated": true - }, - "activeConnectionsUpdatedAt": { - "type": "string", - "format": "date-time", - "deprecated": true - }, - "activeConnections": { - "type": "integer", - "format": "int32", - "description": "Tracks the number of active connections to a process.", - "example": 10, - "deprecated": true - }, - "roomsAllocatedUpdatedAt": { - "type": "string", - "format": "date-time" - }, - "roomsAllocated": { - "type": "integer", - "format": "int32", - "description": "Tracks the number of rooms that have been allocated to the process.", - "example": 1 - }, - "roomSlotsAvailableUpdatedAt": { - "type": "string", - "format": "date-time", - "deprecated": true - }, - "roomSlotsAvailable": { - "type": "number", - "format": "double", - "deprecated": true - }, - "draining": { - "type": "boolean", - "description": "Process in drain will not accept any new rooms." - }, - "terminatedAt": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "When the process has been terminated." - }, - "stoppingAt": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "When the process is issued to stop. We use this to determine when we should stop billing." - }, - "startedAt": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "When the process bound to the specified port. We use this to determine when we should start billing." - }, - "startingAt": { - "type": "string", - "format": "date-time", - "description": "When the process started being provisioned." - }, - "roomsPerProcess": { - "$ref": "#/components/schemas/NumRoomsPerProcess" - }, - "additionalExposedPorts": { - "items": { - "$ref": "#/components/schemas/ExposedPort" - }, - "type": "array", - "example": [ - { - "host": "1.proxy.hathora.dev", - "name": "debug", - "port": 72941, - "transportType": "tcp" - } - ], - "maxItems": 2 - }, - "exposedPort": { - "allOf": [ - { - "$ref": "#/components/schemas/ExposedPort" - } - ], - "nullable": true - }, - "port": { - "type": "number", - "format": "double", - "deprecated": true - }, - "host": { - "type": "string", - "deprecated": true - }, - "region": { - "$ref": "#/components/schemas/Region" - }, - "processId": { - "$ref": "#/components/schemas/ProcessId" - }, - "deploymentId": { - "$ref": "#/components/schemas/DeploymentId" - }, - "appId": { - "$ref": "#/components/schemas/AppId" - } - }, - "required": [ - "egressedBytes", - "idleSince", - "activeConnectionsUpdatedAt", - "activeConnections", - "roomsAllocatedUpdatedAt", - "roomsAllocated", - "roomSlotsAvailableUpdatedAt", - "roomSlotsAvailable", - "draining", - "terminatedAt", - "stoppingAt", - "startedAt", - "startingAt", - "roomsPerProcess", - "additionalExposedPorts", - "exposedPort", - "port", - "host", - "region", - "processId", - "deploymentId", - "appId" - ], - "type": "object", - "description": "A process object represents a runtime instance of your game server and its metadata." - }, - "RoomStatus": { - "type": "string", - "enum": ["scheduling", "active", "suspended", "destroyed"], - "example": "active", - "description": "The allocation status of a room.\n\n`scheduling`: a process is not allocated yet and the room is waiting to be scheduled\n\n`active`: ready to accept connections\n\n`suspended`: room is unallocated from the process but can be rescheduled later with the same `roomId`\n\n`destroyed`: all associated metadata is deleted" - }, - "RoomAllocationId": { - "type": "string", - "example": "e3a0aa32-1711-4036-acfa-008b96061a78", - "description": "System generated unique identifier to an allocated instance of a room." - }, - "RoomAllocation": { - "properties": { - "unscheduledAt": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "scheduledAt": { - "type": "string", - "format": "date-time" - }, - "processId": { - "$ref": "#/components/schemas/ProcessId" - }, - "roomAllocationId": { - "$ref": "#/components/schemas/RoomAllocationId" - } - }, - "required": ["unscheduledAt", "scheduledAt", "processId", "roomAllocationId"], - "type": "object", - "description": "Metadata on an allocated instance of a room." - }, - "Pick_Room.Exclude_keyofRoom.allocations__": { - "properties": { - "appId": { - "$ref": "#/components/schemas/AppId" - }, - "roomId": { - "$ref": "#/components/schemas/RoomId" - }, - "roomConfig": { - "allOf": [ - { - "$ref": "#/components/schemas/RoomConfig" - } - ], - "nullable": true - }, - "status": { - "$ref": "#/components/schemas/RoomStatus" - }, - "currentAllocation": { - "allOf": [ - { - "$ref": "#/components/schemas/RoomAllocation" - } - ], - "nullable": true - } - }, - "required": ["appId", "roomId", "roomConfig", "status", "currentAllocation"], - "type": "object", - "description": "From T, pick a set of properties whose keys are in the union K" - }, - "Omit_Room.allocations_": { - "$ref": "#/components/schemas/Pick_Room.Exclude_keyofRoom.allocations__", - "description": "Construct a type with the properties of T except for those in type K." - }, - "RoomWithoutAllocations": { - "$ref": "#/components/schemas/Omit_Room.allocations_" - }, - "ProcessWithRooms": { - "allOf": [ - { - "$ref": "#/components/schemas/Process" - }, - { - "properties": { - "rooms": { - "items": { - "$ref": "#/components/schemas/RoomWithoutAllocations" - }, - "type": "array" - }, - "totalRooms": { - "type": "integer", - "format": "int32" - } - }, - "required": ["rooms", "totalRooms"], - "type": "object" - } - ] - }, - "ProcessStatus": { - "type": "string", - "enum": ["starting", "running", "draining", "stopping", "stopped", "failed"] - }, - "ProcessV2": { - "properties": { - "status": { - "$ref": "#/components/schemas/ProcessStatus", - "description": "Process in drain will not accept any new rooms." - }, - "roomsAllocated": { - "type": "integer", - "format": "int32", - "description": "Tracks the number of rooms that have been allocated to the process.", - "example": 1 - }, - "terminatedAt": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "When the process has been terminated." - }, - "stoppingAt": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "When the process is issued to stop. We use this to determine when we should stop billing." - }, - "startedAt": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "When the process bound to the specified port. We use this to determine when we should start billing." - }, - "createdAt": { - "type": "string", - "format": "date-time", - "description": "When the process started being provisioned." - }, - "roomsPerProcess": { - "$ref": "#/components/schemas/NumRoomsPerProcess" - }, - "additionalExposedPorts": { - "items": { - "$ref": "#/components/schemas/ExposedPort" - }, - "type": "array", - "example": [ - { - "host": "1.proxy.hathora.dev", - "name": "debug", - "port": 72941, - "transportType": "tcp" - } - ], - "maxItems": 2 - }, - "exposedPort": { - "allOf": [ - { - "$ref": "#/components/schemas/ExposedPort" - } - ], - "nullable": true - }, - "region": { - "$ref": "#/components/schemas/Region" - }, - "processId": { - "$ref": "#/components/schemas/ProcessId" - }, - "deploymentId": { - "$ref": "#/components/schemas/DeploymentId" - }, - "appId": { - "$ref": "#/components/schemas/AppId" - } - }, - "required": [ - "status", - "roomsAllocated", - "terminatedAt", - "stoppingAt", - "startedAt", - "createdAt", - "roomsPerProcess", - "additionalExposedPorts", - "exposedPort", - "region", - "processId", - "deploymentId", - "appId" - ], - "type": "object" - }, - "CreateRoomParams": { - "properties": { - "roomConfig": { - "$ref": "#/components/schemas/RoomConfig" - }, - "region": { - "$ref": "#/components/schemas/Region" - } - }, - "required": ["region"], - "type": "object" - }, - "Room": { - "properties": { - "currentAllocation": { - "allOf": [ - { - "$ref": "#/components/schemas/RoomAllocation" - } - ], - "nullable": true - }, - "status": { - "$ref": "#/components/schemas/RoomStatus" - }, - "allocations": { - "items": { - "$ref": "#/components/schemas/RoomAllocation" - }, - "type": "array" - }, - "roomConfig": { - "allOf": [ - { - "$ref": "#/components/schemas/RoomConfig" - } - ], - "nullable": true - }, - "roomId": { - "$ref": "#/components/schemas/RoomId" - }, - "appId": { - "$ref": "#/components/schemas/AppId" - } - }, - "required": ["currentAllocation", "status", "allocations", "roomConfig", "roomId", "appId"], - "type": "object", - "description": "A room object represents a game session or match." - }, - "StartingConnectionInfo": { - "properties": { - "status": { - "type": "string", - "enum": ["starting"], - "nullable": false - }, - "roomId": { - "$ref": "#/components/schemas/RoomId" - } - }, - "required": ["status", "roomId"], - "type": "object" - }, - "ActiveConnectionInfo": { - "properties": { - "status": { - "type": "string", - "enum": ["active"], - "nullable": false - }, - "transportType": { - "$ref": "#/components/schemas/TransportType" - }, - "port": { - "type": "number", - "format": "double" - }, - "host": { - "type": "string" - }, - "roomId": { - "$ref": "#/components/schemas/RoomId" - } - }, - "required": ["status", "transportType", "port", "host", "roomId"], - "type": "object" - }, - "ConnectionInfo": { - "anyOf": [ - { - "$ref": "#/components/schemas/StartingConnectionInfo" - }, - { - "$ref": "#/components/schemas/ActiveConnectionInfo" - } - ], - "description": "Connection information to the default port." - }, - "ConnectionInfoV2": { - "properties": { - "additionalExposedPorts": { - "items": { - "$ref": "#/components/schemas/ExposedPort" - }, - "type": "array", - "example": [ - { - "host": "1.proxy.hathora.dev", - "name": "debug", - "port": 72941, - "transportType": "tcp" - } - ], - "maxItems": 2 - }, - "exposedPort": { - "$ref": "#/components/schemas/ExposedPort" - }, - "status": { - "type": "string", - "enum": ["starting", "active"], - "description": "`exposedPort` will only be available when the `status` of a room is \"active\".", - "example": "active" - }, - "roomId": { - "$ref": "#/components/schemas/RoomId" - } - }, - "required": ["additionalExposedPorts", "status", "roomId"], - "type": "object", - "description": "Connection information for the default and additional ports." - }, - "CreateRoomResponse": { - "allOf": [ - { - "$ref": "#/components/schemas/ConnectionInfoV2" - }, - { - "properties": { - "processId": { - "$ref": "#/components/schemas/ProcessId" - } - }, - "required": ["processId"], - "type": "object" - } - ] - }, - "UpdateRoomConfigParams": { - "properties": { - "roomConfig": { - "$ref": "#/components/schemas/RoomConfig" - } - }, - "required": ["roomConfig"], - "type": "object" - }, - "OrgTokenId": { - "type": "string", - "example": "org-token-af469a92-5b45-4565-b3c4-b79878de67d2", - "description": "System generated unique identifier for an organization token." - }, - "OrgTokenName": { - "type": "string", - "example": "ci-token", - "description": "Readable name for a token. Must be unique within an organization.", - "maxLength": 64 - }, - "OrgTokenStatus": { - "type": "string", - "enum": ["active", "revoked"] - }, - "OrgToken": { - "properties": { - "createdAt": { - "type": "string", - "format": "date-time" - }, - "createdBy": { - "type": "string" - }, - "lastFourCharsOfKey": { - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/OrgTokenStatus" - }, - "name": { - "$ref": "#/components/schemas/OrgTokenName" - }, - "orgId": { - "type": "string" - }, - "orgTokenId": { - "$ref": "#/components/schemas/OrgTokenId" - } - }, - "required": ["createdAt", "createdBy", "lastFourCharsOfKey", "status", "name", "orgId", "orgTokenId"], - "type": "object" - }, - "ListOrgTokens": { - "properties": { - "tokens": { - "items": { - "$ref": "#/components/schemas/OrgToken" - }, - "type": "array" - } - }, - "required": ["tokens"], - "type": "object" - }, - "CreatedOrgToken": { - "properties": { - "plainTextToken": { - "type": "string" - }, - "orgToken": { - "$ref": "#/components/schemas/OrgToken" - } - }, - "required": ["plainTextToken", "orgToken"], - "type": "object" - }, - "CreateOrgToken": { - "properties": { - "name": { - "$ref": "#/components/schemas/OrgTokenName" - } - }, - "required": ["name"], - "type": "object" - } - }, - "securitySchemes": { - "hathoraDevToken": { - "type": "http", - "scheme": "bearer", - "bearerFormat": "JWT" - }, - "playerAuth": { - "type": "http", - "scheme": "bearer", - "bearerFormat": "JWT" - } - } - }, - "info": { - "title": "Hathora Cloud API", - "version": "0.0.1", - "description": "Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally.", - "contact": {} - }, - "openapi": "3.0.0", - "paths": { - "/apps/v1/list": { - "get": { - "operationId": "GetApps", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/ApplicationWithLatestDeploymentAndBuild" - }, - "type": "array" - } - } - } - } - }, - "description": "Returns an unsorted list of your organization’s [applications](https://hathora.dev/docs/concepts/hathora-entities#application). An application is uniquely identified by an `appId`.", - "tags": ["AppV1"], - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [] - } - }, - "/apps/v1/create": { - "post": { - "operationId": "CreateApp", - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Application" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "422": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Create a new [application](https://hathora.dev/docs/concepts/hathora-entities#application).", - "tags": ["AppV1"], - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppConfig" - } - } - } - } - } - }, - "/apps/v1/update/{appId}": { - "post": { - "operationId": "UpdateApp", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Application" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "422": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Update data for an existing [application](https://hathora.dev/docs/concepts/hathora-entities#application) using `appId`.", - "tags": ["AppV1"], - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppConfig" - } - } - } - } - } - }, - "/apps/v1/info/{appId}": { - "get": { - "operationId": "GetAppInfo", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Application" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Get details for an [application](https://hathora.dev/docs/concepts/hathora-entities#application) using `appId`.", - "tags": ["AppV1"], - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - } - ] - } - }, - "/apps/v1/delete/{appId}": { - "delete": { - "operationId": "DeleteApp", - "responses": { - "204": { - "description": "No content" - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Delete an [application](https://hathora.dev/docs/concepts/hathora-entities#application) using `appId`. Your organization will lose access to this application.", - "tags": ["AppV1"], - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - } - ] - } - }, - "/auth/v1/{appId}/login/anonymous": { - "post": { - "operationId": "LoginAnonymous", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LoginResponse" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Returns a unique player token for an anonymous user.", - "tags": ["AuthV1"], - "security": [], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - } - ] - } - }, - "/auth/v1/{appId}/login/nickname": { - "post": { - "operationId": "LoginNickname", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LoginResponse" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Returns a unique player token with a specified nickname for a user.", - "tags": ["AuthV1"], - "security": [], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LoginNicknameRequest" - } - } - } - } - } - }, - "/auth/v1/{appId}/login/google": { - "post": { - "operationId": "LoginGoogle", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LoginResponse" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Returns a unique player token using a Google-signed OIDC `idToken`.", - "tags": ["AuthV1"], - "security": [], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LoginGoogleRequest" - } - } - } - } - } - }, - "/billing/v1/balance": { - "get": { - "operationId": "GetBalance", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "type": "number", - "format": "double" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "tags": ["BillingV1"], - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [] - } - }, - "/billing/v1/paymentmethod": { - "get": { - "operationId": "GetPaymentMethod", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentMethod" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "tags": ["BillingV1"], - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [] - } - }, - "/billing/v1/customerportalurl": { - "post": { - "operationId": "InitStripeCustomerPortalUrl", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "tags": ["BillingV1"], - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomerPortalUrl" - } - } - } - } - } - }, - "/billing/v1/invoices": { - "get": { - "operationId": "GetInvoices", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/Invoice" - }, - "type": "array" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "tags": ["BillingV1"], - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [] - } - }, - "/builds/v1/{appId}/list": { - "get": { - "operationId": "GetBuilds", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/Build" - }, - "type": "array" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Returns an array of [builds](https://hathora.dev/docs/concepts/hathora-entities#build) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application).", - "tags": ["BuildV1"], - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - } - ] - } - }, - "/builds/v1/{appId}/info/{buildId}": { - "get": { - "operationId": "GetBuildInfo", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Build" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Get details for a [build](https://hathora.dev/docs/concepts/hathora-entities#build).", - "tags": ["BuildV1"], - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "path", - "name": "buildId", - "required": true, - "schema": { - "$ref": "#/components/schemas/BuildId" - } - } - ] - } - }, - "/builds/v1/{appId}/create": { - "post": { - "operationId": "CreateBuild", - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Build" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Creates a new [build](https://hathora.dev/docs/concepts/hathora-entities#build). Responds with a `buildId` that you must pass to [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) to build the game server artifact. You can optionally pass in a `buildTag` to associate an external version with a build.", - "tags": ["BuildV1"], - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateBuildParams" - } - } - } - } - } - }, - "/builds/v1/{appId}/run/{buildId}": { - "post": { - "operationId": "RunBuild", - "responses": { - "200": { - "description": "Ok", - "content": { - "text/plain": { - "schema": { - "type": "string", - "format": "byte" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Builds a game server artifact from a tarball you provide. Pass in the `buildId` generated from [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild).", - "tags": ["BuildV1"], - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "path", - "name": "buildId", - "required": true, - "schema": { - "$ref": "#/components/schemas/BuildId" - } - } - ], - "requestBody": { - "required": true, - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - } - }, - "required": ["file"] - } - } - } - } - } - }, - "/builds/v1/{appId}/delete/{buildId}": { - "delete": { - "operationId": "DeleteBuild", - "responses": { - "204": { - "description": "No content" - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "422": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Delete a [build](https://hathora.dev/docs/concepts/hathora-entities#build). All associated metadata is deleted.", - "tags": ["BuildV1"], - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "path", - "name": "buildId", - "required": true, - "schema": { - "$ref": "#/components/schemas/BuildId" - } - } - ] - } - }, - "/deployments/v1/{appId}/list": { - "get": { - "operationId": "GetDeployments", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/Deployment" - }, - "type": "array" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Returns an array of [deployments](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application).", - "tags": ["DeploymentV1"], - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - } - ] - } - }, - "/deployments/v1/{appId}/latest": { - "get": { - "operationId": "GetLatestDeployment", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Deployment" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Get the latest [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application).", - "tags": ["DeploymentV1"], - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - } - ] - } - }, - "/deployments/v1/{appId}/info/{deploymentId}": { - "get": { - "operationId": "GetDeploymentInfo", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Deployment" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Get details for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment).", - "tags": ["DeploymentV1"], - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "path", - "name": "deploymentId", - "required": true, - "schema": { - "$ref": "#/components/schemas/DeploymentId" - } - } - ] - } - }, - "/deployments/v1/{appId}/create/{buildId}": { - "post": { - "operationId": "CreateDeployment", - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Deployment" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "422": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Create a new [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). Creating a new deployment means all new rooms created will use the latest deployment configuration, but existing games in progress will not be affected.", - "tags": ["DeploymentV1"], - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "path", - "name": "buildId", - "required": true, - "schema": { - "$ref": "#/components/schemas/BuildId" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeploymentConfig" - } - } - } - } - } - }, - "/discovery/v1/ping": { - "get": { - "operationId": "GetPingServiceEndpoints", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DiscoveryResponse" - } - } - } - } - }, - "description": "Returns an array of all regions with a host and port that a client can directly ping. Open a websocket connection to `wss://:/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back.", - "tags": ["DiscoveryV1"], - "security": [], - "parameters": [] - } - }, - "/lobby/v1/{appId}/create/private": { - "post": { - "operationId": "CreatePrivateLobbyDeprecated", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RoomId" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "402": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "422": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "429": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "tags": ["LobbyV1"], - "deprecated": true, - "security": [ - { - "playerAuth": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "query", - "name": "region", - "required": false, - "schema": { - "$ref": "#/components/schemas/Region" - } - }, - { - "in": "query", - "name": "local", - "required": false, - "schema": { - "default": false, - "type": "boolean" - } - } - ] - } - }, - "/lobby/v1/{appId}/create/public": { - "post": { - "operationId": "CreatePublicLobbyDeprecated", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RoomId" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "402": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "422": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "429": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "tags": ["LobbyV1"], - "deprecated": true, - "security": [ - { - "playerAuth": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "query", - "name": "region", - "required": false, - "schema": { - "$ref": "#/components/schemas/Region" - } - }, - { - "in": "query", - "name": "local", - "required": false, - "schema": { - "default": false, - "type": "boolean" - } - } - ] - } - }, - "/lobby/v1/{appId}/list": { - "get": { - "operationId": "ListActivePublicLobbiesDeprecatedV1", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/Lobby" - }, - "type": "array" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "tags": ["LobbyV1"], - "deprecated": true, - "security": [], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "query", - "name": "local", - "required": false, - "schema": { - "default": false, - "type": "boolean" - } - }, - { - "in": "query", - "name": "region", - "required": false, - "schema": { - "$ref": "#/components/schemas/Region" - } - } - ] - } - }, - "/lobby/v2/{appId}/create/private": { - "post": { - "operationId": "CreatePrivateLobby", - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Lobby" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "402": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "422": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "429": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "tags": ["LobbyV2"], - "deprecated": true, - "security": [ - { - "playerAuth": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "query", - "name": "roomId", - "required": false, - "schema": { - "$ref": "#/components/schemas/RoomId" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "initialConfig": { - "$ref": "#/components/schemas/LobbyInitialConfig" - }, - "region": { - "$ref": "#/components/schemas/Region" - } - }, - "required": ["initialConfig", "region"], - "type": "object" - } - } - } - } - } - }, - "/lobby/v2/{appId}/create/public": { - "post": { - "operationId": "CreatePublicLobby", - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Lobby" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "402": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "422": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "429": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "tags": ["LobbyV2"], - "deprecated": true, - "security": [ - { - "playerAuth": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "query", - "name": "roomId", - "required": false, - "schema": { - "$ref": "#/components/schemas/RoomId" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "initialConfig": { - "$ref": "#/components/schemas/LobbyInitialConfig" - }, - "region": { - "$ref": "#/components/schemas/Region" - } - }, - "required": ["initialConfig", "region"], - "type": "object" - } - } - } - } - } - }, - "/lobby/v2/{appId}/create/local": { - "post": { - "operationId": "CreateLocalLobby", - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Lobby" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "402": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "422": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "429": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "tags": ["LobbyV2"], - "deprecated": true, - "security": [ - { - "playerAuth": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "query", - "name": "roomId", - "required": false, - "schema": { - "$ref": "#/components/schemas/RoomId" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "initialConfig": { - "$ref": "#/components/schemas/LobbyInitialConfig" - }, - "region": { - "$ref": "#/components/schemas/Region" - } - }, - "required": ["initialConfig", "region"], - "type": "object" - } - } - } - } - } - }, - "/lobby/v2/{appId}/create": { - "post": { - "operationId": "CreateLobbyDeprecated", - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Lobby" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "402": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "422": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "429": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Create a new lobby for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). A lobby object is a wrapper around a [room](https://hathora.dev/docs/concepts/hathora-entities#room) object. With a lobby, you get additional functionality like configuring the visibility of the room, managing the state of a match, and retrieving a list of public lobbies to display to players.", - "tags": ["LobbyV2"], - "deprecated": true, - "security": [ - { - "playerAuth": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "query", - "name": "roomId", - "required": false, - "schema": { - "$ref": "#/components/schemas/RoomId" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateLobbyParams" - } - } - } - } - } - }, - "/lobby/v2/{appId}/list/public": { - "get": { - "operationId": "ListActivePublicLobbiesDeprecatedV2", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/Lobby" - }, - "type": "array" - } - } - } - } - }, - "description": "Get all active lobbies for a an [application](https://hathora.dev/docs/concepts/hathora-entities#application). Filter by optionally passing in a `region`. Use this endpoint to display all public lobbies that a player can join in the game client.", - "tags": ["LobbyV2"], - "deprecated": true, - "security": [], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "description": "Region to filter by. If omitted, active public lobbies in all regions will be returned.", - "in": "query", - "name": "region", - "required": false, - "schema": { - "$ref": "#/components/schemas/Region" - } - } - ] - } - }, - "/lobby/v2/{appId}/info/{roomId}": { - "get": { - "operationId": "GetLobbyInfo", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Lobby" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Get details for a lobby.", - "tags": ["LobbyV2"], - "deprecated": true, - "security": [], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "path", - "name": "roomId", - "required": true, - "schema": { - "$ref": "#/components/schemas/RoomId" - } - } - ] - } - }, - "/lobby/v2/{appId}/setState/{roomId}": { - "post": { - "operationId": "SetLobbyState", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Lobby" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "422": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Set the state of a lobby. State is intended to be set by the server and must be smaller than 1MB. Use this endpoint to store match data like live player count to enforce max number of clients or persist end-game data (i.e. winner or final scores).", - "tags": ["LobbyV2"], - "deprecated": true, - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "path", - "name": "roomId", - "required": true, - "schema": { - "$ref": "#/components/schemas/RoomId" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetLobbyStateParams" - } - } - } - } - } - }, - "/lobby/v3/{appId}/create": { - "post": { - "operationId": "CreateLobby", - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LobbyV3" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "402": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "422": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "429": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Create a new lobby for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). A lobby object is a wrapper around a [room](https://hathora.dev/docs/concepts/hathora-entities#room) object. With a lobby, you get additional functionality like configuring the visibility of the room, managing the state of a match, and retrieving a list of public lobbies to display to players.", - "tags": ["LobbyV3"], - "security": [ - { - "playerAuth": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "query", - "name": "shortCode", - "required": false, - "schema": { - "$ref": "#/components/schemas/ShortCode" - } - }, - { - "in": "query", - "name": "roomId", - "required": false, - "schema": { - "$ref": "#/components/schemas/RoomId" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateLobbyV3Params" - } - } - } - } - } - }, - "/lobby/v3/{appId}/list/public": { - "get": { - "operationId": "ListActivePublicLobbies", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/LobbyV3" - }, - "type": "array" - } - } - } - } - }, - "description": "Get all active lobbies for a given [application](https://hathora.dev/docs/concepts/hathora-entities#application). Filter the array by optionally passing in a `region`. Use this endpoint to display all public lobbies that a player can join in the game client.", - "tags": ["LobbyV3"], - "security": [], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "description": "If omitted, active public lobbies in all regions will be returned.", - "in": "query", - "name": "region", - "required": false, - "schema": { - "$ref": "#/components/schemas/Region" - } - } - ] - } - }, - "/lobby/v3/{appId}/info/roomid/{roomId}": { - "get": { - "operationId": "GetLobbyInfoByRoomId", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LobbyV3" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Get details for a lobby.", - "tags": ["LobbyV3"], - "security": [], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "path", - "name": "roomId", - "required": true, - "schema": { - "$ref": "#/components/schemas/RoomId" - } - } - ] - } - }, - "/lobby/v3/{appId}/info/shortcode/{shortCode}": { - "get": { - "operationId": "GetLobbyInfoByShortCode", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LobbyV3" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Get details for a lobby. If 2 or more lobbies have the same `shortCode`, then the most recently created lobby will be returned.", - "tags": ["LobbyV3"], - "security": [], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "path", - "name": "shortCode", - "required": true, - "schema": { - "$ref": "#/components/schemas/ShortCode" - } - } - ] - } - }, - "/logs/v1/{appId}/all": { - "get": { - "operationId": "GetLogsForApp", - "responses": { - "200": { - "description": "Ok", - "content": { - "text/plain": { - "schema": { - "type": "string", - "format": "byte" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Returns a stream of logs for an [application](https://hathora.dev/docs/concepts/hathora-entities#application) using `appId`.", - "tags": ["LogV1"], - "deprecated": true, - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "query", - "name": "follow", - "required": false, - "schema": { - "$ref": "#/components/schemas/LogsFollow" - } - }, - { - "in": "query", - "name": "tailLines", - "required": false, - "schema": { - "$ref": "#/components/schemas/TailLines" - } - }, - { - "in": "query", - "name": "region", - "required": false, - "schema": { - "$ref": "#/components/schemas/Region" - } - } - ] - } - }, - "/logs/v1/{appId}/process/{processId}": { - "get": { - "operationId": "GetLogsForProcess", - "responses": { - "200": { - "description": "Ok", - "content": { - "text/plain": { - "schema": { - "type": "string", - "format": "byte" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "410": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Returns a stream of logs for a [process](https://hathora.dev/docs/concepts/hathora-entities#process) using `appId` and `processId`.", - "tags": ["LogV1"], - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "path", - "name": "processId", - "required": true, - "schema": { - "$ref": "#/components/schemas/ProcessId" - } - }, - { - "in": "query", - "name": "follow", - "required": false, - "schema": { - "$ref": "#/components/schemas/LogsFollow" - } - }, - { - "in": "query", - "name": "tailLines", - "required": false, - "schema": { - "$ref": "#/components/schemas/TailLines" - } - } - ] - } - }, - "/logs/v1/{appId}/process/{processId}/download": { - "get": { - "operationId": "DownloadLogForProcess", - "responses": { - "200": { - "description": "Ok", - "content": { - "text/plain": { - "schema": { - "type": "string", - "format": "byte" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "410": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Download entire log file for a stopped process.", - "tags": ["LogV1"], - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "path", - "name": "processId", - "required": true, - "schema": { - "$ref": "#/components/schemas/ProcessId" - } - } - ] - } - }, - "/logs/v1/{appId}/deployment/{deploymentId}": { - "get": { - "operationId": "GetLogsForDeployment", - "responses": { - "200": { - "description": "Ok", - "content": { - "text/plain": { - "schema": { - "type": "string", - "format": "byte" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Returns a stream of logs for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment) using `appId` and `deploymentId`.", - "tags": ["LogV1"], - "deprecated": true, - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "path", - "name": "deploymentId", - "required": true, - "schema": { - "$ref": "#/components/schemas/DeploymentId" - } - }, - { - "in": "query", - "name": "follow", - "required": false, - "schema": { - "$ref": "#/components/schemas/LogsFollow" - } - }, - { - "in": "query", - "name": "tailLines", - "required": false, - "schema": { - "$ref": "#/components/schemas/TailLines" - } - } - ] - } - }, - "/management/v1/sendverificationemail": { - "post": { - "operationId": "SendVerificationEmail", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VerificationEmailResponse" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "tags": ["ManagementV1"], - "security": [], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VerificationEmailRequest" - } - } - } - } - } - }, - "/metrics/v1/{appId}/process/{processId}": { - "get": { - "operationId": "GetMetrics", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MetricsResponse" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "422": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Get metrics for a [process](https://hathora.dev/docs/concepts/hathora-entities#process) using `appId` and `processId`.", - "tags": ["MetricsV1"], - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "path", - "name": "processId", - "required": true, - "schema": { - "$ref": "#/components/schemas/ProcessId" - } - }, - { - "description": "Available metrics to query over time.", - "in": "query", - "name": "metrics", - "required": false, - "schema": { - "default": ["cpu", "memory", "rate_egress"], - "type": "array", - "items": { - "$ref": "#/components/schemas/MetricName" - } - } - }, - { - "description": "Unix timestamp. Default is current time.", - "in": "query", - "name": "end", - "required": false, - "schema": { - "format": "double", - "type": "number" - } - }, - { - "description": "Unix timestamp. Default is -1 hour from `end`.", - "in": "query", - "name": "start", - "required": false, - "schema": { - "format": "double", - "type": "number" - } - }, - { - "in": "query", - "name": "step", - "required": false, - "schema": { - "$ref": "#/components/schemas/MetricsStep" - } - } - ] - } - }, - "/processes/v1/{appId}/list/running": { - "get": { - "operationId": "GetRunningProcesses", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/ProcessWithRooms" - }, - "type": "array" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Retrieve 10 most recently started [process](https://hathora.dev/docs/concepts/hathora-entities#process) objects for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). Filter the array by optionally passing in a `region`.", - "tags": ["ProcessesV1"], - "deprecated": true, - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "query", - "name": "region", - "required": false, - "schema": { - "$ref": "#/components/schemas/Region" - } - } - ] - } - }, - "/processes/v1/{appId}/list/stopped": { - "get": { - "operationId": "GetStoppedProcesses", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/Process" - }, - "type": "array" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Retrieve 10 most recently stopped [process](https://hathora.dev/docs/concepts/hathora-entities#process) objects for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). Filter the array by optionally passing in a `region`.", - "tags": ["ProcessesV1"], - "deprecated": true, - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "query", - "name": "region", - "required": false, - "schema": { - "$ref": "#/components/schemas/Region" - } - } - ] - } - }, - "/processes/v1/{appId}/info/{processId}": { - "get": { - "operationId": "GetProcessInfoDeprecated", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Process" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Get details for a [process](https://hathora.dev/docs/concepts/hathora-entities#process).", - "tags": ["ProcessesV1"], - "deprecated": true, - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "path", - "name": "processId", - "required": true, - "schema": { - "$ref": "#/components/schemas/ProcessId" - } - } - ] - } - }, - "/processes/v2/{appId}/info/{processId}": { - "get": { - "operationId": "GetProcessInfo", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProcessV2" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Get details for a [process](https://hathora.dev/docs/concepts/hathora-entities#process).", - "tags": ["ProcessesV2"], - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "path", - "name": "processId", - "required": true, - "schema": { - "$ref": "#/components/schemas/ProcessId" - } - } - ] - } - }, - "/processes/v2/{appId}/list/latest": { - "get": { - "operationId": "GetLatestProcesses", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/ProcessV2" - }, - "type": "array" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Retrieve the 10 most recent [processes](https://hathora.dev/docs/concepts/hathora-entities#process) objects for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). Filter the array by optionally passing in a `status` or `region`.", - "tags": ["ProcessesV2"], - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "query", - "name": "status", - "required": false, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProcessStatus" - } - } - }, - { - "in": "query", - "name": "region", - "required": false, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Region" - } - } - } - ] - } - }, - "/processes/v2/{appId}/stop/{processId}": { - "post": { - "operationId": "StopProcess", - "responses": { - "204": { - "description": "No content" - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Stops a [process](https://hathora.dev/docs/concepts/hathora-entities#process) immediately.", - "tags": ["ProcessesV2"], - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "path", - "name": "processId", - "required": true, - "schema": { - "$ref": "#/components/schemas/ProcessId" - } - } - ] - } - }, - "/rooms/v1/{appId}/create": { - "post": { - "operationId": "CreateRoomDeprecated", - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RoomId" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "402": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "403": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "tags": ["RoomV1"], - "deprecated": true, - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "query", - "name": "roomId", - "required": false, - "schema": { - "$ref": "#/components/schemas/RoomId" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateRoomParams" - } - } - } - } - } - }, - "/rooms/v1/{appId}/info/{roomId}": { - "get": { - "operationId": "GetRoomInfoDeprecated", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Room" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "tags": ["RoomV1"], - "deprecated": true, - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "path", - "name": "roomId", - "required": true, - "schema": { - "$ref": "#/components/schemas/RoomId" - } - } - ] - } - }, - "/rooms/v1/{appId}/list/{processId}/active": { - "get": { - "operationId": "GetActiveRoomsForProcessDeprecated", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/RoomWithoutAllocations" - }, - "type": "array" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "tags": ["RoomV1"], - "deprecated": true, - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "path", - "name": "processId", - "required": true, - "schema": { - "$ref": "#/components/schemas/ProcessId" - } - } - ] - } - }, - "/rooms/v1/{appId}/list/{processId}/inactive": { - "get": { - "operationId": "GetInactiveRoomsForProcessDeprecated", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/RoomWithoutAllocations" - }, - "type": "array" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "tags": ["RoomV1"], - "deprecated": true, - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "path", - "name": "processId", - "required": true, - "schema": { - "$ref": "#/components/schemas/ProcessId" - } - } - ] - } - }, - "/rooms/v1/{appId}/destroy/{roomId}": { - "post": { - "operationId": "DestroyRoomDeprecated", - "responses": { - "204": { - "description": "No content" - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "tags": ["RoomV1"], - "deprecated": true, - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "path", - "name": "roomId", - "required": true, - "schema": { - "$ref": "#/components/schemas/RoomId" - } - } - ] - } - }, - "/rooms/v1/{appId}/suspend/{roomId}": { - "post": { - "operationId": "SuspendRoomDeprecated", - "responses": { - "204": { - "description": "No content" - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "tags": ["RoomV1"], - "deprecated": true, - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "path", - "name": "roomId", - "required": true, - "schema": { - "$ref": "#/components/schemas/RoomId" - } - } - ] - } - }, - "/rooms/v1/{appId}/connectioninfo/{roomId}": { - "get": { - "operationId": "GetConnectionInfoDeprecated", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConnectionInfo" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "402": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "tags": ["RoomV1"], - "deprecated": true, - "security": [], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "path", - "name": "roomId", - "required": true, - "schema": { - "$ref": "#/components/schemas/RoomId" - } - } - ] - } - }, - "/rooms/v2/{appId}/create": { - "post": { - "operationId": "CreateRoom", - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateRoomResponse" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "402": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "403": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Create a new [room](https://hathora.dev/docs/concepts/hathora-entities#room) for an existing [application](https://hathora.dev/docs/concepts/hathora-entities#application). Poll the [`GetConnectionInfo()`](https://hathora.dev/api#tag/RoomV2/operation/GetConnectionInfo) endpoint to get connection details for an active room.", - "tags": ["RoomV2"], - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "query", - "name": "roomId", - "required": false, - "schema": { - "$ref": "#/components/schemas/RoomId" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateRoomParams" - } - } - } - } - } - }, - "/rooms/v2/{appId}/info/{roomId}": { - "get": { - "operationId": "GetRoomInfo", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Room" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Retreive current and historical allocation data for a [room](https://hathora.dev/docs/concepts/hathora-entities#room).", - "tags": ["RoomV2"], - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "path", - "name": "roomId", - "required": true, - "schema": { - "$ref": "#/components/schemas/RoomId" - } - } - ] - } - }, - "/rooms/v2/{appId}/list/{processId}/active": { - "get": { - "operationId": "GetActiveRoomsForProcess", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/RoomWithoutAllocations" - }, - "type": "array" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Get all active [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) for a given [process](https://hathora.dev/docs/concepts/hathora-entities#process).", - "tags": ["RoomV2"], - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "path", - "name": "processId", - "required": true, - "schema": { - "$ref": "#/components/schemas/ProcessId" - } - } - ] - } - }, - "/rooms/v2/{appId}/list/{processId}/inactive": { - "get": { - "operationId": "GetInactiveRoomsForProcess", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/RoomWithoutAllocations" - }, - "type": "array" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Get all inactive [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) for a given [process](https://hathora.dev/docs/concepts/hathora-entities#process).", - "tags": ["RoomV2"], - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "path", - "name": "processId", - "required": true, - "schema": { - "$ref": "#/components/schemas/ProcessId" - } - } - ] - } - }, - "/rooms/v2/{appId}/destroy/{roomId}": { - "post": { - "operationId": "DestroyRoom", - "responses": { - "204": { - "description": "No content" - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Destroy a [room](https://hathora.dev/docs/concepts/hathora-entities#room). All associated metadata is deleted.", - "tags": ["RoomV2"], - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "path", - "name": "roomId", - "required": true, - "schema": { - "$ref": "#/components/schemas/RoomId" - } - } - ] - } - }, - "/rooms/v2/{appId}/suspend/{roomId}": { - "post": { - "operationId": "SuspendRoom", - "responses": { - "204": { - "description": "No content" - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Suspend a [room](https://hathora.dev/docs/concepts/hathora-entities#room). The room is unallocated from the process but can be rescheduled later using the same `roomId`.", - "tags": ["RoomV2"], - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "path", - "name": "roomId", - "required": true, - "schema": { - "$ref": "#/components/schemas/RoomId" - } - } - ] - } - }, - "/rooms/v2/{appId}/connectioninfo/{roomId}": { - "get": { - "operationId": "GetConnectionInfo", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConnectionInfoV2" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "402": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Poll this endpoint to get connection details to a [room](https://hathora.dev/docs/concepts/hathora-entities#room). Clients can call this endpoint without authentication.", - "tags": ["RoomV2"], - "security": [], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "path", - "name": "roomId", - "required": true, - "schema": { - "$ref": "#/components/schemas/RoomId" - } - } - ] - } - }, - "/rooms/v2/{appId}/update/{roomId}": { - "post": { - "operationId": "UpdateRoomConfig", - "responses": { - "204": { - "description": "No content" - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "tags": ["RoomV2"], - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "appId", - "required": true, - "schema": { - "$ref": "#/components/schemas/AppId" - } - }, - { - "in": "path", - "name": "roomId", - "required": true, - "schema": { - "$ref": "#/components/schemas/RoomId" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateRoomConfigParams" - } - } - } - } - } - }, - "/tokens/v1/orgs/{orgId}": { - "get": { - "operationId": "GetOrgTokens", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ListOrgTokens" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "List all organization tokens for a given org.", - "tags": ["OrgTokensV1"], - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "orgId", - "required": true, - "schema": { - "$ref": "#/components/schemas/OrgId" - } - } - ] - } - }, - "/tokens/v1/orgs/{orgId}/create": { - "post": { - "operationId": "CreateOrgToken", - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreatedOrgToken" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "422": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Create a new organization token.", - "tags": ["OrgTokensV1"], - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "orgId", - "required": true, - "schema": { - "$ref": "#/components/schemas/OrgId" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateOrgToken" - } - } - } - } - } - }, - "/tokens/v1/orgs/{orgId}/tokens/{orgTokenId}/revoke": { - "post": { - "operationId": "RevokeOrgToken", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "type": "boolean" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - } - }, - "description": "Revoke an organization token.", - "tags": ["OrgTokensV1"], - "security": [ - { - "hathoraDevToken": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "orgId", - "required": true, - "schema": { - "$ref": "#/components/schemas/OrgId" - } - }, - { - "in": "path", - "name": "orgTokenId", - "required": true, - "schema": { - "$ref": "#/components/schemas/OrgId" - } - } - ] - } - } - }, - "servers": [ - { - "url": "https://api.hathora.dev" - }, - { - "url": "/" - } - ], - "tags": [ - { - "name": "AppV1", - "description": "Operations that allow you manage your [applications](https://hathora.dev/docs/concepts/hathora-entities#application)." - }, - { - "name": "AuthV1", - "description": "Operations that allow you to generate a Hathora-signed [JSON web token (JWT)](https://jwt.io/) for [player authentication](https://hathora.dev/docs/lobbies-and-matchmaking/auth-service)." - }, - { - "name": "BuildV1", - "description": "Operations that allow you create and manage your [builds](https://hathora.dev/docs/concepts/hathora-entities#build)." - }, - { - "name": "DeploymentV1", - "description": "Operations that allow you configure and manage an application's [build](https://hathora.dev/docs/concepts/hathora-entities#build) at runtime." - }, - { - "name": "DiscoveryV1", - "description": "Service that allows clients to directly ping all Hathora regions to get latency information" - }, - { - "name": "LobbyV3", - "description": "Operations to create and manage lobbies using our [Lobby Service](https://hathora.dev/docs/lobbies-and-matchmaking/lobby-service)." - }, - { - "name": "LogV1", - "description": "Operations to get logs by [applications](https://hathora.dev/docs/concepts/hathora-entities#application), [processes](https://hathora.dev/docs/concepts/hathora-entities#process), and [deployments](https://hathora.dev/docs/concepts/hathora-entities#deployment). We store 20GB of logs data." - }, - { - "name": "MetricsV1", - "description": "Operations to get metrics by [process](https://hathora.dev/docs/concepts/hathora-entities#process). We store 72 hours of metrics data." - }, - { - "name": "ProcessesV2", - "description": "Operations to get data on active and stopped [processes](https://hathora.dev/docs/concepts/hathora-entities#process)." - }, - { - "name": "RoomV2", - "description": "Operations to create, manage, and connect to [rooms](https://hathora.dev/docs/concepts/hathora-entities#room)." - }, - { - "name": "LobbyV1", - "description": "Deprecated. Use [LobbyV3](https://hathora.dev/api#tag/LobbyV3)." - }, - { - "name": "LobbyV2", - "description": "Deprecated. Use [LobbyV3](https://hathora.dev/api#tag/LobbyV3)." - }, - { - "name": "ProcessesV1", - "description": "Deprecated. Use [ProcessesV2](https://hathora.dev/api#tag/ProcessesV2)." - }, - { - "name": "RoomV1", - "description": "Deprecated. Use [RoomV2](https://hathora.dev/api#tag/RoomV2)." - } - ], - "x-speakeasy-globals": { - "parameters": [ - { - "in": "path", - "name": "appId", - "schema": { - "$ref": "#/components/schemas/AppId" - } - } - ] - } -} +{"components": {"examples": {}, "headers": {}, "parameters": {}, "requestBodies": {}, "responses": {}, "schemas": {"AppName": {"type": "string", "example": "minecraft", "description": "Readable name for an application. Must be unique within an organization.", "maxLength": 64, "pattern": "^[a-z0-9-]+$"}, "AppId": {"type": "string", "example": "app-af469a92-5b45-4565-b3c4-b79878de67d2", "description": "System generated unique identifier for an application."}, "Record_string.never_": {"properties": {}, "type": "object", "description": "Construct a type with a set of properties K of type T"}, "AuthConfiguration": {"properties": {"google": {"properties": {"clientId": {"type": "string", "description": "A Google generated token representing the developer's credentials for [Google's API Console](https://console.cloud.google.com/apis/dashboard?pli=1&project=discourse-login-388921). Learn how to get a `clientId` [here](https://developers.google.com/identity/gsi/web/guides/get-google-api-clientid)."}}, "required": ["clientId"], "type": "object", "description": "Enable google auth for your application."}, "nickname": {"$ref": "#/components/schemas/Record_string.never_", "description": "Enable nickname auth for your application."}, "anonymous": {"$ref": "#/components/schemas/Record_string.never_", "description": "Enable anonymous auth for your application."}}, "type": "object", "description": "Configure [player authentication](https://hathora.dev/docs/lobbies-and-matchmaking/auth-service) for your application. Use Hathora's built-in auth providers or use your own [custom authentication](https://hathora.dev/docs/lobbies-and-matchmaking/auth-service#custom-auth-provider)."}, "OrgId": {"type": "string", "example": "org-6f706e83-0ec1-437a-9a46-7d4281eb2f39", "description": "System generated unique identifier for an organization. Not guaranteed to have a specific format."}, "Application": {"properties": {"deletedBy": {"type": "string", "nullable": true, "description": "UserId or email address for the user that deleted the application.", "example": "google-oauth2|107030234048588177467"}, "deletedAt": {"type": "string", "format": "date-time", "nullable": true, "description": "When the application was deleted."}, "createdAt": {"type": "string", "format": "date-time", "description": "When the application was created."}, "createdBy": {"type": "string", "description": "UserId or email address for the user that created the application.", "example": "google-oauth2|107030234048588177467"}, "orgId": {"$ref": "#/components/schemas/OrgId"}, "authConfiguration": {"$ref": "#/components/schemas/AuthConfiguration", "description": "Used to authenticate player requests. Use your own authentication or Hathora's Auth Client."}, "appSecret": {"type": "string", "description": "Secret that is used for identity and access management.", "example": "secret-6f706e83-0ec1-437a-9a46-7d4281eb2f39"}, "appId": {"$ref": "#/components/schemas/AppId"}, "appName": {"$ref": "#/components/schemas/AppName"}}, "required": ["deletedBy", "deletedAt", "createdAt", "createdBy", "orgId", "authConfiguration", "appSecret", "appId", "appName"], "type": "object", "description": "An application object is the top level namespace for the game server."}, "BuildId": {"type": "integer", "format": "int32", "example": 1, "description": "System generated id for a build. Increments by 1."}, "DeploymentId": {"type": "integer", "format": "int32", "example": 1, "description": "System generated id for a deployment. Increments by 1."}, "TransportType": {"type": "string", "enum": ["tcp", "udp", "tls"], "description": "Transport type specifies the underlying communication protocol to the exposed port."}, "ContainerPort": {"properties": {"transportType": {"$ref": "#/components/schemas/TransportType"}, "port": {"type": "integer", "format": "int32", "example": 8000, "minimum": 1, "maximum": 65535}, "name": {"type": "string", "description": "Readable name for the port.", "example": "default", "minLength": 1, "maxLength": 100, "pattern": "^[a-z][a-z0-9-]*$"}}, "required": ["transportType", "port", "name"], "type": "object", "description": "A container port object represents the transport configruations for how your server will listen."}, "NumRoomsPerProcess": {"type": "integer", "format": "int32", "example": 3, "description": "Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process.", "minimum": 1, "maximum": 10000}, "DeploymentV2": {"properties": {"idleTimeoutEnabled": {"type": "boolean", "description": "Option to shut down processes that have had no new connections or rooms\nfor five minutes."}, "env": {"items": {"properties": {"value": {"type": "string", "example": "TRUE", "maxLength": 5000}, "name": {"type": "string", "example": "EULA", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$"}}, "required": ["value", "name"], "type": "object"}, "type": "array", "description": "The environment variable that our process will have access to at runtime.", "maxItems": 100}, "roomsPerProcess": {"$ref": "#/components/schemas/NumRoomsPerProcess"}, "additionalContainerPorts": {"items": {"$ref": "#/components/schemas/ContainerPort"}, "type": "array", "description": "Additional ports your server listens on.", "example": {"transportType": "tcp", "port": 4000, "name": "debug"}, "maxItems": 2}, "defaultContainerPort": {"$ref": "#/components/schemas/ContainerPort", "description": "Describes the primary port your process listens on."}, "createdAt": {"type": "string", "format": "date-time", "description": "When the deployment was created."}, "createdBy": {"type": "string", "description": "UserId or email address for the user that created the deployment.", "example": "google-oauth2|107030234048588177467"}, "requestedMemoryMB": {"type": "number", "format": "double", "description": "The amount of memory allocated to your process.", "example": 1024}, "requestedCPU": {"type": "number", "format": "double", "description": "The number of cores allocated to your process.", "example": 0.5}, "deploymentId": {"$ref": "#/components/schemas/DeploymentId"}, "buildId": {"$ref": "#/components/schemas/BuildId"}, "appId": {"$ref": "#/components/schemas/AppId"}}, "required": ["idleTimeoutEnabled", "env", "roomsPerProcess", "additionalContainerPorts", "defaultContainerPort", "createdAt", "createdBy", "requestedMemoryMB", "requestedCPU", "deploymentId", "buildId", "appId"], "type": "object"}, "BuildStatus": {"type": "string", "enum": ["created", "running", "succeeded", "failed"]}, "Region": {"type": "string", "enum": ["Seattle", "Los_Angeles", "Washington_DC", "Chicago", "London", "Frankfurt", "Mumbai", "Singapore", "Tokyo", "Sydney", "Sao_Paulo", "Dallas"]}, "BuildTag": {"type": "string", "example": "0.1.14-14c793", "description": "Tag to associate an external version with a build. It is accessible via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV2/operation/GetBuildInfo).", "maxLength": 1000}, "Build": {"properties": {"buildTag": {"allOf": [{"$ref": "#/components/schemas/BuildTag"}], "nullable": true}, "regionalContainerTags": {"items": {"properties": {"containerTag": {"type": "string"}, "region": {"$ref": "#/components/schemas/Region"}}, "required": ["containerTag", "region"], "type": "object"}, "type": "array", "deprecated": true}, "imageSize": {"type": "integer", "format": "int64", "description": "The size (in bytes) of the Docker image built by Hathora."}, "status": {"$ref": "#/components/schemas/BuildStatus", "description": "Current status of your build.\n\n`created`: a build was created but not yet run\n\n`running`: the build process is actively executing\n\n`succeeded`: the game server artifact was successfully built and stored in the Hathora registries\n\n`failed`: the build process was unsuccessful, most likely due to an error with the `Dockerfile`"}, "deletedAt": {"type": "string", "format": "date-time", "nullable": true, "description": "When the build was deleted."}, "finishedAt": {"type": "string", "format": "date-time", "nullable": true, "description": "When [`RunBuild()`](https://hathora.dev/api#tag/BuildV2/operation/RunBuild) finished executing."}, "startedAt": {"type": "string", "format": "date-time", "nullable": true, "description": "When [`RunBuild()`](https://hathora.dev/api#tag/BuildV2/operation/RunBuild) is called."}, "createdAt": {"type": "string", "format": "date-time", "description": "When [`CreateBuild()`](https://hathora.dev/api#tag/BuildV2/operation/CreateBuild) is called."}, "createdBy": {"type": "string", "description": "UserId or email address for the user that created the build.", "example": "google-oauth2|107030234048588177467"}, "buildId": {"$ref": "#/components/schemas/BuildId"}, "appId": {"$ref": "#/components/schemas/AppId"}}, "required": ["regionalContainerTags", "imageSize", "status", "deletedAt", "finishedAt", "startedAt", "createdAt", "createdBy", "buildId", "appId"], "type": "object", "description": "A build represents a game server artifact and its associated metadata."}, "ApplicationWithLatestDeploymentAndBuild": {"allOf": [{"$ref": "#/components/schemas/Application"}, {"properties": {"deployment": {"allOf": [{"$ref": "#/components/schemas/DeploymentV2"}, {"properties": {"build": {"$ref": "#/components/schemas/Build"}}, "required": ["build"], "type": "object"}]}}, "type": "object"}]}, "AppConfig": {"properties": {"authConfiguration": {"$ref": "#/components/schemas/AuthConfiguration"}, "appName": {"$ref": "#/components/schemas/AppName"}}, "required": ["authConfiguration", "appName"], "type": "object"}, "ApiError": {"properties": {"message": {"type": "string"}}, "required": ["message"], "type": "object"}, "PlayerTokenObject": {"properties": {"token": {"type": "string", "description": "A unique Hathora-signed JWT player token.", "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0eXBlIjoiYW5vbnltb3VzIiwiaWQiOiJ3aDA4eWN3eTJwOSIsIm5hbWUiOiJqaXR0ZXJ5LXNhbG1vbi1ndWxsIiwiaWF0IjoxNjg5MzQ5MTk3fQ.-LzlPhZw2tw0ycZ229IRHwwmINGKWNPFMDrXOphLjEk"}}, "required": ["token"], "type": "object"}, "NicknameObject": {"properties": {"nickname": {"type": "string", "description": "An alias to represent a player.", "example": "squiddytwoshoes"}}, "required": ["nickname"], "type": "object"}, "GoogleIdTokenObject": {"properties": {"idToken": {"type": "string", "description": "A Google-signed OIDC ID token representing a player's authenticated identity. Learn how to get an `idToken` [here](https://cloud.google.com/docs/authentication/get-id-token).", "example": "eyJhbGciOiJSUzI1NiIsImtpZCI6ImZkNDhhNzUxMzhkOWQ0OGYwYWE2MzVlZjU2OWM0ZTE5NmY3YWU4ZDYiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJhY2NvdW50cy5nb29nbGUuY29tIiwiYXpwIjoiODQ4NDEyODI2Nzg4LW00bXNyYjZxNDRkbTJ1ZTNrZ3Z1aTBmcTdrZGE1NWxzLmFwcHMuZ29vZ2xldXNlcmNvbnRlbnQuY29tIiwiYXVkIjoiODQ4NDEyODI2Nzg4LW00bXNyYjZxNDRkbTJ1ZTNrZ3Z1aTBmcTdrZGE1NWxzLmFwcHMuZ29vZ2xldXNlcmNvbnRlbnQuY29tIiwic3ViIjoiMTE0NTQyMzMwNzI3MTU2MTMzNzc2IiwiZW1haWwiOiJocGFdkeivmeuzQGdtYWlsLmNvbSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJhdF9oYXNoIjoidno1NGhhdTNxbnVR"}}, "required": ["idToken"], "type": "object"}, "CardBrand": {"type": "string", "enum": ["amex", "cartes_bancaires", "diners", "discover", "jcb", "mastercard", "visa", "unionpay", "card"]}, "CardPaymentMethod": {"properties": {"last4": {"type": "string"}, "brand": {"$ref": "#/components/schemas/CardBrand"}}, "required": ["last4", "brand"], "type": "object"}, "AchPaymentMethod": {"properties": {"last4": {"type": "string"}, "bankName": {"type": "string"}}, "type": "object"}, "LinkPaymentMethod": {"properties": {"email": {"type": "string"}}, "type": "object"}, "Partial__card-CardPaymentMethod--ach-AchPaymentMethod--link-LinkPaymentMethod--__": {"properties": {"card": {"$ref": "#/components/schemas/CardPaymentMethod"}, "ach": {"$ref": "#/components/schemas/AchPaymentMethod"}, "link": {"$ref": "#/components/schemas/LinkPaymentMethod"}}, "type": "object", "description": "Make all properties in T optional"}, "PaymentMethod": {"$ref": "#/components/schemas/Partial__card-CardPaymentMethod--ach-AchPaymentMethod--link-LinkPaymentMethod--__"}, "CustomerPortalUrl": {"properties": {"returnUrl": {"type": "string"}}, "required": ["returnUrl"], "type": "object"}, "InvoiceStatus": {"type": "string", "enum": ["pending", "paid", "overdue"]}, "Invoice": {"properties": {"status": {"$ref": "#/components/schemas/InvoiceStatus"}, "amountDue": {"type": "number", "format": "double"}, "pdfUrl": {"type": "string"}, "dueDate": {"type": "string", "format": "date-time"}, "year": {"type": "number", "format": "double"}, "month": {"type": "number", "format": "double"}, "id": {"type": "string"}}, "required": ["status", "amountDue", "pdfUrl", "dueDate", "year", "month", "id"], "type": "object"}, "CreateBuildParams": {"properties": {"buildTag": {"$ref": "#/components/schemas/BuildTag"}}, "type": "object"}, "PlanName": {"type": "string", "enum": ["tiny", "small", "medium", "large"], "example": "tiny", "description": "A plan defines how much CPU and memory is required to run an instance of your game server.\n\n`tiny`: shared core, 1gb memory\n\n`small`: 1 core, 2gb memory\n\n`medium`: 2 core, 4gb memory\n\n`large`: 4 core, 8gb memory"}, "Deployment": {"properties": {"idleTimeoutEnabled": {"type": "boolean", "description": "Option to shut down processes that have had no new connections or rooms\nfor five minutes.", "default": "true"}, "env": {"items": {"properties": {"value": {"type": "string", "example": "TRUE", "maxLength": 5000}, "name": {"type": "string", "example": "EULA", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$"}}, "required": ["value", "name"], "type": "object"}, "type": "array", "description": "The environment variable that our process will have access to at runtime.", "maxItems": 100}, "roomsPerProcess": {"$ref": "#/components/schemas/NumRoomsPerProcess"}, "planName": {"$ref": "#/components/schemas/PlanName", "deprecated": true}, "additionalContainerPorts": {"items": {"$ref": "#/components/schemas/ContainerPort"}, "type": "array", "description": "Additional ports your server listens on.", "example": {"transportType": "tcp", "port": 4000, "name": "debug"}, "maxItems": 2}, "defaultContainerPort": {"$ref": "#/components/schemas/ContainerPort", "description": "Describes the primary port your process listens on."}, "transportType": {"type": "string", "enum": ["tcp", "udp", "tls"], "deprecated": true}, "containerPort": {"type": "number", "format": "double", "deprecated": true}, "createdAt": {"type": "string", "format": "date-time", "description": "When the deployment was created."}, "createdBy": {"type": "string", "description": "UserId or email address for the user that created the deployment.", "example": "google-oauth2|107030234048588177467"}, "requestedMemoryMB": {"type": "integer", "format": "int32", "description": "The amount of memory allocated to your process.", "example": 1024}, "requestedCPU": {"type": "number", "format": "double", "description": "The number of cores allocated to your process.", "example": 0.5}, "deploymentId": {"$ref": "#/components/schemas/DeploymentId"}, "buildId": {"$ref": "#/components/schemas/BuildId"}, "appId": {"$ref": "#/components/schemas/AppId"}}, "required": ["env", "roomsPerProcess", "planName", "additionalContainerPorts", "defaultContainerPort", "transportType", "containerPort", "createdAt", "createdBy", "requestedMemoryMB", "requestedCPU", "deploymentId", "buildId", "appId"], "type": "object", "description": "Deployment is a versioned configuration for a build that describes runtime behavior."}, "DeploymentConfig": {"properties": {"idleTimeoutEnabled": {"type": "boolean", "description": "Option to shut down processes that have had no new connections or rooms\nfor five minutes.", "default": "true"}, "env": {"items": {"properties": {"value": {"type": "string", "example": "TRUE", "maxLength": 5000}, "name": {"type": "string", "example": "EULA", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$"}}, "required": ["value", "name"], "type": "object"}, "type": "array", "description": "The environment variable that our process will have access to at runtime.", "maxItems": 100}, "roomsPerProcess": {"$ref": "#/components/schemas/NumRoomsPerProcess"}, "planName": {"$ref": "#/components/schemas/PlanName"}, "additionalContainerPorts": {"items": {"$ref": "#/components/schemas/ContainerPort"}, "type": "array", "description": "Additional ports your server listens on.", "maxItems": 2}, "transportType": {"$ref": "#/components/schemas/TransportType"}, "containerPort": {"type": "integer", "format": "int32", "description": "Default port the server listens on.", "example": 4000, "minimum": 1, "maximum": 65535}}, "required": ["env", "roomsPerProcess", "planName", "transportType", "containerPort"], "type": "object", "description": "User specified deployment configuration for your application at runtime."}, "DeploymentConfigV2": {"properties": {"idleTimeoutEnabled": {"type": "boolean", "description": "Option to shut down processes that have had no new connections or rooms\nfor five minutes."}, "env": {"items": {"properties": {"value": {"type": "string", "example": "TRUE", "maxLength": 5000}, "name": {"type": "string", "example": "EULA", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$"}}, "required": ["value", "name"], "type": "object"}, "type": "array", "description": "The environment variable that our process will have access to at runtime.", "maxItems": 100}, "roomsPerProcess": {"$ref": "#/components/schemas/NumRoomsPerProcess"}, "additionalContainerPorts": {"items": {"$ref": "#/components/schemas/ContainerPort"}, "type": "array", "description": "Additional ports your server listens on.", "maxItems": 2}, "transportType": {"$ref": "#/components/schemas/TransportType"}, "containerPort": {"type": "integer", "format": "int32", "description": "Default port the server listens on.", "example": 4000, "minimum": 1, "maximum": 65535}, "requestedMemoryMB": {"type": "number", "format": "double", "description": "The amount of memory allocated to your process.", "example": 1024}, "requestedCPU": {"type": "number", "format": "double", "description": "The number of cores allocated to your process.", "example": 0.5}}, "required": ["idleTimeoutEnabled", "env", "roomsPerProcess", "transportType", "containerPort", "requestedMemoryMB", "requestedCPU"], "type": "object"}, "PingEndpoints": {"items": {"properties": {"port": {"type": "number", "format": "double"}, "host": {"type": "string"}, "region": {"$ref": "#/components/schemas/Region"}}, "required": ["port", "host", "region"], "type": "object"}, "type": "array", "example": [{"region": "Seattle", "host": "ping.hathora.dev", "port": 2000}]}, "RoomId": {"type": "string", "example": "2swovpy1fnunu", "description": "Unique identifier to a game session or match. Use the default system generated ID or overwrite it with your own.\nNote: error will be returned if `roomId` is not globally unique.", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9_-]*$"}, "LobbyVisibility": {"type": "string", "enum": ["private", "public", "local"], "example": "private", "description": "Types of lobbies a player can create.\n\n`private`: the player who created the room must share the roomId with their friends\n\n`public`: visible in the public lobby list, anyone can join\n\n`local`: for testing with a server running locally"}, "LobbyInitialConfig": {"additionalProperties": false, "type": "object", "description": "User input to initialize the game state. Object must be smaller than 64KB."}, "ShortCode": {"type": "string", "example": "LFG4", "description": "User-defined identifier for a lobby.", "maxLength": 100}, "Lobby": {"properties": {"shortCode": {"allOf": [{"$ref": "#/components/schemas/ShortCode"}], "nullable": true}, "state": {"additionalProperties": false, "type": "object", "nullable": true, "description": "JSON blob to store metadata for a room. Must be smaller than 1MB."}, "initialConfig": {"$ref": "#/components/schemas/LobbyInitialConfig"}, "createdAt": {"type": "string", "format": "date-time", "description": "When the lobby was created."}, "createdBy": {"type": "string", "description": "UserId or email address for the user that created the lobby.", "example": "google-oauth2|107030234048588177467"}, "local": {"type": "boolean", "deprecated": true}, "visibility": {"$ref": "#/components/schemas/LobbyVisibility"}, "region": {"$ref": "#/components/schemas/Region"}, "roomId": {"$ref": "#/components/schemas/RoomId"}, "appId": {"$ref": "#/components/schemas/AppId"}}, "required": ["shortCode", "initialConfig", "createdAt", "createdBy", "local", "visibility", "region", "roomId", "appId"], "type": "object", "description": "A lobby object allows you to store and manage metadata for your rooms."}, "CreateLobbyParams": {"properties": {"visibility": {"$ref": "#/components/schemas/LobbyVisibility"}, "initialConfig": {"$ref": "#/components/schemas/LobbyInitialConfig"}, "region": {"$ref": "#/components/schemas/Region"}}, "required": ["visibility", "initialConfig", "region"], "type": "object"}, "SetLobbyStateParams": {"properties": {"state": {"additionalProperties": false, "type": "object", "description": "JSON blob to store metadata for a room. Must be smaller than 1MB."}}, "required": ["state"], "type": "object"}, "RoomConfig": {"type": "string", "example": "{\"name\":\"my-room\"}", "description": "Optional configuration parameters for the room. Can be any string including stringified JSON. It is accessible from the room via [`GetRoomInfo()`](https://hathora.dev/api#tag/RoomV2/operation/GetRoomInfo).", "maxLength": 10000}, "LobbyV3": {"properties": {"shortCode": {"$ref": "#/components/schemas/ShortCode", "description": "User defined identifier for a lobby, defaults to `roomId`"}, "createdAt": {"type": "string", "format": "date-time", "description": "When the lobby was created."}, "createdBy": {"type": "string", "description": "UserId or email address for the user that created the lobby.", "example": "google-oauth2|107030234048588177467"}, "roomConfig": {"allOf": [{"$ref": "#/components/schemas/RoomConfig"}], "nullable": true}, "visibility": {"$ref": "#/components/schemas/LobbyVisibility"}, "region": {"$ref": "#/components/schemas/Region"}, "roomId": {"$ref": "#/components/schemas/RoomId", "description": "Hathora generated identifier for a room, unique for a given application (including stopped rooms)"}, "appId": {"$ref": "#/components/schemas/AppId"}}, "required": ["shortCode", "createdAt", "createdBy", "roomConfig", "visibility", "region", "roomId", "appId"], "type": "object", "description": "A lobby object allows you to store and manage metadata for your rooms."}, "CreateLobbyV3Params": {"properties": {"visibility": {"$ref": "#/components/schemas/LobbyVisibility"}, "roomConfig": {"$ref": "#/components/schemas/RoomConfig"}, "region": {"$ref": "#/components/schemas/Region"}}, "required": ["visibility", "region"], "type": "object"}, "LogsFollow": {"type": "boolean", "default": "false", "description": "Stream logs in realtime."}, "TailLines": {"type": "integer", "format": "int32", "default": "100", "example": 100, "description": "Number of lines to return from most recent logs history.", "minimum": 1, "maximum": 5000}, "ProcessId": {"type": "string", "example": "cbfcddd2-0006-43ae-996c-995fff7bed2e", "description": "System generated unique identifier to a runtime instance of your game server."}, "VerificationEmailSuccess": {"type": "string", "enum": ["success"], "nullable": false}, "VerificationEmailRequest": {"properties": {"userId": {"type": "string"}}, "required": ["userId"], "type": "object"}, "NewUserInfo": {"properties": {"email": {"type": "string"}, "user_id": {"type": "string"}}, "required": ["email", "user_id"], "type": "object"}, "MetricValue": {"properties": {"value": {"type": "number", "format": "double"}, "timestamp": {"type": "number", "format": "double"}}, "required": ["value", "timestamp"], "type": "object"}, "Record_Partial_MetricName_.MetricValue-Array_": {"properties": {"cpu": {"items": {"$ref": "#/components/schemas/MetricValue"}, "type": "array"}, "memory": {"items": {"$ref": "#/components/schemas/MetricValue"}, "type": "array"}, "rate_egress": {"items": {"$ref": "#/components/schemas/MetricValue"}, "type": "array"}, "total_egress": {"items": {"$ref": "#/components/schemas/MetricValue"}, "type": "array"}, "active_connections": {"items": {"$ref": "#/components/schemas/MetricValue"}, "type": "array"}}, "type": "object", "description": "Construct a type with a set of properties K of type T"}, "MetricsData": {"$ref": "#/components/schemas/Record_Partial_MetricName_.MetricValue-Array_"}, "MetricName": {"type": "string", "enum": ["cpu", "memory", "rate_egress", "total_egress", "active_connections"], "description": "Available metrics to query over time."}, "MetricsStep": {"type": "integer", "format": "int32", "default": "60", "description": "Width of time in seconds to group data."}, "UserId": {"type": "string", "example": "auth0|646bdf96f7fb73d04c8c84db", "description": "System generated unique identifier for a user. Not guaranteed to have a specific format."}, "InviteStatusPending": {"properties": {"type": {"type": "string", "enum": ["pending"], "nullable": false}}, "required": ["type"], "type": "object"}, "InviteStatusAccepted": {"properties": {"userId": {"$ref": "#/components/schemas/UserId"}, "type": {"type": "string", "enum": ["accepted"], "nullable": false}}, "required": ["userId", "type"], "type": "object"}, "InviteStatusRejected": {"properties": {"userId": {"$ref": "#/components/schemas/UserId"}, "type": {"type": "string", "enum": ["rejected"], "nullable": false}}, "required": ["userId", "type"], "type": "object"}, "InviteStatusRescinded": {"properties": {"rescindedBy": {"$ref": "#/components/schemas/UserId"}, "userId": {"$ref": "#/components/schemas/UserId"}, "type": {"type": "string", "enum": ["rescinded"], "nullable": false}}, "required": ["rescindedBy", "type"], "type": "object"}, "OrganizationInviteStatus": {"anyOf": [{"$ref": "#/components/schemas/InviteStatusPending"}, {"$ref": "#/components/schemas/InviteStatusAccepted"}, {"$ref": "#/components/schemas/InviteStatusRejected"}, {"$ref": "#/components/schemas/InviteStatusRescinded"}]}, "OrgPermission": {"properties": {"updatedAt": {"type": "string", "format": "date-time"}, "createdAt": {"type": "string", "format": "date-time"}, "status": {"$ref": "#/components/schemas/OrganizationInviteStatus"}, "userEmail": {"type": "string"}, "invitedBy": {"$ref": "#/components/schemas/UserId"}, "orgId": {"$ref": "#/components/schemas/OrgId"}}, "required": ["updatedAt", "createdAt", "status", "userEmail", "invitedBy", "orgId"], "type": "object"}, "CreateUserInvite": {"properties": {"userEmail": {"type": "string"}}, "required": ["userEmail"], "type": "object"}, "RescindUserInvite": {"properties": {"userEmail": {"type": "string"}}, "required": ["userEmail"], "type": "object"}, "OrgInvitesPage": {"properties": {"invites": {"items": {"$ref": "#/components/schemas/OrgPermission"}, "type": "array"}}, "required": ["invites"], "type": "object"}, "ExposedPort": {"properties": {"transportType": {"$ref": "#/components/schemas/TransportType"}, "port": {"type": "integer", "format": "int32"}, "host": {"type": "string"}, "name": {"type": "string"}}, "required": ["transportType", "port", "host", "name"], "type": "object", "example": {"host": "1.proxy.hathora.dev", "name": "default", "port": 34567, "transportType": "tcp"}, "description": "Connection details for an active process."}, "Process": {"properties": {"egressedBytes": {"type": "integer", "format": "int32", "description": "Measures network traffic leaving the process in bytes.", "example": 435}, "idleSince": {"type": "string", "format": "date-time", "nullable": true, "deprecated": true}, "activeConnectionsUpdatedAt": {"type": "string", "format": "date-time", "deprecated": true}, "activeConnections": {"type": "integer", "format": "int32", "description": "Tracks the number of active connections to a process.", "example": 10, "deprecated": true}, "roomsAllocatedUpdatedAt": {"type": "string", "format": "date-time"}, "roomsAllocated": {"type": "integer", "format": "int32", "description": "Tracks the number of rooms that have been allocated to the process.", "example": 1}, "roomSlotsAvailableUpdatedAt": {"type": "string", "format": "date-time", "deprecated": true}, "roomSlotsAvailable": {"type": "number", "format": "double", "deprecated": true}, "draining": {"type": "boolean", "description": "Process in drain will not accept any new rooms."}, "terminatedAt": {"type": "string", "format": "date-time", "nullable": true, "description": "When the process has been terminated."}, "stoppingAt": {"type": "string", "format": "date-time", "nullable": true, "description": "When the process is issued to stop. We use this to determine when we should stop billing."}, "startedAt": {"type": "string", "format": "date-time", "nullable": true, "description": "When the process bound to the specified port. We use this to determine when we should start billing."}, "startingAt": {"type": "string", "format": "date-time", "description": "When the process started being provisioned."}, "roomsPerProcess": {"$ref": "#/components/schemas/NumRoomsPerProcess"}, "additionalExposedPorts": {"items": {"$ref": "#/components/schemas/ExposedPort"}, "type": "array", "example": [{"host": "1.proxy.hathora.dev", "name": "debug", "port": 72941, "transportType": "tcp"}], "maxItems": 2}, "exposedPort": {"allOf": [{"$ref": "#/components/schemas/ExposedPort"}], "nullable": true}, "port": {"type": "number", "format": "double", "deprecated": true}, "host": {"type": "string", "deprecated": true}, "region": {"$ref": "#/components/schemas/Region"}, "processId": {"$ref": "#/components/schemas/ProcessId"}, "deploymentId": {"$ref": "#/components/schemas/DeploymentId"}, "appId": {"$ref": "#/components/schemas/AppId"}}, "required": ["egressedBytes", "idleSince", "activeConnectionsUpdatedAt", "activeConnections", "roomsAllocatedUpdatedAt", "roomsAllocated", "roomSlotsAvailableUpdatedAt", "roomSlotsAvailable", "draining", "terminatedAt", "stoppingAt", "startedAt", "startingAt", "roomsPerProcess", "additionalExposedPorts", "exposedPort", "port", "host", "region", "processId", "deploymentId", "appId"], "type": "object", "description": "A process object represents a runtime instance of your game server and its metadata."}, "RoomStatus": {"type": "string", "enum": ["scheduling", "active", "suspended", "destroyed"], "example": "active", "description": "The allocation status of a room.\n\n`scheduling`: a process is not allocated yet and the room is waiting to be scheduled\n\n`active`: ready to accept connections\n\n`suspended`: room is unallocated from the process but can be rescheduled later with the same `roomId`\n\n`destroyed`: all associated metadata is deleted"}, "RoomAllocationId": {"type": "string", "example": "e3a0aa32-1711-4036-acfa-008b96061a78", "description": "System generated unique identifier to an allocated instance of a room."}, "RoomAllocation": {"properties": {"unscheduledAt": {"type": "string", "format": "date-time", "nullable": true}, "scheduledAt": {"type": "string", "format": "date-time"}, "processId": {"$ref": "#/components/schemas/ProcessId"}, "roomAllocationId": {"$ref": "#/components/schemas/RoomAllocationId"}}, "required": ["unscheduledAt", "scheduledAt", "processId", "roomAllocationId"], "type": "object", "description": "Metadata on an allocated instance of a room."}, "Pick_Room.Exclude_keyofRoom.allocations__": {"properties": {"appId": {"$ref": "#/components/schemas/AppId"}, "roomId": {"$ref": "#/components/schemas/RoomId"}, "roomConfig": {"allOf": [{"$ref": "#/components/schemas/RoomConfig"}], "nullable": true}, "status": {"$ref": "#/components/schemas/RoomStatus"}, "currentAllocation": {"allOf": [{"$ref": "#/components/schemas/RoomAllocation"}], "nullable": true}}, "required": ["appId", "roomId", "roomConfig", "status", "currentAllocation"], "type": "object", "description": "From T, pick a set of properties whose keys are in the union K"}, "Omit_Room.allocations_": {"$ref": "#/components/schemas/Pick_Room.Exclude_keyofRoom.allocations__", "description": "Construct a type with the properties of T except for those in type K."}, "RoomWithoutAllocations": {"$ref": "#/components/schemas/Omit_Room.allocations_"}, "ProcessWithRooms": {"allOf": [{"$ref": "#/components/schemas/Process"}, {"properties": {"rooms": {"items": {"$ref": "#/components/schemas/RoomWithoutAllocations"}, "type": "array"}, "totalRooms": {"type": "integer", "format": "int32"}}, "required": ["rooms", "totalRooms"], "type": "object"}]}, "ProcessStatus": {"type": "string", "enum": ["starting", "running", "draining", "stopping", "stopped", "failed"]}, "ProcessV2": {"properties": {"status": {"$ref": "#/components/schemas/ProcessStatus", "description": "Process in drain will not accept any new rooms."}, "roomsAllocated": {"type": "integer", "format": "int32", "description": "Tracks the number of rooms that have been allocated to the process.", "example": 1}, "terminatedAt": {"type": "string", "format": "date-time", "nullable": true, "description": "When the process has been terminated."}, "stoppingAt": {"type": "string", "format": "date-time", "nullable": true, "description": "When the process is issued to stop. We use this to determine when we should stop billing."}, "startedAt": {"type": "string", "format": "date-time", "nullable": true, "description": "When the process bound to the specified port. We use this to determine when we should start billing."}, "createdAt": {"type": "string", "format": "date-time", "description": "When the process started being provisioned."}, "roomsPerProcess": {"$ref": "#/components/schemas/NumRoomsPerProcess"}, "additionalExposedPorts": {"items": {"$ref": "#/components/schemas/ExposedPort"}, "type": "array", "example": [{"host": "1.proxy.hathora.dev", "name": "debug", "port": 72941, "transportType": "tcp"}], "maxItems": 2}, "exposedPort": {"allOf": [{"$ref": "#/components/schemas/ExposedPort"}], "nullable": true}, "region": {"$ref": "#/components/schemas/Region"}, "processId": {"$ref": "#/components/schemas/ProcessId"}, "deploymentId": {"$ref": "#/components/schemas/DeploymentId"}, "appId": {"$ref": "#/components/schemas/AppId"}}, "required": ["status", "roomsAllocated", "terminatedAt", "stoppingAt", "startedAt", "createdAt", "roomsPerProcess", "additionalExposedPorts", "exposedPort", "region", "processId", "deploymentId", "appId"], "type": "object"}, "CreateRoomParams": {"properties": {"roomConfig": {"$ref": "#/components/schemas/RoomConfig"}, "region": {"$ref": "#/components/schemas/Region"}}, "required": ["region"], "type": "object"}, "Room": {"properties": {"currentAllocation": {"allOf": [{"$ref": "#/components/schemas/RoomAllocation"}], "nullable": true}, "status": {"$ref": "#/components/schemas/RoomStatus"}, "allocations": {"items": {"$ref": "#/components/schemas/RoomAllocation"}, "type": "array"}, "roomConfig": {"allOf": [{"$ref": "#/components/schemas/RoomConfig"}], "nullable": true}, "roomId": {"$ref": "#/components/schemas/RoomId"}, "appId": {"$ref": "#/components/schemas/AppId"}}, "required": ["currentAllocation", "status", "allocations", "roomConfig", "roomId", "appId"], "type": "object", "description": "A room object represents a game session or match."}, "StartingConnectionInfo": {"properties": {"status": {"type": "string", "enum": ["starting"], "nullable": false}, "roomId": {"$ref": "#/components/schemas/RoomId"}}, "required": ["status", "roomId"], "type": "object"}, "ActiveConnectionInfo": {"properties": {"status": {"type": "string", "enum": ["active"], "nullable": false}, "transportType": {"$ref": "#/components/schemas/TransportType"}, "port": {"type": "number", "format": "double"}, "host": {"type": "string"}, "roomId": {"$ref": "#/components/schemas/RoomId"}}, "required": ["status", "transportType", "port", "host", "roomId"], "type": "object"}, "ConnectionInfo": {"anyOf": [{"$ref": "#/components/schemas/StartingConnectionInfo"}, {"$ref": "#/components/schemas/ActiveConnectionInfo"}], "description": "Connection information to the default port."}, "RoomReadyStatus": {"type": "string", "enum": ["active", "starting"]}, "ConnectionInfoV2": {"properties": {"additionalExposedPorts": {"items": {"$ref": "#/components/schemas/ExposedPort"}, "type": "array", "example": [{"host": "1.proxy.hathora.dev", "name": "debug", "port": 72941, "transportType": "tcp"}], "maxItems": 2}, "exposedPort": {"$ref": "#/components/schemas/ExposedPort"}, "status": {"$ref": "#/components/schemas/RoomReadyStatus", "description": "`exposedPort` will only be available when the `status` of a room is \"active\".", "example": "active"}, "roomId": {"$ref": "#/components/schemas/RoomId"}}, "required": ["additionalExposedPorts", "status", "roomId"], "type": "object", "description": "Connection information for the default and additional ports."}, "RoomConnectionData": {"allOf": [{"$ref": "#/components/schemas/ConnectionInfoV2"}, {"properties": {"processId": {"$ref": "#/components/schemas/ProcessId"}}, "required": ["processId"], "type": "object"}]}, "UpdateRoomConfigParams": {"properties": {"roomConfig": {"$ref": "#/components/schemas/RoomConfig"}}, "required": ["roomConfig"], "type": "object"}, "OrgTokenId": {"type": "string", "example": "org-token-af469a92-5b45-4565-b3c4-b79878de67d2", "description": "System generated unique identifier for an organization token."}, "OrgTokenName": {"type": "string", "example": "ci-token", "description": "Readable name for a token. Must be unique within an organization.", "maxLength": 64}, "OrgTokenStatus": {"type": "string", "enum": ["active", "revoked"]}, "OrgToken": {"properties": {"createdAt": {"type": "string", "format": "date-time"}, "createdBy": {"type": "string"}, "lastFourCharsOfKey": {"type": "string"}, "status": {"$ref": "#/components/schemas/OrgTokenStatus"}, "name": {"$ref": "#/components/schemas/OrgTokenName"}, "orgId": {"type": "string"}, "orgTokenId": {"$ref": "#/components/schemas/OrgTokenId"}}, "required": ["createdAt", "createdBy", "lastFourCharsOfKey", "status", "name", "orgId", "orgTokenId"], "type": "object"}, "ListOrgTokens": {"properties": {"tokens": {"items": {"$ref": "#/components/schemas/OrgToken"}, "type": "array"}}, "required": ["tokens"], "type": "object"}, "CreatedOrgToken": {"properties": {"plainTextToken": {"type": "string"}, "orgToken": {"$ref": "#/components/schemas/OrgToken"}}, "required": ["plainTextToken", "orgToken"], "type": "object"}, "CreateOrgToken": {"properties": {"name": {"$ref": "#/components/schemas/OrgTokenName"}}, "required": ["name"], "type": "object"}}, "securitySchemes": {"hathoraDevToken": {"type": "http", "scheme": "bearer", "bearerFormat": "JWT"}, "playerAuth": {"type": "http", "scheme": "bearer", "bearerFormat": "JWT"}}}, "info": {"title": "Hathora Cloud API", "version": "0.0.1", "description": "Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally.", "contact": {}}, "openapi": "3.0.0", "paths": {"/apps/v1/list": {"get": {"operationId": "GetApps", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/ApplicationWithLatestDeploymentAndBuild"}, "type": "array"}}}}}, "description": "Returns an unsorted list of your organization’s [applications](https://hathora.dev/docs/concepts/hathora-entities#application). An application is uniquely identified by an `appId`.", "tags": ["AppV1"], "security": [{"hathoraDevToken": []}], "parameters": []}}, "/apps/v1/create": {"post": {"operationId": "CreateApp", "responses": {"201": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Application"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "422": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "500": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Create a new [application](https://hathora.dev/docs/concepts/hathora-entities#application).", "tags": ["AppV1"], "security": [{"hathoraDevToken": []}], "parameters": [], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AppConfig"}}}}}}, "/apps/v1/update/{appId}": {"post": {"operationId": "UpdateApp", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Application"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "422": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "500": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Update data for an existing [application](https://hathora.dev/docs/concepts/hathora-entities#application) using `appId`.", "tags": ["AppV1"], "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AppConfig"}}}}}}, "/apps/v1/info/{appId}": {"get": {"operationId": "GetAppInfo", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Application"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Get details for an [application](https://hathora.dev/docs/concepts/hathora-entities#application) using `appId`.", "tags": ["AppV1"], "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}]}}, "/apps/v1/delete/{appId}": {"delete": {"operationId": "DeleteApp", "responses": {"204": {"description": "No content"}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "500": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Delete an [application](https://hathora.dev/docs/concepts/hathora-entities#application) using `appId`. Your organization will lose access to this application.", "tags": ["AppV1"], "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}]}}, "/auth/v1/{appId}/login/anonymous": {"post": {"operationId": "LoginAnonymous", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PlayerTokenObject"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Returns a unique player token for an anonymous user.", "tags": ["AuthV1"], "security": [], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}]}}, "/auth/v1/{appId}/login/nickname": {"post": {"operationId": "LoginNickname", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PlayerTokenObject"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Returns a unique player token with a specified nickname for a user.", "tags": ["AuthV1"], "security": [], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NicknameObject"}}}}}}, "/auth/v1/{appId}/login/google": {"post": {"operationId": "LoginGoogle", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PlayerTokenObject"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Returns a unique player token using a Google-signed OIDC `idToken`.", "tags": ["AuthV1"], "security": [], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GoogleIdTokenObject"}}}}}}, "/billing/v1/balance": {"get": {"operationId": "GetBalance", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"type": "number", "format": "double"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "tags": ["BillingV1"], "security": [{"hathoraDevToken": []}], "parameters": []}}, "/billing/v1/paymentmethod": {"get": {"operationId": "GetPaymentMethod", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PaymentMethod"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "500": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "tags": ["BillingV1"], "security": [{"hathoraDevToken": []}], "parameters": []}}, "/billing/v1/customerportalurl": {"post": {"operationId": "InitStripeCustomerPortalUrl", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"type": "string"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "tags": ["BillingV1"], "security": [{"hathoraDevToken": []}], "parameters": [], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CustomerPortalUrl"}}}}}}, "/billing/v1/invoices": {"get": {"operationId": "GetInvoices", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/Invoice"}, "type": "array"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "tags": ["BillingV1"], "security": [{"hathoraDevToken": []}], "parameters": []}}, "/builds/v1/{appId}/list": {"get": {"operationId": "GetBuildsDeprecated", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/Build"}, "type": "array"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Returns an array of [builds](https://hathora.dev/docs/concepts/hathora-entities#build) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application).", "tags": ["BuildV1"], "deprecated": true, "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}]}}, "/builds/v1/{appId}/info/{buildId}": {"get": {"operationId": "GetBuildInfoDeprecated", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Build"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Get details for a [build](https://hathora.dev/docs/concepts/hathora-entities#build).", "tags": ["BuildV1"], "deprecated": true, "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "path", "name": "buildId", "required": true, "schema": {"$ref": "#/components/schemas/BuildId"}}]}}, "/builds/v1/{appId}/create": {"post": {"operationId": "CreateBuildDeprecated", "responses": {"201": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Build"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "500": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Creates a new [build](https://hathora.dev/docs/concepts/hathora-entities#build). Responds with a `buildId` that you must pass to [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) to build the game server artifact. You can optionally pass in a `buildTag` to associate an external version with a build.", "tags": ["BuildV1"], "deprecated": true, "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateBuildParams"}}}}}}, "/builds/v1/{appId}/run/{buildId}": {"post": {"operationId": "RunBuildDeprecated", "responses": {"200": {"description": "Ok", "content": {"text/plain": {"schema": {"type": "string", "format": "byte"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "500": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Builds a game server artifact from a tarball you provide. Pass in the `buildId` generated from [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild).", "tags": ["BuildV1"], "deprecated": true, "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "path", "name": "buildId", "required": true, "schema": {"$ref": "#/components/schemas/BuildId"}}], "requestBody": {"required": true, "content": {"multipart/form-data": {"schema": {"type": "object", "properties": {"file": {"type": "string", "format": "binary"}}, "required": ["file"]}}}}}}, "/builds/v1/{appId}/delete/{buildId}": {"delete": {"operationId": "DeleteBuildDeprecated", "responses": {"204": {"description": "No content"}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "422": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "500": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Delete a [build](https://hathora.dev/docs/concepts/hathora-entities#build). All associated metadata is deleted.", "tags": ["BuildV1"], "deprecated": true, "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "path", "name": "buildId", "required": true, "schema": {"$ref": "#/components/schemas/BuildId"}}]}}, "/builds/v2/{appId}/list": {"get": {"operationId": "GetBuilds", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/Build"}, "type": "array"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Returns an array of [builds](https://hathora.dev/docs/concepts/hathora-entities#build) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application).", "tags": ["BuildV2"], "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}]}}, "/builds/v2/{appId}/info/{buildId}": {"get": {"operationId": "GetBuildInfo", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Build"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Get details for a [build](https://hathora.dev/docs/concepts/hathora-entities#build).", "tags": ["BuildV2"], "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "path", "name": "buildId", "required": true, "schema": {"$ref": "#/components/schemas/BuildId"}}]}}, "/builds/v2/{appId}/create": {"post": {"operationId": "CreateBuild", "responses": {"201": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Build"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "500": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Creates a new [build](https://hathora.dev/docs/concepts/hathora-entities#build). Responds with a `buildId` that you must pass to [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) to build the game server artifact. You can optionally pass in a `buildTag` to associate an external version with a build.", "tags": ["BuildV2"], "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateBuildParams"}}}}}}, "/builds/v2/{appId}/run/{buildId}": {"post": {"operationId": "RunBuild", "responses": {"200": {"description": "Ok", "content": {"application/octet-stream": {"schema": {"type": "string", "format": "binary"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "500": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Builds a game server artifact from a tarball you provide. Pass in the `buildId` generated from [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild).", "tags": ["BuildV2"], "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "path", "name": "buildId", "required": true, "schema": {"$ref": "#/components/schemas/BuildId"}}], "requestBody": {"required": true, "content": {"multipart/form-data": {"schema": {"type": "object", "properties": {"file": {"type": "string", "format": "binary"}}, "required": ["file"]}}}}}}, "/builds/v2/{appId}/delete/{buildId}": {"delete": {"operationId": "DeleteBuild", "responses": {"204": {"description": "No content"}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "422": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "500": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Delete a [build](https://hathora.dev/docs/concepts/hathora-entities#build). All associated metadata is deleted.", "tags": ["BuildV2"], "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "path", "name": "buildId", "required": true, "schema": {"$ref": "#/components/schemas/BuildId"}}]}}, "/deployments/v1/{appId}/list": {"get": {"operationId": "GetDeploymentsDeprecated", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/Deployment"}, "type": "array"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Returns an array of [deployments](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application).", "tags": ["DeploymentV1"], "deprecated": true, "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}]}}, "/deployments/v1/{appId}/latest": {"get": {"operationId": "GetLatestDeploymentDeprecated", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Deployment"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Get the latest [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application).", "tags": ["DeploymentV1"], "deprecated": true, "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}]}}, "/deployments/v1/{appId}/info/{deploymentId}": {"get": {"operationId": "GetDeploymentInfoDeprecated", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Deployment"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Get details for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment).", "tags": ["DeploymentV1"], "deprecated": true, "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "path", "name": "deploymentId", "required": true, "schema": {"$ref": "#/components/schemas/DeploymentId"}}]}}, "/deployments/v1/{appId}/create/{buildId}": {"post": {"operationId": "CreateDeploymentDeprecated", "responses": {"201": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Deployment"}}}}, "400": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "500": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Create a new [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). Creating a new deployment means all new rooms created will use the latest deployment configuration, but existing games in progress will not be affected.", "tags": ["DeploymentV1"], "deprecated": true, "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "path", "name": "buildId", "required": true, "schema": {"$ref": "#/components/schemas/BuildId"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DeploymentConfig"}}}}}}, "/deployments/v2/{appId}/list": {"get": {"operationId": "GetDeployments", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/DeploymentV2"}, "type": "array"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Returns an array of [deployments](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application).", "tags": ["DeploymentV2"], "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}]}}, "/deployments/v2/{appId}/latest": {"get": {"operationId": "GetLatestDeployment", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DeploymentV2"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Get the latest [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application).", "tags": ["DeploymentV2"], "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}]}}, "/deployments/v2/{appId}/info/{deploymentId}": {"get": {"operationId": "GetDeploymentInfo", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DeploymentV2"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Get details for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment).", "tags": ["DeploymentV2"], "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "path", "name": "deploymentId", "required": true, "schema": {"$ref": "#/components/schemas/DeploymentId"}}]}}, "/deployments/v2/{appId}/create/{buildId}": {"post": {"operationId": "CreateDeployment", "responses": {"201": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DeploymentV2"}}}}, "400": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "500": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Create a new [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). Creating a new deployment means all new rooms created will use the latest deployment configuration, but existing games in progress will not be affected.", "tags": ["DeploymentV2"], "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "path", "name": "buildId", "required": true, "schema": {"$ref": "#/components/schemas/BuildId"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DeploymentConfigV2"}}}}}}, "/discovery/v1/ping": {"get": {"operationId": "GetPingServiceEndpointsDeprecated", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PingEndpoints"}}}}}, "description": "Returns an array of V1 regions with a host and port that a client can directly ping. Open a websocket connection to `wss://:/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back.", "tags": ["DiscoveryV1"], "deprecated": true, "security": [], "parameters": []}}, "/discovery/v2/ping": {"get": {"operationId": "GetPingServiceEndpoints", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PingEndpoints"}}}}}, "description": "Returns an array of all regions with a host and port that a client can directly ping. Open a websocket connection to `wss://:/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back.", "tags": ["DiscoveryV2"], "security": [], "parameters": []}}, "/lobby/v1/{appId}/create/private": {"post": {"operationId": "CreatePrivateLobbyDeprecated", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RoomId"}}}}, "400": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "402": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "422": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "500": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "tags": ["LobbyV1"], "deprecated": true, "security": [{"playerAuth": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "query", "name": "region", "required": false, "schema": {"$ref": "#/components/schemas/Region"}}, {"in": "query", "name": "local", "required": false, "schema": {"default": false, "type": "boolean"}}]}}, "/lobby/v1/{appId}/create/public": {"post": {"operationId": "CreatePublicLobbyDeprecated", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RoomId"}}}}, "400": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "402": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "422": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "500": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "tags": ["LobbyV1"], "deprecated": true, "security": [{"playerAuth": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "query", "name": "region", "required": false, "schema": {"$ref": "#/components/schemas/Region"}}, {"in": "query", "name": "local", "required": false, "schema": {"default": false, "type": "boolean"}}]}}, "/lobby/v1/{appId}/list": {"get": {"operationId": "ListActivePublicLobbiesDeprecatedV1", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/Lobby"}, "type": "array"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "tags": ["LobbyV1"], "deprecated": true, "security": [], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "query", "name": "local", "required": false, "schema": {"default": false, "type": "boolean"}}, {"in": "query", "name": "region", "required": false, "schema": {"$ref": "#/components/schemas/Region"}}]}}, "/lobby/v2/{appId}/create/private": {"post": {"operationId": "CreatePrivateLobby", "responses": {"201": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Lobby"}}}}, "400": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "402": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "422": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "500": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "tags": ["LobbyV2"], "deprecated": true, "security": [{"playerAuth": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "query", "name": "roomId", "required": false, "schema": {"$ref": "#/components/schemas/RoomId"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"properties": {"initialConfig": {"$ref": "#/components/schemas/LobbyInitialConfig"}, "region": {"$ref": "#/components/schemas/Region"}}, "required": ["initialConfig", "region"], "type": "object"}}}}}}, "/lobby/v2/{appId}/create/public": {"post": {"operationId": "CreatePublicLobby", "responses": {"201": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Lobby"}}}}, "400": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "402": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "422": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "500": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "tags": ["LobbyV2"], "deprecated": true, "security": [{"playerAuth": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "query", "name": "roomId", "required": false, "schema": {"$ref": "#/components/schemas/RoomId"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"properties": {"initialConfig": {"$ref": "#/components/schemas/LobbyInitialConfig"}, "region": {"$ref": "#/components/schemas/Region"}}, "required": ["initialConfig", "region"], "type": "object"}}}}}}, "/lobby/v2/{appId}/create/local": {"post": {"operationId": "CreateLocalLobby", "responses": {"201": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Lobby"}}}}, "400": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "402": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "422": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "500": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "tags": ["LobbyV2"], "deprecated": true, "security": [{"playerAuth": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "query", "name": "roomId", "required": false, "schema": {"$ref": "#/components/schemas/RoomId"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"properties": {"initialConfig": {"$ref": "#/components/schemas/LobbyInitialConfig"}, "region": {"$ref": "#/components/schemas/Region"}}, "required": ["initialConfig", "region"], "type": "object"}}}}}}, "/lobby/v2/{appId}/create": {"post": {"operationId": "CreateLobbyDeprecated", "responses": {"201": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Lobby"}}}}, "400": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "402": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "422": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "500": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Create a new lobby for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). A lobby object is a wrapper around a [room](https://hathora.dev/docs/concepts/hathora-entities#room) object. With a lobby, you get additional functionality like configuring the visibility of the room, managing the state of a match, and retrieving a list of public lobbies to display to players.", "tags": ["LobbyV2"], "deprecated": true, "security": [{"playerAuth": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "query", "name": "roomId", "required": false, "schema": {"$ref": "#/components/schemas/RoomId"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateLobbyParams"}}}}}}, "/lobby/v2/{appId}/list/public": {"get": {"operationId": "ListActivePublicLobbiesDeprecatedV2", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/Lobby"}, "type": "array"}}}}}, "description": "Get all active lobbies for a an [application](https://hathora.dev/docs/concepts/hathora-entities#application). Filter by optionally passing in a `region`. Use this endpoint to display all public lobbies that a player can join in the game client.", "tags": ["LobbyV2"], "deprecated": true, "security": [], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"description": "Region to filter by. If omitted, active public lobbies in all regions will be returned.", "in": "query", "name": "region", "required": false, "schema": {"$ref": "#/components/schemas/Region"}}]}}, "/lobby/v2/{appId}/info/{roomId}": {"get": {"operationId": "GetLobbyInfo", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Lobby"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Get details for a lobby.", "tags": ["LobbyV2"], "deprecated": true, "security": [], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "path", "name": "roomId", "required": true, "schema": {"$ref": "#/components/schemas/RoomId"}}]}}, "/lobby/v2/{appId}/setState/{roomId}": {"post": {"operationId": "SetLobbyState", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Lobby"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "422": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Set the state of a lobby. State is intended to be set by the server and must be smaller than 1MB. Use this endpoint to store match data like live player count to enforce max number of clients or persist end-game data (i.e. winner or final scores).", "tags": ["LobbyV2"], "deprecated": true, "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "path", "name": "roomId", "required": true, "schema": {"$ref": "#/components/schemas/RoomId"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SetLobbyStateParams"}}}}}}, "/lobby/v3/{appId}/create": {"post": {"operationId": "CreateLobby", "responses": {"201": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LobbyV3"}}}}, "400": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "402": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "422": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "500": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Create a new lobby for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). A lobby object is a wrapper around a [room](https://hathora.dev/docs/concepts/hathora-entities#room) object. With a lobby, you get additional functionality like configuring the visibility of the room, managing the state of a match, and retrieving a list of public lobbies to display to players.", "tags": ["LobbyV3"], "security": [{"playerAuth": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "query", "name": "shortCode", "required": false, "schema": {"$ref": "#/components/schemas/ShortCode"}}, {"in": "query", "name": "roomId", "required": false, "schema": {"$ref": "#/components/schemas/RoomId"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateLobbyV3Params"}}}}}}, "/lobby/v3/{appId}/list/public": {"get": {"operationId": "ListActivePublicLobbies", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/LobbyV3"}, "type": "array"}}}}}, "description": "Get all active lobbies for a given [application](https://hathora.dev/docs/concepts/hathora-entities#application). Filter the array by optionally passing in a `region`. Use this endpoint to display all public lobbies that a player can join in the game client.", "tags": ["LobbyV3"], "security": [], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"description": "If omitted, active public lobbies in all regions will be returned.", "in": "query", "name": "region", "required": false, "schema": {"$ref": "#/components/schemas/Region"}}]}}, "/lobby/v3/{appId}/info/roomid/{roomId}": {"get": {"operationId": "GetLobbyInfoByRoomId", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LobbyV3"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Get details for a lobby.", "tags": ["LobbyV3"], "security": [], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "path", "name": "roomId", "required": true, "schema": {"$ref": "#/components/schemas/RoomId"}}]}}, "/lobby/v3/{appId}/info/shortcode/{shortCode}": {"get": {"operationId": "GetLobbyInfoByShortCode", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LobbyV3"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Get details for a lobby. If 2 or more lobbies have the same `shortCode`, then the most recently created lobby will be returned.", "tags": ["LobbyV3"], "security": [], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "path", "name": "shortCode", "required": true, "schema": {"$ref": "#/components/schemas/ShortCode"}}]}}, "/logs/v1/{appId}/all": {"get": {"operationId": "GetLogsForApp", "responses": {"200": {"description": "Ok", "content": {"application/octet-stream": {"schema": {"type": "string", "format": "binary"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Returns a stream of logs for an [application](https://hathora.dev/docs/concepts/hathora-entities#application) using `appId`.", "tags": ["LogV1"], "deprecated": true, "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "query", "name": "follow", "required": false, "schema": {"$ref": "#/components/schemas/LogsFollow"}}, {"in": "query", "name": "tailLines", "required": false, "schema": {"$ref": "#/components/schemas/TailLines"}}, {"in": "query", "name": "region", "required": false, "schema": {"$ref": "#/components/schemas/Region"}}]}}, "/logs/v1/{appId}/process/{processId}": {"get": {"operationId": "GetLogsForProcess", "responses": {"200": {"description": "Ok", "content": {"application/octet-stream": {"schema": {"type": "string", "format": "binary"}}}}, "400": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "410": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "500": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Returns a stream of logs for a [process](https://hathora.dev/docs/concepts/hathora-entities#process) using `appId` and `processId`.", "tags": ["LogV1"], "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "path", "name": "processId", "required": true, "schema": {"$ref": "#/components/schemas/ProcessId"}}, {"in": "query", "name": "follow", "required": false, "schema": {"$ref": "#/components/schemas/LogsFollow"}}, {"in": "query", "name": "tailLines", "required": false, "schema": {"$ref": "#/components/schemas/TailLines"}}]}}, "/logs/v1/{appId}/process/{processId}/download": {"get": {"operationId": "DownloadLogForProcess", "responses": {"200": {"description": "Ok", "content": {"application/octet-stream": {"schema": {"type": "string", "format": "binary"}}}}, "400": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "410": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Download entire log file for a stopped process.", "tags": ["LogV1"], "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "path", "name": "processId", "required": true, "schema": {"$ref": "#/components/schemas/ProcessId"}}]}}, "/logs/v1/{appId}/deployment/{deploymentId}": {"get": {"operationId": "GetLogsForDeployment", "responses": {"200": {"description": "Ok", "content": {"application/octet-stream": {"schema": {"type": "string", "format": "binary"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Returns a stream of logs for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment) using `appId` and `deploymentId`.", "tags": ["LogV1"], "deprecated": true, "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "path", "name": "deploymentId", "required": true, "schema": {"$ref": "#/components/schemas/DeploymentId"}}, {"in": "query", "name": "follow", "required": false, "schema": {"$ref": "#/components/schemas/LogsFollow"}}, {"in": "query", "name": "tailLines", "required": false, "schema": {"$ref": "#/components/schemas/TailLines"}}]}}, "/management/v1/sendverificationemail": {"post": {"operationId": "SendVerificationEmail", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VerificationEmailSuccess"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "500": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "tags": ["ManagementV1"], "security": [], "parameters": [], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VerificationEmailRequest"}}}}}}, "/metrics/v1/{appId}/process/{processId}": {"get": {"operationId": "GetMetrics", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MetricsData"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "422": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "500": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Get metrics for a [process](https://hathora.dev/docs/concepts/hathora-entities#process) using `appId` and `processId`.", "tags": ["MetricsV1"], "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "path", "name": "processId", "required": true, "schema": {"$ref": "#/components/schemas/ProcessId"}}, {"description": "Available metrics to query over time.", "in": "query", "name": "metrics", "required": false, "schema": {"default": ["cpu", "memory", "rate_egress"], "type": "array", "items": {"$ref": "#/components/schemas/MetricName"}}}, {"description": "Unix timestamp. Default is current time.", "in": "query", "name": "end", "required": false, "schema": {"format": "double", "type": "number"}}, {"description": "Unix timestamp. Default is -1 hour from `end`.", "in": "query", "name": "start", "required": false, "schema": {"format": "double", "type": "number"}}, {"in": "query", "name": "step", "required": false, "schema": {"$ref": "#/components/schemas/MetricsStep"}}]}}, "/orgs/v1/{orgId}/invites": {"put": {"operationId": "InviteUser", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrgPermission"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "422": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "tags": ["OrganizationsV1"], "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "orgId", "required": true, "schema": {"$ref": "#/components/schemas/OrgId"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateUserInvite"}}}}}}, "/orgs/v1/{orgId}/invites/rescind": {"post": {"operationId": "RescindInvite", "responses": {"204": {"description": "No content"}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "500": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "tags": ["OrganizationsV1"], "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "orgId", "required": true, "schema": {"$ref": "#/components/schemas/OrgId"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RescindUserInvite"}}}}}}, "/orgs/v1/{orgId}/invites/pending": {"get": {"operationId": "GetOrgPendingInvites", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrgInvitesPage"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "tags": ["OrganizationsV1"], "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "orgId", "required": true, "schema": {"$ref": "#/components/schemas/OrgId"}}]}}, "/orgs/v1/user/invites/pending": {"get": {"operationId": "GetUserPendingInvites", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrgInvitesPage"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "tags": ["OrganizationsV1"], "security": [{"hathoraDevToken": []}], "parameters": []}}, "/orgs/v1/{orgId}/invites/accept": {"post": {"operationId": "AcceptInvite", "responses": {"204": {"description": "No content"}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "tags": ["OrganizationsV1"], "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "orgId", "required": true, "schema": {"$ref": "#/components/schemas/OrgId"}}]}}, "/orgs/v1/{orgId}/invites/reject": {"post": {"operationId": "RejectInvite", "responses": {"204": {"description": "No content"}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "tags": ["OrganizationsV1"], "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "orgId", "required": true, "schema": {"$ref": "#/components/schemas/OrgId"}}]}}, "/processes/v1/{appId}/list/running": {"get": {"operationId": "GetRunningProcesses", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/ProcessWithRooms"}, "type": "array"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Retrieve 10 most recently started [process](https://hathora.dev/docs/concepts/hathora-entities#process) objects for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). Filter the array by optionally passing in a `region`.", "tags": ["ProcessesV1"], "deprecated": true, "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "query", "name": "region", "required": false, "schema": {"$ref": "#/components/schemas/Region"}}]}}, "/processes/v1/{appId}/list/stopped": {"get": {"operationId": "GetStoppedProcesses", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/Process"}, "type": "array"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Retrieve 10 most recently stopped [process](https://hathora.dev/docs/concepts/hathora-entities#process) objects for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). Filter the array by optionally passing in a `region`.", "tags": ["ProcessesV1"], "deprecated": true, "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "query", "name": "region", "required": false, "schema": {"$ref": "#/components/schemas/Region"}}]}}, "/processes/v1/{appId}/info/{processId}": {"get": {"operationId": "GetProcessInfoDeprecated", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Process"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "500": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Get details for a [process](https://hathora.dev/docs/concepts/hathora-entities#process).", "tags": ["ProcessesV1"], "deprecated": true, "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "path", "name": "processId", "required": true, "schema": {"$ref": "#/components/schemas/ProcessId"}}]}}, "/processes/v2/{appId}/info/{processId}": {"get": {"operationId": "GetProcessInfo", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ProcessV2"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Get details for a [process](https://hathora.dev/docs/concepts/hathora-entities#process).", "tags": ["ProcessesV2"], "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "path", "name": "processId", "required": true, "schema": {"$ref": "#/components/schemas/ProcessId"}}]}}, "/processes/v2/{appId}/list/latest": {"get": {"operationId": "GetLatestProcesses", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/ProcessV2"}, "type": "array"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Retrieve the 10 most recent [processes](https://hathora.dev/docs/concepts/hathora-entities#process) objects for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). Filter the array by optionally passing in a `status` or `region`.", "tags": ["ProcessesV2"], "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "query", "name": "status", "required": false, "schema": {"type": "array", "items": {"$ref": "#/components/schemas/ProcessStatus"}}}, {"in": "query", "name": "region", "required": false, "schema": {"type": "array", "items": {"$ref": "#/components/schemas/Region"}}}]}}, "/processes/v2/{appId}/stop/{processId}": {"post": {"operationId": "StopProcess", "responses": {"204": {"description": "No content"}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "500": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Stops a [process](https://hathora.dev/docs/concepts/hathora-entities#process) immediately.", "tags": ["ProcessesV2"], "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "path", "name": "processId", "required": true, "schema": {"$ref": "#/components/schemas/ProcessId"}}]}}, "/processes/v2/{appId}/create/{region}": {"post": {"operationId": "CreateProcess", "responses": {"201": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ProcessV2"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "402": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "500": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Creates a [process](https://hathora.dev/docs/concepts/hathora-entities#process) without a room. Use this to pre-allocate processes ahead of time so that subsequent room assignment via [CreateRoom()](https://hathora.dev/api#tag/RoomV2/operation/CreateRoom) can be instant.", "tags": ["ProcessesV2"], "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "path", "name": "region", "required": true, "schema": {"$ref": "#/components/schemas/Region"}}]}}, "/rooms/v1/{appId}/create": {"post": {"operationId": "CreateRoomDeprecated", "responses": {"201": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RoomId"}}}}, "400": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "402": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "403": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "500": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "tags": ["RoomV1"], "deprecated": true, "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "query", "name": "roomId", "required": false, "schema": {"$ref": "#/components/schemas/RoomId"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateRoomParams"}}}}}}, "/rooms/v1/{appId}/info/{roomId}": {"get": {"operationId": "GetRoomInfoDeprecated", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Room"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "tags": ["RoomV1"], "deprecated": true, "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "path", "name": "roomId", "required": true, "schema": {"$ref": "#/components/schemas/RoomId"}}]}}, "/rooms/v1/{appId}/list/{processId}/active": {"get": {"operationId": "GetActiveRoomsForProcessDeprecated", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/RoomWithoutAllocations"}, "type": "array"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "tags": ["RoomV1"], "deprecated": true, "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "path", "name": "processId", "required": true, "schema": {"$ref": "#/components/schemas/ProcessId"}}]}}, "/rooms/v1/{appId}/list/{processId}/inactive": {"get": {"operationId": "GetInactiveRoomsForProcessDeprecated", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/RoomWithoutAllocations"}, "type": "array"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "tags": ["RoomV1"], "deprecated": true, "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "path", "name": "processId", "required": true, "schema": {"$ref": "#/components/schemas/ProcessId"}}]}}, "/rooms/v1/{appId}/destroy/{roomId}": {"post": {"operationId": "DestroyRoomDeprecated", "responses": {"204": {"description": "No content"}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "500": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "tags": ["RoomV1"], "deprecated": true, "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "path", "name": "roomId", "required": true, "schema": {"$ref": "#/components/schemas/RoomId"}}]}}, "/rooms/v1/{appId}/suspend/{roomId}": {"post": {"operationId": "SuspendRoomDeprecated", "responses": {"204": {"description": "No content"}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "500": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "tags": ["RoomV1"], "deprecated": true, "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "path", "name": "roomId", "required": true, "schema": {"$ref": "#/components/schemas/RoomId"}}]}}, "/rooms/v1/{appId}/connectioninfo/{roomId}": {"get": {"operationId": "GetConnectionInfoDeprecated", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ConnectionInfo"}}}}, "400": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "402": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "500": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "tags": ["RoomV1"], "deprecated": true, "security": [], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "path", "name": "roomId", "required": true, "schema": {"$ref": "#/components/schemas/RoomId"}}]}}, "/rooms/v2/{appId}/create": {"post": {"operationId": "CreateRoom", "responses": {"201": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RoomConnectionData"}}}}, "400": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "402": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "403": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "500": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Create a new [room](https://hathora.dev/docs/concepts/hathora-entities#room) for an existing [application](https://hathora.dev/docs/concepts/hathora-entities#application). Poll the [`GetConnectionInfo()`](https://hathora.dev/api#tag/RoomV2/operation/GetConnectionInfo) endpoint to get connection details for an active room.", "tags": ["RoomV2"], "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "query", "name": "roomId", "required": false, "schema": {"$ref": "#/components/schemas/RoomId"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateRoomParams"}}}}}}, "/rooms/v2/{appId}/info/{roomId}": {"get": {"operationId": "GetRoomInfo", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Room"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Retreive current and historical allocation data for a [room](https://hathora.dev/docs/concepts/hathora-entities#room).", "tags": ["RoomV2"], "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "path", "name": "roomId", "required": true, "schema": {"$ref": "#/components/schemas/RoomId"}}]}}, "/rooms/v2/{appId}/list/{processId}/active": {"get": {"operationId": "GetActiveRoomsForProcess", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/RoomWithoutAllocations"}, "type": "array"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Get all active [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) for a given [process](https://hathora.dev/docs/concepts/hathora-entities#process).", "tags": ["RoomV2"], "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "path", "name": "processId", "required": true, "schema": {"$ref": "#/components/schemas/ProcessId"}}]}}, "/rooms/v2/{appId}/list/{processId}/inactive": {"get": {"operationId": "GetInactiveRoomsForProcess", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/RoomWithoutAllocations"}, "type": "array"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Get all inactive [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) for a given [process](https://hathora.dev/docs/concepts/hathora-entities#process).", "tags": ["RoomV2"], "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "path", "name": "processId", "required": true, "schema": {"$ref": "#/components/schemas/ProcessId"}}]}}, "/rooms/v2/{appId}/destroy/{roomId}": {"post": {"operationId": "DestroyRoom", "responses": {"204": {"description": "No content"}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "500": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Destroy a [room](https://hathora.dev/docs/concepts/hathora-entities#room). All associated metadata is deleted.", "tags": ["RoomV2"], "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "path", "name": "roomId", "required": true, "schema": {"$ref": "#/components/schemas/RoomId"}}]}}, "/rooms/v2/{appId}/suspend/{roomId}": {"post": {"operationId": "SuspendRoomV2Deprecated", "responses": {"204": {"description": "No content"}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "500": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Suspend a [room](https://hathora.dev/docs/concepts/hathora-entities#room). The room is unallocated from the process but can be rescheduled later using the same `roomId`.", "tags": ["RoomV2"], "deprecated": true, "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "path", "name": "roomId", "required": true, "schema": {"$ref": "#/components/schemas/RoomId"}}]}}, "/rooms/v2/{appId}/connectioninfo/{roomId}": {"get": {"operationId": "GetConnectionInfo", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ConnectionInfoV2"}}}}, "400": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "402": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "500": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Poll this endpoint to get connection details to a [room](https://hathora.dev/docs/concepts/hathora-entities#room). Clients can call this endpoint without authentication.", "tags": ["RoomV2"], "security": [], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "path", "name": "roomId", "required": true, "schema": {"$ref": "#/components/schemas/RoomId"}}]}}, "/rooms/v2/{appId}/update/{roomId}": {"post": {"operationId": "UpdateRoomConfig", "responses": {"204": {"description": "No content"}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "429": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "500": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "tags": ["RoomV2"], "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "appId", "required": true, "schema": {"$ref": "#/components/schemas/AppId"}}, {"in": "path", "name": "roomId", "required": true, "schema": {"$ref": "#/components/schemas/RoomId"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateRoomConfigParams"}}}}}}, "/tokens/v1/orgs/{orgId}": {"get": {"operationId": "GetOrgTokens", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListOrgTokens"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "List all organization tokens for a given org.", "tags": ["OrgTokensV1"], "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "orgId", "required": true, "schema": {"$ref": "#/components/schemas/OrgId"}}]}}, "/tokens/v1/orgs/{orgId}/create": {"post": {"operationId": "CreateOrgToken", "responses": {"201": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreatedOrgToken"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "422": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Create a new organization token.", "tags": ["OrgTokensV1"], "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "orgId", "required": true, "schema": {"$ref": "#/components/schemas/OrgId"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateOrgToken"}}}}}}, "/tokens/v1/orgs/{orgId}/tokens/{orgTokenId}/revoke": {"post": {"operationId": "RevokeOrgToken", "responses": {"200": {"description": "Ok", "content": {"application/json": {"schema": {"type": "boolean"}}}}, "401": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}, "404": {"description": "", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiError"}}}}}, "description": "Revoke an organization token.", "tags": ["OrgTokensV1"], "security": [{"hathoraDevToken": []}], "parameters": [{"in": "path", "name": "orgId", "required": true, "schema": {"$ref": "#/components/schemas/OrgId"}}, {"in": "path", "name": "orgTokenId", "required": true, "schema": {"$ref": "#/components/schemas/OrgId"}}]}}}, "servers": [{"url": "https://api.hathora.dev"}, {"url": "/"}], "tags": [{"name": "AppV1", "description": "Operations that allow you manage your [applications](https://hathora.dev/docs/concepts/hathora-entities#application)."}, {"name": "AuthV1", "description": "Operations that allow you to generate a Hathora-signed [JSON web token (JWT)](https://jwt.io/) for [player authentication](https://hathora.dev/docs/lobbies-and-matchmaking/auth-service)."}, {"name": "BillingV1", "description": " "}, {"name": "BuildV2", "description": "Operations that allow you create and manage your [builds](https://hathora.dev/docs/concepts/hathora-entities#build)."}, {"name": "BuildV1", "description": "Deprecated. Use [BuildV2](https://hathora.dev/api#tag/BuildV2)."}, {"name": "DeploymentV2", "description": "Operations that allow you configure and manage an application's [build](https://hathora.dev/docs/concepts/hathora-entities#build) at runtime."}, {"name": "DeploymentV1", "description": "Deprecated. Use [DeploymentV2](https://hathora.dev/api#tag/DeploymentV2)."}, {"name": "DiscoveryV1", "description": "Service that allows clients to directly ping all Hathora regions to get latency information"}, {"name": "LobbyV3", "description": "Operations to create and manage lobbies using our [Lobby Service](https://hathora.dev/docs/lobbies-and-matchmaking/lobby-service)."}, {"name": "LobbyV2", "description": "Deprecated. Use [LobbyV3](https://hathora.dev/api#tag/LobbyV3)."}, {"name": "LobbyV1", "description": "Deprecated. Use [LobbyV3](https://hathora.dev/api#tag/LobbyV3)."}, {"name": "LogV1", "description": "Operations to get logs by [applications](https://hathora.dev/docs/concepts/hathora-entities#application), [processes](https://hathora.dev/docs/concepts/hathora-entities#process), and [deployments](https://hathora.dev/docs/concepts/hathora-entities#deployment). We store 20GB of logs data."}, {"name": "ManagementV1", "description": " "}, {"name": "MetricsV1", "description": "Operations to get metrics by [process](https://hathora.dev/docs/concepts/hathora-entities#process). We store 72 hours of metrics data."}, {"name": "ProcessesV2", "description": "Operations to get data on active and stopped [processes](https://hathora.dev/docs/concepts/hathora-entities#process)."}, {"name": "ProcessesV1", "description": "Deprecated. Use [ProcessesV2](https://hathora.dev/api#tag/ProcessesV2)."}, {"name": "RoomV2", "description": "Operations to create, manage, and connect to [rooms](https://hathora.dev/docs/concepts/hathora-entities#room)."}, {"name": "RoomV1", "description": "Deprecated. Use [RoomV2](https://hathora.dev/api#tag/RoomV2)."}, {"name": "OrgTokensV1", "description": " "}], "x-speakeasy-globals": {"parameters": [{"in": "path", "name": "appId", "schema": {"$ref": "#/components/schemas/AppId"}}]}} diff --git a/typescript/.openapi-generator/FILES b/typescript/.openapi-generator/FILES index 1bea3f3..d2f2d7e 100644 --- a/typescript/.openapi-generator/FILES +++ b/typescript/.openapi-generator/FILES @@ -4,8 +4,11 @@ src/apis/AppV1Api.ts src/apis/AuthV1Api.ts src/apis/BillingV1Api.ts src/apis/BuildV1Api.ts +src/apis/BuildV2Api.ts src/apis/DeploymentV1Api.ts +src/apis/DeploymentV2Api.ts src/apis/DiscoveryV1Api.ts +src/apis/DiscoveryV2Api.ts src/apis/LobbyV1Api.ts src/apis/LobbyV2Api.ts src/apis/LobbyV3Api.ts @@ -13,6 +16,7 @@ src/apis/LogV1Api.ts src/apis/ManagementV1Api.ts src/apis/MetricsV1Api.ts src/apis/OrgTokensV1Api.ts +src/apis/OrganizationsV1Api.ts src/apis/ProcessesV1Api.ts src/apis/ProcessesV2Api.ts src/apis/RoomV1Api.ts @@ -44,15 +48,20 @@ src/models/CreateLobbyV3Params.ts src/models/CreateOrgToken.ts src/models/CreatePrivateLobbyRequest.ts src/models/CreateRoomParams.ts -src/models/CreateRoomResponse.ts -src/models/CreateRoomResponseAllOf.ts +src/models/CreateUserInvite.ts src/models/CreatedOrgToken.ts src/models/CustomerPortalUrl.ts src/models/Deployment.ts src/models/DeploymentConfig.ts -src/models/DeploymentEnvInner.ts -src/models/DiscoveryResponseInner.ts +src/models/DeploymentConfigV2.ts +src/models/DeploymentV2.ts +src/models/DeploymentV2EnvInner.ts src/models/ExposedPort.ts +src/models/GoogleIdTokenObject.ts +src/models/InviteStatusAccepted.ts +src/models/InviteStatusPending.ts +src/models/InviteStatusRejected.ts +src/models/InviteStatusRescinded.ts src/models/Invoice.ts src/models/InvoiceStatus.ts src/models/LinkPaymentMethod.ts @@ -60,16 +69,20 @@ src/models/ListOrgTokens.ts src/models/Lobby.ts src/models/LobbyV3.ts src/models/LobbyVisibility.ts -src/models/LoginGoogleRequest.ts -src/models/LoginNicknameRequest.ts -src/models/LoginResponse.ts src/models/MetricName.ts src/models/MetricValue.ts +src/models/NewUserInfo.ts +src/models/NicknameObject.ts +src/models/OrgInvitesPage.ts +src/models/OrgPermission.ts src/models/OrgToken.ts src/models/OrgTokenStatus.ts +src/models/OrganizationInviteStatus.ts src/models/PartialCardCardPaymentMethodAchAchPaymentMethodLinkLinkPaymentMethod.ts src/models/PickRoomExcludeKeyofRoomAllocations.ts +src/models/PingEndpointsInner.ts src/models/PlanName.ts +src/models/PlayerTokenObject.ts src/models/Process.ts src/models/ProcessStatus.ts src/models/ProcessV2.ts @@ -77,15 +90,19 @@ src/models/ProcessWithRooms.ts src/models/ProcessWithRoomsAllOf.ts src/models/RecordPartialMetricNameMetricValueArray.ts src/models/Region.ts +src/models/RescindUserInvite.ts src/models/Room.ts src/models/RoomAllocation.ts +src/models/RoomConnectionData.ts +src/models/RoomConnectionDataAllOf.ts +src/models/RoomReadyStatus.ts src/models/RoomStatus.ts src/models/SetLobbyStateParams.ts src/models/StartingConnectionInfo.ts src/models/TransportType.ts src/models/UpdateRoomConfigParams.ts src/models/VerificationEmailRequest.ts -src/models/VerificationEmailResponse.ts +src/models/VerificationEmailSuccess.ts src/models/index.ts src/runtime.ts tsconfig.esm.json diff --git a/typescript/src/apis/AuthV1Api.ts b/typescript/src/apis/AuthV1Api.ts index a8dfdad..f665e27 100644 --- a/typescript/src/apis/AuthV1Api.ts +++ b/typescript/src/apis/AuthV1Api.ts @@ -16,33 +16,33 @@ import * as runtime from '../runtime'; import type { ApiError, - LoginGoogleRequest, - LoginNicknameRequest, - LoginResponse, + GoogleIdTokenObject, + NicknameObject, + PlayerTokenObject, } from '../models'; import { ApiErrorFromJSON, ApiErrorToJSON, - LoginGoogleRequestFromJSON, - LoginGoogleRequestToJSON, - LoginNicknameRequestFromJSON, - LoginNicknameRequestToJSON, - LoginResponseFromJSON, - LoginResponseToJSON, + GoogleIdTokenObjectFromJSON, + GoogleIdTokenObjectToJSON, + NicknameObjectFromJSON, + NicknameObjectToJSON, + PlayerTokenObjectFromJSON, + PlayerTokenObjectToJSON, } from '../models'; export interface LoginAnonymousRequest { appId: string; } -export interface LoginGoogleOperationRequest { +export interface LoginGoogleRequest { appId: string; - loginGoogleRequest: LoginGoogleRequest; + googleIdTokenObject: GoogleIdTokenObject; } -export interface LoginNicknameOperationRequest { +export interface LoginNicknameRequest { appId: string; - loginNicknameRequest: LoginNicknameRequest; + nicknameObject: NicknameObject; } /** @@ -59,42 +59,42 @@ export interface AuthV1ApiInterface { * @throws {RequiredError} * @memberof AuthV1ApiInterface */ - loginAnonymousRaw(requestParameters: LoginAnonymousRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + loginAnonymousRaw(requestParameters: LoginAnonymousRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Returns a unique player token for an anonymous user. */ - loginAnonymous(appId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + loginAnonymous(appId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Returns a unique player token using a Google-signed OIDC `idToken`. * @param {string} appId - * @param {LoginGoogleRequest} loginGoogleRequest + * @param {GoogleIdTokenObject} googleIdTokenObject * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AuthV1ApiInterface */ - loginGoogleRaw(requestParameters: LoginGoogleOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + loginGoogleRaw(requestParameters: LoginGoogleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Returns a unique player token using a Google-signed OIDC `idToken`. */ - loginGoogle(appId: string, loginGoogleRequest: LoginGoogleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + loginGoogle(appId: string, googleIdTokenObject: GoogleIdTokenObject, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Returns a unique player token with a specified nickname for a user. * @param {string} appId - * @param {LoginNicknameRequest} loginNicknameRequest + * @param {NicknameObject} nicknameObject * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AuthV1ApiInterface */ - loginNicknameRaw(requestParameters: LoginNicknameOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + loginNicknameRaw(requestParameters: LoginNicknameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Returns a unique player token with a specified nickname for a user. */ - loginNickname(appId: string, loginNicknameRequest: LoginNicknameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + loginNickname(appId: string, nicknameObject: NicknameObject, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; } @@ -106,7 +106,7 @@ export class AuthV1Api extends runtime.BaseAPI implements AuthV1ApiInterface { /** * Returns a unique player token for an anonymous user. */ - async loginAnonymousRaw(requestParameters: LoginAnonymousRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async loginAnonymousRaw(requestParameters: LoginAnonymousRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters.appId === null || requestParameters.appId === undefined) { throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling loginAnonymous.'); } @@ -122,13 +122,13 @@ export class AuthV1Api extends runtime.BaseAPI implements AuthV1ApiInterface { query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => LoginResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => PlayerTokenObjectFromJSON(jsonValue)); } /** * Returns a unique player token for an anonymous user. */ - async loginAnonymous(appId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + async loginAnonymous(appId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.loginAnonymousRaw({ appId: appId }, initOverrides); return await response.value(); } @@ -136,13 +136,13 @@ export class AuthV1Api extends runtime.BaseAPI implements AuthV1ApiInterface { /** * Returns a unique player token using a Google-signed OIDC `idToken`. */ - async loginGoogleRaw(requestParameters: LoginGoogleOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async loginGoogleRaw(requestParameters: LoginGoogleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters.appId === null || requestParameters.appId === undefined) { throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling loginGoogle.'); } - if (requestParameters.loginGoogleRequest === null || requestParameters.loginGoogleRequest === undefined) { - throw new runtime.RequiredError('loginGoogleRequest','Required parameter requestParameters.loginGoogleRequest was null or undefined when calling loginGoogle.'); + if (requestParameters.googleIdTokenObject === null || requestParameters.googleIdTokenObject === undefined) { + throw new runtime.RequiredError('googleIdTokenObject','Required parameter requestParameters.googleIdTokenObject was null or undefined when calling loginGoogle.'); } const queryParameters: any = {}; @@ -156,30 +156,30 @@ export class AuthV1Api extends runtime.BaseAPI implements AuthV1ApiInterface { method: 'POST', headers: headerParameters, query: queryParameters, - body: LoginGoogleRequestToJSON(requestParameters.loginGoogleRequest), + body: GoogleIdTokenObjectToJSON(requestParameters.googleIdTokenObject), }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => LoginResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => PlayerTokenObjectFromJSON(jsonValue)); } /** * Returns a unique player token using a Google-signed OIDC `idToken`. */ - async loginGoogle(appId: string, loginGoogleRequest: LoginGoogleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.loginGoogleRaw({ appId: appId, loginGoogleRequest: loginGoogleRequest }, initOverrides); + async loginGoogle(appId: string, googleIdTokenObject: GoogleIdTokenObject, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.loginGoogleRaw({ appId: appId, googleIdTokenObject: googleIdTokenObject }, initOverrides); return await response.value(); } /** * Returns a unique player token with a specified nickname for a user. */ - async loginNicknameRaw(requestParameters: LoginNicknameOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async loginNicknameRaw(requestParameters: LoginNicknameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters.appId === null || requestParameters.appId === undefined) { throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling loginNickname.'); } - if (requestParameters.loginNicknameRequest === null || requestParameters.loginNicknameRequest === undefined) { - throw new runtime.RequiredError('loginNicknameRequest','Required parameter requestParameters.loginNicknameRequest was null or undefined when calling loginNickname.'); + if (requestParameters.nicknameObject === null || requestParameters.nicknameObject === undefined) { + throw new runtime.RequiredError('nicknameObject','Required parameter requestParameters.nicknameObject was null or undefined when calling loginNickname.'); } const queryParameters: any = {}; @@ -193,17 +193,17 @@ export class AuthV1Api extends runtime.BaseAPI implements AuthV1ApiInterface { method: 'POST', headers: headerParameters, query: queryParameters, - body: LoginNicknameRequestToJSON(requestParameters.loginNicknameRequest), + body: NicknameObjectToJSON(requestParameters.nicknameObject), }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => LoginResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => PlayerTokenObjectFromJSON(jsonValue)); } /** * Returns a unique player token with a specified nickname for a user. */ - async loginNickname(appId: string, loginNicknameRequest: LoginNicknameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.loginNicknameRaw({ appId: appId, loginNicknameRequest: loginNicknameRequest }, initOverrides); + async loginNickname(appId: string, nicknameObject: NicknameObject, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.loginNicknameRaw({ appId: appId, nicknameObject: nicknameObject }, initOverrides); return await response.value(); } diff --git a/typescript/src/apis/BuildV1Api.ts b/typescript/src/apis/BuildV1Api.ts index 94c319b..7e8b3fb 100644 --- a/typescript/src/apis/BuildV1Api.ts +++ b/typescript/src/apis/BuildV1Api.ts @@ -28,26 +28,26 @@ import { CreateBuildParamsToJSON, } from '../models'; -export interface CreateBuildRequest { +export interface CreateBuildDeprecatedRequest { appId: string; createBuildParams: CreateBuildParams; } -export interface DeleteBuildRequest { +export interface DeleteBuildDeprecatedRequest { appId: string; buildId: number; } -export interface GetBuildInfoRequest { +export interface GetBuildInfoDeprecatedRequest { appId: string; buildId: number; } -export interface GetBuildsRequest { +export interface GetBuildsDeprecatedRequest { appId: string; } -export interface RunBuildRequest { +export interface RunBuildDeprecatedRequest { appId: string; buildId: number; file: Blob; @@ -65,59 +65,63 @@ export interface BuildV1ApiInterface { * @param {string} appId * @param {CreateBuildParams} createBuildParams * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} * @memberof BuildV1ApiInterface */ - createBuildRaw(requestParameters: CreateBuildRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + createBuildDeprecatedRaw(requestParameters: CreateBuildDeprecatedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Creates a new [build](https://hathora.dev/docs/concepts/hathora-entities#build). Responds with a `buildId` that you must pass to [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) to build the game server artifact. You can optionally pass in a `buildTag` to associate an external version with a build. */ - createBuild(appId: string, createBuildParams: CreateBuildParams, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + createBuildDeprecated(appId: string, createBuildParams: CreateBuildParams, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Delete a [build](https://hathora.dev/docs/concepts/hathora-entities#build). All associated metadata is deleted. * @param {string} appId * @param {number} buildId * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} * @memberof BuildV1ApiInterface */ - deleteBuildRaw(requestParameters: DeleteBuildRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + deleteBuildDeprecatedRaw(requestParameters: DeleteBuildDeprecatedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Delete a [build](https://hathora.dev/docs/concepts/hathora-entities#build). All associated metadata is deleted. */ - deleteBuild(appId: string, buildId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + deleteBuildDeprecated(appId: string, buildId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Get details for a [build](https://hathora.dev/docs/concepts/hathora-entities#build). * @param {string} appId * @param {number} buildId * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} * @memberof BuildV1ApiInterface */ - getBuildInfoRaw(requestParameters: GetBuildInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + getBuildInfoDeprecatedRaw(requestParameters: GetBuildInfoDeprecatedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Get details for a [build](https://hathora.dev/docs/concepts/hathora-entities#build). */ - getBuildInfo(appId: string, buildId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + getBuildInfoDeprecated(appId: string, buildId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Returns an array of [builds](https://hathora.dev/docs/concepts/hathora-entities#build) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). * @param {string} appId * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} * @memberof BuildV1ApiInterface */ - getBuildsRaw(requestParameters: GetBuildsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>>; + getBuildsDeprecatedRaw(requestParameters: GetBuildsDeprecatedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>>; /** * Returns an array of [builds](https://hathora.dev/docs/concepts/hathora-entities#build) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). */ - getBuilds(appId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + getBuildsDeprecated(appId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Builds a game server artifact from a tarball you provide. Pass in the `buildId` generated from [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild). @@ -125,15 +129,16 @@ export interface BuildV1ApiInterface { * @param {number} buildId * @param {Blob} file * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} * @memberof BuildV1ApiInterface */ - runBuildRaw(requestParameters: RunBuildRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + runBuildDeprecatedRaw(requestParameters: RunBuildDeprecatedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Builds a game server artifact from a tarball you provide. Pass in the `buildId` generated from [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild). */ - runBuild(appId: string, buildId: number, file: Blob, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + runBuildDeprecated(appId: string, buildId: number, file: Blob, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; } @@ -145,13 +150,13 @@ export class BuildV1Api extends runtime.BaseAPI implements BuildV1ApiInterface { /** * Creates a new [build](https://hathora.dev/docs/concepts/hathora-entities#build). Responds with a `buildId` that you must pass to [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) to build the game server artifact. You can optionally pass in a `buildTag` to associate an external version with a build. */ - async createBuildRaw(requestParameters: CreateBuildRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async createBuildDeprecatedRaw(requestParameters: CreateBuildDeprecatedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling createBuild.'); + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling createBuildDeprecated.'); } if (requestParameters.createBuildParams === null || requestParameters.createBuildParams === undefined) { - throw new runtime.RequiredError('createBuildParams','Required parameter requestParameters.createBuildParams was null or undefined when calling createBuild.'); + throw new runtime.RequiredError('createBuildParams','Required parameter requestParameters.createBuildParams was null or undefined when calling createBuildDeprecated.'); } const queryParameters: any = {}; @@ -182,21 +187,21 @@ export class BuildV1Api extends runtime.BaseAPI implements BuildV1ApiInterface { /** * Creates a new [build](https://hathora.dev/docs/concepts/hathora-entities#build). Responds with a `buildId` that you must pass to [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) to build the game server artifact. You can optionally pass in a `buildTag` to associate an external version with a build. */ - async createBuild(appId: string, createBuildParams: CreateBuildParams, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.createBuildRaw({ appId: appId, createBuildParams: createBuildParams }, initOverrides); + async createBuildDeprecated(appId: string, createBuildParams: CreateBuildParams, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createBuildDeprecatedRaw({ appId: appId, createBuildParams: createBuildParams }, initOverrides); return await response.value(); } /** * Delete a [build](https://hathora.dev/docs/concepts/hathora-entities#build). All associated metadata is deleted. */ - async deleteBuildRaw(requestParameters: DeleteBuildRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async deleteBuildDeprecatedRaw(requestParameters: DeleteBuildDeprecatedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling deleteBuild.'); + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling deleteBuildDeprecated.'); } if (requestParameters.buildId === null || requestParameters.buildId === undefined) { - throw new runtime.RequiredError('buildId','Required parameter requestParameters.buildId was null or undefined when calling deleteBuild.'); + throw new runtime.RequiredError('buildId','Required parameter requestParameters.buildId was null or undefined when calling deleteBuildDeprecated.'); } const queryParameters: any = {}; @@ -224,20 +229,20 @@ export class BuildV1Api extends runtime.BaseAPI implements BuildV1ApiInterface { /** * Delete a [build](https://hathora.dev/docs/concepts/hathora-entities#build). All associated metadata is deleted. */ - async deleteBuild(appId: string, buildId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.deleteBuildRaw({ appId: appId, buildId: buildId }, initOverrides); + async deleteBuildDeprecated(appId: string, buildId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteBuildDeprecatedRaw({ appId: appId, buildId: buildId }, initOverrides); } /** * Get details for a [build](https://hathora.dev/docs/concepts/hathora-entities#build). */ - async getBuildInfoRaw(requestParameters: GetBuildInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getBuildInfoDeprecatedRaw(requestParameters: GetBuildInfoDeprecatedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getBuildInfo.'); + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getBuildInfoDeprecated.'); } if (requestParameters.buildId === null || requestParameters.buildId === undefined) { - throw new runtime.RequiredError('buildId','Required parameter requestParameters.buildId was null or undefined when calling getBuildInfo.'); + throw new runtime.RequiredError('buildId','Required parameter requestParameters.buildId was null or undefined when calling getBuildInfoDeprecated.'); } const queryParameters: any = {}; @@ -265,17 +270,17 @@ export class BuildV1Api extends runtime.BaseAPI implements BuildV1ApiInterface { /** * Get details for a [build](https://hathora.dev/docs/concepts/hathora-entities#build). */ - async getBuildInfo(appId: string, buildId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getBuildInfoRaw({ appId: appId, buildId: buildId }, initOverrides); + async getBuildInfoDeprecated(appId: string, buildId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getBuildInfoDeprecatedRaw({ appId: appId, buildId: buildId }, initOverrides); return await response.value(); } /** * Returns an array of [builds](https://hathora.dev/docs/concepts/hathora-entities#build) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). */ - async getBuildsRaw(requestParameters: GetBuildsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + async getBuildsDeprecatedRaw(requestParameters: GetBuildsDeprecatedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getBuilds.'); + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getBuildsDeprecated.'); } const queryParameters: any = {}; @@ -303,25 +308,25 @@ export class BuildV1Api extends runtime.BaseAPI implements BuildV1ApiInterface { /** * Returns an array of [builds](https://hathora.dev/docs/concepts/hathora-entities#build) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). */ - async getBuilds(appId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getBuildsRaw({ appId: appId }, initOverrides); + async getBuildsDeprecated(appId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.getBuildsDeprecatedRaw({ appId: appId }, initOverrides); return await response.value(); } /** * Builds a game server artifact from a tarball you provide. Pass in the `buildId` generated from [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild). */ - async runBuildRaw(requestParameters: RunBuildRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async runBuildDeprecatedRaw(requestParameters: RunBuildDeprecatedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling runBuild.'); + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling runBuildDeprecated.'); } if (requestParameters.buildId === null || requestParameters.buildId === undefined) { - throw new runtime.RequiredError('buildId','Required parameter requestParameters.buildId was null or undefined when calling runBuild.'); + throw new runtime.RequiredError('buildId','Required parameter requestParameters.buildId was null or undefined when calling runBuildDeprecated.'); } if (requestParameters.file === null || requestParameters.file === undefined) { - throw new runtime.RequiredError('file','Required parameter requestParameters.file was null or undefined when calling runBuild.'); + throw new runtime.RequiredError('file','Required parameter requestParameters.file was null or undefined when calling runBuildDeprecated.'); } const queryParameters: any = {}; @@ -374,8 +379,8 @@ export class BuildV1Api extends runtime.BaseAPI implements BuildV1ApiInterface { /** * Builds a game server artifact from a tarball you provide. Pass in the `buildId` generated from [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild). */ - async runBuild(appId: string, buildId: number, file: Blob, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.runBuildRaw({ appId: appId, buildId: buildId, file: file }, initOverrides); + async runBuildDeprecated(appId: string, buildId: number, file: Blob, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.runBuildDeprecatedRaw({ appId: appId, buildId: buildId, file: file }, initOverrides); return await response.value(); } diff --git a/typescript/src/apis/BuildV2Api.ts b/typescript/src/apis/BuildV2Api.ts new file mode 100644 index 0000000..c736459 --- /dev/null +++ b/typescript/src/apis/BuildV2Api.ts @@ -0,0 +1,378 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ApiError, + Build, + CreateBuildParams, +} from '../models'; +import { + ApiErrorFromJSON, + ApiErrorToJSON, + BuildFromJSON, + BuildToJSON, + CreateBuildParamsFromJSON, + CreateBuildParamsToJSON, +} from '../models'; + +export interface CreateBuildRequest { + appId: string; + createBuildParams: CreateBuildParams; +} + +export interface DeleteBuildRequest { + appId: string; + buildId: number; +} + +export interface GetBuildInfoRequest { + appId: string; + buildId: number; +} + +export interface GetBuildsRequest { + appId: string; +} + +export interface RunBuildRequest { + appId: string; + buildId: number; + file: Blob; +} + +/** + * BuildV2Api - interface + * + * @export + * @interface BuildV2ApiInterface + */ +export interface BuildV2ApiInterface { + /** + * Creates a new [build](https://hathora.dev/docs/concepts/hathora-entities#build). Responds with a `buildId` that you must pass to [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) to build the game server artifact. You can optionally pass in a `buildTag` to associate an external version with a build. + * @param {string} appId + * @param {CreateBuildParams} createBuildParams + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BuildV2ApiInterface + */ + createBuildRaw(requestParameters: CreateBuildRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Creates a new [build](https://hathora.dev/docs/concepts/hathora-entities#build). Responds with a `buildId` that you must pass to [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) to build the game server artifact. You can optionally pass in a `buildTag` to associate an external version with a build. + */ + createBuild(appId: string, createBuildParams: CreateBuildParams, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * Delete a [build](https://hathora.dev/docs/concepts/hathora-entities#build). All associated metadata is deleted. + * @param {string} appId + * @param {number} buildId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BuildV2ApiInterface + */ + deleteBuildRaw(requestParameters: DeleteBuildRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Delete a [build](https://hathora.dev/docs/concepts/hathora-entities#build). All associated metadata is deleted. + */ + deleteBuild(appId: string, buildId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * Get details for a [build](https://hathora.dev/docs/concepts/hathora-entities#build). + * @param {string} appId + * @param {number} buildId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BuildV2ApiInterface + */ + getBuildInfoRaw(requestParameters: GetBuildInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Get details for a [build](https://hathora.dev/docs/concepts/hathora-entities#build). + */ + getBuildInfo(appId: string, buildId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * Returns an array of [builds](https://hathora.dev/docs/concepts/hathora-entities#build) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + * @param {string} appId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BuildV2ApiInterface + */ + getBuildsRaw(requestParameters: GetBuildsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>>; + + /** + * Returns an array of [builds](https://hathora.dev/docs/concepts/hathora-entities#build) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + */ + getBuilds(appId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Builds a game server artifact from a tarball you provide. Pass in the `buildId` generated from [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild). + * @param {string} appId + * @param {number} buildId + * @param {Blob} file + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BuildV2ApiInterface + */ + runBuildRaw(requestParameters: RunBuildRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Builds a game server artifact from a tarball you provide. Pass in the `buildId` generated from [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild). + */ + runBuild(appId: string, buildId: number, file: Blob, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + +} + +/** + * + */ +export class BuildV2Api extends runtime.BaseAPI implements BuildV2ApiInterface { + + /** + * Creates a new [build](https://hathora.dev/docs/concepts/hathora-entities#build). Responds with a `buildId` that you must pass to [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) to build the game server artifact. You can optionally pass in a `buildTag` to associate an external version with a build. + */ + async createBuildRaw(requestParameters: CreateBuildRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling createBuild.'); + } + + if (requestParameters.createBuildParams === null || requestParameters.createBuildParams === undefined) { + throw new runtime.RequiredError('createBuildParams','Required parameter requestParameters.createBuildParams was null or undefined when calling createBuild.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("hathoraDevToken", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/builds/v2/{appId}/create`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: CreateBuildParamsToJSON(requestParameters.createBuildParams), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => BuildFromJSON(jsonValue)); + } + + /** + * Creates a new [build](https://hathora.dev/docs/concepts/hathora-entities#build). Responds with a `buildId` that you must pass to [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) to build the game server artifact. You can optionally pass in a `buildTag` to associate an external version with a build. + */ + async createBuild(appId: string, createBuildParams: CreateBuildParams, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createBuildRaw({ appId: appId, createBuildParams: createBuildParams }, initOverrides); + return await response.value(); + } + + /** + * Delete a [build](https://hathora.dev/docs/concepts/hathora-entities#build). All associated metadata is deleted. + */ + async deleteBuildRaw(requestParameters: DeleteBuildRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling deleteBuild.'); + } + + if (requestParameters.buildId === null || requestParameters.buildId === undefined) { + throw new runtime.RequiredError('buildId','Required parameter requestParameters.buildId was null or undefined when calling deleteBuild.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("hathoraDevToken", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/builds/v2/{appId}/delete/{buildId}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"buildId"}}`, encodeURIComponent(String(requestParameters.buildId))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Delete a [build](https://hathora.dev/docs/concepts/hathora-entities#build). All associated metadata is deleted. + */ + async deleteBuild(appId: string, buildId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteBuildRaw({ appId: appId, buildId: buildId }, initOverrides); + } + + /** + * Get details for a [build](https://hathora.dev/docs/concepts/hathora-entities#build). + */ + async getBuildInfoRaw(requestParameters: GetBuildInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getBuildInfo.'); + } + + if (requestParameters.buildId === null || requestParameters.buildId === undefined) { + throw new runtime.RequiredError('buildId','Required parameter requestParameters.buildId was null or undefined when calling getBuildInfo.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("hathoraDevToken", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/builds/v2/{appId}/info/{buildId}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"buildId"}}`, encodeURIComponent(String(requestParameters.buildId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => BuildFromJSON(jsonValue)); + } + + /** + * Get details for a [build](https://hathora.dev/docs/concepts/hathora-entities#build). + */ + async getBuildInfo(appId: string, buildId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getBuildInfoRaw({ appId: appId, buildId: buildId }, initOverrides); + return await response.value(); + } + + /** + * Returns an array of [builds](https://hathora.dev/docs/concepts/hathora-entities#build) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + */ + async getBuildsRaw(requestParameters: GetBuildsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getBuilds.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("hathoraDevToken", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/builds/v2/{appId}/list`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(BuildFromJSON)); + } + + /** + * Returns an array of [builds](https://hathora.dev/docs/concepts/hathora-entities#build) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + */ + async getBuilds(appId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.getBuildsRaw({ appId: appId }, initOverrides); + return await response.value(); + } + + /** + * Builds a game server artifact from a tarball you provide. Pass in the `buildId` generated from [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild). + */ + async runBuildRaw(requestParameters: RunBuildRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling runBuild.'); + } + + if (requestParameters.buildId === null || requestParameters.buildId === undefined) { + throw new runtime.RequiredError('buildId','Required parameter requestParameters.buildId was null or undefined when calling runBuild.'); + } + + if (requestParameters.file === null || requestParameters.file === undefined) { + throw new runtime.RequiredError('file','Required parameter requestParameters.file was null or undefined when calling runBuild.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("hathoraDevToken", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const consumes: runtime.Consume[] = [ + { contentType: 'multipart/form-data' }, + ]; + // @ts-ignore: canConsumeForm may be unused + const canConsumeForm = runtime.canConsumeForm(consumes); + + let formParams: { append(param: string, value: any): any }; + let useForm = false; + // use FormData to transmit files using content-type "multipart/form-data" + useForm = canConsumeForm; + if (useForm) { + formParams = new FormData(); + } else { + formParams = new URLSearchParams(); + } + + if (requestParameters.file !== undefined) { + formParams.append('file', requestParameters.file as any); + } + + const response = await this.request({ + path: `/builds/v2/{appId}/run/{buildId}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"buildId"}}`, encodeURIComponent(String(requestParameters.buildId))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: formParams, + }, initOverrides); + + return new runtime.BlobApiResponse(response); + } + + /** + * Builds a game server artifact from a tarball you provide. Pass in the `buildId` generated from [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild). + */ + async runBuild(appId: string, buildId: number, file: Blob, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.runBuildRaw({ appId: appId, buildId: buildId, file: file }, initOverrides); + return await response.value(); + } + +} diff --git a/typescript/src/apis/DeploymentV1Api.ts b/typescript/src/apis/DeploymentV1Api.ts index 40a7ab4..e2f03c5 100644 --- a/typescript/src/apis/DeploymentV1Api.ts +++ b/typescript/src/apis/DeploymentV1Api.ts @@ -28,22 +28,22 @@ import { DeploymentConfigToJSON, } from '../models'; -export interface CreateDeploymentRequest { +export interface CreateDeploymentDeprecatedRequest { appId: string; buildId: number; deploymentConfig: DeploymentConfig; } -export interface GetDeploymentInfoRequest { +export interface GetDeploymentInfoDeprecatedRequest { appId: string; deploymentId: number; } -export interface GetDeploymentsRequest { +export interface GetDeploymentsDeprecatedRequest { appId: string; } -export interface GetLatestDeploymentRequest { +export interface GetLatestDeploymentDeprecatedRequest { appId: string; } @@ -60,58 +60,62 @@ export interface DeploymentV1ApiInterface { * @param {number} buildId * @param {DeploymentConfig} deploymentConfig * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} * @memberof DeploymentV1ApiInterface */ - createDeploymentRaw(requestParameters: CreateDeploymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + createDeploymentDeprecatedRaw(requestParameters: CreateDeploymentDeprecatedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Create a new [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). Creating a new deployment means all new rooms created will use the latest deployment configuration, but existing games in progress will not be affected. */ - createDeployment(appId: string, buildId: number, deploymentConfig: DeploymentConfig, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + createDeploymentDeprecated(appId: string, buildId: number, deploymentConfig: DeploymentConfig, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Get details for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). * @param {string} appId * @param {number} deploymentId * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} * @memberof DeploymentV1ApiInterface */ - getDeploymentInfoRaw(requestParameters: GetDeploymentInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + getDeploymentInfoDeprecatedRaw(requestParameters: GetDeploymentInfoDeprecatedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Get details for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). */ - getDeploymentInfo(appId: string, deploymentId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + getDeploymentInfoDeprecated(appId: string, deploymentId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Returns an array of [deployments](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). * @param {string} appId * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} * @memberof DeploymentV1ApiInterface */ - getDeploymentsRaw(requestParameters: GetDeploymentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>>; + getDeploymentsDeprecatedRaw(requestParameters: GetDeploymentsDeprecatedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>>; /** * Returns an array of [deployments](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). */ - getDeployments(appId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + getDeploymentsDeprecated(appId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Get the latest [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). * @param {string} appId * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} * @memberof DeploymentV1ApiInterface */ - getLatestDeploymentRaw(requestParameters: GetLatestDeploymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + getLatestDeploymentDeprecatedRaw(requestParameters: GetLatestDeploymentDeprecatedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Get the latest [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). */ - getLatestDeployment(appId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + getLatestDeploymentDeprecated(appId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; } @@ -123,17 +127,17 @@ export class DeploymentV1Api extends runtime.BaseAPI implements DeploymentV1ApiI /** * Create a new [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). Creating a new deployment means all new rooms created will use the latest deployment configuration, but existing games in progress will not be affected. */ - async createDeploymentRaw(requestParameters: CreateDeploymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async createDeploymentDeprecatedRaw(requestParameters: CreateDeploymentDeprecatedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling createDeployment.'); + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling createDeploymentDeprecated.'); } if (requestParameters.buildId === null || requestParameters.buildId === undefined) { - throw new runtime.RequiredError('buildId','Required parameter requestParameters.buildId was null or undefined when calling createDeployment.'); + throw new runtime.RequiredError('buildId','Required parameter requestParameters.buildId was null or undefined when calling createDeploymentDeprecated.'); } if (requestParameters.deploymentConfig === null || requestParameters.deploymentConfig === undefined) { - throw new runtime.RequiredError('deploymentConfig','Required parameter requestParameters.deploymentConfig was null or undefined when calling createDeployment.'); + throw new runtime.RequiredError('deploymentConfig','Required parameter requestParameters.deploymentConfig was null or undefined when calling createDeploymentDeprecated.'); } const queryParameters: any = {}; @@ -164,21 +168,21 @@ export class DeploymentV1Api extends runtime.BaseAPI implements DeploymentV1ApiI /** * Create a new [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). Creating a new deployment means all new rooms created will use the latest deployment configuration, but existing games in progress will not be affected. */ - async createDeployment(appId: string, buildId: number, deploymentConfig: DeploymentConfig, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.createDeploymentRaw({ appId: appId, buildId: buildId, deploymentConfig: deploymentConfig }, initOverrides); + async createDeploymentDeprecated(appId: string, buildId: number, deploymentConfig: DeploymentConfig, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createDeploymentDeprecatedRaw({ appId: appId, buildId: buildId, deploymentConfig: deploymentConfig }, initOverrides); return await response.value(); } /** * Get details for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). */ - async getDeploymentInfoRaw(requestParameters: GetDeploymentInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getDeploymentInfoDeprecatedRaw(requestParameters: GetDeploymentInfoDeprecatedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getDeploymentInfo.'); + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getDeploymentInfoDeprecated.'); } if (requestParameters.deploymentId === null || requestParameters.deploymentId === undefined) { - throw new runtime.RequiredError('deploymentId','Required parameter requestParameters.deploymentId was null or undefined when calling getDeploymentInfo.'); + throw new runtime.RequiredError('deploymentId','Required parameter requestParameters.deploymentId was null or undefined when calling getDeploymentInfoDeprecated.'); } const queryParameters: any = {}; @@ -206,17 +210,17 @@ export class DeploymentV1Api extends runtime.BaseAPI implements DeploymentV1ApiI /** * Get details for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). */ - async getDeploymentInfo(appId: string, deploymentId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getDeploymentInfoRaw({ appId: appId, deploymentId: deploymentId }, initOverrides); + async getDeploymentInfoDeprecated(appId: string, deploymentId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getDeploymentInfoDeprecatedRaw({ appId: appId, deploymentId: deploymentId }, initOverrides); return await response.value(); } /** * Returns an array of [deployments](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). */ - async getDeploymentsRaw(requestParameters: GetDeploymentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + async getDeploymentsDeprecatedRaw(requestParameters: GetDeploymentsDeprecatedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getDeployments.'); + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getDeploymentsDeprecated.'); } const queryParameters: any = {}; @@ -244,17 +248,17 @@ export class DeploymentV1Api extends runtime.BaseAPI implements DeploymentV1ApiI /** * Returns an array of [deployments](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). */ - async getDeployments(appId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getDeploymentsRaw({ appId: appId }, initOverrides); + async getDeploymentsDeprecated(appId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.getDeploymentsDeprecatedRaw({ appId: appId }, initOverrides); return await response.value(); } /** * Get the latest [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). */ - async getLatestDeploymentRaw(requestParameters: GetLatestDeploymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getLatestDeploymentDeprecatedRaw(requestParameters: GetLatestDeploymentDeprecatedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getLatestDeployment.'); + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getLatestDeploymentDeprecated.'); } const queryParameters: any = {}; @@ -282,8 +286,8 @@ export class DeploymentV1Api extends runtime.BaseAPI implements DeploymentV1ApiI /** * Get the latest [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). */ - async getLatestDeployment(appId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getLatestDeploymentRaw({ appId: appId }, initOverrides); + async getLatestDeploymentDeprecated(appId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getLatestDeploymentDeprecatedRaw({ appId: appId }, initOverrides); return await response.value(); } diff --git a/typescript/src/apis/DeploymentV2Api.ts b/typescript/src/apis/DeploymentV2Api.ts new file mode 100644 index 0000000..5a8ac04 --- /dev/null +++ b/typescript/src/apis/DeploymentV2Api.ts @@ -0,0 +1,290 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ApiError, + DeploymentConfigV2, + DeploymentV2, +} from '../models'; +import { + ApiErrorFromJSON, + ApiErrorToJSON, + DeploymentConfigV2FromJSON, + DeploymentConfigV2ToJSON, + DeploymentV2FromJSON, + DeploymentV2ToJSON, +} from '../models'; + +export interface CreateDeploymentRequest { + appId: string; + buildId: number; + deploymentConfigV2: DeploymentConfigV2; +} + +export interface GetDeploymentInfoRequest { + appId: string; + deploymentId: number; +} + +export interface GetDeploymentsRequest { + appId: string; +} + +export interface GetLatestDeploymentRequest { + appId: string; +} + +/** + * DeploymentV2Api - interface + * + * @export + * @interface DeploymentV2ApiInterface + */ +export interface DeploymentV2ApiInterface { + /** + * Create a new [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). Creating a new deployment means all new rooms created will use the latest deployment configuration, but existing games in progress will not be affected. + * @param {string} appId + * @param {number} buildId + * @param {DeploymentConfigV2} deploymentConfigV2 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DeploymentV2ApiInterface + */ + createDeploymentRaw(requestParameters: CreateDeploymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Create a new [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). Creating a new deployment means all new rooms created will use the latest deployment configuration, but existing games in progress will not be affected. + */ + createDeployment(appId: string, buildId: number, deploymentConfigV2: DeploymentConfigV2, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * Get details for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). + * @param {string} appId + * @param {number} deploymentId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DeploymentV2ApiInterface + */ + getDeploymentInfoRaw(requestParameters: GetDeploymentInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Get details for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). + */ + getDeploymentInfo(appId: string, deploymentId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * Returns an array of [deployments](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + * @param {string} appId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DeploymentV2ApiInterface + */ + getDeploymentsRaw(requestParameters: GetDeploymentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>>; + + /** + * Returns an array of [deployments](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + */ + getDeployments(appId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Get the latest [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + * @param {string} appId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DeploymentV2ApiInterface + */ + getLatestDeploymentRaw(requestParameters: GetLatestDeploymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Get the latest [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + */ + getLatestDeployment(appId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + +} + +/** + * + */ +export class DeploymentV2Api extends runtime.BaseAPI implements DeploymentV2ApiInterface { + + /** + * Create a new [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). Creating a new deployment means all new rooms created will use the latest deployment configuration, but existing games in progress will not be affected. + */ + async createDeploymentRaw(requestParameters: CreateDeploymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling createDeployment.'); + } + + if (requestParameters.buildId === null || requestParameters.buildId === undefined) { + throw new runtime.RequiredError('buildId','Required parameter requestParameters.buildId was null or undefined when calling createDeployment.'); + } + + if (requestParameters.deploymentConfigV2 === null || requestParameters.deploymentConfigV2 === undefined) { + throw new runtime.RequiredError('deploymentConfigV2','Required parameter requestParameters.deploymentConfigV2 was null or undefined when calling createDeployment.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("hathoraDevToken", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/deployments/v2/{appId}/create/{buildId}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"buildId"}}`, encodeURIComponent(String(requestParameters.buildId))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: DeploymentConfigV2ToJSON(requestParameters.deploymentConfigV2), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DeploymentV2FromJSON(jsonValue)); + } + + /** + * Create a new [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). Creating a new deployment means all new rooms created will use the latest deployment configuration, but existing games in progress will not be affected. + */ + async createDeployment(appId: string, buildId: number, deploymentConfigV2: DeploymentConfigV2, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createDeploymentRaw({ appId: appId, buildId: buildId, deploymentConfigV2: deploymentConfigV2 }, initOverrides); + return await response.value(); + } + + /** + * Get details for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). + */ + async getDeploymentInfoRaw(requestParameters: GetDeploymentInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getDeploymentInfo.'); + } + + if (requestParameters.deploymentId === null || requestParameters.deploymentId === undefined) { + throw new runtime.RequiredError('deploymentId','Required parameter requestParameters.deploymentId was null or undefined when calling getDeploymentInfo.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("hathoraDevToken", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/deployments/v2/{appId}/info/{deploymentId}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"deploymentId"}}`, encodeURIComponent(String(requestParameters.deploymentId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DeploymentV2FromJSON(jsonValue)); + } + + /** + * Get details for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment). + */ + async getDeploymentInfo(appId: string, deploymentId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getDeploymentInfoRaw({ appId: appId, deploymentId: deploymentId }, initOverrides); + return await response.value(); + } + + /** + * Returns an array of [deployments](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + */ + async getDeploymentsRaw(requestParameters: GetDeploymentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getDeployments.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("hathoraDevToken", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/deployments/v2/{appId}/list`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(DeploymentV2FromJSON)); + } + + /** + * Returns an array of [deployments](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + */ + async getDeployments(appId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.getDeploymentsRaw({ appId: appId }, initOverrides); + return await response.value(); + } + + /** + * Get the latest [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + */ + async getLatestDeploymentRaw(requestParameters: GetLatestDeploymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getLatestDeployment.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("hathoraDevToken", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/deployments/v2/{appId}/latest`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DeploymentV2FromJSON(jsonValue)); + } + + /** + * Get the latest [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment) for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). + */ + async getLatestDeployment(appId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getLatestDeploymentRaw({ appId: appId }, initOverrides); + return await response.value(); + } + +} diff --git a/typescript/src/apis/DiscoveryV1Api.ts b/typescript/src/apis/DiscoveryV1Api.ts index 7f186a0..4222172 100644 --- a/typescript/src/apis/DiscoveryV1Api.ts +++ b/typescript/src/apis/DiscoveryV1Api.ts @@ -15,11 +15,11 @@ import * as runtime from '../runtime'; import type { - DiscoveryResponseInner, + PingEndpointsInner, } from '../models'; import { - DiscoveryResponseInnerFromJSON, - DiscoveryResponseInnerToJSON, + PingEndpointsInnerFromJSON, + PingEndpointsInnerToJSON, } from '../models'; /** @@ -30,17 +30,18 @@ import { */ export interface DiscoveryV1ApiInterface { /** - * Returns an array of all regions with a host and port that a client can directly ping. Open a websocket connection to `wss://:/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. + * Returns an array of V1 regions with a host and port that a client can directly ping. Open a websocket connection to `wss://:/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} * @memberof DiscoveryV1ApiInterface */ - getPingServiceEndpointsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>>; + getPingServiceEndpointsDeprecatedRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>>; /** - * Returns an array of all regions with a host and port that a client can directly ping. Open a websocket connection to `wss://:/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. + * Returns an array of V1 regions with a host and port that a client can directly ping. Open a websocket connection to `wss://:/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. */ - getPingServiceEndpoints(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + getPingServiceEndpointsDeprecated(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; } @@ -50,9 +51,9 @@ export interface DiscoveryV1ApiInterface { export class DiscoveryV1Api extends runtime.BaseAPI implements DiscoveryV1ApiInterface { /** - * Returns an array of all regions with a host and port that a client can directly ping. Open a websocket connection to `wss://:/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. + * Returns an array of V1 regions with a host and port that a client can directly ping. Open a websocket connection to `wss://:/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. */ - async getPingServiceEndpointsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + async getPingServiceEndpointsDeprecatedRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; @@ -64,14 +65,14 @@ export class DiscoveryV1Api extends runtime.BaseAPI implements DiscoveryV1ApiInt query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(DiscoveryResponseInnerFromJSON)); + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PingEndpointsInnerFromJSON)); } /** - * Returns an array of all regions with a host and port that a client can directly ping. Open a websocket connection to `wss://:/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. + * Returns an array of V1 regions with a host and port that a client can directly ping. Open a websocket connection to `wss://:/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. */ - async getPingServiceEndpoints(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getPingServiceEndpointsRaw(initOverrides); + async getPingServiceEndpointsDeprecated(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.getPingServiceEndpointsDeprecatedRaw(initOverrides); return await response.value(); } diff --git a/typescript/src/apis/DiscoveryV2Api.ts b/typescript/src/apis/DiscoveryV2Api.ts new file mode 100644 index 0000000..101b4b5 --- /dev/null +++ b/typescript/src/apis/DiscoveryV2Api.ts @@ -0,0 +1,78 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + PingEndpointsInner, +} from '../models'; +import { + PingEndpointsInnerFromJSON, + PingEndpointsInnerToJSON, +} from '../models'; + +/** + * DiscoveryV2Api - interface + * + * @export + * @interface DiscoveryV2ApiInterface + */ +export interface DiscoveryV2ApiInterface { + /** + * Returns an array of all regions with a host and port that a client can directly ping. Open a websocket connection to `wss://:/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DiscoveryV2ApiInterface + */ + getPingServiceEndpointsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>>; + + /** + * Returns an array of all regions with a host and port that a client can directly ping. Open a websocket connection to `wss://:/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. + */ + getPingServiceEndpoints(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + +} + +/** + * + */ +export class DiscoveryV2Api extends runtime.BaseAPI implements DiscoveryV2ApiInterface { + + /** + * Returns an array of all regions with a host and port that a client can directly ping. Open a websocket connection to `wss://:/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. + */ + async getPingServiceEndpointsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/discovery/v2/ping`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PingEndpointsInnerFromJSON)); + } + + /** + * Returns an array of all regions with a host and port that a client can directly ping. Open a websocket connection to `wss://:/ws` and send a packet. To calculate ping, measure the time it takes to get an echo packet back. + */ + async getPingServiceEndpoints(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.getPingServiceEndpointsRaw(initOverrides); + return await response.value(); + } + +} diff --git a/typescript/src/apis/LogV1Api.ts b/typescript/src/apis/LogV1Api.ts index 1ab5a87..abf5cd5 100644 --- a/typescript/src/apis/LogV1Api.ts +++ b/typescript/src/apis/LogV1Api.ts @@ -66,12 +66,12 @@ export interface LogV1ApiInterface { * @throws {RequiredError} * @memberof LogV1ApiInterface */ - downloadLogForProcessRaw(requestParameters: DownloadLogForProcessRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + downloadLogForProcessRaw(requestParameters: DownloadLogForProcessRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Download entire log file for a stopped process. */ - downloadLogForProcess(appId: string, processId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + downloadLogForProcess(appId: string, processId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Returns a stream of logs for an [application](https://hathora.dev/docs/concepts/hathora-entities#application) using `appId`. @@ -84,12 +84,12 @@ export interface LogV1ApiInterface { * @throws {RequiredError} * @memberof LogV1ApiInterface */ - getLogsForAppRaw(requestParameters: GetLogsForAppRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + getLogsForAppRaw(requestParameters: GetLogsForAppRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Returns a stream of logs for an [application](https://hathora.dev/docs/concepts/hathora-entities#application) using `appId`. */ - getLogsForApp(appId: string, follow?: boolean, tailLines?: number, region?: Region, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + getLogsForApp(appId: string, follow?: boolean, tailLines?: number, region?: Region, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Returns a stream of logs for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment) using `appId` and `deploymentId`. @@ -102,12 +102,12 @@ export interface LogV1ApiInterface { * @throws {RequiredError} * @memberof LogV1ApiInterface */ - getLogsForDeploymentRaw(requestParameters: GetLogsForDeploymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + getLogsForDeploymentRaw(requestParameters: GetLogsForDeploymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Returns a stream of logs for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment) using `appId` and `deploymentId`. */ - getLogsForDeployment(appId: string, deploymentId: number, follow?: boolean, tailLines?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + getLogsForDeployment(appId: string, deploymentId: number, follow?: boolean, tailLines?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Returns a stream of logs for a [process](https://hathora.dev/docs/concepts/hathora-entities#process) using `appId` and `processId`. @@ -119,12 +119,12 @@ export interface LogV1ApiInterface { * @throws {RequiredError} * @memberof LogV1ApiInterface */ - getLogsForProcessRaw(requestParameters: GetLogsForProcessRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + getLogsForProcessRaw(requestParameters: GetLogsForProcessRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Returns a stream of logs for a [process](https://hathora.dev/docs/concepts/hathora-entities#process) using `appId` and `processId`. */ - getLogsForProcess(appId: string, processId: string, follow?: boolean, tailLines?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + getLogsForProcess(appId: string, processId: string, follow?: boolean, tailLines?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; } @@ -136,7 +136,7 @@ export class LogV1Api extends runtime.BaseAPI implements LogV1ApiInterface { /** * Download entire log file for a stopped process. */ - async downloadLogForProcessRaw(requestParameters: DownloadLogForProcessRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async downloadLogForProcessRaw(requestParameters: DownloadLogForProcessRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters.appId === null || requestParameters.appId === undefined) { throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling downloadLogForProcess.'); } @@ -164,17 +164,13 @@ export class LogV1Api extends runtime.BaseAPI implements LogV1ApiInterface { query: queryParameters, }, initOverrides); - if (this.isJsonMime(response.headers.get('content-type'))) { - return new runtime.JSONApiResponse(response); - } else { - return new runtime.TextApiResponse(response) as any; - } + return new runtime.BlobApiResponse(response); } /** * Download entire log file for a stopped process. */ - async downloadLogForProcess(appId: string, processId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + async downloadLogForProcess(appId: string, processId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.downloadLogForProcessRaw({ appId: appId, processId: processId }, initOverrides); return await response.value(); } @@ -182,7 +178,7 @@ export class LogV1Api extends runtime.BaseAPI implements LogV1ApiInterface { /** * Returns a stream of logs for an [application](https://hathora.dev/docs/concepts/hathora-entities#application) using `appId`. */ - async getLogsForAppRaw(requestParameters: GetLogsForAppRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getLogsForAppRaw(requestParameters: GetLogsForAppRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters.appId === null || requestParameters.appId === undefined) { throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getLogsForApp.'); } @@ -218,17 +214,13 @@ export class LogV1Api extends runtime.BaseAPI implements LogV1ApiInterface { query: queryParameters, }, initOverrides); - if (this.isJsonMime(response.headers.get('content-type'))) { - return new runtime.JSONApiResponse(response); - } else { - return new runtime.TextApiResponse(response) as any; - } + return new runtime.BlobApiResponse(response); } /** * Returns a stream of logs for an [application](https://hathora.dev/docs/concepts/hathora-entities#application) using `appId`. */ - async getLogsForApp(appId: string, follow?: boolean, tailLines?: number, region?: Region, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + async getLogsForApp(appId: string, follow?: boolean, tailLines?: number, region?: Region, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.getLogsForAppRaw({ appId: appId, follow: follow, tailLines: tailLines, region: region }, initOverrides); return await response.value(); } @@ -236,7 +228,7 @@ export class LogV1Api extends runtime.BaseAPI implements LogV1ApiInterface { /** * Returns a stream of logs for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment) using `appId` and `deploymentId`. */ - async getLogsForDeploymentRaw(requestParameters: GetLogsForDeploymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getLogsForDeploymentRaw(requestParameters: GetLogsForDeploymentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters.appId === null || requestParameters.appId === undefined) { throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getLogsForDeployment.'); } @@ -272,17 +264,13 @@ export class LogV1Api extends runtime.BaseAPI implements LogV1ApiInterface { query: queryParameters, }, initOverrides); - if (this.isJsonMime(response.headers.get('content-type'))) { - return new runtime.JSONApiResponse(response); - } else { - return new runtime.TextApiResponse(response) as any; - } + return new runtime.BlobApiResponse(response); } /** * Returns a stream of logs for a [deployment](https://hathora.dev/docs/concepts/hathora-entities#deployment) using `appId` and `deploymentId`. */ - async getLogsForDeployment(appId: string, deploymentId: number, follow?: boolean, tailLines?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + async getLogsForDeployment(appId: string, deploymentId: number, follow?: boolean, tailLines?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.getLogsForDeploymentRaw({ appId: appId, deploymentId: deploymentId, follow: follow, tailLines: tailLines }, initOverrides); return await response.value(); } @@ -290,7 +278,7 @@ export class LogV1Api extends runtime.BaseAPI implements LogV1ApiInterface { /** * Returns a stream of logs for a [process](https://hathora.dev/docs/concepts/hathora-entities#process) using `appId` and `processId`. */ - async getLogsForProcessRaw(requestParameters: GetLogsForProcessRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getLogsForProcessRaw(requestParameters: GetLogsForProcessRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters.appId === null || requestParameters.appId === undefined) { throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getLogsForProcess.'); } @@ -326,17 +314,13 @@ export class LogV1Api extends runtime.BaseAPI implements LogV1ApiInterface { query: queryParameters, }, initOverrides); - if (this.isJsonMime(response.headers.get('content-type'))) { - return new runtime.JSONApiResponse(response); - } else { - return new runtime.TextApiResponse(response) as any; - } + return new runtime.BlobApiResponse(response); } /** * Returns a stream of logs for a [process](https://hathora.dev/docs/concepts/hathora-entities#process) using `appId` and `processId`. */ - async getLogsForProcess(appId: string, processId: string, follow?: boolean, tailLines?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + async getLogsForProcess(appId: string, processId: string, follow?: boolean, tailLines?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.getLogsForProcessRaw({ appId: appId, processId: processId, follow: follow, tailLines: tailLines }, initOverrides); return await response.value(); } diff --git a/typescript/src/apis/ManagementV1Api.ts b/typescript/src/apis/ManagementV1Api.ts index 36871a4..d0b297e 100644 --- a/typescript/src/apis/ManagementV1Api.ts +++ b/typescript/src/apis/ManagementV1Api.ts @@ -17,15 +17,15 @@ import * as runtime from '../runtime'; import type { ApiError, VerificationEmailRequest, - VerificationEmailResponse, + VerificationEmailSuccess, } from '../models'; import { ApiErrorFromJSON, ApiErrorToJSON, VerificationEmailRequestFromJSON, VerificationEmailRequestToJSON, - VerificationEmailResponseFromJSON, - VerificationEmailResponseToJSON, + VerificationEmailSuccessFromJSON, + VerificationEmailSuccessToJSON, } from '../models'; export interface SendVerificationEmailRequest { @@ -46,11 +46,11 @@ export interface ManagementV1ApiInterface { * @throws {RequiredError} * @memberof ManagementV1ApiInterface */ - sendVerificationEmailRaw(requestParameters: SendVerificationEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + sendVerificationEmailRaw(requestParameters: SendVerificationEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** */ - sendVerificationEmail(verificationEmailRequest: VerificationEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + sendVerificationEmail(verificationEmailRequest: VerificationEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; } @@ -61,7 +61,7 @@ export class ManagementV1Api extends runtime.BaseAPI implements ManagementV1ApiI /** */ - async sendVerificationEmailRaw(requestParameters: SendVerificationEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async sendVerificationEmailRaw(requestParameters: SendVerificationEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters.verificationEmailRequest === null || requestParameters.verificationEmailRequest === undefined) { throw new runtime.RequiredError('verificationEmailRequest','Required parameter requestParameters.verificationEmailRequest was null or undefined when calling sendVerificationEmail.'); } @@ -80,12 +80,12 @@ export class ManagementV1Api extends runtime.BaseAPI implements ManagementV1ApiI body: VerificationEmailRequestToJSON(requestParameters.verificationEmailRequest), }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => VerificationEmailResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => VerificationEmailSuccessFromJSON(jsonValue)); } /** */ - async sendVerificationEmail(verificationEmailRequest: VerificationEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + async sendVerificationEmail(verificationEmailRequest: VerificationEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.sendVerificationEmailRaw({ verificationEmailRequest: verificationEmailRequest }, initOverrides); return await response.value(); } diff --git a/typescript/src/apis/OrganizationsV1Api.ts b/typescript/src/apis/OrganizationsV1Api.ts new file mode 100644 index 0000000..e049ae6 --- /dev/null +++ b/typescript/src/apis/OrganizationsV1Api.ts @@ -0,0 +1,375 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ApiError, + CreateUserInvite, + OrgInvitesPage, + OrgPermission, + RescindUserInvite, +} from '../models'; +import { + ApiErrorFromJSON, + ApiErrorToJSON, + CreateUserInviteFromJSON, + CreateUserInviteToJSON, + OrgInvitesPageFromJSON, + OrgInvitesPageToJSON, + OrgPermissionFromJSON, + OrgPermissionToJSON, + RescindUserInviteFromJSON, + RescindUserInviteToJSON, +} from '../models'; + +export interface AcceptInviteRequest { + orgId: string; +} + +export interface GetOrgPendingInvitesRequest { + orgId: string; +} + +export interface InviteUserRequest { + orgId: string; + createUserInvite: CreateUserInvite; +} + +export interface RejectInviteRequest { + orgId: string; +} + +export interface RescindInviteRequest { + orgId: string; + rescindUserInvite: RescindUserInvite; +} + +/** + * OrganizationsV1Api - interface + * + * @export + * @interface OrganizationsV1ApiInterface + */ +export interface OrganizationsV1ApiInterface { + /** + * + * @param {string} orgId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OrganizationsV1ApiInterface + */ + acceptInviteRaw(requestParameters: AcceptInviteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + */ + acceptInvite(orgId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @param {string} orgId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OrganizationsV1ApiInterface + */ + getOrgPendingInvitesRaw(requestParameters: GetOrgPendingInvitesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + */ + getOrgPendingInvites(orgId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OrganizationsV1ApiInterface + */ + getUserPendingInvitesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + */ + getUserPendingInvites(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @param {string} orgId + * @param {CreateUserInvite} createUserInvite + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OrganizationsV1ApiInterface + */ + inviteUserRaw(requestParameters: InviteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + */ + inviteUser(orgId: string, createUserInvite: CreateUserInvite, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @param {string} orgId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OrganizationsV1ApiInterface + */ + rejectInviteRaw(requestParameters: RejectInviteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + */ + rejectInvite(orgId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * + * @param {string} orgId + * @param {RescindUserInvite} rescindUserInvite + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OrganizationsV1ApiInterface + */ + rescindInviteRaw(requestParameters: RescindInviteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + */ + rescindInvite(orgId: string, rescindUserInvite: RescindUserInvite, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + +} + +/** + * + */ +export class OrganizationsV1Api extends runtime.BaseAPI implements OrganizationsV1ApiInterface { + + /** + */ + async acceptInviteRaw(requestParameters: AcceptInviteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.orgId === null || requestParameters.orgId === undefined) { + throw new runtime.RequiredError('orgId','Required parameter requestParameters.orgId was null or undefined when calling acceptInvite.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("hathoraDevToken", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/orgs/v1/{orgId}/invites/accept`.replace(`{${"orgId"}}`, encodeURIComponent(String(requestParameters.orgId))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async acceptInvite(orgId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.acceptInviteRaw({ orgId: orgId }, initOverrides); + } + + /** + */ + async getOrgPendingInvitesRaw(requestParameters: GetOrgPendingInvitesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.orgId === null || requestParameters.orgId === undefined) { + throw new runtime.RequiredError('orgId','Required parameter requestParameters.orgId was null or undefined when calling getOrgPendingInvites.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("hathoraDevToken", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/orgs/v1/{orgId}/invites/pending`.replace(`{${"orgId"}}`, encodeURIComponent(String(requestParameters.orgId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OrgInvitesPageFromJSON(jsonValue)); + } + + /** + */ + async getOrgPendingInvites(orgId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getOrgPendingInvitesRaw({ orgId: orgId }, initOverrides); + return await response.value(); + } + + /** + */ + async getUserPendingInvitesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("hathoraDevToken", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/orgs/v1/user/invites/pending`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OrgInvitesPageFromJSON(jsonValue)); + } + + /** + */ + async getUserPendingInvites(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUserPendingInvitesRaw(initOverrides); + return await response.value(); + } + + /** + */ + async inviteUserRaw(requestParameters: InviteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.orgId === null || requestParameters.orgId === undefined) { + throw new runtime.RequiredError('orgId','Required parameter requestParameters.orgId was null or undefined when calling inviteUser.'); + } + + if (requestParameters.createUserInvite === null || requestParameters.createUserInvite === undefined) { + throw new runtime.RequiredError('createUserInvite','Required parameter requestParameters.createUserInvite was null or undefined when calling inviteUser.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("hathoraDevToken", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/orgs/v1/{orgId}/invites`.replace(`{${"orgId"}}`, encodeURIComponent(String(requestParameters.orgId))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: CreateUserInviteToJSON(requestParameters.createUserInvite), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OrgPermissionFromJSON(jsonValue)); + } + + /** + */ + async inviteUser(orgId: string, createUserInvite: CreateUserInvite, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.inviteUserRaw({ orgId: orgId, createUserInvite: createUserInvite }, initOverrides); + return await response.value(); + } + + /** + */ + async rejectInviteRaw(requestParameters: RejectInviteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.orgId === null || requestParameters.orgId === undefined) { + throw new runtime.RequiredError('orgId','Required parameter requestParameters.orgId was null or undefined when calling rejectInvite.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("hathoraDevToken", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/orgs/v1/{orgId}/invites/reject`.replace(`{${"orgId"}}`, encodeURIComponent(String(requestParameters.orgId))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async rejectInvite(orgId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rejectInviteRaw({ orgId: orgId }, initOverrides); + } + + /** + */ + async rescindInviteRaw(requestParameters: RescindInviteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.orgId === null || requestParameters.orgId === undefined) { + throw new runtime.RequiredError('orgId','Required parameter requestParameters.orgId was null or undefined when calling rescindInvite.'); + } + + if (requestParameters.rescindUserInvite === null || requestParameters.rescindUserInvite === undefined) { + throw new runtime.RequiredError('rescindUserInvite','Required parameter requestParameters.rescindUserInvite was null or undefined when calling rescindInvite.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("hathoraDevToken", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/orgs/v1/{orgId}/invites/rescind`.replace(`{${"orgId"}}`, encodeURIComponent(String(requestParameters.orgId))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: RescindUserInviteToJSON(requestParameters.rescindUserInvite), + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + */ + async rescindInvite(orgId: string, rescindUserInvite: RescindUserInvite, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.rescindInviteRaw({ orgId: orgId, rescindUserInvite: rescindUserInvite }, initOverrides); + } + +} diff --git a/typescript/src/apis/ProcessesV2Api.ts b/typescript/src/apis/ProcessesV2Api.ts index 4de591a..effeabc 100644 --- a/typescript/src/apis/ProcessesV2Api.ts +++ b/typescript/src/apis/ProcessesV2Api.ts @@ -31,6 +31,11 @@ import { RegionToJSON, } from '../models'; +export interface CreateProcessRequest { + appId: string; + region: Region; +} + export interface GetLatestProcessesRequest { appId: string; status?: Array; @@ -54,6 +59,21 @@ export interface StopProcessRequest { * @interface ProcessesV2ApiInterface */ export interface ProcessesV2ApiInterface { + /** + * Creates a [process](https://hathora.dev/docs/concepts/hathora-entities#process) without a room. Use this to pre-allocate processes ahead of time so that subsequent room assignment via [CreateRoom()](https://hathora.dev/api#tag/RoomV2/operation/CreateRoom) can be instant. + * @param {string} appId + * @param {Region} region + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProcessesV2ApiInterface + */ + createProcessRaw(requestParameters: CreateProcessRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Creates a [process](https://hathora.dev/docs/concepts/hathora-entities#process) without a room. Use this to pre-allocate processes ahead of time so that subsequent room assignment via [CreateRoom()](https://hathora.dev/api#tag/RoomV2/operation/CreateRoom) can be instant. + */ + createProcess(appId: string, region: Region, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + /** * Retrieve the 10 most recent [processes](https://hathora.dev/docs/concepts/hathora-entities#process) objects for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). Filter the array by optionally passing in a `status` or `region`. * @param {string} appId @@ -107,6 +127,48 @@ export interface ProcessesV2ApiInterface { */ export class ProcessesV2Api extends runtime.BaseAPI implements ProcessesV2ApiInterface { + /** + * Creates a [process](https://hathora.dev/docs/concepts/hathora-entities#process) without a room. Use this to pre-allocate processes ahead of time so that subsequent room assignment via [CreateRoom()](https://hathora.dev/api#tag/RoomV2/operation/CreateRoom) can be instant. + */ + async createProcessRaw(requestParameters: CreateProcessRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling createProcess.'); + } + + if (requestParameters.region === null || requestParameters.region === undefined) { + throw new runtime.RequiredError('region','Required parameter requestParameters.region was null or undefined when calling createProcess.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("hathoraDevToken", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const response = await this.request({ + path: `/processes/v2/{appId}/create/{region}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"region"}}`, encodeURIComponent(String(requestParameters.region))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ProcessV2FromJSON(jsonValue)); + } + + /** + * Creates a [process](https://hathora.dev/docs/concepts/hathora-entities#process) without a room. Use this to pre-allocate processes ahead of time so that subsequent room assignment via [CreateRoom()](https://hathora.dev/api#tag/RoomV2/operation/CreateRoom) can be instant. + */ + async createProcess(appId: string, region: Region, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createProcessRaw({ appId: appId, region: region }, initOverrides); + return await response.value(); + } + /** * Retrieve the 10 most recent [processes](https://hathora.dev/docs/concepts/hathora-entities#process) objects for an [application](https://hathora.dev/docs/concepts/hathora-entities#application). Filter the array by optionally passing in a `status` or `region`. */ diff --git a/typescript/src/apis/RoomV2Api.ts b/typescript/src/apis/RoomV2Api.ts index 3fb5f72..e7df103 100644 --- a/typescript/src/apis/RoomV2Api.ts +++ b/typescript/src/apis/RoomV2Api.ts @@ -18,9 +18,9 @@ import type { ApiError, ConnectionInfoV2, CreateRoomParams, - CreateRoomResponse, PickRoomExcludeKeyofRoomAllocations, Room, + RoomConnectionData, UpdateRoomConfigParams, } from '../models'; import { @@ -30,12 +30,12 @@ import { ConnectionInfoV2ToJSON, CreateRoomParamsFromJSON, CreateRoomParamsToJSON, - CreateRoomResponseFromJSON, - CreateRoomResponseToJSON, PickRoomExcludeKeyofRoomAllocationsFromJSON, PickRoomExcludeKeyofRoomAllocationsToJSON, RoomFromJSON, RoomToJSON, + RoomConnectionDataFromJSON, + RoomConnectionDataToJSON, UpdateRoomConfigParamsFromJSON, UpdateRoomConfigParamsToJSON, } from '../models'; @@ -71,7 +71,7 @@ export interface GetRoomInfoRequest { roomId: string; } -export interface SuspendRoomRequest { +export interface SuspendRoomV2DeprecatedRequest { appId: string; roomId: string; } @@ -98,12 +98,12 @@ export interface RoomV2ApiInterface { * @throws {RequiredError} * @memberof RoomV2ApiInterface */ - createRoomRaw(requestParameters: CreateRoomRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + createRoomRaw(requestParameters: CreateRoomRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Create a new [room](https://hathora.dev/docs/concepts/hathora-entities#room) for an existing [application](https://hathora.dev/docs/concepts/hathora-entities#application). Poll the [`GetConnectionInfo()`](https://hathora.dev/api#tag/RoomV2/operation/GetConnectionInfo) endpoint to get connection details for an active room. */ - createRoom(appId: string, createRoomParams: CreateRoomParams, roomId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + createRoom(appId: string, createRoomParams: CreateRoomParams, roomId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Destroy a [room](https://hathora.dev/docs/concepts/hathora-entities#room). All associated metadata is deleted. @@ -185,15 +185,16 @@ export interface RoomV2ApiInterface { * @param {string} appId * @param {string} roomId * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} * @memberof RoomV2ApiInterface */ - suspendRoomRaw(requestParameters: SuspendRoomRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + suspendRoomV2DeprecatedRaw(requestParameters: SuspendRoomV2DeprecatedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Suspend a [room](https://hathora.dev/docs/concepts/hathora-entities#room). The room is unallocated from the process but can be rescheduled later using the same `roomId`. */ - suspendRoom(appId: string, roomId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + suspendRoomV2Deprecated(appId: string, roomId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * @@ -220,7 +221,7 @@ export class RoomV2Api extends runtime.BaseAPI implements RoomV2ApiInterface { /** * Create a new [room](https://hathora.dev/docs/concepts/hathora-entities#room) for an existing [application](https://hathora.dev/docs/concepts/hathora-entities#application). Poll the [`GetConnectionInfo()`](https://hathora.dev/api#tag/RoomV2/operation/GetConnectionInfo) endpoint to get connection details for an active room. */ - async createRoomRaw(requestParameters: CreateRoomRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async createRoomRaw(requestParameters: CreateRoomRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters.appId === null || requestParameters.appId === undefined) { throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling createRoom.'); } @@ -255,13 +256,13 @@ export class RoomV2Api extends runtime.BaseAPI implements RoomV2ApiInterface { body: CreateRoomParamsToJSON(requestParameters.createRoomParams), }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => CreateRoomResponseFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => RoomConnectionDataFromJSON(jsonValue)); } /** * Create a new [room](https://hathora.dev/docs/concepts/hathora-entities#room) for an existing [application](https://hathora.dev/docs/concepts/hathora-entities#application). Poll the [`GetConnectionInfo()`](https://hathora.dev/api#tag/RoomV2/operation/GetConnectionInfo) endpoint to get connection details for an active room. */ - async createRoom(appId: string, createRoomParams: CreateRoomParams, roomId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + async createRoom(appId: string, createRoomParams: CreateRoomParams, roomId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.createRoomRaw({ appId: appId, createRoomParams: createRoomParams, roomId: roomId }, initOverrides); return await response.value(); } @@ -470,13 +471,13 @@ export class RoomV2Api extends runtime.BaseAPI implements RoomV2ApiInterface { /** * Suspend a [room](https://hathora.dev/docs/concepts/hathora-entities#room). The room is unallocated from the process but can be rescheduled later using the same `roomId`. */ - async suspendRoomRaw(requestParameters: SuspendRoomRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async suspendRoomV2DeprecatedRaw(requestParameters: SuspendRoomV2DeprecatedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling suspendRoom.'); + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling suspendRoomV2Deprecated.'); } if (requestParameters.roomId === null || requestParameters.roomId === undefined) { - throw new runtime.RequiredError('roomId','Required parameter requestParameters.roomId was null or undefined when calling suspendRoom.'); + throw new runtime.RequiredError('roomId','Required parameter requestParameters.roomId was null or undefined when calling suspendRoomV2Deprecated.'); } const queryParameters: any = {}; @@ -504,8 +505,8 @@ export class RoomV2Api extends runtime.BaseAPI implements RoomV2ApiInterface { /** * Suspend a [room](https://hathora.dev/docs/concepts/hathora-entities#room). The room is unallocated from the process but can be rescheduled later using the same `roomId`. */ - async suspendRoom(appId: string, roomId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.suspendRoomRaw({ appId: appId, roomId: roomId }, initOverrides); + async suspendRoomV2Deprecated(appId: string, roomId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.suspendRoomV2DeprecatedRaw({ appId: appId, roomId: roomId }, initOverrides); } /** diff --git a/typescript/src/apis/index.ts b/typescript/src/apis/index.ts index 1613850..348f7cc 100644 --- a/typescript/src/apis/index.ts +++ b/typescript/src/apis/index.ts @@ -4,8 +4,11 @@ export * from './AppV1Api'; export * from './AuthV1Api'; export * from './BillingV1Api'; export * from './BuildV1Api'; +export * from './BuildV2Api'; export * from './DeploymentV1Api'; +export * from './DeploymentV2Api'; export * from './DiscoveryV1Api'; +export * from './DiscoveryV2Api'; export * from './LobbyV1Api'; export * from './LobbyV2Api'; export * from './LobbyV3Api'; @@ -13,6 +16,7 @@ export * from './LogV1Api'; export * from './ManagementV1Api'; export * from './MetricsV1Api'; export * from './OrgTokensV1Api'; +export * from './OrganizationsV1Api'; export * from './ProcessesV1Api'; export * from './ProcessesV2Api'; export * from './RoomV1Api'; diff --git a/typescript/src/models/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.ts b/typescript/src/models/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.ts index 3dfac98..830d7c6 100644 --- a/typescript/src/models/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.ts +++ b/typescript/src/models/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.ts @@ -25,18 +25,12 @@ import { ContainerPortFromJSONTyped, ContainerPortToJSON, } from './ContainerPort'; -import type { DeploymentEnvInner } from './DeploymentEnvInner'; +import type { DeploymentV2EnvInner } from './DeploymentV2EnvInner'; import { - DeploymentEnvInnerFromJSON, - DeploymentEnvInnerFromJSONTyped, - DeploymentEnvInnerToJSON, -} from './DeploymentEnvInner'; -import type { PlanName } from './PlanName'; -import { - PlanNameFromJSON, - PlanNameFromJSONTyped, - PlanNameToJSON, -} from './PlanName'; + DeploymentV2EnvInnerFromJSON, + DeploymentV2EnvInnerFromJSONTyped, + DeploymentV2EnvInnerToJSON, +} from './DeploymentV2EnvInner'; /** * @@ -50,25 +44,19 @@ export interface ApplicationWithLatestDeploymentAndBuildAllOfDeployment { * @type {boolean} * @memberof ApplicationWithLatestDeploymentAndBuildAllOfDeployment */ - idleTimeoutEnabled?: boolean; + idleTimeoutEnabled: boolean; /** * The environment variable that our process will have access to at runtime. - * @type {Array} + * @type {Array} * @memberof ApplicationWithLatestDeploymentAndBuildAllOfDeployment */ - env: Array; + env: Array; /** * Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. * @type {number} * @memberof ApplicationWithLatestDeploymentAndBuildAllOfDeployment */ roomsPerProcess: number; - /** - * - * @type {PlanName} - * @memberof ApplicationWithLatestDeploymentAndBuildAllOfDeployment - */ - planName: PlanName; /** * Additional ports your server listens on. * @type {Array} @@ -81,20 +69,6 @@ export interface ApplicationWithLatestDeploymentAndBuildAllOfDeployment { * @memberof ApplicationWithLatestDeploymentAndBuildAllOfDeployment */ defaultContainerPort: ContainerPort; - /** - * - * @type {string} - * @memberof ApplicationWithLatestDeploymentAndBuildAllOfDeployment - * @deprecated - */ - transportType: ApplicationWithLatestDeploymentAndBuildAllOfDeploymentTransportTypeEnum; - /** - * - * @type {number} - * @memberof ApplicationWithLatestDeploymentAndBuildAllOfDeployment - * @deprecated - */ - containerPort: number; /** * When the deployment was created. * @type {Date} @@ -145,30 +119,16 @@ export interface ApplicationWithLatestDeploymentAndBuildAllOfDeployment { build: Build; } - -/** - * @export - */ -export const ApplicationWithLatestDeploymentAndBuildAllOfDeploymentTransportTypeEnum = { - Tcp: 'tcp', - Udp: 'udp', - Tls: 'tls' -} as const; -export type ApplicationWithLatestDeploymentAndBuildAllOfDeploymentTransportTypeEnum = typeof ApplicationWithLatestDeploymentAndBuildAllOfDeploymentTransportTypeEnum[keyof typeof ApplicationWithLatestDeploymentAndBuildAllOfDeploymentTransportTypeEnum]; - - /** * Check if a given object implements the ApplicationWithLatestDeploymentAndBuildAllOfDeployment interface. */ export function instanceOfApplicationWithLatestDeploymentAndBuildAllOfDeployment(value: object): boolean { let isInstance = true; + isInstance = isInstance && "idleTimeoutEnabled" in value; isInstance = isInstance && "env" in value; isInstance = isInstance && "roomsPerProcess" in value; - isInstance = isInstance && "planName" in value; isInstance = isInstance && "additionalContainerPorts" in value; isInstance = isInstance && "defaultContainerPort" in value; - isInstance = isInstance && "transportType" in value; - isInstance = isInstance && "containerPort" in value; isInstance = isInstance && "createdAt" in value; isInstance = isInstance && "createdBy" in value; isInstance = isInstance && "requestedMemoryMB" in value; @@ -191,14 +151,11 @@ export function ApplicationWithLatestDeploymentAndBuildAllOfDeploymentFromJSONTy } return { - 'idleTimeoutEnabled': !exists(json, 'idleTimeoutEnabled') ? undefined : json['idleTimeoutEnabled'], - 'env': ((json['env'] as Array).map(DeploymentEnvInnerFromJSON)), + 'idleTimeoutEnabled': json['idleTimeoutEnabled'], + 'env': ((json['env'] as Array).map(DeploymentV2EnvInnerFromJSON)), 'roomsPerProcess': json['roomsPerProcess'], - 'planName': PlanNameFromJSON(json['planName']), 'additionalContainerPorts': ((json['additionalContainerPorts'] as Array).map(ContainerPortFromJSON)), 'defaultContainerPort': ContainerPortFromJSON(json['defaultContainerPort']), - 'transportType': json['transportType'], - 'containerPort': json['containerPort'], 'createdAt': (new Date(json['createdAt'])), 'createdBy': json['createdBy'], 'requestedMemoryMB': json['requestedMemoryMB'], @@ -220,13 +177,10 @@ export function ApplicationWithLatestDeploymentAndBuildAllOfDeploymentToJSON(val return { 'idleTimeoutEnabled': value.idleTimeoutEnabled, - 'env': ((value.env as Array).map(DeploymentEnvInnerToJSON)), + 'env': ((value.env as Array).map(DeploymentV2EnvInnerToJSON)), 'roomsPerProcess': value.roomsPerProcess, - 'planName': PlanNameToJSON(value.planName), 'additionalContainerPorts': ((value.additionalContainerPorts as Array).map(ContainerPortToJSON)), 'defaultContainerPort': ContainerPortToJSON(value.defaultContainerPort), - 'transportType': value.transportType, - 'containerPort': value.containerPort, 'createdAt': (value.createdAt.toISOString()), 'createdBy': value.createdBy, 'requestedMemoryMB': value.requestedMemoryMB, diff --git a/typescript/src/models/Build.ts b/typescript/src/models/Build.ts index 5015435..0db1a62 100644 --- a/typescript/src/models/Build.ts +++ b/typescript/src/models/Build.ts @@ -33,7 +33,7 @@ import { */ export interface Build { /** - * Tag to associate an external version with a build. It is accessible via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV1/operation/GetBuildInfo). + * Tag to associate an external version with a build. It is accessible via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV2/operation/GetBuildInfo). * @type {string} * @memberof Build */ @@ -64,19 +64,19 @@ export interface Build { */ deletedAt: Date | null; /** - * When [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) finished executing. + * When [`RunBuild()`](https://hathora.dev/api#tag/BuildV2/operation/RunBuild) finished executing. * @type {Date} * @memberof Build */ finishedAt: Date | null; /** - * When [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild) is called. + * When [`RunBuild()`](https://hathora.dev/api#tag/BuildV2/operation/RunBuild) is called. * @type {Date} * @memberof Build */ startedAt: Date | null; /** - * When [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild) is called. + * When [`CreateBuild()`](https://hathora.dev/api#tag/BuildV2/operation/CreateBuild) is called. * @type {Date} * @memberof Build */ diff --git a/typescript/src/models/ConnectionInfoV2.ts b/typescript/src/models/ConnectionInfoV2.ts index 81ddd51..56b1d77 100644 --- a/typescript/src/models/ConnectionInfoV2.ts +++ b/typescript/src/models/ConnectionInfoV2.ts @@ -19,6 +19,12 @@ import { ExposedPortFromJSONTyped, ExposedPortToJSON, } from './ExposedPort'; +import type { RoomReadyStatus } from './RoomReadyStatus'; +import { + RoomReadyStatusFromJSON, + RoomReadyStatusFromJSONTyped, + RoomReadyStatusToJSON, +} from './RoomReadyStatus'; /** * Connection information for the default and additional ports. @@ -39,11 +45,11 @@ export interface ConnectionInfoV2 { */ exposedPort?: ExposedPort; /** - * `exposedPort` will only be available when the `status` of a room is "active". - * @type {string} + * + * @type {RoomReadyStatus} * @memberof ConnectionInfoV2 */ - status: ConnectionInfoV2StatusEnum; + status: RoomReadyStatus; /** * Unique identifier to a game session or match. Use the default system generated ID or overwrite it with your own. * Note: error will be returned if `roomId` is not globally unique. @@ -53,17 +59,6 @@ export interface ConnectionInfoV2 { roomId: string; } - -/** - * @export - */ -export const ConnectionInfoV2StatusEnum = { - Starting: 'starting', - Active: 'active' -} as const; -export type ConnectionInfoV2StatusEnum = typeof ConnectionInfoV2StatusEnum[keyof typeof ConnectionInfoV2StatusEnum]; - - /** * Check if a given object implements the ConnectionInfoV2 interface. */ @@ -88,7 +83,7 @@ export function ConnectionInfoV2FromJSONTyped(json: any, ignoreDiscriminator: bo 'additionalExposedPorts': ((json['additionalExposedPorts'] as Array).map(ExposedPortFromJSON)), 'exposedPort': !exists(json, 'exposedPort') ? undefined : ExposedPortFromJSON(json['exposedPort']), - 'status': json['status'], + 'status': RoomReadyStatusFromJSON(json['status']), 'roomId': json['roomId'], }; } @@ -104,7 +99,7 @@ export function ConnectionInfoV2ToJSON(value?: ConnectionInfoV2 | null): any { 'additionalExposedPorts': ((value.additionalExposedPorts as Array).map(ExposedPortToJSON)), 'exposedPort': ExposedPortToJSON(value.exposedPort), - 'status': value.status, + 'status': RoomReadyStatusToJSON(value.status), 'roomId': value.roomId, }; } diff --git a/typescript/src/models/CreateBuildParams.ts b/typescript/src/models/CreateBuildParams.ts index 095cf4f..fd65525 100644 --- a/typescript/src/models/CreateBuildParams.ts +++ b/typescript/src/models/CreateBuildParams.ts @@ -20,7 +20,7 @@ import { exists, mapValues } from '../runtime'; */ export interface CreateBuildParams { /** - * Tag to associate an external version with a build. It is accessible via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV1/operation/GetBuildInfo). + * Tag to associate an external version with a build. It is accessible via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV2/operation/GetBuildInfo). * @type {string} * @memberof CreateBuildParams */ diff --git a/typescript/src/models/CreateUserInvite.ts b/typescript/src/models/CreateUserInvite.ts new file mode 100644 index 0000000..c8ba230 --- /dev/null +++ b/typescript/src/models/CreateUserInvite.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface CreateUserInvite + */ +export interface CreateUserInvite { + /** + * + * @type {string} + * @memberof CreateUserInvite + */ + userEmail: string; +} + +/** + * Check if a given object implements the CreateUserInvite interface. + */ +export function instanceOfCreateUserInvite(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "userEmail" in value; + + return isInstance; +} + +export function CreateUserInviteFromJSON(json: any): CreateUserInvite { + return CreateUserInviteFromJSONTyped(json, false); +} + +export function CreateUserInviteFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateUserInvite { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'userEmail': json['userEmail'], + }; +} + +export function CreateUserInviteToJSON(value?: CreateUserInvite | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'userEmail': value.userEmail, + }; +} + diff --git a/typescript/src/models/Deployment.ts b/typescript/src/models/Deployment.ts index 9abd106..47dac24 100644 --- a/typescript/src/models/Deployment.ts +++ b/typescript/src/models/Deployment.ts @@ -19,12 +19,12 @@ import { ContainerPortFromJSONTyped, ContainerPortToJSON, } from './ContainerPort'; -import type { DeploymentEnvInner } from './DeploymentEnvInner'; +import type { DeploymentV2EnvInner } from './DeploymentV2EnvInner'; import { - DeploymentEnvInnerFromJSON, - DeploymentEnvInnerFromJSONTyped, - DeploymentEnvInnerToJSON, -} from './DeploymentEnvInner'; + DeploymentV2EnvInnerFromJSON, + DeploymentV2EnvInnerFromJSONTyped, + DeploymentV2EnvInnerToJSON, +} from './DeploymentV2EnvInner'; import type { PlanName } from './PlanName'; import { PlanNameFromJSON, @@ -47,10 +47,10 @@ export interface Deployment { idleTimeoutEnabled?: boolean; /** * The environment variable that our process will have access to at runtime. - * @type {Array} + * @type {Array} * @memberof Deployment */ - env: Array; + env: Array; /** * Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. * @type {number} @@ -179,7 +179,7 @@ export function DeploymentFromJSONTyped(json: any, ignoreDiscriminator: boolean) return { 'idleTimeoutEnabled': !exists(json, 'idleTimeoutEnabled') ? undefined : json['idleTimeoutEnabled'], - 'env': ((json['env'] as Array).map(DeploymentEnvInnerFromJSON)), + 'env': ((json['env'] as Array).map(DeploymentV2EnvInnerFromJSON)), 'roomsPerProcess': json['roomsPerProcess'], 'planName': PlanNameFromJSON(json['planName']), 'additionalContainerPorts': ((json['additionalContainerPorts'] as Array).map(ContainerPortFromJSON)), @@ -206,7 +206,7 @@ export function DeploymentToJSON(value?: Deployment | null): any { return { 'idleTimeoutEnabled': value.idleTimeoutEnabled, - 'env': ((value.env as Array).map(DeploymentEnvInnerToJSON)), + 'env': ((value.env as Array).map(DeploymentV2EnvInnerToJSON)), 'roomsPerProcess': value.roomsPerProcess, 'planName': PlanNameToJSON(value.planName), 'additionalContainerPorts': ((value.additionalContainerPorts as Array).map(ContainerPortToJSON)), diff --git a/typescript/src/models/DeploymentConfig.ts b/typescript/src/models/DeploymentConfig.ts index 711bf06..218315c 100644 --- a/typescript/src/models/DeploymentConfig.ts +++ b/typescript/src/models/DeploymentConfig.ts @@ -19,12 +19,12 @@ import { ContainerPortFromJSONTyped, ContainerPortToJSON, } from './ContainerPort'; -import type { DeploymentEnvInner } from './DeploymentEnvInner'; +import type { DeploymentV2EnvInner } from './DeploymentV2EnvInner'; import { - DeploymentEnvInnerFromJSON, - DeploymentEnvInnerFromJSONTyped, - DeploymentEnvInnerToJSON, -} from './DeploymentEnvInner'; + DeploymentV2EnvInnerFromJSON, + DeploymentV2EnvInnerFromJSONTyped, + DeploymentV2EnvInnerToJSON, +} from './DeploymentV2EnvInner'; import type { PlanName } from './PlanName'; import { PlanNameFromJSON, @@ -53,10 +53,10 @@ export interface DeploymentConfig { idleTimeoutEnabled?: boolean; /** * The environment variable that our process will have access to at runtime. - * @type {Array} + * @type {Array} * @memberof DeploymentConfig */ - env: Array; + env: Array; /** * Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. * @type {number} @@ -114,7 +114,7 @@ export function DeploymentConfigFromJSONTyped(json: any, ignoreDiscriminator: bo return { 'idleTimeoutEnabled': !exists(json, 'idleTimeoutEnabled') ? undefined : json['idleTimeoutEnabled'], - 'env': ((json['env'] as Array).map(DeploymentEnvInnerFromJSON)), + 'env': ((json['env'] as Array).map(DeploymentV2EnvInnerFromJSON)), 'roomsPerProcess': json['roomsPerProcess'], 'planName': PlanNameFromJSON(json['planName']), 'additionalContainerPorts': !exists(json, 'additionalContainerPorts') ? undefined : ((json['additionalContainerPorts'] as Array).map(ContainerPortFromJSON)), @@ -133,7 +133,7 @@ export function DeploymentConfigToJSON(value?: DeploymentConfig | null): any { return { 'idleTimeoutEnabled': value.idleTimeoutEnabled, - 'env': ((value.env as Array).map(DeploymentEnvInnerToJSON)), + 'env': ((value.env as Array).map(DeploymentV2EnvInnerToJSON)), 'roomsPerProcess': value.roomsPerProcess, 'planName': PlanNameToJSON(value.planName), 'additionalContainerPorts': value.additionalContainerPorts === undefined ? undefined : ((value.additionalContainerPorts as Array).map(ContainerPortToJSON)), diff --git a/typescript/src/models/DeploymentConfigV2.ts b/typescript/src/models/DeploymentConfigV2.ts new file mode 100644 index 0000000..87bb885 --- /dev/null +++ b/typescript/src/models/DeploymentConfigV2.ts @@ -0,0 +1,148 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ContainerPort } from './ContainerPort'; +import { + ContainerPortFromJSON, + ContainerPortFromJSONTyped, + ContainerPortToJSON, +} from './ContainerPort'; +import type { DeploymentV2EnvInner } from './DeploymentV2EnvInner'; +import { + DeploymentV2EnvInnerFromJSON, + DeploymentV2EnvInnerFromJSONTyped, + DeploymentV2EnvInnerToJSON, +} from './DeploymentV2EnvInner'; +import type { TransportType } from './TransportType'; +import { + TransportTypeFromJSON, + TransportTypeFromJSONTyped, + TransportTypeToJSON, +} from './TransportType'; + +/** + * + * @export + * @interface DeploymentConfigV2 + */ +export interface DeploymentConfigV2 { + /** + * Option to shut down processes that have had no new connections or rooms + * for five minutes. + * @type {boolean} + * @memberof DeploymentConfigV2 + */ + idleTimeoutEnabled: boolean; + /** + * The environment variable that our process will have access to at runtime. + * @type {Array} + * @memberof DeploymentConfigV2 + */ + env: Array; + /** + * Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. + * @type {number} + * @memberof DeploymentConfigV2 + */ + roomsPerProcess: number; + /** + * Additional ports your server listens on. + * @type {Array} + * @memberof DeploymentConfigV2 + */ + additionalContainerPorts?: Array; + /** + * + * @type {TransportType} + * @memberof DeploymentConfigV2 + */ + transportType: TransportType; + /** + * Default port the server listens on. + * @type {number} + * @memberof DeploymentConfigV2 + */ + containerPort: number; + /** + * The amount of memory allocated to your process. + * @type {number} + * @memberof DeploymentConfigV2 + */ + requestedMemoryMB: number; + /** + * The number of cores allocated to your process. + * @type {number} + * @memberof DeploymentConfigV2 + */ + requestedCPU: number; +} + +/** + * Check if a given object implements the DeploymentConfigV2 interface. + */ +export function instanceOfDeploymentConfigV2(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "idleTimeoutEnabled" in value; + isInstance = isInstance && "env" in value; + isInstance = isInstance && "roomsPerProcess" in value; + isInstance = isInstance && "transportType" in value; + isInstance = isInstance && "containerPort" in value; + isInstance = isInstance && "requestedMemoryMB" in value; + isInstance = isInstance && "requestedCPU" in value; + + return isInstance; +} + +export function DeploymentConfigV2FromJSON(json: any): DeploymentConfigV2 { + return DeploymentConfigV2FromJSONTyped(json, false); +} + +export function DeploymentConfigV2FromJSONTyped(json: any, ignoreDiscriminator: boolean): DeploymentConfigV2 { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'idleTimeoutEnabled': json['idleTimeoutEnabled'], + 'env': ((json['env'] as Array).map(DeploymentV2EnvInnerFromJSON)), + 'roomsPerProcess': json['roomsPerProcess'], + 'additionalContainerPorts': !exists(json, 'additionalContainerPorts') ? undefined : ((json['additionalContainerPorts'] as Array).map(ContainerPortFromJSON)), + 'transportType': TransportTypeFromJSON(json['transportType']), + 'containerPort': json['containerPort'], + 'requestedMemoryMB': json['requestedMemoryMB'], + 'requestedCPU': json['requestedCPU'], + }; +} + +export function DeploymentConfigV2ToJSON(value?: DeploymentConfigV2 | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'idleTimeoutEnabled': value.idleTimeoutEnabled, + 'env': ((value.env as Array).map(DeploymentV2EnvInnerToJSON)), + 'roomsPerProcess': value.roomsPerProcess, + 'additionalContainerPorts': value.additionalContainerPorts === undefined ? undefined : ((value.additionalContainerPorts as Array).map(ContainerPortToJSON)), + 'transportType': TransportTypeToJSON(value.transportType), + 'containerPort': value.containerPort, + 'requestedMemoryMB': value.requestedMemoryMB, + 'requestedCPU': value.requestedCPU, + }; +} + diff --git a/typescript/src/models/DeploymentV2.ts b/typescript/src/models/DeploymentV2.ts new file mode 100644 index 0000000..3b49ec3 --- /dev/null +++ b/typescript/src/models/DeploymentV2.ts @@ -0,0 +1,179 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ContainerPort } from './ContainerPort'; +import { + ContainerPortFromJSON, + ContainerPortFromJSONTyped, + ContainerPortToJSON, +} from './ContainerPort'; +import type { DeploymentV2EnvInner } from './DeploymentV2EnvInner'; +import { + DeploymentV2EnvInnerFromJSON, + DeploymentV2EnvInnerFromJSONTyped, + DeploymentV2EnvInnerToJSON, +} from './DeploymentV2EnvInner'; + +/** + * + * @export + * @interface DeploymentV2 + */ +export interface DeploymentV2 { + /** + * Option to shut down processes that have had no new connections or rooms + * for five minutes. + * @type {boolean} + * @memberof DeploymentV2 + */ + idleTimeoutEnabled: boolean; + /** + * The environment variable that our process will have access to at runtime. + * @type {Array} + * @memberof DeploymentV2 + */ + env: Array; + /** + * Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. + * @type {number} + * @memberof DeploymentV2 + */ + roomsPerProcess: number; + /** + * Additional ports your server listens on. + * @type {Array} + * @memberof DeploymentV2 + */ + additionalContainerPorts: Array; + /** + * + * @type {ContainerPort} + * @memberof DeploymentV2 + */ + defaultContainerPort: ContainerPort; + /** + * When the deployment was created. + * @type {Date} + * @memberof DeploymentV2 + */ + createdAt: Date; + /** + * UserId or email address for the user that created the deployment. + * @type {string} + * @memberof DeploymentV2 + */ + createdBy: string; + /** + * The amount of memory allocated to your process. + * @type {number} + * @memberof DeploymentV2 + */ + requestedMemoryMB: number; + /** + * The number of cores allocated to your process. + * @type {number} + * @memberof DeploymentV2 + */ + requestedCPU: number; + /** + * System generated id for a deployment. Increments by 1. + * @type {number} + * @memberof DeploymentV2 + */ + deploymentId: number; + /** + * System generated id for a build. Increments by 1. + * @type {number} + * @memberof DeploymentV2 + */ + buildId: number; + /** + * System generated unique identifier for an application. + * @type {string} + * @memberof DeploymentV2 + */ + appId: string; +} + +/** + * Check if a given object implements the DeploymentV2 interface. + */ +export function instanceOfDeploymentV2(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "idleTimeoutEnabled" in value; + isInstance = isInstance && "env" in value; + isInstance = isInstance && "roomsPerProcess" in value; + isInstance = isInstance && "additionalContainerPorts" in value; + isInstance = isInstance && "defaultContainerPort" in value; + isInstance = isInstance && "createdAt" in value; + isInstance = isInstance && "createdBy" in value; + isInstance = isInstance && "requestedMemoryMB" in value; + isInstance = isInstance && "requestedCPU" in value; + isInstance = isInstance && "deploymentId" in value; + isInstance = isInstance && "buildId" in value; + isInstance = isInstance && "appId" in value; + + return isInstance; +} + +export function DeploymentV2FromJSON(json: any): DeploymentV2 { + return DeploymentV2FromJSONTyped(json, false); +} + +export function DeploymentV2FromJSONTyped(json: any, ignoreDiscriminator: boolean): DeploymentV2 { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'idleTimeoutEnabled': json['idleTimeoutEnabled'], + 'env': ((json['env'] as Array).map(DeploymentV2EnvInnerFromJSON)), + 'roomsPerProcess': json['roomsPerProcess'], + 'additionalContainerPorts': ((json['additionalContainerPorts'] as Array).map(ContainerPortFromJSON)), + 'defaultContainerPort': ContainerPortFromJSON(json['defaultContainerPort']), + 'createdAt': (new Date(json['createdAt'])), + 'createdBy': json['createdBy'], + 'requestedMemoryMB': json['requestedMemoryMB'], + 'requestedCPU': json['requestedCPU'], + 'deploymentId': json['deploymentId'], + 'buildId': json['buildId'], + 'appId': json['appId'], + }; +} + +export function DeploymentV2ToJSON(value?: DeploymentV2 | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'idleTimeoutEnabled': value.idleTimeoutEnabled, + 'env': ((value.env as Array).map(DeploymentV2EnvInnerToJSON)), + 'roomsPerProcess': value.roomsPerProcess, + 'additionalContainerPorts': ((value.additionalContainerPorts as Array).map(ContainerPortToJSON)), + 'defaultContainerPort': ContainerPortToJSON(value.defaultContainerPort), + 'createdAt': (value.createdAt.toISOString()), + 'createdBy': value.createdBy, + 'requestedMemoryMB': value.requestedMemoryMB, + 'requestedCPU': value.requestedCPU, + 'deploymentId': value.deploymentId, + 'buildId': value.buildId, + 'appId': value.appId, + }; +} + diff --git a/typescript/src/models/DeploymentV2EnvInner.ts b/typescript/src/models/DeploymentV2EnvInner.ts new file mode 100644 index 0000000..5cff11e --- /dev/null +++ b/typescript/src/models/DeploymentV2EnvInner.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface DeploymentV2EnvInner + */ +export interface DeploymentV2EnvInner { + /** + * + * @type {string} + * @memberof DeploymentV2EnvInner + */ + value: string; + /** + * + * @type {string} + * @memberof DeploymentV2EnvInner + */ + name: string; +} + +/** + * Check if a given object implements the DeploymentV2EnvInner interface. + */ +export function instanceOfDeploymentV2EnvInner(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "value" in value; + isInstance = isInstance && "name" in value; + + return isInstance; +} + +export function DeploymentV2EnvInnerFromJSON(json: any): DeploymentV2EnvInner { + return DeploymentV2EnvInnerFromJSONTyped(json, false); +} + +export function DeploymentV2EnvInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeploymentV2EnvInner { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'value': json['value'], + 'name': json['name'], + }; +} + +export function DeploymentV2EnvInnerToJSON(value?: DeploymentV2EnvInner | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'value': value.value, + 'name': value.name, + }; +} + diff --git a/typescript/src/models/GoogleIdTokenObject.ts b/typescript/src/models/GoogleIdTokenObject.ts new file mode 100644 index 0000000..c009b19 --- /dev/null +++ b/typescript/src/models/GoogleIdTokenObject.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface GoogleIdTokenObject + */ +export interface GoogleIdTokenObject { + /** + * A Google-signed OIDC ID token representing a player's authenticated identity. Learn how to get an `idToken` [here](https://cloud.google.com/docs/authentication/get-id-token). + * @type {string} + * @memberof GoogleIdTokenObject + */ + idToken: string; +} + +/** + * Check if a given object implements the GoogleIdTokenObject interface. + */ +export function instanceOfGoogleIdTokenObject(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "idToken" in value; + + return isInstance; +} + +export function GoogleIdTokenObjectFromJSON(json: any): GoogleIdTokenObject { + return GoogleIdTokenObjectFromJSONTyped(json, false); +} + +export function GoogleIdTokenObjectFromJSONTyped(json: any, ignoreDiscriminator: boolean): GoogleIdTokenObject { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'idToken': json['idToken'], + }; +} + +export function GoogleIdTokenObjectToJSON(value?: GoogleIdTokenObject | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'idToken': value.idToken, + }; +} + diff --git a/typescript/src/models/InviteStatusAccepted.ts b/typescript/src/models/InviteStatusAccepted.ts new file mode 100644 index 0000000..d8e66ab --- /dev/null +++ b/typescript/src/models/InviteStatusAccepted.ts @@ -0,0 +1,85 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface InviteStatusAccepted + */ +export interface InviteStatusAccepted { + /** + * System generated unique identifier for a user. Not guaranteed to have a specific format. + * @type {string} + * @memberof InviteStatusAccepted + */ + userId: string; + /** + * + * @type {string} + * @memberof InviteStatusAccepted + */ + type: InviteStatusAcceptedTypeEnum; +} + + +/** + * @export + */ +export const InviteStatusAcceptedTypeEnum = { + Accepted: 'accepted' +} as const; +export type InviteStatusAcceptedTypeEnum = typeof InviteStatusAcceptedTypeEnum[keyof typeof InviteStatusAcceptedTypeEnum]; + + +/** + * Check if a given object implements the InviteStatusAccepted interface. + */ +export function instanceOfInviteStatusAccepted(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "userId" in value; + isInstance = isInstance && "type" in value; + + return isInstance; +} + +export function InviteStatusAcceptedFromJSON(json: any): InviteStatusAccepted { + return InviteStatusAcceptedFromJSONTyped(json, false); +} + +export function InviteStatusAcceptedFromJSONTyped(json: any, ignoreDiscriminator: boolean): InviteStatusAccepted { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'userId': json['userId'], + 'type': json['type'], + }; +} + +export function InviteStatusAcceptedToJSON(value?: InviteStatusAccepted | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'userId': value.userId, + 'type': value.type, + }; +} + diff --git a/typescript/src/models/InviteStatusPending.ts b/typescript/src/models/InviteStatusPending.ts new file mode 100644 index 0000000..d5d90ce --- /dev/null +++ b/typescript/src/models/InviteStatusPending.ts @@ -0,0 +1,76 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface InviteStatusPending + */ +export interface InviteStatusPending { + /** + * + * @type {string} + * @memberof InviteStatusPending + */ + type: InviteStatusPendingTypeEnum; +} + + +/** + * @export + */ +export const InviteStatusPendingTypeEnum = { + Pending: 'pending' +} as const; +export type InviteStatusPendingTypeEnum = typeof InviteStatusPendingTypeEnum[keyof typeof InviteStatusPendingTypeEnum]; + + +/** + * Check if a given object implements the InviteStatusPending interface. + */ +export function instanceOfInviteStatusPending(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "type" in value; + + return isInstance; +} + +export function InviteStatusPendingFromJSON(json: any): InviteStatusPending { + return InviteStatusPendingFromJSONTyped(json, false); +} + +export function InviteStatusPendingFromJSONTyped(json: any, ignoreDiscriminator: boolean): InviteStatusPending { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + }; +} + +export function InviteStatusPendingToJSON(value?: InviteStatusPending | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + }; +} + diff --git a/typescript/src/models/InviteStatusRejected.ts b/typescript/src/models/InviteStatusRejected.ts new file mode 100644 index 0000000..7189e7f --- /dev/null +++ b/typescript/src/models/InviteStatusRejected.ts @@ -0,0 +1,85 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface InviteStatusRejected + */ +export interface InviteStatusRejected { + /** + * System generated unique identifier for a user. Not guaranteed to have a specific format. + * @type {string} + * @memberof InviteStatusRejected + */ + userId: string; + /** + * + * @type {string} + * @memberof InviteStatusRejected + */ + type: InviteStatusRejectedTypeEnum; +} + + +/** + * @export + */ +export const InviteStatusRejectedTypeEnum = { + Rejected: 'rejected' +} as const; +export type InviteStatusRejectedTypeEnum = typeof InviteStatusRejectedTypeEnum[keyof typeof InviteStatusRejectedTypeEnum]; + + +/** + * Check if a given object implements the InviteStatusRejected interface. + */ +export function instanceOfInviteStatusRejected(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "userId" in value; + isInstance = isInstance && "type" in value; + + return isInstance; +} + +export function InviteStatusRejectedFromJSON(json: any): InviteStatusRejected { + return InviteStatusRejectedFromJSONTyped(json, false); +} + +export function InviteStatusRejectedFromJSONTyped(json: any, ignoreDiscriminator: boolean): InviteStatusRejected { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'userId': json['userId'], + 'type': json['type'], + }; +} + +export function InviteStatusRejectedToJSON(value?: InviteStatusRejected | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'userId': value.userId, + 'type': value.type, + }; +} + diff --git a/typescript/src/models/InviteStatusRescinded.ts b/typescript/src/models/InviteStatusRescinded.ts new file mode 100644 index 0000000..d23b1c2 --- /dev/null +++ b/typescript/src/models/InviteStatusRescinded.ts @@ -0,0 +1,93 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface InviteStatusRescinded + */ +export interface InviteStatusRescinded { + /** + * System generated unique identifier for a user. Not guaranteed to have a specific format. + * @type {string} + * @memberof InviteStatusRescinded + */ + rescindedBy: string; + /** + * System generated unique identifier for a user. Not guaranteed to have a specific format. + * @type {string} + * @memberof InviteStatusRescinded + */ + userId?: string; + /** + * + * @type {string} + * @memberof InviteStatusRescinded + */ + type: InviteStatusRescindedTypeEnum; +} + + +/** + * @export + */ +export const InviteStatusRescindedTypeEnum = { + Rescinded: 'rescinded' +} as const; +export type InviteStatusRescindedTypeEnum = typeof InviteStatusRescindedTypeEnum[keyof typeof InviteStatusRescindedTypeEnum]; + + +/** + * Check if a given object implements the InviteStatusRescinded interface. + */ +export function instanceOfInviteStatusRescinded(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "rescindedBy" in value; + isInstance = isInstance && "type" in value; + + return isInstance; +} + +export function InviteStatusRescindedFromJSON(json: any): InviteStatusRescinded { + return InviteStatusRescindedFromJSONTyped(json, false); +} + +export function InviteStatusRescindedFromJSONTyped(json: any, ignoreDiscriminator: boolean): InviteStatusRescinded { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'rescindedBy': json['rescindedBy'], + 'userId': !exists(json, 'userId') ? undefined : json['userId'], + 'type': json['type'], + }; +} + +export function InviteStatusRescindedToJSON(value?: InviteStatusRescinded | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'rescindedBy': value.rescindedBy, + 'userId': value.userId, + 'type': value.type, + }; +} + diff --git a/typescript/src/models/Lobby.ts b/typescript/src/models/Lobby.ts index b65b1d4..74ab175 100644 --- a/typescript/src/models/Lobby.ts +++ b/typescript/src/models/Lobby.ts @@ -43,7 +43,7 @@ export interface Lobby { * @type {object} * @memberof Lobby */ - state?: object; + state?: object | null; /** * User input to initialize the game state. Object must be smaller than 64KB. * @type {object} diff --git a/typescript/src/models/NewUserInfo.ts b/typescript/src/models/NewUserInfo.ts new file mode 100644 index 0000000..7b9081b --- /dev/null +++ b/typescript/src/models/NewUserInfo.ts @@ -0,0 +1,75 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface NewUserInfo + */ +export interface NewUserInfo { + /** + * + * @type {string} + * @memberof NewUserInfo + */ + email: string; + /** + * + * @type {string} + * @memberof NewUserInfo + */ + userId: string; +} + +/** + * Check if a given object implements the NewUserInfo interface. + */ +export function instanceOfNewUserInfo(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "email" in value; + isInstance = isInstance && "userId" in value; + + return isInstance; +} + +export function NewUserInfoFromJSON(json: any): NewUserInfo { + return NewUserInfoFromJSONTyped(json, false); +} + +export function NewUserInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): NewUserInfo { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'email': json['email'], + 'userId': json['user_id'], + }; +} + +export function NewUserInfoToJSON(value?: NewUserInfo | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'email': value.email, + 'user_id': value.userId, + }; +} + diff --git a/typescript/src/models/NicknameObject.ts b/typescript/src/models/NicknameObject.ts new file mode 100644 index 0000000..74f96f6 --- /dev/null +++ b/typescript/src/models/NicknameObject.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface NicknameObject + */ +export interface NicknameObject { + /** + * An alias to represent a player. + * @type {string} + * @memberof NicknameObject + */ + nickname: string; +} + +/** + * Check if a given object implements the NicknameObject interface. + */ +export function instanceOfNicknameObject(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "nickname" in value; + + return isInstance; +} + +export function NicknameObjectFromJSON(json: any): NicknameObject { + return NicknameObjectFromJSONTyped(json, false); +} + +export function NicknameObjectFromJSONTyped(json: any, ignoreDiscriminator: boolean): NicknameObject { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'nickname': json['nickname'], + }; +} + +export function NicknameObjectToJSON(value?: NicknameObject | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'nickname': value.nickname, + }; +} + diff --git a/typescript/src/models/OrgInvitesPage.ts b/typescript/src/models/OrgInvitesPage.ts new file mode 100644 index 0000000..4f837d9 --- /dev/null +++ b/typescript/src/models/OrgInvitesPage.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { OrgPermission } from './OrgPermission'; +import { + OrgPermissionFromJSON, + OrgPermissionFromJSONTyped, + OrgPermissionToJSON, +} from './OrgPermission'; + +/** + * + * @export + * @interface OrgInvitesPage + */ +export interface OrgInvitesPage { + /** + * + * @type {Array} + * @memberof OrgInvitesPage + */ + invites: Array; +} + +/** + * Check if a given object implements the OrgInvitesPage interface. + */ +export function instanceOfOrgInvitesPage(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "invites" in value; + + return isInstance; +} + +export function OrgInvitesPageFromJSON(json: any): OrgInvitesPage { + return OrgInvitesPageFromJSONTyped(json, false); +} + +export function OrgInvitesPageFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrgInvitesPage { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'invites': ((json['invites'] as Array).map(OrgPermissionFromJSON)), + }; +} + +export function OrgInvitesPageToJSON(value?: OrgInvitesPage | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'invites': ((value.invites as Array).map(OrgPermissionToJSON)), + }; +} + diff --git a/typescript/src/models/OrgPermission.ts b/typescript/src/models/OrgPermission.ts new file mode 100644 index 0000000..94492d6 --- /dev/null +++ b/typescript/src/models/OrgPermission.ts @@ -0,0 +1,118 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { OrganizationInviteStatus } from './OrganizationInviteStatus'; +import { + OrganizationInviteStatusFromJSON, + OrganizationInviteStatusFromJSONTyped, + OrganizationInviteStatusToJSON, +} from './OrganizationInviteStatus'; + +/** + * + * @export + * @interface OrgPermission + */ +export interface OrgPermission { + /** + * + * @type {Date} + * @memberof OrgPermission + */ + updatedAt: Date; + /** + * + * @type {Date} + * @memberof OrgPermission + */ + createdAt: Date; + /** + * + * @type {OrganizationInviteStatus} + * @memberof OrgPermission + */ + status: OrganizationInviteStatus; + /** + * + * @type {string} + * @memberof OrgPermission + */ + userEmail: string; + /** + * System generated unique identifier for a user. Not guaranteed to have a specific format. + * @type {string} + * @memberof OrgPermission + */ + invitedBy: string; + /** + * System generated unique identifier for an organization. Not guaranteed to have a specific format. + * @type {string} + * @memberof OrgPermission + */ + orgId: string; +} + +/** + * Check if a given object implements the OrgPermission interface. + */ +export function instanceOfOrgPermission(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "updatedAt" in value; + isInstance = isInstance && "createdAt" in value; + isInstance = isInstance && "status" in value; + isInstance = isInstance && "userEmail" in value; + isInstance = isInstance && "invitedBy" in value; + isInstance = isInstance && "orgId" in value; + + return isInstance; +} + +export function OrgPermissionFromJSON(json: any): OrgPermission { + return OrgPermissionFromJSONTyped(json, false); +} + +export function OrgPermissionFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrgPermission { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'updatedAt': (new Date(json['updatedAt'])), + 'createdAt': (new Date(json['createdAt'])), + 'status': OrganizationInviteStatusFromJSON(json['status']), + 'userEmail': json['userEmail'], + 'invitedBy': json['invitedBy'], + 'orgId': json['orgId'], + }; +} + +export function OrgPermissionToJSON(value?: OrgPermission | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'updatedAt': (value.updatedAt.toISOString()), + 'createdAt': (value.createdAt.toISOString()), + 'status': OrganizationInviteStatusToJSON(value.status), + 'userEmail': value.userEmail, + 'invitedBy': value.invitedBy, + 'orgId': value.orgId, + }; +} + diff --git a/typescript/src/models/OrganizationInviteStatus.ts b/typescript/src/models/OrganizationInviteStatus.ts new file mode 100644 index 0000000..4a1c5b2 --- /dev/null +++ b/typescript/src/models/OrganizationInviteStatus.ts @@ -0,0 +1,119 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { InviteStatusAccepted } from './InviteStatusAccepted'; +import { + InviteStatusAcceptedFromJSON, + InviteStatusAcceptedFromJSONTyped, + InviteStatusAcceptedToJSON, +} from './InviteStatusAccepted'; +import type { InviteStatusPending } from './InviteStatusPending'; +import { + InviteStatusPendingFromJSON, + InviteStatusPendingFromJSONTyped, + InviteStatusPendingToJSON, +} from './InviteStatusPending'; +import type { InviteStatusRejected } from './InviteStatusRejected'; +import { + InviteStatusRejectedFromJSON, + InviteStatusRejectedFromJSONTyped, + InviteStatusRejectedToJSON, +} from './InviteStatusRejected'; +import type { InviteStatusRescinded } from './InviteStatusRescinded'; +import { + InviteStatusRescindedFromJSON, + InviteStatusRescindedFromJSONTyped, + InviteStatusRescindedToJSON, +} from './InviteStatusRescinded'; + +/** + * + * @export + * @interface OrganizationInviteStatus + */ +export interface OrganizationInviteStatus { + /** + * + * @type {string} + * @memberof OrganizationInviteStatus + */ + type: OrganizationInviteStatusTypeEnum; + /** + * System generated unique identifier for a user. Not guaranteed to have a specific format. + * @type {string} + * @memberof OrganizationInviteStatus + */ + userId: string; + /** + * System generated unique identifier for a user. Not guaranteed to have a specific format. + * @type {string} + * @memberof OrganizationInviteStatus + */ + rescindedBy: string; +} + + +/** + * @export + */ +export const OrganizationInviteStatusTypeEnum = { + Rescinded: 'rescinded' +} as const; +export type OrganizationInviteStatusTypeEnum = typeof OrganizationInviteStatusTypeEnum[keyof typeof OrganizationInviteStatusTypeEnum]; + + +/** + * Check if a given object implements the OrganizationInviteStatus interface. + */ +export function instanceOfOrganizationInviteStatus(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "type" in value; + isInstance = isInstance && "userId" in value; + isInstance = isInstance && "rescindedBy" in value; + + return isInstance; +} + +export function OrganizationInviteStatusFromJSON(json: any): OrganizationInviteStatus { + return OrganizationInviteStatusFromJSONTyped(json, false); +} + +export function OrganizationInviteStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrganizationInviteStatus { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'type': json['type'], + 'userId': json['userId'], + 'rescindedBy': json['rescindedBy'], + }; +} + +export function OrganizationInviteStatusToJSON(value?: OrganizationInviteStatus | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'type': value.type, + 'userId': value.userId, + 'rescindedBy': value.rescindedBy, + }; +} + diff --git a/typescript/src/models/PingEndpointsInner.ts b/typescript/src/models/PingEndpointsInner.ts new file mode 100644 index 0000000..027367d --- /dev/null +++ b/typescript/src/models/PingEndpointsInner.ts @@ -0,0 +1,91 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { Region } from './Region'; +import { + RegionFromJSON, + RegionFromJSONTyped, + RegionToJSON, +} from './Region'; + +/** + * + * @export + * @interface PingEndpointsInner + */ +export interface PingEndpointsInner { + /** + * + * @type {number} + * @memberof PingEndpointsInner + */ + port: number; + /** + * + * @type {string} + * @memberof PingEndpointsInner + */ + host: string; + /** + * + * @type {Region} + * @memberof PingEndpointsInner + */ + region: Region; +} + +/** + * Check if a given object implements the PingEndpointsInner interface. + */ +export function instanceOfPingEndpointsInner(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "port" in value; + isInstance = isInstance && "host" in value; + isInstance = isInstance && "region" in value; + + return isInstance; +} + +export function PingEndpointsInnerFromJSON(json: any): PingEndpointsInner { + return PingEndpointsInnerFromJSONTyped(json, false); +} + +export function PingEndpointsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): PingEndpointsInner { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'port': json['port'], + 'host': json['host'], + 'region': RegionFromJSON(json['region']), + }; +} + +export function PingEndpointsInnerToJSON(value?: PingEndpointsInner | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'port': value.port, + 'host': value.host, + 'region': RegionToJSON(value.region), + }; +} + diff --git a/typescript/src/models/PlayerTokenObject.ts b/typescript/src/models/PlayerTokenObject.ts new file mode 100644 index 0000000..0cc8391 --- /dev/null +++ b/typescript/src/models/PlayerTokenObject.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface PlayerTokenObject + */ +export interface PlayerTokenObject { + /** + * A unique Hathora-signed JWT player token. + * @type {string} + * @memberof PlayerTokenObject + */ + token: string; +} + +/** + * Check if a given object implements the PlayerTokenObject interface. + */ +export function instanceOfPlayerTokenObject(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "token" in value; + + return isInstance; +} + +export function PlayerTokenObjectFromJSON(json: any): PlayerTokenObject { + return PlayerTokenObjectFromJSONTyped(json, false); +} + +export function PlayerTokenObjectFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlayerTokenObject { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'token': json['token'], + }; +} + +export function PlayerTokenObjectToJSON(value?: PlayerTokenObject | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'token': value.token, + }; +} + diff --git a/typescript/src/models/Region.ts b/typescript/src/models/Region.ts index d8ca623..70c4c5f 100644 --- a/typescript/src/models/Region.ts +++ b/typescript/src/models/Region.ts @@ -28,7 +28,8 @@ export const Region = { Singapore: 'Singapore', Tokyo: 'Tokyo', Sydney: 'Sydney', - SaoPaulo: 'Sao_Paulo' + SaoPaulo: 'Sao_Paulo', + Dallas: 'Dallas' } as const; export type Region = typeof Region[keyof typeof Region]; diff --git a/typescript/src/models/RescindUserInvite.ts b/typescript/src/models/RescindUserInvite.ts new file mode 100644 index 0000000..1f35ab2 --- /dev/null +++ b/typescript/src/models/RescindUserInvite.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface RescindUserInvite + */ +export interface RescindUserInvite { + /** + * + * @type {string} + * @memberof RescindUserInvite + */ + userEmail: string; +} + +/** + * Check if a given object implements the RescindUserInvite interface. + */ +export function instanceOfRescindUserInvite(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "userEmail" in value; + + return isInstance; +} + +export function RescindUserInviteFromJSON(json: any): RescindUserInvite { + return RescindUserInviteFromJSONTyped(json, false); +} + +export function RescindUserInviteFromJSONTyped(json: any, ignoreDiscriminator: boolean): RescindUserInvite { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'userEmail': json['userEmail'], + }; +} + +export function RescindUserInviteToJSON(value?: RescindUserInvite | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'userEmail': value.userEmail, + }; +} + diff --git a/typescript/src/models/RoomConnectionData.ts b/typescript/src/models/RoomConnectionData.ts new file mode 100644 index 0000000..ddcc398 --- /dev/null +++ b/typescript/src/models/RoomConnectionData.ts @@ -0,0 +1,115 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +import type { ExposedPort } from './ExposedPort'; +import { + ExposedPortFromJSON, + ExposedPortFromJSONTyped, + ExposedPortToJSON, +} from './ExposedPort'; +import type { RoomReadyStatus } from './RoomReadyStatus'; +import { + RoomReadyStatusFromJSON, + RoomReadyStatusFromJSONTyped, + RoomReadyStatusToJSON, +} from './RoomReadyStatus'; + +/** + * + * @export + * @interface RoomConnectionData + */ +export interface RoomConnectionData { + /** + * + * @type {Array} + * @memberof RoomConnectionData + */ + additionalExposedPorts: Array; + /** + * + * @type {ExposedPort} + * @memberof RoomConnectionData + */ + exposedPort?: ExposedPort; + /** + * + * @type {RoomReadyStatus} + * @memberof RoomConnectionData + */ + status: RoomReadyStatus; + /** + * Unique identifier to a game session or match. Use the default system generated ID or overwrite it with your own. + * Note: error will be returned if `roomId` is not globally unique. + * @type {string} + * @memberof RoomConnectionData + */ + roomId: string; + /** + * System generated unique identifier to a runtime instance of your game server. + * @type {string} + * @memberof RoomConnectionData + */ + processId: string; +} + +/** + * Check if a given object implements the RoomConnectionData interface. + */ +export function instanceOfRoomConnectionData(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "additionalExposedPorts" in value; + isInstance = isInstance && "status" in value; + isInstance = isInstance && "roomId" in value; + isInstance = isInstance && "processId" in value; + + return isInstance; +} + +export function RoomConnectionDataFromJSON(json: any): RoomConnectionData { + return RoomConnectionDataFromJSONTyped(json, false); +} + +export function RoomConnectionDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): RoomConnectionData { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'additionalExposedPorts': ((json['additionalExposedPorts'] as Array).map(ExposedPortFromJSON)), + 'exposedPort': !exists(json, 'exposedPort') ? undefined : ExposedPortFromJSON(json['exposedPort']), + 'status': RoomReadyStatusFromJSON(json['status']), + 'roomId': json['roomId'], + 'processId': json['processId'], + }; +} + +export function RoomConnectionDataToJSON(value?: RoomConnectionData | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'additionalExposedPorts': ((value.additionalExposedPorts as Array).map(ExposedPortToJSON)), + 'exposedPort': ExposedPortToJSON(value.exposedPort), + 'status': RoomReadyStatusToJSON(value.status), + 'roomId': value.roomId, + 'processId': value.processId, + }; +} + diff --git a/typescript/src/models/RoomConnectionDataAllOf.ts b/typescript/src/models/RoomConnectionDataAllOf.ts new file mode 100644 index 0000000..837c937 --- /dev/null +++ b/typescript/src/models/RoomConnectionDataAllOf.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface RoomConnectionDataAllOf + */ +export interface RoomConnectionDataAllOf { + /** + * System generated unique identifier to a runtime instance of your game server. + * @type {string} + * @memberof RoomConnectionDataAllOf + */ + processId: string; +} + +/** + * Check if a given object implements the RoomConnectionDataAllOf interface. + */ +export function instanceOfRoomConnectionDataAllOf(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "processId" in value; + + return isInstance; +} + +export function RoomConnectionDataAllOfFromJSON(json: any): RoomConnectionDataAllOf { + return RoomConnectionDataAllOfFromJSONTyped(json, false); +} + +export function RoomConnectionDataAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): RoomConnectionDataAllOf { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'processId': json['processId'], + }; +} + +export function RoomConnectionDataAllOfToJSON(value?: RoomConnectionDataAllOf | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'processId': value.processId, + }; +} + diff --git a/typescript/src/models/RoomReadyStatus.ts b/typescript/src/models/RoomReadyStatus.ts new file mode 100644 index 0000000..df25423 --- /dev/null +++ b/typescript/src/models/RoomReadyStatus.ts @@ -0,0 +1,38 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const RoomReadyStatus = { + Active: 'active', + Starting: 'starting' +} as const; +export type RoomReadyStatus = typeof RoomReadyStatus[keyof typeof RoomReadyStatus]; + + +export function RoomReadyStatusFromJSON(json: any): RoomReadyStatus { + return RoomReadyStatusFromJSONTyped(json, false); +} + +export function RoomReadyStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): RoomReadyStatus { + return json as RoomReadyStatus; +} + +export function RoomReadyStatusToJSON(value?: RoomReadyStatus | null): any { + return value as any; +} + diff --git a/typescript/src/models/VerificationEmailSuccess.ts b/typescript/src/models/VerificationEmailSuccess.ts new file mode 100644 index 0000000..14ec302 --- /dev/null +++ b/typescript/src/models/VerificationEmailSuccess.ts @@ -0,0 +1,37 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Hathora Cloud API + * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * + * @export + */ +export const VerificationEmailSuccess = { + Success: 'success' +} as const; +export type VerificationEmailSuccess = typeof VerificationEmailSuccess[keyof typeof VerificationEmailSuccess]; + + +export function VerificationEmailSuccessFromJSON(json: any): VerificationEmailSuccess { + return VerificationEmailSuccessFromJSONTyped(json, false); +} + +export function VerificationEmailSuccessFromJSONTyped(json: any, ignoreDiscriminator: boolean): VerificationEmailSuccess { + return json as VerificationEmailSuccess; +} + +export function VerificationEmailSuccessToJSON(value?: VerificationEmailSuccess | null): any { + return value as any; +} + diff --git a/typescript/src/models/index.ts b/typescript/src/models/index.ts index 365c4b1..4cfc991 100644 --- a/typescript/src/models/index.ts +++ b/typescript/src/models/index.ts @@ -25,15 +25,20 @@ export * from './CreateLobbyV3Params'; export * from './CreateOrgToken'; export * from './CreatePrivateLobbyRequest'; export * from './CreateRoomParams'; -export * from './CreateRoomResponse'; -export * from './CreateRoomResponseAllOf'; +export * from './CreateUserInvite'; export * from './CreatedOrgToken'; export * from './CustomerPortalUrl'; export * from './Deployment'; export * from './DeploymentConfig'; -export * from './DeploymentEnvInner'; -export * from './DiscoveryResponseInner'; +export * from './DeploymentConfigV2'; +export * from './DeploymentV2'; +export * from './DeploymentV2EnvInner'; export * from './ExposedPort'; +export * from './GoogleIdTokenObject'; +export * from './InviteStatusAccepted'; +export * from './InviteStatusPending'; +export * from './InviteStatusRejected'; +export * from './InviteStatusRescinded'; export * from './Invoice'; export * from './InvoiceStatus'; export * from './LinkPaymentMethod'; @@ -41,16 +46,20 @@ export * from './ListOrgTokens'; export * from './Lobby'; export * from './LobbyV3'; export * from './LobbyVisibility'; -export * from './LoginGoogleRequest'; -export * from './LoginNicknameRequest'; -export * from './LoginResponse'; export * from './MetricName'; export * from './MetricValue'; +export * from './NewUserInfo'; +export * from './NicknameObject'; +export * from './OrgInvitesPage'; +export * from './OrgPermission'; export * from './OrgToken'; export * from './OrgTokenStatus'; +export * from './OrganizationInviteStatus'; export * from './PartialCardCardPaymentMethodAchAchPaymentMethodLinkLinkPaymentMethod'; export * from './PickRoomExcludeKeyofRoomAllocations'; +export * from './PingEndpointsInner'; export * from './PlanName'; +export * from './PlayerTokenObject'; export * from './Process'; export * from './ProcessStatus'; export * from './ProcessV2'; @@ -58,12 +67,16 @@ export * from './ProcessWithRooms'; export * from './ProcessWithRoomsAllOf'; export * from './RecordPartialMetricNameMetricValueArray'; export * from './Region'; +export * from './RescindUserInvite'; export * from './Room'; export * from './RoomAllocation'; +export * from './RoomConnectionData'; +export * from './RoomConnectionDataAllOf'; +export * from './RoomReadyStatus'; export * from './RoomStatus'; export * from './SetLobbyStateParams'; export * from './StartingConnectionInfo'; export * from './TransportType'; export * from './UpdateRoomConfigParams'; export * from './VerificationEmailRequest'; -export * from './VerificationEmailResponse'; +export * from './VerificationEmailSuccess'; From 440d4505703266a935eec5ce50f76d1ad2d4d9b9 Mon Sep 17 00:00:00 2001 From: Justin Date: Wed, 8 May 2024 16:51:05 -0700 Subject: [PATCH 2/2] icrement TS sdk version --- typescript/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typescript/package.json b/typescript/package.json index 6aaac2c..7e5bddd 100644 --- a/typescript/package.json +++ b/typescript/package.json @@ -1,6 +1,6 @@ { "name": "@hathora/hathora-cloud-sdk", - "version": "0.0.8", + "version": "0.0.9", "description": "OpenAPI client for hathora-cloud-sdk", "author": "OpenAPI-Generator", "repository": {