diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 603ef83..4539270 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 7b361cb9-7960-4aa9-aefb-1d3ff2bbe54b management: - docChecksum: 42b2f02d9a957fd022003d721821201e + docChecksum: 4e5d6bf648df8a38de388af5e97cd1a7 docVersion: 0.0.1 - speakeasyVersion: 1.465.0 - generationVersion: 2.486.6 - releaseVersion: 2.13.0 - configChecksum: 439e6ab1fab1704e107a800109d342cd + speakeasyVersion: 1.468.6 + generationVersion: 2.493.13 + releaseVersion: 2.13.1 + configChecksum: 9c6d423eb477a3d92f9fc19469533440 repoURL: https://github.com/hathora/cloud-sdk-java.git repoSubDirectory: . published: true @@ -30,7 +30,6 @@ features: unions: 0.0.6 generatedFiles: - .gitattributes - - CONTRIBUTING.md - USAGE.md - build.gradle - docs/models/errors/ApiError.md @@ -384,6 +383,7 @@ generatedFiles: - docs/models/shared/RescindUserInvite.md - docs/models/shared/Room.md - docs/models/shared/RoomAllocation.md + - docs/models/shared/RoomAllocationData.md - docs/models/shared/RoomConnectionData.md - docs/models/shared/RoomReadyStatus.md - docs/models/shared/RoomStatus.md @@ -936,6 +936,7 @@ generatedFiles: - src/main/java/dev/hathora/cloud_sdk/models/shared/RescindUserInvite.java - src/main/java/dev/hathora/cloud_sdk/models/shared/Room.java - src/main/java/dev/hathora/cloud_sdk/models/shared/RoomAllocation.java + - src/main/java/dev/hathora/cloud_sdk/models/shared/RoomAllocationData.java - src/main/java/dev/hathora/cloud_sdk/models/shared/RoomConnectionData.java - src/main/java/dev/hathora/cloud_sdk/models/shared/RoomReadyStatus.java - src/main/java/dev/hathora/cloud_sdk/models/shared/RoomStatus.java @@ -1002,10 +1003,10 @@ examples: CreateAppV1Deprecated: speakeasy-default-create-app-v1-deprecated: requestBody: - application/json: {"appName": "minecraft"} + application/json: {"appName": "minecraft", "authConfiguration": {}} responses: "201": - application/json: {"appId": "app-af469a92-5b45-4565-b3c4-b79878de67d2", "appName": "minecraft", "appSecret": "secret-6f706e83-0ec1-437a-9a46-7d4281eb2f39", "createdAt": "2023-02-17T14:23:22.535Z", "createdBy": "noreply@hathora.dev", "deletedAt": "2022-04-02T22:47:49.404Z", "deletedBy": "noreply@hathora.dev", "orgId": "org-6f706e83-0ec1-437a-9a46-7d4281eb2f39"} + application/json: {"appId": "app-af469a92-5b45-4565-b3c4-b79878de67d2", "appName": "minecraft", "appSecret": "secret-6f706e83-0ec1-437a-9a46-7d4281eb2f39", "authConfiguration": {}, "createdAt": "2023-02-17T14:23:22.535Z", "createdBy": "noreply@hathora.dev", "deletedAt": "2022-04-02T22:47:49.404Z", "deletedBy": "noreply@hathora.dev", "orgId": "org-6f706e83-0ec1-437a-9a46-7d4281eb2f39"} "401": application/json: {"message": ""} DeleteAppV1Deprecated: @@ -1023,7 +1024,7 @@ examples: appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2" responses: "200": - application/json: {"appId": "app-af469a92-5b45-4565-b3c4-b79878de67d2", "appName": "minecraft", "appSecret": "secret-6f706e83-0ec1-437a-9a46-7d4281eb2f39", "createdAt": "2022-07-24T20:16:34.762Z", "createdBy": "noreply@hathora.dev", "deletedAt": "2024-04-08T13:25:03.801Z", "deletedBy": "noreply@hathora.dev", "orgId": "org-6f706e83-0ec1-437a-9a46-7d4281eb2f39"} + application/json: {"appId": "app-af469a92-5b45-4565-b3c4-b79878de67d2", "appName": "minecraft", "appSecret": "secret-6f706e83-0ec1-437a-9a46-7d4281eb2f39", "authConfiguration": {}, "createdAt": "2022-07-24T20:16:34.762Z", "createdBy": "noreply@hathora.dev", "deletedAt": "2024-04-08T13:25:03.801Z", "deletedBy": "noreply@hathora.dev", "orgId": "org-6f706e83-0ec1-437a-9a46-7d4281eb2f39"} "401": application/json: {"message": ""} GetAppsV1Deprecated: @@ -1039,10 +1040,10 @@ examples: path: appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2" requestBody: - application/json: {"appName": "minecraft"} + application/json: {"appName": "minecraft", "authConfiguration": {}} responses: "200": - application/json: {"appId": "app-af469a92-5b45-4565-b3c4-b79878de67d2", "appName": "minecraft", "appSecret": "secret-6f706e83-0ec1-437a-9a46-7d4281eb2f39", "createdAt": "2022-12-19T03:26:23.125Z", "createdBy": "noreply@hathora.dev", "deletedAt": "2023-06-24T16:26:05.711Z", "deletedBy": "noreply@hathora.dev", "orgId": "org-6f706e83-0ec1-437a-9a46-7d4281eb2f39"} + application/json: {"appId": "app-af469a92-5b45-4565-b3c4-b79878de67d2", "appName": "minecraft", "appSecret": "secret-6f706e83-0ec1-437a-9a46-7d4281eb2f39", "authConfiguration": {}, "createdAt": "2022-12-19T03:26:23.125Z", "createdBy": "noreply@hathora.dev", "deletedAt": "2023-06-24T16:26:05.711Z", "deletedBy": "noreply@hathora.dev", "orgId": "org-6f706e83-0ec1-437a-9a46-7d4281eb2f39"} "401": application/json: {"message": ""} CreateApp: @@ -1051,10 +1052,10 @@ examples: query: orgId: "org-6f706e83-0ec1-437a-9a46-7d4281eb2f39" requestBody: - application/json: {"appName": "minecraft"} + application/json: {"appName": "minecraft", "authConfiguration": {}} responses: "201": - application/json: {"appId": "app-af469a92-5b45-4565-b3c4-b79878de67d2", "appName": "minecraft", "appSecret": "secret-6f706e83-0ec1-437a-9a46-7d4281eb2f39", "createdAt": "2024-03-25T14:27:17.124Z", "createdBy": "noreply@hathora.dev", "deletedAt": "2022-12-21T05:01:10.685Z", "deletedBy": "noreply@hathora.dev", "orgId": "org-6f706e83-0ec1-437a-9a46-7d4281eb2f39"} + application/json: {"appId": "app-af469a92-5b45-4565-b3c4-b79878de67d2", "appName": "minecraft", "appSecret": "secret-6f706e83-0ec1-437a-9a46-7d4281eb2f39", "authConfiguration": {}, "createdAt": "2024-03-25T14:27:17.124Z", "createdBy": "noreply@hathora.dev", "deletedAt": "2022-12-21T05:01:10.685Z", "deletedBy": "noreply@hathora.dev", "orgId": "org-6f706e83-0ec1-437a-9a46-7d4281eb2f39"} "401": application/json: {"message": ""} DeleteApp: @@ -1072,7 +1073,7 @@ examples: appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2" responses: "200": - application/json: {"appId": "app-af469a92-5b45-4565-b3c4-b79878de67d2", "appName": "minecraft", "appSecret": "secret-6f706e83-0ec1-437a-9a46-7d4281eb2f39", "createdAt": "2023-02-18T07:51:03.251Z", "createdBy": "noreply@hathora.dev", "deletedAt": "2023-09-09T14:12:49.427Z", "deletedBy": "noreply@hathora.dev", "orgId": "org-6f706e83-0ec1-437a-9a46-7d4281eb2f39"} + application/json: {"appId": "app-af469a92-5b45-4565-b3c4-b79878de67d2", "appName": "minecraft", "appSecret": "secret-6f706e83-0ec1-437a-9a46-7d4281eb2f39", "authConfiguration": {}, "createdAt": "2023-02-18T07:51:03.251Z", "createdBy": "noreply@hathora.dev", "deletedAt": "2023-09-09T14:12:49.427Z", "deletedBy": "noreply@hathora.dev", "orgId": "org-6f706e83-0ec1-437a-9a46-7d4281eb2f39"} "401": application/json: {"message": ""} GetApps: @@ -1091,10 +1092,10 @@ examples: path: appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2" requestBody: - application/json: {"appName": "minecraft"} + application/json: {"appName": "minecraft", "authConfiguration": {}} responses: "200": - application/json: {"appId": "app-af469a92-5b45-4565-b3c4-b79878de67d2", "appName": "minecraft", "appSecret": "secret-6f706e83-0ec1-437a-9a46-7d4281eb2f39", "createdAt": "2022-08-09T16:09:30.566Z", "createdBy": "noreply@hathora.dev", "deletedAt": "2022-06-04T01:44:27.157Z", "deletedBy": "noreply@hathora.dev", "orgId": "org-6f706e83-0ec1-437a-9a46-7d4281eb2f39"} + application/json: {"appId": "app-af469a92-5b45-4565-b3c4-b79878de67d2", "appName": "minecraft", "appSecret": "secret-6f706e83-0ec1-437a-9a46-7d4281eb2f39", "authConfiguration": {}, "createdAt": "2022-08-09T16:09:30.566Z", "createdBy": "noreply@hathora.dev", "deletedAt": "2022-06-04T01:44:27.157Z", "deletedBy": "noreply@hathora.dev", "orgId": "org-6f706e83-0ec1-437a-9a46-7d4281eb2f39"} "401": application/json: {"message": ""} LoginAnonymous: @@ -1320,10 +1321,13 @@ examples: path: buildId: 1 appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2" + requestBody: + multipart/form-data: {} responses: "400": application/json: {"message": ""} - "200": {} + "200": + application/octet-stream: "x-file: example.file" CreateBuild: speakeasy-default-create-build: parameters: @@ -1380,7 +1384,8 @@ examples: responses: "400": application/json: {"message": ""} - "200": {} + "200": + application/octet-stream: "x-file: example.file" CreateDeploymentV1Deprecated: speakeasy-default-create-deployment-v1-deprecated: parameters: @@ -1705,7 +1710,8 @@ examples: responses: "400": application/json: {"message": ""} - "200": {} + "200": + application/octet-stream: "x-file: example.file" GetLogsForApp: speakeasy-default-get-logs-for-app: parameters: @@ -1740,7 +1746,8 @@ examples: responses: "400": application/json: {"message": ""} - "200": {} + "200": + application/octet-stream: "x-file: example.file" SendVerificationEmail: speakeasy-default-send-verification-email: requestBody: @@ -2014,7 +2021,7 @@ examples: appId: "app-af469a92-5b45-4565-b3c4-b79878de67d2" responses: "200": - application/json: {"host": "functional-bran.org", "port": "963.07", "roomId": "2swovpy1fnunu", "status": "active", "transportType": "udp"} + application/json: {"host": "functional-bran.org", "port": 963.07, "roomId": "2swovpy1fnunu", "status": "active", "transportType": "udp"} "400": application/json: {"message": ""} GetInactiveRoomsForProcessDeprecated: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index c2f4311..bb2260b 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,21 +1,21 @@ -speakeasyVersion: 1.465.0 +speakeasyVersion: 1.468.6 sources: java-source: sourceNamespace: java-source - sourceRevisionDigest: sha256:41ac8939fc7a1a5a6e938dd99c360bac2cb95a987aabbb356943de6d66e0912a - sourceBlobDigest: sha256:46ad59e03eb03392e0c897c123ed61adc2d9b22c09952ffe527e4ee3c110632e + sourceRevisionDigest: sha256:8637e8caf0bcb0f1128f202849f6b61761b5c9980d18cb77bf6d8c2c5b7d60d2 + sourceBlobDigest: sha256:0a75c4ea5159b6dd0d815330508a44ddc774265735768cf4849b2ebc345e47c9 tags: - latest - - speakeasy-sdk-regen-1736294866 + - speakeasy-sdk-regen-1736899644 - 0.0.1 targets: hathora-java: source: java-source sourceNamespace: java-source - sourceRevisionDigest: sha256:41ac8939fc7a1a5a6e938dd99c360bac2cb95a987aabbb356943de6d66e0912a - sourceBlobDigest: sha256:46ad59e03eb03392e0c897c123ed61adc2d9b22c09952ffe527e4ee3c110632e + sourceRevisionDigest: sha256:8637e8caf0bcb0f1128f202849f6b61761b5c9980d18cb77bf6d8c2c5b7d60d2 + sourceBlobDigest: sha256:0a75c4ea5159b6dd0d815330508a44ddc774265735768cf4849b2ebc345e47c9 codeSamplesNamespace: code-samples-java-hathora-java - codeSamplesRevisionDigest: sha256:99adf7dcd87d4b3d7e4d7589624865a6c13899a353d73501be8eadca42f25aac + codeSamplesRevisionDigest: sha256:6b48d902bad7a5ceb636bac48bbeea3ef9f2c1a6cd06fd6855cdd930d8112d84 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 1fd0a06..77db8d9 100755 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ The samples below show how a published SDK artifact is used: Gradle: ```groovy -implementation 'dev.hathora:cloud-sdk:2.13.0' +implementation 'dev.hathora:cloud-sdk:2.13.1' ``` Maven: @@ -44,7 +44,7 @@ Maven: dev.hathora cloud-sdk - 2.13.0 + 2.13.1 ``` diff --git a/RELEASES.md b/RELEASES.md index 4ec3466..1c86316 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -899,4 +899,14 @@ Based on: ### Generated - [java v2.13.0] . ### Releases -- [Maven Central v2.13.0] https://central.sonatype.com/artifact/dev.hathora/cloud-sdk/2.13.0 - . \ No newline at end of file +- [Maven Central v2.13.0] https://central.sonatype.com/artifact/dev.hathora/cloud-sdk/2.13.0 - . + +## 2025-01-15 00:07:08 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.468.6 (2.493.13) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v2.13.1] . +### Releases +- [Maven Central v2.13.1] https://central.sonatype.com/artifact/dev.hathora/cloud-sdk/2.13.1 - . \ No newline at end of file diff --git a/build.gradle b/build.gradle index a73bf59..5f6c72b 100644 --- a/build.gradle +++ b/build.gradle @@ -63,7 +63,7 @@ tasks.withType(Javadoc) { } group = "dev.hathora" -version = "2.13.0" +version = "2.13.1" sourcesJar { archiveBaseName = "cloud-sdk" @@ -101,7 +101,7 @@ publishing { maven(MavenPublication) { groupId = 'dev.hathora' artifactId = 'cloud-sdk' - version = '2.13.0' + version = '2.13.1' from components.java diff --git a/codeSamples.yaml b/codeSamples.yaml index 16d958c..6406716 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -98,7 +98,7 @@ actions: "x-codeSamples": - "lang": "java" "label": "CreateBuild" - "source": "package hello.world;\n\nimport dev.hathora.cloud_sdk.HathoraCloud;\nimport dev.hathora.cloud_sdk.models.errors.ApiError;\nimport dev.hathora.cloud_sdk.models.operations.CreateBuildResponse;\nimport dev.hathora.cloud_sdk.models.shared.CreateMultipartBuildParams;\nimport dev.hathora.cloud_sdk.models.shared.Security;\nimport java.lang.Exception;\n\npublic class Application {\n\n public static void main(String[] args) throws ApiError, Exception {\n\n HathoraCloud sdk = HathoraCloud.builder()\n .security(Security.builder()\n .hathoraDevToken(\"\")\n .build())\n .orgId(\"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\")\n .appId(\"app-af469a92-5b45-4565-b3c4-b79878de67d2\")\n .build();\n\n CreateBuildResponse res = sdk.buildsV3().createBuild()\n .orgId(\"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\")\n .createMultipartBuildParams(CreateMultipartBuildParams.builder()\n .buildSizeInBytes(5387.84d)\n .buildId(\"bld-6d4c6a71-2d75-4b42-94e1-f312f57f33c5\")\n .buildTag(\"0.1.14-14c793\")\n .build())\n .call();\n\n if (res.createdBuildV3WithMultipartUrls().isPresent()) {\n // handle response\n }\n }\n}" + "source": "package hello.world;\n\nimport dev.hathora.cloud_sdk.HathoraCloud;\nimport dev.hathora.cloud_sdk.models.errors.ApiError;\nimport dev.hathora.cloud_sdk.models.operations.CreateBuildResponse;\nimport dev.hathora.cloud_sdk.models.shared.CreateMultipartBuildParams;\nimport dev.hathora.cloud_sdk.models.shared.Security;\nimport java.lang.Exception;\n\npublic class Application {\n\n public static void main(String[] args) throws ApiError, Exception {\n\n HathoraCloud sdk = HathoraCloud.builder()\n .security(Security.builder()\n .hathoraDevToken(\"\")\n .build())\n .orgId(\"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\")\n .appId(\"app-af469a92-5b45-4565-b3c4-b79878de67d2\")\n .build();\n\n CreateBuildResponse res = sdk.buildsV3().createBuild()\n .orgId(\"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\")\n .createMultipartBuildParams(CreateMultipartBuildParams.builder()\n .buildSizeInBytes(5387.85d)\n .buildId(\"bld-6d4c6a71-2d75-4b42-94e1-f312f57f33c5\")\n .buildTag(\"0.1.14-14c793\")\n .build())\n .call();\n\n if (res.createdBuildV3WithMultipartUrls().isPresent()) {\n // handle response\n }\n }\n}" - target: $["paths"]["/builds/v3/builds/{buildId}"]["delete"] update: "x-codeSamples": @@ -128,7 +128,7 @@ actions: "x-codeSamples": - "lang": "java" "label": "CreateDeployment" - "source": "package hello.world;\n\nimport dev.hathora.cloud_sdk.HathoraCloud;\nimport dev.hathora.cloud_sdk.models.errors.ApiError;\nimport dev.hathora.cloud_sdk.models.operations.CreateDeploymentResponse;\nimport dev.hathora.cloud_sdk.models.shared.ContainerPort;\nimport dev.hathora.cloud_sdk.models.shared.DeploymentConfigV3;\nimport dev.hathora.cloud_sdk.models.shared.DeploymentConfigV3Env;\nimport dev.hathora.cloud_sdk.models.shared.Security;\nimport dev.hathora.cloud_sdk.models.shared.TransportType;\nimport java.lang.Exception;\nimport java.util.List;\n\npublic class Application {\n\n public static void main(String[] args) throws ApiError, Exception {\n\n HathoraCloud sdk = HathoraCloud.builder()\n .security(Security.builder()\n .hathoraDevToken(\"\")\n .build())\n .orgId(\"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\")\n .appId(\"app-af469a92-5b45-4565-b3c4-b79878de67d2\")\n .build();\n\n CreateDeploymentResponse res = sdk.deploymentsV3().createDeployment()\n .appId(\"app-af469a92-5b45-4565-b3c4-b79878de67d2\")\n .deploymentConfigV3(DeploymentConfigV3.builder()\n .idleTimeoutEnabled(false)\n .env(List.of(\n DeploymentConfigV3Env.builder()\n .value(\"TRUE\")\n .name(\"EULA\")\n .build()))\n .roomsPerProcess(3)\n .transportType(TransportType.TCP)\n .containerPort(4000)\n .requestedMemoryMB(1024d)\n .requestedCPU(0.5d)\n .buildId(\"bld-6d4c6a71-2d75-4b42-94e1-f312f57f33c5\")\n .deploymentTag(\"alpha\")\n .additionalContainerPorts(List.of(\n ContainerPort.builder()\n .transportType(TransportType.UDP)\n .port(8000)\n .name(\"default\")\n .build()))\n .build())\n .call();\n\n if (res.deploymentV3().isPresent()) {\n // handle response\n }\n }\n}" + "source": "package hello.world;\n\nimport dev.hathora.cloud_sdk.HathoraCloud;\nimport dev.hathora.cloud_sdk.models.errors.ApiError;\nimport dev.hathora.cloud_sdk.models.operations.CreateDeploymentResponse;\nimport dev.hathora.cloud_sdk.models.shared.DeploymentConfigV3;\nimport dev.hathora.cloud_sdk.models.shared.Security;\nimport dev.hathora.cloud_sdk.models.shared.TransportType;\nimport java.lang.Exception;\nimport java.util.List;\n\npublic class Application {\n\n public static void main(String[] args) throws ApiError, Exception {\n\n HathoraCloud sdk = HathoraCloud.builder()\n .security(Security.builder()\n .hathoraDevToken(\"\")\n .build())\n .orgId(\"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\")\n .appId(\"app-af469a92-5b45-4565-b3c4-b79878de67d2\")\n .build();\n\n CreateDeploymentResponse res = sdk.deploymentsV3().createDeployment()\n .appId(\"app-af469a92-5b45-4565-b3c4-b79878de67d2\")\n .deploymentConfigV3(DeploymentConfigV3.builder()\n .idleTimeoutEnabled(false)\n .env(List.of(\n ))\n .roomsPerProcess(3)\n .transportType(TransportType.TCP)\n .containerPort(4000)\n .requestedMemoryMB(1024d)\n .requestedCPU(0.5d)\n .buildId(\"bld-6d4c6a71-2d75-4b42-94e1-f312f57f33c5\")\n .deploymentTag(\"alpha\")\n .additionalContainerPorts(List.of(\n ))\n .experimentalRequestedGPU(1d)\n .build())\n .call();\n\n if (res.deploymentV3().isPresent()) {\n // handle response\n }\n }\n}" - target: $["paths"]["/deployments/v3/apps/{appId}/deployments/latest"]["get"] update: "x-codeSamples": @@ -350,7 +350,7 @@ actions: "x-codeSamples": - "lang": "java" "label": "ResumeRoom" - "source": "package hello.world;\n\nimport dev.hathora.cloud_sdk.HathoraCloud;\nimport dev.hathora.cloud_sdk.models.errors.ApiError;\nimport dev.hathora.cloud_sdk.models.operations.ResumeRoomResponse;\nimport dev.hathora.cloud_sdk.models.shared.Security;\nimport java.lang.Exception;\n\npublic class Application {\n\n public static void main(String[] args) throws ApiError, Exception {\n\n HathoraCloud sdk = HathoraCloud.builder()\n .security(Security.builder()\n .hathoraDevToken(\"\")\n .build())\n .orgId(\"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\")\n .appId(\"app-af469a92-5b45-4565-b3c4-b79878de67d2\")\n .build();\n\n ResumeRoomResponse res = sdk.roomsV2().resumeRoom()\n .appId(\"app-af469a92-5b45-4565-b3c4-b79878de67d2\")\n .roomId(\"2swovpy1fnunu\")\n .call();\n\n if (res.connectionInfoV2().isPresent()) {\n // handle response\n }\n }\n}" + "source": "package hello.world;\n\nimport dev.hathora.cloud_sdk.HathoraCloud;\nimport dev.hathora.cloud_sdk.models.errors.ApiError;\nimport dev.hathora.cloud_sdk.models.operations.ResumeRoomResponse;\nimport dev.hathora.cloud_sdk.models.shared.Security;\nimport java.lang.Exception;\n\npublic class Application {\n\n public static void main(String[] args) throws ApiError, Exception {\n\n HathoraCloud sdk = HathoraCloud.builder()\n .security(Security.builder()\n .hathoraDevToken(\"\")\n .build())\n .orgId(\"org-6f706e83-0ec1-437a-9a46-7d4281eb2f39\")\n .appId(\"app-af469a92-5b45-4565-b3c4-b79878de67d2\")\n .build();\n\n ResumeRoomResponse res = sdk.roomsV2().resumeRoom()\n .appId(\"app-af469a92-5b45-4565-b3c4-b79878de67d2\")\n .roomId(\"2swovpy1fnunu\")\n .call();\n\n if (res.roomAllocationData().isPresent()) {\n // handle response\n }\n }\n}" - target: $["paths"]["/rooms/v2/{appId}/update/{roomId}"]["post"] update: "x-codeSamples": diff --git a/docs/models/operations/ResumeRoomResponse.md b/docs/models/operations/ResumeRoomResponse.md index 7aa04f2..f444438 100644 --- a/docs/models/operations/ResumeRoomResponse.md +++ b/docs/models/operations/ResumeRoomResponse.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | -| `connectionInfoV2` | [Optional\](../../models/shared/ConnectionInfoV2.md) | :heavy_minus_sign: | Ok | | `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `roomAllocationData` | [Optional\](../../models/shared/RoomAllocationData.md) | :heavy_minus_sign: | Ok | | `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/shared/Deployment.md b/docs/models/shared/Deployment.md index a3cff45..53edf82 100644 --- a/docs/models/shared/Deployment.md +++ b/docs/models/shared/Deployment.md @@ -3,20 +3,21 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `additionalContainerPorts` | List\<[ContainerPort](../../models/shared/ContainerPort.md)> | :heavy_check_mark: | Additional ports your server listens on. | {
"transportType": "tcp",
"port": 4000,
"name": "debug"
} | -| `appId` | *String* | :heavy_check_mark: | System generated unique identifier for an application. | app-af469a92-5b45-4565-b3c4-b79878de67d2 | -| `build` | [BuildV3](../../models/shared/BuildV3.md) | :heavy_check_mark: | A build represents a game server artifact and its associated metadata. | | -| `buildId` | *String* | :heavy_check_mark: | System generated id for a build. Can also be user defined when creating a build. | bld-6d4c6a71-2d75-4b42-94e1-f312f57f33c5 | -| `buildTag` | *Optional\* | :heavy_minus_sign: | Tag to associate an external version with a build. It is accessible via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV2/operation/GetBuildInfo). | 0.1.14-14c793 | -| `createdAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | When the deployment was created. | | -| `createdBy` | *String* | :heavy_check_mark: | N/A | noreply@hathora.dev | -| `defaultContainerPort` | [ContainerPort](../../models/shared/ContainerPort.md) | :heavy_check_mark: | A container port object represents the transport configruations for how your server will listen. | | -| `deploymentId` | *String* | :heavy_check_mark: | System generated id for a deployment. | dep-6d4c6a71-2d75-4b42-94e1-f312f57f33c5 | -| `deploymentTag` | *Optional\* | :heavy_minus_sign: | Arbitrary metadata associated with a deployment. | alpha | -| `env` | List\<[ApplicationWithLatestDeploymentAndBuildEnv](../../models/shared/ApplicationWithLatestDeploymentAndBuildEnv.md)> | :heavy_check_mark: | The environment variable that our process will have access to at runtime. | | -| `idleTimeoutEnabled` | *boolean* | :heavy_check_mark: | Option to shut down processes that have had no new connections or rooms
for five minutes. | | -| `requestedCPU` | *double* | :heavy_check_mark: | The number of cores allocated to your process. | 0.5 | -| `requestedMemoryMB` | *double* | :heavy_check_mark: | The amount of memory allocated to your process. By default, this is capped
at 8192 MB, but can be increased further on the Enterprise tier. | 1024 | -| `roomsPerProcess` | *int* | :heavy_check_mark: | Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. | 3 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `additionalContainerPorts` | List\<[ContainerPort](../../models/shared/ContainerPort.md)> | :heavy_check_mark: | Additional ports your server listens on. | {
"transportType": "tcp",
"port": 4000,
"name": "debug"
} | +| `appId` | *String* | :heavy_check_mark: | System generated unique identifier for an application. | app-af469a92-5b45-4565-b3c4-b79878de67d2 | +| `build` | [BuildV3](../../models/shared/BuildV3.md) | :heavy_check_mark: | A build represents a game server artifact and its associated metadata. | | +| `buildId` | *String* | :heavy_check_mark: | System generated id for a build. Can also be user defined when creating a build. | bld-6d4c6a71-2d75-4b42-94e1-f312f57f33c5 | +| `buildTag` | *Optional\* | :heavy_minus_sign: | Tag to associate an external version with a build. It is accessible via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV2/operation/GetBuildInfo). | 0.1.14-14c793 | +| `createdAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | When the deployment was created. | | +| `createdBy` | *String* | :heavy_check_mark: | N/A | noreply@hathora.dev | +| `defaultContainerPort` | [ContainerPort](../../models/shared/ContainerPort.md) | :heavy_check_mark: | A container port object represents the transport configruations for how your server will listen. | | +| `deploymentId` | *String* | :heavy_check_mark: | System generated id for a deployment. | dep-6d4c6a71-2d75-4b42-94e1-f312f57f33c5 | +| `deploymentTag` | *Optional\* | :heavy_minus_sign: | Arbitrary metadata associated with a deployment. | alpha | +| `env` | List\<[ApplicationWithLatestDeploymentAndBuildEnv](../../models/shared/ApplicationWithLatestDeploymentAndBuildEnv.md)> | :heavy_check_mark: | The environment variable that our process will have access to at runtime. | | +| `experimentalRequestedGPU` | *Optional\* | :heavy_minus_sign: | EXPERIMENTAL - this feature is in closed beta.
The number of GPUs allocated to your process. Must be an integer.
If not provided, the requested GPU is 0. | 1 | +| `idleTimeoutEnabled` | *boolean* | :heavy_check_mark: | Option to shut down processes that have had no new connections or rooms
for five minutes. | | +| `requestedCPU` | *double* | :heavy_check_mark: | The number of cores allocated to your process. | 0.5 | +| `requestedMemoryMB` | *double* | :heavy_check_mark: | The amount of memory allocated to your process. By default, this is capped
at 8192 MB, but can be increased further on the Enterprise tier. | 1024 | +| `roomsPerProcess` | *int* | :heavy_check_mark: | Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. | 3 | \ No newline at end of file diff --git a/docs/models/shared/DeploymentConfigV3.md b/docs/models/shared/DeploymentConfigV3.md index 3505e13..1c6607d 100644 --- a/docs/models/shared/DeploymentConfigV3.md +++ b/docs/models/shared/DeploymentConfigV3.md @@ -3,15 +3,16 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| `additionalContainerPorts` | List\<[ContainerPort](../../models/shared/ContainerPort.md)> | :heavy_minus_sign: | Additional ports your server listens on. | | -| `buildId` | *String* | :heavy_check_mark: | System generated id for a build. Can also be user defined when creating a build. | bld-6d4c6a71-2d75-4b42-94e1-f312f57f33c5 | -| `containerPort` | *int* | :heavy_check_mark: | Default port the server listens on. | 4000 | -| `deploymentTag` | *Optional\* | :heavy_minus_sign: | Arbitrary metadata associated with a deployment. | alpha | -| `env` | List\<[DeploymentConfigV3Env](../../models/shared/DeploymentConfigV3Env.md)> | :heavy_check_mark: | The environment variable that our process will have access to at runtime. | | -| `idleTimeoutEnabled` | *boolean* | :heavy_check_mark: | Option to shut down processes that have had no new connections or rooms
for five minutes. | | -| `requestedCPU` | *double* | :heavy_check_mark: | The number of cores allocated to your process. | 0.5 | -| `requestedMemoryMB` | *double* | :heavy_check_mark: | The amount of memory allocated to your process. | 1024 | -| `roomsPerProcess` | *int* | :heavy_check_mark: | Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. | 3 | -| `transportType` | [TransportType](../../models/shared/TransportType.md) | :heavy_check_mark: | Transport type specifies the underlying communication protocol to the exposed port. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `additionalContainerPorts` | List\<[ContainerPort](../../models/shared/ContainerPort.md)> | :heavy_minus_sign: | Additional ports your server listens on. | | +| `buildId` | *String* | :heavy_check_mark: | System generated id for a build. Can also be user defined when creating a build. | bld-6d4c6a71-2d75-4b42-94e1-f312f57f33c5 | +| `containerPort` | *int* | :heavy_check_mark: | Default port the server listens on. | 4000 | +| `deploymentTag` | *Optional\* | :heavy_minus_sign: | Arbitrary metadata associated with a deployment. | alpha | +| `env` | List\<[DeploymentConfigV3Env](../../models/shared/DeploymentConfigV3Env.md)> | :heavy_check_mark: | The environment variable that our process will have access to at runtime. | | +| `experimentalRequestedGPU` | *Optional\* | :heavy_minus_sign: | EXPERIMENTAL - this feature is in closed beta.
The number of GPUs allocated to your process. Must be an integer.
If not provided, the requested GPU is 0. | 1 | +| `idleTimeoutEnabled` | *boolean* | :heavy_check_mark: | Option to shut down processes that have had no new connections or rooms
for five minutes. | | +| `requestedCPU` | *double* | :heavy_check_mark: | The number of cores allocated to your process. | 0.5 | +| `requestedMemoryMB` | *double* | :heavy_check_mark: | The amount of memory allocated to your process. | 1024 | +| `roomsPerProcess` | *int* | :heavy_check_mark: | Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. | 3 | +| `transportType` | [TransportType](../../models/shared/TransportType.md) | :heavy_check_mark: | Transport type specifies the underlying communication protocol to the exposed port. | | \ No newline at end of file diff --git a/docs/models/shared/DeploymentV3.md b/docs/models/shared/DeploymentV3.md index a2f32e2..a462008 100644 --- a/docs/models/shared/DeploymentV3.md +++ b/docs/models/shared/DeploymentV3.md @@ -3,19 +3,20 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `additionalContainerPorts` | List\<[ContainerPort](../../models/shared/ContainerPort.md)> | :heavy_check_mark: | Additional ports your server listens on. | {
"transportType": "tcp",
"port": 4000,
"name": "debug"
} | -| `appId` | *String* | :heavy_check_mark: | System generated unique identifier for an application. | app-af469a92-5b45-4565-b3c4-b79878de67d2 | -| `buildId` | *String* | :heavy_check_mark: | System generated id for a build. Can also be user defined when creating a build. | bld-6d4c6a71-2d75-4b42-94e1-f312f57f33c5 | -| `buildTag` | *Optional\* | :heavy_minus_sign: | Tag to associate an external version with a build. It is accessible via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV2/operation/GetBuildInfo). | 0.1.14-14c793 | -| `createdAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | When the deployment was created. | | -| `createdBy` | *String* | :heavy_check_mark: | N/A | noreply@hathora.dev | -| `defaultContainerPort` | [ContainerPort](../../models/shared/ContainerPort.md) | :heavy_check_mark: | A container port object represents the transport configruations for how your server will listen. | | -| `deploymentId` | *String* | :heavy_check_mark: | System generated id for a deployment. | dep-6d4c6a71-2d75-4b42-94e1-f312f57f33c5 | -| `deploymentTag` | *Optional\* | :heavy_minus_sign: | Arbitrary metadata associated with a deployment. | alpha | -| `env` | List\<[DeploymentV3Env](../../models/shared/DeploymentV3Env.md)> | :heavy_check_mark: | The environment variable that our process will have access to at runtime. | | -| `idleTimeoutEnabled` | *boolean* | :heavy_check_mark: | Option to shut down processes that have had no new connections or rooms
for five minutes. | | -| `requestedCPU` | *double* | :heavy_check_mark: | The number of cores allocated to your process. | 0.5 | -| `requestedMemoryMB` | *double* | :heavy_check_mark: | The amount of memory allocated to your process. By default, this is capped
at 8192 MB, but can be increased further on the Enterprise tier. | 1024 | -| `roomsPerProcess` | *int* | :heavy_check_mark: | Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. | 3 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `additionalContainerPorts` | List\<[ContainerPort](../../models/shared/ContainerPort.md)> | :heavy_check_mark: | Additional ports your server listens on. | {
"transportType": "tcp",
"port": 4000,
"name": "debug"
} | +| `appId` | *String* | :heavy_check_mark: | System generated unique identifier for an application. | app-af469a92-5b45-4565-b3c4-b79878de67d2 | +| `buildId` | *String* | :heavy_check_mark: | System generated id for a build. Can also be user defined when creating a build. | bld-6d4c6a71-2d75-4b42-94e1-f312f57f33c5 | +| `buildTag` | *Optional\* | :heavy_minus_sign: | Tag to associate an external version with a build. It is accessible via [`GetBuildInfo()`](https://hathora.dev/api#tag/BuildV2/operation/GetBuildInfo). | 0.1.14-14c793 | +| `createdAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | When the deployment was created. | | +| `createdBy` | *String* | :heavy_check_mark: | N/A | noreply@hathora.dev | +| `defaultContainerPort` | [ContainerPort](../../models/shared/ContainerPort.md) | :heavy_check_mark: | A container port object represents the transport configruations for how your server will listen. | | +| `deploymentId` | *String* | :heavy_check_mark: | System generated id for a deployment. | dep-6d4c6a71-2d75-4b42-94e1-f312f57f33c5 | +| `deploymentTag` | *Optional\* | :heavy_minus_sign: | Arbitrary metadata associated with a deployment. | alpha | +| `env` | List\<[DeploymentV3Env](../../models/shared/DeploymentV3Env.md)> | :heavy_check_mark: | The environment variable that our process will have access to at runtime. | | +| `experimentalRequestedGPU` | *Optional\* | :heavy_minus_sign: | EXPERIMENTAL - this feature is in closed beta.
The number of GPUs allocated to your process. Must be an integer.
If not provided, the requested GPU is 0. | 1 | +| `idleTimeoutEnabled` | *boolean* | :heavy_check_mark: | Option to shut down processes that have had no new connections or rooms
for five minutes. | | +| `requestedCPU` | *double* | :heavy_check_mark: | The number of cores allocated to your process. | 0.5 | +| `requestedMemoryMB` | *double* | :heavy_check_mark: | The amount of memory allocated to your process. By default, this is capped
at 8192 MB, but can be increased further on the Enterprise tier. | 1024 | +| `roomsPerProcess` | *int* | :heavy_check_mark: | Governs how many [rooms](https://hathora.dev/docs/concepts/hathora-entities#room) can be scheduled in a process. | 3 | \ No newline at end of file diff --git a/docs/models/shared/Organization.md b/docs/models/shared/Organization.md index 23d1981..f6ff72f 100644 --- a/docs/models/shared/Organization.md +++ b/docs/models/shared/Organization.md @@ -5,7 +5,9 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `enabledFeatureFlags` | List\<*String*> | :heavy_minus_sign: | The features enabled for this org and user. | | | `isSingleTenant` | *boolean* | :heavy_check_mark: | N/A | | +| `maxRequestedMemoryMB` | *Optional\* | :heavy_minus_sign: | The maximum memory in MB that can be used by any process in this org. | | | `name` | *Optional\* | :heavy_minus_sign: | The name of an organization. | | | `orgId` | *String* | :heavy_check_mark: | System generated unique identifier for an organization. Not guaranteed to have a specific format. | org-6f706e83-0ec1-437a-9a46-7d4281eb2f39 | | `scopes` | List\<[Scope](../../models/shared/Scope.md)> | :heavy_minus_sign: | The scopes the user who loaded this has on this org. | | diff --git a/docs/models/shared/RoomAllocationData.md b/docs/models/shared/RoomAllocationData.md new file mode 100644 index 0000000..89c9869 --- /dev/null +++ b/docs/models/shared/RoomAllocationData.md @@ -0,0 +1,14 @@ +# RoomAllocationData + +Connection information for the default and additional ports. + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `additionalExposedPorts` | List\<[ExposedPort](../../models/shared/ExposedPort.md)> | :heavy_check_mark: | N/A | [
{
"host": "1.proxy.hathora.dev",
"name": "debug",
"port": 72941,
"transportType": "tcp"
}
] | +| `exposedPort` | [Optional\](../../models/shared/ExposedPort.md) | :heavy_minus_sign: | Connection details for an active process. | {
"host": "1.proxy.hathora.dev",
"name": "default",
"port": 34567,
"transportType": "tcp"
} | +| `processId` | *Optional\* | :heavy_minus_sign: | System generated unique identifier to a runtime instance of your game server. | cbfcddd2-0006-43ae-996c-995fff7bed2e | +| `roomId` | *String* | :heavy_check_mark: | Unique identifier to a game session or match. Use the default system generated ID or overwrite it with your own.
Note: error will be returned if `roomId` is not globally unique. | 2swovpy1fnunu | +| `status` | [RoomReadyStatus](../../models/shared/RoomReadyStatus.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/sdks/deploymentsv1/README.md b/docs/sdks/deploymentsv1/README.md index 341255a..1bdefc1 100644 --- a/docs/sdks/deploymentsv1/README.md +++ b/docs/sdks/deploymentsv1/README.md @@ -24,9 +24,7 @@ package hello.world; import dev.hathora.cloud_sdk.HathoraCloud; import dev.hathora.cloud_sdk.models.errors.ApiError; import dev.hathora.cloud_sdk.models.operations.CreateDeploymentV1DeprecatedResponse; -import dev.hathora.cloud_sdk.models.shared.ContainerPort; import dev.hathora.cloud_sdk.models.shared.DeploymentConfig; -import dev.hathora.cloud_sdk.models.shared.Env; import dev.hathora.cloud_sdk.models.shared.PlanName; import dev.hathora.cloud_sdk.models.shared.Security; import dev.hathora.cloud_sdk.models.shared.TransportType; @@ -49,19 +47,12 @@ public class Application { .deploymentConfig(DeploymentConfig.builder() .containerPort(4000) .env(List.of( - Env.builder() - .name("EULA") - .value("TRUE") - .build())) + )) .planName(PlanName.TINY) .roomsPerProcess(3) .transportType(TransportType.TCP) .additionalContainerPorts(List.of( - ContainerPort.builder() - .name("default") - .port(8000) - .transportType(TransportType.TCP) - .build())) + )) .build()) .appId("app-af469a92-5b45-4565-b3c4-b79878de67d2") .buildId(1) diff --git a/docs/sdks/deploymentsv2/README.md b/docs/sdks/deploymentsv2/README.md index e438c5d..019aa50 100644 --- a/docs/sdks/deploymentsv2/README.md +++ b/docs/sdks/deploymentsv2/README.md @@ -24,9 +24,7 @@ package hello.world; import dev.hathora.cloud_sdk.HathoraCloud; import dev.hathora.cloud_sdk.models.errors.ApiError; import dev.hathora.cloud_sdk.models.operations.CreateDeploymentV2DeprecatedResponse; -import dev.hathora.cloud_sdk.models.shared.ContainerPort; import dev.hathora.cloud_sdk.models.shared.DeploymentConfigV2; -import dev.hathora.cloud_sdk.models.shared.DeploymentConfigV2Env; import dev.hathora.cloud_sdk.models.shared.Security; import dev.hathora.cloud_sdk.models.shared.TransportType; import java.lang.Exception; @@ -48,21 +46,14 @@ public class Application { .deploymentConfigV2(DeploymentConfigV2.builder() .containerPort(4000) .env(List.of( - DeploymentConfigV2Env.builder() - .name("EULA") - .value("TRUE") - .build())) + )) .idleTimeoutEnabled(false) .requestedCPU(0.5d) .requestedMemoryMB(1024d) .roomsPerProcess(3) .transportType(TransportType.TCP) .additionalContainerPorts(List.of( - ContainerPort.builder() - .name("default") - .port(8000) - .transportType(TransportType.TLS) - .build())) + )) .build()) .appId("app-af469a92-5b45-4565-b3c4-b79878de67d2") .buildId(1) diff --git a/docs/sdks/deploymentsv3/README.md b/docs/sdks/deploymentsv3/README.md index 49dd3e6..2ff34b7 100644 --- a/docs/sdks/deploymentsv3/README.md +++ b/docs/sdks/deploymentsv3/README.md @@ -24,9 +24,7 @@ package hello.world; import dev.hathora.cloud_sdk.HathoraCloud; import dev.hathora.cloud_sdk.models.errors.ApiError; import dev.hathora.cloud_sdk.models.operations.CreateDeploymentResponse; -import dev.hathora.cloud_sdk.models.shared.ContainerPort; import dev.hathora.cloud_sdk.models.shared.DeploymentConfigV3; -import dev.hathora.cloud_sdk.models.shared.DeploymentConfigV3Env; import dev.hathora.cloud_sdk.models.shared.Security; import dev.hathora.cloud_sdk.models.shared.TransportType; import java.lang.Exception; @@ -49,21 +47,14 @@ public class Application { .buildId("bld-6d4c6a71-2d75-4b42-94e1-f312f57f33c5") .containerPort(4000) .env(List.of( - DeploymentConfigV3Env.builder() - .name("EULA") - .value("TRUE") - .build())) + )) .idleTimeoutEnabled(true) .requestedCPU(0.5d) .requestedMemoryMB(1024d) .roomsPerProcess(3) .transportType(TransportType.TCP) .additionalContainerPorts(List.of( - ContainerPort.builder() - .name("default") - .port(8000) - .transportType(TransportType.UDP) - .build())) + )) .deploymentTag("alpha") .build()) .appId("app-af469a92-5b45-4565-b3c4-b79878de67d2") diff --git a/docs/sdks/roomsv2/README.md b/docs/sdks/roomsv2/README.md index 5b9fdce..0fffeb9 100644 --- a/docs/sdks/roomsv2/README.md +++ b/docs/sdks/roomsv2/README.md @@ -394,7 +394,7 @@ public class Application { .roomId("2swovpy1fnunu") .call(); - if (res.connectionInfoV2().isPresent()) { + if (res.roomAllocationData().isPresent()) { // handle response } } diff --git a/gen.yaml b/gen.yaml index 0bea801..7d1c7f6 100644 --- a/gen.yaml +++ b/gen.yaml @@ -13,7 +13,7 @@ generation: baseServerURL: "" flattenGlobalSecurity: true java: - version: 2.13.0 + version: 2.13.1 additionalDependencies: - testImplementation:org.junit.jupiter:junit-jupiter-api:5.8.1 - testRuntimeOnly:org.junit.jupiter:junit-jupiter-engine:5.8.1 diff --git a/src/main/java/dev/hathora/cloud_sdk/RoomsV2.java b/src/main/java/dev/hathora/cloud_sdk/RoomsV2.java index fa760f5..9dc6f52 100644 --- a/src/main/java/dev/hathora/cloud_sdk/RoomsV2.java +++ b/src/main/java/dev/hathora/cloud_sdk/RoomsV2.java @@ -38,6 +38,7 @@ import dev.hathora.cloud_sdk.models.shared.ConnectionInfoV2; import dev.hathora.cloud_sdk.models.shared.CreateRoomParams; import dev.hathora.cloud_sdk.models.shared.Room; +import dev.hathora.cloud_sdk.models.shared.RoomAllocationData; import dev.hathora.cloud_sdk.models.shared.RoomConnectionData; import dev.hathora.cloud_sdk.models.shared.RoomWithoutAllocations; import dev.hathora.cloud_sdk.models.shared.UpdateRoomConfigParams; @@ -1108,10 +1109,10 @@ public ResumeRoomResponse resumeRoom( if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - ConnectionInfoV2 _out = Utils.mapper().readValue( + RoomAllocationData _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withConnectionInfoV2(Optional.ofNullable(_out)); + new TypeReference() {}); + _res.withRoomAllocationData(Optional.ofNullable(_out)); return _res; } else { throw new SDKError( diff --git a/src/main/java/dev/hathora/cloud_sdk/SDKConfiguration.java b/src/main/java/dev/hathora/cloud_sdk/SDKConfiguration.java index c82c347..f430dd0 100644 --- a/src/main/java/dev/hathora/cloud_sdk/SDKConfiguration.java +++ b/src/main/java/dev/hathora/cloud_sdk/SDKConfiguration.java @@ -31,8 +31,8 @@ public String resolvedServerUrl() { public int serverIdx = 0; private static final String LANGUAGE = "java"; public static final String OPENAPI_DOC_VERSION = "0.0.1"; - public static final String SDK_VERSION = "2.13.0"; - public static final String GEN_VERSION = "2.486.6"; + public static final String SDK_VERSION = "2.13.1"; + public static final String GEN_VERSION = "2.493.13"; private static final String BASE_PACKAGE = "dev.hathora.cloud_sdk"; public static final String USER_AGENT = String.format("speakeasy-sdk/%s %s %s %s %s", diff --git a/src/main/java/dev/hathora/cloud_sdk/models/operations/ResumeRoomResponse.java b/src/main/java/dev/hathora/cloud_sdk/models/operations/ResumeRoomResponse.java index 03ff728..ff993cf 100644 --- a/src/main/java/dev/hathora/cloud_sdk/models/operations/ResumeRoomResponse.java +++ b/src/main/java/dev/hathora/cloud_sdk/models/operations/ResumeRoomResponse.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; -import dev.hathora.cloud_sdk.models.shared.ConnectionInfoV2; +import dev.hathora.cloud_sdk.models.shared.RoomAllocationData; import dev.hathora.cloud_sdk.utils.Response; import dev.hathora.cloud_sdk.utils.Utils; import java.io.InputStream; @@ -23,14 +23,14 @@ public class ResumeRoomResponse implements Response { /** - * Ok + * HTTP response content type for this operation */ - private Optional connectionInfoV2; + private String contentType; /** - * HTTP response content type for this operation + * Ok */ - private String contentType; + private Optional roomAllocationData; /** * HTTP response status code for this operation @@ -44,16 +44,16 @@ public class ResumeRoomResponse implements Response { @JsonCreator public ResumeRoomResponse( - Optional connectionInfoV2, String contentType, + Optional roomAllocationData, int statusCode, HttpResponse rawResponse) { - Utils.checkNotNull(connectionInfoV2, "connectionInfoV2"); Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(roomAllocationData, "roomAllocationData"); Utils.checkNotNull(statusCode, "statusCode"); Utils.checkNotNull(rawResponse, "rawResponse"); - this.connectionInfoV2 = connectionInfoV2; this.contentType = contentType; + this.roomAllocationData = roomAllocationData; this.statusCode = statusCode; this.rawResponse = rawResponse; } @@ -62,24 +62,24 @@ public ResumeRoomResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(Optional.empty(), contentType, statusCode, rawResponse); + this(contentType, Optional.empty(), statusCode, rawResponse); } /** - * Ok + * HTTP response content type for this operation */ - @SuppressWarnings("unchecked") @JsonIgnore - public Optional connectionInfoV2() { - return (Optional) connectionInfoV2; + public String contentType() { + return contentType; } /** - * HTTP response content type for this operation + * Ok */ + @SuppressWarnings("unchecked") @JsonIgnore - public String contentType() { - return contentType; + public Optional roomAllocationData() { + return (Optional) roomAllocationData; } /** @@ -103,29 +103,29 @@ public final static Builder builder() { } /** - * Ok + * HTTP response content type for this operation */ - public ResumeRoomResponse withConnectionInfoV2(ConnectionInfoV2 connectionInfoV2) { - Utils.checkNotNull(connectionInfoV2, "connectionInfoV2"); - this.connectionInfoV2 = Optional.ofNullable(connectionInfoV2); + public ResumeRoomResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; return this; } /** * Ok */ - public ResumeRoomResponse withConnectionInfoV2(Optional connectionInfoV2) { - Utils.checkNotNull(connectionInfoV2, "connectionInfoV2"); - this.connectionInfoV2 = connectionInfoV2; + public ResumeRoomResponse withRoomAllocationData(RoomAllocationData roomAllocationData) { + Utils.checkNotNull(roomAllocationData, "roomAllocationData"); + this.roomAllocationData = Optional.ofNullable(roomAllocationData); return this; } /** - * HTTP response content type for this operation + * Ok */ - public ResumeRoomResponse withContentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; + public ResumeRoomResponse withRoomAllocationData(Optional roomAllocationData) { + Utils.checkNotNull(roomAllocationData, "roomAllocationData"); + this.roomAllocationData = roomAllocationData; return this; } @@ -157,8 +157,8 @@ public boolean equals(java.lang.Object o) { } ResumeRoomResponse other = (ResumeRoomResponse) o; return - Objects.deepEquals(this.connectionInfoV2, other.connectionInfoV2) && Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.roomAllocationData, other.roomAllocationData) && Objects.deepEquals(this.statusCode, other.statusCode) && Objects.deepEquals(this.rawResponse, other.rawResponse); } @@ -166,8 +166,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Objects.hash( - connectionInfoV2, contentType, + roomAllocationData, statusCode, rawResponse); } @@ -175,18 +175,18 @@ public int hashCode() { @Override public String toString() { return Utils.toString(ResumeRoomResponse.class, - "connectionInfoV2", connectionInfoV2, "contentType", contentType, + "roomAllocationData", roomAllocationData, "statusCode", statusCode, "rawResponse", rawResponse); } public final static class Builder { - private Optional connectionInfoV2 = Optional.empty(); - private String contentType; + private Optional roomAllocationData = Optional.empty(); + private Integer statusCode; private HttpResponse rawResponse; @@ -196,29 +196,29 @@ private Builder() { } /** - * Ok + * HTTP response content type for this operation */ - public Builder connectionInfoV2(ConnectionInfoV2 connectionInfoV2) { - Utils.checkNotNull(connectionInfoV2, "connectionInfoV2"); - this.connectionInfoV2 = Optional.ofNullable(connectionInfoV2); + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; return this; } /** * Ok */ - public Builder connectionInfoV2(Optional connectionInfoV2) { - Utils.checkNotNull(connectionInfoV2, "connectionInfoV2"); - this.connectionInfoV2 = connectionInfoV2; + public Builder roomAllocationData(RoomAllocationData roomAllocationData) { + Utils.checkNotNull(roomAllocationData, "roomAllocationData"); + this.roomAllocationData = Optional.ofNullable(roomAllocationData); return this; } /** - * HTTP response content type for this operation + * Ok */ - public Builder contentType(String contentType) { - Utils.checkNotNull(contentType, "contentType"); - this.contentType = contentType; + public Builder roomAllocationData(Optional roomAllocationData) { + Utils.checkNotNull(roomAllocationData, "roomAllocationData"); + this.roomAllocationData = roomAllocationData; return this; } @@ -242,8 +242,8 @@ public Builder rawResponse(HttpResponse rawResponse) { public ResumeRoomResponse build() { return new ResumeRoomResponse( - connectionInfoV2, contentType, + roomAllocationData, statusCode, rawResponse); } diff --git a/src/main/java/dev/hathora/cloud_sdk/models/shared/Deployment.java b/src/main/java/dev/hathora/cloud_sdk/models/shared/Deployment.java index bfb9d29..11c210a 100644 --- a/src/main/java/dev/hathora/cloud_sdk/models/shared/Deployment.java +++ b/src/main/java/dev/hathora/cloud_sdk/models/shared/Deployment.java @@ -89,6 +89,15 @@ public class Deployment { @JsonProperty("env") private List env; + /** + * EXPERIMENTAL - this feature is in closed beta. + * The number of GPUs allocated to your process. Must be an integer. + * If not provided, the requested GPU is 0. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("experimentalRequestedGPU") + private Optional experimentalRequestedGPU; + /** * Option to shut down processes that have had no new connections or rooms * for five minutes. @@ -128,6 +137,7 @@ public Deployment( @JsonProperty("deploymentId") String deploymentId, @JsonProperty("deploymentTag") Optional deploymentTag, @JsonProperty("env") List env, + @JsonProperty("experimentalRequestedGPU") Optional experimentalRequestedGPU, @JsonProperty("idleTimeoutEnabled") boolean idleTimeoutEnabled, @JsonProperty("requestedCPU") double requestedCPU, @JsonProperty("requestedMemoryMB") double requestedMemoryMB, @@ -143,6 +153,7 @@ public Deployment( Utils.checkNotNull(deploymentId, "deploymentId"); Utils.checkNotNull(deploymentTag, "deploymentTag"); Utils.checkNotNull(env, "env"); + Utils.checkNotNull(experimentalRequestedGPU, "experimentalRequestedGPU"); Utils.checkNotNull(idleTimeoutEnabled, "idleTimeoutEnabled"); Utils.checkNotNull(requestedCPU, "requestedCPU"); Utils.checkNotNull(requestedMemoryMB, "requestedMemoryMB"); @@ -158,6 +169,7 @@ public Deployment( this.deploymentId = deploymentId; this.deploymentTag = deploymentTag; this.env = env; + this.experimentalRequestedGPU = experimentalRequestedGPU; this.idleTimeoutEnabled = idleTimeoutEnabled; this.requestedCPU = requestedCPU; this.requestedMemoryMB = requestedMemoryMB; @@ -178,7 +190,7 @@ public Deployment( double requestedCPU, double requestedMemoryMB, int roomsPerProcess) { - this(additionalContainerPorts, appId, build, buildId, Optional.empty(), createdAt, createdBy, defaultContainerPort, deploymentId, Optional.empty(), env, idleTimeoutEnabled, requestedCPU, requestedMemoryMB, roomsPerProcess); + this(additionalContainerPorts, appId, build, buildId, Optional.empty(), createdAt, createdBy, defaultContainerPort, deploymentId, Optional.empty(), env, Optional.empty(), idleTimeoutEnabled, requestedCPU, requestedMemoryMB, roomsPerProcess); } /** @@ -266,6 +278,16 @@ public List env() { return env; } + /** + * EXPERIMENTAL - this feature is in closed beta. + * The number of GPUs allocated to your process. Must be an integer. + * If not provided, the requested GPU is 0. + */ + @JsonIgnore + public Optional experimentalRequestedGPU() { + return experimentalRequestedGPU; + } + /** * Option to shut down processes that have had no new connections or rooms * for five minutes. @@ -418,6 +440,28 @@ public Deployment withEnv(List env) return this; } + /** + * EXPERIMENTAL - this feature is in closed beta. + * The number of GPUs allocated to your process. Must be an integer. + * If not provided, the requested GPU is 0. + */ + public Deployment withExperimentalRequestedGPU(double experimentalRequestedGPU) { + Utils.checkNotNull(experimentalRequestedGPU, "experimentalRequestedGPU"); + this.experimentalRequestedGPU = Optional.ofNullable(experimentalRequestedGPU); + return this; + } + + /** + * EXPERIMENTAL - this feature is in closed beta. + * The number of GPUs allocated to your process. Must be an integer. + * If not provided, the requested GPU is 0. + */ + public Deployment withExperimentalRequestedGPU(Optional experimentalRequestedGPU) { + Utils.checkNotNull(experimentalRequestedGPU, "experimentalRequestedGPU"); + this.experimentalRequestedGPU = experimentalRequestedGPU; + return this; + } + /** * Option to shut down processes that have had no new connections or rooms * for five minutes. @@ -477,6 +521,7 @@ public boolean equals(java.lang.Object o) { Objects.deepEquals(this.deploymentId, other.deploymentId) && Objects.deepEquals(this.deploymentTag, other.deploymentTag) && Objects.deepEquals(this.env, other.env) && + Objects.deepEquals(this.experimentalRequestedGPU, other.experimentalRequestedGPU) && Objects.deepEquals(this.idleTimeoutEnabled, other.idleTimeoutEnabled) && Objects.deepEquals(this.requestedCPU, other.requestedCPU) && Objects.deepEquals(this.requestedMemoryMB, other.requestedMemoryMB) && @@ -497,6 +542,7 @@ public int hashCode() { deploymentId, deploymentTag, env, + experimentalRequestedGPU, idleTimeoutEnabled, requestedCPU, requestedMemoryMB, @@ -517,6 +563,7 @@ public String toString() { "deploymentId", deploymentId, "deploymentTag", deploymentTag, "env", env, + "experimentalRequestedGPU", experimentalRequestedGPU, "idleTimeoutEnabled", idleTimeoutEnabled, "requestedCPU", requestedCPU, "requestedMemoryMB", requestedMemoryMB, @@ -547,6 +594,8 @@ public final static class Builder { private List env; + private Optional experimentalRequestedGPU = Optional.empty(); + private Boolean idleTimeoutEnabled; private Double requestedCPU; @@ -673,6 +722,28 @@ public Builder env(List env) { return this; } + /** + * EXPERIMENTAL - this feature is in closed beta. + * The number of GPUs allocated to your process. Must be an integer. + * If not provided, the requested GPU is 0. + */ + public Builder experimentalRequestedGPU(double experimentalRequestedGPU) { + Utils.checkNotNull(experimentalRequestedGPU, "experimentalRequestedGPU"); + this.experimentalRequestedGPU = Optional.ofNullable(experimentalRequestedGPU); + return this; + } + + /** + * EXPERIMENTAL - this feature is in closed beta. + * The number of GPUs allocated to your process. Must be an integer. + * If not provided, the requested GPU is 0. + */ + public Builder experimentalRequestedGPU(Optional experimentalRequestedGPU) { + Utils.checkNotNull(experimentalRequestedGPU, "experimentalRequestedGPU"); + this.experimentalRequestedGPU = experimentalRequestedGPU; + return this; + } + /** * Option to shut down processes that have had no new connections or rooms * for five minutes. @@ -724,6 +795,7 @@ public Deployment build() { deploymentId, deploymentTag, env, + experimentalRequestedGPU, idleTimeoutEnabled, requestedCPU, requestedMemoryMB, diff --git a/src/main/java/dev/hathora/cloud_sdk/models/shared/DeploymentConfigV3.java b/src/main/java/dev/hathora/cloud_sdk/models/shared/DeploymentConfigV3.java index f993175..067f6e2 100644 --- a/src/main/java/dev/hathora/cloud_sdk/models/shared/DeploymentConfigV3.java +++ b/src/main/java/dev/hathora/cloud_sdk/models/shared/DeploymentConfigV3.java @@ -56,6 +56,15 @@ public class DeploymentConfigV3 { @JsonProperty("env") private List env; + /** + * EXPERIMENTAL - this feature is in closed beta. + * The number of GPUs allocated to your process. Must be an integer. + * If not provided, the requested GPU is 0. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("experimentalRequestedGPU") + private Optional experimentalRequestedGPU; + /** * Option to shut down processes that have had no new connections or rooms * for five minutes. @@ -94,6 +103,7 @@ public DeploymentConfigV3( @JsonProperty("containerPort") int containerPort, @JsonProperty("deploymentTag") Optional deploymentTag, @JsonProperty("env") List env, + @JsonProperty("experimentalRequestedGPU") Optional experimentalRequestedGPU, @JsonProperty("idleTimeoutEnabled") boolean idleTimeoutEnabled, @JsonProperty("requestedCPU") double requestedCPU, @JsonProperty("requestedMemoryMB") double requestedMemoryMB, @@ -104,6 +114,7 @@ public DeploymentConfigV3( Utils.checkNotNull(containerPort, "containerPort"); Utils.checkNotNull(deploymentTag, "deploymentTag"); Utils.checkNotNull(env, "env"); + Utils.checkNotNull(experimentalRequestedGPU, "experimentalRequestedGPU"); Utils.checkNotNull(idleTimeoutEnabled, "idleTimeoutEnabled"); Utils.checkNotNull(requestedCPU, "requestedCPU"); Utils.checkNotNull(requestedMemoryMB, "requestedMemoryMB"); @@ -114,6 +125,7 @@ public DeploymentConfigV3( this.containerPort = containerPort; this.deploymentTag = deploymentTag; this.env = env; + this.experimentalRequestedGPU = experimentalRequestedGPU; this.idleTimeoutEnabled = idleTimeoutEnabled; this.requestedCPU = requestedCPU; this.requestedMemoryMB = requestedMemoryMB; @@ -130,7 +142,7 @@ public DeploymentConfigV3( double requestedMemoryMB, int roomsPerProcess, TransportType transportType) { - this(Optional.empty(), buildId, containerPort, Optional.empty(), env, idleTimeoutEnabled, requestedCPU, requestedMemoryMB, roomsPerProcess, transportType); + this(Optional.empty(), buildId, containerPort, Optional.empty(), env, Optional.empty(), idleTimeoutEnabled, requestedCPU, requestedMemoryMB, roomsPerProcess, transportType); } /** @@ -174,6 +186,16 @@ public List env() { return env; } + /** + * EXPERIMENTAL - this feature is in closed beta. + * The number of GPUs allocated to your process. Must be an integer. + * If not provided, the requested GPU is 0. + */ + @JsonIgnore + public Optional experimentalRequestedGPU() { + return experimentalRequestedGPU; + } + /** * Option to shut down processes that have had no new connections or rooms * for five minutes. @@ -282,6 +304,28 @@ public DeploymentConfigV3 withEnv(List env) { return this; } + /** + * EXPERIMENTAL - this feature is in closed beta. + * The number of GPUs allocated to your process. Must be an integer. + * If not provided, the requested GPU is 0. + */ + public DeploymentConfigV3 withExperimentalRequestedGPU(double experimentalRequestedGPU) { + Utils.checkNotNull(experimentalRequestedGPU, "experimentalRequestedGPU"); + this.experimentalRequestedGPU = Optional.ofNullable(experimentalRequestedGPU); + return this; + } + + /** + * EXPERIMENTAL - this feature is in closed beta. + * The number of GPUs allocated to your process. Must be an integer. + * If not provided, the requested GPU is 0. + */ + public DeploymentConfigV3 withExperimentalRequestedGPU(Optional experimentalRequestedGPU) { + Utils.checkNotNull(experimentalRequestedGPU, "experimentalRequestedGPU"); + this.experimentalRequestedGPU = experimentalRequestedGPU; + return this; + } + /** * Option to shut down processes that have had no new connections or rooms * for five minutes. @@ -343,6 +387,7 @@ public boolean equals(java.lang.Object o) { Objects.deepEquals(this.containerPort, other.containerPort) && Objects.deepEquals(this.deploymentTag, other.deploymentTag) && Objects.deepEquals(this.env, other.env) && + Objects.deepEquals(this.experimentalRequestedGPU, other.experimentalRequestedGPU) && Objects.deepEquals(this.idleTimeoutEnabled, other.idleTimeoutEnabled) && Objects.deepEquals(this.requestedCPU, other.requestedCPU) && Objects.deepEquals(this.requestedMemoryMB, other.requestedMemoryMB) && @@ -358,6 +403,7 @@ public int hashCode() { containerPort, deploymentTag, env, + experimentalRequestedGPU, idleTimeoutEnabled, requestedCPU, requestedMemoryMB, @@ -373,6 +419,7 @@ public String toString() { "containerPort", containerPort, "deploymentTag", deploymentTag, "env", env, + "experimentalRequestedGPU", experimentalRequestedGPU, "idleTimeoutEnabled", idleTimeoutEnabled, "requestedCPU", requestedCPU, "requestedMemoryMB", requestedMemoryMB, @@ -392,6 +439,8 @@ public final static class Builder { private List env; + private Optional experimentalRequestedGPU = Optional.empty(); + private Boolean idleTimeoutEnabled; private Double requestedCPU; @@ -469,6 +518,28 @@ public Builder env(List env) { return this; } + /** + * EXPERIMENTAL - this feature is in closed beta. + * The number of GPUs allocated to your process. Must be an integer. + * If not provided, the requested GPU is 0. + */ + public Builder experimentalRequestedGPU(double experimentalRequestedGPU) { + Utils.checkNotNull(experimentalRequestedGPU, "experimentalRequestedGPU"); + this.experimentalRequestedGPU = Optional.ofNullable(experimentalRequestedGPU); + return this; + } + + /** + * EXPERIMENTAL - this feature is in closed beta. + * The number of GPUs allocated to your process. Must be an integer. + * If not provided, the requested GPU is 0. + */ + public Builder experimentalRequestedGPU(Optional experimentalRequestedGPU) { + Utils.checkNotNull(experimentalRequestedGPU, "experimentalRequestedGPU"); + this.experimentalRequestedGPU = experimentalRequestedGPU; + return this; + } + /** * Option to shut down processes that have had no new connections or rooms * for five minutes. @@ -522,6 +593,7 @@ public DeploymentConfigV3 build() { containerPort, deploymentTag, env, + experimentalRequestedGPU, idleTimeoutEnabled, requestedCPU, requestedMemoryMB, diff --git a/src/main/java/dev/hathora/cloud_sdk/models/shared/DeploymentV3.java b/src/main/java/dev/hathora/cloud_sdk/models/shared/DeploymentV3.java index 08d82b3..cd954c6 100644 --- a/src/main/java/dev/hathora/cloud_sdk/models/shared/DeploymentV3.java +++ b/src/main/java/dev/hathora/cloud_sdk/models/shared/DeploymentV3.java @@ -83,6 +83,15 @@ public class DeploymentV3 { @JsonProperty("env") private List env; + /** + * EXPERIMENTAL - this feature is in closed beta. + * The number of GPUs allocated to your process. Must be an integer. + * If not provided, the requested GPU is 0. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("experimentalRequestedGPU") + private Optional experimentalRequestedGPU; + /** * Option to shut down processes that have had no new connections or rooms * for five minutes. @@ -121,6 +130,7 @@ public DeploymentV3( @JsonProperty("deploymentId") String deploymentId, @JsonProperty("deploymentTag") Optional deploymentTag, @JsonProperty("env") List env, + @JsonProperty("experimentalRequestedGPU") Optional experimentalRequestedGPU, @JsonProperty("idleTimeoutEnabled") boolean idleTimeoutEnabled, @JsonProperty("requestedCPU") double requestedCPU, @JsonProperty("requestedMemoryMB") double requestedMemoryMB, @@ -135,6 +145,7 @@ public DeploymentV3( Utils.checkNotNull(deploymentId, "deploymentId"); Utils.checkNotNull(deploymentTag, "deploymentTag"); Utils.checkNotNull(env, "env"); + Utils.checkNotNull(experimentalRequestedGPU, "experimentalRequestedGPU"); Utils.checkNotNull(idleTimeoutEnabled, "idleTimeoutEnabled"); Utils.checkNotNull(requestedCPU, "requestedCPU"); Utils.checkNotNull(requestedMemoryMB, "requestedMemoryMB"); @@ -149,6 +160,7 @@ public DeploymentV3( this.deploymentId = deploymentId; this.deploymentTag = deploymentTag; this.env = env; + this.experimentalRequestedGPU = experimentalRequestedGPU; this.idleTimeoutEnabled = idleTimeoutEnabled; this.requestedCPU = requestedCPU; this.requestedMemoryMB = requestedMemoryMB; @@ -168,7 +180,7 @@ public DeploymentV3( double requestedCPU, double requestedMemoryMB, int roomsPerProcess) { - this(additionalContainerPorts, appId, buildId, Optional.empty(), createdAt, createdBy, defaultContainerPort, deploymentId, Optional.empty(), env, idleTimeoutEnabled, requestedCPU, requestedMemoryMB, roomsPerProcess); + this(additionalContainerPorts, appId, buildId, Optional.empty(), createdAt, createdBy, defaultContainerPort, deploymentId, Optional.empty(), env, Optional.empty(), idleTimeoutEnabled, requestedCPU, requestedMemoryMB, roomsPerProcess); } /** @@ -248,6 +260,16 @@ public List env() { return env; } + /** + * EXPERIMENTAL - this feature is in closed beta. + * The number of GPUs allocated to your process. Must be an integer. + * If not provided, the requested GPU is 0. + */ + @JsonIgnore + public Optional experimentalRequestedGPU() { + return experimentalRequestedGPU; + } + /** * Option to shut down processes that have had no new connections or rooms * for five minutes. @@ -391,6 +413,28 @@ public DeploymentV3 withEnv(List env) { return this; } + /** + * EXPERIMENTAL - this feature is in closed beta. + * The number of GPUs allocated to your process. Must be an integer. + * If not provided, the requested GPU is 0. + */ + public DeploymentV3 withExperimentalRequestedGPU(double experimentalRequestedGPU) { + Utils.checkNotNull(experimentalRequestedGPU, "experimentalRequestedGPU"); + this.experimentalRequestedGPU = Optional.ofNullable(experimentalRequestedGPU); + return this; + } + + /** + * EXPERIMENTAL - this feature is in closed beta. + * The number of GPUs allocated to your process. Must be an integer. + * If not provided, the requested GPU is 0. + */ + public DeploymentV3 withExperimentalRequestedGPU(Optional experimentalRequestedGPU) { + Utils.checkNotNull(experimentalRequestedGPU, "experimentalRequestedGPU"); + this.experimentalRequestedGPU = experimentalRequestedGPU; + return this; + } + /** * Option to shut down processes that have had no new connections or rooms * for five minutes. @@ -449,6 +493,7 @@ public boolean equals(java.lang.Object o) { Objects.deepEquals(this.deploymentId, other.deploymentId) && Objects.deepEquals(this.deploymentTag, other.deploymentTag) && Objects.deepEquals(this.env, other.env) && + Objects.deepEquals(this.experimentalRequestedGPU, other.experimentalRequestedGPU) && Objects.deepEquals(this.idleTimeoutEnabled, other.idleTimeoutEnabled) && Objects.deepEquals(this.requestedCPU, other.requestedCPU) && Objects.deepEquals(this.requestedMemoryMB, other.requestedMemoryMB) && @@ -468,6 +513,7 @@ public int hashCode() { deploymentId, deploymentTag, env, + experimentalRequestedGPU, idleTimeoutEnabled, requestedCPU, requestedMemoryMB, @@ -487,6 +533,7 @@ public String toString() { "deploymentId", deploymentId, "deploymentTag", deploymentTag, "env", env, + "experimentalRequestedGPU", experimentalRequestedGPU, "idleTimeoutEnabled", idleTimeoutEnabled, "requestedCPU", requestedCPU, "requestedMemoryMB", requestedMemoryMB, @@ -515,6 +562,8 @@ public final static class Builder { private List env; + private Optional experimentalRequestedGPU = Optional.empty(); + private Boolean idleTimeoutEnabled; private Double requestedCPU; @@ -632,6 +681,28 @@ public Builder env(List env) { return this; } + /** + * EXPERIMENTAL - this feature is in closed beta. + * The number of GPUs allocated to your process. Must be an integer. + * If not provided, the requested GPU is 0. + */ + public Builder experimentalRequestedGPU(double experimentalRequestedGPU) { + Utils.checkNotNull(experimentalRequestedGPU, "experimentalRequestedGPU"); + this.experimentalRequestedGPU = Optional.ofNullable(experimentalRequestedGPU); + return this; + } + + /** + * EXPERIMENTAL - this feature is in closed beta. + * The number of GPUs allocated to your process. Must be an integer. + * If not provided, the requested GPU is 0. + */ + public Builder experimentalRequestedGPU(Optional experimentalRequestedGPU) { + Utils.checkNotNull(experimentalRequestedGPU, "experimentalRequestedGPU"); + this.experimentalRequestedGPU = experimentalRequestedGPU; + return this; + } + /** * Option to shut down processes that have had no new connections or rooms * for five minutes. @@ -682,6 +753,7 @@ public DeploymentV3 build() { deploymentId, deploymentTag, env, + experimentalRequestedGPU, idleTimeoutEnabled, requestedCPU, requestedMemoryMB, diff --git a/src/main/java/dev/hathora/cloud_sdk/models/shared/Organization.java b/src/main/java/dev/hathora/cloud_sdk/models/shared/Organization.java index 517d323..f0d00d0 100644 --- a/src/main/java/dev/hathora/cloud_sdk/models/shared/Organization.java +++ b/src/main/java/dev/hathora/cloud_sdk/models/shared/Organization.java @@ -12,6 +12,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import dev.hathora.cloud_sdk.utils.Utils; import java.lang.Boolean; +import java.lang.Double; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; @@ -22,9 +23,23 @@ public class Organization { + /** + * The features enabled for this org and user. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("enabledFeatureFlags") + private Optional> enabledFeatureFlags; + @JsonProperty("isSingleTenant") private boolean isSingleTenant; + /** + * The maximum memory in MB that can be used by any process in this org. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("maxRequestedMemoryMB") + private Optional maxRequestedMemoryMB; + /** * The name of an organization. */ @@ -50,17 +65,23 @@ public class Organization { @JsonCreator public Organization( + @JsonProperty("enabledFeatureFlags") Optional> enabledFeatureFlags, @JsonProperty("isSingleTenant") boolean isSingleTenant, + @JsonProperty("maxRequestedMemoryMB") Optional maxRequestedMemoryMB, @JsonProperty("name") Optional name, @JsonProperty("orgId") String orgId, @JsonProperty("scopes") Optional> scopes, @JsonProperty("stripeCustomerId") String stripeCustomerId) { + Utils.checkNotNull(enabledFeatureFlags, "enabledFeatureFlags"); Utils.checkNotNull(isSingleTenant, "isSingleTenant"); + Utils.checkNotNull(maxRequestedMemoryMB, "maxRequestedMemoryMB"); Utils.checkNotNull(name, "name"); Utils.checkNotNull(orgId, "orgId"); Utils.checkNotNull(scopes, "scopes"); Utils.checkNotNull(stripeCustomerId, "stripeCustomerId"); + this.enabledFeatureFlags = enabledFeatureFlags; this.isSingleTenant = isSingleTenant; + this.maxRequestedMemoryMB = maxRequestedMemoryMB; this.name = name; this.orgId = orgId; this.scopes = scopes; @@ -71,7 +92,16 @@ public Organization( boolean isSingleTenant, String orgId, String stripeCustomerId) { - this(isSingleTenant, Optional.empty(), orgId, Optional.empty(), stripeCustomerId); + this(Optional.empty(), isSingleTenant, Optional.empty(), Optional.empty(), orgId, Optional.empty(), stripeCustomerId); + } + + /** + * The features enabled for this org and user. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> enabledFeatureFlags() { + return (Optional>) enabledFeatureFlags; } @JsonIgnore @@ -79,6 +109,14 @@ public boolean isSingleTenant() { return isSingleTenant; } + /** + * The maximum memory in MB that can be used by any process in this org. + */ + @JsonIgnore + public Optional maxRequestedMemoryMB() { + return maxRequestedMemoryMB; + } + /** * The name of an organization. */ @@ -113,12 +151,48 @@ public final static Builder builder() { return new Builder(); } + /** + * The features enabled for this org and user. + */ + public Organization withEnabledFeatureFlags(List enabledFeatureFlags) { + Utils.checkNotNull(enabledFeatureFlags, "enabledFeatureFlags"); + this.enabledFeatureFlags = Optional.ofNullable(enabledFeatureFlags); + return this; + } + + /** + * The features enabled for this org and user. + */ + public Organization withEnabledFeatureFlags(Optional> enabledFeatureFlags) { + Utils.checkNotNull(enabledFeatureFlags, "enabledFeatureFlags"); + this.enabledFeatureFlags = enabledFeatureFlags; + return this; + } + public Organization withIsSingleTenant(boolean isSingleTenant) { Utils.checkNotNull(isSingleTenant, "isSingleTenant"); this.isSingleTenant = isSingleTenant; return this; } + /** + * The maximum memory in MB that can be used by any process in this org. + */ + public Organization withMaxRequestedMemoryMB(double maxRequestedMemoryMB) { + Utils.checkNotNull(maxRequestedMemoryMB, "maxRequestedMemoryMB"); + this.maxRequestedMemoryMB = Optional.ofNullable(maxRequestedMemoryMB); + return this; + } + + /** + * The maximum memory in MB that can be used by any process in this org. + */ + public Organization withMaxRequestedMemoryMB(Optional maxRequestedMemoryMB) { + Utils.checkNotNull(maxRequestedMemoryMB, "maxRequestedMemoryMB"); + this.maxRequestedMemoryMB = maxRequestedMemoryMB; + return this; + } + /** * The name of an organization. */ @@ -180,7 +254,9 @@ public boolean equals(java.lang.Object o) { } Organization other = (Organization) o; return + Objects.deepEquals(this.enabledFeatureFlags, other.enabledFeatureFlags) && Objects.deepEquals(this.isSingleTenant, other.isSingleTenant) && + Objects.deepEquals(this.maxRequestedMemoryMB, other.maxRequestedMemoryMB) && Objects.deepEquals(this.name, other.name) && Objects.deepEquals(this.orgId, other.orgId) && Objects.deepEquals(this.scopes, other.scopes) && @@ -190,7 +266,9 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Objects.hash( + enabledFeatureFlags, isSingleTenant, + maxRequestedMemoryMB, name, orgId, scopes, @@ -200,7 +278,9 @@ public int hashCode() { @Override public String toString() { return Utils.toString(Organization.class, + "enabledFeatureFlags", enabledFeatureFlags, "isSingleTenant", isSingleTenant, + "maxRequestedMemoryMB", maxRequestedMemoryMB, "name", name, "orgId", orgId, "scopes", scopes, @@ -209,8 +289,12 @@ public String toString() { public final static class Builder { + private Optional> enabledFeatureFlags = Optional.empty(); + private Boolean isSingleTenant; + private Optional maxRequestedMemoryMB = Optional.empty(); + private Optional name = Optional.empty(); private String orgId; @@ -223,12 +307,48 @@ private Builder() { // force use of static builder() method } + /** + * The features enabled for this org and user. + */ + public Builder enabledFeatureFlags(List enabledFeatureFlags) { + Utils.checkNotNull(enabledFeatureFlags, "enabledFeatureFlags"); + this.enabledFeatureFlags = Optional.ofNullable(enabledFeatureFlags); + return this; + } + + /** + * The features enabled for this org and user. + */ + public Builder enabledFeatureFlags(Optional> enabledFeatureFlags) { + Utils.checkNotNull(enabledFeatureFlags, "enabledFeatureFlags"); + this.enabledFeatureFlags = enabledFeatureFlags; + return this; + } + public Builder isSingleTenant(boolean isSingleTenant) { Utils.checkNotNull(isSingleTenant, "isSingleTenant"); this.isSingleTenant = isSingleTenant; return this; } + /** + * The maximum memory in MB that can be used by any process in this org. + */ + public Builder maxRequestedMemoryMB(double maxRequestedMemoryMB) { + Utils.checkNotNull(maxRequestedMemoryMB, "maxRequestedMemoryMB"); + this.maxRequestedMemoryMB = Optional.ofNullable(maxRequestedMemoryMB); + return this; + } + + /** + * The maximum memory in MB that can be used by any process in this org. + */ + public Builder maxRequestedMemoryMB(Optional maxRequestedMemoryMB) { + Utils.checkNotNull(maxRequestedMemoryMB, "maxRequestedMemoryMB"); + this.maxRequestedMemoryMB = maxRequestedMemoryMB; + return this; + } + /** * The name of an organization. */ @@ -282,7 +402,9 @@ public Builder stripeCustomerId(String stripeCustomerId) { public Organization build() { return new Organization( + enabledFeatureFlags, isSingleTenant, + maxRequestedMemoryMB, name, orgId, scopes, diff --git a/src/main/java/dev/hathora/cloud_sdk/models/shared/RoomAllocationData.java b/src/main/java/dev/hathora/cloud_sdk/models/shared/RoomAllocationData.java new file mode 100644 index 0000000..6199673 --- /dev/null +++ b/src/main/java/dev/hathora/cloud_sdk/models/shared/RoomAllocationData.java @@ -0,0 +1,299 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.hathora.cloud_sdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.hathora.cloud_sdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * RoomAllocationData - Connection information for the default and additional ports. + */ + +public class RoomAllocationData { + + @JsonProperty("additionalExposedPorts") + private List additionalExposedPorts; + + /** + * Connection details for an active process. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("exposedPort") + private Optional exposedPort; + + /** + * System generated unique identifier to a runtime instance of your game server. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("processId") + private Optional processId; + + /** + * Unique identifier to a game session or match. Use the default system generated ID or overwrite it with your own. + * Note: error will be returned if `roomId` is not globally unique. + */ + @JsonProperty("roomId") + private String roomId; + + @JsonProperty("status") + private RoomReadyStatus status; + + @JsonCreator + public RoomAllocationData( + @JsonProperty("additionalExposedPorts") List additionalExposedPorts, + @JsonProperty("exposedPort") Optional exposedPort, + @JsonProperty("processId") Optional processId, + @JsonProperty("roomId") String roomId, + @JsonProperty("status") RoomReadyStatus status) { + Utils.checkNotNull(additionalExposedPorts, "additionalExposedPorts"); + Utils.checkNotNull(exposedPort, "exposedPort"); + Utils.checkNotNull(processId, "processId"); + Utils.checkNotNull(roomId, "roomId"); + Utils.checkNotNull(status, "status"); + this.additionalExposedPorts = additionalExposedPorts; + this.exposedPort = exposedPort; + this.processId = processId; + this.roomId = roomId; + this.status = status; + } + + public RoomAllocationData( + List additionalExposedPorts, + String roomId, + RoomReadyStatus status) { + this(additionalExposedPorts, Optional.empty(), Optional.empty(), roomId, status); + } + + @JsonIgnore + public List additionalExposedPorts() { + return additionalExposedPorts; + } + + /** + * Connection details for an active process. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional exposedPort() { + return (Optional) exposedPort; + } + + /** + * System generated unique identifier to a runtime instance of your game server. + */ + @JsonIgnore + public Optional processId() { + return processId; + } + + /** + * Unique identifier to a game session or match. Use the default system generated ID or overwrite it with your own. + * Note: error will be returned if `roomId` is not globally unique. + */ + @JsonIgnore + public String roomId() { + return roomId; + } + + @JsonIgnore + public RoomReadyStatus status() { + return status; + } + + public final static Builder builder() { + return new Builder(); + } + + public RoomAllocationData withAdditionalExposedPorts(List additionalExposedPorts) { + Utils.checkNotNull(additionalExposedPorts, "additionalExposedPorts"); + this.additionalExposedPorts = additionalExposedPorts; + return this; + } + + /** + * Connection details for an active process. + */ + public RoomAllocationData withExposedPort(ExposedPort exposedPort) { + Utils.checkNotNull(exposedPort, "exposedPort"); + this.exposedPort = Optional.ofNullable(exposedPort); + return this; + } + + /** + * Connection details for an active process. + */ + public RoomAllocationData withExposedPort(Optional exposedPort) { + Utils.checkNotNull(exposedPort, "exposedPort"); + this.exposedPort = exposedPort; + return this; + } + + /** + * System generated unique identifier to a runtime instance of your game server. + */ + public RoomAllocationData withProcessId(String processId) { + Utils.checkNotNull(processId, "processId"); + this.processId = Optional.ofNullable(processId); + return this; + } + + /** + * System generated unique identifier to a runtime instance of your game server. + */ + public RoomAllocationData withProcessId(Optional processId) { + Utils.checkNotNull(processId, "processId"); + this.processId = processId; + return this; + } + + /** + * Unique identifier to a game session or match. Use the default system generated ID or overwrite it with your own. + * Note: error will be returned if `roomId` is not globally unique. + */ + public RoomAllocationData withRoomId(String roomId) { + Utils.checkNotNull(roomId, "roomId"); + this.roomId = roomId; + return this; + } + + public RoomAllocationData withStatus(RoomReadyStatus status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RoomAllocationData other = (RoomAllocationData) o; + return + Objects.deepEquals(this.additionalExposedPorts, other.additionalExposedPorts) && + Objects.deepEquals(this.exposedPort, other.exposedPort) && + Objects.deepEquals(this.processId, other.processId) && + Objects.deepEquals(this.roomId, other.roomId) && + Objects.deepEquals(this.status, other.status); + } + + @Override + public int hashCode() { + return Objects.hash( + additionalExposedPorts, + exposedPort, + processId, + roomId, + status); + } + + @Override + public String toString() { + return Utils.toString(RoomAllocationData.class, + "additionalExposedPorts", additionalExposedPorts, + "exposedPort", exposedPort, + "processId", processId, + "roomId", roomId, + "status", status); + } + + public final static class Builder { + + private List additionalExposedPorts; + + private Optional exposedPort = Optional.empty(); + + private Optional processId = Optional.empty(); + + private String roomId; + + private RoomReadyStatus status; + + private Builder() { + // force use of static builder() method + } + + public Builder additionalExposedPorts(List additionalExposedPorts) { + Utils.checkNotNull(additionalExposedPorts, "additionalExposedPorts"); + this.additionalExposedPorts = additionalExposedPorts; + return this; + } + + /** + * Connection details for an active process. + */ + public Builder exposedPort(ExposedPort exposedPort) { + Utils.checkNotNull(exposedPort, "exposedPort"); + this.exposedPort = Optional.ofNullable(exposedPort); + return this; + } + + /** + * Connection details for an active process. + */ + public Builder exposedPort(Optional exposedPort) { + Utils.checkNotNull(exposedPort, "exposedPort"); + this.exposedPort = exposedPort; + return this; + } + + /** + * System generated unique identifier to a runtime instance of your game server. + */ + public Builder processId(String processId) { + Utils.checkNotNull(processId, "processId"); + this.processId = Optional.ofNullable(processId); + return this; + } + + /** + * System generated unique identifier to a runtime instance of your game server. + */ + public Builder processId(Optional processId) { + Utils.checkNotNull(processId, "processId"); + this.processId = processId; + return this; + } + + /** + * Unique identifier to a game session or match. Use the default system generated ID or overwrite it with your own. + * Note: error will be returned if `roomId` is not globally unique. + */ + public Builder roomId(String roomId) { + Utils.checkNotNull(roomId, "roomId"); + this.roomId = roomId; + return this; + } + + public Builder status(RoomReadyStatus status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public RoomAllocationData build() { + return new RoomAllocationData( + additionalExposedPorts, + exposedPort, + processId, + roomId, + status); + } + } +} +