From 95a6812950cedf86647c282c8741b004a20aafc4 Mon Sep 17 00:00:00 2001 From: George Price Date: Mon, 18 Mar 2024 16:00:56 -0400 Subject: [PATCH] latest --- csharp/.openapi-generator/FILES | 43 +- csharp/README.md | 18 +- csharp/api/openapi.yaml | 1036 +- csharp/docs/AppV1Api.md | 12 +- csharp/docs/Application.md | 6 +- ...ApplicationWithLatestDeploymentAndBuild.md | 19 + ...cationWithLatestDeploymentAndBuildAllOf.md | 10 + ...LatestDeploymentAndBuildAllOfDeployment.md | 25 + ...tDeploymentAndBuildAllOfDeploymentAllOf.md | 10 + csharp/docs/BillingV1Api.md | 4 + csharp/docs/Build.md | 6 +- csharp/docs/BuildStatus.md | 9 + csharp/docs/BuildV1Api.md | 5 + csharp/docs/CreateOrgToken.md | 10 + csharp/docs/CreatedOrgToken.md | 11 + csharp/docs/Deployment.md | 3 +- csharp/docs/DeploymentConfig.md | 1 + csharp/docs/DeploymentV1Api.md | 99 + csharp/docs/Invoice.md | 3 +- csharp/docs/InvoiceStatus.md | 9 + csharp/docs/ListOrgTokens.md | 10 + csharp/docs/Lobby.md | 2 +- csharp/docs/LobbyV1Api.md | 3 +- csharp/docs/LobbyV2Api.md | 5 + csharp/docs/LobbyV3.md | 2 +- csharp/docs/LobbyV3Api.md | 1 + csharp/docs/LogV1Api.md | 5 +- csharp/docs/ManagementV1Api.md | 1 + csharp/docs/MetricsV1Api.md | 1 + csharp/docs/OrgToken.md | 16 + csharp/docs/OrgTokenStatus.md | 9 + csharp/docs/OrgTokensV1Api.md | 297 + csharp/docs/Process.md | 2 +- csharp/docs/ProcessV2.md | 2 +- csharp/docs/ProcessWithRooms.md | 2 +- csharp/docs/ProcessesV1Api.md | 3 + csharp/docs/ProcessesV2Api.md | 95 + csharp/docs/RoomV1Api.md | 7 + csharp/docs/RoomV2Api.md | 8 + .../Api/OrgTokensV1ApiTests.cs | 94 + ...oymentAndBuildAllOfDeploymentAllOfTests.cs | 66 + ...tDeploymentAndBuildAllOfDeploymentTests.cs | 186 + ...nWithLatestDeploymentAndBuildAllOfTests.cs | 66 + ...cationWithLatestDeploymentAndBuildTests.cs | 138 + .../Model/BuildStatusTests.cs | 58 + .../Model/CreateOrgTokenTests.cs | 66 + .../Model/CreatedOrgTokenTests.cs | 74 + .../Model/InvoiceStatusTests.cs | 58 + .../Model/ListOrgTokensTests.cs | 66 + .../Model/OrgTokenStatusTests.cs | 58 + .../Model/OrgTokenTests.cs | 114 + csharp/src/Hathora.Cloud.Sdk/Api/AppV1Api.cs | 42 +- .../Hathora.Cloud.Sdk/Api/DeploymentV1Api.cs | 182 + .../Hathora.Cloud.Sdk/Api/OrgTokensV1Api.cs | 767 + .../Hathora.Cloud.Sdk/Api/ProcessesV2Api.cs | 198 + .../Hathora.Cloud.Sdk/Model/Application.cs | 24 +- ...ApplicationWithLatestDeploymentAndBuild.cs | 355 + ...cationWithLatestDeploymentAndBuildAllOf.cs | 131 + ...LatestDeploymentAndBuildAllOfDeployment.cs | 451 + ...tDeploymentAndBuildAllOfDeploymentAllOf.cs | 144 + csharp/src/Hathora.Cloud.Sdk/Model/Build.cs | 61 +- .../Hathora.Cloud.Sdk/Model/BuildStatus.cs | 59 + .../Hathora.Cloud.Sdk/Model/CreateOrgToken.cs | 146 + .../Model/CreatedOrgToken.cs | 167 + .../src/Hathora.Cloud.Sdk/Model/Deployment.cs | 25 +- .../Model/DeploymentConfig.cs | 17 +- csharp/src/Hathora.Cloud.Sdk/Model/Invoice.cs | 32 +- .../Hathora.Cloud.Sdk/Model/InvoiceStatus.cs | 53 + .../Hathora.Cloud.Sdk/Model/ListOrgTokens.cs | 145 + csharp/src/Hathora.Cloud.Sdk/Model/Lobby.cs | 8 +- csharp/src/Hathora.Cloud.Sdk/Model/LobbyV3.cs | 8 +- .../src/Hathora.Cloud.Sdk/Model/OrgToken.cs | 272 + .../Hathora.Cloud.Sdk/Model/OrgTokenStatus.cs | 47 + csharp/src/Hathora.Cloud.Sdk/Model/Process.cs | 11 +- .../src/Hathora.Cloud.Sdk/Model/ProcessV2.cs | 11 +- .../Model/ProcessWithRooms.cs | 11 +- java/.openapi-generator/FILES | 28 +- java/README.md | 18 +- java/api/openapi.yaml | 1040 +- java/docs/AppV1Api.md | 10 +- java/docs/Application.md | 6 +- ...ApplicationWithLatestDeploymentAndBuild.md | 22 + ...cationWithLatestDeploymentAndBuildAllOf.md | 13 + ...LatestDeploymentAndBuildAllOfDeployment.md | 38 + ...tDeploymentAndBuildAllOfDeploymentAllOf.md | 13 + java/docs/BillingV1Api.md | 4 + java/docs/Build.md | 17 +- java/docs/BuildStatus.md | 17 + java/docs/BuildV1Api.md | 5 + java/docs/CreateOrgToken.md | 13 + java/docs/CreatedOrgToken.md | 14 + java/docs/Deployment.md | 3 +- java/docs/DeploymentConfig.md | 1 + java/docs/DeploymentV1Api.md | 74 + java/docs/Invoice.md | 13 +- java/docs/InvoiceStatus.md | 15 + java/docs/ListOrgTokens.md | 13 + java/docs/Lobby.md | 2 +- java/docs/LobbyV1Api.md | 3 +- java/docs/LobbyV2Api.md | 5 + java/docs/LobbyV3.md | 2 +- java/docs/LobbyV3Api.md | 1 + java/docs/LogV1Api.md | 5 +- java/docs/ManagementV1Api.md | 1 + java/docs/MetricsV1Api.md | 1 + java/docs/OrgToken.md | 19 + java/docs/OrgTokenStatus.md | 13 + java/docs/OrgTokensV1Api.md | 223 + java/docs/Process.md | 2 +- java/docs/ProcessV2.md | 2 +- java/docs/ProcessWithRooms.md | 2 +- java/docs/ProcessesV1Api.md | 3 + java/docs/ProcessesV2Api.md | 73 + java/docs/RoomV1Api.md | 7 + java/docs/RoomV2Api.md | 8 + .../main/java/com/hathora/client/JSON.java | 10 +- .../java/com/hathora/client/api/AppV1Api.java | 34 +- .../com/hathora/client/api/BillingV1Api.java | 16 + .../com/hathora/client/api/BuildV1Api.java | 20 + .../hathora/client/api/DeploymentV1Api.java | 147 + .../com/hathora/client/api/LobbyV1Api.java | 12 +- .../com/hathora/client/api/LobbyV2Api.java | 20 + .../com/hathora/client/api/LobbyV3Api.java | 4 + .../java/com/hathora/client/api/LogV1Api.java | 20 +- .../hathora/client/api/ManagementV1Api.java | 4 + .../com/hathora/client/api/MetricsV1Api.java | 4 + .../hathora/client/api/OrgTokensV1Api.java | 496 + .../hathora/client/api/ProcessesV1Api.java | 12 + .../hathora/client/api/ProcessesV2Api.java | 153 +- .../com/hathora/client/api/RoomV1Api.java | 28 + .../com/hathora/client/api/RoomV2Api.java | 32 + .../com/hathora/client/model/Application.java | 6 +- ...plicationWithLatestDeploymentAndBuild.java | 581 + ...tionWithLatestDeploymentAndBuildAllOf.java | 282 + ...testDeploymentAndBuildAllOfDeployment.java | 845 ++ ...eploymentAndBuildAllOfDeploymentAllOf.java | 288 + .../java/com/hathora/client/model/Build.java | 82 +- .../com/hathora/client/model/BuildStatus.java | 77 + .../hathora/client/model/CreateOrgToken.java | 288 + .../hathora/client/model/CreatedOrgToken.java | 321 + .../com/hathora/client/model/Deployment.java | 35 +- .../client/model/DeploymentConfig.java | 33 +- .../com/hathora/client/model/Invoice.java | 63 +- .../hathora/client/model/InvoiceStatus.java | 75 + .../hathora/client/model/ListOrgTokens.java | 306 + .../java/com/hathora/client/model/Lobby.java | 2 +- .../com/hathora/client/model/LobbyV3.java | 2 +- .../com/hathora/client/model/OrgToken.java | 482 + .../hathora/client/model/OrgTokenStatus.java | 73 + .../com/hathora/client/model/Process.java | 7 +- .../com/hathora/client/model/ProcessV2.java | 7 +- .../client/model/ProcessWithRooms.java | 7 +- swagger.json | 12248 ++++++++-------- typescript/.openapi-generator/FILES | 14 +- typescript/src/apis/AppV1Api.ts | 16 +- typescript/src/apis/DeploymentV1Api.ts | 56 + typescript/src/apis/OrgTokensV1Api.ts | 235 + typescript/src/apis/ProcessesV2Api.ts | 61 + typescript/src/apis/index.ts | 1 + typescript/src/models/Application.ts | 6 +- ...ApplicationWithLatestDeploymentAndBuild.ts | 159 + ...cationWithLatestDeploymentAndBuildAllOf.ts | 72 + ...LatestDeploymentAndBuildAllOfDeployment.ts | 240 + ...tDeploymentAndBuildAllOfDeploymentAllOf.ts | 73 + typescript/src/models/Build.ts | 42 +- typescript/src/models/BuildStatus.ts | 40 + typescript/src/models/CreateOrgToken.ts | 66 + typescript/src/models/CreatedOrgToken.ts | 82 + typescript/src/models/Deployment.ts | 11 +- typescript/src/models/DeploymentConfig.ts | 9 + typescript/src/models/Invoice.ts | 29 +- typescript/src/models/InvoiceStatus.ts | 39 + typescript/src/models/ListOrgTokens.ts | 73 + typescript/src/models/Lobby.ts | 2 +- typescript/src/models/LobbyV3.ts | 2 +- typescript/src/models/OrgToken.ts | 127 + typescript/src/models/OrgTokenStatus.ts | 38 + typescript/src/models/Process.ts | 5 +- typescript/src/models/ProcessV2.ts | 5 +- typescript/src/models/ProcessWithRooms.ts | 5 +- typescript/src/models/index.ts | 13 +- 181 files changed, 19923 insertions(+), 6690 deletions(-) create mode 100644 csharp/docs/ApplicationWithLatestDeploymentAndBuild.md create mode 100644 csharp/docs/ApplicationWithLatestDeploymentAndBuildAllOf.md create mode 100644 csharp/docs/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.md create mode 100644 csharp/docs/ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf.md create mode 100644 csharp/docs/BuildStatus.md create mode 100644 csharp/docs/CreateOrgToken.md create mode 100644 csharp/docs/CreatedOrgToken.md create mode 100644 csharp/docs/InvoiceStatus.md create mode 100644 csharp/docs/ListOrgTokens.md create mode 100644 csharp/docs/OrgToken.md create mode 100644 csharp/docs/OrgTokenStatus.md create mode 100644 csharp/docs/OrgTokensV1Api.md create mode 100644 csharp/src/Hathora.Cloud.Sdk.Test/Api/OrgTokensV1ApiTests.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk.Test/Model/ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOfTests.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk.Test/Model/ApplicationWithLatestDeploymentAndBuildAllOfDeploymentTests.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk.Test/Model/ApplicationWithLatestDeploymentAndBuildAllOfTests.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk.Test/Model/ApplicationWithLatestDeploymentAndBuildTests.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk.Test/Model/BuildStatusTests.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk.Test/Model/CreateOrgTokenTests.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk.Test/Model/CreatedOrgTokenTests.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk.Test/Model/InvoiceStatusTests.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk.Test/Model/ListOrgTokensTests.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk.Test/Model/OrgTokenStatusTests.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk.Test/Model/OrgTokenTests.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk/Api/OrgTokensV1Api.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk/Model/ApplicationWithLatestDeploymentAndBuild.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk/Model/ApplicationWithLatestDeploymentAndBuildAllOf.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk/Model/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk/Model/ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk/Model/BuildStatus.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk/Model/CreateOrgToken.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk/Model/CreatedOrgToken.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk/Model/InvoiceStatus.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk/Model/ListOrgTokens.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk/Model/OrgToken.cs create mode 100644 csharp/src/Hathora.Cloud.Sdk/Model/OrgTokenStatus.cs create mode 100644 java/docs/ApplicationWithLatestDeploymentAndBuild.md create mode 100644 java/docs/ApplicationWithLatestDeploymentAndBuildAllOf.md create mode 100644 java/docs/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.md create mode 100644 java/docs/ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf.md create mode 100644 java/docs/BuildStatus.md create mode 100644 java/docs/CreateOrgToken.md create mode 100644 java/docs/CreatedOrgToken.md create mode 100644 java/docs/InvoiceStatus.md create mode 100644 java/docs/ListOrgTokens.md create mode 100644 java/docs/OrgToken.md create mode 100644 java/docs/OrgTokenStatus.md create mode 100644 java/docs/OrgTokensV1Api.md create mode 100644 java/src/main/java/com/hathora/client/api/OrgTokensV1Api.java create mode 100644 java/src/main/java/com/hathora/client/model/ApplicationWithLatestDeploymentAndBuild.java create mode 100644 java/src/main/java/com/hathora/client/model/ApplicationWithLatestDeploymentAndBuildAllOf.java create mode 100644 java/src/main/java/com/hathora/client/model/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.java create mode 100644 java/src/main/java/com/hathora/client/model/ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf.java create mode 100644 java/src/main/java/com/hathora/client/model/BuildStatus.java create mode 100644 java/src/main/java/com/hathora/client/model/CreateOrgToken.java create mode 100644 java/src/main/java/com/hathora/client/model/CreatedOrgToken.java create mode 100644 java/src/main/java/com/hathora/client/model/InvoiceStatus.java create mode 100644 java/src/main/java/com/hathora/client/model/ListOrgTokens.java create mode 100644 java/src/main/java/com/hathora/client/model/OrgToken.java create mode 100644 java/src/main/java/com/hathora/client/model/OrgTokenStatus.java create mode 100644 typescript/src/apis/OrgTokensV1Api.ts create mode 100644 typescript/src/models/ApplicationWithLatestDeploymentAndBuild.ts create mode 100644 typescript/src/models/ApplicationWithLatestDeploymentAndBuildAllOf.ts create mode 100644 typescript/src/models/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.ts create mode 100644 typescript/src/models/ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf.ts create mode 100644 typescript/src/models/BuildStatus.ts create mode 100644 typescript/src/models/CreateOrgToken.ts create mode 100644 typescript/src/models/CreatedOrgToken.ts create mode 100644 typescript/src/models/InvoiceStatus.ts create mode 100644 typescript/src/models/ListOrgTokens.ts create mode 100644 typescript/src/models/OrgToken.ts create mode 100644 typescript/src/models/OrgTokenStatus.ts diff --git a/csharp/.openapi-generator/FILES b/csharp/.openapi-generator/FILES index 6d7f57b..9a4eed2 100644 --- a/csharp/.openapi-generator/FILES +++ b/csharp/.openapi-generator/FILES @@ -7,14 +7,17 @@ docs/ApiError.md docs/AppConfig.md docs/AppV1Api.md docs/Application.md -docs/ApplicationWithDeployment.md -docs/ApplicationWithDeploymentAllOf.md +docs/ApplicationWithLatestDeploymentAndBuild.md +docs/ApplicationWithLatestDeploymentAndBuildAllOf.md +docs/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.md +docs/ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf.md docs/AuthConfiguration.md docs/AuthConfigurationGoogle.md docs/AuthV1Api.md docs/BillingV1Api.md docs/Build.md docs/BuildRegionalContainerTagsInner.md +docs/BuildStatus.md docs/BuildV1Api.md docs/CardBrand.md docs/CardPaymentMethod.md @@ -24,10 +27,12 @@ docs/ContainerPort.md docs/CreateBuildParams.md docs/CreateLobbyParams.md docs/CreateLobbyV3Params.md +docs/CreateOrgToken.md docs/CreatePrivateLobbyRequest.md docs/CreateRoomParams.md docs/CreateRoomResponse.md docs/CreateRoomResponseAllOf.md +docs/CreatedOrgToken.md docs/CustomerPortalUrl.md docs/Deployment.md docs/DeploymentConfig.md @@ -37,7 +42,9 @@ docs/DiscoveryResponseInner.md docs/DiscoveryV1Api.md docs/ExposedPort.md docs/Invoice.md +docs/InvoiceStatus.md docs/LinkPaymentMethod.md +docs/ListOrgTokens.md docs/Lobby.md docs/LobbyV1Api.md docs/LobbyV2Api.md @@ -52,6 +59,9 @@ docs/ManagementV1Api.md docs/MetricName.md docs/MetricValue.md docs/MetricsV1Api.md +docs/OrgToken.md +docs/OrgTokenStatus.md +docs/OrgTokensV1Api.md docs/PartialCardCardPaymentMethodAchAchPaymentMethodLinkLinkPaymentMethod.md docs/PickRoomExcludeKeyofRoomAllocations.md docs/PlanName.md @@ -76,10 +86,19 @@ docs/UpdateRoomConfigParams.md docs/VerificationEmailRequest.md docs/VerificationEmailResponse.md git_push.sh -src/Hathora.Cloud.Sdk.Test/Api/ProcessesV2ApiTests.cs +src/Hathora.Cloud.Sdk.Test/Api/OrgTokensV1ApiTests.cs src/Hathora.Cloud.Sdk.Test/Hathora.Cloud.Sdk.Test.asmdef -src/Hathora.Cloud.Sdk.Test/Model/ProcessStatusTests.cs -src/Hathora.Cloud.Sdk.Test/Model/ProcessV2Tests.cs +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/Api/AppV1Api.cs src/Hathora.Cloud.Sdk/Api/AuthV1Api.cs src/Hathora.Cloud.Sdk/Api/BillingV1Api.cs @@ -92,6 +111,7 @@ src/Hathora.Cloud.Sdk/Api/LobbyV3Api.cs 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/ProcessesV1Api.cs src/Hathora.Cloud.Sdk/Api/ProcessesV2Api.cs src/Hathora.Cloud.Sdk/Api/RoomV1Api.cs @@ -120,12 +140,15 @@ src/Hathora.Cloud.Sdk/Model/ActiveConnectionInfo.cs src/Hathora.Cloud.Sdk/Model/ApiError.cs src/Hathora.Cloud.Sdk/Model/AppConfig.cs src/Hathora.Cloud.Sdk/Model/Application.cs -src/Hathora.Cloud.Sdk/Model/ApplicationWithDeployment.cs -src/Hathora.Cloud.Sdk/Model/ApplicationWithDeploymentAllOf.cs +src/Hathora.Cloud.Sdk/Model/ApplicationWithLatestDeploymentAndBuild.cs +src/Hathora.Cloud.Sdk/Model/ApplicationWithLatestDeploymentAndBuildAllOf.cs +src/Hathora.Cloud.Sdk/Model/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.cs +src/Hathora.Cloud.Sdk/Model/ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf.cs src/Hathora.Cloud.Sdk/Model/AuthConfiguration.cs src/Hathora.Cloud.Sdk/Model/AuthConfigurationGoogle.cs src/Hathora.Cloud.Sdk/Model/Build.cs src/Hathora.Cloud.Sdk/Model/BuildRegionalContainerTagsInner.cs +src/Hathora.Cloud.Sdk/Model/BuildStatus.cs src/Hathora.Cloud.Sdk/Model/CardBrand.cs src/Hathora.Cloud.Sdk/Model/CardPaymentMethod.cs src/Hathora.Cloud.Sdk/Model/ConnectionInfo.cs @@ -134,10 +157,12 @@ src/Hathora.Cloud.Sdk/Model/ContainerPort.cs src/Hathora.Cloud.Sdk/Model/CreateBuildParams.cs src/Hathora.Cloud.Sdk/Model/CreateLobbyParams.cs 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/CreatedOrgToken.cs src/Hathora.Cloud.Sdk/Model/CustomerPortalUrl.cs src/Hathora.Cloud.Sdk/Model/Deployment.cs src/Hathora.Cloud.Sdk/Model/DeploymentConfig.cs @@ -145,7 +170,9 @@ src/Hathora.Cloud.Sdk/Model/DeploymentEnvInner.cs src/Hathora.Cloud.Sdk/Model/DiscoveryResponseInner.cs src/Hathora.Cloud.Sdk/Model/ExposedPort.cs src/Hathora.Cloud.Sdk/Model/Invoice.cs +src/Hathora.Cloud.Sdk/Model/InvoiceStatus.cs src/Hathora.Cloud.Sdk/Model/LinkPaymentMethod.cs +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 @@ -154,6 +181,8 @@ 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/OrgToken.cs +src/Hathora.Cloud.Sdk/Model/OrgTokenStatus.cs src/Hathora.Cloud.Sdk/Model/PartialCardCardPaymentMethodAchAchPaymentMethodLinkLinkPaymentMethod.cs src/Hathora.Cloud.Sdk/Model/PickRoomExcludeKeyofRoomAllocations.cs src/Hathora.Cloud.Sdk/Model/PlanName.cs diff --git a/csharp/README.md b/csharp/README.md index 46f1914..59bf929 100644 --- a/csharp/README.md +++ b/csharp/README.md @@ -111,6 +111,7 @@ Class | Method | HTTP request | Description *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 | *LobbyV1Api* | [**CreatePrivateLobbyDeprecated**](LobbyV1Api.md#createprivatelobbydeprecated) | **POST** /lobby/v1/{appId}/create/private | *LobbyV1Api* | [**CreatePublicLobbyDeprecated**](LobbyV1Api.md#createpubliclobbydeprecated) | **POST** /lobby/v1/{appId}/create/public | @@ -132,11 +133,15 @@ Class | Method | HTTP request | Description *LogV1Api* | [**GetLogsForProcess**](LogV1Api.md#getlogsforprocess) | **GET** /logs/v1/{appId}/process/{processId} | *ManagementV1Api* | [**SendVerificationEmail**](ManagementV1Api.md#sendverificationemail) | **POST** /management/v1/sendverificationemail | *MetricsV1Api* | [**GetMetrics**](MetricsV1Api.md#getmetrics) | **GET** /metrics/v1/{appId}/process/{processId} | +*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 | *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* | [**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} | *RoomV1Api* | [**CreateRoomDeprecated**](RoomV1Api.md#createroomdeprecated) | **POST** /rooms/v1/{appId}/create | *RoomV1Api* | [**DestroyRoomDeprecated**](RoomV1Api.md#destroyroomdeprecated) | **POST** /rooms/v1/{appId}/destroy/{roomId} | *RoomV1Api* | [**GetActiveRoomsForProcessDeprecated**](RoomV1Api.md#getactiveroomsforprocessdeprecated) | **GET** /rooms/v1/{appId}/list/{processId}/active | @@ -162,12 +167,15 @@ Class | Method | HTTP request | Description - [Model.ApiError](ApiError.md) - [Model.AppConfig](AppConfig.md) - [Model.Application](Application.md) - - [Model.ApplicationWithDeployment](ApplicationWithDeployment.md) - - [Model.ApplicationWithDeploymentAllOf](ApplicationWithDeploymentAllOf.md) + - [Model.ApplicationWithLatestDeploymentAndBuild](ApplicationWithLatestDeploymentAndBuild.md) + - [Model.ApplicationWithLatestDeploymentAndBuildAllOf](ApplicationWithLatestDeploymentAndBuildAllOf.md) + - [Model.ApplicationWithLatestDeploymentAndBuildAllOfDeployment](ApplicationWithLatestDeploymentAndBuildAllOfDeployment.md) + - [Model.ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf](ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf.md) - [Model.AuthConfiguration](AuthConfiguration.md) - [Model.AuthConfigurationGoogle](AuthConfigurationGoogle.md) - [Model.Build](Build.md) - [Model.BuildRegionalContainerTagsInner](BuildRegionalContainerTagsInner.md) + - [Model.BuildStatus](BuildStatus.md) - [Model.CardBrand](CardBrand.md) - [Model.CardPaymentMethod](CardPaymentMethod.md) - [Model.ConnectionInfo](ConnectionInfo.md) @@ -176,10 +184,12 @@ Class | Method | HTTP request | Description - [Model.CreateBuildParams](CreateBuildParams.md) - [Model.CreateLobbyParams](CreateLobbyParams.md) - [Model.CreateLobbyV3Params](CreateLobbyV3Params.md) + - [Model.CreateOrgToken](CreateOrgToken.md) - [Model.CreatePrivateLobbyRequest](CreatePrivateLobbyRequest.md) - [Model.CreateRoomParams](CreateRoomParams.md) - [Model.CreateRoomResponse](CreateRoomResponse.md) - [Model.CreateRoomResponseAllOf](CreateRoomResponseAllOf.md) + - [Model.CreatedOrgToken](CreatedOrgToken.md) - [Model.CustomerPortalUrl](CustomerPortalUrl.md) - [Model.Deployment](Deployment.md) - [Model.DeploymentConfig](DeploymentConfig.md) @@ -187,7 +197,9 @@ Class | Method | HTTP request | Description - [Model.DiscoveryResponseInner](DiscoveryResponseInner.md) - [Model.ExposedPort](ExposedPort.md) - [Model.Invoice](Invoice.md) + - [Model.InvoiceStatus](InvoiceStatus.md) - [Model.LinkPaymentMethod](LinkPaymentMethod.md) + - [Model.ListOrgTokens](ListOrgTokens.md) - [Model.Lobby](Lobby.md) - [Model.LobbyV3](LobbyV3.md) - [Model.LobbyVisibility](LobbyVisibility.md) @@ -196,6 +208,8 @@ Class | Method | HTTP request | Description - [Model.LoginResponse](LoginResponse.md) - [Model.MetricName](MetricName.md) - [Model.MetricValue](MetricValue.md) + - [Model.OrgToken](OrgToken.md) + - [Model.OrgTokenStatus](OrgTokenStatus.md) - [Model.PartialCardCardPaymentMethodAchAchPaymentMethodLinkLinkPaymentMethod](PartialCardCardPaymentMethodAchAchPaymentMethodLinkLinkPaymentMethod.md) - [Model.PickRoomExcludeKeyofRoomAllocations](PickRoomExcludeKeyofRoomAllocations.md) - [Model.PlanName](PlanName.md) diff --git a/csharp/api/openapi.yaml b/csharp/api/openapi.yaml index a31f54f..c6fd42b 100644 --- a/csharp/api/openapi.yaml +++ b/csharp/api/openapi.yaml @@ -33,13 +33,15 @@ tags: \ 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: ProcessesV1 + 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: "Deprecated. Use [RoomV2](https://hathora.dev/api#tag/RoomV2)." name: RoomV1 paths: @@ -55,7 +57,7 @@ paths: application/json: schema: items: - $ref: '#/components/schemas/ApplicationWithDeployment' + $ref: '#/components/schemas/ApplicationWithLatestDeploymentAndBuild' type: array description: Ok security: @@ -80,6 +82,12 @@ paths: schema: $ref: '#/components/schemas/Application' description: "" + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "422": content: application/json: @@ -122,6 +130,12 @@ paths: schema: $ref: '#/components/schemas/Application' description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -164,6 +178,12 @@ paths: schema: $ref: '#/components/schemas/Application' description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -190,6 +210,12 @@ paths: responses: "204": description: No content + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -320,6 +346,12 @@ paths: format: double type: number description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -341,6 +373,12 @@ paths: schema: $ref: '#/components/schemas/PaymentMethod' description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -374,6 +412,12 @@ paths: schema: type: string description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -397,6 +441,12 @@ paths: $ref: '#/components/schemas/Invoice' type: array description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -429,6 +479,12 @@ paths: $ref: '#/components/schemas/Build' type: array description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -465,6 +521,12 @@ paths: schema: $ref: '#/components/schemas/Build' description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -503,6 +565,12 @@ paths: schema: $ref: '#/components/schemas/Build' description: "" + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -553,6 +621,12 @@ paths: format: byte type: string description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -592,6 +666,12 @@ paths: responses: "204": description: No content + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -636,6 +716,48 @@ paths: $ref: '#/components/schemas/Deployment' 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: + - DeploymentV1 + /deployments/v1/{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/Deployment' + description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -672,6 +794,12 @@ paths: schema: $ref: '#/components/schemas/Deployment' description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -722,12 +850,24 @@ paths: 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: "" + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "500": content: application/json: @@ -802,6 +942,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "402": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -876,6 +1022,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "402": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -940,12 +1092,6 @@ paths: $ref: '#/components/schemas/Lobby' type: array description: Ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/ApiError' - description: "" "404": content: application/json: @@ -999,6 +1145,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "402": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -1071,6 +1223,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "402": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -1143,6 +1301,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "402": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -1220,6 +1384,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "402": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -1356,6 +1526,12 @@ paths: schema: $ref: '#/components/schemas/Lobby' description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -1427,6 +1603,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "402": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -1603,6 +1785,12 @@ paths: format: byte type: string description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -1661,6 +1849,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -1716,19 +1910,19 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" - "404": + "401": content: application/json: schema: $ref: '#/components/schemas/ApiError' description: "" - "410": + "404": content: application/json: schema: $ref: '#/components/schemas/ApiError' description: "" - "500": + "410": content: application/json: schema: @@ -1781,6 +1975,12 @@ paths: format: byte type: string description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -1808,6 +2008,12 @@ paths: schema: $ref: '#/components/schemas/VerificationEmailResponse' description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "500": content: application/json: @@ -1883,6 +2089,12 @@ paths: schema: $ref: '#/components/schemas/MetricsResponse' description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -1936,6 +2148,12 @@ paths: $ref: '#/components/schemas/ProcessWithRooms' type: array description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -1977,6 +2195,12 @@ paths: $ref: '#/components/schemas/Process' type: array description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -2014,6 +2238,12 @@ paths: schema: $ref: '#/components/schemas/Process' description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -2056,13 +2286,13 @@ paths: schema: $ref: '#/components/schemas/ProcessV2' description: Ok - "404": + "401": content: application/json: schema: $ref: '#/components/schemas/ApiError' description: "" - "500": + "404": content: application/json: schema: @@ -2113,6 +2343,12 @@ paths: $ref: '#/components/schemas/ProcessV2' type: array description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -2123,7 +2359,52 @@ paths: - hathoraDevToken: [] tags: - ProcessesV2 - /rooms/v1/{appId}/create: + /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: + $ref: '#/components/schemas/ApiError' + description: "" + security: + - hathoraDevToken: [] + tags: + - ProcessesV2 + /rooms/v1/{appId}/create: post: deprecated: true operationId: CreateRoomDeprecated @@ -2161,6 +2442,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "402": content: application/json: @@ -2215,6 +2502,12 @@ paths: schema: $ref: '#/components/schemas/Room' description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -2253,6 +2546,12 @@ paths: $ref: '#/components/schemas/RoomWithoutAllocations' type: array description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -2291,6 +2590,12 @@ paths: $ref: '#/components/schemas/RoomWithoutAllocations' type: array description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -2323,6 +2628,12 @@ paths: responses: "204": description: No content + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -2361,6 +2672,12 @@ paths: responses: "204": description: No content + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -2409,6 +2726,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "402": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -2465,6 +2788,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "402": content: application/json: @@ -2519,6 +2848,12 @@ paths: schema: $ref: '#/components/schemas/Room' description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -2558,6 +2893,12 @@ paths: $ref: '#/components/schemas/RoomWithoutAllocations' type: array description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -2597,6 +2938,12 @@ paths: $ref: '#/components/schemas/RoomWithoutAllocations' type: array description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -2630,6 +2977,12 @@ paths: responses: "204": description: No content + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -2670,6 +3023,12 @@ paths: responses: "204": description: No content + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -2719,6 +3078,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "402": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -2761,6 +3126,12 @@ paths: responses: "204": description: No content + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -2777,6 +3148,130 @@ paths: - hathoraDevToken: [] tags: - RoomV2 + /tokens/v1/orgs/{orgId}: + get: + description: List all organization tokens for a given org. + operationId: GetOrgTokens + 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/ListOrgTokens' + 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: + - OrgTokensV1 + /tokens/v1/orgs/{orgId}/create: + post: + description: Create a new organization token. + operationId: CreateOrgToken + parameters: + - explode: false + in: path + name: orgId + required: true + schema: + $ref: '#/components/schemas/OrgId' + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateOrgToken' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/CreatedOrgToken' + description: "" + "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: "" + security: + - hathoraDevToken: [] + tags: + - OrgTokensV1 + /tokens/v1/orgs/{orgId}/tokens/{orgTokenId}/revoke: + post: + description: Revoke an organization token. + operationId: RevokeOrgToken + parameters: + - explode: false + in: path + name: orgId + required: true + schema: + $ref: '#/components/schemas/OrgId' + style: simple + - explode: false + in: path + name: orgTokenId + required: true + schema: + $ref: '#/components/schemas/OrgId' + style: simple + responses: + "200": + content: + application/json: + schema: + type: boolean + 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: + - OrgTokensV1 components: examples: {} headers: {} @@ -2820,20 +3315,21 @@ components: type: object type: object OrgId: - description: System generated unique identifier for an organization. - example: google-oauth2|107030234048588177467 + description: System generated unique identifier for an organization. Not guaranteed + to have a specific format. + example: org-6f706e83-0ec1-437a-9a46-7d4281eb2f39 type: string Application: description: An application object is the top level namespace for the game server. example: createdAt: 2000-01-23T04:56:07.000+00:00 deletedAt: 2000-01-23T04:56:07.000+00:00 - createdBy: dev@hathora.dev + createdBy: google-oauth2|107030234048588177467 appName: minecraft appId: app-af469a92-5b45-4565-b3c4-b79878de67d2 appSecret: secret-6f706e83-0ec1-437a-9a46-7d4281eb2f39 - deletedBy: dev@hathora.dev - orgId: google-oauth2|107030234048588177467 + deletedBy: google-oauth2|107030234048588177467 + orgId: org-6f706e83-0ec1-437a-9a46-7d4281eb2f39 authConfiguration: nickname: "{}" anonymous: "{}" @@ -2841,8 +3337,8 @@ components: clientId: clientId properties: deletedBy: - description: Email address for the user that deleted the application. - example: dev@hathora.dev + description: UserId or email address for the user that deleted the application. + example: google-oauth2|107030234048588177467 nullable: true type: string deletedAt: @@ -2855,12 +3351,13 @@ components: format: date-time type: string createdBy: - description: Email address for the user that deleted the application. - example: dev@hathora.dev + description: UserId or email address for the user that created the application. + example: google-oauth2|107030234048588177467 type: string orgId: - description: System generated unique identifier for an organization. - example: google-oauth2|107030234048588177467 + description: System generated unique identifier for an organization. Not + guaranteed to have a specific format. + example: org-6f706e83-0ec1-437a-9a46-7d4281eb2f39 type: string authConfiguration: $ref: '#/components/schemas/AuthConfiguration' @@ -2985,18 +3482,25 @@ components: 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: dev@hathora.dev + 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. @@ -3035,31 +3539,143 @@ components: type: string containerPort: deprecated: true - format: double - type: number + format: double + type: number + createdAt: + description: When the deployment was created. + format: date-time + type: string + 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 + 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: + - additionalContainerPorts + - appId + - buildId + - containerPort + - createdAt + - createdBy + - defaultContainerPort + - deploymentId + - env + - planName + - requestedCPU + - requestedMemoryMB + - roomsPerProcess + - transportType + type: object + BuildStatus: + enum: + - created + - running + - succeeded + - failed + type: string + Region: + enum: + - Seattle + - Los_Angeles + - Washington_DC + - Chicago + - London + - Frankfurt + - Mumbai + - Singapore + - Tokyo + - Sydney + - Sao_Paulo + 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)." + example: 0.1.14-14c793 + maxLength: 1000 + type: string + Build: + description: A build represents a game server artifact and its associated metadata. + example: + createdAt: 2000-01-23T04:56:07.000+00:00 + deletedAt: 2000-01-23T04:56:07.000+00:00 + buildTag: "" + regionalContainerTags: + - region: null + containerTag: containerTag + - region: null + containerTag: containerTag + createdBy: google-oauth2|107030234048588177467 + appId: app-af469a92-5b45-4565-b3c4-b79878de67d2 + startedAt: 2000-01-23T04:56:07.000+00:00 + buildId: 1 + imageSize: 0 + status: null + finishedAt: 2000-01-23T04:56:07.000+00:00 + properties: + buildTag: + allOf: + - $ref: '#/components/schemas/BuildTag' + nullable: true + regionalContainerTags: + deprecated: true + items: + $ref: '#/components/schemas/Build_regionalContainerTags_inner' + type: array + imageSize: + description: The size (in bytes) of the Docker image built by Hathora. + format: int32 + type: integer + status: + $ref: '#/components/schemas/BuildStatus' + deletedAt: + description: When the build was deleted. + format: date-time + nullable: true + type: string + finishedAt: + description: "When [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild)\ + \ finished executing." + format: date-time + nullable: true + type: string + startedAt: + description: "When [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild)\ + \ is called." + format: date-time + nullable: true + type: string createdAt: - description: When the deployment was created. + description: "When [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild)\ + \ is called." format: date-time type: string createdBy: - description: Email address for the user that created the deployment. - example: dev@hathora.dev + description: UserId or email address for the user that created the build. + 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 - 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 @@ -3070,25 +3686,21 @@ components: example: app-af469a92-5b45-4565-b3c4-b79878de67d2 type: string required: - - additionalContainerPorts - appId - buildId - - containerPort - createdAt - createdBy - - defaultContainerPort - - deploymentId - - env - - planName - - requestedCPU - - requestedMemoryMB - - roomsPerProcess - - transportType + - deletedAt + - finishedAt + - imageSize + - regionalContainerTags + - startedAt + - status type: object - ApplicationWithDeployment: + ApplicationWithLatestDeploymentAndBuild: allOf: - $ref: '#/components/schemas/Application' - - $ref: '#/components/schemas/ApplicationWithDeployment_allOf' + - $ref: '#/components/schemas/ApplicationWithLatestDeploymentAndBuild_allOf' AppConfig: example: appName: minecraft @@ -3224,8 +3836,13 @@ components: required: - returnUrl type: object + InvoiceStatus: + enum: + - pending + - paid + - overdue + type: string Invoice: - description: Billing types example: amountDue: 0.8008281904610115 pdfUrl: pdfUrl @@ -3233,14 +3850,10 @@ components: year: 6.027456183070403 dueDate: 2000-01-23T04:56:07.000+00:00 id: id - status: pending + status: null properties: status: - enum: - - pending - - paid - - overdue - type: string + $ref: '#/components/schemas/InvoiceStatus' amountDue: format: double type: number @@ -3266,123 +3879,6 @@ components: - status - year type: object - Region: - enum: - - Seattle - - Los_Angeles - - Washington_DC - - Chicago - - London - - Frankfurt - - Mumbai - - Singapore - - Tokyo - - Sydney - - Sao_Paulo - 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)." - example: 0.1.14-14c793 - maxLength: 1000 - type: string - Build: - description: A build represents a game server artifact and its associated metadata. - example: - createdAt: 2000-01-23T04:56:07.000+00:00 - deletedAt: 2000-01-23T04:56:07.000+00:00 - buildTag: "" - regionalContainerTags: - - region: null - containerTag: containerTag - - region: null - containerTag: containerTag - createdBy: dev@hathora.dev - appId: app-af469a92-5b45-4565-b3c4-b79878de67d2 - startedAt: 2000-01-23T04:56:07.000+00:00 - buildId: 1 - imageSize: 0 - status: created - finishedAt: 2000-01-23T04:56:07.000+00:00 - properties: - buildTag: - allOf: - - $ref: '#/components/schemas/BuildTag' - nullable: true - regionalContainerTags: - deprecated: true - items: - $ref: '#/components/schemas/Build_regionalContainerTags_inner' - type: array - imageSize: - description: The size (in bytes) of the Docker image built by Hathora. - format: int32 - type: integer - status: - description: |- - Current status of your build. - - `created`: a build was created but not yet run - - `running`: the build process is actively executing - - `succeeded`: the game server artifact was successfully built and stored in the Hathora registries - - `failed`: the build process was unsuccessful, most likely due to an error with the `Dockerfile` - enum: - - created - - running - - succeeded - - failed - type: string - deletedAt: - description: When the build was deleted. - format: date-time - nullable: true - type: string - finishedAt: - description: "When [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild)\ - \ finished executing." - format: date-time - nullable: true - type: string - startedAt: - description: "When [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild)\ - \ is called." - format: date-time - nullable: true - type: string - createdAt: - description: "When [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild)\ - \ is called." - format: date-time - type: string - createdBy: - description: Email address for the user that created the build. - example: dev@hathora.dev - type: string - 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: - - appId - - buildId - - buildTag - - createdAt - - createdBy - - deletedAt - - finishedAt - - imageSize - - regionalContainerTags - - startedAt - - status - type: object CreateBuildParams: example: buildTag: 0.1.14-14c793 @@ -3420,7 +3916,14 @@ components: value: "TRUE" - name: EULA value: "TRUE" + idleTimeoutEnabled: true 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. @@ -3508,7 +4011,7 @@ components: example: createdAt: 2000-01-23T04:56:07.000+00:00 visibility: private - createdBy: dev@hathora.dev + createdBy: google-oauth2|107030234048588177467 initialConfig: "{}" appId: app-af469a92-5b45-4565-b3c4-b79878de67d2 state: "{}" @@ -3536,8 +4039,8 @@ components: format: date-time type: string createdBy: - description: Email address for the user that created the lobby. - example: dev@hathora.dev + description: UserId or email address for the user that created the lobby. + example: google-oauth2|107030234048588177467 type: string local: deprecated: true @@ -3615,7 +4118,7 @@ components: createdAt: 2000-01-23T04:56:07.000+00:00 roomConfig: "" visibility: private - createdBy: dev@hathora.dev + createdBy: google-oauth2|107030234048588177467 appId: app-af469a92-5b45-4565-b3c4-b79878de67d2 region: null shortCode: LFG4 @@ -3631,8 +4134,8 @@ components: format: date-time type: string createdBy: - description: Email address for the user that created the lobby. - example: dev@hathora.dev + description: UserId or email address for the user that created the lobby. + example: google-oauth2|107030234048588177467 type: string roomConfig: allOf: @@ -3834,11 +4337,7 @@ components: idleSince: 2000-01-23T04:56:07.000+00:00 terminatedAt: 2000-01-23T04:56:07.000+00:00 roomsPerProcess: 3 - exposedPort: - host: 1.proxy.hathora.dev - name: default - port: 34567 - transportType: tcp + exposedPort: "" startedAt: 2000-01-23T04:56:07.000+00:00 roomsAllocated: 1 roomsAllocatedUpdatedAt: 2000-01-23T04:56:07.000+00:00 @@ -3941,7 +4440,9 @@ components: maxItems: 2 type: array exposedPort: - $ref: '#/components/schemas/ExposedPort' + allOf: + - $ref: '#/components/schemas/ExposedPort' + nullable: true port: deprecated: true format: double @@ -3973,6 +4474,7 @@ components: - deploymentId - draining - egressedBytes + - exposedPort - host - idleSince - port @@ -4096,11 +4598,7 @@ components: example: terminatedAt: 2000-01-23T04:56:07.000+00:00 roomsPerProcess: 3 - exposedPort: - host: 1.proxy.hathora.dev - name: default - port: 34567 - transportType: tcp + exposedPort: "" startedAt: 2000-01-23T04:56:07.000+00:00 roomsAllocated: 1 stoppingAt: 2000-01-23T04:56:07.000+00:00 @@ -4164,7 +4662,9 @@ components: maxItems: 2 type: array exposedPort: - $ref: '#/components/schemas/ExposedPort' + allOf: + - $ref: '#/components/schemas/ExposedPort' + nullable: true region: $ref: '#/components/schemas/Region' processId: @@ -4186,6 +4686,7 @@ components: - appId - createdAt - deploymentId + - exposedPort - processId - region - roomsAllocated @@ -4388,6 +4889,116 @@ components: required: - roomConfig type: object + OrgTokenId: + description: System generated unique identifier for an organization token. + example: org-token-af469a92-5b45-4565-b3c4-b79878de67d2 + type: string + OrgTokenName: + description: Readable name for a token. Must be unique within an organization. + example: ci-token + maxLength: 64 + type: string + OrgTokenStatus: + enum: + - active + - revoked + type: string + OrgToken: + example: + createdAt: 2000-01-23T04:56:07.000+00:00 + orgTokenId: org-token-af469a92-5b45-4565-b3c4-b79878de67d2 + createdBy: createdBy + name: ci-token + lastFourCharsOfKey: lastFourCharsOfKey + orgId: orgId + status: null + properties: + createdAt: + format: date-time + type: string + createdBy: + type: string + lastFourCharsOfKey: + type: string + status: + $ref: '#/components/schemas/OrgTokenStatus' + name: + description: Readable name for a token. Must be unique within an organization. + example: ci-token + maxLength: 64 + type: string + orgId: + type: string + orgTokenId: + description: System generated unique identifier for an organization token. + example: org-token-af469a92-5b45-4565-b3c4-b79878de67d2 + type: string + required: + - createdAt + - createdBy + - lastFourCharsOfKey + - name + - orgId + - orgTokenId + - status + type: object + ListOrgTokens: + example: + tokens: + - createdAt: 2000-01-23T04:56:07.000+00:00 + orgTokenId: org-token-af469a92-5b45-4565-b3c4-b79878de67d2 + createdBy: createdBy + name: ci-token + lastFourCharsOfKey: lastFourCharsOfKey + orgId: orgId + status: null + - createdAt: 2000-01-23T04:56:07.000+00:00 + orgTokenId: org-token-af469a92-5b45-4565-b3c4-b79878de67d2 + createdBy: createdBy + name: ci-token + lastFourCharsOfKey: lastFourCharsOfKey + orgId: orgId + status: null + properties: + tokens: + items: + $ref: '#/components/schemas/OrgToken' + type: array + required: + - tokens + type: object + CreatedOrgToken: + example: + plainTextToken: plainTextToken + orgToken: + createdAt: 2000-01-23T04:56:07.000+00:00 + orgTokenId: org-token-af469a92-5b45-4565-b3c4-b79878de67d2 + createdBy: createdBy + name: ci-token + lastFourCharsOfKey: lastFourCharsOfKey + orgId: orgId + status: null + properties: + plainTextToken: + type: string + orgToken: + $ref: '#/components/schemas/OrgToken' + required: + - orgToken + - plainTextToken + type: object + CreateOrgToken: + example: + name: ci-token + properties: + name: + description: Readable name for a token. Must be unique within an organization. + example: ci-token + maxLength: 64 + type: string + required: + - name + type: object RunBuild_request: properties: file: @@ -4441,14 +5052,6 @@ components: - name - value type: object - ApplicationWithDeployment_allOf: - properties: - deployment: - $ref: '#/components/schemas/Deployment' - required: - - deployment - type: object - example: null Build_regionalContainerTags_inner: example: region: null @@ -4462,6 +5065,23 @@ components: - containerTag - region type: object + ApplicationWithLatestDeploymentAndBuild_allOf_deployment_allOf: + properties: + build: + $ref: '#/components/schemas/Build' + required: + - build + type: object + ApplicationWithLatestDeploymentAndBuild_allOf_deployment: + allOf: + - $ref: '#/components/schemas/Deployment' + - $ref: '#/components/schemas/ApplicationWithLatestDeploymentAndBuild_allOf_deployment_allOf' + ApplicationWithLatestDeploymentAndBuild_allOf: + properties: + deployment: + $ref: '#/components/schemas/ApplicationWithLatestDeploymentAndBuild_allOf_deployment' + type: object + example: null DiscoveryResponse_inner: properties: port: diff --git a/csharp/docs/AppV1Api.md b/csharp/docs/AppV1Api.md index 4054e23..e1b1314 100644 --- a/csharp/docs/AppV1Api.md +++ b/csharp/docs/AppV1Api.md @@ -99,6 +99,7 @@ catch (ApiException e) | Status code | Description | Response headers | |-------------|-------------|------------------| | **201** | | - | +| **401** | | - | | **422** | | - | | **500** | | - | @@ -189,6 +190,7 @@ void (empty response body) | Status code | Description | Response headers | |-------------|-------------|------------------| | **204** | No content | - | +| **401** | | - | | **404** | | - | | **500** | | - | @@ -283,13 +285,14 @@ catch (ApiException e) | 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) # **GetApps** -> List<ApplicationWithDeployment> GetApps () +> List<ApplicationWithLatestDeploymentAndBuild> GetApps () @@ -318,7 +321,7 @@ namespace Example try { - List result = apiInstance.GetApps(); + List result = apiInstance.GetApps(); Debug.WriteLine(result); } catch (ApiException e) @@ -338,7 +341,7 @@ This returns an ApiResponse object which contains the response data, status code ```csharp try { - ApiResponse> response = apiInstance.GetAppsWithHttpInfo(); + ApiResponse> response = apiInstance.GetAppsWithHttpInfo(); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); @@ -355,7 +358,7 @@ catch (ApiException e) This endpoint does not need any parameter. ### Return type -[**List<ApplicationWithDeployment>**](ApplicationWithDeployment.md) +[**List<ApplicationWithLatestDeploymentAndBuild>**](ApplicationWithLatestDeploymentAndBuild.md) ### Authorization @@ -465,6 +468,7 @@ catch (ApiException e) | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **401** | | - | | **404** | | - | | **422** | | - | | **500** | | - | diff --git a/csharp/docs/Application.md b/csharp/docs/Application.md index 61e797d..a75d226 100644 --- a/csharp/docs/Application.md +++ b/csharp/docs/Application.md @@ -5,11 +5,11 @@ An application object is the top level namespace for the game server. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**DeletedBy** | **string** | Email address for the user that deleted the application. | +**DeletedBy** | **string** | UserId or email address for the user that deleted the application. | **DeletedAt** | **DateTime?** | When the application was deleted. | **CreatedAt** | **DateTime** | When the application was created. | -**CreatedBy** | **string** | Email address for the user that deleted the application. | -**OrgId** | **string** | System generated unique identifier for an organization. | +**CreatedBy** | **string** | UserId or email address for the user that created the application. | +**OrgId** | **string** | System generated unique identifier for an organization. Not guaranteed to have a specific format. | **AuthConfiguration** | [**AuthConfiguration**](AuthConfiguration.md) | | **AppSecret** | **string** | Secret that is used for identity and access management. | **AppId** | **string** | System generated unique identifier for an application. | diff --git a/csharp/docs/ApplicationWithLatestDeploymentAndBuild.md b/csharp/docs/ApplicationWithLatestDeploymentAndBuild.md new file mode 100644 index 0000000..557349c --- /dev/null +++ b/csharp/docs/ApplicationWithLatestDeploymentAndBuild.md @@ -0,0 +1,19 @@ +# Hathora.Cloud.Sdk.Model.ApplicationWithLatestDeploymentAndBuild + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DeletedBy** | **string** | UserId or email address for the user that deleted the application. | +**DeletedAt** | **DateTime?** | When the application was deleted. | +**CreatedAt** | **DateTime** | When the application was created. | +**CreatedBy** | **string** | UserId or email address for the user that created the application. | +**OrgId** | **string** | System generated unique identifier for an organization. Not guaranteed to have a specific format. | +**AuthConfiguration** | [**AuthConfiguration**](AuthConfiguration.md) | | +**AppSecret** | **string** | Secret that is used for identity and access management. | +**AppId** | **string** | System generated unique identifier for an application. | +**AppName** | **string** | Readable name for an application. Must be unique within an organization. | +**Deployment** | [**ApplicationWithLatestDeploymentAndBuildAllOfDeployment**](ApplicationWithLatestDeploymentAndBuildAllOfDeployment.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/csharp/docs/ApplicationWithLatestDeploymentAndBuildAllOf.md b/csharp/docs/ApplicationWithLatestDeploymentAndBuildAllOf.md new file mode 100644 index 0000000..29a3288 --- /dev/null +++ b/csharp/docs/ApplicationWithLatestDeploymentAndBuildAllOf.md @@ -0,0 +1,10 @@ +# Hathora.Cloud.Sdk.Model.ApplicationWithLatestDeploymentAndBuildAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Deployment** | [**ApplicationWithLatestDeploymentAndBuildAllOfDeployment**](ApplicationWithLatestDeploymentAndBuildAllOfDeployment.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/csharp/docs/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.md b/csharp/docs/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.md new file mode 100644 index 0000000..281517d --- /dev/null +++ b/csharp/docs/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.md @@ -0,0 +1,25 @@ +# Hathora.Cloud.Sdk.Model.ApplicationWithLatestDeploymentAndBuildAllOfDeployment + +## Properties + +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. | +**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. | +**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. | +**Build** | [**Build**](Build.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/ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf.md b/csharp/docs/ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf.md new file mode 100644 index 0000000..9710100 --- /dev/null +++ b/csharp/docs/ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf.md @@ -0,0 +1,10 @@ +# Hathora.Cloud.Sdk.Model.ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Build** | [**Build**](Build.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/BillingV1Api.md b/csharp/docs/BillingV1Api.md index 733ee10..3c23173 100644 --- a/csharp/docs/BillingV1Api.md +++ b/csharp/docs/BillingV1Api.md @@ -91,6 +91,7 @@ This endpoint does not need any parameter. | 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) @@ -177,6 +178,7 @@ This endpoint does not need any parameter. | 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) @@ -263,6 +265,7 @@ This endpoint does not need any parameter. | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **401** | | - | | **404** | | - | | **500** | | - | @@ -355,6 +358,7 @@ catch (ApiException e) | 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/Build.md b/csharp/docs/Build.md index d99f31f..149cd4a 100644 --- a/csharp/docs/Build.md +++ b/csharp/docs/Build.md @@ -5,15 +5,15 @@ 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). | +**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] **RegionalContainerTags** | [**List<BuildRegionalContainerTagsInner>**](BuildRegionalContainerTagsInner.md) | | **ImageSize** | **int** | The size (in bytes) of the Docker image built by Hathora. | -**Status** | **string** | Current status of your build. `created`: a build was created but not yet run `running`: the build process is actively executing `succeeded`: the game server artifact was successfully built and stored in the Hathora registries `failed`: the build process was unsuccessful, most likely due to an error with the `Dockerfile` | +**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. | -**CreatedBy** | **string** | Email address for the user that created the build. | +**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/BuildStatus.md b/csharp/docs/BuildStatus.md new file mode 100644 index 0000000..55ab247 --- /dev/null +++ b/csharp/docs/BuildStatus.md @@ -0,0 +1,9 @@ +# Hathora.Cloud.Sdk.Model.BuildStatus + +## 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/BuildV1Api.md b/csharp/docs/BuildV1Api.md index 8b05770..7c9b486 100644 --- a/csharp/docs/BuildV1Api.md +++ b/csharp/docs/BuildV1Api.md @@ -101,6 +101,7 @@ catch (ApiException e) | Status code | Description | Response headers | |-------------|-------------|------------------| | **201** | | - | +| **401** | | - | | **404** | | - | | **500** | | - | @@ -193,6 +194,7 @@ void (empty response body) | Status code | Description | Response headers | |-------------|-------------|------------------| | **204** | No content | - | +| **401** | | - | | **404** | | - | | **422** | | - | | **500** | | - | @@ -290,6 +292,7 @@ catch (ApiException e) | 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) @@ -383,6 +386,7 @@ catch (ApiException e) | 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) @@ -480,6 +484,7 @@ catch (ApiException e) | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **401** | | - | | **404** | | - | | **500** | | - | diff --git a/csharp/docs/CreateOrgToken.md b/csharp/docs/CreateOrgToken.md new file mode 100644 index 0000000..7276997 --- /dev/null +++ b/csharp/docs/CreateOrgToken.md @@ -0,0 +1,10 @@ +# Hathora.Cloud.Sdk.Model.CreateOrgToken + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Readable name for a token. Must be unique within an organization. | + +[[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/CreatedOrgToken.md b/csharp/docs/CreatedOrgToken.md new file mode 100644 index 0000000..30ffb74 --- /dev/null +++ b/csharp/docs/CreatedOrgToken.md @@ -0,0 +1,11 @@ +# Hathora.Cloud.Sdk.Model.CreatedOrgToken + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PlainTextToken** | **string** | | +**OrgToken** | [**OrgToken**](OrgToken.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/Deployment.md b/csharp/docs/Deployment.md index 07ff7b1..c0e2631 100644 --- a/csharp/docs/Deployment.md +++ b/csharp/docs/Deployment.md @@ -5,6 +5,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. | **RoomsPerProcess** | **int** | Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. | **PlanName** | **PlanName** | | @@ -13,7 +14,7 @@ Name | Type | Description | Notes **TransportType** | **string** | | **ContainerPort** | **double** | | **CreatedAt** | **DateTime** | When the deployment was created. | -**CreatedBy** | **string** | Email address for the user that created the deployment. | +**CreatedBy** | **string** | UserId or email address for the user that created the deployment. | **RequestedMemoryMB** | **int** | 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. | diff --git a/csharp/docs/DeploymentConfig.md b/csharp/docs/DeploymentConfig.md index 440a892..d649c6c 100644 --- a/csharp/docs/DeploymentConfig.md +++ b/csharp/docs/DeploymentConfig.md @@ -5,6 +5,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. | **RoomsPerProcess** | **int** | Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. | **PlanName** | **PlanName** | | diff --git a/csharp/docs/DeploymentV1Api.md b/csharp/docs/DeploymentV1Api.md index a5d4b3d..9c05e2f 100644 --- a/csharp/docs/DeploymentV1Api.md +++ b/csharp/docs/DeploymentV1Api.md @@ -7,6 +7,7 @@ All URIs are relative to *https://api.hathora.dev* | [**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 | | # **CreateDeployment** @@ -102,7 +103,9 @@ catch (ApiException e) |-------------|-------------|------------------| | **201** | | - | | **400** | | - | +| **401** | | - | | **404** | | - | +| **422** | | - | | **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) @@ -198,6 +201,7 @@ catch (ApiException e) | 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) @@ -291,6 +295,101 @@ catch (ApiException e) | 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** +> Deployment 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 DeploymentV1Api(config); + var appId = "appId_example"; // string | + + try + { + Deployment result = apiInstance.GetLatestDeployment(appId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling DeploymentV1Api.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 DeploymentV1Api.GetLatestDeploymentWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **appId** | **string** | | | + +### Return type + +[**Deployment**](Deployment.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/Invoice.md b/csharp/docs/Invoice.md index 0e68829..dfc0db5 100644 --- a/csharp/docs/Invoice.md +++ b/csharp/docs/Invoice.md @@ -1,11 +1,10 @@ # Hathora.Cloud.Sdk.Model.Invoice -Billing types ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Status** | **string** | | +**Status** | **InvoiceStatus** | | **AmountDue** | **double** | | **PdfUrl** | **string** | | **DueDate** | **DateTime** | | diff --git a/csharp/docs/InvoiceStatus.md b/csharp/docs/InvoiceStatus.md new file mode 100644 index 0000000..406ac00 --- /dev/null +++ b/csharp/docs/InvoiceStatus.md @@ -0,0 +1,9 @@ +# Hathora.Cloud.Sdk.Model.InvoiceStatus + +## 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/ListOrgTokens.md b/csharp/docs/ListOrgTokens.md new file mode 100644 index 0000000..7adb2c9 --- /dev/null +++ b/csharp/docs/ListOrgTokens.md @@ -0,0 +1,10 @@ +# Hathora.Cloud.Sdk.Model.ListOrgTokens + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Tokens** | [**List<OrgToken>**](OrgToken.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/Lobby.md b/csharp/docs/Lobby.md index 902889e..8f9758b 100644 --- a/csharp/docs/Lobby.md +++ b/csharp/docs/Lobby.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **State** | **Object** | JSON blob to store metadata for a room. Must be smaller than 1MB. | [optional] **InitialConfig** | **Object** | User input to initialize the game state. Object must be smaller than 64KB. | **CreatedAt** | **DateTime** | When the lobby was created. | -**CreatedBy** | **string** | Email address for the user that created the lobby. | +**CreatedBy** | **string** | UserId or email address for the user that created the lobby. | **Local** | **bool** | | **Visibility** | **LobbyVisibility** | | **Region** | **Region** | | diff --git a/csharp/docs/LobbyV1Api.md b/csharp/docs/LobbyV1Api.md index 3dff28d..7d4936e 100644 --- a/csharp/docs/LobbyV1Api.md +++ b/csharp/docs/LobbyV1Api.md @@ -101,6 +101,7 @@ catch (ApiException e) | **200** | Ok | - | | **400** | | - | | **401** | | - | +| **402** | | - | | **404** | | - | | **422** | | - | | **429** | | - | @@ -201,6 +202,7 @@ catch (ApiException e) | **200** | Ok | - | | **400** | | - | | **401** | | - | +| **402** | | - | | **404** | | - | | **422** | | - | | **429** | | - | @@ -296,7 +298,6 @@ No authorization required | 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/LobbyV2Api.md b/csharp/docs/LobbyV2Api.md index 2771ba3..953e591 100644 --- a/csharp/docs/LobbyV2Api.md +++ b/csharp/docs/LobbyV2Api.md @@ -107,6 +107,7 @@ catch (ApiException e) | **201** | | - | | **400** | | - | | **401** | | - | +| **402** | | - | | **404** | | - | | **422** | | - | | **429** | | - | @@ -207,6 +208,7 @@ catch (ApiException e) | **201** | | - | | **400** | | - | | **401** | | - | +| **402** | | - | | **404** | | - | | **422** | | - | | **429** | | - | @@ -307,6 +309,7 @@ catch (ApiException e) | **201** | | - | | **400** | | - | | **401** | | - | +| **402** | | - | | **404** | | - | | **422** | | - | | **429** | | - | @@ -407,6 +410,7 @@ catch (ApiException e) | **201** | | - | | **400** | | - | | **401** | | - | +| **402** | | - | | **404** | | - | | **422** | | - | | **429** | | - | @@ -690,6 +694,7 @@ catch (ApiException e) | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **401** | | - | | **404** | | - | | **422** | | - | diff --git a/csharp/docs/LobbyV3.md b/csharp/docs/LobbyV3.md index 1b4266d..ad90313 100644 --- a/csharp/docs/LobbyV3.md +++ b/csharp/docs/LobbyV3.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ShortCode** | **string** | User-defined identifier for a lobby. | **CreatedAt** | **DateTime** | When the lobby was created. | -**CreatedBy** | **string** | Email address for the user that created the lobby. | +**CreatedBy** | **string** | UserId or email address for the user that created the lobby. | **RoomConfig** | **string** | 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). | **Visibility** | **LobbyVisibility** | | **Region** | **Region** | | diff --git a/csharp/docs/LobbyV3Api.md b/csharp/docs/LobbyV3Api.md index 59d9d65..ba9c288 100644 --- a/csharp/docs/LobbyV3Api.md +++ b/csharp/docs/LobbyV3Api.md @@ -106,6 +106,7 @@ catch (ApiException e) | **201** | | - | | **400** | | - | | **401** | | - | +| **402** | | - | | **404** | | - | | **422** | | - | | **429** | | - | diff --git a/csharp/docs/LogV1Api.md b/csharp/docs/LogV1Api.md index fa985d7..3a38a98 100644 --- a/csharp/docs/LogV1Api.md +++ b/csharp/docs/LogV1Api.md @@ -101,9 +101,9 @@ catch (ApiException e) |-------------|-------------|------------------| | **200** | Ok | - | | **400** | | - | +| **401** | | - | | **404** | | - | | **410** | | - | -| **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) @@ -202,6 +202,7 @@ catch (ApiException e) | 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) @@ -301,6 +302,7 @@ catch (ApiException e) | 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) @@ -401,6 +403,7 @@ catch (ApiException e) |-------------|-------------|------------------| | **200** | Ok | - | | **400** | | - | +| **401** | | - | | **404** | | - | | **410** | | - | | **500** | | - | diff --git a/csharp/docs/ManagementV1Api.md b/csharp/docs/ManagementV1Api.md index ab59a1b..52c1e10 100644 --- a/csharp/docs/ManagementV1Api.md +++ b/csharp/docs/ManagementV1Api.md @@ -90,6 +90,7 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **401** | | - | | **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/MetricsV1Api.md b/csharp/docs/MetricsV1Api.md index b7574f2..695e8ff 100644 --- a/csharp/docs/MetricsV1Api.md +++ b/csharp/docs/MetricsV1Api.md @@ -105,6 +105,7 @@ catch (ApiException e) | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **401** | | - | | **404** | | - | | **422** | | - | | **500** | | - | diff --git a/csharp/docs/OrgToken.md b/csharp/docs/OrgToken.md new file mode 100644 index 0000000..01ef5d8 --- /dev/null +++ b/csharp/docs/OrgToken.md @@ -0,0 +1,16 @@ +# Hathora.Cloud.Sdk.Model.OrgToken + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | **DateTime** | | +**CreatedBy** | **string** | | +**LastFourCharsOfKey** | **string** | | +**Status** | **OrgTokenStatus** | | +**Name** | **string** | Readable name for a token. Must be unique within an organization. | +**OrgId** | **string** | | +**OrgTokenId** | **string** | System generated unique identifier for an organization 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/OrgTokenStatus.md b/csharp/docs/OrgTokenStatus.md new file mode 100644 index 0000000..4b9046d --- /dev/null +++ b/csharp/docs/OrgTokenStatus.md @@ -0,0 +1,9 @@ +# Hathora.Cloud.Sdk.Model.OrgTokenStatus + +## 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/OrgTokensV1Api.md b/csharp/docs/OrgTokensV1Api.md new file mode 100644 index 0000000..07ddfee --- /dev/null +++ b/csharp/docs/OrgTokensV1Api.md @@ -0,0 +1,297 @@ +# Hathora.Cloud.Sdk.Api.OrgTokensV1Api + +All URIs are relative to *https://api.hathora.dev* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**CreateOrgToken**](OrgTokensV1Api.md#createorgtoken) | **POST** /tokens/v1/orgs/{orgId}/create | | +| [**GetOrgTokens**](OrgTokensV1Api.md#getorgtokens) | **GET** /tokens/v1/orgs/{orgId} | | +| [**RevokeOrgToken**](OrgTokensV1Api.md#revokeorgtoken) | **POST** /tokens/v1/orgs/{orgId}/tokens/{orgTokenId}/revoke | | + + +# **CreateOrgToken** +> CreatedOrgToken CreateOrgToken (string orgId, CreateOrgToken createOrgToken) + + + +Create a new organization token. + +### 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 CreateOrgTokenExample + { + 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 OrgTokensV1Api(config); + var orgId = "orgId_example"; // string | + var createOrgToken = new CreateOrgToken(); // CreateOrgToken | + + try + { + CreatedOrgToken result = apiInstance.CreateOrgToken(orgId, createOrgToken); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OrgTokensV1Api.CreateOrgToken: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the CreateOrgTokenWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.CreateOrgTokenWithHttpInfo(orgId, createOrgToken); + 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 OrgTokensV1Api.CreateOrgTokenWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **orgId** | **string** | | | +| **createOrgToken** | [**CreateOrgToken**](CreateOrgToken.md) | | | + +### Return type + +[**CreatedOrgToken**](CreatedOrgToken.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** | | - | +| **422** | | - | + +[[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) + + +# **GetOrgTokens** +> ListOrgTokens GetOrgTokens (string orgId) + + + +List all organization tokens for a given org. + +### 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 GetOrgTokensExample + { + 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 OrgTokensV1Api(config); + var orgId = "orgId_example"; // string | + + try + { + ListOrgTokens result = apiInstance.GetOrgTokens(orgId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OrgTokensV1Api.GetOrgTokens: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetOrgTokensWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.GetOrgTokensWithHttpInfo(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 OrgTokensV1Api.GetOrgTokensWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **orgId** | **string** | | | + +### Return type + +[**ListOrgTokens**](ListOrgTokens.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) + + +# **RevokeOrgToken** +> bool RevokeOrgToken (string orgId, string orgTokenId) + + + +Revoke an organization token. + +### 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 RevokeOrgTokenExample + { + 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 OrgTokensV1Api(config); + var orgId = "orgId_example"; // string | + var orgTokenId = "orgTokenId_example"; // string | + + try + { + bool result = apiInstance.RevokeOrgToken(orgId, orgTokenId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OrgTokensV1Api.RevokeOrgToken: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the RevokeOrgTokenWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + ApiResponse response = apiInstance.RevokeOrgTokenWithHttpInfo(orgId, orgTokenId); + 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 OrgTokensV1Api.RevokeOrgTokenWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **orgId** | **string** | | | +| **orgTokenId** | **string** | | | + +### Return type + +**bool** + +### 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/Process.md b/csharp/docs/Process.md index cc84768..25d3b57 100644 --- a/csharp/docs/Process.md +++ b/csharp/docs/Process.md @@ -20,7 +20,7 @@ Name | Type | Description | Notes **StartingAt** | **DateTime** | When the process started being provisioned. | **RoomsPerProcess** | **int** | Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. | **AdditionalExposedPorts** | [**List<ExposedPort>**](ExposedPort.md) | | -**ExposedPort** | [**ExposedPort**](ExposedPort.md) | | [optional] +**ExposedPort** | [**ExposedPort**](ExposedPort.md) | | **Port** | **double** | | **Host** | **string** | | **Region** | **Region** | | diff --git a/csharp/docs/ProcessV2.md b/csharp/docs/ProcessV2.md index 190a70b..cfa11ae 100644 --- a/csharp/docs/ProcessV2.md +++ b/csharp/docs/ProcessV2.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **CreatedAt** | **DateTime** | When the process started being provisioned. | **RoomsPerProcess** | **int** | Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. | **AdditionalExposedPorts** | [**List<ExposedPort>**](ExposedPort.md) | | -**ExposedPort** | [**ExposedPort**](ExposedPort.md) | | [optional] +**ExposedPort** | [**ExposedPort**](ExposedPort.md) | | **Region** | **Region** | | **ProcessId** | **string** | System generated unique identifier to a runtime instance of your game server. | **DeploymentId** | **int** | System generated id for a deployment. Increments by 1. | diff --git a/csharp/docs/ProcessWithRooms.md b/csharp/docs/ProcessWithRooms.md index 5c4b96d..a7fba30 100644 --- a/csharp/docs/ProcessWithRooms.md +++ b/csharp/docs/ProcessWithRooms.md @@ -19,7 +19,7 @@ Name | Type | Description | Notes **StartingAt** | **DateTime** | When the process started being provisioned. | **RoomsPerProcess** | **int** | Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. | **AdditionalExposedPorts** | [**List<ExposedPort>**](ExposedPort.md) | | -**ExposedPort** | [**ExposedPort**](ExposedPort.md) | | [optional] +**ExposedPort** | [**ExposedPort**](ExposedPort.md) | | **Port** | **double** | | **Host** | **string** | | **Region** | **Region** | | diff --git a/csharp/docs/ProcessesV1Api.md b/csharp/docs/ProcessesV1Api.md index baf6b5d..fca341d 100644 --- a/csharp/docs/ProcessesV1Api.md +++ b/csharp/docs/ProcessesV1Api.md @@ -99,6 +99,7 @@ catch (ApiException e) | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **401** | | - | | **404** | | - | | **500** | | - | @@ -195,6 +196,7 @@ catch (ApiException e) | 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) @@ -290,6 +292,7 @@ catch (ApiException e) | 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/ProcessesV2Api.md b/csharp/docs/ProcessesV2Api.md index 44c25ee..e104785 100644 --- a/csharp/docs/ProcessesV2Api.md +++ b/csharp/docs/ProcessesV2Api.md @@ -6,6 +6,7 @@ All URIs are relative to *https://api.hathora.dev* |--------|--------------|-------------| | [**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} | | # **GetLatestProcesses** @@ -100,6 +101,7 @@ catch (ApiException e) | 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) @@ -195,6 +197,99 @@ catch (ApiException e) | 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) + + +# **StopProcess** +> void StopProcess (string appId, string processId) + + + +Stops a [process](https://hathora.dev/docs/concepts/hathora-entities#process) immediately. + +### 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 StopProcessExample + { + 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 processId = "processId_example"; // string | + + try + { + apiInstance.StopProcess(appId, processId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ProcessesV2Api.StopProcess: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the StopProcessWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + apiInstance.StopProcessWithHttpInfo(appId, processId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling ProcessesV2Api.StopProcessWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **appId** | **string** | | | +| **processId** | **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** | | - | | **500** | | - | diff --git a/csharp/docs/RoomV1Api.md b/csharp/docs/RoomV1Api.md index f9da469..12ccfe4 100644 --- a/csharp/docs/RoomV1Api.md +++ b/csharp/docs/RoomV1Api.md @@ -104,6 +104,7 @@ catch (ApiException e) |-------------|-------------|------------------| | **201** | | - | | **400** | | - | +| **401** | | - | | **402** | | - | | **403** | | - | | **404** | | - | @@ -196,6 +197,7 @@ void (empty response body) | Status code | Description | Response headers | |-------------|-------------|------------------| | **204** | No content | - | +| **401** | | - | | **404** | | - | | **500** | | - | @@ -290,6 +292,7 @@ catch (ApiException e) | 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) @@ -381,6 +384,7 @@ No authorization required |-------------|-------------|------------------| | **200** | Ok | - | | **400** | | - | +| **402** | | - | | **404** | | - | | **500** | | - | @@ -475,6 +479,7 @@ catch (ApiException e) | 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) @@ -568,6 +573,7 @@ catch (ApiException e) | 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) @@ -657,6 +663,7 @@ void (empty response body) | Status code | Description | Response headers | |-------------|-------------|------------------| | **204** | No content | - | +| **401** | | - | | **404** | | - | | **500** | | - | diff --git a/csharp/docs/RoomV2Api.md b/csharp/docs/RoomV2Api.md index b56ada2..8562fbf 100644 --- a/csharp/docs/RoomV2Api.md +++ b/csharp/docs/RoomV2Api.md @@ -107,6 +107,7 @@ catch (ApiException e) |-------------|-------------|------------------| | **201** | | - | | **400** | | - | +| **401** | | - | | **402** | | - | | **403** | | - | | **404** | | - | @@ -201,6 +202,7 @@ void (empty response body) | Status code | Description | Response headers | |-------------|-------------|------------------| | **204** | No content | - | +| **401** | | - | | **404** | | - | | **500** | | - | @@ -297,6 +299,7 @@ catch (ApiException e) | 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) @@ -390,6 +393,7 @@ No authorization required |-------------|-------------|------------------| | **200** | Ok | - | | **400** | | - | +| **402** | | - | | **404** | | - | | **500** | | - | @@ -486,6 +490,7 @@ catch (ApiException e) | 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) @@ -581,6 +586,7 @@ catch (ApiException e) | 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) @@ -672,6 +678,7 @@ void (empty response body) | Status code | Description | Response headers | |-------------|-------------|------------------| | **204** | No content | - | +| **401** | | - | | **404** | | - | | **500** | | - | @@ -764,6 +771,7 @@ void (empty response body) | Status code | Description | Response headers | |-------------|-------------|------------------| | **204** | No content | - | +| **401** | | - | | **404** | | - | | **500** | | - | diff --git a/csharp/src/Hathora.Cloud.Sdk.Test/Api/OrgTokensV1ApiTests.cs b/csharp/src/Hathora.Cloud.Sdk.Test/Api/OrgTokensV1ApiTests.cs new file mode 100644 index 0000000..6d7fdb6 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk.Test/Api/OrgTokensV1ApiTests.cs @@ -0,0 +1,94 @@ +/* + * 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 OrgTokensV1Api + /// + /// + /// 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 OrgTokensV1ApiTests : IDisposable + { + private OrgTokensV1Api instance; + + public OrgTokensV1ApiTests() + { + instance = new OrgTokensV1Api(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of OrgTokensV1Api + /// + [Test] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' OrgTokensV1Api + //Assert.IsType(instance); + } + + /// + /// Test CreateOrgToken + /// + [Test] + public void CreateOrgTokenTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string orgId = null; + //CreateOrgToken createOrgToken = null; + //var response = instance.CreateOrgToken(orgId, createOrgToken); + //Assert.IsType(response); + } + + /// + /// Test GetOrgTokens + /// + [Test] + public void GetOrgTokensTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string orgId = null; + //var response = instance.GetOrgTokens(orgId); + //Assert.IsType(response); + } + + /// + /// Test RevokeOrgToken + /// + [Test] + public void RevokeOrgTokenTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string orgId = null; + //string orgTokenId = null; + //var response = instance.RevokeOrgToken(orgId, orgTokenId); + //Assert.IsType(response); + } + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk.Test/Model/ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOfTests.cs b/csharp/src/Hathora.Cloud.Sdk.Test/Model/ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOfTests.cs new file mode 100644 index 0000000..5bc1244 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk.Test/Model/ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOfTests.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 ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOfTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf + //private ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf instance; + + public ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOfTests() + { + // TODO uncomment below to create an instance of ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf + //instance = new ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf + /// + [Test] + public void ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOfInstanceTest() + { + // TODO uncomment below to test "IsType" ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf + //Assert.IsType(instance); + } + + /// + /// Test the property 'Build' + /// + [Test] + public void BuildTest() + { + // TODO unit test for the property 'Build' + } + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk.Test/Model/ApplicationWithLatestDeploymentAndBuildAllOfDeploymentTests.cs b/csharp/src/Hathora.Cloud.Sdk.Test/Model/ApplicationWithLatestDeploymentAndBuildAllOfDeploymentTests.cs new file mode 100644 index 0000000..29bdf53 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk.Test/Model/ApplicationWithLatestDeploymentAndBuildAllOfDeploymentTests.cs @@ -0,0 +1,186 @@ +/* + * 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 ApplicationWithLatestDeploymentAndBuildAllOfDeployment + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ApplicationWithLatestDeploymentAndBuildAllOfDeploymentTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ApplicationWithLatestDeploymentAndBuildAllOfDeployment + //private ApplicationWithLatestDeploymentAndBuildAllOfDeployment instance; + + public ApplicationWithLatestDeploymentAndBuildAllOfDeploymentTests() + { + // TODO uncomment below to create an instance of ApplicationWithLatestDeploymentAndBuildAllOfDeployment + //instance = new ApplicationWithLatestDeploymentAndBuildAllOfDeployment(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ApplicationWithLatestDeploymentAndBuildAllOfDeployment + /// + [Test] + public void ApplicationWithLatestDeploymentAndBuildAllOfDeploymentInstanceTest() + { + // TODO uncomment below to test "IsType" ApplicationWithLatestDeploymentAndBuildAllOfDeployment + //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 'PlanName' + /// + [Test] + public void PlanNameTest() + { + // TODO unit test for the property 'PlanName' + } + /// + /// 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 '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 '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' + } + /// + /// Test the property 'Build' + /// + [Test] + public void BuildTest() + { + // TODO unit test for the property 'Build' + } + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk.Test/Model/ApplicationWithLatestDeploymentAndBuildAllOfTests.cs b/csharp/src/Hathora.Cloud.Sdk.Test/Model/ApplicationWithLatestDeploymentAndBuildAllOfTests.cs new file mode 100644 index 0000000..d402f6a --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk.Test/Model/ApplicationWithLatestDeploymentAndBuildAllOfTests.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 ApplicationWithLatestDeploymentAndBuildAllOf + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ApplicationWithLatestDeploymentAndBuildAllOfTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ApplicationWithLatestDeploymentAndBuildAllOf + //private ApplicationWithLatestDeploymentAndBuildAllOf instance; + + public ApplicationWithLatestDeploymentAndBuildAllOfTests() + { + // TODO uncomment below to create an instance of ApplicationWithLatestDeploymentAndBuildAllOf + //instance = new ApplicationWithLatestDeploymentAndBuildAllOf(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ApplicationWithLatestDeploymentAndBuildAllOf + /// + [Test] + public void ApplicationWithLatestDeploymentAndBuildAllOfInstanceTest() + { + // TODO uncomment below to test "IsType" ApplicationWithLatestDeploymentAndBuildAllOf + //Assert.IsType(instance); + } + + /// + /// Test the property 'Deployment' + /// + [Test] + public void DeploymentTest() + { + // TODO unit test for the property 'Deployment' + } + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk.Test/Model/ApplicationWithLatestDeploymentAndBuildTests.cs b/csharp/src/Hathora.Cloud.Sdk.Test/Model/ApplicationWithLatestDeploymentAndBuildTests.cs new file mode 100644 index 0000000..bf981f4 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk.Test/Model/ApplicationWithLatestDeploymentAndBuildTests.cs @@ -0,0 +1,138 @@ +/* + * 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 ApplicationWithLatestDeploymentAndBuild + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ApplicationWithLatestDeploymentAndBuildTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ApplicationWithLatestDeploymentAndBuild + //private ApplicationWithLatestDeploymentAndBuild instance; + + public ApplicationWithLatestDeploymentAndBuildTests() + { + // TODO uncomment below to create an instance of ApplicationWithLatestDeploymentAndBuild + //instance = new ApplicationWithLatestDeploymentAndBuild(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ApplicationWithLatestDeploymentAndBuild + /// + [Test] + public void ApplicationWithLatestDeploymentAndBuildInstanceTest() + { + // TODO uncomment below to test "IsType" ApplicationWithLatestDeploymentAndBuild + //Assert.IsType(instance); + } + + /// + /// Test the property 'DeletedBy' + /// + [Test] + public void DeletedByTest() + { + // TODO unit test for the property 'DeletedBy' + } + /// + /// Test the property 'DeletedAt' + /// + [Test] + public void DeletedAtTest() + { + // TODO unit test for the property 'DeletedAt' + } + /// + /// 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 'OrgId' + /// + [Test] + public void OrgIdTest() + { + // TODO unit test for the property 'OrgId' + } + /// + /// Test the property 'AuthConfiguration' + /// + [Test] + public void AuthConfigurationTest() + { + // TODO unit test for the property 'AuthConfiguration' + } + /// + /// Test the property 'AppSecret' + /// + [Test] + public void AppSecretTest() + { + // TODO unit test for the property 'AppSecret' + } + /// + /// Test the property 'AppId' + /// + [Test] + public void AppIdTest() + { + // TODO unit test for the property 'AppId' + } + /// + /// Test the property 'AppName' + /// + [Test] + public void AppNameTest() + { + // TODO unit test for the property 'AppName' + } + /// + /// Test the property 'Deployment' + /// + [Test] + public void DeploymentTest() + { + // TODO unit test for the property 'Deployment' + } + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk.Test/Model/BuildStatusTests.cs b/csharp/src/Hathora.Cloud.Sdk.Test/Model/BuildStatusTests.cs new file mode 100644 index 0000000..4eced9c --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk.Test/Model/BuildStatusTests.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 BuildStatus + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class BuildStatusTests : IDisposable + { + // TODO uncomment below to declare an instance variable for BuildStatus + //private BuildStatus instance; + + public BuildStatusTests() + { + // TODO uncomment below to create an instance of BuildStatus + //instance = new BuildStatus(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of BuildStatus + /// + [Test] + public void BuildStatusInstanceTest() + { + // TODO uncomment below to test "IsType" BuildStatus + //Assert.IsType(instance); + } + + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk.Test/Model/CreateOrgTokenTests.cs b/csharp/src/Hathora.Cloud.Sdk.Test/Model/CreateOrgTokenTests.cs new file mode 100644 index 0000000..bb15d0b --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk.Test/Model/CreateOrgTokenTests.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 CreateOrgToken + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class CreateOrgTokenTests : IDisposable + { + // TODO uncomment below to declare an instance variable for CreateOrgToken + //private CreateOrgToken instance; + + public CreateOrgTokenTests() + { + // TODO uncomment below to create an instance of CreateOrgToken + //instance = new CreateOrgToken(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of CreateOrgToken + /// + [Test] + public void CreateOrgTokenInstanceTest() + { + // TODO uncomment below to test "IsType" CreateOrgToken + //Assert.IsType(instance); + } + + /// + /// 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/CreatedOrgTokenTests.cs b/csharp/src/Hathora.Cloud.Sdk.Test/Model/CreatedOrgTokenTests.cs new file mode 100644 index 0000000..1ec1ec9 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk.Test/Model/CreatedOrgTokenTests.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 CreatedOrgToken + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class CreatedOrgTokenTests : IDisposable + { + // TODO uncomment below to declare an instance variable for CreatedOrgToken + //private CreatedOrgToken instance; + + public CreatedOrgTokenTests() + { + // TODO uncomment below to create an instance of CreatedOrgToken + //instance = new CreatedOrgToken(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of CreatedOrgToken + /// + [Test] + public void CreatedOrgTokenInstanceTest() + { + // TODO uncomment below to test "IsType" CreatedOrgToken + //Assert.IsType(instance); + } + + /// + /// Test the property 'PlainTextToken' + /// + [Test] + public void PlainTextTokenTest() + { + // TODO unit test for the property 'PlainTextToken' + } + /// + /// Test the property 'OrgToken' + /// + [Test] + public void OrgTokenTest() + { + // TODO unit test for the property 'OrgToken' + } + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk.Test/Model/InvoiceStatusTests.cs b/csharp/src/Hathora.Cloud.Sdk.Test/Model/InvoiceStatusTests.cs new file mode 100644 index 0000000..4347a12 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk.Test/Model/InvoiceStatusTests.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 InvoiceStatus + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class InvoiceStatusTests : IDisposable + { + // TODO uncomment below to declare an instance variable for InvoiceStatus + //private InvoiceStatus instance; + + public InvoiceStatusTests() + { + // TODO uncomment below to create an instance of InvoiceStatus + //instance = new InvoiceStatus(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of InvoiceStatus + /// + [Test] + public void InvoiceStatusInstanceTest() + { + // TODO uncomment below to test "IsType" InvoiceStatus + //Assert.IsType(instance); + } + + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk.Test/Model/ListOrgTokensTests.cs b/csharp/src/Hathora.Cloud.Sdk.Test/Model/ListOrgTokensTests.cs new file mode 100644 index 0000000..0391300 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk.Test/Model/ListOrgTokensTests.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 ListOrgTokens + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ListOrgTokensTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ListOrgTokens + //private ListOrgTokens instance; + + public ListOrgTokensTests() + { + // TODO uncomment below to create an instance of ListOrgTokens + //instance = new ListOrgTokens(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ListOrgTokens + /// + [Test] + public void ListOrgTokensInstanceTest() + { + // TODO uncomment below to test "IsType" ListOrgTokens + //Assert.IsType(instance); + } + + /// + /// Test the property 'Tokens' + /// + [Test] + public void TokensTest() + { + // TODO unit test for the property 'Tokens' + } + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk.Test/Model/OrgTokenStatusTests.cs b/csharp/src/Hathora.Cloud.Sdk.Test/Model/OrgTokenStatusTests.cs new file mode 100644 index 0000000..ce85499 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk.Test/Model/OrgTokenStatusTests.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 OrgTokenStatus + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class OrgTokenStatusTests : IDisposable + { + // TODO uncomment below to declare an instance variable for OrgTokenStatus + //private OrgTokenStatus instance; + + public OrgTokenStatusTests() + { + // TODO uncomment below to create an instance of OrgTokenStatus + //instance = new OrgTokenStatus(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of OrgTokenStatus + /// + [Test] + public void OrgTokenStatusInstanceTest() + { + // TODO uncomment below to test "IsType" OrgTokenStatus + //Assert.IsType(instance); + } + + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk.Test/Model/OrgTokenTests.cs b/csharp/src/Hathora.Cloud.Sdk.Test/Model/OrgTokenTests.cs new file mode 100644 index 0000000..93cb48d --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk.Test/Model/OrgTokenTests.cs @@ -0,0 +1,114 @@ +/* + * 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 OrgToken + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class OrgTokenTests : IDisposable + { + // TODO uncomment below to declare an instance variable for OrgToken + //private OrgToken instance; + + public OrgTokenTests() + { + // TODO uncomment below to create an instance of OrgToken + //instance = new OrgToken(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of OrgToken + /// + [Test] + public void OrgTokenInstanceTest() + { + // TODO uncomment below to test "IsType" OrgToken + //Assert.IsType(instance); + } + + /// + /// 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 'LastFourCharsOfKey' + /// + [Test] + public void LastFourCharsOfKeyTest() + { + // TODO unit test for the property 'LastFourCharsOfKey' + } + /// + /// Test the property 'Status' + /// + [Test] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'OrgId' + /// + [Test] + public void OrgIdTest() + { + // TODO unit test for the property 'OrgId' + } + /// + /// Test the property 'OrgTokenId' + /// + [Test] + public void OrgTokenIdTest() + { + // TODO unit test for the property 'OrgTokenId' + } + } +} diff --git a/csharp/src/Hathora.Cloud.Sdk/Api/AppV1Api.cs b/csharp/src/Hathora.Cloud.Sdk/Api/AppV1Api.cs index abb14ed..a22f5cd 100644 --- a/csharp/src/Hathora.Cloud.Sdk/Api/AppV1Api.cs +++ b/csharp/src/Hathora.Cloud.Sdk/Api/AppV1Api.cs @@ -96,8 +96,8 @@ public interface IAppV1ApiSync : IApiAccessor /// 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`. /// /// Thrown when fails to make API call - /// List<ApplicationWithDeployment> - List GetApps(); + /// List<ApplicationWithLatestDeploymentAndBuild> + List GetApps(); /// /// @@ -106,8 +106,8 @@ public interface IAppV1ApiSync : IApiAccessor /// 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`. /// /// Thrown when fails to make API call - /// ApiResponse of List<ApplicationWithDeployment> - ApiResponse> GetAppsWithHttpInfo(); + /// ApiResponse of List<ApplicationWithLatestDeploymentAndBuild> + ApiResponse> GetAppsWithHttpInfo(); /// /// /// @@ -217,8 +217,8 @@ public interface IAppV1ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Cancellation Token to cancel the request. - /// Task of List<ApplicationWithDeployment> - System.Threading.Tasks.Task> GetAppsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of List<ApplicationWithLatestDeploymentAndBuild> + System.Threading.Tasks.Task> GetAppsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -228,8 +228,8 @@ public interface IAppV1ApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<ApplicationWithDeployment>) - System.Threading.Tasks.Task>> GetAppsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (List<ApplicationWithLatestDeploymentAndBuild>) + System.Threading.Tasks.Task>> GetAppsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -817,10 +817,10 @@ public Hathora.Cloud.Sdk.Client.ApiResponse GetAppInfoWithHttpInfo( /// 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`. /// /// Thrown when fails to make API call - /// List<ApplicationWithDeployment> - public List GetApps() + /// List<ApplicationWithLatestDeploymentAndBuild> + public List GetApps() { - Hathora.Cloud.Sdk.Client.ApiResponse> localVarResponse = GetAppsWithHttpInfo(); + Hathora.Cloud.Sdk.Client.ApiResponse> localVarResponse = GetAppsWithHttpInfo(); return localVarResponse.Data; } @@ -828,8 +828,8 @@ public List GetApps() /// 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`. /// /// Thrown when fails to make API call - /// ApiResponse of List<ApplicationWithDeployment> - public Hathora.Cloud.Sdk.Client.ApiResponse> GetAppsWithHttpInfo() + /// ApiResponse of List<ApplicationWithLatestDeploymentAndBuild> + public Hathora.Cloud.Sdk.Client.ApiResponse> GetAppsWithHttpInfo() { Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); @@ -856,7 +856,7 @@ public Hathora.Cloud.Sdk.Client.ApiResponse> Get } // make the HTTP request - var localVarResponse = this.Client.Get>("/apps/v1/list", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get>("/apps/v1/list", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { @@ -872,14 +872,14 @@ public Hathora.Cloud.Sdk.Client.ApiResponse> Get /// /// Thrown when fails to make API call /// Cancellation Token to cancel the request. - /// Task of List<ApplicationWithDeployment> - public async System.Threading.Tasks.Task> GetAppsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of List<ApplicationWithLatestDeploymentAndBuild> + public async System.Threading.Tasks.Task> GetAppsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { var task = GetAppsWithHttpInfoAsync(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; } @@ -889,8 +889,8 @@ public Hathora.Cloud.Sdk.Client.ApiResponse> Get /// /// Thrown when fails to make API call /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<ApplicationWithDeployment>) - public async System.Threading.Tasks.Task>> GetAppsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (List<ApplicationWithLatestDeploymentAndBuild>) + public async System.Threading.Tasks.Task>> GetAppsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Hathora.Cloud.Sdk.Client.RequestOptions localVarRequestOptions = new Hathora.Cloud.Sdk.Client.RequestOptions(); @@ -920,7 +920,7 @@ public Hathora.Cloud.Sdk.Client.ApiResponse> Get // make the HTTP request - var task = this.AsynchronousClient.GetAsync>("/apps/v1/list", localVarRequestOptions, this.Configuration, cancellationToken); + var task = this.AsynchronousClient.GetAsync>("/apps/v1/list", localVarRequestOptions, this.Configuration, cancellationToken); #if UNITY_EDITOR || !UNITY_WEBGL var localVarResponse = await task.ConfigureAwait(false); diff --git a/csharp/src/Hathora.Cloud.Sdk/Api/DeploymentV1Api.cs b/csharp/src/Hathora.Cloud.Sdk/Api/DeploymentV1Api.cs index c3f5ff6..ab54d43 100644 --- a/csharp/src/Hathora.Cloud.Sdk/Api/DeploymentV1Api.cs +++ b/csharp/src/Hathora.Cloud.Sdk/Api/DeploymentV1Api.cs @@ -95,6 +95,27 @@ public interface IDeploymentV1ApiSync : IApiAccessor /// /// ApiResponse of List<Deployment> 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 + /// + /// Deployment + Deployment 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 Deployment + ApiResponse GetLatestDeploymentWithHttpInfo(string appId); #endregion Synchronous Operations } @@ -179,6 +200,29 @@ 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)); + /// + /// + /// + /// + /// 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 Deployment + 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 (Deployment) + System.Threading.Tasks.Task> GetLatestDeploymentWithHttpInfoAsync(string appId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -765,5 +809,143 @@ public Hathora.Cloud.Sdk.Client.ApiResponse> GetDeploymentsWith 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 + /// + /// Deployment + public Deployment 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 Deployment + 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 DeploymentV1Api->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/v1/{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 Deployment + 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 (Deployment) + 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 DeploymentV1Api->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/v1/{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/OrgTokensV1Api.cs b/csharp/src/Hathora.Cloud.Sdk/Api/OrgTokensV1Api.cs new file mode 100644 index 0000000..399cb4a --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk/Api/OrgTokensV1Api.cs @@ -0,0 +1,767 @@ +/* + * 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 IOrgTokensV1ApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// + /// + /// + /// Create a new organization token. + /// + /// Thrown when fails to make API call + /// + /// + /// CreatedOrgToken + CreatedOrgToken CreateOrgToken(string orgId, CreateOrgToken createOrgToken); + + /// + /// + /// + /// + /// Create a new organization token. + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of CreatedOrgToken + ApiResponse CreateOrgTokenWithHttpInfo(string orgId, CreateOrgToken createOrgToken); + /// + /// + /// + /// + /// List all organization tokens for a given org. + /// + /// Thrown when fails to make API call + /// + /// ListOrgTokens + ListOrgTokens GetOrgTokens(string orgId); + + /// + /// + /// + /// + /// List all organization tokens for a given org. + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of ListOrgTokens + ApiResponse GetOrgTokensWithHttpInfo(string orgId); + /// + /// + /// + /// + /// Revoke an organization token. + /// + /// Thrown when fails to make API call + /// + /// + /// bool + bool RevokeOrgToken(string orgId, string orgTokenId); + + /// + /// + /// + /// + /// Revoke an organization token. + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of bool + ApiResponse RevokeOrgTokenWithHttpInfo(string orgId, string orgTokenId); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IOrgTokensV1ApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// + /// + /// + /// Create a new organization token. + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of CreatedOrgToken + System.Threading.Tasks.Task CreateOrgTokenAsync(string orgId, CreateOrgToken createOrgToken, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Create a new organization token. + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CreatedOrgToken) + System.Threading.Tasks.Task> CreateOrgTokenWithHttpInfoAsync(string orgId, CreateOrgToken createOrgToken, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// List all organization tokens for a given org. + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ListOrgTokens + System.Threading.Tasks.Task GetOrgTokensAsync(string orgId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// List all organization tokens for a given org. + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListOrgTokens) + System.Threading.Tasks.Task> GetOrgTokensWithHttpInfoAsync(string orgId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Revoke an organization token. + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of bool + System.Threading.Tasks.Task RevokeOrgTokenAsync(string orgId, string orgTokenId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Revoke an organization token. + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (bool) + System.Threading.Tasks.Task> RevokeOrgTokenWithHttpInfoAsync(string orgId, string orgTokenId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IOrgTokensV1Api : IOrgTokensV1ApiSync, IOrgTokensV1ApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class OrgTokensV1Api : IDisposable, IOrgTokensV1Api + { + 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 OrgTokensV1Api() : 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 OrgTokensV1Api(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 OrgTokensV1Api(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 OrgTokensV1Api(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 organization token. + /// + /// Thrown when fails to make API call + /// + /// + /// CreatedOrgToken + public CreatedOrgToken CreateOrgToken(string orgId, CreateOrgToken createOrgToken) + { + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = CreateOrgTokenWithHttpInfo(orgId, createOrgToken); + return localVarResponse.Data; + } + + /// + /// Create a new organization token. + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of CreatedOrgToken + public Hathora.Cloud.Sdk.Client.ApiResponse CreateOrgTokenWithHttpInfo(string orgId, CreateOrgToken createOrgToken) + { + // verify the required parameter 'orgId' is set + if (orgId == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'orgId' when calling OrgTokensV1Api->CreateOrgToken"); + + // verify the required parameter 'createOrgToken' is set + if (createOrgToken == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'createOrgToken' when calling OrgTokensV1Api->CreateOrgToken"); + + 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 = createOrgToken; + + // 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("/tokens/v1/orgs/{orgId}/create", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateOrgToken", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Create a new organization token. + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of CreatedOrgToken + public async System.Threading.Tasks.Task CreateOrgTokenAsync(string orgId, CreateOrgToken createOrgToken, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var task = CreateOrgTokenWithHttpInfoAsync(orgId, createOrgToken, 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 organization token. + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CreatedOrgToken) + public async System.Threading.Tasks.Task> CreateOrgTokenWithHttpInfoAsync(string orgId, CreateOrgToken createOrgToken, 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 OrgTokensV1Api->CreateOrgToken"); + + // verify the required parameter 'createOrgToken' is set + if (createOrgToken == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'createOrgToken' when calling OrgTokensV1Api->CreateOrgToken"); + + + 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 = createOrgToken; + + // 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("/tokens/v1/orgs/{orgId}/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("CreateOrgToken", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// List all organization tokens for a given org. + /// + /// Thrown when fails to make API call + /// + /// ListOrgTokens + public ListOrgTokens GetOrgTokens(string orgId) + { + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = GetOrgTokensWithHttpInfo(orgId); + return localVarResponse.Data; + } + + /// + /// List all organization tokens for a given org. + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of ListOrgTokens + public Hathora.Cloud.Sdk.Client.ApiResponse GetOrgTokensWithHttpInfo(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 OrgTokensV1Api->GetOrgTokens"); + + 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("/tokens/v1/orgs/{orgId}", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetOrgTokens", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// List all organization tokens for a given org. + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ListOrgTokens + public async System.Threading.Tasks.Task GetOrgTokensAsync(string orgId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var task = GetOrgTokensWithHttpInfoAsync(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; + } + + /// + /// List all organization tokens for a given org. + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListOrgTokens) + public async System.Threading.Tasks.Task> GetOrgTokensWithHttpInfoAsync(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 OrgTokensV1Api->GetOrgTokens"); + + + 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("/tokens/v1/orgs/{orgId}", 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("GetOrgTokens", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Revoke an organization token. + /// + /// Thrown when fails to make API call + /// + /// + /// bool + public bool RevokeOrgToken(string orgId, string orgTokenId) + { + Hathora.Cloud.Sdk.Client.ApiResponse localVarResponse = RevokeOrgTokenWithHttpInfo(orgId, orgTokenId); + return localVarResponse.Data; + } + + /// + /// Revoke an organization token. + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of bool + public Hathora.Cloud.Sdk.Client.ApiResponse RevokeOrgTokenWithHttpInfo(string orgId, string orgTokenId) + { + // verify the required parameter 'orgId' is set + if (orgId == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'orgId' when calling OrgTokensV1Api->RevokeOrgToken"); + + // verify the required parameter 'orgTokenId' is set + if (orgTokenId == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'orgTokenId' when calling OrgTokensV1Api->RevokeOrgToken"); + + 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 + localVarRequestOptions.PathParameters.Add("orgTokenId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(orgTokenId)); // 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("/tokens/v1/orgs/{orgId}/tokens/{orgTokenId}/revoke", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RevokeOrgToken", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Revoke an organization token. + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of bool + public async System.Threading.Tasks.Task RevokeOrgTokenAsync(string orgId, string orgTokenId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var task = RevokeOrgTokenWithHttpInfoAsync(orgId, orgTokenId, 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; + } + + /// + /// Revoke an organization token. + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (bool) + public async System.Threading.Tasks.Task> RevokeOrgTokenWithHttpInfoAsync(string orgId, string orgTokenId, 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 OrgTokensV1Api->RevokeOrgToken"); + + // verify the required parameter 'orgTokenId' is set + if (orgTokenId == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'orgTokenId' when calling OrgTokensV1Api->RevokeOrgToken"); + + + 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 + localVarRequestOptions.PathParameters.Add("orgTokenId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(orgTokenId)); // 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("/tokens/v1/orgs/{orgId}/tokens/{orgTokenId}/revoke", 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("RevokeOrgToken", 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 2145fef..b2eb80b 100644 --- a/csharp/src/Hathora.Cloud.Sdk/Api/ProcessesV2Api.cs +++ b/csharp/src/Hathora.Cloud.Sdk/Api/ProcessesV2Api.cs @@ -74,6 +74,29 @@ public interface IProcessesV2ApiSync : IApiAccessor /// /// ApiResponse of ProcessV2 ApiResponse GetProcessInfoWithHttpInfo(string appId, string processId); + /// + /// + /// + /// + /// Stops a [process](https://hathora.dev/docs/concepts/hathora-entities#process) immediately. + /// + /// Thrown when fails to make API call + /// + /// + /// + void StopProcess(string appId, string processId); + + /// + /// + /// + /// + /// Stops a [process](https://hathora.dev/docs/concepts/hathora-entities#process) immediately. + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of Object(void) + ApiResponse StopProcessWithHttpInfo(string appId, string processId); #endregion Synchronous Operations } @@ -135,6 +158,31 @@ public interface IProcessesV2ApiAsync : IApiAccessor /// Cancellation Token to cancel the request. /// Task of ApiResponse (ProcessV2) System.Threading.Tasks.Task> GetProcessInfoWithHttpInfoAsync(string appId, string processId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// + /// + /// + /// Stops a [process](https://hathora.dev/docs/concepts/hathora-entities#process) immediately. + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task StopProcessAsync(string appId, string processId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// + /// + /// + /// Stops a [process](https://hathora.dev/docs/concepts/hathora-entities#process) immediately. + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> StopProcessWithHttpInfoAsync(string appId, string processId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -593,5 +641,155 @@ public Hathora.Cloud.Sdk.Client.ApiResponse GetProcessInfoWithHttpInf return localVarResponse; } + /// + /// Stops a [process](https://hathora.dev/docs/concepts/hathora-entities#process) immediately. + /// + /// Thrown when fails to make API call + /// + /// + /// + public void StopProcess(string appId, string processId) + { + StopProcessWithHttpInfo(appId, processId); + } + + /// + /// Stops a [process](https://hathora.dev/docs/concepts/hathora-entities#process) immediately. + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of Object(void) + public Hathora.Cloud.Sdk.Client.ApiResponse StopProcessWithHttpInfo(string appId, string processId) + { + // 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->StopProcess"); + + // verify the required parameter 'processId' is set + if (processId == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'processId' when calling ProcessesV2Api->StopProcess"); + + 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("processId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(processId)); // 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}/stop/{processId}", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("StopProcess", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Stops a [process](https://hathora.dev/docs/concepts/hathora-entities#process) immediately. + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task StopProcessAsync(string appId, string processId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var task = StopProcessWithHttpInfoAsync(appId, processId, cancellationToken); +#if UNITY_EDITOR || !UNITY_WEBGL + await task.ConfigureAwait(false); +#else + await task; +#endif + } + + /// + /// Stops a [process](https://hathora.dev/docs/concepts/hathora-entities#process) immediately. + /// + /// Thrown when fails to make API call + /// + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> StopProcessWithHttpInfoAsync(string appId, string processId, 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->StopProcess"); + + // verify the required parameter 'processId' is set + if (processId == null) + throw new Hathora.Cloud.Sdk.Client.ApiException(400, "Missing required parameter 'processId' when calling ProcessesV2Api->StopProcess"); + + + 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("processId", Hathora.Cloud.Sdk.Client.ClientUtils.ParameterToString(processId)); // 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}/stop/{processId}", 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("StopProcess", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + } } diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/Application.cs b/csharp/src/Hathora.Cloud.Sdk/Model/Application.cs index d3a0181..b8cafd9 100644 --- a/csharp/src/Hathora.Cloud.Sdk/Model/Application.cs +++ b/csharp/src/Hathora.Cloud.Sdk/Model/Application.cs @@ -41,11 +41,11 @@ protected Application() /// /// Initializes a new instance of the class. /// - /// Email address for the user that deleted the application. (required). + /// UserId or email address for the user that deleted the application. (required). /// When the application was deleted. (required). /// When the application was created. (required). - /// Email address for the user that deleted the application. (required). - /// System generated unique identifier for an organization. (required). + /// UserId or email address for the user that created the application. (required). + /// System generated unique identifier for an organization. Not guaranteed to have a specific format. (required). /// authConfiguration (required). /// Secret that is used for identity and access management. (required). /// System generated unique identifier for an application. (required). @@ -105,10 +105,10 @@ protected Application() } /// - /// Email address for the user that deleted the application. + /// UserId or email address for the user that deleted the application. /// - /// Email address for the user that deleted the application. - /// "dev@hathora.dev" + /// UserId or email address for the user that deleted the application. + /// "google-oauth2|107030234048588177467" [DataMember(Name = "deletedBy", IsRequired = true, EmitDefaultValue = true)] public string DeletedBy { get; set; } @@ -127,18 +127,18 @@ protected Application() public DateTime CreatedAt { get; set; } /// - /// Email address for the user that deleted the application. + /// UserId or email address for the user that created the application. /// - /// Email address for the user that deleted the application. - /// "dev@hathora.dev" + /// UserId or email address for the user that created the application. + /// "google-oauth2|107030234048588177467" [DataMember(Name = "createdBy", IsRequired = true, EmitDefaultValue = true)] public string CreatedBy { get; set; } /// - /// System generated unique identifier for an organization. + /// System generated unique identifier for an organization. Not guaranteed to have a specific format. /// - /// System generated unique identifier for an organization. - /// "google-oauth2|107030234048588177467" + /// 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; } diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/ApplicationWithLatestDeploymentAndBuild.cs b/csharp/src/Hathora.Cloud.Sdk/Model/ApplicationWithLatestDeploymentAndBuild.cs new file mode 100644 index 0000000..85c605d --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk/Model/ApplicationWithLatestDeploymentAndBuild.cs @@ -0,0 +1,355 @@ +/* + * 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 +{ + /// + /// ApplicationWithLatestDeploymentAndBuild + /// + [DataContract(Name = "ApplicationWithLatestDeploymentAndBuild")] + public partial class ApplicationWithLatestDeploymentAndBuild : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ApplicationWithLatestDeploymentAndBuild() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// UserId or email address for the user that deleted the application. (required). + /// When the application was deleted. (required). + /// When the application was created. (required). + /// UserId or email address for the user that created the application. (required). + /// System generated unique identifier for an organization. Not guaranteed to have a specific format. (required). + /// authConfiguration (required). + /// Secret that is used for identity and access management. (required). + /// System generated unique identifier for an application. (required). + /// Readable name for an application. Must be unique within an organization. (required). + /// deployment. + public ApplicationWithLatestDeploymentAndBuild(string deletedBy = default(string), DateTime? deletedAt = default(DateTime?), DateTime createdAt = default(DateTime), string createdBy = default(string), string orgId = default(string), AuthConfiguration authConfiguration = default(AuthConfiguration), string appSecret = default(string), string appId = default(string), string appName = default(string), ApplicationWithLatestDeploymentAndBuildAllOfDeployment deployment = default(ApplicationWithLatestDeploymentAndBuildAllOfDeployment)) + { + // to ensure "deletedBy" is required (not null) + if (deletedBy == null) + { + throw new ArgumentNullException("deletedBy is a required property for ApplicationWithLatestDeploymentAndBuild and cannot be null"); + } + this.DeletedBy = deletedBy; + // to ensure "deletedAt" is required (not null) + if (deletedAt == null) + { + throw new ArgumentNullException("deletedAt is a required property for ApplicationWithLatestDeploymentAndBuild and cannot be null"); + } + this.DeletedAt = deletedAt; + this.CreatedAt = createdAt; + // to ensure "createdBy" is required (not null) + if (createdBy == null) + { + throw new ArgumentNullException("createdBy is a required property for ApplicationWithLatestDeploymentAndBuild and cannot be null"); + } + this.CreatedBy = createdBy; + // to ensure "orgId" is required (not null) + if (orgId == null) + { + throw new ArgumentNullException("orgId is a required property for ApplicationWithLatestDeploymentAndBuild and cannot be null"); + } + this.OrgId = orgId; + // to ensure "authConfiguration" is required (not null) + if (authConfiguration == null) + { + throw new ArgumentNullException("authConfiguration is a required property for ApplicationWithLatestDeploymentAndBuild and cannot be null"); + } + this.AuthConfiguration = authConfiguration; + // to ensure "appSecret" is required (not null) + if (appSecret == null) + { + throw new ArgumentNullException("appSecret is a required property for ApplicationWithLatestDeploymentAndBuild and cannot be null"); + } + this.AppSecret = appSecret; + // to ensure "appId" is required (not null) + if (appId == null) + { + throw new ArgumentNullException("appId is a required property for ApplicationWithLatestDeploymentAndBuild and cannot be null"); + } + this.AppId = appId; + // to ensure "appName" is required (not null) + if (appName == null) + { + throw new ArgumentNullException("appName is a required property for ApplicationWithLatestDeploymentAndBuild and cannot be null"); + } + this.AppName = appName; + this.Deployment = deployment; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// UserId or email address for the user that deleted the application. + /// + /// UserId or email address for the user that deleted the application. + /// "google-oauth2|107030234048588177467" + [DataMember(Name = "deletedBy", IsRequired = true, EmitDefaultValue = true)] + public string DeletedBy { get; set; } + + /// + /// When the application was deleted. + /// + /// When the application was deleted. + [DataMember(Name = "deletedAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime? DeletedAt { get; set; } + + /// + /// When the application was created. + /// + /// When the application was created. + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// UserId or email address for the user that created the application. + /// + /// UserId or email address for the user that created the application. + /// "google-oauth2|107030234048588177467" + [DataMember(Name = "createdBy", IsRequired = true, EmitDefaultValue = true)] + public string CreatedBy { 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 AuthConfiguration + /// + [DataMember(Name = "authConfiguration", IsRequired = true, EmitDefaultValue = true)] + public AuthConfiguration AuthConfiguration { get; set; } + + /// + /// Secret that is used for identity and access management. + /// + /// Secret that is used for identity and access management. + /// "secret-6f706e83-0ec1-437a-9a46-7d4281eb2f39" + [DataMember(Name = "appSecret", IsRequired = true, EmitDefaultValue = true)] + public string AppSecret { 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; } + + /// + /// Readable name for an application. Must be unique within an organization. + /// + /// Readable name for an application. Must be unique within an organization. + /// "minecraft" + [DataMember(Name = "appName", IsRequired = true, EmitDefaultValue = true)] + public string AppName { get; set; } + + /// + /// Gets or Sets Deployment + /// + [DataMember(Name = "deployment", EmitDefaultValue = false)] + public ApplicationWithLatestDeploymentAndBuildAllOfDeployment Deployment { 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 ApplicationWithLatestDeploymentAndBuild {\n"); + sb.Append(" DeletedBy: ").Append(DeletedBy).Append("\n"); + sb.Append(" DeletedAt: ").Append(DeletedAt).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" CreatedBy: ").Append(CreatedBy).Append("\n"); + sb.Append(" OrgId: ").Append(OrgId).Append("\n"); + sb.Append(" AuthConfiguration: ").Append(AuthConfiguration).Append("\n"); + sb.Append(" AppSecret: ").Append(AppSecret).Append("\n"); + sb.Append(" AppId: ").Append(AppId).Append("\n"); + sb.Append(" AppName: ").Append(AppName).Append("\n"); + sb.Append(" Deployment: ").Append(Deployment).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 ApplicationWithLatestDeploymentAndBuild); + } + + /// + /// Returns true if ApplicationWithLatestDeploymentAndBuild instances are equal + /// + /// Instance of ApplicationWithLatestDeploymentAndBuild to be compared + /// Boolean + public bool Equals(ApplicationWithLatestDeploymentAndBuild input) + { + if (input == null) + { + return false; + } + return + ( + this.DeletedBy == input.DeletedBy || + (this.DeletedBy != null && + this.DeletedBy.Equals(input.DeletedBy)) + ) && + ( + this.DeletedAt == input.DeletedAt || + (this.DeletedAt != null && + this.DeletedAt.Equals(input.DeletedAt)) + ) && + ( + 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.OrgId == input.OrgId || + (this.OrgId != null && + this.OrgId.Equals(input.OrgId)) + ) && + ( + this.AuthConfiguration == input.AuthConfiguration || + (this.AuthConfiguration != null && + this.AuthConfiguration.Equals(input.AuthConfiguration)) + ) && + ( + this.AppSecret == input.AppSecret || + (this.AppSecret != null && + this.AppSecret.Equals(input.AppSecret)) + ) && + ( + this.AppId == input.AppId || + (this.AppId != null && + this.AppId.Equals(input.AppId)) + ) && + ( + this.AppName == input.AppName || + (this.AppName != null && + this.AppName.Equals(input.AppName)) + ) && + ( + this.Deployment == input.Deployment || + (this.Deployment != null && + this.Deployment.Equals(input.Deployment)) + ) + && (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.DeletedBy != null) + { + hashCode = (hashCode * 59) + this.DeletedBy.GetHashCode(); + } + if (this.DeletedAt != null) + { + hashCode = (hashCode * 59) + this.DeletedAt.GetHashCode(); + } + if (this.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.CreatedBy != null) + { + hashCode = (hashCode * 59) + this.CreatedBy.GetHashCode(); + } + if (this.OrgId != null) + { + hashCode = (hashCode * 59) + this.OrgId.GetHashCode(); + } + if (this.AuthConfiguration != null) + { + hashCode = (hashCode * 59) + this.AuthConfiguration.GetHashCode(); + } + if (this.AppSecret != null) + { + hashCode = (hashCode * 59) + this.AppSecret.GetHashCode(); + } + if (this.AppId != null) + { + hashCode = (hashCode * 59) + this.AppId.GetHashCode(); + } + if (this.AppName != null) + { + hashCode = (hashCode * 59) + this.AppName.GetHashCode(); + } + if (this.Deployment != null) + { + hashCode = (hashCode * 59) + this.Deployment.GetHashCode(); + } + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/ApplicationWithLatestDeploymentAndBuildAllOf.cs b/csharp/src/Hathora.Cloud.Sdk/Model/ApplicationWithLatestDeploymentAndBuildAllOf.cs new file mode 100644 index 0000000..4d435cf --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk/Model/ApplicationWithLatestDeploymentAndBuildAllOf.cs @@ -0,0 +1,131 @@ +/* + * 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 +{ + /// + /// ApplicationWithLatestDeploymentAndBuildAllOf + /// + [DataContract(Name = "ApplicationWithLatestDeploymentAndBuild_allOf")] + public partial class ApplicationWithLatestDeploymentAndBuildAllOf : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + /// deployment. + public ApplicationWithLatestDeploymentAndBuildAllOf(ApplicationWithLatestDeploymentAndBuildAllOfDeployment deployment = default(ApplicationWithLatestDeploymentAndBuildAllOfDeployment)) + { + this.Deployment = deployment; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets Deployment + /// + [DataMember(Name = "deployment", EmitDefaultValue = false)] + public ApplicationWithLatestDeploymentAndBuildAllOfDeployment Deployment { 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 ApplicationWithLatestDeploymentAndBuildAllOf {\n"); + sb.Append(" Deployment: ").Append(Deployment).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 ApplicationWithLatestDeploymentAndBuildAllOf); + } + + /// + /// Returns true if ApplicationWithLatestDeploymentAndBuildAllOf instances are equal + /// + /// Instance of ApplicationWithLatestDeploymentAndBuildAllOf to be compared + /// Boolean + public bool Equals(ApplicationWithLatestDeploymentAndBuildAllOf input) + { + if (input == null) + { + return false; + } + return + ( + this.Deployment == input.Deployment || + (this.Deployment != null && + this.Deployment.Equals(input.Deployment)) + ) + && (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.Deployment != null) + { + hashCode = (hashCode * 59) + this.Deployment.GetHashCode(); + } + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.cs b/csharp/src/Hathora.Cloud.Sdk/Model/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.cs new file mode 100644 index 0000000..14ea30a --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk/Model/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.cs @@ -0,0 +1,451 @@ +/* + * 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 +{ + /// + /// ApplicationWithLatestDeploymentAndBuildAllOfDeployment + /// + [DataContract(Name = "ApplicationWithLatestDeploymentAndBuild_allOf_deployment")] + public partial class ApplicationWithLatestDeploymentAndBuildAllOfDeployment : IEquatable + { + + /// + /// 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. + /// + [JsonConstructorAttribute] + protected ApplicationWithLatestDeploymentAndBuildAllOfDeployment() + { + 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. (default to true). + /// 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). + /// 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). + /// 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)) + { + // to ensure "env" is required (not null) + if (env == null) + { + throw new ArgumentNullException("env is a required property for ApplicationWithLatestDeploymentAndBuildAllOfDeployment and cannot be null"); + } + this.Env = env; + this.RoomsPerProcess = roomsPerProcess; + this.PlanName = planName; + // to ensure "additionalContainerPorts" is required (not null) + if (additionalContainerPorts == null) + { + throw new ArgumentNullException("additionalContainerPorts is a required property for ApplicationWithLatestDeploymentAndBuildAllOfDeployment 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 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) + { + throw new ArgumentNullException("createdBy is a required property for ApplicationWithLatestDeploymentAndBuildAllOfDeployment 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 ApplicationWithLatestDeploymentAndBuildAllOfDeployment and cannot be null"); + } + this.AppId = appId; + // to ensure "build" is required (not null) + if (build == null) + { + throw new ArgumentNullException("build is a required property for ApplicationWithLatestDeploymentAndBuildAllOfDeployment and cannot be null"); + } + this.Build = build; + this.IdleTimeoutEnabled = idleTimeoutEnabled; + 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", 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; } + + /// + /// Gets or Sets ContainerPort + /// + [DataMember(Name = "containerPort", IsRequired = true, EmitDefaultValue = true)] + [Obsolete] + public double ContainerPort { 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 int 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 Build + /// + [DataMember(Name = "build", IsRequired = true, EmitDefaultValue = true)] + public Build Build { 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 ApplicationWithLatestDeploymentAndBuildAllOfDeployment {\n"); + 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"); + 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(" Build: ").Append(Build).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 ApplicationWithLatestDeploymentAndBuildAllOfDeployment); + } + + /// + /// Returns true if ApplicationWithLatestDeploymentAndBuildAllOfDeployment instances are equal + /// + /// Instance of ApplicationWithLatestDeploymentAndBuildAllOfDeployment to be compared + /// Boolean + public bool Equals(ApplicationWithLatestDeploymentAndBuildAllOfDeployment 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.PlanName == input.PlanName || + this.PlanName.Equals(input.PlanName) + ) && + ( + 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.TransportType == input.TransportType || + this.TransportType.Equals(input.TransportType) + ) && + ( + this.ContainerPort == input.ContainerPort || + this.ContainerPort.Equals(input.ContainerPort) + ) && + ( + 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.Build == input.Build || + (this.Build != null && + this.Build.Equals(input.Build)) + ) + && (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(); + hashCode = (hashCode * 59) + this.PlanName.GetHashCode(); + if (this.AdditionalContainerPorts != null) + { + hashCode = (hashCode * 59) + this.AdditionalContainerPorts.GetHashCode(); + } + if (this.DefaultContainerPort != null) + { + 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(); + } + 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.Build != null) + { + hashCode = (hashCode * 59) + this.Build.GetHashCode(); + } + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf.cs b/csharp/src/Hathora.Cloud.Sdk/Model/ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf.cs new file mode 100644 index 0000000..32cbf7f --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk/Model/ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf.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 +{ + /// + /// ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf + /// + [DataContract(Name = "ApplicationWithLatestDeploymentAndBuild_allOf_deployment_allOf")] + public partial class ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// build (required). + public ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf(Build build = default(Build)) + { + // to ensure "build" is required (not null) + if (build == null) + { + throw new ArgumentNullException("build is a required property for ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf and cannot be null"); + } + this.Build = build; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets Build + /// + [DataMember(Name = "build", IsRequired = true, EmitDefaultValue = true)] + public Build Build { 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 ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf {\n"); + sb.Append(" Build: ").Append(Build).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 ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf); + } + + /// + /// Returns true if ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf instances are equal + /// + /// Instance of ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf to be compared + /// Boolean + public bool Equals(ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf input) + { + if (input == null) + { + return false; + } + return + ( + this.Build == input.Build || + (this.Build != null && + this.Build.Equals(input.Build)) + ) + && (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.Build != null) + { + hashCode = (hashCode * 59) + this.Build.GetHashCode(); + } + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/Build.cs b/csharp/src/Hathora.Cloud.Sdk/Model/Build.cs index fadf9d6..b90419e 100644 --- a/csharp/src/Hathora.Cloud.Sdk/Model/Build.cs +++ b/csharp/src/Hathora.Cloud.Sdk/Model/Build.cs @@ -30,46 +30,12 @@ namespace Hathora.Cloud.Sdk.Model [DataContract(Name = "Build")] public partial class Build : IEquatable { - /// - /// Current status of your build. `created`: a build was created but not yet run `running`: the build process is actively executing `succeeded`: the game server artifact was successfully built and stored in the Hathora registries `failed`: the build process was unsuccessful, most likely due to an error with the `Dockerfile` - /// - /// Current status of your build. `created`: a build was created but not yet run `running`: the build process is actively executing `succeeded`: the game server artifact was successfully built and stored in the Hathora registries `failed`: the build process was unsuccessful, most likely due to an error with the `Dockerfile` - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Created for value: created - /// - [EnumMember(Value = "created")] - Created = 1, - - /// - /// Enum Running for value: running - /// - [EnumMember(Value = "running")] - Running = 2, - - /// - /// Enum Succeeded for value: succeeded - /// - [EnumMember(Value = "succeeded")] - Succeeded = 3, - - /// - /// Enum Failed for value: failed - /// - [EnumMember(Value = "failed")] - Failed = 4 - - } - /// - /// Current status of your build. `created`: a build was created but not yet run `running`: the build process is actively executing `succeeded`: the game server artifact was successfully built and stored in the Hathora registries `failed`: the build process was unsuccessful, most likely due to an error with the `Dockerfile` + /// Gets or Sets Status /// - /// Current status of your build. `created`: a build was created but not yet run `running`: the build process is actively executing `succeeded`: the game server artifact was successfully built and stored in the Hathora registries `failed`: the build process was unsuccessful, most likely due to an error with the `Dockerfile` [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = true)] - public StatusEnum Status { get; set; } + public BuildStatus Status { get; set; } /// /// Initializes a new instance of the class. /// @@ -81,25 +47,19 @@ 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). (required). + /// Tag to associate an external version with a build. It is accessible via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV1/operation/GetBuildInfo).. /// regionalContainerTags (required). /// The size (in bytes) of the Docker image built by Hathora. (required). - /// Current status of your build. `created`: a build was created but not yet run `running`: the build process is actively executing `succeeded`: the game server artifact was successfully built and stored in the Hathora registries `failed`: the build process was unsuccessful, most likely due to an error with the `Dockerfile` (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). - /// Email address for the user that created the build. (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), StatusEnum status = default(StatusEnum), 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), 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)) { - // to ensure "buildTag" is required (not null) - if (buildTag == null) - { - throw new ArgumentNullException("buildTag is a required property for Build and cannot be null"); - } - this.BuildTag = buildTag; // to ensure "regionalContainerTags" is required (not null) if (regionalContainerTags == null) { @@ -140,6 +100,7 @@ protected Build() throw new ArgumentNullException("appId is a required property for Build and cannot be null"); } this.AppId = appId; + this.BuildTag = buildTag; this.AdditionalProperties = new Dictionary(); } @@ -148,7 +109,7 @@ protected Build() /// /// Tag to associate an external version with a build. It is accessible via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV1/operation/GetBuildInfo). /// "0.1.14-14c793" - [DataMember(Name = "buildTag", IsRequired = true, EmitDefaultValue = true)] + [DataMember(Name = "buildTag", EmitDefaultValue = true)] public string BuildTag { get; set; } /// @@ -194,10 +155,10 @@ protected Build() public DateTime CreatedAt { get; set; } /// - /// Email address for the user that created the build. + /// UserId or email address for the user that created the build. /// - /// Email address for the user that created the build. - /// "dev@hathora.dev" + /// UserId or email address for the user that created the build. + /// "google-oauth2|107030234048588177467" [DataMember(Name = "createdBy", IsRequired = true, EmitDefaultValue = true)] public string CreatedBy { get; set; } diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/BuildStatus.cs b/csharp/src/Hathora.Cloud.Sdk/Model/BuildStatus.cs new file mode 100644 index 0000000..e6d7307 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk/Model/BuildStatus.cs @@ -0,0 +1,59 @@ +/* + * 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 BuildStatus + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum BuildStatus + { + /// + /// Enum Created for value: created + /// + [EnumMember(Value = "created")] + Created = 1, + + /// + /// Enum Running for value: running + /// + [EnumMember(Value = "running")] + Running = 2, + + /// + /// Enum Succeeded for value: succeeded + /// + [EnumMember(Value = "succeeded")] + Succeeded = 3, + + /// + /// Enum Failed for value: failed + /// + [EnumMember(Value = "failed")] + Failed = 4 + + } + +} diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/CreateOrgToken.cs b/csharp/src/Hathora.Cloud.Sdk/Model/CreateOrgToken.cs new file mode 100644 index 0000000..0888565 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk/Model/CreateOrgToken.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 +{ + /// + /// CreateOrgToken + /// + [DataContract(Name = "CreateOrgToken")] + public partial class CreateOrgToken : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CreateOrgToken() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// Readable name for a token. Must be unique within an organization. (required). + public CreateOrgToken(string name = default(string)) + { + // to ensure "name" is required (not null) + if (name == null) + { + throw new ArgumentNullException("name is a required property for CreateOrgToken and cannot be null"); + } + this.Name = name; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Readable name for a token. Must be unique within an organization. + /// + /// Readable name for a token. Must be unique within an organization. + /// "ci-token" + [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 CreateOrgToken {\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 CreateOrgToken); + } + + /// + /// Returns true if CreateOrgToken instances are equal + /// + /// Instance of CreateOrgToken to be compared + /// Boolean + public bool Equals(CreateOrgToken input) + { + if (input == null) + { + return false; + } + return + ( + 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.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/CreatedOrgToken.cs b/csharp/src/Hathora.Cloud.Sdk/Model/CreatedOrgToken.cs new file mode 100644 index 0000000..827adda --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk/Model/CreatedOrgToken.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 +{ + /// + /// CreatedOrgToken + /// + [DataContract(Name = "CreatedOrgToken")] + public partial class CreatedOrgToken : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CreatedOrgToken() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// plainTextToken (required). + /// orgToken (required). + public CreatedOrgToken(string plainTextToken = default(string), OrgToken orgToken = default(OrgToken)) + { + // to ensure "plainTextToken" is required (not null) + if (plainTextToken == null) + { + throw new ArgumentNullException("plainTextToken is a required property for CreatedOrgToken and cannot be null"); + } + this.PlainTextToken = plainTextToken; + // to ensure "orgToken" is required (not null) + if (orgToken == null) + { + throw new ArgumentNullException("orgToken is a required property for CreatedOrgToken and cannot be null"); + } + this.OrgToken = orgToken; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets PlainTextToken + /// + [DataMember(Name = "plainTextToken", IsRequired = true, EmitDefaultValue = true)] + public string PlainTextToken { get; set; } + + /// + /// Gets or Sets OrgToken + /// + [DataMember(Name = "orgToken", IsRequired = true, EmitDefaultValue = true)] + public OrgToken OrgToken { 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 CreatedOrgToken {\n"); + sb.Append(" PlainTextToken: ").Append(PlainTextToken).Append("\n"); + sb.Append(" OrgToken: ").Append(OrgToken).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 CreatedOrgToken); + } + + /// + /// Returns true if CreatedOrgToken instances are equal + /// + /// Instance of CreatedOrgToken to be compared + /// Boolean + public bool Equals(CreatedOrgToken input) + { + if (input == null) + { + return false; + } + return + ( + this.PlainTextToken == input.PlainTextToken || + (this.PlainTextToken != null && + this.PlainTextToken.Equals(input.PlainTextToken)) + ) && + ( + this.OrgToken == input.OrgToken || + (this.OrgToken != null && + this.OrgToken.Equals(input.OrgToken)) + ) + && (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.PlainTextToken != null) + { + hashCode = (hashCode * 59) + this.PlainTextToken.GetHashCode(); + } + if (this.OrgToken != null) + { + hashCode = (hashCode * 59) + this.OrgToken.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 f341192..8115d63 100644 --- a/csharp/src/Hathora.Cloud.Sdk/Model/Deployment.cs +++ b/csharp/src/Hathora.Cloud.Sdk/Model/Deployment.cs @@ -80,6 +80,7 @@ protected Deployment() /// /// 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). /// 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). @@ -88,13 +89,13 @@ protected Deployment() /// transportType (required). /// containerPort (required). /// When the deployment was created. (required). - /// Email address for the user that created the deployment. (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 Deployment(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) @@ -135,9 +136,17 @@ protected Deployment() throw new ArgumentNullException("appId is a required property for Deployment and cannot be null"); } this.AppId = appId; + this.IdleTimeoutEnabled = idleTimeoutEnabled; 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", EmitDefaultValue = true)] + public bool IdleTimeoutEnabled { get; set; } + /// /// The environment variable that our process will have access to at runtime. /// @@ -181,10 +190,10 @@ protected Deployment() public DateTime CreatedAt { get; set; } /// - /// Email address for the user that created the deployment. + /// UserId or email address for the user that created the deployment. /// - /// Email address for the user that created the deployment. - /// "dev@hathora.dev" + /// 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; } @@ -242,6 +251,7 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Deployment {\n"); + 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"); @@ -292,6 +302,10 @@ public bool Equals(Deployment input) return false; } return + ( + this.IdleTimeoutEnabled == input.IdleTimeoutEnabled || + this.IdleTimeoutEnabled.Equals(input.IdleTimeoutEnabled) + ) && ( this.Env == input.Env || this.Env != null && @@ -368,6 +382,7 @@ 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(); diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/DeploymentConfig.cs b/csharp/src/Hathora.Cloud.Sdk/Model/DeploymentConfig.cs index 74b2578..f384741 100644 --- a/csharp/src/Hathora.Cloud.Sdk/Model/DeploymentConfig.cs +++ b/csharp/src/Hathora.Cloud.Sdk/Model/DeploymentConfig.cs @@ -53,13 +53,14 @@ protected DeploymentConfig() /// /// 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). /// 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.. /// transportType (required). /// Default port the server listens on. (required). - public DeploymentConfig(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) @@ -71,10 +72,18 @@ protected DeploymentConfig() this.PlanName = planName; this.TransportType = transportType; this.ContainerPort = containerPort; + this.IdleTimeoutEnabled = idleTimeoutEnabled; 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", EmitDefaultValue = true)] + public bool IdleTimeoutEnabled { get; set; } + /// /// The environment variable that our process will have access to at runtime. /// @@ -119,6 +128,7 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class DeploymentConfig {\n"); + 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"); @@ -161,6 +171,10 @@ public bool Equals(DeploymentConfig input) return false; } return + ( + this.IdleTimeoutEnabled == input.IdleTimeoutEnabled || + this.IdleTimeoutEnabled.Equals(input.IdleTimeoutEnabled) + ) && ( this.Env == input.Env || this.Env != null && @@ -201,6 +215,7 @@ 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(); diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/Invoice.cs b/csharp/src/Hathora.Cloud.Sdk/Model/Invoice.cs index d0ebf5d..28157a9 100644 --- a/csharp/src/Hathora.Cloud.Sdk/Model/Invoice.cs +++ b/csharp/src/Hathora.Cloud.Sdk/Model/Invoice.cs @@ -25,43 +25,17 @@ namespace Hathora.Cloud.Sdk.Model { /// - /// Billing types + /// Invoice /// [DataContract(Name = "Invoice")] public partial class Invoice : IEquatable { - /// - /// Defines Status - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Pending for value: pending - /// - [EnumMember(Value = "pending")] - Pending = 1, - - /// - /// Enum Paid for value: paid - /// - [EnumMember(Value = "paid")] - Paid = 2, - - /// - /// Enum Overdue for value: overdue - /// - [EnumMember(Value = "overdue")] - Overdue = 3 - - } - /// /// Gets or Sets Status /// [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = true)] - public StatusEnum Status { get; set; } + public InvoiceStatus Status { get; set; } /// /// Initializes a new instance of the class. /// @@ -80,7 +54,7 @@ protected Invoice() /// year (required). /// month (required). /// id (required). - public Invoice(StatusEnum status = default(StatusEnum), double amountDue = default(double), string pdfUrl = default(string), DateTime dueDate = default(DateTime), double year = default(double), double month = default(double), string id = default(string)) + public Invoice(InvoiceStatus status = default(InvoiceStatus), double amountDue = default(double), string pdfUrl = default(string), DateTime dueDate = default(DateTime), double year = default(double), double month = default(double), string id = default(string)) { this.Status = status; this.AmountDue = amountDue; diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/InvoiceStatus.cs b/csharp/src/Hathora.Cloud.Sdk/Model/InvoiceStatus.cs new file mode 100644 index 0000000..760e88c --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk/Model/InvoiceStatus.cs @@ -0,0 +1,53 @@ +/* + * 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 InvoiceStatus + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum InvoiceStatus + { + /// + /// Enum Pending for value: pending + /// + [EnumMember(Value = "pending")] + Pending = 1, + + /// + /// Enum Paid for value: paid + /// + [EnumMember(Value = "paid")] + Paid = 2, + + /// + /// Enum Overdue for value: overdue + /// + [EnumMember(Value = "overdue")] + Overdue = 3 + + } + +} diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/ListOrgTokens.cs b/csharp/src/Hathora.Cloud.Sdk/Model/ListOrgTokens.cs new file mode 100644 index 0000000..26b8a92 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk/Model/ListOrgTokens.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 +{ + /// + /// ListOrgTokens + /// + [DataContract(Name = "ListOrgTokens")] + public partial class ListOrgTokens : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ListOrgTokens() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// tokens (required). + public ListOrgTokens(List tokens = default(List)) + { + // to ensure "tokens" is required (not null) + if (tokens == null) + { + throw new ArgumentNullException("tokens is a required property for ListOrgTokens and cannot be null"); + } + this.Tokens = tokens; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets Tokens + /// + [DataMember(Name = "tokens", IsRequired = true, EmitDefaultValue = true)] + public List Tokens { 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 ListOrgTokens {\n"); + sb.Append(" Tokens: ").Append(Tokens).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 ListOrgTokens); + } + + /// + /// Returns true if ListOrgTokens instances are equal + /// + /// Instance of ListOrgTokens to be compared + /// Boolean + public bool Equals(ListOrgTokens input) + { + if (input == null) + { + return false; + } + return + ( + this.Tokens == input.Tokens || + this.Tokens != null && + input.Tokens != null && + this.Tokens.SequenceEqual(input.Tokens) + ) + && (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.Tokens != null) + { + hashCode = (hashCode * 59) + this.Tokens.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 c7b7144..e0bde6f 100644 --- a/csharp/src/Hathora.Cloud.Sdk/Model/Lobby.cs +++ b/csharp/src/Hathora.Cloud.Sdk/Model/Lobby.cs @@ -57,7 +57,7 @@ protected Lobby() /// JSON blob to store metadata for a room. Must be smaller than 1MB.. /// User input to initialize the game state. Object must be smaller than 64KB. (required). /// When the lobby was created. (required). - /// Email address for the user that created the lobby. (required). + /// UserId or email address for the user that created the lobby. (required). /// local (required). /// visibility (required). /// region (required). @@ -133,10 +133,10 @@ protected Lobby() public DateTime CreatedAt { get; set; } /// - /// Email address for the user that created the lobby. + /// UserId or email address for the user that created the lobby. /// - /// Email address for the user that created the lobby. - /// "dev@hathora.dev" + /// UserId or email address for the user that created the lobby. + /// "google-oauth2|107030234048588177467" [DataMember(Name = "createdBy", IsRequired = true, EmitDefaultValue = true)] public string CreatedBy { get; set; } diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/LobbyV3.cs b/csharp/src/Hathora.Cloud.Sdk/Model/LobbyV3.cs index 647c21b..16013e8 100644 --- a/csharp/src/Hathora.Cloud.Sdk/Model/LobbyV3.cs +++ b/csharp/src/Hathora.Cloud.Sdk/Model/LobbyV3.cs @@ -55,7 +55,7 @@ protected LobbyV3() /// /// User-defined identifier for a lobby. (required). /// When the lobby was created. (required). - /// Email address for the user that created the lobby. (required). + /// UserId or email address for the user that created the lobby. (required). /// 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). (required). /// visibility (required). /// region (required). @@ -115,10 +115,10 @@ protected LobbyV3() public DateTime CreatedAt { get; set; } /// - /// Email address for the user that created the lobby. + /// UserId or email address for the user that created the lobby. /// - /// Email address for the user that created the lobby. - /// "dev@hathora.dev" + /// UserId or email address for the user that created the lobby. + /// "google-oauth2|107030234048588177467" [DataMember(Name = "createdBy", IsRequired = true, EmitDefaultValue = true)] public string CreatedBy { get; set; } diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/OrgToken.cs b/csharp/src/Hathora.Cloud.Sdk/Model/OrgToken.cs new file mode 100644 index 0000000..95c7779 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk/Model/OrgToken.cs @@ -0,0 +1,272 @@ +/* + * 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 +{ + /// + /// OrgToken + /// + [DataContract(Name = "OrgToken")] + public partial class OrgToken : IEquatable + { + + /// + /// Gets or Sets Status + /// + [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = true)] + public OrgTokenStatus Status { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected OrgToken() + { + this.AdditionalProperties = new Dictionary(); + } + /// + /// Initializes a new instance of the class. + /// + /// createdAt (required). + /// createdBy (required). + /// lastFourCharsOfKey (required). + /// status (required). + /// Readable name for a token. Must be unique within an organization. (required). + /// orgId (required). + /// System generated unique identifier for an organization token. (required). + public OrgToken(DateTime createdAt = default(DateTime), string createdBy = default(string), string lastFourCharsOfKey = default(string), OrgTokenStatus status = default(OrgTokenStatus), string name = default(string), string orgId = default(string), string orgTokenId = default(string)) + { + this.CreatedAt = createdAt; + // to ensure "createdBy" is required (not null) + if (createdBy == null) + { + throw new ArgumentNullException("createdBy is a required property for OrgToken and cannot be null"); + } + this.CreatedBy = createdBy; + // to ensure "lastFourCharsOfKey" is required (not null) + if (lastFourCharsOfKey == null) + { + throw new ArgumentNullException("lastFourCharsOfKey is a required property for OrgToken and cannot be null"); + } + this.LastFourCharsOfKey = lastFourCharsOfKey; + this.Status = status; + // to ensure "name" is required (not null) + if (name == null) + { + throw new ArgumentNullException("name is a required property for OrgToken and cannot be null"); + } + this.Name = name; + // to ensure "orgId" is required (not null) + if (orgId == null) + { + throw new ArgumentNullException("orgId is a required property for OrgToken and cannot be null"); + } + this.OrgId = orgId; + // to ensure "orgTokenId" is required (not null) + if (orgTokenId == null) + { + throw new ArgumentNullException("orgTokenId is a required property for OrgToken and cannot be null"); + } + this.OrgTokenId = orgTokenId; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)] + public DateTime CreatedAt { get; set; } + + /// + /// Gets or Sets CreatedBy + /// + [DataMember(Name = "createdBy", IsRequired = true, EmitDefaultValue = true)] + public string CreatedBy { get; set; } + + /// + /// Gets or Sets LastFourCharsOfKey + /// + [DataMember(Name = "lastFourCharsOfKey", IsRequired = true, EmitDefaultValue = true)] + public string LastFourCharsOfKey { get; set; } + + /// + /// Readable name for a token. Must be unique within an organization. + /// + /// Readable name for a token. Must be unique within an organization. + /// "ci-token" + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] + public string Name { get; set; } + + /// + /// Gets or Sets OrgId + /// + [DataMember(Name = "orgId", IsRequired = true, EmitDefaultValue = true)] + public string OrgId { get; set; } + + /// + /// System generated unique identifier for an organization token. + /// + /// System generated unique identifier for an organization token. + /// "org-token-af469a92-5b45-4565-b3c4-b79878de67d2" + [DataMember(Name = "orgTokenId", IsRequired = true, EmitDefaultValue = true)] + public string OrgTokenId { 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 OrgToken {\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" CreatedBy: ").Append(CreatedBy).Append("\n"); + sb.Append(" LastFourCharsOfKey: ").Append(LastFourCharsOfKey).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" OrgId: ").Append(OrgId).Append("\n"); + sb.Append(" OrgTokenId: ").Append(OrgTokenId).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 OrgToken); + } + + /// + /// Returns true if OrgToken instances are equal + /// + /// Instance of OrgToken to be compared + /// Boolean + public bool Equals(OrgToken input) + { + if (input == null) + { + return false; + } + return + ( + 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.LastFourCharsOfKey == input.LastFourCharsOfKey || + (this.LastFourCharsOfKey != null && + this.LastFourCharsOfKey.Equals(input.LastFourCharsOfKey)) + ) && + ( + this.Status == input.Status || + this.Status.Equals(input.Status) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.OrgId == input.OrgId || + (this.OrgId != null && + this.OrgId.Equals(input.OrgId)) + ) && + ( + this.OrgTokenId == input.OrgTokenId || + (this.OrgTokenId != null && + this.OrgTokenId.Equals(input.OrgTokenId)) + ) + && (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.CreatedAt != null) + { + hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); + } + if (this.CreatedBy != null) + { + hashCode = (hashCode * 59) + this.CreatedBy.GetHashCode(); + } + if (this.LastFourCharsOfKey != null) + { + hashCode = (hashCode * 59) + this.LastFourCharsOfKey.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Status.GetHashCode(); + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + if (this.OrgId != null) + { + hashCode = (hashCode * 59) + this.OrgId.GetHashCode(); + } + if (this.OrgTokenId != null) + { + hashCode = (hashCode * 59) + this.OrgTokenId.GetHashCode(); + } + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } + return hashCode; + } + } + + } + +} diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/OrgTokenStatus.cs b/csharp/src/Hathora.Cloud.Sdk/Model/OrgTokenStatus.cs new file mode 100644 index 0000000..95fb9f1 --- /dev/null +++ b/csharp/src/Hathora.Cloud.Sdk/Model/OrgTokenStatus.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 OrgTokenStatus + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum OrgTokenStatus + { + /// + /// Enum Active for value: active + /// + [EnumMember(Value = "active")] + Active = 1, + + /// + /// Enum Revoked for value: revoked + /// + [EnumMember(Value = "revoked")] + Revoked = 2 + + } + +} diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/Process.cs b/csharp/src/Hathora.Cloud.Sdk/Model/Process.cs index a2a6e46..460b374 100644 --- a/csharp/src/Hathora.Cloud.Sdk/Model/Process.cs +++ b/csharp/src/Hathora.Cloud.Sdk/Model/Process.cs @@ -62,7 +62,7 @@ protected Process() /// When the process started being provisioned. (required). /// Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. (required). /// additionalExposedPorts (required). - /// exposedPort. + /// exposedPort (required). /// port (required). /// host (required). /// region (required). @@ -111,6 +111,12 @@ protected Process() throw new ArgumentNullException("additionalExposedPorts is a required property for Process and cannot be null"); } this.AdditionalExposedPorts = additionalExposedPorts; + // to ensure "exposedPort" is required (not null) + if (exposedPort == null) + { + throw new ArgumentNullException("exposedPort is a required property for Process and cannot be null"); + } + this.ExposedPort = exposedPort; this.Port = port; // to ensure "host" is required (not null) if (host == null) @@ -132,7 +138,6 @@ protected Process() throw new ArgumentNullException("appId is a required property for Process and cannot be null"); } this.AppId = appId; - this.ExposedPort = exposedPort; this.AdditionalProperties = new Dictionary(); } @@ -247,7 +252,7 @@ protected Process() /// /// Gets or Sets ExposedPort /// - [DataMember(Name = "exposedPort", EmitDefaultValue = false)] + [DataMember(Name = "exposedPort", IsRequired = true, EmitDefaultValue = true)] public ExposedPort ExposedPort { get; set; } /// diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/ProcessV2.cs b/csharp/src/Hathora.Cloud.Sdk/Model/ProcessV2.cs index 1674be6..338ad44 100644 --- a/csharp/src/Hathora.Cloud.Sdk/Model/ProcessV2.cs +++ b/csharp/src/Hathora.Cloud.Sdk/Model/ProcessV2.cs @@ -61,7 +61,7 @@ protected ProcessV2() /// When the process started being provisioned. (required). /// Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. (required). /// additionalExposedPorts (required). - /// exposedPort. + /// exposedPort (required). /// region (required). /// System generated unique identifier to a runtime instance of your game server. (required). /// System generated id for a deployment. Increments by 1. (required). @@ -96,6 +96,12 @@ protected ProcessV2() throw new ArgumentNullException("additionalExposedPorts is a required property for ProcessV2 and cannot be null"); } this.AdditionalExposedPorts = additionalExposedPorts; + // to ensure "exposedPort" is required (not null) + if (exposedPort == null) + { + throw new ArgumentNullException("exposedPort is a required property for ProcessV2 and cannot be null"); + } + this.ExposedPort = exposedPort; this.Region = region; // to ensure "processId" is required (not null) if (processId == null) @@ -110,7 +116,6 @@ protected ProcessV2() throw new ArgumentNullException("appId is a required property for ProcessV2 and cannot be null"); } this.AppId = appId; - this.ExposedPort = exposedPort; this.AdditionalProperties = new Dictionary(); } @@ -167,7 +172,7 @@ protected ProcessV2() /// /// Gets or Sets ExposedPort /// - [DataMember(Name = "exposedPort", EmitDefaultValue = false)] + [DataMember(Name = "exposedPort", IsRequired = true, EmitDefaultValue = true)] public ExposedPort ExposedPort { get; set; } /// diff --git a/csharp/src/Hathora.Cloud.Sdk/Model/ProcessWithRooms.cs b/csharp/src/Hathora.Cloud.Sdk/Model/ProcessWithRooms.cs index f01e6c5..32e896b 100644 --- a/csharp/src/Hathora.Cloud.Sdk/Model/ProcessWithRooms.cs +++ b/csharp/src/Hathora.Cloud.Sdk/Model/ProcessWithRooms.cs @@ -62,7 +62,7 @@ protected ProcessWithRooms() /// When the process started being provisioned. (required). /// Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. (required). /// additionalExposedPorts (required). - /// exposedPort. + /// exposedPort (required). /// port (required). /// host (required). /// region (required). @@ -113,6 +113,12 @@ protected ProcessWithRooms() throw new ArgumentNullException("additionalExposedPorts is a required property for ProcessWithRooms and cannot be null"); } this.AdditionalExposedPorts = additionalExposedPorts; + // to ensure "exposedPort" is required (not null) + if (exposedPort == null) + { + throw new ArgumentNullException("exposedPort is a required property for ProcessWithRooms and cannot be null"); + } + this.ExposedPort = exposedPort; this.Port = port; // to ensure "host" is required (not null) if (host == null) @@ -141,7 +147,6 @@ protected ProcessWithRooms() } this.Rooms = rooms; this.TotalRooms = totalRooms; - this.ExposedPort = exposedPort; this.AdditionalProperties = new Dictionary(); } @@ -256,7 +261,7 @@ protected ProcessWithRooms() /// /// Gets or Sets ExposedPort /// - [DataMember(Name = "exposedPort", EmitDefaultValue = false)] + [DataMember(Name = "exposedPort", IsRequired = true, EmitDefaultValue = true)] public ExposedPort ExposedPort { get; set; } /// diff --git a/java/.openapi-generator/FILES b/java/.openapi-generator/FILES index 2d9e5dc..38e97be 100644 --- a/java/.openapi-generator/FILES +++ b/java/.openapi-generator/FILES @@ -6,14 +6,17 @@ docs/ApiError.md docs/AppConfig.md docs/AppV1Api.md docs/Application.md -docs/ApplicationWithDeployment.md -docs/ApplicationWithDeploymentAllOf.md +docs/ApplicationWithLatestDeploymentAndBuild.md +docs/ApplicationWithLatestDeploymentAndBuildAllOf.md +docs/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.md +docs/ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf.md docs/AuthConfiguration.md docs/AuthConfigurationGoogle.md docs/AuthV1Api.md docs/BillingV1Api.md docs/Build.md docs/BuildRegionalContainerTagsInner.md +docs/BuildStatus.md docs/BuildV1Api.md docs/CardBrand.md docs/CardPaymentMethod.md @@ -23,10 +26,12 @@ docs/ContainerPort.md docs/CreateBuildParams.md docs/CreateLobbyParams.md docs/CreateLobbyV3Params.md +docs/CreateOrgToken.md docs/CreatePrivateLobbyRequest.md docs/CreateRoomParams.md docs/CreateRoomResponse.md docs/CreateRoomResponseAllOf.md +docs/CreatedOrgToken.md docs/CustomerPortalUrl.md docs/Deployment.md docs/DeploymentConfig.md @@ -36,7 +41,9 @@ docs/DiscoveryResponseInner.md docs/DiscoveryV1Api.md docs/ExposedPort.md docs/Invoice.md +docs/InvoiceStatus.md docs/LinkPaymentMethod.md +docs/ListOrgTokens.md docs/Lobby.md docs/LobbyV1Api.md docs/LobbyV2Api.md @@ -51,6 +58,9 @@ docs/ManagementV1Api.md docs/MetricName.md docs/MetricValue.md docs/MetricsV1Api.md +docs/OrgToken.md +docs/OrgTokenStatus.md +docs/OrgTokensV1Api.md docs/PartialCardCardPaymentMethodAchAchPaymentMethodLinkLinkPaymentMethod.md docs/PickRoomExcludeKeyofRoomAllocations.md docs/PlanName.md @@ -99,6 +109,7 @@ src/main/java/com/hathora/client/api/LobbyV3Api.java 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/ProcessesV1Api.java src/main/java/com/hathora/client/api/ProcessesV2Api.java src/main/java/com/hathora/client/api/RoomV1Api.java @@ -113,12 +124,15 @@ src/main/java/com/hathora/client/model/ActiveConnectionInfo.java src/main/java/com/hathora/client/model/ApiError.java src/main/java/com/hathora/client/model/AppConfig.java src/main/java/com/hathora/client/model/Application.java -src/main/java/com/hathora/client/model/ApplicationWithDeployment.java -src/main/java/com/hathora/client/model/ApplicationWithDeploymentAllOf.java +src/main/java/com/hathora/client/model/ApplicationWithLatestDeploymentAndBuild.java +src/main/java/com/hathora/client/model/ApplicationWithLatestDeploymentAndBuildAllOf.java +src/main/java/com/hathora/client/model/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.java +src/main/java/com/hathora/client/model/ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf.java src/main/java/com/hathora/client/model/AuthConfiguration.java src/main/java/com/hathora/client/model/AuthConfigurationGoogle.java src/main/java/com/hathora/client/model/Build.java src/main/java/com/hathora/client/model/BuildRegionalContainerTagsInner.java +src/main/java/com/hathora/client/model/BuildStatus.java src/main/java/com/hathora/client/model/CardBrand.java src/main/java/com/hathora/client/model/CardPaymentMethod.java src/main/java/com/hathora/client/model/ConnectionInfo.java @@ -127,10 +141,12 @@ src/main/java/com/hathora/client/model/ContainerPort.java src/main/java/com/hathora/client/model/CreateBuildParams.java src/main/java/com/hathora/client/model/CreateLobbyParams.java 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/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 @@ -138,7 +154,9 @@ 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/ExposedPort.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 +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 @@ -147,6 +165,8 @@ 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/OrgToken.java +src/main/java/com/hathora/client/model/OrgTokenStatus.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/PlanName.java diff --git a/java/README.md b/java/README.md index 3b03c2a..24f3016 100644 --- a/java/README.md +++ b/java/README.md @@ -138,6 +138,7 @@ Class | Method | HTTP request | Description *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 | *LobbyV1Api* | [**createPrivateLobbyDeprecated**](docs/LobbyV1Api.md#createPrivateLobbyDeprecated) | **POST** /lobby/v1/{appId}/create/private | *LobbyV1Api* | [**createPublicLobbyDeprecated**](docs/LobbyV1Api.md#createPublicLobbyDeprecated) | **POST** /lobby/v1/{appId}/create/public | @@ -159,11 +160,15 @@ Class | Method | HTTP request | Description *LogV1Api* | [**getLogsForProcess**](docs/LogV1Api.md#getLogsForProcess) | **GET** /logs/v1/{appId}/process/{processId} | *ManagementV1Api* | [**sendVerificationEmail**](docs/ManagementV1Api.md#sendVerificationEmail) | **POST** /management/v1/sendverificationemail | *MetricsV1Api* | [**getMetrics**](docs/MetricsV1Api.md#getMetrics) | **GET** /metrics/v1/{appId}/process/{processId} | +*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 | *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* | [**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} | *RoomV1Api* | [**createRoomDeprecated**](docs/RoomV1Api.md#createRoomDeprecated) | **POST** /rooms/v1/{appId}/create | *RoomV1Api* | [**destroyRoomDeprecated**](docs/RoomV1Api.md#destroyRoomDeprecated) | **POST** /rooms/v1/{appId}/destroy/{roomId} | *RoomV1Api* | [**getActiveRoomsForProcessDeprecated**](docs/RoomV1Api.md#getActiveRoomsForProcessDeprecated) | **GET** /rooms/v1/{appId}/list/{processId}/active | @@ -188,12 +193,15 @@ Class | Method | HTTP request | Description - [ApiError](docs/ApiError.md) - [AppConfig](docs/AppConfig.md) - [Application](docs/Application.md) - - [ApplicationWithDeployment](docs/ApplicationWithDeployment.md) - - [ApplicationWithDeploymentAllOf](docs/ApplicationWithDeploymentAllOf.md) + - [ApplicationWithLatestDeploymentAndBuild](docs/ApplicationWithLatestDeploymentAndBuild.md) + - [ApplicationWithLatestDeploymentAndBuildAllOf](docs/ApplicationWithLatestDeploymentAndBuildAllOf.md) + - [ApplicationWithLatestDeploymentAndBuildAllOfDeployment](docs/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.md) + - [ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf](docs/ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf.md) - [AuthConfiguration](docs/AuthConfiguration.md) - [AuthConfigurationGoogle](docs/AuthConfigurationGoogle.md) - [Build](docs/Build.md) - [BuildRegionalContainerTagsInner](docs/BuildRegionalContainerTagsInner.md) + - [BuildStatus](docs/BuildStatus.md) - [CardBrand](docs/CardBrand.md) - [CardPaymentMethod](docs/CardPaymentMethod.md) - [ConnectionInfo](docs/ConnectionInfo.md) @@ -202,10 +210,12 @@ Class | Method | HTTP request | Description - [CreateBuildParams](docs/CreateBuildParams.md) - [CreateLobbyParams](docs/CreateLobbyParams.md) - [CreateLobbyV3Params](docs/CreateLobbyV3Params.md) + - [CreateOrgToken](docs/CreateOrgToken.md) - [CreatePrivateLobbyRequest](docs/CreatePrivateLobbyRequest.md) - [CreateRoomParams](docs/CreateRoomParams.md) - [CreateRoomResponse](docs/CreateRoomResponse.md) - [CreateRoomResponseAllOf](docs/CreateRoomResponseAllOf.md) + - [CreatedOrgToken](docs/CreatedOrgToken.md) - [CustomerPortalUrl](docs/CustomerPortalUrl.md) - [Deployment](docs/Deployment.md) - [DeploymentConfig](docs/DeploymentConfig.md) @@ -213,7 +223,9 @@ Class | Method | HTTP request | Description - [DiscoveryResponseInner](docs/DiscoveryResponseInner.md) - [ExposedPort](docs/ExposedPort.md) - [Invoice](docs/Invoice.md) + - [InvoiceStatus](docs/InvoiceStatus.md) - [LinkPaymentMethod](docs/LinkPaymentMethod.md) + - [ListOrgTokens](docs/ListOrgTokens.md) - [Lobby](docs/Lobby.md) - [LobbyV3](docs/LobbyV3.md) - [LobbyVisibility](docs/LobbyVisibility.md) @@ -222,6 +234,8 @@ Class | Method | HTTP request | Description - [LoginResponse](docs/LoginResponse.md) - [MetricName](docs/MetricName.md) - [MetricValue](docs/MetricValue.md) + - [OrgToken](docs/OrgToken.md) + - [OrgTokenStatus](docs/OrgTokenStatus.md) - [PartialCardCardPaymentMethodAchAchPaymentMethodLinkLinkPaymentMethod](docs/PartialCardCardPaymentMethodAchAchPaymentMethodLinkLinkPaymentMethod.md) - [PickRoomExcludeKeyofRoomAllocations](docs/PickRoomExcludeKeyofRoomAllocations.md) - [PlanName](docs/PlanName.md) diff --git a/java/api/openapi.yaml b/java/api/openapi.yaml index 0670945..4137708 100644 --- a/java/api/openapi.yaml +++ b/java/api/openapi.yaml @@ -33,13 +33,15 @@ tags: \ 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: ProcessesV1 + 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: "Deprecated. Use [RoomV2](https://hathora.dev/api#tag/RoomV2)." name: RoomV1 paths: @@ -55,7 +57,7 @@ paths: application/json: schema: items: - $ref: '#/components/schemas/ApplicationWithDeployment' + $ref: '#/components/schemas/ApplicationWithLatestDeploymentAndBuild' type: array description: Ok security: @@ -81,6 +83,12 @@ paths: schema: $ref: '#/components/schemas/Application' description: "" + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "422": content: application/json: @@ -125,6 +133,12 @@ paths: schema: $ref: '#/components/schemas/Application' description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -169,6 +183,12 @@ paths: schema: $ref: '#/components/schemas/Application' description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -196,6 +216,12 @@ paths: responses: "204": description: No content + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -332,6 +358,12 @@ paths: format: double type: number description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -354,6 +386,12 @@ paths: schema: $ref: '#/components/schemas/PaymentMethod' description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -388,6 +426,12 @@ paths: schema: type: string description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -413,6 +457,12 @@ paths: $ref: '#/components/schemas/Invoice' type: array description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -446,6 +496,12 @@ paths: $ref: '#/components/schemas/Build' type: array description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -483,6 +539,12 @@ paths: schema: $ref: '#/components/schemas/Build' description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -522,6 +584,12 @@ paths: schema: $ref: '#/components/schemas/Build' description: "" + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -574,6 +642,12 @@ paths: format: byte type: string description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -615,6 +689,12 @@ paths: responses: "204": description: No content + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -660,6 +740,49 @@ paths: $ref: '#/components/schemas/Deployment' 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: + - DeploymentV1 + x-accepts: application/json + /deployments/v1/{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/Deployment' + description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -697,6 +820,12 @@ paths: schema: $ref: '#/components/schemas/Deployment' description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -748,12 +877,24 @@ paths: 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: "" + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "500": content: application/json: @@ -831,6 +972,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "402": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -906,6 +1053,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "402": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -971,12 +1124,6 @@ paths: $ref: '#/components/schemas/Lobby' type: array description: Ok - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/ApiError' - description: "" "404": content: application/json: @@ -1031,6 +1178,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "402": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -1105,6 +1258,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "402": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -1179,6 +1338,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "402": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -1258,6 +1423,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "402": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -1398,6 +1569,12 @@ paths: schema: $ref: '#/components/schemas/Lobby' description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -1471,6 +1648,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "402": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -1652,6 +1835,12 @@ paths: format: byte type: string description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -1711,6 +1900,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -1767,19 +1962,19 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" - "404": + "401": content: application/json: schema: $ref: '#/components/schemas/ApiError' description: "" - "410": + "404": content: application/json: schema: $ref: '#/components/schemas/ApiError' description: "" - "500": + "410": content: application/json: schema: @@ -1833,6 +2028,12 @@ paths: format: byte type: string description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -1861,6 +2062,12 @@ paths: schema: $ref: '#/components/schemas/VerificationEmailResponse' description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "500": content: application/json: @@ -1938,6 +2145,12 @@ paths: schema: $ref: '#/components/schemas/MetricsResponse' description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -1992,6 +2205,12 @@ paths: $ref: '#/components/schemas/ProcessWithRooms' type: array description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -2034,6 +2253,12 @@ paths: $ref: '#/components/schemas/Process' type: array description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -2072,6 +2297,12 @@ paths: schema: $ref: '#/components/schemas/Process' description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -2115,13 +2346,13 @@ paths: schema: $ref: '#/components/schemas/ProcessV2' description: Ok - "404": + "401": content: application/json: schema: $ref: '#/components/schemas/ApiError' description: "" - "500": + "404": content: application/json: schema: @@ -2173,6 +2404,12 @@ paths: $ref: '#/components/schemas/ProcessV2' type: array description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -2184,6 +2421,52 @@ paths: 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: + $ref: '#/components/schemas/ApiError' + description: "" + security: + - hathoraDevToken: [] + tags: + - ProcessesV2 + x-accepts: application/json /rooms/v1/{appId}/create: post: deprecated: true @@ -2222,6 +2505,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "402": content: application/json: @@ -2278,6 +2567,12 @@ paths: schema: $ref: '#/components/schemas/Room' description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -2317,6 +2612,12 @@ paths: $ref: '#/components/schemas/RoomWithoutAllocations' type: array description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -2356,6 +2657,12 @@ paths: $ref: '#/components/schemas/RoomWithoutAllocations' type: array description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -2389,6 +2696,12 @@ paths: responses: "204": description: No content + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -2428,6 +2741,12 @@ paths: responses: "204": description: No content + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -2477,6 +2796,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "402": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -2534,6 +2859,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "402": content: application/json: @@ -2590,6 +2921,12 @@ paths: schema: $ref: '#/components/schemas/Room' description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -2630,6 +2967,12 @@ paths: $ref: '#/components/schemas/RoomWithoutAllocations' type: array description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -2670,6 +3013,12 @@ paths: $ref: '#/components/schemas/RoomWithoutAllocations' type: array description: Ok + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -2704,6 +3053,12 @@ paths: responses: "204": description: No content + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -2745,6 +3100,12 @@ paths: responses: "204": description: No content + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -2795,6 +3156,12 @@ paths: schema: $ref: '#/components/schemas/ApiError' description: "" + "402": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -2838,6 +3205,12 @@ paths: responses: "204": description: No content + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiError' + description: "" "404": content: application/json: @@ -2856,6 +3229,134 @@ paths: - RoomV2 x-content-type: application/json x-accepts: application/json + /tokens/v1/orgs/{orgId}: + get: + description: List all organization tokens for a given org. + operationId: GetOrgTokens + 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/ListOrgTokens' + 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: + - OrgTokensV1 + x-accepts: application/json + /tokens/v1/orgs/{orgId}/create: + post: + description: Create a new organization token. + operationId: CreateOrgToken + parameters: + - explode: false + in: path + name: orgId + required: true + schema: + $ref: '#/components/schemas/OrgId' + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateOrgToken' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/CreatedOrgToken' + description: "" + "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: "" + security: + - hathoraDevToken: [] + tags: + - OrgTokensV1 + x-content-type: application/json + x-accepts: application/json + /tokens/v1/orgs/{orgId}/tokens/{orgTokenId}/revoke: + post: + description: Revoke an organization token. + operationId: RevokeOrgToken + parameters: + - explode: false + in: path + name: orgId + required: true + schema: + $ref: '#/components/schemas/OrgId' + style: simple + - explode: false + in: path + name: orgTokenId + required: true + schema: + $ref: '#/components/schemas/OrgId' + style: simple + responses: + "200": + content: + application/json: + schema: + type: boolean + 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: + - OrgTokensV1 + x-accepts: application/json components: examples: {} headers: {} @@ -2899,20 +3400,21 @@ components: type: object type: object OrgId: - description: System generated unique identifier for an organization. - example: google-oauth2|107030234048588177467 + description: System generated unique identifier for an organization. Not guaranteed + to have a specific format. + example: org-6f706e83-0ec1-437a-9a46-7d4281eb2f39 type: string Application: description: An application object is the top level namespace for the game server. example: createdAt: 2000-01-23T04:56:07.000+00:00 deletedAt: 2000-01-23T04:56:07.000+00:00 - createdBy: dev@hathora.dev + createdBy: google-oauth2|107030234048588177467 appName: minecraft appId: app-af469a92-5b45-4565-b3c4-b79878de67d2 appSecret: secret-6f706e83-0ec1-437a-9a46-7d4281eb2f39 - deletedBy: dev@hathora.dev - orgId: google-oauth2|107030234048588177467 + deletedBy: google-oauth2|107030234048588177467 + orgId: org-6f706e83-0ec1-437a-9a46-7d4281eb2f39 authConfiguration: nickname: "{}" anonymous: "{}" @@ -2920,8 +3422,8 @@ components: clientId: clientId properties: deletedBy: - description: Email address for the user that deleted the application. - example: dev@hathora.dev + description: UserId or email address for the user that deleted the application. + example: google-oauth2|107030234048588177467 nullable: true type: string deletedAt: @@ -2934,12 +3436,13 @@ components: format: date-time type: string createdBy: - description: Email address for the user that deleted the application. - example: dev@hathora.dev + description: UserId or email address for the user that created the application. + example: google-oauth2|107030234048588177467 type: string orgId: - description: System generated unique identifier for an organization. - example: google-oauth2|107030234048588177467 + description: System generated unique identifier for an organization. Not + guaranteed to have a specific format. + example: org-6f706e83-0ec1-437a-9a46-7d4281eb2f39 type: string authConfiguration: $ref: '#/components/schemas/AuthConfiguration' @@ -3064,18 +3567,25 @@ components: 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: dev@hathora.dev + 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. @@ -3114,31 +3624,143 @@ components: type: string containerPort: deprecated: true - format: double - type: number + format: double + type: number + createdAt: + description: When the deployment was created. + format: date-time + type: string + 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 + 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: + - additionalContainerPorts + - appId + - buildId + - containerPort + - createdAt + - createdBy + - defaultContainerPort + - deploymentId + - env + - planName + - requestedCPU + - requestedMemoryMB + - roomsPerProcess + - transportType + type: object + BuildStatus: + enum: + - created + - running + - succeeded + - failed + type: string + Region: + enum: + - Seattle + - Los_Angeles + - Washington_DC + - Chicago + - London + - Frankfurt + - Mumbai + - Singapore + - Tokyo + - Sydney + - Sao_Paulo + 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)." + example: 0.1.14-14c793 + maxLength: 1000 + type: string + Build: + description: A build represents a game server artifact and its associated metadata. + example: + createdAt: 2000-01-23T04:56:07.000+00:00 + deletedAt: 2000-01-23T04:56:07.000+00:00 + buildTag: "" + regionalContainerTags: + - region: null + containerTag: containerTag + - region: null + containerTag: containerTag + createdBy: google-oauth2|107030234048588177467 + appId: app-af469a92-5b45-4565-b3c4-b79878de67d2 + startedAt: 2000-01-23T04:56:07.000+00:00 + buildId: 1 + imageSize: 0 + status: null + finishedAt: 2000-01-23T04:56:07.000+00:00 + properties: + buildTag: + allOf: + - $ref: '#/components/schemas/BuildTag' + nullable: true + regionalContainerTags: + deprecated: true + items: + $ref: '#/components/schemas/Build_regionalContainerTags_inner' + type: array + imageSize: + description: The size (in bytes) of the Docker image built by Hathora. + format: int32 + type: integer + status: + $ref: '#/components/schemas/BuildStatus' + deletedAt: + description: When the build was deleted. + format: date-time + nullable: true + type: string + finishedAt: + description: "When [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild)\ + \ finished executing." + format: date-time + nullable: true + type: string + startedAt: + description: "When [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild)\ + \ is called." + format: date-time + nullable: true + type: string createdAt: - description: When the deployment was created. + description: "When [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild)\ + \ is called." format: date-time type: string createdBy: - description: Email address for the user that created the deployment. - example: dev@hathora.dev + description: UserId or email address for the user that created the build. + 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 - 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 @@ -3149,25 +3771,21 @@ components: example: app-af469a92-5b45-4565-b3c4-b79878de67d2 type: string required: - - additionalContainerPorts - appId - buildId - - containerPort - createdAt - createdBy - - defaultContainerPort - - deploymentId - - env - - planName - - requestedCPU - - requestedMemoryMB - - roomsPerProcess - - transportType + - deletedAt + - finishedAt + - imageSize + - regionalContainerTags + - startedAt + - status type: object - ApplicationWithDeployment: + ApplicationWithLatestDeploymentAndBuild: allOf: - $ref: '#/components/schemas/Application' - - $ref: '#/components/schemas/ApplicationWithDeployment_allOf' + - $ref: '#/components/schemas/ApplicationWithLatestDeploymentAndBuild_allOf' AppConfig: example: appName: minecraft @@ -3303,8 +3921,13 @@ components: required: - returnUrl type: object + InvoiceStatus: + enum: + - pending + - paid + - overdue + type: string Invoice: - description: Billing types example: amountDue: 0.8008281904610115 pdfUrl: pdfUrl @@ -3312,14 +3935,10 @@ components: year: 6.027456183070403 dueDate: 2000-01-23T04:56:07.000+00:00 id: id - status: pending + status: null properties: status: - enum: - - pending - - paid - - overdue - type: string + $ref: '#/components/schemas/InvoiceStatus' amountDue: format: double type: number @@ -3345,123 +3964,6 @@ components: - status - year type: object - Region: - enum: - - Seattle - - Los_Angeles - - Washington_DC - - Chicago - - London - - Frankfurt - - Mumbai - - Singapore - - Tokyo - - Sydney - - Sao_Paulo - 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)." - example: 0.1.14-14c793 - maxLength: 1000 - type: string - Build: - description: A build represents a game server artifact and its associated metadata. - example: - createdAt: 2000-01-23T04:56:07.000+00:00 - deletedAt: 2000-01-23T04:56:07.000+00:00 - buildTag: "" - regionalContainerTags: - - region: null - containerTag: containerTag - - region: null - containerTag: containerTag - createdBy: dev@hathora.dev - appId: app-af469a92-5b45-4565-b3c4-b79878de67d2 - startedAt: 2000-01-23T04:56:07.000+00:00 - buildId: 1 - imageSize: 0 - status: created - finishedAt: 2000-01-23T04:56:07.000+00:00 - properties: - buildTag: - allOf: - - $ref: '#/components/schemas/BuildTag' - nullable: true - regionalContainerTags: - deprecated: true - items: - $ref: '#/components/schemas/Build_regionalContainerTags_inner' - type: array - imageSize: - description: The size (in bytes) of the Docker image built by Hathora. - format: int32 - type: integer - status: - description: |- - Current status of your build. - - `created`: a build was created but not yet run - - `running`: the build process is actively executing - - `succeeded`: the game server artifact was successfully built and stored in the Hathora registries - - `failed`: the build process was unsuccessful, most likely due to an error with the `Dockerfile` - enum: - - created - - running - - succeeded - - failed - type: string - deletedAt: - description: When the build was deleted. - format: date-time - nullable: true - type: string - finishedAt: - description: "When [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild)\ - \ finished executing." - format: date-time - nullable: true - type: string - startedAt: - description: "When [`RunBuild()`](https://hathora.dev/api#tag/BuildV1/operation/RunBuild)\ - \ is called." - format: date-time - nullable: true - type: string - createdAt: - description: "When [`CreateBuild()`](https://hathora.dev/api#tag/BuildV1/operation/CreateBuild)\ - \ is called." - format: date-time - type: string - createdBy: - description: Email address for the user that created the build. - example: dev@hathora.dev - type: string - 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: - - appId - - buildId - - buildTag - - createdAt - - createdBy - - deletedAt - - finishedAt - - imageSize - - regionalContainerTags - - startedAt - - status - type: object CreateBuildParams: example: buildTag: 0.1.14-14c793 @@ -3499,7 +4001,14 @@ components: value: "TRUE" - name: EULA value: "TRUE" + idleTimeoutEnabled: true 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. @@ -3587,7 +4096,7 @@ components: example: createdAt: 2000-01-23T04:56:07.000+00:00 visibility: private - createdBy: dev@hathora.dev + createdBy: google-oauth2|107030234048588177467 initialConfig: "{}" appId: app-af469a92-5b45-4565-b3c4-b79878de67d2 state: "{}" @@ -3615,8 +4124,8 @@ components: format: date-time type: string createdBy: - description: Email address for the user that created the lobby. - example: dev@hathora.dev + description: UserId or email address for the user that created the lobby. + example: google-oauth2|107030234048588177467 type: string local: deprecated: true @@ -3694,7 +4203,7 @@ components: createdAt: 2000-01-23T04:56:07.000+00:00 roomConfig: "" visibility: private - createdBy: dev@hathora.dev + createdBy: google-oauth2|107030234048588177467 appId: app-af469a92-5b45-4565-b3c4-b79878de67d2 region: null shortCode: LFG4 @@ -3710,8 +4219,8 @@ components: format: date-time type: string createdBy: - description: Email address for the user that created the lobby. - example: dev@hathora.dev + description: UserId or email address for the user that created the lobby. + example: google-oauth2|107030234048588177467 type: string roomConfig: allOf: @@ -3913,11 +4422,7 @@ components: idleSince: 2000-01-23T04:56:07.000+00:00 terminatedAt: 2000-01-23T04:56:07.000+00:00 roomsPerProcess: 3 - exposedPort: - host: 1.proxy.hathora.dev - name: default - port: 34567 - transportType: tcp + exposedPort: "" startedAt: 2000-01-23T04:56:07.000+00:00 roomsAllocated: 1 roomsAllocatedUpdatedAt: 2000-01-23T04:56:07.000+00:00 @@ -4020,7 +4525,9 @@ components: maxItems: 2 type: array exposedPort: - $ref: '#/components/schemas/ExposedPort' + allOf: + - $ref: '#/components/schemas/ExposedPort' + nullable: true port: deprecated: true format: double @@ -4052,6 +4559,7 @@ components: - deploymentId - draining - egressedBytes + - exposedPort - host - idleSince - port @@ -4175,11 +4683,7 @@ components: example: terminatedAt: 2000-01-23T04:56:07.000+00:00 roomsPerProcess: 3 - exposedPort: - host: 1.proxy.hathora.dev - name: default - port: 34567 - transportType: tcp + exposedPort: "" startedAt: 2000-01-23T04:56:07.000+00:00 roomsAllocated: 1 stoppingAt: 2000-01-23T04:56:07.000+00:00 @@ -4243,7 +4747,9 @@ components: maxItems: 2 type: array exposedPort: - $ref: '#/components/schemas/ExposedPort' + allOf: + - $ref: '#/components/schemas/ExposedPort' + nullable: true region: $ref: '#/components/schemas/Region' processId: @@ -4265,6 +4771,7 @@ components: - appId - createdAt - deploymentId + - exposedPort - processId - region - roomsAllocated @@ -4467,6 +4974,116 @@ components: required: - roomConfig type: object + OrgTokenId: + description: System generated unique identifier for an organization token. + example: org-token-af469a92-5b45-4565-b3c4-b79878de67d2 + type: string + OrgTokenName: + description: Readable name for a token. Must be unique within an organization. + example: ci-token + maxLength: 64 + type: string + OrgTokenStatus: + enum: + - active + - revoked + type: string + OrgToken: + example: + createdAt: 2000-01-23T04:56:07.000+00:00 + orgTokenId: org-token-af469a92-5b45-4565-b3c4-b79878de67d2 + createdBy: createdBy + name: ci-token + lastFourCharsOfKey: lastFourCharsOfKey + orgId: orgId + status: null + properties: + createdAt: + format: date-time + type: string + createdBy: + type: string + lastFourCharsOfKey: + type: string + status: + $ref: '#/components/schemas/OrgTokenStatus' + name: + description: Readable name for a token. Must be unique within an organization. + example: ci-token + maxLength: 64 + type: string + orgId: + type: string + orgTokenId: + description: System generated unique identifier for an organization token. + example: org-token-af469a92-5b45-4565-b3c4-b79878de67d2 + type: string + required: + - createdAt + - createdBy + - lastFourCharsOfKey + - name + - orgId + - orgTokenId + - status + type: object + ListOrgTokens: + example: + tokens: + - createdAt: 2000-01-23T04:56:07.000+00:00 + orgTokenId: org-token-af469a92-5b45-4565-b3c4-b79878de67d2 + createdBy: createdBy + name: ci-token + lastFourCharsOfKey: lastFourCharsOfKey + orgId: orgId + status: null + - createdAt: 2000-01-23T04:56:07.000+00:00 + orgTokenId: org-token-af469a92-5b45-4565-b3c4-b79878de67d2 + createdBy: createdBy + name: ci-token + lastFourCharsOfKey: lastFourCharsOfKey + orgId: orgId + status: null + properties: + tokens: + items: + $ref: '#/components/schemas/OrgToken' + type: array + required: + - tokens + type: object + CreatedOrgToken: + example: + plainTextToken: plainTextToken + orgToken: + createdAt: 2000-01-23T04:56:07.000+00:00 + orgTokenId: org-token-af469a92-5b45-4565-b3c4-b79878de67d2 + createdBy: createdBy + name: ci-token + lastFourCharsOfKey: lastFourCharsOfKey + orgId: orgId + status: null + properties: + plainTextToken: + type: string + orgToken: + $ref: '#/components/schemas/OrgToken' + required: + - orgToken + - plainTextToken + type: object + CreateOrgToken: + example: + name: ci-token + properties: + name: + description: Readable name for a token. Must be unique within an organization. + example: ci-token + maxLength: 64 + type: string + required: + - name + type: object RunBuild_request: properties: file: @@ -4520,14 +5137,6 @@ components: - name - value type: object - ApplicationWithDeployment_allOf: - properties: - deployment: - $ref: '#/components/schemas/Deployment' - required: - - deployment - type: object - example: null Build_regionalContainerTags_inner: example: region: null @@ -4541,6 +5150,23 @@ components: - containerTag - region type: object + ApplicationWithLatestDeploymentAndBuild_allOf_deployment_allOf: + properties: + build: + $ref: '#/components/schemas/Build' + required: + - build + type: object + ApplicationWithLatestDeploymentAndBuild_allOf_deployment: + allOf: + - $ref: '#/components/schemas/Deployment' + - $ref: '#/components/schemas/ApplicationWithLatestDeploymentAndBuild_allOf_deployment_allOf' + ApplicationWithLatestDeploymentAndBuild_allOf: + properties: + deployment: + $ref: '#/components/schemas/ApplicationWithLatestDeploymentAndBuild_allOf_deployment' + type: object + example: null DiscoveryResponse_inner: properties: port: diff --git a/java/docs/AppV1Api.md b/java/docs/AppV1Api.md index 468381e..f99103a 100644 --- a/java/docs/AppV1Api.md +++ b/java/docs/AppV1Api.md @@ -77,6 +77,7 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **201** | | - | +| **401** | | - | | **422** | | - | | **500** | | - | @@ -145,6 +146,7 @@ null (empty response body) | Status code | Description | Response headers | |-------------|-------------|------------------| | **204** | No content | - | +| **401** | | - | | **404** | | - | | **500** | | - | @@ -214,11 +216,12 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **401** | | - | | **404** | | - | # **getApps** -> List<ApplicationWithDeployment> getApps() +> List<ApplicationWithLatestDeploymentAndBuild> getApps() @@ -245,7 +248,7 @@ public class Example { AppV1Api apiInstance = new AppV1Api(defaultClient); try { - List result = apiInstance.getApps(); + List result = apiInstance.getApps(); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AppV1Api#getApps"); @@ -263,7 +266,7 @@ This endpoint does not need any parameter. ### Return type -[**List<ApplicationWithDeployment>**](ApplicationWithDeployment.md) +[**List<ApplicationWithLatestDeploymentAndBuild>**](ApplicationWithLatestDeploymentAndBuild.md) ### Authorization @@ -347,6 +350,7 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **401** | | - | | **404** | | - | | **422** | | - | | **500** | | - | diff --git a/java/docs/Application.md b/java/docs/Application.md index 23ff2c9..cd0d05f 100644 --- a/java/docs/Application.md +++ b/java/docs/Application.md @@ -8,11 +8,11 @@ An application object is the top level namespace for the game server. | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**deletedBy** | **String** | Email address for the user that deleted the application. | | +|**deletedBy** | **String** | UserId or email address for the user that deleted the application. | | |**deletedAt** | **OffsetDateTime** | When the application was deleted. | | |**createdAt** | **OffsetDateTime** | When the application was created. | | -|**createdBy** | **String** | Email address for the user that deleted the application. | | -|**orgId** | **String** | System generated unique identifier for an organization. | | +|**createdBy** | **String** | UserId or email address for the user that created the application. | | +|**orgId** | **String** | System generated unique identifier for an organization. Not guaranteed to have a specific format. | | |**authConfiguration** | [**AuthConfiguration**](AuthConfiguration.md) | | | |**appSecret** | **String** | Secret that is used for identity and access management. | | |**appId** | **String** | System generated unique identifier for an application. | | diff --git a/java/docs/ApplicationWithLatestDeploymentAndBuild.md b/java/docs/ApplicationWithLatestDeploymentAndBuild.md new file mode 100644 index 0000000..aba1763 --- /dev/null +++ b/java/docs/ApplicationWithLatestDeploymentAndBuild.md @@ -0,0 +1,22 @@ + + +# ApplicationWithLatestDeploymentAndBuild + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**deletedBy** | **String** | UserId or email address for the user that deleted the application. | | +|**deletedAt** | **OffsetDateTime** | When the application was deleted. | | +|**createdAt** | **OffsetDateTime** | When the application was created. | | +|**createdBy** | **String** | UserId or email address for the user that created the application. | | +|**orgId** | **String** | System generated unique identifier for an organization. Not guaranteed to have a specific format. | | +|**authConfiguration** | [**AuthConfiguration**](AuthConfiguration.md) | | | +|**appSecret** | **String** | Secret that is used for identity and access management. | | +|**appId** | **String** | System generated unique identifier for an application. | | +|**appName** | **String** | Readable name for an application. Must be unique within an organization. | | +|**deployment** | [**ApplicationWithLatestDeploymentAndBuildAllOfDeployment**](ApplicationWithLatestDeploymentAndBuildAllOfDeployment.md) | | [optional] | + + + diff --git a/java/docs/ApplicationWithLatestDeploymentAndBuildAllOf.md b/java/docs/ApplicationWithLatestDeploymentAndBuildAllOf.md new file mode 100644 index 0000000..cb21e65 --- /dev/null +++ b/java/docs/ApplicationWithLatestDeploymentAndBuildAllOf.md @@ -0,0 +1,13 @@ + + +# ApplicationWithLatestDeploymentAndBuildAllOf + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**deployment** | [**ApplicationWithLatestDeploymentAndBuildAllOfDeployment**](ApplicationWithLatestDeploymentAndBuildAllOfDeployment.md) | | [optional] | + + + diff --git a/java/docs/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.md b/java/docs/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.md new file mode 100644 index 0000000..4df861d --- /dev/null +++ b/java/docs/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.md @@ -0,0 +1,38 @@ + + +# ApplicationWithLatestDeploymentAndBuildAllOfDeployment + + +## Properties + +| 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. | | +|**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. | | +|**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. | | +|**build** | [**Build**](Build.md) | | | + + + +## Enum: TransportTypeEnum + +| Name | Value | +|---- | -----| +| TCP | "tcp" | +| UDP | "udp" | +| TLS | "tls" | + + + diff --git a/java/docs/ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf.md b/java/docs/ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf.md new file mode 100644 index 0000000..9d4815b --- /dev/null +++ b/java/docs/ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf.md @@ -0,0 +1,13 @@ + + +# ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**build** | [**Build**](Build.md) | | | + + + diff --git a/java/docs/BillingV1Api.md b/java/docs/BillingV1Api.md index dc20bfd..30d1130 100644 --- a/java/docs/BillingV1Api.md +++ b/java/docs/BillingV1Api.md @@ -70,6 +70,7 @@ This endpoint does not need any parameter. | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **401** | | - | | **404** | | - | @@ -132,6 +133,7 @@ This endpoint does not need any parameter. | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **401** | | - | | **404** | | - | @@ -194,6 +196,7 @@ This endpoint does not need any parameter. | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **401** | | - | | **404** | | - | | **500** | | - | @@ -261,5 +264,6 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **401** | | - | | **404** | | - | diff --git a/java/docs/Build.md b/java/docs/Build.md index 7ac2837..d243d79 100644 --- a/java/docs/Build.md +++ b/java/docs/Build.md @@ -8,28 +8,17 @@ 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). | | +|**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] | |**regionalContainerTags** | [**List<BuildRegionalContainerTagsInner>**](BuildRegionalContainerTagsInner.md) | | | |**imageSize** | **Integer** | The size (in bytes) of the Docker image built by Hathora. | | -|**status** | [**StatusEnum**](#StatusEnum) | Current status of your build. `created`: a build was created but not yet run `running`: the build process is actively executing `succeeded`: the game server artifact was successfully built and stored in the Hathora registries `failed`: the build process was unsuccessful, most likely due to an error with the `Dockerfile` | | +|**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. | | -|**createdBy** | **String** | Email address for the user that created the build. | | +|**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. | | -## Enum: StatusEnum - -| Name | Value | -|---- | -----| -| CREATED | "created" | -| RUNNING | "running" | -| SUCCEEDED | "succeeded" | -| FAILED | "failed" | - - - diff --git a/java/docs/BuildStatus.md b/java/docs/BuildStatus.md new file mode 100644 index 0000000..b4dad0e --- /dev/null +++ b/java/docs/BuildStatus.md @@ -0,0 +1,17 @@ + + +# BuildStatus + +## Enum + + +* `CREATED` (value: `"created"`) + +* `RUNNING` (value: `"running"`) + +* `SUCCEEDED` (value: `"succeeded"`) + +* `FAILED` (value: `"failed"`) + + + diff --git a/java/docs/BuildV1Api.md b/java/docs/BuildV1Api.md index 912e52a..3a2fa55 100644 --- a/java/docs/BuildV1Api.md +++ b/java/docs/BuildV1Api.md @@ -79,6 +79,7 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **201** | | - | +| **401** | | - | | **404** | | - | | **500** | | - | @@ -149,6 +150,7 @@ null (empty response body) | Status code | Description | Response headers | |-------------|-------------|------------------| | **204** | No content | - | +| **401** | | - | | **404** | | - | | **422** | | - | | **500** | | - | @@ -221,6 +223,7 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **401** | | - | | **404** | | - | @@ -289,6 +292,7 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **401** | | - | | **404** | | - | @@ -361,6 +365,7 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **401** | | - | | **404** | | - | | **500** | | - | diff --git a/java/docs/CreateOrgToken.md b/java/docs/CreateOrgToken.md new file mode 100644 index 0000000..53c69f0 --- /dev/null +++ b/java/docs/CreateOrgToken.md @@ -0,0 +1,13 @@ + + +# CreateOrgToken + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Readable name for a token. Must be unique within an organization. | | + + + diff --git a/java/docs/CreatedOrgToken.md b/java/docs/CreatedOrgToken.md new file mode 100644 index 0000000..775763c --- /dev/null +++ b/java/docs/CreatedOrgToken.md @@ -0,0 +1,14 @@ + + +# CreatedOrgToken + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**plainTextToken** | **String** | | | +|**orgToken** | [**OrgToken**](OrgToken.md) | | | + + + diff --git a/java/docs/Deployment.md b/java/docs/Deployment.md index eb38d3e..32d7adf 100644 --- a/java/docs/Deployment.md +++ b/java/docs/Deployment.md @@ -8,6 +8,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. | | |**roomsPerProcess** | **Integer** | Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. | | |**planName** | **PlanName** | | | @@ -16,7 +17,7 @@ Deployment is a versioned configuration for a build that describes runtime behav |**transportType** | [**TransportTypeEnum**](#TransportTypeEnum) | | | |**containerPort** | **Double** | | | |**createdAt** | **OffsetDateTime** | When the deployment was created. | | -|**createdBy** | **String** | Email address for the user that created the deployment. | | +|**createdBy** | **String** | UserId or email address for the user that created the deployment. | | |**requestedMemoryMB** | **Integer** | 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. | | diff --git a/java/docs/DeploymentConfig.md b/java/docs/DeploymentConfig.md index 546b4ef..f02e9d3 100644 --- a/java/docs/DeploymentConfig.md +++ b/java/docs/DeploymentConfig.md @@ -8,6 +8,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. | | |**roomsPerProcess** | **Integer** | Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. | | |**planName** | **PlanName** | | | diff --git a/java/docs/DeploymentV1Api.md b/java/docs/DeploymentV1Api.md index 9731125..e3ec0bb 100644 --- a/java/docs/DeploymentV1Api.md +++ b/java/docs/DeploymentV1Api.md @@ -7,6 +7,7 @@ All URIs are relative to *https://api.hathora.dev* | [**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 | | @@ -80,7 +81,9 @@ public class Example { |-------------|-------------|------------------| | **201** | | - | | **400** | | - | +| **401** | | - | | **404** | | - | +| **422** | | - | | **500** | | - | @@ -151,6 +154,7 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **401** | | - | | **404** | | - | @@ -219,5 +223,75 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **401** | | - | +| **404** | | - | + + +# **getLatestDeployment** +> Deployment 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.DeploymentV1Api; + +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"); + + DeploymentV1Api apiInstance = new DeploymentV1Api(defaultClient); + String appId = "appId_example"; // String | + try { + Deployment result = apiInstance.getLatestDeployment(appId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DeploymentV1Api#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 + +[**Deployment**](Deployment.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/Invoice.md b/java/docs/Invoice.md index 410c73a..0c14a2f 100644 --- a/java/docs/Invoice.md +++ b/java/docs/Invoice.md @@ -2,13 +2,12 @@ # Invoice -Billing types ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**status** | [**StatusEnum**](#StatusEnum) | | | +|**status** | **InvoiceStatus** | | | |**amountDue** | **Double** | | | |**pdfUrl** | **String** | | | |**dueDate** | **OffsetDateTime** | | | @@ -18,13 +17,3 @@ Billing types -## Enum: StatusEnum - -| Name | Value | -|---- | -----| -| PENDING | "pending" | -| PAID | "paid" | -| OVERDUE | "overdue" | - - - diff --git a/java/docs/InvoiceStatus.md b/java/docs/InvoiceStatus.md new file mode 100644 index 0000000..6184d54 --- /dev/null +++ b/java/docs/InvoiceStatus.md @@ -0,0 +1,15 @@ + + +# InvoiceStatus + +## Enum + + +* `PENDING` (value: `"pending"`) + +* `PAID` (value: `"paid"`) + +* `OVERDUE` (value: `"overdue"`) + + + diff --git a/java/docs/ListOrgTokens.md b/java/docs/ListOrgTokens.md new file mode 100644 index 0000000..296e3dc --- /dev/null +++ b/java/docs/ListOrgTokens.md @@ -0,0 +1,13 @@ + + +# ListOrgTokens + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**tokens** | [**List<OrgToken>**](OrgToken.md) | | | + + + diff --git a/java/docs/Lobby.md b/java/docs/Lobby.md index ee23e55..ab4547f 100644 --- a/java/docs/Lobby.md +++ b/java/docs/Lobby.md @@ -12,7 +12,7 @@ A lobby object allows you to store and manage metadata for your rooms. |**state** | **Object** | JSON blob to store metadata for a room. Must be smaller than 1MB. | [optional] | |**initialConfig** | **Object** | User input to initialize the game state. Object must be smaller than 64KB. | | |**createdAt** | **OffsetDateTime** | When the lobby was created. | | -|**createdBy** | **String** | Email address for the user that created the lobby. | | +|**createdBy** | **String** | UserId or email address for the user that created the lobby. | | |**local** | **Boolean** | | | |**visibility** | **LobbyVisibility** | | | |**region** | **Region** | | | diff --git a/java/docs/LobbyV1Api.md b/java/docs/LobbyV1Api.md index cc5734f..fc29ddf 100644 --- a/java/docs/LobbyV1Api.md +++ b/java/docs/LobbyV1Api.md @@ -79,6 +79,7 @@ public class Example { | **200** | Ok | - | | **400** | | - | | **401** | | - | +| **402** | | - | | **404** | | - | | **422** | | - | | **429** | | - | @@ -154,6 +155,7 @@ public class Example { | **200** | Ok | - | | **400** | | - | | **401** | | - | +| **402** | | - | | **404** | | - | | **422** | | - | | **429** | | - | @@ -222,6 +224,5 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | -| **401** | | - | | **404** | | - | diff --git a/java/docs/LobbyV2Api.md b/java/docs/LobbyV2Api.md index 290ab31..e8ab827 100644 --- a/java/docs/LobbyV2Api.md +++ b/java/docs/LobbyV2Api.md @@ -85,6 +85,7 @@ public class Example { | **201** | | - | | **400** | | - | | **401** | | - | +| **402** | | - | | **404** | | - | | **422** | | - | | **429** | | - | @@ -160,6 +161,7 @@ public class Example { | **201** | | - | | **400** | | - | | **401** | | - | +| **402** | | - | | **404** | | - | | **422** | | - | | **429** | | - | @@ -235,6 +237,7 @@ public class Example { | **201** | | - | | **400** | | - | | **401** | | - | +| **402** | | - | | **404** | | - | | **422** | | - | | **429** | | - | @@ -310,6 +313,7 @@ public class Example { | **201** | | - | | **400** | | - | | **401** | | - | +| **402** | | - | | **404** | | - | | **422** | | - | | **429** | | - | @@ -514,6 +518,7 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **401** | | - | | **404** | | - | | **422** | | - | diff --git a/java/docs/LobbyV3.md b/java/docs/LobbyV3.md index 5cd1131..50a9027 100644 --- a/java/docs/LobbyV3.md +++ b/java/docs/LobbyV3.md @@ -10,7 +10,7 @@ A lobby object allows you to store and manage metadata for your rooms. |------------ | ------------- | ------------- | -------------| |**shortCode** | **String** | User-defined identifier for a lobby. | | |**createdAt** | **OffsetDateTime** | When the lobby was created. | | -|**createdBy** | **String** | Email address for the user that created the lobby. | | +|**createdBy** | **String** | UserId or email address for the user that created the lobby. | | |**roomConfig** | **String** | 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). | | |**visibility** | **LobbyVisibility** | | | |**region** | **Region** | | | diff --git a/java/docs/LobbyV3Api.md b/java/docs/LobbyV3Api.md index 759c437..d335ffa 100644 --- a/java/docs/LobbyV3Api.md +++ b/java/docs/LobbyV3Api.md @@ -84,6 +84,7 @@ public class Example { | **201** | | - | | **400** | | - | | **401** | | - | +| **402** | | - | | **404** | | - | | **422** | | - | | **429** | | - | diff --git a/java/docs/LogV1Api.md b/java/docs/LogV1Api.md index 3608cf6..9d0d229 100644 --- a/java/docs/LogV1Api.md +++ b/java/docs/LogV1Api.md @@ -79,9 +79,9 @@ public class Example { |-------------|-------------|------------------| | **200** | Ok | - | | **400** | | - | +| **401** | | - | | **404** | | - | | **410** | | - | -| **500** | | - | # **getLogsForApp** @@ -155,6 +155,7 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **401** | | - | | **404** | | - | @@ -229,6 +230,7 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **401** | | - | | **404** | | - | @@ -304,6 +306,7 @@ public class Example { |-------------|-------------|------------------| | **200** | Ok | - | | **400** | | - | +| **401** | | - | | **404** | | - | | **410** | | - | | **500** | | - | diff --git a/java/docs/ManagementV1Api.md b/java/docs/ManagementV1Api.md index 364bee1..e78e2dd 100644 --- a/java/docs/ManagementV1Api.md +++ b/java/docs/ManagementV1Api.md @@ -66,5 +66,6 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **401** | | - | | **500** | | - | diff --git a/java/docs/MetricsV1Api.md b/java/docs/MetricsV1Api.md index 8fe1be1..226a6dd 100644 --- a/java/docs/MetricsV1Api.md +++ b/java/docs/MetricsV1Api.md @@ -83,6 +83,7 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **401** | | - | | **404** | | - | | **422** | | - | | **500** | | - | diff --git a/java/docs/OrgToken.md b/java/docs/OrgToken.md new file mode 100644 index 0000000..1f9cf80 --- /dev/null +++ b/java/docs/OrgToken.md @@ -0,0 +1,19 @@ + + +# OrgToken + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**createdAt** | **OffsetDateTime** | | | +|**createdBy** | **String** | | | +|**lastFourCharsOfKey** | **String** | | | +|**status** | **OrgTokenStatus** | | | +|**name** | **String** | Readable name for a token. Must be unique within an organization. | | +|**orgId** | **String** | | | +|**orgTokenId** | **String** | System generated unique identifier for an organization token. | | + + + diff --git a/java/docs/OrgTokenStatus.md b/java/docs/OrgTokenStatus.md new file mode 100644 index 0000000..c7ef705 --- /dev/null +++ b/java/docs/OrgTokenStatus.md @@ -0,0 +1,13 @@ + + +# OrgTokenStatus + +## Enum + + +* `ACTIVE` (value: `"active"`) + +* `REVOKED` (value: `"revoked"`) + + + diff --git a/java/docs/OrgTokensV1Api.md b/java/docs/OrgTokensV1Api.md new file mode 100644 index 0000000..44e9d07 --- /dev/null +++ b/java/docs/OrgTokensV1Api.md @@ -0,0 +1,223 @@ +# OrgTokensV1Api + +All URIs are relative to *https://api.hathora.dev* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createOrgToken**](OrgTokensV1Api.md#createOrgToken) | **POST** /tokens/v1/orgs/{orgId}/create | | +| [**getOrgTokens**](OrgTokensV1Api.md#getOrgTokens) | **GET** /tokens/v1/orgs/{orgId} | | +| [**revokeOrgToken**](OrgTokensV1Api.md#revokeOrgToken) | **POST** /tokens/v1/orgs/{orgId}/tokens/{orgTokenId}/revoke | | + + + +# **createOrgToken** +> CreatedOrgToken createOrgToken(orgId, createOrgToken) + + + +Create a new organization token. + +### 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.OrgTokensV1Api; + +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"); + + OrgTokensV1Api apiInstance = new OrgTokensV1Api(defaultClient); + String orgId = "orgId_example"; // String | + CreateOrgToken createOrgToken = new CreateOrgToken(); // CreateOrgToken | + try { + CreatedOrgToken result = apiInstance.createOrgToken(orgId, createOrgToken); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrgTokensV1Api#createOrgToken"); + 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**| | | +| **createOrgToken** | [**CreateOrgToken**](CreateOrgToken.md)| | | + +### Return type + +[**CreatedOrgToken**](CreatedOrgToken.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** | | - | +| **422** | | - | + + +# **getOrgTokens** +> ListOrgTokens getOrgTokens(orgId) + + + +List all organization tokens for a given org. + +### 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.OrgTokensV1Api; + +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"); + + OrgTokensV1Api apiInstance = new OrgTokensV1Api(defaultClient); + String orgId = "orgId_example"; // String | + try { + ListOrgTokens result = apiInstance.getOrgTokens(orgId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrgTokensV1Api#getOrgTokens"); + 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 + +[**ListOrgTokens**](ListOrgTokens.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** | | - | + + +# **revokeOrgToken** +> Boolean revokeOrgToken(orgId, orgTokenId) + + + +Revoke an organization token. + +### 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.OrgTokensV1Api; + +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"); + + OrgTokensV1Api apiInstance = new OrgTokensV1Api(defaultClient); + String orgId = "orgId_example"; // String | + String orgTokenId = "orgTokenId_example"; // String | + try { + Boolean result = apiInstance.revokeOrgToken(orgId, orgTokenId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrgTokensV1Api#revokeOrgToken"); + 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**| | | +| **orgTokenId** | **String**| | | + +### Return type + +**Boolean** + +### 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/Process.md b/java/docs/Process.md index db48e0d..9a25e09 100644 --- a/java/docs/Process.md +++ b/java/docs/Process.md @@ -23,7 +23,7 @@ A process object represents a runtime instance of your game server and its metad |**startingAt** | **OffsetDateTime** | When the process started being provisioned. | | |**roomsPerProcess** | **Integer** | Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. | | |**additionalExposedPorts** | [**List<ExposedPort>**](ExposedPort.md) | | | -|**exposedPort** | [**ExposedPort**](ExposedPort.md) | | [optional] | +|**exposedPort** | [**ExposedPort**](ExposedPort.md) | | | |**port** | **Double** | | | |**host** | **String** | | | |**region** | **Region** | | | diff --git a/java/docs/ProcessV2.md b/java/docs/ProcessV2.md index 0c1ab4e..5d8a5a3 100644 --- a/java/docs/ProcessV2.md +++ b/java/docs/ProcessV2.md @@ -15,7 +15,7 @@ |**createdAt** | **OffsetDateTime** | When the process started being provisioned. | | |**roomsPerProcess** | **Integer** | Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. | | |**additionalExposedPorts** | [**List<ExposedPort>**](ExposedPort.md) | | | -|**exposedPort** | [**ExposedPort**](ExposedPort.md) | | [optional] | +|**exposedPort** | [**ExposedPort**](ExposedPort.md) | | | |**region** | **Region** | | | |**processId** | **String** | System generated unique identifier to a runtime instance of your game server. | | |**deploymentId** | **Integer** | System generated id for a deployment. Increments by 1. | | diff --git a/java/docs/ProcessWithRooms.md b/java/docs/ProcessWithRooms.md index 6254ee6..f2105a4 100644 --- a/java/docs/ProcessWithRooms.md +++ b/java/docs/ProcessWithRooms.md @@ -22,7 +22,7 @@ |**startingAt** | **OffsetDateTime** | When the process started being provisioned. | | |**roomsPerProcess** | **Integer** | Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. | | |**additionalExposedPorts** | [**List<ExposedPort>**](ExposedPort.md) | | | -|**exposedPort** | [**ExposedPort**](ExposedPort.md) | | [optional] | +|**exposedPort** | [**ExposedPort**](ExposedPort.md) | | | |**port** | **Double** | | | |**host** | **String** | | | |**region** | **Region** | | | diff --git a/java/docs/ProcessesV1Api.md b/java/docs/ProcessesV1Api.md index 4dddc1b..9985e69 100644 --- a/java/docs/ProcessesV1Api.md +++ b/java/docs/ProcessesV1Api.md @@ -77,6 +77,7 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **401** | | - | | **404** | | - | | **500** | | - | @@ -148,6 +149,7 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **401** | | - | | **404** | | - | @@ -218,5 +220,6 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **401** | | - | | **404** | | - | diff --git a/java/docs/ProcessesV2Api.md b/java/docs/ProcessesV2Api.md index 025a756..f9ab91f 100644 --- a/java/docs/ProcessesV2Api.md +++ b/java/docs/ProcessesV2Api.md @@ -6,6 +6,7 @@ All URIs are relative to *https://api.hathora.dev* |------------- | ------------- | -------------| | [**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} | | @@ -78,6 +79,7 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **401** | | - | | **404** | | - | @@ -148,6 +150,77 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **401** | | - | +| **404** | | - | + + +# **stopProcess** +> stopProcess(appId, processId) + + + +Stops a [process](https://hathora.dev/docs/concepts/hathora-entities#process) immediately. + +### 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 | + String processId = "processId_example"; // String | + try { + apiInstance.stopProcess(appId, processId); + } catch (ApiException e) { + System.err.println("Exception when calling ProcessesV2Api#stopProcess"); + 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**| | | +| **processId** | **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** | | - | | **500** | | - | diff --git a/java/docs/RoomV1Api.md b/java/docs/RoomV1Api.md index 72cda72..e73dfe9 100644 --- a/java/docs/RoomV1Api.md +++ b/java/docs/RoomV1Api.md @@ -82,6 +82,7 @@ public class Example { |-------------|-------------|------------------| | **201** | | - | | **400** | | - | +| **401** | | - | | **402** | | - | | **403** | | - | | **404** | | - | @@ -152,6 +153,7 @@ null (empty response body) | Status code | Description | Response headers | |-------------|-------------|------------------| | **204** | No content | - | +| **401** | | - | | **404** | | - | | **500** | | - | @@ -221,6 +223,7 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **401** | | - | | **404** | | - | @@ -285,6 +288,7 @@ No authorization required |-------------|-------------|------------------| | **200** | Ok | - | | **400** | | - | +| **402** | | - | | **404** | | - | | **500** | | - | @@ -354,6 +358,7 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **401** | | - | | **404** | | - | @@ -422,6 +427,7 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **401** | | - | | **404** | | - | @@ -489,6 +495,7 @@ null (empty response body) | Status code | Description | Response headers | |-------------|-------------|------------------| | **204** | No content | - | +| **401** | | - | | **404** | | - | | **500** | | - | diff --git a/java/docs/RoomV2Api.md b/java/docs/RoomV2Api.md index 0270578..f53efb5 100644 --- a/java/docs/RoomV2Api.md +++ b/java/docs/RoomV2Api.md @@ -85,6 +85,7 @@ public class Example { |-------------|-------------|------------------| | **201** | | - | | **400** | | - | +| **401** | | - | | **402** | | - | | **403** | | - | | **404** | | - | @@ -157,6 +158,7 @@ null (empty response body) | Status code | Description | Response headers | |-------------|-------------|------------------| | **204** | No content | - | +| **401** | | - | | **404** | | - | | **500** | | - | @@ -228,6 +230,7 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **401** | | - | | **404** | | - | @@ -294,6 +297,7 @@ No authorization required |-------------|-------------|------------------| | **200** | Ok | - | | **400** | | - | +| **402** | | - | | **404** | | - | | **500** | | - | @@ -365,6 +369,7 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **401** | | - | | **404** | | - | @@ -435,6 +440,7 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Ok | - | +| **401** | | - | | **404** | | - | @@ -504,6 +510,7 @@ null (empty response body) | Status code | Description | Response headers | |-------------|-------------|------------------| | **204** | No content | - | +| **401** | | - | | **404** | | - | | **500** | | - | @@ -574,6 +581,7 @@ null (empty response body) | Status code | Description | Response headers | |-------------|-------------|------------------| | **204** | No content | - | +| **401** | | - | | **404** | | - | | **500** | | - | diff --git a/java/src/main/java/com/hathora/client/JSON.java b/java/src/main/java/com/hathora/client/JSON.java index 6897868..2f52d25 100644 --- a/java/src/main/java/com/hathora/client/JSON.java +++ b/java/src/main/java/com/hathora/client/JSON.java @@ -98,8 +98,10 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.ApiError.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.AppConfig.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.Application.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.ApplicationWithDeployment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.ApplicationWithDeploymentAllOf.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.ApplicationWithLatestDeploymentAndBuild.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.ApplicationWithLatestDeploymentAndBuildAllOf.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.ApplicationWithLatestDeploymentAndBuildAllOfDeployment.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.AuthConfiguration.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.AuthConfigurationGoogle.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.Build.CustomTypeAdapterFactory()); @@ -111,10 +113,12 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.CreateBuildParams.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.CreateLobbyParams.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.CreateLobbyV3Params.CustomTypeAdapterFactory()); + 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.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()); @@ -123,12 +127,14 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.hathora.client.model.ExposedPort.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.OrgToken.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.Process.CustomTypeAdapterFactory()); 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 9c680df..ea44b65 100644 --- a/java/src/main/java/com/hathora/client/api/AppV1Api.java +++ b/java/src/main/java/com/hathora/client/api/AppV1Api.java @@ -30,7 +30,7 @@ import com.hathora.client.model.ApiError; import com.hathora.client.model.AppConfig; import com.hathora.client.model.Application; -import com.hathora.client.model.ApplicationWithDeployment; +import com.hathora.client.model.ApplicationWithLatestDeploymentAndBuild; import java.lang.reflect.Type; import java.util.ArrayList; @@ -86,6 +86,7 @@ public void setCustomBaseUrl(String customBaseUrl) { +
Status Code Description Response Headers
201 -
401 -
422 -
500 -
@@ -156,6 +157,7 @@ private okhttp3.Call createAppValidateBeforeCall(AppConfig appConfig, final ApiC +
Status Code Description Response Headers
201 -
401 -
422 -
500 -
@@ -175,6 +177,7 @@ public Application createApp(AppConfig appConfig) throws ApiException { +
Status Code Description Response Headers
201 -
401 -
422 -
500 -
@@ -196,6 +199,7 @@ public ApiResponse createAppWithHttpInfo(AppConfig appConfig) throw +
Status Code Description Response Headers
201 -
401 -
422 -
500 -
@@ -217,6 +221,7 @@ public okhttp3.Call createAppAsync(AppConfig appConfig, final ApiCallback Status Code Description Response Headers 204 No content - + 401 - 404 - 500 - @@ -286,6 +291,7 @@ private okhttp3.Call deleteAppValidateBeforeCall(String appId, final ApiCallback +
Status Code Description Response Headers
204 No content -
401 -
404 -
500 -
@@ -304,6 +310,7 @@ public void deleteApp(String appId) throws ApiException { +
Status Code Description Response Headers
204 No content -
401 -
404 -
500 -
@@ -324,6 +331,7 @@ public ApiResponse deleteAppWithHttpInfo(String appId) throws ApiException +
Status Code Description Response Headers
204 No content -
401 -
404 -
500 -
@@ -344,6 +352,7 @@ public okhttp3.Call deleteAppAsync(String appId, final ApiCallback _callba +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -413,6 +422,7 @@ private okhttp3.Call getAppInfoValidateBeforeCall(String appId, final ApiCallbac +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -431,6 +441,7 @@ public Application getAppInfo(String appId) throws ApiException { +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -451,6 +462,7 @@ public ApiResponse getAppInfoWithHttpInfo(String appId) throws ApiE +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -525,7 +537,7 @@ private okhttp3.Call getAppsValidateBeforeCall(final ApiCallback _callback) thro /** * * 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`. - * @return List<ApplicationWithDeployment> + * @return List<ApplicationWithLatestDeploymentAndBuild> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -533,15 +545,15 @@ private okhttp3.Call getAppsValidateBeforeCall(final ApiCallback _callback) thro
200 Ok -
*/ - public List getApps() throws ApiException { - ApiResponse> localVarResp = getAppsWithHttpInfo(); + public List getApps() throws ApiException { + ApiResponse> localVarResp = getAppsWithHttpInfo(); return localVarResp.getData(); } /** * * 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`. - * @return ApiResponse<List<ApplicationWithDeployment>> + * @return ApiResponse<List<ApplicationWithLatestDeploymentAndBuild>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -549,9 +561,9 @@ public List getApps() throws ApiException {
200 Ok -
*/ - public ApiResponse> getAppsWithHttpInfo() throws ApiException { + public ApiResponse> getAppsWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = getAppsValidateBeforeCall(null); - Type localVarReturnType = new TypeToken>(){}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -567,10 +579,10 @@ public ApiResponse> getAppsWithHttpInfo() throws 200 Ok - */ - public okhttp3.Call getAppsAsync(final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getAppsAsync(final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getAppsValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken>(){}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -585,6 +597,7 @@ public okhttp3.Call getAppsAsync(final ApiCallback Status Code Description Response Headers 200 Ok - + 401 - 404 - 422 - 500 - @@ -663,6 +676,7 @@ private okhttp3.Call updateAppValidateBeforeCall(String appId, AppConfig appConf + @@ -684,6 +698,7 @@ public Application updateApp(String appId, AppConfig appConfig) throws ApiExcept
Status Code Description Response Headers
200 Ok -
401 -
404 -
422 -
500 -
+ @@ -707,6 +722,7 @@ public ApiResponse updateAppWithHttpInfo(String appId, AppConfig ap
Status Code Description Response Headers
200 Ok -
401 -
404 -
422 -
500 -
+ 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 f6f90a2..02c4ee7 100644 --- a/java/src/main/java/com/hathora/client/api/BillingV1Api.java +++ b/java/src/main/java/com/hathora/client/api/BillingV1Api.java @@ -85,6 +85,7 @@ public void setCustomBaseUrl(String customBaseUrl) {
Status Code Description Response Headers
200 Ok -
401 -
404 -
422 -
500 -
+
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -147,6 +148,7 @@ private okhttp3.Call getBalanceValidateBeforeCall(final ApiCallback _callback) t +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -164,6 +166,7 @@ public Double getBalance() throws ApiException { +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -183,6 +186,7 @@ public ApiResponse getBalanceWithHttpInfo() throws ApiException { +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -202,6 +206,7 @@ public okhttp3.Call getBalanceAsync(final ApiCallback _callback) throws +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -264,6 +269,7 @@ private okhttp3.Call getInvoicesValidateBeforeCall(final ApiCallback _callback) +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -281,6 +287,7 @@ public List getInvoices() throws ApiException { +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -300,6 +307,7 @@ public ApiResponse> getInvoicesWithHttpInfo() throws ApiException +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -319,6 +327,7 @@ public okhttp3.Call getInvoicesAsync(final ApiCallback> _callback) +
Status Code Description Response Headers
200 Ok -
401 -
404 -
500 -
@@ -382,6 +391,7 @@ private okhttp3.Call getPaymentMethodValidateBeforeCall(final ApiCallback _callb +
Status Code Description Response Headers
200 Ok -
401 -
404 -
500 -
@@ -400,6 +410,7 @@ public PartialCardCardPaymentMethodAchAchPaymentMethodLinkLinkPaymentMethod getP +
Status Code Description Response Headers
200 Ok -
401 -
404 -
500 -
@@ -420,6 +431,7 @@ public ApiResponse Status Code Description Response Headers 200 Ok - + 401 - 404 - 500 - @@ -441,6 +453,7 @@ public okhttp3.Call getPaymentMethodAsync(final ApiCallback Status Code Description Response Headers 200 Ok - + 401 - 404 - */ @@ -510,6 +523,7 @@ private okhttp3.Call initStripeCustomerPortalUrlValidateBeforeCall(CustomerPorta +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -528,6 +542,7 @@ public String initStripeCustomerPortalUrl(CustomerPortalUrl customerPortalUrl) t +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -548,6 +563,7 @@ public ApiResponse initStripeCustomerPortalUrlWithHttpInfo(CustomerPorta +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ 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 391ee1c..4356081 100644 --- a/java/src/main/java/com/hathora/client/api/BuildV1Api.java +++ b/java/src/main/java/com/hathora/client/api/BuildV1Api.java @@ -87,6 +87,7 @@ public void setCustomBaseUrl(String customBaseUrl) { +
Status Code Description Response Headers
201 -
401 -
404 -
500 -
@@ -164,6 +165,7 @@ private okhttp3.Call createBuildValidateBeforeCall(String appId, CreateBuildPara +
Status Code Description Response Headers
201 -
401 -
404 -
500 -
@@ -184,6 +186,7 @@ public Build createBuild(String appId, CreateBuildParams createBuildParams) thro +
Status Code Description Response Headers
201 -
401 -
404 -
500 -
@@ -206,6 +209,7 @@ public ApiResponse createBuildWithHttpInfo(String appId, CreateBuildParam +
Status Code Description Response Headers
201 -
401 -
404 -
500 -
@@ -228,6 +232,7 @@ public okhttp3.Call createBuildAsync(String appId, CreateBuildParams createBuild + @@ -305,6 +310,7 @@ private okhttp3.Call deleteBuildValidateBeforeCall(String appId, Integer buildId
Status Code Description Response Headers
204 No content -
401 -
404 -
422 -
500 -
+ @@ -325,6 +331,7 @@ public void deleteBuild(String appId, Integer buildId) throws ApiException {
Status Code Description Response Headers
204 No content -
401 -
404 -
422 -
500 -
+ @@ -347,6 +354,7 @@ public ApiResponse deleteBuildWithHttpInfo(String appId, Integer buildId)
Status Code Description Response Headers
204 No content -
401 -
404 -
422 -
500 -
+ @@ -369,6 +377,7 @@ public okhttp3.Call deleteBuildAsync(String appId, Integer buildId, final ApiCal
Status Code Description Response Headers
204 No content -
401 -
404 -
422 -
500 -
+
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -445,6 +454,7 @@ private okhttp3.Call getBuildInfoValidateBeforeCall(String appId, Integer buildI +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -464,6 +474,7 @@ public Build getBuildInfo(String appId, Integer buildId) throws ApiException { +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -485,6 +496,7 @@ public ApiResponse getBuildInfoWithHttpInfo(String appId, Integer buildId +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -505,6 +517,7 @@ public okhttp3.Call getBuildInfoAsync(String appId, Integer buildId, final ApiCa +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -574,6 +587,7 @@ private okhttp3.Call getBuildsValidateBeforeCall(String appId, final ApiCallback +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -592,6 +606,7 @@ public List getBuilds(String appId) throws ApiException { +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -612,6 +627,7 @@ public ApiResponse> getBuildsWithHttpInfo(String appId) throws ApiEx +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -634,6 +650,7 @@ public okhttp3.Call getBuildsAsync(String appId, final ApiCallback> +
Status Code Description Response Headers
200 Ok -
401 -
404 -
500 -
@@ -723,6 +740,7 @@ private okhttp3.Call runBuildValidateBeforeCall(String appId, Integer buildId, F +
Status Code Description Response Headers
200 Ok -
401 -
404 -
500 -
@@ -744,6 +762,7 @@ public byte[] runBuild(String appId, Integer buildId, File _file) throws ApiExce +
Status Code Description Response Headers
200 Ok -
401 -
404 -
500 -
@@ -767,6 +786,7 @@ public ApiResponse runBuildWithHttpInfo(String appId, Integer buildId, F +
Status Code Description Response Headers
200 Ok -
401 -
404 -
500 -
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 2c88dac..c5ef8a6 100644 --- a/java/src/main/java/com/hathora/client/api/DeploymentV1Api.java +++ b/java/src/main/java/com/hathora/client/api/DeploymentV1Api.java @@ -88,7 +88,9 @@ public void setCustomBaseUrl(String customBaseUrl) { Status Code Description Response Headers 201 - 400 - + 401 - 404 - + 422 - 500 - */ @@ -173,7 +175,9 @@ private okhttp3.Call createDeploymentValidateBeforeCall(String appId, Integer bu Status Code Description Response Headers 201 - 400 - + 401 - 404 - + 422 - 500 - */ @@ -195,7 +199,9 @@ public Deployment createDeployment(String appId, Integer buildId, DeploymentConf Status Code Description Response Headers 201 - 400 - + 401 - 404 - + 422 - 500 - */ @@ -219,7 +225,9 @@ public ApiResponse createDeploymentWithHttpInfo(String appId, Intege Status Code Description Response Headers 201 - 400 - + 401 - 404 - + 422 - 500 - */ @@ -241,6 +249,7 @@ public okhttp3.Call createDeploymentAsync(String appId, Integer buildId, Deploym +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -317,6 +326,7 @@ private okhttp3.Call getDeploymentInfoValidateBeforeCall(String appId, Integer d +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -336,6 +346,7 @@ public Deployment getDeploymentInfo(String appId, Integer deploymentId) throws A +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -357,6 +368,7 @@ public ApiResponse getDeploymentInfoWithHttpInfo(String appId, Integ +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -377,6 +389,7 @@ public okhttp3.Call getDeploymentInfoAsync(String appId, Integer deploymentId, f +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -446,6 +459,7 @@ private okhttp3.Call getDeploymentsValidateBeforeCall(String appId, final ApiCal +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -464,6 +478,7 @@ public List getDeployments(String appId) throws ApiException { +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -484,6 +499,7 @@ public ApiResponse> getDeploymentsWithHttpInfo(String appId) th +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -494,4 +510,135 @@ public okhttp3.Call getDeploymentsAsync(String appId, final ApiCallback + 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/v1/{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 Deployment + * @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 Deployment 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<Deployment> + * @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/LobbyV1Api.java b/java/src/main/java/com/hathora/client/api/LobbyV1Api.java index eae9868..10314fe 100644 --- a/java/src/main/java/com/hathora/client/api/LobbyV1Api.java +++ b/java/src/main/java/com/hathora/client/api/LobbyV1Api.java @@ -89,6 +89,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 200 Ok - 400 - 401 - + 402 - 404 - 422 - 429 - @@ -176,6 +177,7 @@ private okhttp3.Call createPrivateLobbyDeprecatedValidateBeforeCall(String appId 200 Ok - 400 - 401 - + 402 - 404 - 422 - 429 - @@ -203,6 +205,7 @@ public String createPrivateLobbyDeprecated(String appId, Region region, Boolean 200 Ok - 400 - 401 - + 402 - 404 - 422 - 429 - @@ -232,6 +235,7 @@ public ApiResponse createPrivateLobbyDeprecatedWithHttpInfo(String appId 200 Ok - 400 - 401 - + 402 - 404 - 422 - 429 - @@ -261,6 +265,7 @@ public okhttp3.Call createPrivateLobbyDeprecatedAsync(String appId, Region regio 200 Ok - 400 - 401 - + 402 - 404 - 422 - 429 - @@ -348,6 +353,7 @@ private okhttp3.Call createPublicLobbyDeprecatedValidateBeforeCall(String appId, 200 Ok - 400 - 401 - + 402 - 404 - 422 - 429 - @@ -375,6 +381,7 @@ public String createPublicLobbyDeprecated(String appId, Region region, Boolean l 200 Ok - 400 - 401 - + 402 - 404 - 422 - 429 - @@ -404,6 +411,7 @@ public ApiResponse createPublicLobbyDeprecatedWithHttpInfo(String appId, 200 Ok - 400 - 401 - + 402 - 404 - 422 - 429 - @@ -431,7 +439,6 @@ public okhttp3.Call createPublicLobbyDeprecatedAsync(String appId, Region region -
Status Code Description Response Headers
200 Ok -
401 -
404 -
* @deprecated @@ -514,7 +521,6 @@ private okhttp3.Call listActivePublicLobbiesDeprecatedV1ValidateBeforeCall(Strin -
Status Code Description Response Headers
200 Ok -
401 -
404 -
* @deprecated @@ -537,7 +543,6 @@ public List listActivePublicLobbiesDeprecatedV1(String appId, Boolean loc -
Status Code Description Response Headers
200 Ok -
401 -
404 -
* @deprecated @@ -562,7 +567,6 @@ public ApiResponse> listActivePublicLobbiesDeprecatedV1WithHttpInfo( -
Status Code Description Response Headers
200 Ok -
401 -
404 -
* @deprecated 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 e081de8..6bb62a8 100644 --- a/java/src/main/java/com/hathora/client/api/LobbyV2Api.java +++ b/java/src/main/java/com/hathora/client/api/LobbyV2Api.java @@ -92,6 +92,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 201 - 400 - 401 - + 402 - 404 - 422 - 429 - @@ -181,6 +182,7 @@ private okhttp3.Call createLobbyDeprecatedValidateBeforeCall(String appId, Creat 201 - 400 - 401 - + 402 - 404 - 422 - 429 - @@ -208,6 +210,7 @@ public Lobby createLobbyDeprecated(String appId, CreateLobbyParams createLobbyPa 201 - 400 - 401 - + 402 - 404 - 422 - 429 - @@ -237,6 +240,7 @@ public ApiResponse createLobbyDeprecatedWithHttpInfo(String appId, Create 201 - 400 - 401 - + 402 - 404 - 422 - 429 - @@ -266,6 +270,7 @@ public okhttp3.Call createLobbyDeprecatedAsync(String appId, CreateLobbyParams c 201 - 400 - 401 - + 402 - 404 - 422 - 429 - @@ -355,6 +360,7 @@ private okhttp3.Call createLocalLobbyValidateBeforeCall(String appId, CreatePriv 201 - 400 - 401 - + 402 - 404 - 422 - 429 - @@ -382,6 +388,7 @@ public Lobby createLocalLobby(String appId, CreatePrivateLobbyRequest createPriv 201 - 400 - 401 - + 402 - 404 - 422 - 429 - @@ -411,6 +418,7 @@ public ApiResponse createLocalLobbyWithHttpInfo(String appId, CreatePriva 201 - 400 - 401 - + 402 - 404 - 422 - 429 - @@ -440,6 +448,7 @@ public okhttp3.Call createLocalLobbyAsync(String appId, CreatePrivateLobbyReques 201 - 400 - 401 - + 402 - 404 - 422 - 429 - @@ -529,6 +538,7 @@ private okhttp3.Call createPrivateLobbyValidateBeforeCall(String appId, CreatePr 201 - 400 - 401 - + 402 - 404 - 422 - 429 - @@ -556,6 +566,7 @@ public Lobby createPrivateLobby(String appId, CreatePrivateLobbyRequest createPr 201 - 400 - 401 - + 402 - 404 - 422 - 429 - @@ -585,6 +596,7 @@ public ApiResponse createPrivateLobbyWithHttpInfo(String appId, CreatePri 201 - 400 - 401 - + 402 - 404 - 422 - 429 - @@ -614,6 +626,7 @@ public okhttp3.Call createPrivateLobbyAsync(String appId, CreatePrivateLobbyRequ 201 - 400 - 401 - + 402 - 404 - 422 - 429 - @@ -703,6 +716,7 @@ private okhttp3.Call createPublicLobbyValidateBeforeCall(String appId, CreatePri 201 - 400 - 401 - + 402 - 404 - 422 - 429 - @@ -730,6 +744,7 @@ public Lobby createPublicLobby(String appId, CreatePrivateLobbyRequest createPri 201 - 400 - 401 - + 402 - 404 - 422 - 429 - @@ -759,6 +774,7 @@ public ApiResponse createPublicLobbyWithHttpInfo(String appId, CreatePriv 201 - 400 - 401 - + 402 - 404 - 422 - 429 - @@ -1072,6 +1088,7 @@ public okhttp3.Call listActivePublicLobbiesDeprecatedV2Async(String appId, Regio +
Status Code Description Response Headers
200 Ok -
401 -
404 -
422 -
@@ -1159,6 +1176,7 @@ private okhttp3.Call setLobbyStateValidateBeforeCall(String appId, String roomId +
Status Code Description Response Headers
200 Ok -
401 -
404 -
422 -
@@ -1182,6 +1200,7 @@ public Lobby setLobbyState(String appId, String roomId, SetLobbyStateParams setL +
Status Code Description Response Headers
200 Ok -
401 -
404 -
422 -
@@ -1207,6 +1226,7 @@ public ApiResponse setLobbyStateWithHttpInfo(String appId, String roomId, +
Status Code Description Response Headers
200 Ok -
401 -
404 -
422 -
diff --git a/java/src/main/java/com/hathora/client/api/LobbyV3Api.java b/java/src/main/java/com/hathora/client/api/LobbyV3Api.java index 787b14e..9a95d75 100644 --- a/java/src/main/java/com/hathora/client/api/LobbyV3Api.java +++ b/java/src/main/java/com/hathora/client/api/LobbyV3Api.java @@ -91,6 +91,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 201 - 400 - 401 - + 402 - 404 - 422 - 429 - @@ -182,6 +183,7 @@ private okhttp3.Call createLobbyValidateBeforeCall(String appId, CreateLobbyV3Pa 201 - 400 - 401 - + 402 - 404 - 422 - 429 - @@ -208,6 +210,7 @@ public LobbyV3 createLobby(String appId, CreateLobbyV3Params createLobbyV3Params 201 - 400 - 401 - + 402 - 404 - 422 - 429 - @@ -236,6 +239,7 @@ public ApiResponse createLobbyWithHttpInfo(String appId, CreateLobbyV3P 201 - 400 - 401 - + 402 - 404 - 422 - 429 - 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 b472911..9255e15 100644 --- a/java/src/main/java/com/hathora/client/api/LogV1Api.java +++ b/java/src/main/java/com/hathora/client/api/LogV1Api.java @@ -86,9 +86,9 @@ public void setCustomBaseUrl(String customBaseUrl) { Status Code Description Response Headers 200 Ok - 400 - + 401 - 404 - 410 - - 500 - */ public okhttp3.Call downloadLogForProcessCall(String appId, String processId, final ApiCallback _callback) throws ApiException { @@ -166,9 +166,9 @@ private okhttp3.Call downloadLogForProcessValidateBeforeCall(String appId, Strin Status Code Description Response Headers 200 Ok - 400 - + 401 - 404 - 410 - - 500 - */ public byte[] downloadLogForProcess(String appId, String processId) throws ApiException { @@ -188,9 +188,9 @@ public byte[] downloadLogForProcess(String appId, String processId) throws ApiEx Status Code Description Response Headers 200 Ok - 400 - + 401 - 404 - 410 - - 500 - */ public ApiResponse downloadLogForProcessWithHttpInfo(String appId, String processId) throws ApiException { @@ -212,9 +212,9 @@ public ApiResponse downloadLogForProcessWithHttpInfo(String appId, Strin Status Code Description Response Headers 200 Ok - 400 - + 401 - 404 - 410 - - 500 - */ public okhttp3.Call downloadLogForProcessAsync(String appId, String processId, final ApiCallback _callback) throws ApiException { @@ -237,6 +237,7 @@ public okhttp3.Call downloadLogForProcessAsync(String appId, String processId, f +
Status Code Description Response Headers
200 Ok -
401 -
404 -
* @deprecated @@ -325,6 +326,7 @@ private okhttp3.Call getLogsForAppValidateBeforeCall(String appId, Boolean follo +
Status Code Description Response Headers
200 Ok -
401 -
404 -
* @deprecated @@ -348,6 +350,7 @@ public byte[] getLogsForApp(String appId, Boolean follow, Integer tailLines, Reg +
Status Code Description Response Headers
200 Ok -
401 -
404 -
* @deprecated @@ -373,6 +376,7 @@ public ApiResponse getLogsForAppWithHttpInfo(String appId, Boolean follo +
Status Code Description Response Headers
200 Ok -
401 -
404 -
* @deprecated @@ -398,6 +402,7 @@ public okhttp3.Call getLogsForAppAsync(String appId, Boolean follow, Integer tai +
Status Code Description Response Headers
200 Ok -
401 -
404 -
* @deprecated @@ -488,6 +493,7 @@ private okhttp3.Call getLogsForDeploymentValidateBeforeCall(String appId, Intege +
Status Code Description Response Headers
200 Ok -
401 -
404 -
* @deprecated @@ -511,6 +517,7 @@ public byte[] getLogsForDeployment(String appId, Integer deploymentId, Boolean f +
Status Code Description Response Headers
200 Ok -
401 -
404 -
* @deprecated @@ -536,6 +543,7 @@ public ApiResponse getLogsForDeploymentWithHttpInfo(String appId, Intege +
Status Code Description Response Headers
200 Ok -
401 -
404 -
* @deprecated @@ -562,6 +570,7 @@ public okhttp3.Call getLogsForDeploymentAsync(String appId, Integer deploymentId Status Code Description Response Headers 200 Ok - 400 - + 401 - 404 - 410 - 500 - @@ -652,6 +661,7 @@ private okhttp3.Call getLogsForProcessValidateBeforeCall(String appId, String pr Status Code Description Response Headers 200 Ok - 400 - + 401 - 404 - 410 - 500 - @@ -676,6 +686,7 @@ public byte[] getLogsForProcess(String appId, String processId, Boolean follow, Status Code Description Response Headers 200 Ok - 400 - + 401 - 404 - 410 - 500 - @@ -702,6 +713,7 @@ public ApiResponse getLogsForProcessWithHttpInfo(String appId, String pr Status Code Description Response Headers 200 Ok - 400 - + 401 - 404 - 410 - 500 - 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 bd2fab9..089c66c 100644 --- a/java/src/main/java/com/hathora/client/api/ManagementV1Api.java +++ b/java/src/main/java/com/hathora/client/api/ManagementV1Api.java @@ -85,6 +85,7 @@ public void setCustomBaseUrl(String customBaseUrl) { +
Status Code Description Response Headers
200 Ok -
401 -
500 -
*/ @@ -154,6 +155,7 @@ private okhttp3.Call sendVerificationEmailValidateBeforeCall(VerificationEmailRe +
Status Code Description Response Headers
200 Ok -
401 -
500 -
*/ @@ -172,6 +174,7 @@ public VerificationEmailResponse sendVerificationEmail(VerificationEmailRequest +
Status Code Description Response Headers
200 Ok -
401 -
500 -
*/ @@ -192,6 +195,7 @@ public ApiResponse sendVerificationEmailWithHttpInfo( +
Status Code Description Response Headers
200 Ok -
401 -
500 -
*/ diff --git a/java/src/main/java/com/hathora/client/api/MetricsV1Api.java b/java/src/main/java/com/hathora/client/api/MetricsV1Api.java index 5532ca8..fbe7522 100644 --- a/java/src/main/java/com/hathora/client/api/MetricsV1Api.java +++ b/java/src/main/java/com/hathora/client/api/MetricsV1Api.java @@ -90,6 +90,7 @@ public void setCustomBaseUrl(String customBaseUrl) { + @@ -188,6 +189,7 @@ private okhttp3.Call getMetricsValidateBeforeCall(String appId, String processId
Status Code Description Response Headers
200 Ok -
401 -
404 -
422 -
500 -
+ @@ -213,6 +215,7 @@ public RecordPartialMetricNameMetricValueArray getMetrics(String appId, String p
Status Code Description Response Headers
200 Ok -
401 -
404 -
422 -
500 -
+ @@ -240,6 +243,7 @@ public ApiResponse getMetricsWithHttpIn
Status Code Description Response Headers
200 Ok -
401 -
404 -
422 -
500 -
+ diff --git a/java/src/main/java/com/hathora/client/api/OrgTokensV1Api.java b/java/src/main/java/com/hathora/client/api/OrgTokensV1Api.java new file mode 100644 index 0000000..c753d7a --- /dev/null +++ b/java/src/main/java/com/hathora/client/api/OrgTokensV1Api.java @@ -0,0 +1,496 @@ +/* + * 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.CreateOrgToken; +import com.hathora.client.model.CreatedOrgToken; +import com.hathora.client.model.ListOrgTokens; + +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 OrgTokensV1Api { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public OrgTokensV1Api() { + this(Configuration.getDefaultApiClient()); + } + + public OrgTokensV1Api(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 createOrgToken + * @param orgId (required) + * @param createOrgToken (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 -
422 -
500 -
+ + + + + +
Status Code Description Response Headers
201 -
401 -
404 -
422 -
+ */ + public okhttp3.Call createOrgTokenCall(String orgId, CreateOrgToken createOrgToken, 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 = createOrgToken; + + // create path and map variables + String localVarPath = "/tokens/v1/orgs/{orgId}/create" + .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 createOrgTokenValidateBeforeCall(String orgId, CreateOrgToken createOrgToken, 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 createOrgToken(Async)"); + } + + // verify the required parameter 'createOrgToken' is set + if (createOrgToken == null) { + throw new ApiException("Missing the required parameter 'createOrgToken' when calling createOrgToken(Async)"); + } + + return createOrgTokenCall(orgId, createOrgToken, _callback); + + } + + /** + * + * Create a new organization token. + * @param orgId (required) + * @param createOrgToken (required) + * @return CreatedOrgToken + * @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 -
422 -
+ */ + public CreatedOrgToken createOrgToken(String orgId, CreateOrgToken createOrgToken) throws ApiException { + ApiResponse localVarResp = createOrgTokenWithHttpInfo(orgId, createOrgToken); + return localVarResp.getData(); + } + + /** + * + * Create a new organization token. + * @param orgId (required) + * @param createOrgToken (required) + * @return ApiResponse<CreatedOrgToken> + * @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 -
422 -
+ */ + public ApiResponse createOrgTokenWithHttpInfo(String orgId, CreateOrgToken createOrgToken) throws ApiException { + okhttp3.Call localVarCall = createOrgTokenValidateBeforeCall(orgId, createOrgToken, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Create a new organization token. + * @param orgId (required) + * @param createOrgToken (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 -
422 -
+ */ + public okhttp3.Call createOrgTokenAsync(String orgId, CreateOrgToken createOrgToken, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createOrgTokenValidateBeforeCall(orgId, createOrgToken, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getOrgTokens + * @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 -
404 -
+ */ + public okhttp3.Call getOrgTokensCall(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 = "/tokens/v1/orgs/{orgId}" + .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 getOrgTokensValidateBeforeCall(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 getOrgTokens(Async)"); + } + + return getOrgTokensCall(orgId, _callback); + + } + + /** + * + * List all organization tokens for a given org. + * @param orgId (required) + * @return ListOrgTokens + * @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 ListOrgTokens getOrgTokens(String orgId) throws ApiException { + ApiResponse localVarResp = getOrgTokensWithHttpInfo(orgId); + return localVarResp.getData(); + } + + /** + * + * List all organization tokens for a given org. + * @param orgId (required) + * @return ApiResponse<ListOrgTokens> + * @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 getOrgTokensWithHttpInfo(String orgId) throws ApiException { + okhttp3.Call localVarCall = getOrgTokensValidateBeforeCall(orgId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * List all organization tokens for a given org. + * @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 -
404 -
+ */ + public okhttp3.Call getOrgTokensAsync(String orgId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getOrgTokensValidateBeforeCall(orgId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for revokeOrgToken + * @param orgId (required) + * @param orgTokenId (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 revokeOrgTokenCall(String orgId, String orgTokenId, 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 = "/tokens/v1/orgs/{orgId}/tokens/{orgTokenId}/revoke" + .replace("{" + "orgId" + "}", localVarApiClient.escapeString(orgId.toString())) + .replace("{" + "orgTokenId" + "}", localVarApiClient.escapeString(orgTokenId.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 revokeOrgTokenValidateBeforeCall(String orgId, String orgTokenId, 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 revokeOrgToken(Async)"); + } + + // verify the required parameter 'orgTokenId' is set + if (orgTokenId == null) { + throw new ApiException("Missing the required parameter 'orgTokenId' when calling revokeOrgToken(Async)"); + } + + return revokeOrgTokenCall(orgId, orgTokenId, _callback); + + } + + /** + * + * Revoke an organization token. + * @param orgId (required) + * @param orgTokenId (required) + * @return Boolean + * @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 Boolean revokeOrgToken(String orgId, String orgTokenId) throws ApiException { + ApiResponse localVarResp = revokeOrgTokenWithHttpInfo(orgId, orgTokenId); + return localVarResp.getData(); + } + + /** + * + * Revoke an organization token. + * @param orgId (required) + * @param orgTokenId (required) + * @return ApiResponse<Boolean> + * @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 revokeOrgTokenWithHttpInfo(String orgId, String orgTokenId) throws ApiException { + okhttp3.Call localVarCall = revokeOrgTokenValidateBeforeCall(orgId, orgTokenId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Revoke an organization token. + * @param orgId (required) + * @param orgTokenId (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 revokeOrgTokenAsync(String orgId, String orgTokenId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = revokeOrgTokenValidateBeforeCall(orgId, orgTokenId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/java/src/main/java/com/hathora/client/api/ProcessesV1Api.java b/java/src/main/java/com/hathora/client/api/ProcessesV1Api.java index 37db3d1..48dc1a7 100644 --- a/java/src/main/java/com/hathora/client/api/ProcessesV1Api.java +++ b/java/src/main/java/com/hathora/client/api/ProcessesV1Api.java @@ -87,6 +87,7 @@ public void setCustomBaseUrl(String customBaseUrl) { +
Status Code Description Response Headers
200 Ok -
401 -
404 -
500 -
@@ -167,6 +168,7 @@ private okhttp3.Call getProcessInfoDeprecatedValidateBeforeCall(String appId, St +
Status Code Description Response Headers
200 Ok -
401 -
404 -
500 -
@@ -189,6 +191,7 @@ public Process getProcessInfoDeprecated(String appId, String processId) throws A +
Status Code Description Response Headers
200 Ok -
401 -
404 -
500 -
@@ -213,6 +216,7 @@ public ApiResponse getProcessInfoDeprecatedWithHttpInfo(String appId, S +
Status Code Description Response Headers
200 Ok -
401 -
404 -
500 -
@@ -237,6 +241,7 @@ public okhttp3.Call getProcessInfoDeprecatedAsync(String appId, String processId +
Status Code Description Response Headers
200 Ok -
401 -
404 -
* @deprecated @@ -314,6 +319,7 @@ private okhttp3.Call getRunningProcessesValidateBeforeCall(String appId, Region +
Status Code Description Response Headers
200 Ok -
401 -
404 -
* @deprecated @@ -335,6 +341,7 @@ public List getRunningProcesses(String appId, Region region) t +
Status Code Description Response Headers
200 Ok -
401 -
404 -
* @deprecated @@ -358,6 +365,7 @@ public ApiResponse> getRunningProcessesWithHttpInfo(Strin +
Status Code Description Response Headers
200 Ok -
401 -
404 -
* @deprecated @@ -381,6 +389,7 @@ public okhttp3.Call getRunningProcessesAsync(String appId, Region region, final +
Status Code Description Response Headers
200 Ok -
401 -
404 -
* @deprecated @@ -458,6 +467,7 @@ private okhttp3.Call getStoppedProcessesValidateBeforeCall(String appId, Region +
Status Code Description Response Headers
200 Ok -
401 -
404 -
* @deprecated @@ -479,6 +489,7 @@ public List getStoppedProcesses(String appId, Region region) throws Api +
Status Code Description Response Headers
200 Ok -
401 -
404 -
* @deprecated @@ -502,6 +513,7 @@ public ApiResponse> getStoppedProcessesWithHttpInfo(String appId, +
Status Code Description Response Headers
200 Ok -
401 -
404 -
* @deprecated 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 d431bff..68d5d7b 100644 --- a/java/src/main/java/com/hathora/client/api/ProcessesV2Api.java +++ b/java/src/main/java/com/hathora/client/api/ProcessesV2Api.java @@ -88,6 +88,7 @@ public void setCustomBaseUrl(String customBaseUrl) { +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -167,6 +168,7 @@ private okhttp3.Call getLatestProcessesValidateBeforeCall(String appId, List Status Code Description Response Headers 200 Ok - + 401 - 404 - */ @@ -187,6 +189,7 @@ public List getLatestProcesses(String appId, List stat +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -209,6 +212,7 @@ public ApiResponse> getLatestProcessesWithHttpInfo(String appId, +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -230,8 +234,8 @@ public okhttp3.Call getLatestProcessesAsync(String appId, List st + -
Status Code Description Response Headers
200 Ok -
401 -
404 -
500 -
*/ public okhttp3.Call getProcessInfoCall(String appId, String processId, final ApiCallback _callback) throws ApiException { @@ -307,8 +311,8 @@ private okhttp3.Call getProcessInfoValidateBeforeCall(String appId, String proce + -
Status Code Description Response Headers
200 Ok -
401 -
404 -
500 -
*/ public ProcessV2 getProcessInfo(String appId, String processId) throws ApiException { @@ -327,8 +331,8 @@ public ProcessV2 getProcessInfo(String appId, String processId) throws ApiExcept + -
Status Code Description Response Headers
200 Ok -
401 -
404 -
500 -
*/ public ApiResponse getProcessInfoWithHttpInfo(String appId, String processId) throws ApiException { @@ -349,8 +353,8 @@ public ApiResponse getProcessInfoWithHttpInfo(String appId, String pr + -
Status Code Description Response Headers
200 Ok -
401 -
404 -
500 -
*/ public okhttp3.Call getProcessInfoAsync(String appId, String processId, final ApiCallback _callback) throws ApiException { @@ -360,4 +364,145 @@ public okhttp3.Call getProcessInfoAsync(String appId, String processId, final Ap localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for stopProcess + * @param appId (required) + * @param processId (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 -
500 -
+ */ + public okhttp3.Call stopProcessCall(String appId, String processId, 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}/stop/{processId}" + .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) + .replace("{" + "processId" + "}", localVarApiClient.escapeString(processId.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 stopProcessValidateBeforeCall(String appId, String processId, 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 stopProcess(Async)"); + } + + // verify the required parameter 'processId' is set + if (processId == null) { + throw new ApiException("Missing the required parameter 'processId' when calling stopProcess(Async)"); + } + + return stopProcessCall(appId, processId, _callback); + + } + + /** + * + * Stops a [process](https://hathora.dev/docs/concepts/hathora-entities#process) immediately. + * @param appId (required) + * @param processId (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 -
500 -
+ */ + public void stopProcess(String appId, String processId) throws ApiException { + stopProcessWithHttpInfo(appId, processId); + } + + /** + * + * Stops a [process](https://hathora.dev/docs/concepts/hathora-entities#process) immediately. + * @param appId (required) + * @param processId (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 -
500 -
+ */ + public ApiResponse stopProcessWithHttpInfo(String appId, String processId) throws ApiException { + okhttp3.Call localVarCall = stopProcessValidateBeforeCall(appId, processId, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) + * Stops a [process](https://hathora.dev/docs/concepts/hathora-entities#process) immediately. + * @param appId (required) + * @param processId (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 -
500 -
+ */ + public okhttp3.Call stopProcessAsync(String appId, String processId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = stopProcessValidateBeforeCall(appId, processId, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } } 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 e49c57a..b732085 100644 --- a/java/src/main/java/com/hathora/client/api/RoomV1Api.java +++ b/java/src/main/java/com/hathora/client/api/RoomV1Api.java @@ -90,6 +90,7 @@ public void setCustomBaseUrl(String customBaseUrl) { Status Code Description Response Headers 201 - 400 - + 401 - 402 - 403 - 404 - @@ -178,6 +179,7 @@ private okhttp3.Call createRoomDeprecatedValidateBeforeCall(String appId, Create Status Code Description Response Headers 201 - 400 - + 401 - 402 - 403 - 404 - @@ -204,6 +206,7 @@ public String createRoomDeprecated(String appId, CreateRoomParams createRoomPara Status Code Description Response Headers 201 - 400 - + 401 - 402 - 403 - 404 - @@ -232,6 +235,7 @@ public ApiResponse createRoomDeprecatedWithHttpInfo(String appId, Create Status Code Description Response Headers 201 - 400 - + 401 - 402 - 403 - 404 - @@ -258,6 +262,7 @@ public okhttp3.Call createRoomDeprecatedAsync(String appId, CreateRoomParams cre +
Status Code Description Response Headers
204 No content -
401 -
404 -
500 -
@@ -337,6 +342,7 @@ private okhttp3.Call destroyRoomDeprecatedValidateBeforeCall(String appId, Strin +
Status Code Description Response Headers
204 No content -
401 -
404 -
500 -
@@ -358,6 +364,7 @@ public void destroyRoomDeprecated(String appId, String roomId) throws ApiExcepti +
Status Code Description Response Headers
204 No content -
401 -
404 -
500 -
@@ -381,6 +388,7 @@ public ApiResponse destroyRoomDeprecatedWithHttpInfo(String appId, String +
Status Code Description Response Headers
204 No content -
401 -
404 -
500 -
@@ -404,6 +412,7 @@ public okhttp3.Call destroyRoomDeprecatedAsync(String appId, String roomId, fina +
Status Code Description Response Headers
200 Ok -
401 -
404 -
* @deprecated @@ -483,6 +492,7 @@ private okhttp3.Call getActiveRoomsForProcessDeprecatedValidateBeforeCall(String +
Status Code Description Response Headers
200 Ok -
401 -
404 -
* @deprecated @@ -504,6 +514,7 @@ public List getActiveRoomsForProcessDepreca +
Status Code Description Response Headers
200 Ok -
401 -
404 -
* @deprecated @@ -527,6 +538,7 @@ public ApiResponse> getActiveRoomsForP +
Status Code Description Response Headers
200 Ok -
401 -
404 -
* @deprecated @@ -551,6 +563,7 @@ public okhttp3.Call getActiveRoomsForProcessDeprecatedAsync(String appId, String Status Code Description Response Headers 200 Ok - 400 - + 402 - 404 - 500 - @@ -632,6 +645,7 @@ private okhttp3.Call getConnectionInfoDeprecatedValidateBeforeCall(String appId, Status Code Description Response Headers 200 Ok - 400 - + 402 - 404 - 500 - @@ -655,6 +669,7 @@ public ConnectionInfo getConnectionInfoDeprecated(String appId, String roomId) t Status Code Description Response Headers 200 Ok - 400 - + 402 - 404 - 500 - @@ -680,6 +695,7 @@ public ApiResponse getConnectionInfoDeprecatedWithHttpInfo(Strin Status Code Description Response Headers 200 Ok - 400 - + 402 - 404 - 500 - @@ -704,6 +720,7 @@ public okhttp3.Call getConnectionInfoDeprecatedAsync(String appId, String roomId +
Status Code Description Response Headers
200 Ok -
401 -
404 -
* @deprecated @@ -783,6 +800,7 @@ private okhttp3.Call getInactiveRoomsForProcessDeprecatedValidateBeforeCall(Stri +
Status Code Description Response Headers
200 Ok -
401 -
404 -
* @deprecated @@ -804,6 +822,7 @@ public List getInactiveRoomsForProcessDepre +
Status Code Description Response Headers
200 Ok -
401 -
404 -
* @deprecated @@ -827,6 +846,7 @@ public ApiResponse> getInactiveRoomsFo +
Status Code Description Response Headers
200 Ok -
401 -
404 -
* @deprecated @@ -850,6 +870,7 @@ public okhttp3.Call getInactiveRoomsForProcessDeprecatedAsync(String appId, Stri +
Status Code Description Response Headers
200 Ok -
401 -
404 -
* @deprecated @@ -929,6 +950,7 @@ private okhttp3.Call getRoomInfoDeprecatedValidateBeforeCall(String appId, Strin +
Status Code Description Response Headers
200 Ok -
401 -
404 -
* @deprecated @@ -950,6 +972,7 @@ public Room getRoomInfoDeprecated(String appId, String roomId) throws ApiExcepti +
Status Code Description Response Headers
200 Ok -
401 -
404 -
* @deprecated @@ -973,6 +996,7 @@ public ApiResponse getRoomInfoDeprecatedWithHttpInfo(String appId, String +
Status Code Description Response Headers
200 Ok -
401 -
404 -
* @deprecated @@ -996,6 +1020,7 @@ public okhttp3.Call getRoomInfoDeprecatedAsync(String appId, String roomId, fina +
Status Code Description Response Headers
204 No content -
401 -
404 -
500 -
@@ -1075,6 +1100,7 @@ private okhttp3.Call suspendRoomDeprecatedValidateBeforeCall(String appId, Strin +
Status Code Description Response Headers
204 No content -
401 -
404 -
500 -
@@ -1096,6 +1122,7 @@ public void suspendRoomDeprecated(String appId, String roomId) throws ApiExcepti +
Status Code Description Response Headers
204 No content -
401 -
404 -
500 -
@@ -1119,6 +1146,7 @@ public ApiResponse suspendRoomDeprecatedWithHttpInfo(String appId, String +
Status Code Description Response Headers
204 No content -
401 -
404 -
500 -
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 71f6ba8..6f35416 100644 --- a/java/src/main/java/com/hathora/client/api/RoomV2Api.java +++ b/java/src/main/java/com/hathora/client/api/RoomV2Api.java @@ -92,6 +92,7 @@ public void setCustomBaseUrl(String customBaseUrl) { Status Code Description Response Headers 201 - 400 - + 401 - 402 - 403 - 404 - @@ -177,6 +178,7 @@ private okhttp3.Call createRoomValidateBeforeCall(String appId, CreateRoomParams Status Code Description Response Headers 201 - 400 - + 401 - 402 - 403 - 404 - @@ -201,6 +203,7 @@ public CreateRoomResponse createRoom(String appId, CreateRoomParams createRoomPa Status Code Description Response Headers 201 - 400 - + 401 - 402 - 403 - 404 - @@ -227,6 +230,7 @@ public ApiResponse createRoomWithHttpInfo(String appId, Crea Status Code Description Response Headers 201 - 400 - + 401 - 402 - 403 - 404 - @@ -251,6 +255,7 @@ public okhttp3.Call createRoomAsync(String appId, CreateRoomParams createRoomPar +
Status Code Description Response Headers
204 No content -
401 -
404 -
500 -
@@ -327,6 +332,7 @@ private okhttp3.Call destroyRoomValidateBeforeCall(String appId, String roomId, +
Status Code Description Response Headers
204 No content -
401 -
404 -
500 -
@@ -346,6 +352,7 @@ public void destroyRoom(String appId, String roomId) throws ApiException { +
Status Code Description Response Headers
204 No content -
401 -
404 -
500 -
@@ -367,6 +374,7 @@ public ApiResponse destroyRoomWithHttpInfo(String appId, String roomId) th +
Status Code Description Response Headers
204 No content -
401 -
404 -
500 -
@@ -388,6 +396,7 @@ public okhttp3.Call destroyRoomAsync(String appId, String roomId, final ApiCallb +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -464,6 +473,7 @@ private okhttp3.Call getActiveRoomsForProcessValidateBeforeCall(String appId, St +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -483,6 +493,7 @@ public List getActiveRoomsForProcess(String +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -504,6 +515,7 @@ public ApiResponse> getActiveRoomsForP +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -526,6 +538,7 @@ public okhttp3.Call getActiveRoomsForProcessAsync(String appId, String processId Status Code Description Response Headers 200 Ok - 400 - + 402 - 404 - 500 - @@ -604,6 +617,7 @@ private okhttp3.Call getConnectionInfoValidateBeforeCall(String appId, String ro Status Code Description Response Headers 200 Ok - 400 - + 402 - 404 - 500 - @@ -625,6 +639,7 @@ public ConnectionInfoV2 getConnectionInfo(String appId, String roomId) throws Ap Status Code Description Response Headers 200 Ok - 400 - + 402 - 404 - 500 - @@ -648,6 +663,7 @@ public ApiResponse getConnectionInfoWithHttpInfo(String appId, Status Code Description Response Headers 200 Ok - 400 - + 402 - 404 - 500 - @@ -670,6 +686,7 @@ public okhttp3.Call getConnectionInfoAsync(String appId, String roomId, final Ap +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -746,6 +763,7 @@ private okhttp3.Call getInactiveRoomsForProcessValidateBeforeCall(String appId, +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -765,6 +783,7 @@ public List getInactiveRoomsForProcess(Stri +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -786,6 +805,7 @@ public ApiResponse> getInactiveRoomsFo +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -807,6 +827,7 @@ public okhttp3.Call getInactiveRoomsForProcessAsync(String appId, String process +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -883,6 +904,7 @@ private okhttp3.Call getRoomInfoValidateBeforeCall(String appId, String roomId, +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -902,6 +924,7 @@ public Room getRoomInfo(String appId, String roomId) throws ApiException { +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -923,6 +946,7 @@ public ApiResponse getRoomInfoWithHttpInfo(String appId, String roomId) th +
Status Code Description Response Headers
200 Ok -
401 -
404 -
*/ @@ -944,6 +968,7 @@ public okhttp3.Call getRoomInfoAsync(String appId, String roomId, final ApiCallb +
Status Code Description Response Headers
204 No content -
401 -
404 -
500 -
@@ -1020,6 +1045,7 @@ private okhttp3.Call suspendRoomValidateBeforeCall(String appId, String roomId, +
Status Code Description Response Headers
204 No content -
401 -
404 -
500 -
@@ -1039,6 +1065,7 @@ public void suspendRoom(String appId, String roomId) throws ApiException { +
Status Code Description Response Headers
204 No content -
401 -
404 -
500 -
@@ -1060,6 +1087,7 @@ public ApiResponse suspendRoomWithHttpInfo(String appId, String roomId) th +
Status Code Description Response Headers
204 No content -
401 -
404 -
500 -
@@ -1082,6 +1110,7 @@ public okhttp3.Call suspendRoomAsync(String appId, String roomId, final ApiCallb +
Status Code Description Response Headers
204 No content -
401 -
404 -
500 -
@@ -1165,6 +1194,7 @@ private okhttp3.Call updateRoomConfigValidateBeforeCall(String appId, String roo +
Status Code Description Response Headers
204 No content -
401 -
404 -
500 -
@@ -1185,6 +1215,7 @@ public void updateRoomConfig(String appId, String roomId, UpdateRoomConfigParams +
Status Code Description Response Headers
204 No content -
401 -
404 -
500 -
@@ -1207,6 +1238,7 @@ public ApiResponse updateRoomConfigWithHttpInfo(String appId, String roomI +
Status Code Description Response Headers
204 No content -
401 -
404 -
500 -
diff --git a/java/src/main/java/com/hathora/client/model/Application.java b/java/src/main/java/com/hathora/client/model/Application.java index 53f02cd..26bc006 100644 --- a/java/src/main/java/com/hathora/client/model/Application.java +++ b/java/src/main/java/com/hathora/client/model/Application.java @@ -96,7 +96,7 @@ public Application deletedBy(String deletedBy) { } /** - * Email address for the user that deleted the application. + * UserId or email address for the user that deleted the application. * @return deletedBy **/ @javax.annotation.Nullable @@ -162,7 +162,7 @@ public Application createdBy(String createdBy) { } /** - * Email address for the user that deleted the application. + * UserId or email address for the user that created the application. * @return createdBy **/ @javax.annotation.Nonnull @@ -184,7 +184,7 @@ public Application orgId(String orgId) { } /** - * System generated unique identifier for an organization. + * System generated unique identifier for an organization. Not guaranteed to have a specific format. * @return orgId **/ @javax.annotation.Nonnull diff --git a/java/src/main/java/com/hathora/client/model/ApplicationWithLatestDeploymentAndBuild.java b/java/src/main/java/com/hathora/client/model/ApplicationWithLatestDeploymentAndBuild.java new file mode 100644 index 0000000..3d99e56 --- /dev/null +++ b/java/src/main/java/com/hathora/client/model/ApplicationWithLatestDeploymentAndBuild.java @@ -0,0 +1,581 @@ +/* + * 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.ApplicationWithLatestDeploymentAndBuildAllOfDeployment; +import com.hathora.client.model.AuthConfiguration; +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; + +/** + * ApplicationWithLatestDeploymentAndBuild + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApplicationWithLatestDeploymentAndBuild { + public static final String SERIALIZED_NAME_DELETED_BY = "deletedBy"; + @SerializedName(SERIALIZED_NAME_DELETED_BY) + private String deletedBy; + + public static final String SERIALIZED_NAME_DELETED_AT = "deletedAt"; + @SerializedName(SERIALIZED_NAME_DELETED_AT) + private OffsetDateTime deletedAt; + + 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_ORG_ID = "orgId"; + @SerializedName(SERIALIZED_NAME_ORG_ID) + private String orgId; + + public static final String SERIALIZED_NAME_AUTH_CONFIGURATION = "authConfiguration"; + @SerializedName(SERIALIZED_NAME_AUTH_CONFIGURATION) + private AuthConfiguration authConfiguration; + + public static final String SERIALIZED_NAME_APP_SECRET = "appSecret"; + @SerializedName(SERIALIZED_NAME_APP_SECRET) + private String appSecret; + + public static final String SERIALIZED_NAME_APP_ID = "appId"; + @SerializedName(SERIALIZED_NAME_APP_ID) + private String appId; + + public static final String SERIALIZED_NAME_APP_NAME = "appName"; + @SerializedName(SERIALIZED_NAME_APP_NAME) + private String appName; + + public static final String SERIALIZED_NAME_DEPLOYMENT = "deployment"; + @SerializedName(SERIALIZED_NAME_DEPLOYMENT) + private ApplicationWithLatestDeploymentAndBuildAllOfDeployment deployment; + + public ApplicationWithLatestDeploymentAndBuild() { + } + + public ApplicationWithLatestDeploymentAndBuild deletedBy(String deletedBy) { + + this.deletedBy = deletedBy; + return this; + } + + /** + * UserId or email address for the user that deleted the application. + * @return deletedBy + **/ + @javax.annotation.Nullable + + public String getDeletedBy() { + return deletedBy; + } + + + public void setDeletedBy(String deletedBy) { + this.deletedBy = deletedBy; + } + + + public ApplicationWithLatestDeploymentAndBuild deletedAt(OffsetDateTime deletedAt) { + + this.deletedAt = deletedAt; + return this; + } + + /** + * When the application was deleted. + * @return deletedAt + **/ + @javax.annotation.Nullable + + public OffsetDateTime getDeletedAt() { + return deletedAt; + } + + + public void setDeletedAt(OffsetDateTime deletedAt) { + this.deletedAt = deletedAt; + } + + + public ApplicationWithLatestDeploymentAndBuild createdAt(OffsetDateTime createdAt) { + + this.createdAt = createdAt; + return this; + } + + /** + * When the application was created. + * @return createdAt + **/ + @javax.annotation.Nonnull + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public ApplicationWithLatestDeploymentAndBuild createdBy(String createdBy) { + + this.createdBy = createdBy; + return this; + } + + /** + * UserId or email address for the user that created the application. + * @return createdBy + **/ + @javax.annotation.Nonnull + + public String getCreatedBy() { + return createdBy; + } + + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + + public ApplicationWithLatestDeploymentAndBuild 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; + } + + + public ApplicationWithLatestDeploymentAndBuild authConfiguration(AuthConfiguration authConfiguration) { + + this.authConfiguration = authConfiguration; + return this; + } + + /** + * Get authConfiguration + * @return authConfiguration + **/ + @javax.annotation.Nonnull + + public AuthConfiguration getAuthConfiguration() { + return authConfiguration; + } + + + public void setAuthConfiguration(AuthConfiguration authConfiguration) { + this.authConfiguration = authConfiguration; + } + + + public ApplicationWithLatestDeploymentAndBuild appSecret(String appSecret) { + + this.appSecret = appSecret; + return this; + } + + /** + * Secret that is used for identity and access management. + * @return appSecret + **/ + @javax.annotation.Nonnull + + public String getAppSecret() { + return appSecret; + } + + + public void setAppSecret(String appSecret) { + this.appSecret = appSecret; + } + + + public ApplicationWithLatestDeploymentAndBuild 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; + } + + + public ApplicationWithLatestDeploymentAndBuild appName(String appName) { + + this.appName = appName; + return this; + } + + /** + * Readable name for an application. Must be unique within an organization. + * @return appName + **/ + @javax.annotation.Nonnull + + public String getAppName() { + return appName; + } + + + public void setAppName(String appName) { + this.appName = appName; + } + + + public ApplicationWithLatestDeploymentAndBuild deployment(ApplicationWithLatestDeploymentAndBuildAllOfDeployment deployment) { + + this.deployment = deployment; + return this; + } + + /** + * Get deployment + * @return deployment + **/ + @javax.annotation.Nullable + + public ApplicationWithLatestDeploymentAndBuildAllOfDeployment getDeployment() { + return deployment; + } + + + public void setDeployment(ApplicationWithLatestDeploymentAndBuildAllOfDeployment deployment) { + this.deployment = deployment; + } + + /** + * 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 ApplicationWithLatestDeploymentAndBuild instance itself + */ + public ApplicationWithLatestDeploymentAndBuild 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; + } + ApplicationWithLatestDeploymentAndBuild applicationWithLatestDeploymentAndBuild = (ApplicationWithLatestDeploymentAndBuild) o; + return Objects.equals(this.deletedBy, applicationWithLatestDeploymentAndBuild.deletedBy) && + Objects.equals(this.deletedAt, applicationWithLatestDeploymentAndBuild.deletedAt) && + Objects.equals(this.createdAt, applicationWithLatestDeploymentAndBuild.createdAt) && + Objects.equals(this.createdBy, applicationWithLatestDeploymentAndBuild.createdBy) && + Objects.equals(this.orgId, applicationWithLatestDeploymentAndBuild.orgId) && + Objects.equals(this.authConfiguration, applicationWithLatestDeploymentAndBuild.authConfiguration) && + Objects.equals(this.appSecret, applicationWithLatestDeploymentAndBuild.appSecret) && + Objects.equals(this.appId, applicationWithLatestDeploymentAndBuild.appId) && + Objects.equals(this.appName, applicationWithLatestDeploymentAndBuild.appName) && + Objects.equals(this.deployment, applicationWithLatestDeploymentAndBuild.deployment)&& + Objects.equals(this.additionalProperties, applicationWithLatestDeploymentAndBuild.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(deletedBy, deletedAt, createdAt, createdBy, orgId, authConfiguration, appSecret, appId, appName, deployment, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApplicationWithLatestDeploymentAndBuild {\n"); + sb.append(" deletedBy: ").append(toIndentedString(deletedBy)).append("\n"); + sb.append(" deletedAt: ").append(toIndentedString(deletedAt)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); + sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); + sb.append(" authConfiguration: ").append(toIndentedString(authConfiguration)).append("\n"); + sb.append(" appSecret: ").append(toIndentedString(appSecret)).append("\n"); + sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); + sb.append(" appName: ").append(toIndentedString(appName)).append("\n"); + sb.append(" deployment: ").append(toIndentedString(deployment)).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("deletedBy"); + openapiFields.add("deletedAt"); + openapiFields.add("createdAt"); + openapiFields.add("createdBy"); + openapiFields.add("orgId"); + openapiFields.add("authConfiguration"); + openapiFields.add("appSecret"); + openapiFields.add("appId"); + openapiFields.add("appName"); + openapiFields.add("deployment"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("deletedBy"); + openapiRequiredFields.add("deletedAt"); + openapiRequiredFields.add("createdAt"); + openapiRequiredFields.add("createdBy"); + openapiRequiredFields.add("orgId"); + openapiRequiredFields.add("authConfiguration"); + openapiRequiredFields.add("appSecret"); + openapiRequiredFields.add("appId"); + openapiRequiredFields.add("appName"); + } + + /** + * 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 ApplicationWithLatestDeploymentAndBuild + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ApplicationWithLatestDeploymentAndBuild.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ApplicationWithLatestDeploymentAndBuild is not found in the empty JSON string", ApplicationWithLatestDeploymentAndBuild.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ApplicationWithLatestDeploymentAndBuild.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("deletedBy").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `deletedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("deletedBy").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())); + } + 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())); + } + // validate the required field `authConfiguration` + AuthConfiguration.validateJsonObject(jsonObj.getAsJsonObject("authConfiguration")); + if (!jsonObj.get("appSecret").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `appSecret` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appSecret").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())); + } + if (!jsonObj.get("appName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `appName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appName").toString())); + } + // validate the optional field `deployment` + if (jsonObj.get("deployment") != null && !jsonObj.get("deployment").isJsonNull()) { + ApplicationWithLatestDeploymentAndBuildAllOfDeployment.validateJsonObject(jsonObj.getAsJsonObject("deployment")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ApplicationWithLatestDeploymentAndBuild.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ApplicationWithLatestDeploymentAndBuild' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ApplicationWithLatestDeploymentAndBuild.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ApplicationWithLatestDeploymentAndBuild 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 ApplicationWithLatestDeploymentAndBuild read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ApplicationWithLatestDeploymentAndBuild 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 ApplicationWithLatestDeploymentAndBuild given an JSON string + * + * @param jsonString JSON string + * @return An instance of ApplicationWithLatestDeploymentAndBuild + * @throws IOException if the JSON string is invalid with respect to ApplicationWithLatestDeploymentAndBuild + */ + public static ApplicationWithLatestDeploymentAndBuild fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ApplicationWithLatestDeploymentAndBuild.class); + } + + /** + * Convert an instance of ApplicationWithLatestDeploymentAndBuild 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/ApplicationWithLatestDeploymentAndBuildAllOf.java b/java/src/main/java/com/hathora/client/model/ApplicationWithLatestDeploymentAndBuildAllOf.java new file mode 100644 index 0000000..2fecf57 --- /dev/null +++ b/java/src/main/java/com/hathora/client/model/ApplicationWithLatestDeploymentAndBuildAllOf.java @@ -0,0 +1,282 @@ +/* + * 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.ApplicationWithLatestDeploymentAndBuildAllOfDeployment; +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; + +/** + * ApplicationWithLatestDeploymentAndBuildAllOf + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApplicationWithLatestDeploymentAndBuildAllOf { + public static final String SERIALIZED_NAME_DEPLOYMENT = "deployment"; + @SerializedName(SERIALIZED_NAME_DEPLOYMENT) + private ApplicationWithLatestDeploymentAndBuildAllOfDeployment deployment; + + public ApplicationWithLatestDeploymentAndBuildAllOf() { + } + + public ApplicationWithLatestDeploymentAndBuildAllOf deployment(ApplicationWithLatestDeploymentAndBuildAllOfDeployment deployment) { + + this.deployment = deployment; + return this; + } + + /** + * Get deployment + * @return deployment + **/ + @javax.annotation.Nullable + + public ApplicationWithLatestDeploymentAndBuildAllOfDeployment getDeployment() { + return deployment; + } + + + public void setDeployment(ApplicationWithLatestDeploymentAndBuildAllOfDeployment deployment) { + this.deployment = deployment; + } + + /** + * 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 ApplicationWithLatestDeploymentAndBuildAllOf instance itself + */ + public ApplicationWithLatestDeploymentAndBuildAllOf 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; + } + ApplicationWithLatestDeploymentAndBuildAllOf applicationWithLatestDeploymentAndBuildAllOf = (ApplicationWithLatestDeploymentAndBuildAllOf) o; + return Objects.equals(this.deployment, applicationWithLatestDeploymentAndBuildAllOf.deployment)&& + Objects.equals(this.additionalProperties, applicationWithLatestDeploymentAndBuildAllOf.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(deployment, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApplicationWithLatestDeploymentAndBuildAllOf {\n"); + sb.append(" deployment: ").append(toIndentedString(deployment)).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("deployment"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * 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 ApplicationWithLatestDeploymentAndBuildAllOf + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ApplicationWithLatestDeploymentAndBuildAllOf.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ApplicationWithLatestDeploymentAndBuildAllOf is not found in the empty JSON string", ApplicationWithLatestDeploymentAndBuildAllOf.openapiRequiredFields.toString())); + } + } + // validate the optional field `deployment` + if (jsonObj.get("deployment") != null && !jsonObj.get("deployment").isJsonNull()) { + ApplicationWithLatestDeploymentAndBuildAllOfDeployment.validateJsonObject(jsonObj.getAsJsonObject("deployment")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ApplicationWithLatestDeploymentAndBuildAllOf.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ApplicationWithLatestDeploymentAndBuildAllOf' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ApplicationWithLatestDeploymentAndBuildAllOf.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ApplicationWithLatestDeploymentAndBuildAllOf 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 ApplicationWithLatestDeploymentAndBuildAllOf read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ApplicationWithLatestDeploymentAndBuildAllOf 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 ApplicationWithLatestDeploymentAndBuildAllOf given an JSON string + * + * @param jsonString JSON string + * @return An instance of ApplicationWithLatestDeploymentAndBuildAllOf + * @throws IOException if the JSON string is invalid with respect to ApplicationWithLatestDeploymentAndBuildAllOf + */ + public static ApplicationWithLatestDeploymentAndBuildAllOf fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ApplicationWithLatestDeploymentAndBuildAllOf.class); + } + + /** + * Convert an instance of ApplicationWithLatestDeploymentAndBuildAllOf 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/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.java b/java/src/main/java/com/hathora/client/model/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.java new file mode 100644 index 0000000..3cb6401 --- /dev/null +++ b/java/src/main/java/com/hathora/client/model/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.java @@ -0,0 +1,845 @@ +/* + * 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.Build; +import com.hathora.client.model.ContainerPort; +import com.hathora.client.model.DeploymentEnvInner; +import com.hathora.client.model.PlanName; +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; + +/** + * ApplicationWithLatestDeploymentAndBuildAllOfDeployment + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApplicationWithLatestDeploymentAndBuildAllOfDeployment { + public static final String SERIALIZED_NAME_IDLE_TIMEOUT_ENABLED = "idleTimeoutEnabled"; + @SerializedName(SERIALIZED_NAME_IDLE_TIMEOUT_ENABLED) + private Boolean idleTimeoutEnabled = true; + + 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_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<>(); + + public static final String SERIALIZED_NAME_DEFAULT_CONTAINER_PORT = "defaultContainerPort"; + @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; + + 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 Integer 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 static final String SERIALIZED_NAME_BUILD = "build"; + @SerializedName(SERIALIZED_NAME_BUILD) + private Build build; + + public ApplicationWithLatestDeploymentAndBuildAllOfDeployment() { + } + + public ApplicationWithLatestDeploymentAndBuildAllOfDeployment 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.Nullable + + public Boolean getIdleTimeoutEnabled() { + return idleTimeoutEnabled; + } + + + public void setIdleTimeoutEnabled(Boolean idleTimeoutEnabled) { + this.idleTimeoutEnabled = idleTimeoutEnabled; + } + + + public ApplicationWithLatestDeploymentAndBuildAllOfDeployment env(List env) { + + this.env = env; + return this; + } + + public ApplicationWithLatestDeploymentAndBuildAllOfDeployment addEnvItem(DeploymentEnvInner 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 ApplicationWithLatestDeploymentAndBuildAllOfDeployment 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 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; + return this; + } + + public ApplicationWithLatestDeploymentAndBuildAllOfDeployment 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 ApplicationWithLatestDeploymentAndBuildAllOfDeployment 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 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; + 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 ApplicationWithLatestDeploymentAndBuildAllOfDeployment 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 ApplicationWithLatestDeploymentAndBuildAllOfDeployment requestedMemoryMB(Integer requestedMemoryMB) { + + this.requestedMemoryMB = requestedMemoryMB; + return this; + } + + /** + * The amount of memory allocated to your process. + * @return requestedMemoryMB + **/ + @javax.annotation.Nonnull + + public Integer getRequestedMemoryMB() { + return requestedMemoryMB; + } + + + public void setRequestedMemoryMB(Integer requestedMemoryMB) { + this.requestedMemoryMB = requestedMemoryMB; + } + + + public ApplicationWithLatestDeploymentAndBuildAllOfDeployment 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 ApplicationWithLatestDeploymentAndBuildAllOfDeployment 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 ApplicationWithLatestDeploymentAndBuildAllOfDeployment 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 ApplicationWithLatestDeploymentAndBuildAllOfDeployment 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; + } + + + public ApplicationWithLatestDeploymentAndBuildAllOfDeployment build(Build build) { + + this.build = build; + return this; + } + + /** + * Get build + * @return build + **/ + @javax.annotation.Nonnull + + public Build getBuild() { + return build; + } + + + public void setBuild(Build build) { + this.build = build; + } + + /** + * 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 ApplicationWithLatestDeploymentAndBuildAllOfDeployment instance itself + */ + public ApplicationWithLatestDeploymentAndBuildAllOfDeployment 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; + } + ApplicationWithLatestDeploymentAndBuildAllOfDeployment applicationWithLatestDeploymentAndBuildAllOfDeployment = (ApplicationWithLatestDeploymentAndBuildAllOfDeployment) 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) && + Objects.equals(this.requestedCPU, applicationWithLatestDeploymentAndBuildAllOfDeployment.requestedCPU) && + Objects.equals(this.deploymentId, applicationWithLatestDeploymentAndBuildAllOfDeployment.deploymentId) && + Objects.equals(this.buildId, applicationWithLatestDeploymentAndBuildAllOfDeployment.buildId) && + Objects.equals(this.appId, applicationWithLatestDeploymentAndBuildAllOfDeployment.appId) && + Objects.equals(this.build, applicationWithLatestDeploymentAndBuildAllOfDeployment.build)&& + Objects.equals(this.additionalProperties, applicationWithLatestDeploymentAndBuildAllOfDeployment.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(idleTimeoutEnabled, env, roomsPerProcess, planName, additionalContainerPorts, defaultContainerPort, transportType, containerPort, createdAt, createdBy, requestedMemoryMB, requestedCPU, deploymentId, buildId, appId, build, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApplicationWithLatestDeploymentAndBuildAllOfDeployment {\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(" 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"); + 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(" build: ").append(toIndentedString(build)).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("planName"); + openapiFields.add("additionalContainerPorts"); + openapiFields.add("defaultContainerPort"); + openapiFields.add("transportType"); + openapiFields.add("containerPort"); + openapiFields.add("createdAt"); + openapiFields.add("createdBy"); + openapiFields.add("requestedMemoryMB"); + openapiFields.add("requestedCPU"); + openapiFields.add("deploymentId"); + openapiFields.add("buildId"); + openapiFields.add("appId"); + openapiFields.add("build"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + 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"); + openapiRequiredFields.add("requestedCPU"); + openapiRequiredFields.add("deploymentId"); + openapiRequiredFields.add("buildId"); + openapiRequiredFields.add("appId"); + openapiRequiredFields.add("build"); + } + + /** + * 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 ApplicationWithLatestDeploymentAndBuildAllOfDeployment + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ApplicationWithLatestDeploymentAndBuildAllOfDeployment.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ApplicationWithLatestDeploymentAndBuildAllOfDeployment is not found in the empty JSON string", ApplicationWithLatestDeploymentAndBuildAllOfDeployment.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ApplicationWithLatestDeploymentAndBuildAllOfDeployment.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++) { + DeploymentEnvInner.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("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())); + } + 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())); + } + // validate the required field `build` + Build.validateJsonObject(jsonObj.getAsJsonObject("build")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ApplicationWithLatestDeploymentAndBuildAllOfDeployment.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ApplicationWithLatestDeploymentAndBuildAllOfDeployment' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ApplicationWithLatestDeploymentAndBuildAllOfDeployment.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ApplicationWithLatestDeploymentAndBuildAllOfDeployment 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 ApplicationWithLatestDeploymentAndBuildAllOfDeployment read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ApplicationWithLatestDeploymentAndBuildAllOfDeployment 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 ApplicationWithLatestDeploymentAndBuildAllOfDeployment given an JSON string + * + * @param jsonString JSON string + * @return An instance of ApplicationWithLatestDeploymentAndBuildAllOfDeployment + * @throws IOException if the JSON string is invalid with respect to ApplicationWithLatestDeploymentAndBuildAllOfDeployment + */ + public static ApplicationWithLatestDeploymentAndBuildAllOfDeployment fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ApplicationWithLatestDeploymentAndBuildAllOfDeployment.class); + } + + /** + * Convert an instance of ApplicationWithLatestDeploymentAndBuildAllOfDeployment 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/ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf.java b/java/src/main/java/com/hathora/client/model/ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf.java new file mode 100644 index 0000000..9cf8e2a --- /dev/null +++ b/java/src/main/java/com/hathora/client/model/ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf.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 com.hathora.client.model.Build; +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; + +/** + * ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf { + public static final String SERIALIZED_NAME_BUILD = "build"; + @SerializedName(SERIALIZED_NAME_BUILD) + private Build build; + + public ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf() { + } + + public ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf build(Build build) { + + this.build = build; + return this; + } + + /** + * Get build + * @return build + **/ + @javax.annotation.Nonnull + + public Build getBuild() { + return build; + } + + + public void setBuild(Build build) { + this.build = build; + } + + /** + * 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 ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf instance itself + */ + public ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf 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; + } + ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf applicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf = (ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf) o; + return Objects.equals(this.build, applicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf.build)&& + Objects.equals(this.additionalProperties, applicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(build, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf {\n"); + sb.append(" build: ").append(toIndentedString(build)).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("build"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("build"); + } + + /** + * 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 ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf is not found in the empty JSON string", ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf.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 `build` + Build.validateJsonObject(jsonObj.getAsJsonObject("build")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf 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 ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf 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 ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf given an JSON string + * + * @param jsonString JSON string + * @return An instance of ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf + * @throws IOException if the JSON string is invalid with respect to ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf + */ + public static ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf.class); + } + + /** + * Convert an instance of ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf 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/Build.java b/java/src/main/java/com/hathora/client/model/Build.java index 8ed70ec..49ea8f3 100644 --- a/java/src/main/java/com/hathora/client/model/Build.java +++ b/java/src/main/java/com/hathora/client/model/Build.java @@ -21,10 +21,12 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import com.hathora.client.model.BuildRegionalContainerTagsInner; +import com.hathora.client.model.BuildStatus; import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -64,60 +66,9 @@ public class Build { @SerializedName(SERIALIZED_NAME_IMAGE_SIZE) private Integer imageSize; - /** - * Current status of your build. `created`: a build was created but not yet run `running`: the build process is actively executing `succeeded`: the game server artifact was successfully built and stored in the Hathora registries `failed`: the build process was unsuccessful, most likely due to an error with the `Dockerfile` - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - CREATED("created"), - - RUNNING("running"), - - SUCCEEDED("succeeded"), - - FAILED("failed"); - - 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 BuildStatus status; public static final String SERIALIZED_NAME_DELETED_AT = "deletedAt"; @SerializedName(SERIALIZED_NAME_DELETED_AT) @@ -226,24 +177,24 @@ public void setImageSize(Integer imageSize) { } - public Build status(StatusEnum status) { + public Build status(BuildStatus status) { this.status = status; return this; } /** - * Current status of your build. `created`: a build was created but not yet run `running`: the build process is actively executing `succeeded`: the game server artifact was successfully built and stored in the Hathora registries `failed`: the build process was unsuccessful, most likely due to an error with the `Dockerfile` + * Get status * @return status **/ @javax.annotation.Nonnull - public StatusEnum getStatus() { + public BuildStatus getStatus() { return status; } - public void setStatus(StatusEnum status) { + public void setStatus(BuildStatus status) { this.status = status; } @@ -343,7 +294,7 @@ public Build createdBy(String createdBy) { } /** - * Email address for the user that created the build. + * UserId or email address for the user that created the build. * @return createdBy **/ @javax.annotation.Nonnull @@ -470,11 +421,22 @@ public boolean equals(Object o) { Objects.equals(this.additionalProperties, build.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(buildTag, regionalContainerTags, imageSize, status, deletedAt, finishedAt, startedAt, createdAt, createdBy, buildId, 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(); @@ -527,7 +489,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("buildTag"); openapiRequiredFields.add("regionalContainerTags"); openapiRequiredFields.add("imageSize"); openapiRequiredFields.add("status"); @@ -559,7 +520,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - if (!jsonObj.get("buildTag").isJsonPrimitive()) { + if ((jsonObj.get("buildTag") != null && !jsonObj.get("buildTag").isJsonNull()) && !jsonObj.get("buildTag").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `buildTag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("buildTag").toString())); } // ensure the json data is an array @@ -572,9 +533,6 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { for (int i = 0; i < jsonArrayregionalContainerTags.size(); i++) { BuildRegionalContainerTagsInner.validateJsonObject(jsonArrayregionalContainerTags.get(i).getAsJsonObject()); }; - 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("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/BuildStatus.java b/java/src/main/java/com/hathora/client/model/BuildStatus.java new file mode 100644 index 0000000..9a9b47d --- /dev/null +++ b/java/src/main/java/com/hathora/client/model/BuildStatus.java @@ -0,0 +1,77 @@ +/* + * 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 BuildStatus + */ +@JsonAdapter(BuildStatus.Adapter.class) +public enum BuildStatus { + + CREATED("created"), + + RUNNING("running"), + + SUCCEEDED("succeeded"), + + FAILED("failed"); + + private String value; + + BuildStatus(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static BuildStatus fromValue(String value) { + for (BuildStatus b : BuildStatus.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 BuildStatus enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public BuildStatus read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return BuildStatus.fromValue(value); + } + } +} + diff --git a/java/src/main/java/com/hathora/client/model/CreateOrgToken.java b/java/src/main/java/com/hathora/client/model/CreateOrgToken.java new file mode 100644 index 0000000..0c322ce --- /dev/null +++ b/java/src/main/java/com/hathora/client/model/CreateOrgToken.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; + +/** + * CreateOrgToken + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateOrgToken { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public CreateOrgToken() { + } + + public CreateOrgToken name(String name) { + + this.name = name; + return this; + } + + /** + * Readable name for a token. Must be unique within an organization. + * @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 CreateOrgToken instance itself + */ + public CreateOrgToken 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; + } + CreateOrgToken createOrgToken = (CreateOrgToken) o; + return Objects.equals(this.name, createOrgToken.name)&& + Objects.equals(this.additionalProperties, createOrgToken.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateOrgToken {\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("name"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + 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 CreateOrgToken + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CreateOrgToken.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateOrgToken is not found in the empty JSON string", CreateOrgToken.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateOrgToken.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("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 (!CreateOrgToken.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateOrgToken' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateOrgToken.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateOrgToken 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 CreateOrgToken read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CreateOrgToken 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 CreateOrgToken given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateOrgToken + * @throws IOException if the JSON string is invalid with respect to CreateOrgToken + */ + public static CreateOrgToken fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateOrgToken.class); + } + + /** + * Convert an instance of CreateOrgToken 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/CreatedOrgToken.java b/java/src/main/java/com/hathora/client/model/CreatedOrgToken.java new file mode 100644 index 0000000..deb7354 --- /dev/null +++ b/java/src/main/java/com/hathora/client/model/CreatedOrgToken.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 com.hathora.client.model.OrgToken; +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; + +/** + * CreatedOrgToken + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreatedOrgToken { + public static final String SERIALIZED_NAME_PLAIN_TEXT_TOKEN = "plainTextToken"; + @SerializedName(SERIALIZED_NAME_PLAIN_TEXT_TOKEN) + private String plainTextToken; + + public static final String SERIALIZED_NAME_ORG_TOKEN = "orgToken"; + @SerializedName(SERIALIZED_NAME_ORG_TOKEN) + private OrgToken orgToken; + + public CreatedOrgToken() { + } + + public CreatedOrgToken plainTextToken(String plainTextToken) { + + this.plainTextToken = plainTextToken; + return this; + } + + /** + * Get plainTextToken + * @return plainTextToken + **/ + @javax.annotation.Nonnull + + public String getPlainTextToken() { + return plainTextToken; + } + + + public void setPlainTextToken(String plainTextToken) { + this.plainTextToken = plainTextToken; + } + + + public CreatedOrgToken orgToken(OrgToken orgToken) { + + this.orgToken = orgToken; + return this; + } + + /** + * Get orgToken + * @return orgToken + **/ + @javax.annotation.Nonnull + + public OrgToken getOrgToken() { + return orgToken; + } + + + public void setOrgToken(OrgToken orgToken) { + this.orgToken = orgToken; + } + + /** + * 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 CreatedOrgToken instance itself + */ + public CreatedOrgToken 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; + } + CreatedOrgToken createdOrgToken = (CreatedOrgToken) o; + return Objects.equals(this.plainTextToken, createdOrgToken.plainTextToken) && + Objects.equals(this.orgToken, createdOrgToken.orgToken)&& + Objects.equals(this.additionalProperties, createdOrgToken.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(plainTextToken, orgToken, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreatedOrgToken {\n"); + sb.append(" plainTextToken: ").append(toIndentedString(plainTextToken)).append("\n"); + sb.append(" orgToken: ").append(toIndentedString(orgToken)).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("plainTextToken"); + openapiFields.add("orgToken"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("plainTextToken"); + openapiRequiredFields.add("orgToken"); + } + + /** + * 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 CreatedOrgToken + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CreatedOrgToken.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreatedOrgToken is not found in the empty JSON string", CreatedOrgToken.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreatedOrgToken.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("plainTextToken").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `plainTextToken` to be a primitive type in the JSON string but got `%s`", jsonObj.get("plainTextToken").toString())); + } + // validate the required field `orgToken` + OrgToken.validateJsonObject(jsonObj.getAsJsonObject("orgToken")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreatedOrgToken.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreatedOrgToken' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreatedOrgToken.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreatedOrgToken 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 CreatedOrgToken read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CreatedOrgToken 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 CreatedOrgToken given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreatedOrgToken + * @throws IOException if the JSON string is invalid with respect to CreatedOrgToken + */ + public static CreatedOrgToken fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreatedOrgToken.class); + } + + /** + * Convert an instance of CreatedOrgToken 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 64b077a..d74608a 100644 --- a/java/src/main/java/com/hathora/client/model/Deployment.java +++ b/java/src/main/java/com/hathora/client/model/Deployment.java @@ -54,6 +54,10 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class Deployment { + public static final String SERIALIZED_NAME_IDLE_TIMEOUT_ENABLED = "idleTimeoutEnabled"; + @SerializedName(SERIALIZED_NAME_IDLE_TIMEOUT_ENABLED) + private Boolean idleTimeoutEnabled = true; + public static final String SERIALIZED_NAME_ENV = "env"; @SerializedName(SERIALIZED_NAME_ENV) private List env = new ArrayList<>(); @@ -162,6 +166,28 @@ public TransportTypeEnum read(final JsonReader jsonReader) throws IOException { public Deployment() { } + public Deployment 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.Nullable + + public Boolean getIdleTimeoutEnabled() { + return idleTimeoutEnabled; + } + + + public void setIdleTimeoutEnabled(Boolean idleTimeoutEnabled) { + this.idleTimeoutEnabled = idleTimeoutEnabled; + } + + public Deployment env(List env) { this.env = env; @@ -367,7 +393,7 @@ public Deployment createdBy(String createdBy) { } /** - * Email address for the user that created the deployment. + * UserId or email address for the user that created the deployment. * @return createdBy **/ @javax.annotation.Nonnull @@ -546,7 +572,8 @@ public boolean equals(Object o) { return false; } Deployment deployment = (Deployment) o; - return Objects.equals(this.env, deployment.env) && + return Objects.equals(this.idleTimeoutEnabled, deployment.idleTimeoutEnabled) && + Objects.equals(this.env, deployment.env) && Objects.equals(this.roomsPerProcess, deployment.roomsPerProcess) && Objects.equals(this.planName, deployment.planName) && Objects.equals(this.additionalContainerPorts, deployment.additionalContainerPorts) && @@ -565,13 +592,14 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(env, roomsPerProcess, planName, additionalContainerPorts, defaultContainerPort, transportType, containerPort, createdAt, createdBy, requestedMemoryMB, requestedCPU, deploymentId, buildId, appId, additionalProperties); + return Objects.hash(idleTimeoutEnabled, env, roomsPerProcess, planName, additionalContainerPorts, defaultContainerPort, transportType, containerPort, createdAt, createdBy, requestedMemoryMB, requestedCPU, deploymentId, buildId, appId, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Deployment {\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(" planName: ").append(toIndentedString(planName)).append("\n"); @@ -609,6 +637,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("idleTimeoutEnabled"); openapiFields.add("env"); openapiFields.add("roomsPerProcess"); openapiFields.add("planName"); 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 6e18d1f..cea6d3f 100644 --- a/java/src/main/java/com/hathora/client/model/DeploymentConfig.java +++ b/java/src/main/java/com/hathora/client/model/DeploymentConfig.java @@ -54,6 +54,10 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class DeploymentConfig { + public static final String SERIALIZED_NAME_IDLE_TIMEOUT_ENABLED = "idleTimeoutEnabled"; + @SerializedName(SERIALIZED_NAME_IDLE_TIMEOUT_ENABLED) + private Boolean idleTimeoutEnabled = true; + public static final String SERIALIZED_NAME_ENV = "env"; @SerializedName(SERIALIZED_NAME_ENV) private List env = new ArrayList<>(); @@ -81,6 +85,28 @@ public class DeploymentConfig { public DeploymentConfig() { } + public DeploymentConfig 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.Nullable + + public Boolean getIdleTimeoutEnabled() { + return idleTimeoutEnabled; + } + + + public void setIdleTimeoutEnabled(Boolean idleTimeoutEnabled) { + this.idleTimeoutEnabled = idleTimeoutEnabled; + } + + public DeploymentConfig env(List env) { this.env = env; @@ -287,7 +313,8 @@ public boolean equals(Object o) { return false; } DeploymentConfig deploymentConfig = (DeploymentConfig) o; - return Objects.equals(this.env, deploymentConfig.env) && + return Objects.equals(this.idleTimeoutEnabled, deploymentConfig.idleTimeoutEnabled) && + Objects.equals(this.env, deploymentConfig.env) && Objects.equals(this.roomsPerProcess, deploymentConfig.roomsPerProcess) && Objects.equals(this.planName, deploymentConfig.planName) && Objects.equals(this.additionalContainerPorts, deploymentConfig.additionalContainerPorts) && @@ -298,13 +325,14 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(env, roomsPerProcess, planName, additionalContainerPorts, transportType, containerPort, additionalProperties); + return Objects.hash(idleTimeoutEnabled, env, roomsPerProcess, planName, additionalContainerPorts, transportType, containerPort, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DeploymentConfig {\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(" planName: ").append(toIndentedString(planName)).append("\n"); @@ -334,6 +362,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("idleTimeoutEnabled"); openapiFields.add("env"); openapiFields.add("roomsPerProcess"); openapiFields.add("planName"); diff --git a/java/src/main/java/com/hathora/client/model/Invoice.java b/java/src/main/java/com/hathora/client/model/Invoice.java index 89689db..bdf80cf 100644 --- a/java/src/main/java/com/hathora/client/model/Invoice.java +++ b/java/src/main/java/com/hathora/client/model/Invoice.java @@ -20,6 +20,7 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import com.hathora.client.model.InvoiceStatus; import java.io.IOException; import java.time.OffsetDateTime; @@ -45,62 +46,13 @@ import com.hathora.client.JSON; /** - * Billing types + * Invoice */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class Invoice { - /** - * Gets or Sets status - */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - PENDING("pending"), - - PAID("paid"), - - OVERDUE("overdue"); - - 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 InvoiceStatus status; public static final String SERIALIZED_NAME_AMOUNT_DUE = "amountDue"; @SerializedName(SERIALIZED_NAME_AMOUNT_DUE) @@ -129,7 +81,7 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { public Invoice() { } - public Invoice status(StatusEnum status) { + public Invoice status(InvoiceStatus status) { this.status = status; return this; @@ -141,12 +93,12 @@ public Invoice status(StatusEnum status) { **/ @javax.annotation.Nonnull - public StatusEnum getStatus() { + public InvoiceStatus getStatus() { return status; } - public void setStatus(StatusEnum status) { + public void setStatus(InvoiceStatus status) { this.status = status; } @@ -424,9 +376,6 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - 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("pdfUrl").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `pdfUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pdfUrl").toString())); } diff --git a/java/src/main/java/com/hathora/client/model/InvoiceStatus.java b/java/src/main/java/com/hathora/client/model/InvoiceStatus.java new file mode 100644 index 0000000..98dc53d --- /dev/null +++ b/java/src/main/java/com/hathora/client/model/InvoiceStatus.java @@ -0,0 +1,75 @@ +/* + * 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 InvoiceStatus + */ +@JsonAdapter(InvoiceStatus.Adapter.class) +public enum InvoiceStatus { + + PENDING("pending"), + + PAID("paid"), + + OVERDUE("overdue"); + + private String value; + + InvoiceStatus(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static InvoiceStatus fromValue(String value) { + for (InvoiceStatus b : InvoiceStatus.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 InvoiceStatus enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public InvoiceStatus read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return InvoiceStatus.fromValue(value); + } + } +} + diff --git a/java/src/main/java/com/hathora/client/model/ListOrgTokens.java b/java/src/main/java/com/hathora/client/model/ListOrgTokens.java new file mode 100644 index 0000000..0d26c6b --- /dev/null +++ b/java/src/main/java/com/hathora/client/model/ListOrgTokens.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.OrgToken; +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; + +/** + * ListOrgTokens + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ListOrgTokens { + public static final String SERIALIZED_NAME_TOKENS = "tokens"; + @SerializedName(SERIALIZED_NAME_TOKENS) + private List tokens = new ArrayList<>(); + + public ListOrgTokens() { + } + + public ListOrgTokens tokens(List tokens) { + + this.tokens = tokens; + return this; + } + + public ListOrgTokens addTokensItem(OrgToken tokensItem) { + if (this.tokens == null) { + this.tokens = new ArrayList<>(); + } + this.tokens.add(tokensItem); + return this; + } + + /** + * Get tokens + * @return tokens + **/ + @javax.annotation.Nonnull + + public List getTokens() { + return tokens; + } + + + public void setTokens(List tokens) { + this.tokens = tokens; + } + + /** + * 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 ListOrgTokens instance itself + */ + public ListOrgTokens 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; + } + ListOrgTokens listOrgTokens = (ListOrgTokens) o; + return Objects.equals(this.tokens, listOrgTokens.tokens)&& + Objects.equals(this.additionalProperties, listOrgTokens.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(tokens, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListOrgTokens {\n"); + sb.append(" tokens: ").append(toIndentedString(tokens)).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("tokens"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("tokens"); + } + + /** + * 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 ListOrgTokens + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ListOrgTokens.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ListOrgTokens is not found in the empty JSON string", ListOrgTokens.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ListOrgTokens.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("tokens").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `tokens` to be an array in the JSON string but got `%s`", jsonObj.get("tokens").toString())); + } + + JsonArray jsonArraytokens = jsonObj.getAsJsonArray("tokens"); + // validate the required field `tokens` (array) + for (int i = 0; i < jsonArraytokens.size(); i++) { + OrgToken.validateJsonObject(jsonArraytokens.get(i).getAsJsonObject()); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ListOrgTokens.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ListOrgTokens' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ListOrgTokens.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ListOrgTokens 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 ListOrgTokens read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ListOrgTokens 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 ListOrgTokens given an JSON string + * + * @param jsonString JSON string + * @return An instance of ListOrgTokens + * @throws IOException if the JSON string is invalid with respect to ListOrgTokens + */ + public static ListOrgTokens fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ListOrgTokens.class); + } + + /** + * Convert an instance of ListOrgTokens 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 fd602d7..677696b 100644 --- a/java/src/main/java/com/hathora/client/model/Lobby.java +++ b/java/src/main/java/com/hathora/client/model/Lobby.java @@ -189,7 +189,7 @@ public Lobby createdBy(String createdBy) { } /** - * Email address for the user that created the lobby. + * UserId or email address for the user that created the lobby. * @return createdBy **/ @javax.annotation.Nonnull diff --git a/java/src/main/java/com/hathora/client/model/LobbyV3.java b/java/src/main/java/com/hathora/client/model/LobbyV3.java index c042a2a..59204dc 100644 --- a/java/src/main/java/com/hathora/client/model/LobbyV3.java +++ b/java/src/main/java/com/hathora/client/model/LobbyV3.java @@ -137,7 +137,7 @@ public LobbyV3 createdBy(String createdBy) { } /** - * Email address for the user that created the lobby. + * UserId or email address for the user that created the lobby. * @return createdBy **/ @javax.annotation.Nonnull diff --git a/java/src/main/java/com/hathora/client/model/OrgToken.java b/java/src/main/java/com/hathora/client/model/OrgToken.java new file mode 100644 index 0000000..6605c34 --- /dev/null +++ b/java/src/main/java/com/hathora/client/model/OrgToken.java @@ -0,0 +1,482 @@ +/* + * 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.OrgTokenStatus; +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; + +/** + * OrgToken + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class OrgToken { + 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_LAST_FOUR_CHARS_OF_KEY = "lastFourCharsOfKey"; + @SerializedName(SERIALIZED_NAME_LAST_FOUR_CHARS_OF_KEY) + private String lastFourCharsOfKey; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private OrgTokenStatus status; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_ORG_ID = "orgId"; + @SerializedName(SERIALIZED_NAME_ORG_ID) + private String orgId; + + public static final String SERIALIZED_NAME_ORG_TOKEN_ID = "orgTokenId"; + @SerializedName(SERIALIZED_NAME_ORG_TOKEN_ID) + private String orgTokenId; + + public OrgToken() { + } + + public OrgToken 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 OrgToken createdBy(String createdBy) { + + this.createdBy = createdBy; + return this; + } + + /** + * Get createdBy + * @return createdBy + **/ + @javax.annotation.Nonnull + + public String getCreatedBy() { + return createdBy; + } + + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + + public OrgToken lastFourCharsOfKey(String lastFourCharsOfKey) { + + this.lastFourCharsOfKey = lastFourCharsOfKey; + return this; + } + + /** + * Get lastFourCharsOfKey + * @return lastFourCharsOfKey + **/ + @javax.annotation.Nonnull + + public String getLastFourCharsOfKey() { + return lastFourCharsOfKey; + } + + + public void setLastFourCharsOfKey(String lastFourCharsOfKey) { + this.lastFourCharsOfKey = lastFourCharsOfKey; + } + + + public OrgToken status(OrgTokenStatus status) { + + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @javax.annotation.Nonnull + + public OrgTokenStatus getStatus() { + return status; + } + + + public void setStatus(OrgTokenStatus status) { + this.status = status; + } + + + public OrgToken name(String name) { + + this.name = name; + return this; + } + + /** + * Readable name for a token. Must be unique within an organization. + * @return name + **/ + @javax.annotation.Nonnull + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public OrgToken orgId(String orgId) { + + this.orgId = orgId; + return this; + } + + /** + * Get orgId + * @return orgId + **/ + @javax.annotation.Nonnull + + public String getOrgId() { + return orgId; + } + + + public void setOrgId(String orgId) { + this.orgId = orgId; + } + + + public OrgToken orgTokenId(String orgTokenId) { + + this.orgTokenId = orgTokenId; + return this; + } + + /** + * System generated unique identifier for an organization token. + * @return orgTokenId + **/ + @javax.annotation.Nonnull + + public String getOrgTokenId() { + return orgTokenId; + } + + + public void setOrgTokenId(String orgTokenId) { + this.orgTokenId = orgTokenId; + } + + /** + * 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 OrgToken instance itself + */ + public OrgToken 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; + } + OrgToken orgToken = (OrgToken) o; + return Objects.equals(this.createdAt, orgToken.createdAt) && + Objects.equals(this.createdBy, orgToken.createdBy) && + Objects.equals(this.lastFourCharsOfKey, orgToken.lastFourCharsOfKey) && + Objects.equals(this.status, orgToken.status) && + Objects.equals(this.name, orgToken.name) && + Objects.equals(this.orgId, orgToken.orgId) && + Objects.equals(this.orgTokenId, orgToken.orgTokenId)&& + Objects.equals(this.additionalProperties, orgToken.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, createdBy, lastFourCharsOfKey, status, name, orgId, orgTokenId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrgToken {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); + sb.append(" lastFourCharsOfKey: ").append(toIndentedString(lastFourCharsOfKey)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); + sb.append(" orgTokenId: ").append(toIndentedString(orgTokenId)).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("createdAt"); + openapiFields.add("createdBy"); + openapiFields.add("lastFourCharsOfKey"); + openapiFields.add("status"); + openapiFields.add("name"); + openapiFields.add("orgId"); + openapiFields.add("orgTokenId"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("createdAt"); + openapiRequiredFields.add("createdBy"); + openapiRequiredFields.add("lastFourCharsOfKey"); + openapiRequiredFields.add("status"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("orgId"); + openapiRequiredFields.add("orgTokenId"); + } + + /** + * 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 OrgToken + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!OrgToken.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrgToken is not found in the empty JSON string", OrgToken.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : OrgToken.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("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("lastFourCharsOfKey").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `lastFourCharsOfKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lastFourCharsOfKey").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())); + } + 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())); + } + if (!jsonObj.get("orgTokenId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `orgTokenId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("orgTokenId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrgToken.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrgToken' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrgToken.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrgToken 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 OrgToken read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + OrgToken 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 OrgToken given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrgToken + * @throws IOException if the JSON string is invalid with respect to OrgToken + */ + public static OrgToken fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrgToken.class); + } + + /** + * Convert an instance of OrgToken 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/OrgTokenStatus.java b/java/src/main/java/com/hathora/client/model/OrgTokenStatus.java new file mode 100644 index 0000000..1159821 --- /dev/null +++ b/java/src/main/java/com/hathora/client/model/OrgTokenStatus.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 OrgTokenStatus + */ +@JsonAdapter(OrgTokenStatus.Adapter.class) +public enum OrgTokenStatus { + + ACTIVE("active"), + + REVOKED("revoked"); + + private String value; + + OrgTokenStatus(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OrgTokenStatus fromValue(String value) { + for (OrgTokenStatus b : OrgTokenStatus.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 OrgTokenStatus enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OrgTokenStatus read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OrgTokenStatus.fromValue(value); + } + } +} + diff --git a/java/src/main/java/com/hathora/client/model/Process.java b/java/src/main/java/com/hathora/client/model/Process.java index 8951780..e6f361d 100644 --- a/java/src/main/java/com/hathora/client/model/Process.java +++ b/java/src/main/java/com/hathora/client/model/Process.java @@ -825,6 +825,7 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("startingAt"); openapiRequiredFields.add("roomsPerProcess"); openapiRequiredFields.add("additionalExposedPorts"); + openapiRequiredFields.add("exposedPort"); openapiRequiredFields.add("port"); openapiRequiredFields.add("host"); openapiRequiredFields.add("region"); @@ -862,10 +863,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { 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")); - } + // validate the required field `exposedPort` + ExposedPort.validateJsonObject(jsonObj.getAsJsonObject("exposedPort")); 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())); } diff --git a/java/src/main/java/com/hathora/client/model/ProcessV2.java b/java/src/main/java/com/hathora/client/model/ProcessV2.java index a75f01d..d58f02f 100644 --- a/java/src/main/java/com/hathora/client/model/ProcessV2.java +++ b/java/src/main/java/com/hathora/client/model/ProcessV2.java @@ -544,6 +544,7 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("createdAt"); openapiRequiredFields.add("roomsPerProcess"); openapiRequiredFields.add("additionalExposedPorts"); + openapiRequiredFields.add("exposedPort"); openapiRequiredFields.add("region"); openapiRequiredFields.add("processId"); openapiRequiredFields.add("deploymentId"); @@ -579,10 +580,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { 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")); - } + // validate the required field `exposedPort` + ExposedPort.validateJsonObject(jsonObj.getAsJsonObject("exposedPort")); 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())); } diff --git a/java/src/main/java/com/hathora/client/model/ProcessWithRooms.java b/java/src/main/java/com/hathora/client/model/ProcessWithRooms.java index 2968942..7cede68 100644 --- a/java/src/main/java/com/hathora/client/model/ProcessWithRooms.java +++ b/java/src/main/java/com/hathora/client/model/ProcessWithRooms.java @@ -892,6 +892,7 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("startingAt"); openapiRequiredFields.add("roomsPerProcess"); openapiRequiredFields.add("additionalExposedPorts"); + openapiRequiredFields.add("exposedPort"); openapiRequiredFields.add("port"); openapiRequiredFields.add("host"); openapiRequiredFields.add("region"); @@ -931,10 +932,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { 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")); - } + // validate the required field `exposedPort` + ExposedPort.validateJsonObject(jsonObj.getAsJsonObject("exposedPort")); 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())); } diff --git a/swagger.json b/swagger.json index 5dbc229..3377b91 100644 --- a/swagger.json +++ b/swagger.json @@ -1,5832 +1,6418 @@ { - "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": "google-oauth2|107030234048588177467", - "description": "System generated unique identifier for an organization." - }, - "Application": { - "properties": { - "deletedBy": { - "type": "string", - "nullable": true, - "description": "Email address for the user that deleted the application.", - "example": "dev@hathora.dev" - }, - "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": "Email address for the user that deleted the application.", - "example": "dev@hathora.dev" - }, - "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": { - "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": "Email address for the user that created the deployment.", - "example": "dev@hathora.dev" - }, - "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." - }, - "ApplicationWithDeployment": { - "allOf": [ - { - "$ref": "#/components/schemas/Application" - }, - { - "properties": { - "deployment": { - "$ref": "#/components/schemas/Deployment" - } - }, - "required": [ - "deployment" - ], - "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" - }, - "Invoice": { - "properties": { - "status": { - "type": "string", - "enum": [ - "pending", - "paid", - "overdue" - ] - }, - "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", - "description": "Billing types" - }, - "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": { - "type": "string", - "enum": [ - "created", - "running", - "succeeded", - "failed" - ], - "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": "Email address for the user that created the build.", - "example": "dev@hathora.dev" - }, - "buildId": { - "$ref": "#/components/schemas/BuildId" - }, - "appId": { - "$ref": "#/components/schemas/AppId" - } - }, - "required": [ - "buildTag", - "regionalContainerTags", - "imageSize", - "status", - "deletedAt", - "finishedAt", - "startedAt", - "createdAt", - "createdBy", - "buildId", - "appId" - ], - "type": "object", - "description": "A build represents a game server artifact and its associated metadata." - }, - "CreateBuildParams": { - "properties": { - "buildTag": { - "$ref": "#/components/schemas/BuildTag" - } - }, - "type": "object" - }, - "DeploymentConfig": { - "properties": { - "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": "Email address for the user that created the lobby.", - "example": "dev@hathora.dev" - }, - "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": "Email address for the user that created the lobby.", - "example": "dev@hathora.dev" - }, - "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": { - "$ref": "#/components/schemas/ExposedPort" - }, - "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", - "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": { - "$ref": "#/components/schemas/ExposedPort" - }, - "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", - "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" - } - }, - "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/ApplicationWithDeployment" - }, - "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" - } - } - } - }, - "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" - } - } - } - }, - "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" - } - } - } - }, - "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" - }, - "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" - } - } - } - }, - "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" - } - } - } - }, - "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" - } - } - } - }, - "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" - } - } - } - }, - "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" - } - } - } - }, - "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" - } - } - } - }, - "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" - } - } - } - }, - "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" - } - } - } - }, - "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" - }, - "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" - } - } - } - }, - "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}/info/{deploymentId}": { - "get": { - "operationId": "GetDeploymentInfo", - "responses": { - "200": { - "description": "Ok", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Deployment" - } - } - } - }, - "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" - } - } - } - }, - "404": { - "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" - } - } - } - }, - "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" - } - } - } - }, - "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" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiError" - } - } - } - }, - "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" - } - } - } - }, - "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" - } - } - } - }, - "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" - } - } - } - }, - "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" - } - } - } - }, - "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" - } - } - } - }, - "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" - } - } - } - }, - "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" - } - } - } - }, - "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" - } - } - } - }, - "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" - } - } - } - }, - "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": "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" - } - } - } - }, - "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" - } - } - } - }, - "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" - } - } - } - }, - "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" - } - } - } - }, - "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" - } - } - } - }, - "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" - } - } - } - }, - "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" - } - } - } - }, - "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": [ - "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" - } - } - } - }, - "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" - } - } - } - ] - } - }, - "/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" - } - } - } - }, - "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" - } - } - } - }, - "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" - } - } - } - }, - "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" - } - } - } - }, - "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" - }, - "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" - }, - "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" - } - } - } - }, - "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" - } - } - } - }, - "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" - } - } - } - }, - "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" - } - } - } - }, - "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" - } - } - } - }, - "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" - }, - "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" - }, - "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" - } - } - } - }, - "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" - }, - "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" - } - } - } - } - } - } - }, - "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": "ProcessesV1", - "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": "RoomV1", - "description": "Deprecated. Use [RoomV2](https://hathora.dev/api#tag/RoomV2)." - } - ], - "x-speakeasy-globals": { - "parameters": [ - { - "in": "path", - "name": "appId", - "schema": { - "$ref": "#/components/schemas/AppId" - } - } - ] - } -} \ No newline at end of file + "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" + } + } + ] + } +} diff --git a/typescript/.openapi-generator/FILES b/typescript/.openapi-generator/FILES index 55dde99..1bea3f3 100644 --- a/typescript/.openapi-generator/FILES +++ b/typescript/.openapi-generator/FILES @@ -12,6 +12,7 @@ src/apis/LobbyV3Api.ts src/apis/LogV1Api.ts src/apis/ManagementV1Api.ts src/apis/MetricsV1Api.ts +src/apis/OrgTokensV1Api.ts src/apis/ProcessesV1Api.ts src/apis/ProcessesV2Api.ts src/apis/RoomV1Api.ts @@ -23,12 +24,15 @@ src/models/ActiveConnectionInfo.ts src/models/ApiError.ts src/models/AppConfig.ts src/models/Application.ts -src/models/ApplicationWithDeployment.ts -src/models/ApplicationWithDeploymentAllOf.ts +src/models/ApplicationWithLatestDeploymentAndBuild.ts +src/models/ApplicationWithLatestDeploymentAndBuildAllOf.ts +src/models/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.ts +src/models/ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf.ts src/models/AuthConfiguration.ts src/models/AuthConfigurationGoogle.ts src/models/Build.ts src/models/BuildRegionalContainerTagsInner.ts +src/models/BuildStatus.ts src/models/CardBrand.ts src/models/CardPaymentMethod.ts src/models/ConnectionInfo.ts @@ -37,10 +41,12 @@ src/models/ContainerPort.ts src/models/CreateBuildParams.ts src/models/CreateLobbyParams.ts 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/CreatedOrgToken.ts src/models/CustomerPortalUrl.ts src/models/Deployment.ts src/models/DeploymentConfig.ts @@ -48,7 +54,9 @@ src/models/DeploymentEnvInner.ts src/models/DiscoveryResponseInner.ts src/models/ExposedPort.ts src/models/Invoice.ts +src/models/InvoiceStatus.ts src/models/LinkPaymentMethod.ts +src/models/ListOrgTokens.ts src/models/Lobby.ts src/models/LobbyV3.ts src/models/LobbyVisibility.ts @@ -57,6 +65,8 @@ src/models/LoginNicknameRequest.ts src/models/LoginResponse.ts src/models/MetricName.ts src/models/MetricValue.ts +src/models/OrgToken.ts +src/models/OrgTokenStatus.ts src/models/PartialCardCardPaymentMethodAchAchPaymentMethodLinkLinkPaymentMethod.ts src/models/PickRoomExcludeKeyofRoomAllocations.ts src/models/PlanName.ts diff --git a/typescript/src/apis/AppV1Api.ts b/typescript/src/apis/AppV1Api.ts index 8d1c96d..a1a8bd2 100644 --- a/typescript/src/apis/AppV1Api.ts +++ b/typescript/src/apis/AppV1Api.ts @@ -18,7 +18,7 @@ import type { ApiError, AppConfig, Application, - ApplicationWithDeployment, + ApplicationWithLatestDeploymentAndBuild, } from '../models'; import { ApiErrorFromJSON, @@ -27,8 +27,8 @@ import { AppConfigToJSON, ApplicationFromJSON, ApplicationToJSON, - ApplicationWithDeploymentFromJSON, - ApplicationWithDeploymentToJSON, + ApplicationWithLatestDeploymentAndBuildFromJSON, + ApplicationWithLatestDeploymentAndBuildToJSON, } from '../models'; export interface CreateAppRequest { @@ -103,12 +103,12 @@ export interface AppV1ApiInterface { * @throws {RequiredError} * @memberof AppV1ApiInterface */ - getAppsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>>; + getAppsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>>; /** * 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`. */ - getApps(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + getApps(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Update data for an existing [application](https://hathora.dev/docs/concepts/hathora-entities#application) using `appId`. @@ -251,7 +251,7 @@ export class AppV1Api extends runtime.BaseAPI implements AppV1ApiInterface { /** * 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`. */ - async getAppsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + async getAppsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; @@ -271,13 +271,13 @@ export class AppV1Api extends runtime.BaseAPI implements AppV1ApiInterface { query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ApplicationWithDeploymentFromJSON)); + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ApplicationWithLatestDeploymentAndBuildFromJSON)); } /** * 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`. */ - async getApps(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getApps(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const response = await this.getAppsRaw(initOverrides); return await response.value(); } diff --git a/typescript/src/apis/DeploymentV1Api.ts b/typescript/src/apis/DeploymentV1Api.ts index d6293f9..40a7ab4 100644 --- a/typescript/src/apis/DeploymentV1Api.ts +++ b/typescript/src/apis/DeploymentV1Api.ts @@ -43,6 +43,10 @@ export interface GetDeploymentsRequest { appId: string; } +export interface GetLatestDeploymentRequest { + appId: string; +} + /** * DeploymentV1Api - interface * @@ -95,6 +99,20 @@ export interface DeploymentV1ApiInterface { */ 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 DeploymentV1ApiInterface + */ + 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; + } /** @@ -231,4 +249,42 @@ export class DeploymentV1Api extends runtime.BaseAPI implements DeploymentV1ApiI 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/v1/{appId}/latest`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => DeploymentFromJSON(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/OrgTokensV1Api.ts b/typescript/src/apis/OrgTokensV1Api.ts new file mode 100644 index 0000000..fd21275 --- /dev/null +++ b/typescript/src/apis/OrgTokensV1Api.ts @@ -0,0 +1,235 @@ +/* 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, + CreateOrgToken, + CreatedOrgToken, + ListOrgTokens, +} from '../models'; +import { + ApiErrorFromJSON, + ApiErrorToJSON, + CreateOrgTokenFromJSON, + CreateOrgTokenToJSON, + CreatedOrgTokenFromJSON, + CreatedOrgTokenToJSON, + ListOrgTokensFromJSON, + ListOrgTokensToJSON, +} from '../models'; + +export interface CreateOrgTokenRequest { + orgId: string; + createOrgToken: CreateOrgToken; +} + +export interface GetOrgTokensRequest { + orgId: string; +} + +export interface RevokeOrgTokenRequest { + orgId: string; + orgTokenId: string; +} + +/** + * OrgTokensV1Api - interface + * + * @export + * @interface OrgTokensV1ApiInterface + */ +export interface OrgTokensV1ApiInterface { + /** + * Create a new organization token. + * @param {string} orgId + * @param {CreateOrgToken} createOrgToken + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OrgTokensV1ApiInterface + */ + createOrgTokenRaw(requestParameters: CreateOrgTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Create a new organization token. + */ + createOrgToken(orgId: string, createOrgToken: CreateOrgToken, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * List all organization tokens for a given org. + * @param {string} orgId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OrgTokensV1ApiInterface + */ + getOrgTokensRaw(requestParameters: GetOrgTokensRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * List all organization tokens for a given org. + */ + getOrgTokens(orgId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + + /** + * Revoke an organization token. + * @param {string} orgId + * @param {string} orgTokenId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OrgTokensV1ApiInterface + */ + revokeOrgTokenRaw(requestParameters: RevokeOrgTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Revoke an organization token. + */ + revokeOrgToken(orgId: string, orgTokenId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + +} + +/** + * + */ +export class OrgTokensV1Api extends runtime.BaseAPI implements OrgTokensV1ApiInterface { + + /** + * Create a new organization token. + */ + async createOrgTokenRaw(requestParameters: CreateOrgTokenRequest, 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 createOrgToken.'); + } + + if (requestParameters.createOrgToken === null || requestParameters.createOrgToken === undefined) { + throw new runtime.RequiredError('createOrgToken','Required parameter requestParameters.createOrgToken was null or undefined when calling createOrgToken.'); + } + + 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: `/tokens/v1/orgs/{orgId}/create`.replace(`{${"orgId"}}`, encodeURIComponent(String(requestParameters.orgId))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: CreateOrgTokenToJSON(requestParameters.createOrgToken), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => CreatedOrgTokenFromJSON(jsonValue)); + } + + /** + * Create a new organization token. + */ + async createOrgToken(orgId: string, createOrgToken: CreateOrgToken, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createOrgTokenRaw({ orgId: orgId, createOrgToken: createOrgToken }, initOverrides); + return await response.value(); + } + + /** + * List all organization tokens for a given org. + */ + async getOrgTokensRaw(requestParameters: GetOrgTokensRequest, 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 getOrgTokens.'); + } + + 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: `/tokens/v1/orgs/{orgId}`.replace(`{${"orgId"}}`, encodeURIComponent(String(requestParameters.orgId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ListOrgTokensFromJSON(jsonValue)); + } + + /** + * List all organization tokens for a given org. + */ + async getOrgTokens(orgId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getOrgTokensRaw({ orgId: orgId }, initOverrides); + return await response.value(); + } + + /** + * Revoke an organization token. + */ + async revokeOrgTokenRaw(requestParameters: RevokeOrgTokenRequest, 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 revokeOrgToken.'); + } + + if (requestParameters.orgTokenId === null || requestParameters.orgTokenId === undefined) { + throw new runtime.RequiredError('orgTokenId','Required parameter requestParameters.orgTokenId was null or undefined when calling revokeOrgToken.'); + } + + 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: `/tokens/v1/orgs/{orgId}/tokens/{orgTokenId}/revoke`.replace(`{${"orgId"}}`, encodeURIComponent(String(requestParameters.orgId))).replace(`{${"orgTokenId"}}`, encodeURIComponent(String(requestParameters.orgTokenId))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + if (this.isJsonMime(response.headers.get('content-type'))) { + return new runtime.JSONApiResponse(response); + } else { + return new runtime.TextApiResponse(response) as any; + } + } + + /** + * Revoke an organization token. + */ + async revokeOrgToken(orgId: string, orgTokenId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.revokeOrgTokenRaw({ orgId: orgId, orgTokenId: orgTokenId }, initOverrides); + return await response.value(); + } + +} diff --git a/typescript/src/apis/ProcessesV2Api.ts b/typescript/src/apis/ProcessesV2Api.ts index 10e9c1b..4de591a 100644 --- a/typescript/src/apis/ProcessesV2Api.ts +++ b/typescript/src/apis/ProcessesV2Api.ts @@ -42,6 +42,11 @@ export interface GetProcessInfoRequest { processId: string; } +export interface StopProcessRequest { + appId: string; + processId: string; +} + /** * ProcessesV2Api - interface * @@ -80,6 +85,21 @@ export interface ProcessesV2ApiInterface { */ getProcessInfo(appId: string, processId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + /** + * Stops a [process](https://hathora.dev/docs/concepts/hathora-entities#process) immediately. + * @param {string} appId + * @param {string} processId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProcessesV2ApiInterface + */ + stopProcessRaw(requestParameters: StopProcessRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; + + /** + * Stops a [process](https://hathora.dev/docs/concepts/hathora-entities#process) immediately. + */ + stopProcess(appId: string, processId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; + } /** @@ -175,4 +195,45 @@ export class ProcessesV2Api extends runtime.BaseAPI implements ProcessesV2ApiInt return await response.value(); } + /** + * Stops a [process](https://hathora.dev/docs/concepts/hathora-entities#process) immediately. + */ + async stopProcessRaw(requestParameters: StopProcessRequest, 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 stopProcess.'); + } + + if (requestParameters.processId === null || requestParameters.processId === undefined) { + throw new runtime.RequiredError('processId','Required parameter requestParameters.processId was null or undefined when calling stopProcess.'); + } + + 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}/stop/{processId}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"processId"}}`, encodeURIComponent(String(requestParameters.processId))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * Stops a [process](https://hathora.dev/docs/concepts/hathora-entities#process) immediately. + */ + async stopProcess(appId: string, processId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.stopProcessRaw({ appId: appId, processId: processId }, initOverrides); + } + } diff --git a/typescript/src/apis/index.ts b/typescript/src/apis/index.ts index eb9a9fd..1613850 100644 --- a/typescript/src/apis/index.ts +++ b/typescript/src/apis/index.ts @@ -12,6 +12,7 @@ export * from './LobbyV3Api'; export * from './LogV1Api'; export * from './ManagementV1Api'; export * from './MetricsV1Api'; +export * from './OrgTokensV1Api'; export * from './ProcessesV1Api'; export * from './ProcessesV2Api'; export * from './RoomV1Api'; diff --git a/typescript/src/models/Application.ts b/typescript/src/models/Application.ts index 27a42d2..f34f0c1 100644 --- a/typescript/src/models/Application.ts +++ b/typescript/src/models/Application.ts @@ -27,7 +27,7 @@ import { */ export interface Application { /** - * Email address for the user that deleted the application. + * UserId or email address for the user that deleted the application. * @type {string} * @memberof Application */ @@ -45,13 +45,13 @@ export interface Application { */ createdAt: Date; /** - * Email address for the user that deleted the application. + * UserId or email address for the user that created the application. * @type {string} * @memberof Application */ createdBy: string; /** - * System generated unique identifier for an organization. + * System generated unique identifier for an organization. Not guaranteed to have a specific format. * @type {string} * @memberof Application */ diff --git a/typescript/src/models/ApplicationWithLatestDeploymentAndBuild.ts b/typescript/src/models/ApplicationWithLatestDeploymentAndBuild.ts new file mode 100644 index 0000000..4cc97bc --- /dev/null +++ b/typescript/src/models/ApplicationWithLatestDeploymentAndBuild.ts @@ -0,0 +1,159 @@ +/* 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 { ApplicationWithLatestDeploymentAndBuildAllOfDeployment } from './ApplicationWithLatestDeploymentAndBuildAllOfDeployment'; +import { + ApplicationWithLatestDeploymentAndBuildAllOfDeploymentFromJSON, + ApplicationWithLatestDeploymentAndBuildAllOfDeploymentFromJSONTyped, + ApplicationWithLatestDeploymentAndBuildAllOfDeploymentToJSON, +} from './ApplicationWithLatestDeploymentAndBuildAllOfDeployment'; +import type { AuthConfiguration } from './AuthConfiguration'; +import { + AuthConfigurationFromJSON, + AuthConfigurationFromJSONTyped, + AuthConfigurationToJSON, +} from './AuthConfiguration'; + +/** + * + * @export + * @interface ApplicationWithLatestDeploymentAndBuild + */ +export interface ApplicationWithLatestDeploymentAndBuild { + /** + * UserId or email address for the user that deleted the application. + * @type {string} + * @memberof ApplicationWithLatestDeploymentAndBuild + */ + deletedBy: string | null; + /** + * When the application was deleted. + * @type {Date} + * @memberof ApplicationWithLatestDeploymentAndBuild + */ + deletedAt: Date | null; + /** + * When the application was created. + * @type {Date} + * @memberof ApplicationWithLatestDeploymentAndBuild + */ + createdAt: Date; + /** + * UserId or email address for the user that created the application. + * @type {string} + * @memberof ApplicationWithLatestDeploymentAndBuild + */ + createdBy: string; + /** + * System generated unique identifier for an organization. Not guaranteed to have a specific format. + * @type {string} + * @memberof ApplicationWithLatestDeploymentAndBuild + */ + orgId: string; + /** + * + * @type {AuthConfiguration} + * @memberof ApplicationWithLatestDeploymentAndBuild + */ + authConfiguration: AuthConfiguration; + /** + * Secret that is used for identity and access management. + * @type {string} + * @memberof ApplicationWithLatestDeploymentAndBuild + */ + appSecret: string; + /** + * System generated unique identifier for an application. + * @type {string} + * @memberof ApplicationWithLatestDeploymentAndBuild + */ + appId: string; + /** + * Readable name for an application. Must be unique within an organization. + * @type {string} + * @memberof ApplicationWithLatestDeploymentAndBuild + */ + appName: string; + /** + * + * @type {ApplicationWithLatestDeploymentAndBuildAllOfDeployment} + * @memberof ApplicationWithLatestDeploymentAndBuild + */ + deployment?: ApplicationWithLatestDeploymentAndBuildAllOfDeployment; +} + +/** + * Check if a given object implements the ApplicationWithLatestDeploymentAndBuild interface. + */ +export function instanceOfApplicationWithLatestDeploymentAndBuild(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "deletedBy" in value; + isInstance = isInstance && "deletedAt" in value; + isInstance = isInstance && "createdAt" in value; + isInstance = isInstance && "createdBy" in value; + isInstance = isInstance && "orgId" in value; + isInstance = isInstance && "authConfiguration" in value; + isInstance = isInstance && "appSecret" in value; + isInstance = isInstance && "appId" in value; + isInstance = isInstance && "appName" in value; + + return isInstance; +} + +export function ApplicationWithLatestDeploymentAndBuildFromJSON(json: any): ApplicationWithLatestDeploymentAndBuild { + return ApplicationWithLatestDeploymentAndBuildFromJSONTyped(json, false); +} + +export function ApplicationWithLatestDeploymentAndBuildFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApplicationWithLatestDeploymentAndBuild { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'deletedBy': json['deletedBy'], + 'deletedAt': (json['deletedAt'] === null ? null : new Date(json['deletedAt'])), + 'createdAt': (new Date(json['createdAt'])), + 'createdBy': json['createdBy'], + 'orgId': json['orgId'], + 'authConfiguration': AuthConfigurationFromJSON(json['authConfiguration']), + 'appSecret': json['appSecret'], + 'appId': json['appId'], + 'appName': json['appName'], + 'deployment': !exists(json, 'deployment') ? undefined : ApplicationWithLatestDeploymentAndBuildAllOfDeploymentFromJSON(json['deployment']), + }; +} + +export function ApplicationWithLatestDeploymentAndBuildToJSON(value?: ApplicationWithLatestDeploymentAndBuild | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'deletedBy': value.deletedBy, + 'deletedAt': (value.deletedAt === null ? null : value.deletedAt.toISOString()), + 'createdAt': (value.createdAt.toISOString()), + 'createdBy': value.createdBy, + 'orgId': value.orgId, + 'authConfiguration': AuthConfigurationToJSON(value.authConfiguration), + 'appSecret': value.appSecret, + 'appId': value.appId, + 'appName': value.appName, + 'deployment': ApplicationWithLatestDeploymentAndBuildAllOfDeploymentToJSON(value.deployment), + }; +} + diff --git a/typescript/src/models/ApplicationWithLatestDeploymentAndBuildAllOf.ts b/typescript/src/models/ApplicationWithLatestDeploymentAndBuildAllOf.ts new file mode 100644 index 0000000..bd29b86 --- /dev/null +++ b/typescript/src/models/ApplicationWithLatestDeploymentAndBuildAllOf.ts @@ -0,0 +1,72 @@ +/* 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 { ApplicationWithLatestDeploymentAndBuildAllOfDeployment } from './ApplicationWithLatestDeploymentAndBuildAllOfDeployment'; +import { + ApplicationWithLatestDeploymentAndBuildAllOfDeploymentFromJSON, + ApplicationWithLatestDeploymentAndBuildAllOfDeploymentFromJSONTyped, + ApplicationWithLatestDeploymentAndBuildAllOfDeploymentToJSON, +} from './ApplicationWithLatestDeploymentAndBuildAllOfDeployment'; + +/** + * + * @export + * @interface ApplicationWithLatestDeploymentAndBuildAllOf + */ +export interface ApplicationWithLatestDeploymentAndBuildAllOf { + /** + * + * @type {ApplicationWithLatestDeploymentAndBuildAllOfDeployment} + * @memberof ApplicationWithLatestDeploymentAndBuildAllOf + */ + deployment?: ApplicationWithLatestDeploymentAndBuildAllOfDeployment; +} + +/** + * Check if a given object implements the ApplicationWithLatestDeploymentAndBuildAllOf interface. + */ +export function instanceOfApplicationWithLatestDeploymentAndBuildAllOf(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function ApplicationWithLatestDeploymentAndBuildAllOfFromJSON(json: any): ApplicationWithLatestDeploymentAndBuildAllOf { + return ApplicationWithLatestDeploymentAndBuildAllOfFromJSONTyped(json, false); +} + +export function ApplicationWithLatestDeploymentAndBuildAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApplicationWithLatestDeploymentAndBuildAllOf { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'deployment': !exists(json, 'deployment') ? undefined : ApplicationWithLatestDeploymentAndBuildAllOfDeploymentFromJSON(json['deployment']), + }; +} + +export function ApplicationWithLatestDeploymentAndBuildAllOfToJSON(value?: ApplicationWithLatestDeploymentAndBuildAllOf | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'deployment': ApplicationWithLatestDeploymentAndBuildAllOfDeploymentToJSON(value.deployment), + }; +} + diff --git a/typescript/src/models/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.ts b/typescript/src/models/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.ts new file mode 100644 index 0000000..3dfac98 --- /dev/null +++ b/typescript/src/models/ApplicationWithLatestDeploymentAndBuildAllOfDeployment.ts @@ -0,0 +1,240 @@ +/* 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 { Build } from './Build'; +import { + BuildFromJSON, + BuildFromJSONTyped, + BuildToJSON, +} from './Build'; +import type { ContainerPort } from './ContainerPort'; +import { + ContainerPortFromJSON, + ContainerPortFromJSONTyped, + ContainerPortToJSON, +} from './ContainerPort'; +import type { DeploymentEnvInner } from './DeploymentEnvInner'; +import { + DeploymentEnvInnerFromJSON, + DeploymentEnvInnerFromJSONTyped, + DeploymentEnvInnerToJSON, +} from './DeploymentEnvInner'; +import type { PlanName } from './PlanName'; +import { + PlanNameFromJSON, + PlanNameFromJSONTyped, + PlanNameToJSON, +} from './PlanName'; + +/** + * + * @export + * @interface ApplicationWithLatestDeploymentAndBuildAllOfDeployment + */ +export interface ApplicationWithLatestDeploymentAndBuildAllOfDeployment { + /** + * Option to shut down processes that have had no new connections or rooms + * for five minutes. + * @type {boolean} + * @memberof ApplicationWithLatestDeploymentAndBuildAllOfDeployment + */ + idleTimeoutEnabled?: boolean; + /** + * The environment variable that our process will have access to at runtime. + * @type {Array} + * @memberof ApplicationWithLatestDeploymentAndBuildAllOfDeployment + */ + 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} + * @memberof ApplicationWithLatestDeploymentAndBuildAllOfDeployment + */ + additionalContainerPorts: Array; + /** + * + * @type {ContainerPort} + * @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} + * @memberof ApplicationWithLatestDeploymentAndBuildAllOfDeployment + */ + createdAt: Date; + /** + * UserId or email address for the user that created the deployment. + * @type {string} + * @memberof ApplicationWithLatestDeploymentAndBuildAllOfDeployment + */ + createdBy: string; + /** + * The amount of memory allocated to your process. + * @type {number} + * @memberof ApplicationWithLatestDeploymentAndBuildAllOfDeployment + */ + requestedMemoryMB: number; + /** + * The number of cores allocated to your process. + * @type {number} + * @memberof ApplicationWithLatestDeploymentAndBuildAllOfDeployment + */ + requestedCPU: number; + /** + * System generated id for a deployment. Increments by 1. + * @type {number} + * @memberof ApplicationWithLatestDeploymentAndBuildAllOfDeployment + */ + deploymentId: number; + /** + * System generated id for a build. Increments by 1. + * @type {number} + * @memberof ApplicationWithLatestDeploymentAndBuildAllOfDeployment + */ + buildId: number; + /** + * System generated unique identifier for an application. + * @type {string} + * @memberof ApplicationWithLatestDeploymentAndBuildAllOfDeployment + */ + appId: string; + /** + * + * @type {Build} + * @memberof 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 && "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; + isInstance = isInstance && "requestedCPU" in value; + isInstance = isInstance && "deploymentId" in value; + isInstance = isInstance && "buildId" in value; + isInstance = isInstance && "appId" in value; + isInstance = isInstance && "build" in value; + + return isInstance; +} + +export function ApplicationWithLatestDeploymentAndBuildAllOfDeploymentFromJSON(json: any): ApplicationWithLatestDeploymentAndBuildAllOfDeployment { + return ApplicationWithLatestDeploymentAndBuildAllOfDeploymentFromJSONTyped(json, false); +} + +export function ApplicationWithLatestDeploymentAndBuildAllOfDeploymentFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApplicationWithLatestDeploymentAndBuildAllOfDeployment { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'idleTimeoutEnabled': !exists(json, 'idleTimeoutEnabled') ? undefined : json['idleTimeoutEnabled'], + 'env': ((json['env'] as Array).map(DeploymentEnvInnerFromJSON)), + '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'], + 'requestedCPU': json['requestedCPU'], + 'deploymentId': json['deploymentId'], + 'buildId': json['buildId'], + 'appId': json['appId'], + 'build': BuildFromJSON(json['build']), + }; +} + +export function ApplicationWithLatestDeploymentAndBuildAllOfDeploymentToJSON(value?: ApplicationWithLatestDeploymentAndBuildAllOfDeployment | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'idleTimeoutEnabled': value.idleTimeoutEnabled, + 'env': ((value.env as Array).map(DeploymentEnvInnerToJSON)), + '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, + 'requestedCPU': value.requestedCPU, + 'deploymentId': value.deploymentId, + 'buildId': value.buildId, + 'appId': value.appId, + 'build': BuildToJSON(value.build), + }; +} + diff --git a/typescript/src/models/ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf.ts b/typescript/src/models/ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf.ts new file mode 100644 index 0000000..c0d441b --- /dev/null +++ b/typescript/src/models/ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf.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 { Build } from './Build'; +import { + BuildFromJSON, + BuildFromJSONTyped, + BuildToJSON, +} from './Build'; + +/** + * + * @export + * @interface ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf + */ +export interface ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf { + /** + * + * @type {Build} + * @memberof ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf + */ + build: Build; +} + +/** + * Check if a given object implements the ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf interface. + */ +export function instanceOfApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "build" in value; + + return isInstance; +} + +export function ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOfFromJSON(json: any): ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf { + return ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOfFromJSONTyped(json, false); +} + +export function ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'build': BuildFromJSON(json['build']), + }; +} + +export function ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOfToJSON(value?: ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'build': BuildToJSON(value.build), + }; +} + diff --git a/typescript/src/models/Build.ts b/typescript/src/models/Build.ts index 65a9824..5015435 100644 --- a/typescript/src/models/Build.ts +++ b/typescript/src/models/Build.ts @@ -19,6 +19,12 @@ import { BuildRegionalContainerTagsInnerFromJSONTyped, BuildRegionalContainerTagsInnerToJSON, } from './BuildRegionalContainerTagsInner'; +import type { BuildStatus } from './BuildStatus'; +import { + BuildStatusFromJSON, + BuildStatusFromJSONTyped, + BuildStatusToJSON, +} from './BuildStatus'; /** * A build represents a game server artifact and its associated metadata. @@ -31,7 +37,7 @@ export interface Build { * @type {string} * @memberof Build */ - buildTag: string | null; + buildTag?: string | null; /** * * @type {Array} @@ -46,19 +52,11 @@ export interface Build { */ imageSize: number; /** - * Current status of your build. - * - * `created`: a build was created but not yet run - * - * `running`: the build process is actively executing * - * `succeeded`: the game server artifact was successfully built and stored in the Hathora registries - * - * `failed`: the build process was unsuccessful, most likely due to an error with the `Dockerfile` - * @type {string} + * @type {BuildStatus} * @memberof Build */ - status: BuildStatusEnum; + status: BuildStatus; /** * When the build was deleted. * @type {Date} @@ -84,7 +82,7 @@ export interface Build { */ createdAt: Date; /** - * Email address for the user that created the build. + * UserId or email address for the user that created the build. * @type {string} * @memberof Build */ @@ -103,25 +101,11 @@ export interface Build { appId: string; } - -/** - * @export - */ -export const BuildStatusEnum = { - Created: 'created', - Running: 'running', - Succeeded: 'succeeded', - Failed: 'failed' -} as const; -export type BuildStatusEnum = typeof BuildStatusEnum[keyof typeof BuildStatusEnum]; - - /** * Check if a given object implements the Build interface. */ export function instanceOfBuild(value: object): boolean { let isInstance = true; - isInstance = isInstance && "buildTag" in value; isInstance = isInstance && "regionalContainerTags" in value; isInstance = isInstance && "imageSize" in value; isInstance = isInstance && "status" in value; @@ -146,10 +130,10 @@ export function BuildFromJSONTyped(json: any, ignoreDiscriminator: boolean): Bui } return { - 'buildTag': json['buildTag'], + 'buildTag': !exists(json, 'buildTag') ? undefined : json['buildTag'], 'regionalContainerTags': ((json['regionalContainerTags'] as Array).map(BuildRegionalContainerTagsInnerFromJSON)), 'imageSize': json['imageSize'], - 'status': json['status'], + 'status': BuildStatusFromJSON(json['status']), 'deletedAt': (json['deletedAt'] === null ? null : new Date(json['deletedAt'])), 'finishedAt': (json['finishedAt'] === null ? null : new Date(json['finishedAt'])), 'startedAt': (json['startedAt'] === null ? null : new Date(json['startedAt'])), @@ -172,7 +156,7 @@ export function BuildToJSON(value?: Build | null): any { 'buildTag': value.buildTag, 'regionalContainerTags': ((value.regionalContainerTags as Array).map(BuildRegionalContainerTagsInnerToJSON)), 'imageSize': value.imageSize, - 'status': value.status, + 'status': BuildStatusToJSON(value.status), 'deletedAt': (value.deletedAt === null ? null : value.deletedAt.toISOString()), 'finishedAt': (value.finishedAt === null ? null : value.finishedAt.toISOString()), 'startedAt': (value.startedAt === null ? null : value.startedAt.toISOString()), diff --git a/typescript/src/models/BuildStatus.ts b/typescript/src/models/BuildStatus.ts new file mode 100644 index 0000000..b5697f2 --- /dev/null +++ b/typescript/src/models/BuildStatus.ts @@ -0,0 +1,40 @@ +/* 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 BuildStatus = { + Created: 'created', + Running: 'running', + Succeeded: 'succeeded', + Failed: 'failed' +} as const; +export type BuildStatus = typeof BuildStatus[keyof typeof BuildStatus]; + + +export function BuildStatusFromJSON(json: any): BuildStatus { + return BuildStatusFromJSONTyped(json, false); +} + +export function BuildStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): BuildStatus { + return json as BuildStatus; +} + +export function BuildStatusToJSON(value?: BuildStatus | null): any { + return value as any; +} + diff --git a/typescript/src/models/CreateOrgToken.ts b/typescript/src/models/CreateOrgToken.ts new file mode 100644 index 0000000..b1b0e50 --- /dev/null +++ b/typescript/src/models/CreateOrgToken.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 CreateOrgToken + */ +export interface CreateOrgToken { + /** + * Readable name for a token. Must be unique within an organization. + * @type {string} + * @memberof CreateOrgToken + */ + name: string; +} + +/** + * Check if a given object implements the CreateOrgToken interface. + */ +export function instanceOfCreateOrgToken(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "name" in value; + + return isInstance; +} + +export function CreateOrgTokenFromJSON(json: any): CreateOrgToken { + return CreateOrgTokenFromJSONTyped(json, false); +} + +export function CreateOrgTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateOrgToken { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'name': json['name'], + }; +} + +export function CreateOrgTokenToJSON(value?: CreateOrgToken | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'name': value.name, + }; +} + diff --git a/typescript/src/models/CreatedOrgToken.ts b/typescript/src/models/CreatedOrgToken.ts new file mode 100644 index 0000000..3b049d0 --- /dev/null +++ b/typescript/src/models/CreatedOrgToken.ts @@ -0,0 +1,82 @@ +/* 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 { OrgToken } from './OrgToken'; +import { + OrgTokenFromJSON, + OrgTokenFromJSONTyped, + OrgTokenToJSON, +} from './OrgToken'; + +/** + * + * @export + * @interface CreatedOrgToken + */ +export interface CreatedOrgToken { + /** + * + * @type {string} + * @memberof CreatedOrgToken + */ + plainTextToken: string; + /** + * + * @type {OrgToken} + * @memberof CreatedOrgToken + */ + orgToken: OrgToken; +} + +/** + * Check if a given object implements the CreatedOrgToken interface. + */ +export function instanceOfCreatedOrgToken(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "plainTextToken" in value; + isInstance = isInstance && "orgToken" in value; + + return isInstance; +} + +export function CreatedOrgTokenFromJSON(json: any): CreatedOrgToken { + return CreatedOrgTokenFromJSONTyped(json, false); +} + +export function CreatedOrgTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreatedOrgToken { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'plainTextToken': json['plainTextToken'], + 'orgToken': OrgTokenFromJSON(json['orgToken']), + }; +} + +export function CreatedOrgTokenToJSON(value?: CreatedOrgToken | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'plainTextToken': value.plainTextToken, + 'orgToken': OrgTokenToJSON(value.orgToken), + }; +} + diff --git a/typescript/src/models/Deployment.ts b/typescript/src/models/Deployment.ts index 0d84c6c..9abd106 100644 --- a/typescript/src/models/Deployment.ts +++ b/typescript/src/models/Deployment.ts @@ -38,6 +38,13 @@ import { * @interface Deployment */ export interface Deployment { + /** + * Option to shut down processes that have had no new connections or rooms + * for five minutes. + * @type {boolean} + * @memberof Deployment + */ + idleTimeoutEnabled?: boolean; /** * The environment variable that our process will have access to at runtime. * @type {Array} @@ -89,7 +96,7 @@ export interface Deployment { */ createdAt: Date; /** - * Email address for the user that created the deployment. + * UserId or email address for the user that created the deployment. * @type {string} * @memberof Deployment */ @@ -171,6 +178,7 @@ export function DeploymentFromJSONTyped(json: any, ignoreDiscriminator: boolean) } return { + 'idleTimeoutEnabled': !exists(json, 'idleTimeoutEnabled') ? undefined : json['idleTimeoutEnabled'], 'env': ((json['env'] as Array).map(DeploymentEnvInnerFromJSON)), 'roomsPerProcess': json['roomsPerProcess'], 'planName': PlanNameFromJSON(json['planName']), @@ -197,6 +205,7 @@ export function DeploymentToJSON(value?: Deployment | null): any { } return { + 'idleTimeoutEnabled': value.idleTimeoutEnabled, 'env': ((value.env as Array).map(DeploymentEnvInnerToJSON)), 'roomsPerProcess': value.roomsPerProcess, 'planName': PlanNameToJSON(value.planName), diff --git a/typescript/src/models/DeploymentConfig.ts b/typescript/src/models/DeploymentConfig.ts index 6d20e05..711bf06 100644 --- a/typescript/src/models/DeploymentConfig.ts +++ b/typescript/src/models/DeploymentConfig.ts @@ -44,6 +44,13 @@ import { * @interface DeploymentConfig */ export interface DeploymentConfig { + /** + * Option to shut down processes that have had no new connections or rooms + * for five minutes. + * @type {boolean} + * @memberof DeploymentConfig + */ + idleTimeoutEnabled?: boolean; /** * The environment variable that our process will have access to at runtime. * @type {Array} @@ -106,6 +113,7 @@ export function DeploymentConfigFromJSONTyped(json: any, ignoreDiscriminator: bo } return { + 'idleTimeoutEnabled': !exists(json, 'idleTimeoutEnabled') ? undefined : json['idleTimeoutEnabled'], 'env': ((json['env'] as Array).map(DeploymentEnvInnerFromJSON)), 'roomsPerProcess': json['roomsPerProcess'], 'planName': PlanNameFromJSON(json['planName']), @@ -124,6 +132,7 @@ export function DeploymentConfigToJSON(value?: DeploymentConfig | null): any { } return { + 'idleTimeoutEnabled': value.idleTimeoutEnabled, 'env': ((value.env as Array).map(DeploymentEnvInnerToJSON)), 'roomsPerProcess': value.roomsPerProcess, 'planName': PlanNameToJSON(value.planName), diff --git a/typescript/src/models/Invoice.ts b/typescript/src/models/Invoice.ts index a35d8dc..a53cd78 100644 --- a/typescript/src/models/Invoice.ts +++ b/typescript/src/models/Invoice.ts @@ -13,18 +13,25 @@ */ import { exists, mapValues } from '../runtime'; +import type { InvoiceStatus } from './InvoiceStatus'; +import { + InvoiceStatusFromJSON, + InvoiceStatusFromJSONTyped, + InvoiceStatusToJSON, +} from './InvoiceStatus'; + /** - * Billing types + * * @export * @interface Invoice */ export interface Invoice { /** * - * @type {string} + * @type {InvoiceStatus} * @memberof Invoice */ - status: InvoiceStatusEnum; + status: InvoiceStatus; /** * * @type {number} @@ -63,18 +70,6 @@ export interface Invoice { id: string; } - -/** - * @export - */ -export const InvoiceStatusEnum = { - Pending: 'pending', - Paid: 'paid', - Overdue: 'overdue' -} as const; -export type InvoiceStatusEnum = typeof InvoiceStatusEnum[keyof typeof InvoiceStatusEnum]; - - /** * Check if a given object implements the Invoice interface. */ @@ -101,7 +96,7 @@ export function InvoiceFromJSONTyped(json: any, ignoreDiscriminator: boolean): I } return { - 'status': json['status'], + 'status': InvoiceStatusFromJSON(json['status']), 'amountDue': json['amountDue'], 'pdfUrl': json['pdfUrl'], 'dueDate': (new Date(json['dueDate'])), @@ -120,7 +115,7 @@ export function InvoiceToJSON(value?: Invoice | null): any { } return { - 'status': value.status, + 'status': InvoiceStatusToJSON(value.status), 'amountDue': value.amountDue, 'pdfUrl': value.pdfUrl, 'dueDate': (value.dueDate.toISOString()), diff --git a/typescript/src/models/InvoiceStatus.ts b/typescript/src/models/InvoiceStatus.ts new file mode 100644 index 0000000..f8c9f5f --- /dev/null +++ b/typescript/src/models/InvoiceStatus.ts @@ -0,0 +1,39 @@ +/* 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 InvoiceStatus = { + Pending: 'pending', + Paid: 'paid', + Overdue: 'overdue' +} as const; +export type InvoiceStatus = typeof InvoiceStatus[keyof typeof InvoiceStatus]; + + +export function InvoiceStatusFromJSON(json: any): InvoiceStatus { + return InvoiceStatusFromJSONTyped(json, false); +} + +export function InvoiceStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): InvoiceStatus { + return json as InvoiceStatus; +} + +export function InvoiceStatusToJSON(value?: InvoiceStatus | null): any { + return value as any; +} + diff --git a/typescript/src/models/ListOrgTokens.ts b/typescript/src/models/ListOrgTokens.ts new file mode 100644 index 0000000..ff01fb6 --- /dev/null +++ b/typescript/src/models/ListOrgTokens.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 { OrgToken } from './OrgToken'; +import { + OrgTokenFromJSON, + OrgTokenFromJSONTyped, + OrgTokenToJSON, +} from './OrgToken'; + +/** + * + * @export + * @interface ListOrgTokens + */ +export interface ListOrgTokens { + /** + * + * @type {Array} + * @memberof ListOrgTokens + */ + tokens: Array; +} + +/** + * Check if a given object implements the ListOrgTokens interface. + */ +export function instanceOfListOrgTokens(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "tokens" in value; + + return isInstance; +} + +export function ListOrgTokensFromJSON(json: any): ListOrgTokens { + return ListOrgTokensFromJSONTyped(json, false); +} + +export function ListOrgTokensFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListOrgTokens { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'tokens': ((json['tokens'] as Array).map(OrgTokenFromJSON)), + }; +} + +export function ListOrgTokensToJSON(value?: ListOrgTokens | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'tokens': ((value.tokens as Array).map(OrgTokenToJSON)), + }; +} + diff --git a/typescript/src/models/Lobby.ts b/typescript/src/models/Lobby.ts index c3e9fd1..b65b1d4 100644 --- a/typescript/src/models/Lobby.ts +++ b/typescript/src/models/Lobby.ts @@ -57,7 +57,7 @@ export interface Lobby { */ createdAt: Date; /** - * Email address for the user that created the lobby. + * UserId or email address for the user that created the lobby. * @type {string} * @memberof Lobby */ diff --git a/typescript/src/models/LobbyV3.ts b/typescript/src/models/LobbyV3.ts index 84c6c57..771e218 100644 --- a/typescript/src/models/LobbyV3.ts +++ b/typescript/src/models/LobbyV3.ts @@ -45,7 +45,7 @@ export interface LobbyV3 { */ createdAt: Date; /** - * Email address for the user that created the lobby. + * UserId or email address for the user that created the lobby. * @type {string} * @memberof LobbyV3 */ diff --git a/typescript/src/models/OrgToken.ts b/typescript/src/models/OrgToken.ts new file mode 100644 index 0000000..0d69e40 --- /dev/null +++ b/typescript/src/models/OrgToken.ts @@ -0,0 +1,127 @@ +/* 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 { OrgTokenStatus } from './OrgTokenStatus'; +import { + OrgTokenStatusFromJSON, + OrgTokenStatusFromJSONTyped, + OrgTokenStatusToJSON, +} from './OrgTokenStatus'; + +/** + * + * @export + * @interface OrgToken + */ +export interface OrgToken { + /** + * + * @type {Date} + * @memberof OrgToken + */ + createdAt: Date; + /** + * + * @type {string} + * @memberof OrgToken + */ + createdBy: string; + /** + * + * @type {string} + * @memberof OrgToken + */ + lastFourCharsOfKey: string; + /** + * + * @type {OrgTokenStatus} + * @memberof OrgToken + */ + status: OrgTokenStatus; + /** + * Readable name for a token. Must be unique within an organization. + * @type {string} + * @memberof OrgToken + */ + name: string; + /** + * + * @type {string} + * @memberof OrgToken + */ + orgId: string; + /** + * System generated unique identifier for an organization token. + * @type {string} + * @memberof OrgToken + */ + orgTokenId: string; +} + +/** + * Check if a given object implements the OrgToken interface. + */ +export function instanceOfOrgToken(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "createdAt" in value; + isInstance = isInstance && "createdBy" in value; + isInstance = isInstance && "lastFourCharsOfKey" in value; + isInstance = isInstance && "status" in value; + isInstance = isInstance && "name" in value; + isInstance = isInstance && "orgId" in value; + isInstance = isInstance && "orgTokenId" in value; + + return isInstance; +} + +export function OrgTokenFromJSON(json: any): OrgToken { + return OrgTokenFromJSONTyped(json, false); +} + +export function OrgTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrgToken { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'createdAt': (new Date(json['createdAt'])), + 'createdBy': json['createdBy'], + 'lastFourCharsOfKey': json['lastFourCharsOfKey'], + 'status': OrgTokenStatusFromJSON(json['status']), + 'name': json['name'], + 'orgId': json['orgId'], + 'orgTokenId': json['orgTokenId'], + }; +} + +export function OrgTokenToJSON(value?: OrgToken | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'createdAt': (value.createdAt.toISOString()), + 'createdBy': value.createdBy, + 'lastFourCharsOfKey': value.lastFourCharsOfKey, + 'status': OrgTokenStatusToJSON(value.status), + 'name': value.name, + 'orgId': value.orgId, + 'orgTokenId': value.orgTokenId, + }; +} + diff --git a/typescript/src/models/OrgTokenStatus.ts b/typescript/src/models/OrgTokenStatus.ts new file mode 100644 index 0000000..46d2f59 --- /dev/null +++ b/typescript/src/models/OrgTokenStatus.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 OrgTokenStatus = { + Active: 'active', + Revoked: 'revoked' +} as const; +export type OrgTokenStatus = typeof OrgTokenStatus[keyof typeof OrgTokenStatus]; + + +export function OrgTokenStatusFromJSON(json: any): OrgTokenStatus { + return OrgTokenStatusFromJSONTyped(json, false); +} + +export function OrgTokenStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrgTokenStatus { + return json as OrgTokenStatus; +} + +export function OrgTokenStatusToJSON(value?: OrgTokenStatus | null): any { + return value as any; +} + diff --git a/typescript/src/models/Process.ts b/typescript/src/models/Process.ts index 5e9c8e2..94326f7 100644 --- a/typescript/src/models/Process.ts +++ b/typescript/src/models/Process.ts @@ -132,7 +132,7 @@ export interface Process { * @type {ExposedPort} * @memberof Process */ - exposedPort?: ExposedPort; + exposedPort: ExposedPort | null; /** * * @type {number} @@ -193,6 +193,7 @@ export function instanceOfProcess(value: object): boolean { isInstance = isInstance && "startingAt" in value; isInstance = isInstance && "roomsPerProcess" in value; isInstance = isInstance && "additionalExposedPorts" in value; + isInstance = isInstance && "exposedPort" in value; isInstance = isInstance && "port" in value; isInstance = isInstance && "host" in value; isInstance = isInstance && "region" in value; @@ -228,7 +229,7 @@ export function ProcessFromJSONTyped(json: any, ignoreDiscriminator: boolean): P 'startingAt': (new Date(json['startingAt'])), 'roomsPerProcess': json['roomsPerProcess'], 'additionalExposedPorts': ((json['additionalExposedPorts'] as Array).map(ExposedPortFromJSON)), - 'exposedPort': !exists(json, 'exposedPort') ? undefined : ExposedPortFromJSON(json['exposedPort']), + 'exposedPort': ExposedPortFromJSON(json['exposedPort']), 'port': json['port'], 'host': json['host'], 'region': RegionFromJSON(json['region']), diff --git a/typescript/src/models/ProcessV2.ts b/typescript/src/models/ProcessV2.ts index 2ea19ba..663f736 100644 --- a/typescript/src/models/ProcessV2.ts +++ b/typescript/src/models/ProcessV2.ts @@ -91,7 +91,7 @@ export interface ProcessV2 { * @type {ExposedPort} * @memberof ProcessV2 */ - exposedPort?: ExposedPort; + exposedPort: ExposedPort | null; /** * * @type {Region} @@ -131,6 +131,7 @@ export function instanceOfProcessV2(value: object): boolean { isInstance = isInstance && "createdAt" in value; isInstance = isInstance && "roomsPerProcess" in value; isInstance = isInstance && "additionalExposedPorts" in value; + isInstance = isInstance && "exposedPort" in value; isInstance = isInstance && "region" in value; isInstance = isInstance && "processId" in value; isInstance = isInstance && "deploymentId" in value; @@ -157,7 +158,7 @@ export function ProcessV2FromJSONTyped(json: any, ignoreDiscriminator: boolean): 'createdAt': (new Date(json['createdAt'])), 'roomsPerProcess': json['roomsPerProcess'], 'additionalExposedPorts': ((json['additionalExposedPorts'] as Array).map(ExposedPortFromJSON)), - 'exposedPort': !exists(json, 'exposedPort') ? undefined : ExposedPortFromJSON(json['exposedPort']), + 'exposedPort': ExposedPortFromJSON(json['exposedPort']), 'region': RegionFromJSON(json['region']), 'processId': json['processId'], 'deploymentId': json['deploymentId'], diff --git a/typescript/src/models/ProcessWithRooms.ts b/typescript/src/models/ProcessWithRooms.ts index 6a61644..564e4d7 100644 --- a/typescript/src/models/ProcessWithRooms.ts +++ b/typescript/src/models/ProcessWithRooms.ts @@ -138,7 +138,7 @@ export interface ProcessWithRooms { * @type {ExposedPort} * @memberof ProcessWithRooms */ - exposedPort?: ExposedPort; + exposedPort: ExposedPort | null; /** * * @type {number} @@ -211,6 +211,7 @@ export function instanceOfProcessWithRooms(value: object): boolean { isInstance = isInstance && "startingAt" in value; isInstance = isInstance && "roomsPerProcess" in value; isInstance = isInstance && "additionalExposedPorts" in value; + isInstance = isInstance && "exposedPort" in value; isInstance = isInstance && "port" in value; isInstance = isInstance && "host" in value; isInstance = isInstance && "region" in value; @@ -248,7 +249,7 @@ export function ProcessWithRoomsFromJSONTyped(json: any, ignoreDiscriminator: bo 'startingAt': (new Date(json['startingAt'])), 'roomsPerProcess': json['roomsPerProcess'], 'additionalExposedPorts': ((json['additionalExposedPorts'] as Array).map(ExposedPortFromJSON)), - 'exposedPort': !exists(json, 'exposedPort') ? undefined : ExposedPortFromJSON(json['exposedPort']), + 'exposedPort': ExposedPortFromJSON(json['exposedPort']), 'port': json['port'], 'host': json['host'], 'region': RegionFromJSON(json['region']), diff --git a/typescript/src/models/index.ts b/typescript/src/models/index.ts index eddeb80..365c4b1 100644 --- a/typescript/src/models/index.ts +++ b/typescript/src/models/index.ts @@ -5,12 +5,15 @@ export * from './ActiveConnectionInfo'; export * from './ApiError'; export * from './AppConfig'; export * from './Application'; -export * from './ApplicationWithDeployment'; -export * from './ApplicationWithDeploymentAllOf'; +export * from './ApplicationWithLatestDeploymentAndBuild'; +export * from './ApplicationWithLatestDeploymentAndBuildAllOf'; +export * from './ApplicationWithLatestDeploymentAndBuildAllOfDeployment'; +export * from './ApplicationWithLatestDeploymentAndBuildAllOfDeploymentAllOf'; export * from './AuthConfiguration'; export * from './AuthConfigurationGoogle'; export * from './Build'; export * from './BuildRegionalContainerTagsInner'; +export * from './BuildStatus'; export * from './CardBrand'; export * from './CardPaymentMethod'; export * from './ConnectionInfo'; @@ -19,10 +22,12 @@ export * from './ContainerPort'; export * from './CreateBuildParams'; export * from './CreateLobbyParams'; export * from './CreateLobbyV3Params'; +export * from './CreateOrgToken'; export * from './CreatePrivateLobbyRequest'; export * from './CreateRoomParams'; export * from './CreateRoomResponse'; export * from './CreateRoomResponseAllOf'; +export * from './CreatedOrgToken'; export * from './CustomerPortalUrl'; export * from './Deployment'; export * from './DeploymentConfig'; @@ -30,7 +35,9 @@ export * from './DeploymentEnvInner'; export * from './DiscoveryResponseInner'; export * from './ExposedPort'; export * from './Invoice'; +export * from './InvoiceStatus'; export * from './LinkPaymentMethod'; +export * from './ListOrgTokens'; export * from './Lobby'; export * from './LobbyV3'; export * from './LobbyVisibility'; @@ -39,6 +46,8 @@ export * from './LoginNicknameRequest'; export * from './LoginResponse'; export * from './MetricName'; export * from './MetricValue'; +export * from './OrgToken'; +export * from './OrgTokenStatus'; export * from './PartialCardCardPaymentMethodAchAchPaymentMethodLinkLinkPaymentMethod'; export * from './PickRoomExcludeKeyofRoomAllocations'; export * from './PlanName';