From 9c84b8d263aa78905d57592e6eb3ea2794b49c5e Mon Sep 17 00:00:00 2001 From: MasterPtato Date: Fri, 4 Jul 2025 01:25:57 +0000 Subject: [PATCH] fix: even more actor api changes --- .../errors/actor/build/invalid_config.md | 9 - .../{actor => }/build/invalid_patch_config.md | 4 +- packages/common/util/core/src/serde.rs | 6 + .../core/api/actor/src/route/actors/v1/mod.rs | 104 +++-- packages/core/api/actor/src/route/builds.rs | 82 +--- packages/core/services/build/Cargo.toml | 1 + .../20250508204859_alloc_type.down.sql | 0 .../20250508204859_alloc_type.up.sql | 3 - .../20250508204859_runtime.down.sql | 2 + .../migrations/20250508204859_runtime.up.sql | 2 + .../20250520152659_resources.down.sql | 0 .../20250520152659_resources.up.sql | 3 - .../core/services/build/src/ops/create.rs | 149 ++++-- packages/core/services/build/src/ops/get.rs | 27 +- .../core/services/build/src/ops/patch_tags.rs | 2 +- packages/core/services/build/src/types.rs | 413 +++++++++++++++-- .../edge/api/actor/src/route/actors/mod.rs | 119 ++--- .../edge/api/actor/src/route/actors/v1.rs | 9 +- .../edge/api/actor/src/route/containers.rs | 118 ++--- .../services/pegboard/src/keys/datacenter.rs | 16 +- .../services/pegboard/src/ops/actor/get.rs | 8 +- .../services/pegboard/src/ops/actor/v1/get.rs | 4 +- .../edge/services/pegboard/src/protocol.rs | 17 +- packages/edge/services/pegboard/src/types.rs | 302 +++++-------- .../pegboard/src/workflows/actor/analytics.rs | 4 - .../pegboard/src/workflows/actor/destroy.rs | 18 +- .../src/workflows/actor/migrations.rs | 2 - .../pegboard/src/workflows/actor/mod.rs | 94 ++-- .../pegboard/src/workflows/actor/runtime.rs | 214 +++++---- .../pegboard/src/workflows/actor/setup.rs | 199 ++++---- .../pegboard/src/workflows/client/mod.rs | 19 +- .../usage-metrics-publish/src/lib.rs | 42 +- .../fern/definition/actors/__package__.yml | 19 +- sdks/api/fern/definition/actors/common.yml | 51 +-- sdks/api/fern/definition/actors/v1/common.yml | 7 +- .../fern/definition/builds/__package__.yml | 3 +- sdks/api/fern/definition/builds/common.yml | 60 ++- .../definition/containers/__package__.yml | 40 +- .../api/fern/definition/containers/common.yml | 74 +-- sdks/api/full/go/actors/actors.go | 17 +- sdks/api/full/go/actors/types.go | 381 +--------------- sdks/api/full/go/actors/v1/types.go | 3 +- sdks/api/full/go/builds/builds.go | 3 +- sdks/api/full/go/builds/types.go | 354 +++++++++++---- sdks/api/full/go/containers/containers.go | 22 +- sdks/api/full/go/containers/types.go | 419 +---------------- sdks/api/full/openapi/openapi.yml | 425 +++++++----------- sdks/api/full/openapi_compat/openapi.yml | 425 +++++++----------- sdks/api/full/rust/.openapi-generator/FILES | 63 ++- sdks/api/full/rust/README.md | 30 +- sdks/api/full/rust/docs/ActorsActor.md | 7 +- .../docs/ActorsCreateActorNetworkRequest.md | 13 - .../rust/docs/ActorsCreateActorRequest.md | 7 +- sdks/api/full/rust/docs/ActorsLifecycle.md | 12 - sdks/api/full/rust/docs/ActorsPort.md | 4 +- sdks/api/full/rust/docs/ActorsV1Resources.md | 2 +- sdks/api/full/rust/docs/BuildsAllocation.md | 12 - .../full/rust/docs/BuildsAllocationMulti.md | 11 - sdks/api/full/rust/docs/BuildsBuild.md | 3 +- .../rust/docs/BuildsNetworkMode.md} | 2 +- ...sPortProtocol.md => BuildsPortProtocol.md} | 2 +- ...torPortRequest.md => BuildsPortRequest.md} | 6 +- ...orsPortRouting.md => BuildsPortRouting.md} | 2 +- .../rust/docs/BuildsPrepareBuildRequest.md | 3 +- sdks/api/full/rust/docs/BuildsResources.md | 2 +- .../{ActorsNetwork.md => BuildsRuntime.md} | 6 +- ...untimeRequest.md => BuildsRuntimeActor.md} | 7 +- ...rsRuntime.md => BuildsRuntimeContainer.md} | 6 +- .../api/full/rust/docs/ContainersContainer.md | 11 +- ...ContainersCreateContainerNetworkRequest.md | 13 - .../ContainersCreateContainerPortRequest.md | 13 - .../docs/ContainersCreateContainerRequest.md | 11 +- ...ersCreateContainerRuntimeNetworkRequest.md | 11 - .../api/full/rust/docs/ContainersLifecycle.md | 12 - sdks/api/full/rust/docs/ContainersNetwork.md | 12 - .../full/rust/docs/ContainersNetworkMode.md | 10 - sdks/api/full/rust/docs/ContainersPort.md | 4 +- .../full/rust/docs/ContainersPortProtocol.md | 10 - .../full/rust/docs/ContainersPortRouting.md | 12 - .../api/full/rust/docs/ContainersResources.md | 12 - sdks/api/full/rust/src/models/actors_actor.rs | 28 +- .../actors_create_actor_network_request.rs | 30 -- .../src/models/actors_create_actor_request.rs | 29 +- ...rs_create_actor_runtime_network_request.rs | 23 - .../actors_create_actor_runtime_request.rs | 26 -- .../full/rust/src/models/actors_lifecycle.rs | 28 -- .../full/rust/src/models/actors_network.rs | 26 -- sdks/api/full/rust/src/models/actors_port.rs | 8 +- .../full/rust/src/models/actors_runtime.rs | 29 -- .../rust/src/models/actors_v1_resources.rs | 2 +- .../full/rust/src/models/builds_allocation.rs | 26 -- .../src/models/builds_allocation_multi.rs | 21 - sdks/api/full/rust/src/models/builds_build.rs | 9 +- ...network_mode.rs => builds_network_mode.rs} | 8 +- ...rt_protocol.rs => builds_port_protocol.rs} | 8 +- ...port_request.rs => builds_port_request.rs} | 12 +- ...port_routing.rs => builds_port_routing.rs} | 8 +- .../models/builds_prepare_build_request.rs | 9 +- .../full/rust/src/models/builds_resources.rs | 2 +- .../full/rust/src/models/builds_runtime.rs | 26 ++ .../rust/src/models/builds_runtime_actor.rs | 35 ++ ...runtime.rs => builds_runtime_container.rs} | 20 +- .../rust/src/models/containers_container.rs | 38 +- ...ainers_create_container_network_request.rs | 31 -- ...ontainers_create_container_port_request.rs | 31 -- .../containers_create_container_request.rs | 39 +- ...reate_container_runtime_network_request.rs | 23 - ...ainers_create_container_runtime_request.rs | 26 -- .../rust/src/models/containers_lifecycle.rs | 28 -- .../rust/src/models/containers_network.rs | 26 -- .../src/models/containers_network_mode.rs | 33 -- .../full/rust/src/models/containers_port.rs | 8 +- .../src/models/containers_port_protocol.rs | 42 -- .../src/models/containers_port_routing.rs | 26 -- .../rust/src/models/containers_resources.rs | 25 -- sdks/api/full/rust/src/models/mod.rs | 57 +-- .../src/api/resources/actors/client/Client.ts | 19 +- .../requests/CreateActorRequestQuery.ts | 19 +- .../actors/resources/common/types/Actor.ts | 9 +- .../resources/common/types/Lifecycle.ts | 10 - .../actors/resources/common/types/Port.ts | 4 +- .../actors/resources/common/types/Runtime.ts | 9 - .../actors/resources/common/types/index.ts | 8 - .../actors/resources/v1/client/Client.ts | 16 +- .../v1/resources/common/types/Network.ts | 1 + .../v1/resources/common/types/Resources.ts | 2 +- .../v1/resources/logs/client/Client.ts | 6 +- .../v1/resources/metrics/client/Client.ts | 6 +- .../actors/types/CreateActorNetworkRequest.ts | 11 - .../actors/types/CreateActorPortRequest.ts | 11 - .../actors/types/CreateActorRequest.ts | 9 +- .../types/CreateActorRuntimeNetworkRequest.ts | 9 - .../actors/types/CreateActorRuntimeRequest.ts | 10 - .../src/api/resources/actors/types/index.ts | 4 - .../src/api/resources/builds/client/Client.ts | 21 +- .../requests/PrepareBuildRequestQuery.ts | 21 +- .../resources/common/types/Allocation.ts | 10 - .../resources/common/types/AllocationMulti.ts | 7 - .../common/types/AllocationSingle.ts | 5 - .../builds/resources/common/types/Build.ts | 3 +- .../resources/common/types/GuardRouting.ts | 0 .../resources/common/types/HostRouting.ts | 0 .../builds/resources/common/types/Kind.ts | 1 + .../resources/common/types/NetworkMode.ts | 0 .../resources/common/types/PortProtocol.ts | 0 .../resources/common/types/PortRequest.ts | 11 + .../resources/common/types/PortRouting.ts | 4 +- .../resources/common/types/Resources.ts | 2 +- .../resources/common/types/Runtime.ts} | 6 +- .../resources/common/types/RuntimeActor.ts | 13 + .../common/types/RuntimeContainer.ts | 11 + .../builds/resources/common/types/index.ts | 12 +- .../builds/types/PrepareBuildRequest.ts | 3 +- .../api/resources/containers/client/Client.ts | 41 +- .../requests/CreateContainerRequestQuery.ts | 25 +- .../resources/common/types/Container.ts | 13 +- .../resources/common/types/Lifecycle.ts | 10 - .../resources/common/types/Network.ts | 10 - .../containers/resources/common/types/Port.ts | 4 +- .../resources/common/types/PortRouting.ts | 10 - .../resources/common/types/Resources.ts | 14 - .../resources/common/types/Runtime.ts | 9 - .../resources/common/types/index.ts | 9 - .../resources/logs/client/Client.ts | 6 +- .../resources/metrics/client/Client.ts | 6 +- .../types/CreateContainerNetworkRequest.ts | 11 - .../types/CreateContainerPortRequest.ts | 11 - .../types/CreateContainerRequest.ts | 13 +- .../CreateContainerRuntimeNetworkRequest.ts | 9 - .../types/CreateContainerRuntimeRequest.ts | 10 - .../api/resources/containers/types/index.ts | 4 - .../actors/resources/common/types/Actor.ts | 18 +- .../resources/common/types/Lifecycle.ts | 20 - .../actors/resources/common/types/Network.ts | 22 - .../actors/resources/common/types/Port.ts | 4 +- .../actors/resources/common/types/index.ts | 8 - .../actors/types/CreateActorNetworkRequest.ts | 26 -- .../actors/types/CreateActorPortRequest.ts | 26 -- .../actors/types/CreateActorRequest.ts | 18 +- .../types/CreateActorRuntimeNetworkRequest.ts | 21 - .../actors/types/CreateActorRuntimeRequest.ts | 23 - .../resources/actors/types/index.ts | 4 - .../resources/common/types/Allocation.ts | 22 - .../resources/common/types/AllocationMulti.ts | 20 - .../common/types/AllocationSingle.ts | 16 - .../builds/resources/common/types/Build.ts | 9 +- .../resources/common/types/GuardRouting.ts | 4 +- .../resources/common/types/HostRouting.ts | 4 +- .../resources/common/types/NetworkMode.ts | 2 +- .../resources/common/types/PortProtocol.ts | 2 +- .../resources/common/types/PortRequest.ts | 26 ++ .../resources/common/types/PortRouting.ts | 4 +- .../resources/common/types/Runtime.ts | 14 +- .../resources/common/types/RuntimeActor.ts | 31 ++ .../common/types/RuntimeContainer.ts | 26 ++ .../builds/resources/common/types/index.ts | 12 +- .../builds/types/PrepareBuildRequest.ts | 9 +- .../resources/common/types/Container.ts | 24 +- .../resources/common/types/GuardRouting.ts | 16 - .../resources/common/types/HostRouting.ts | 16 - .../resources/common/types/Lifecycle.ts | 22 - .../resources/common/types/Network.ts | 22 - .../resources/common/types/NetworkMode.ts | 16 - .../containers/resources/common/types/Port.ts | 4 +- .../resources/common/types/PortProtocol.ts | 16 - .../resources/common/types/PortRouting.ts | 24 - .../resources/common/types/Resources.ts | 22 - .../resources/common/types/Runtime.ts | 22 - .../resources/common/types/index.ts | 9 - .../types/CreateContainerNetworkRequest.ts | 26 -- .../types/CreateContainerPortRequest.ts | 26 -- .../types/CreateContainerRequest.ts | 25 +- .../CreateContainerRuntimeNetworkRequest.ts | 21 - .../types/CreateContainerRuntimeRequest.ts | 23 - .../resources/containers/types/index.ts | 4 - sdks/api/runtime/go/actors/actors.go | 17 +- sdks/api/runtime/go/actors/types.go | 381 +--------------- sdks/api/runtime/go/builds/builds.go | 3 +- sdks/api/runtime/go/builds/types.go | 354 +++++++++++---- sdks/api/runtime/go/containers/containers.go | 22 +- sdks/api/runtime/go/containers/types.go | 419 +---------------- sdks/api/runtime/openapi/openapi.yml | 422 +++++++---------- sdks/api/runtime/openapi_compat/openapi.yml | 422 +++++++---------- .../api/runtime/rust/.openapi-generator/FILES | 62 ++- sdks/api/runtime/rust/README.md | 30 +- sdks/api/runtime/rust/docs/ActorsActor.md | 7 +- .../docs/ActorsCreateActorNetworkRequest.md | 13 - .../rust/docs/ActorsCreateActorRequest.md | 7 +- .../ActorsCreateActorRuntimeNetworkRequest.md | 11 - .../docs/ActorsCreateActorRuntimeRequest.md | 12 - sdks/api/runtime/rust/docs/ActorsLifecycle.md | 12 - sdks/api/runtime/rust/docs/ActorsNetwork.md | 12 - sdks/api/runtime/rust/docs/ActorsPort.md | 4 +- sdks/api/runtime/rust/docs/ActorsRuntime.md | 13 - .../api/runtime/rust/docs/BuildsAllocation.md | 12 - .../rust/docs/BuildsAllocationMulti.md | 11 - sdks/api/runtime/rust/docs/BuildsBuild.md | 3 +- .../rust/docs/BuildsNetworkMode.md} | 2 +- ...sPortProtocol.md => BuildsPortProtocol.md} | 2 +- ...torPortRequest.md => BuildsPortRequest.md} | 6 +- ...orsPortRouting.md => BuildsPortRouting.md} | 2 +- .../rust/docs/BuildsPrepareBuildRequest.md | 3 +- sdks/api/runtime/rust/docs/BuildsResources.md | 2 +- .../rust/docs/BuildsRuntime.md} | 5 +- .../rust/docs/BuildsRuntimeActor.md} | 7 +- .../rust/docs/BuildsRuntimeContainer.md} | 6 +- .../runtime/rust/docs/ContainersContainer.md | 11 +- ...ContainersCreateContainerNetworkRequest.md | 13 - .../ContainersCreateContainerPortRequest.md | 13 - .../docs/ContainersCreateContainerRequest.md | 11 +- ...ersCreateContainerRuntimeNetworkRequest.md | 11 - ...ContainersCreateContainerRuntimeRequest.md | 12 - .../runtime/rust/docs/ContainersLifecycle.md | 12 - .../runtime/rust/docs/ContainersNetwork.md | 12 - .../rust/docs/ContainersNetworkMode.md | 10 - sdks/api/runtime/rust/docs/ContainersPort.md | 4 +- .../rust/docs/ContainersPortProtocol.md | 10 - .../rust/docs/ContainersPortRouting.md | 12 - .../runtime/rust/docs/ContainersResources.md | 12 - .../runtime/rust/docs/ContainersRuntime.md | 13 - .../runtime/rust/src/models/actors_actor.rs | 25 +- .../actors_create_actor_network_request.rs | 34 -- .../src/models/actors_create_actor_request.rs | 23 +- ...rs_create_actor_runtime_network_request.rs | 28 -- .../rust/src/models/actors_lifecycle.rs | 33 -- .../runtime/rust/src/models/actors_network.rs | 31 -- .../runtime/rust/src/models/actors_port.rs | 6 +- .../runtime/rust/src/models/actors_runtime.rs | 34 -- .../rust/src/models/builds_allocation.rs | 31 -- .../src/models/builds_allocation_multi.rs | 28 -- .../runtime/rust/src/models/builds_build.rs | 9 +- ...network_mode.rs => builds_network_mode.rs} | 8 +- ...rt_protocol.rs => builds_port_protocol.rs} | 8 +- ...port_request.rs => builds_port_request.rs} | 12 +- ...port_routing.rs => builds_port_routing.rs} | 8 +- .../models/builds_prepare_build_request.rs | 9 +- .../rust/src/models/builds_resources.rs | 2 +- .../runtime/rust/src/models/builds_runtime.rs | 31 ++ .../rust/src/models/builds_runtime_actor.rs | 40 ++ ...request.rs => builds_runtime_container.rs} | 17 +- .../rust/src/models/containers_container.rs | 33 +- ...ainers_create_container_network_request.rs | 34 -- ...ontainers_create_container_port_request.rs | 34 -- .../containers_create_container_request.rs | 33 +- ...reate_container_runtime_network_request.rs | 28 -- ...ainers_create_container_runtime_request.rs | 31 -- .../rust/src/models/containers_lifecycle.rs | 33 -- .../rust/src/models/containers_network.rs | 31 -- .../src/models/containers_network_mode.rs | 39 -- .../rust/src/models/containers_port.rs | 6 +- .../src/models/containers_port_protocol.rs | 48 -- .../src/models/containers_port_routing.rs | 31 -- .../rust/src/models/containers_resources.rs | 33 -- .../rust/src/models/containers_runtime.rs | 34 -- sdks/api/runtime/rust/src/models/mod.rs | 57 +-- .../src/api/resources/actors/client/Client.ts | 19 +- .../requests/CreateActorRequestQuery.ts | 19 +- .../actors/resources/common/types/Actor.ts | 9 +- .../resources/common/types/GuardRouting.ts | 5 - .../resources/common/types/HostRouting.ts | 5 - .../resources/common/types/Lifecycle.ts | 10 - .../resources/common/types/NetworkMode.ts | 9 - .../actors/resources/common/types/Port.ts | 4 +- .../resources/common/types/PortProtocol.ts | 12 - .../actors/resources/common/types/Runtime.ts | 9 - .../actors/resources/common/types/index.ts | 8 - .../actors/resources/metrics/client/Client.ts | 6 +- .../actors/types/CreateActorNetworkRequest.ts | 11 - .../actors/types/CreateActorPortRequest.ts | 11 - .../actors/types/CreateActorRequest.ts | 9 +- .../types/CreateActorRuntimeNetworkRequest.ts | 9 - .../actors/types/CreateActorRuntimeRequest.ts | 10 - .../src/api/resources/actors/types/index.ts | 4 - .../src/api/resources/builds/client/Client.ts | 14 +- .../requests/PrepareBuildRequestQuery.ts | 14 +- .../resources/common/types/Allocation.ts | 10 - .../resources/common/types/AllocationMulti.ts | 7 - .../common/types/AllocationSingle.ts | 5 - .../builds/resources/common/types/Build.ts | 3 +- .../resources/common/types/GuardRouting.ts | 0 .../resources/common/types/HostRouting.ts | 0 .../builds/resources/common/types/Kind.ts | 1 + .../resources/common/types/NetworkMode.ts | 0 .../resources/common/types/PortProtocol.ts | 0 .../resources/common/types/PortRequest.ts | 11 + .../resources/common/types/PortRouting.ts | 4 +- .../resources/common/types/Resources.ts | 2 +- .../resources/common/types/Runtime.ts} | 6 +- .../resources/common/types/RuntimeActor.ts | 13 + .../common/types/RuntimeContainer.ts | 11 + .../builds/resources/common/types/index.ts | 12 +- .../builds/types/PrepareBuildRequest.ts | 3 +- .../api/resources/containers/client/Client.ts | 39 +- .../requests/CreateContainerRequestQuery.ts | 23 +- .../resources/common/types/Container.ts | 13 +- .../resources/common/types/GuardRouting.ts | 5 - .../resources/common/types/HostRouting.ts | 5 - .../resources/common/types/Lifecycle.ts | 10 - .../resources/common/types/Network.ts | 10 - .../resources/common/types/NetworkMode.ts | 9 - .../containers/resources/common/types/Port.ts | 4 +- .../resources/common/types/PortProtocol.ts | 12 - .../resources/common/types/PortRouting.ts | 10 - .../resources/common/types/Resources.ts | 14 - .../resources/common/types/Runtime.ts | 9 - .../resources/common/types/index.ts | 9 - .../resources/logs/client/Client.ts | 6 +- .../resources/metrics/client/Client.ts | 6 +- .../types/CreateContainerNetworkRequest.ts | 11 - .../types/CreateContainerPortRequest.ts | 11 - .../types/CreateContainerRequest.ts | 13 +- .../CreateContainerRuntimeNetworkRequest.ts | 9 - .../types/CreateContainerRuntimeRequest.ts | 10 - .../api/resources/containers/types/index.ts | 4 - .../actors/resources/common/types/Actor.ts | 18 +- .../resources/common/types/Lifecycle.ts | 20 - .../actors/resources/common/types/Network.ts | 22 - .../actors/resources/common/types/Port.ts | 4 +- .../actors/resources/common/types/index.ts | 8 - .../actors/types/CreateActorNetworkRequest.ts | 26 -- .../actors/types/CreateActorPortRequest.ts | 26 -- .../actors/types/CreateActorRequest.ts | 18 +- .../types/CreateActorRuntimeNetworkRequest.ts | 21 - .../actors/types/CreateActorRuntimeRequest.ts | 23 - .../resources/actors/types/index.ts | 4 - .../resources/common/types/Allocation.ts | 22 - .../resources/common/types/AllocationMulti.ts | 20 - .../common/types/AllocationSingle.ts | 16 - .../builds/resources/common/types/Build.ts | 9 +- .../resources/common/types/GuardRouting.ts | 4 +- .../resources/common/types/HostRouting.ts | 4 +- .../resources/common/types/NetworkMode.ts | 2 +- .../resources/common/types/PortProtocol.ts | 2 +- .../resources/common/types/PortRequest.ts | 26 ++ .../resources/common/types/PortRouting.ts | 4 +- .../resources/common/types/Runtime.ts | 14 +- .../resources/common/types/RuntimeActor.ts | 31 ++ .../common/types/RuntimeContainer.ts | 26 ++ .../builds/resources/common/types/index.ts | 12 +- .../builds/types/PrepareBuildRequest.ts | 9 +- .../resources/common/types/Container.ts | 24 +- .../resources/common/types/GuardRouting.ts | 16 - .../resources/common/types/HostRouting.ts | 16 - .../resources/common/types/Lifecycle.ts | 22 - .../resources/common/types/Network.ts | 22 - .../resources/common/types/NetworkMode.ts | 16 - .../containers/resources/common/types/Port.ts | 4 +- .../resources/common/types/PortProtocol.ts | 16 - .../resources/common/types/PortRouting.ts | 24 - .../resources/common/types/Resources.ts | 22 - .../resources/common/types/Runtime.ts | 22 - .../resources/common/types/index.ts | 9 - .../types/CreateContainerNetworkRequest.ts | 26 -- .../types/CreateContainerPortRequest.ts | 26 -- .../types/CreateContainerRequest.ts | 25 +- .../CreateContainerRuntimeNetworkRequest.ts | 21 - .../types/CreateContainerRuntimeRequest.ts | 23 - .../resources/containers/types/index.ts | 4 - 398 files changed, 3748 insertions(+), 7579 deletions(-) delete mode 100644 packages/common/formatted-error/errors/actor/build/invalid_config.md rename packages/common/formatted-error/errors/{actor => }/build/invalid_patch_config.md (62%) delete mode 100644 packages/core/services/build/db/build/migrations/20250508204859_alloc_type.down.sql delete mode 100644 packages/core/services/build/db/build/migrations/20250508204859_alloc_type.up.sql create mode 100644 packages/core/services/build/db/build/migrations/20250508204859_runtime.down.sql create mode 100644 packages/core/services/build/db/build/migrations/20250508204859_runtime.up.sql delete mode 100644 packages/core/services/build/db/build/migrations/20250520152659_resources.down.sql delete mode 100644 packages/core/services/build/db/build/migrations/20250520152659_resources.up.sql delete mode 100644 sdks/api/full/rust/docs/ActorsCreateActorNetworkRequest.md delete mode 100644 sdks/api/full/rust/docs/ActorsLifecycle.md delete mode 100644 sdks/api/full/rust/docs/BuildsAllocation.md delete mode 100644 sdks/api/full/rust/docs/BuildsAllocationMulti.md rename sdks/api/{runtime/rust/docs/ActorsNetworkMode.md => full/rust/docs/BuildsNetworkMode.md} (93%) rename sdks/api/full/rust/docs/{ActorsPortProtocol.md => BuildsPortProtocol.md} (92%) rename sdks/api/full/rust/docs/{ActorsCreateActorPortRequest.md => BuildsPortRequest.md} (64%) rename sdks/api/full/rust/docs/{ActorsPortRouting.md => BuildsPortRouting.md} (95%) rename sdks/api/full/rust/docs/{ActorsNetwork.md => BuildsRuntime.md} (54%) rename sdks/api/full/rust/docs/{ContainersCreateContainerRuntimeRequest.md => BuildsRuntimeActor.md} (50%) rename sdks/api/full/rust/docs/{ContainersRuntime.md => BuildsRuntimeContainer.md} (58%) delete mode 100644 sdks/api/full/rust/docs/ContainersCreateContainerNetworkRequest.md delete mode 100644 sdks/api/full/rust/docs/ContainersCreateContainerPortRequest.md delete mode 100644 sdks/api/full/rust/docs/ContainersCreateContainerRuntimeNetworkRequest.md delete mode 100644 sdks/api/full/rust/docs/ContainersLifecycle.md delete mode 100644 sdks/api/full/rust/docs/ContainersNetwork.md delete mode 100644 sdks/api/full/rust/docs/ContainersNetworkMode.md delete mode 100644 sdks/api/full/rust/docs/ContainersPortProtocol.md delete mode 100644 sdks/api/full/rust/docs/ContainersPortRouting.md delete mode 100644 sdks/api/full/rust/docs/ContainersResources.md delete mode 100644 sdks/api/full/rust/src/models/actors_create_actor_network_request.rs delete mode 100644 sdks/api/full/rust/src/models/actors_create_actor_runtime_network_request.rs delete mode 100644 sdks/api/full/rust/src/models/actors_create_actor_runtime_request.rs delete mode 100644 sdks/api/full/rust/src/models/actors_lifecycle.rs delete mode 100644 sdks/api/full/rust/src/models/actors_network.rs delete mode 100644 sdks/api/full/rust/src/models/actors_runtime.rs delete mode 100644 sdks/api/full/rust/src/models/builds_allocation.rs delete mode 100644 sdks/api/full/rust/src/models/builds_allocation_multi.rs rename sdks/api/full/rust/src/models/{actors_network_mode.rs => builds_network_mode.rs} (80%) rename sdks/api/full/rust/src/models/{actors_port_protocol.rs => builds_port_protocol.rs} (84%) rename sdks/api/full/rust/src/models/{actors_create_actor_port_request.rs => builds_port_request.rs} (64%) rename sdks/api/full/rust/src/models/{actors_port_routing.rs => builds_port_routing.rs} (82%) create mode 100644 sdks/api/full/rust/src/models/builds_runtime.rs create mode 100644 sdks/api/full/rust/src/models/builds_runtime_actor.rs rename sdks/api/full/rust/src/models/{containers_runtime.rs => builds_runtime_container.rs} (50%) delete mode 100644 sdks/api/full/rust/src/models/containers_create_container_network_request.rs delete mode 100644 sdks/api/full/rust/src/models/containers_create_container_port_request.rs delete mode 100644 sdks/api/full/rust/src/models/containers_create_container_runtime_network_request.rs delete mode 100644 sdks/api/full/rust/src/models/containers_create_container_runtime_request.rs delete mode 100644 sdks/api/full/rust/src/models/containers_lifecycle.rs delete mode 100644 sdks/api/full/rust/src/models/containers_network.rs delete mode 100644 sdks/api/full/rust/src/models/containers_network_mode.rs delete mode 100644 sdks/api/full/rust/src/models/containers_port_protocol.rs delete mode 100644 sdks/api/full/rust/src/models/containers_port_routing.rs delete mode 100644 sdks/api/full/rust/src/models/containers_resources.rs delete mode 100644 sdks/api/full/typescript/src/api/resources/actors/resources/common/types/Lifecycle.ts delete mode 100644 sdks/api/full/typescript/src/api/resources/actors/resources/common/types/Runtime.ts delete mode 100644 sdks/api/full/typescript/src/api/resources/actors/types/CreateActorNetworkRequest.ts delete mode 100644 sdks/api/full/typescript/src/api/resources/actors/types/CreateActorPortRequest.ts delete mode 100644 sdks/api/full/typescript/src/api/resources/actors/types/CreateActorRuntimeNetworkRequest.ts delete mode 100644 sdks/api/full/typescript/src/api/resources/actors/types/CreateActorRuntimeRequest.ts delete mode 100644 sdks/api/full/typescript/src/api/resources/builds/resources/common/types/Allocation.ts delete mode 100644 sdks/api/full/typescript/src/api/resources/builds/resources/common/types/AllocationMulti.ts delete mode 100644 sdks/api/full/typescript/src/api/resources/builds/resources/common/types/AllocationSingle.ts rename sdks/api/full/typescript/src/api/resources/{actors => builds}/resources/common/types/GuardRouting.ts (100%) rename sdks/api/full/typescript/src/api/resources/{actors => builds}/resources/common/types/HostRouting.ts (100%) rename sdks/api/full/typescript/src/api/resources/{actors => builds}/resources/common/types/NetworkMode.ts (100%) rename sdks/api/full/typescript/src/api/resources/{actors => builds}/resources/common/types/PortProtocol.ts (100%) create mode 100644 sdks/api/full/typescript/src/api/resources/builds/resources/common/types/PortRequest.ts rename sdks/api/{runtime/typescript/src/api/resources/actors => full/typescript/src/api/resources/builds}/resources/common/types/PortRouting.ts (67%) rename sdks/api/full/typescript/src/api/resources/{actors/resources/common/types/Network.ts => builds/resources/common/types/Runtime.ts} (52%) create mode 100644 sdks/api/full/typescript/src/api/resources/builds/resources/common/types/RuntimeActor.ts create mode 100644 sdks/api/full/typescript/src/api/resources/builds/resources/common/types/RuntimeContainer.ts delete mode 100644 sdks/api/full/typescript/src/api/resources/containers/resources/common/types/Lifecycle.ts delete mode 100644 sdks/api/full/typescript/src/api/resources/containers/resources/common/types/Network.ts delete mode 100644 sdks/api/full/typescript/src/api/resources/containers/resources/common/types/PortRouting.ts delete mode 100644 sdks/api/full/typescript/src/api/resources/containers/resources/common/types/Resources.ts delete mode 100644 sdks/api/full/typescript/src/api/resources/containers/resources/common/types/Runtime.ts delete mode 100644 sdks/api/full/typescript/src/api/resources/containers/types/CreateContainerNetworkRequest.ts delete mode 100644 sdks/api/full/typescript/src/api/resources/containers/types/CreateContainerPortRequest.ts delete mode 100644 sdks/api/full/typescript/src/api/resources/containers/types/CreateContainerRuntimeNetworkRequest.ts delete mode 100644 sdks/api/full/typescript/src/api/resources/containers/types/CreateContainerRuntimeRequest.ts delete mode 100644 sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/Lifecycle.ts delete mode 100644 sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/Network.ts delete mode 100644 sdks/api/full/typescript/src/serialization/resources/actors/types/CreateActorNetworkRequest.ts delete mode 100644 sdks/api/full/typescript/src/serialization/resources/actors/types/CreateActorPortRequest.ts delete mode 100644 sdks/api/full/typescript/src/serialization/resources/actors/types/CreateActorRuntimeNetworkRequest.ts delete mode 100644 sdks/api/full/typescript/src/serialization/resources/actors/types/CreateActorRuntimeRequest.ts delete mode 100644 sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/Allocation.ts delete mode 100644 sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/AllocationMulti.ts delete mode 100644 sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/AllocationSingle.ts rename sdks/api/full/typescript/src/serialization/resources/{actors => builds}/resources/common/types/GuardRouting.ts (84%) rename sdks/api/{runtime/typescript/src/serialization/resources/actors => full/typescript/src/serialization/resources/builds}/resources/common/types/HostRouting.ts (85%) rename sdks/api/{runtime/typescript/src/serialization/resources/actors => full/typescript/src/serialization/resources/builds}/resources/common/types/NetworkMode.ts (89%) rename sdks/api/{runtime/typescript/src/serialization/resources/actors => full/typescript/src/serialization/resources/builds}/resources/common/types/PortProtocol.ts (89%) create mode 100644 sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/PortRequest.ts rename sdks/api/full/typescript/src/serialization/resources/{actors => builds}/resources/common/types/PortRouting.ts (90%) rename sdks/api/full/typescript/src/serialization/resources/{actors => builds}/resources/common/types/Runtime.ts (50%) create mode 100644 sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/RuntimeActor.ts create mode 100644 sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/RuntimeContainer.ts delete mode 100644 sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/GuardRouting.ts delete mode 100644 sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/HostRouting.ts delete mode 100644 sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/Lifecycle.ts delete mode 100644 sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/Network.ts delete mode 100644 sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/NetworkMode.ts delete mode 100644 sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/PortProtocol.ts delete mode 100644 sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/PortRouting.ts delete mode 100644 sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/Resources.ts delete mode 100644 sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/Runtime.ts delete mode 100644 sdks/api/full/typescript/src/serialization/resources/containers/types/CreateContainerNetworkRequest.ts delete mode 100644 sdks/api/full/typescript/src/serialization/resources/containers/types/CreateContainerPortRequest.ts delete mode 100644 sdks/api/full/typescript/src/serialization/resources/containers/types/CreateContainerRuntimeNetworkRequest.ts delete mode 100644 sdks/api/full/typescript/src/serialization/resources/containers/types/CreateContainerRuntimeRequest.ts delete mode 100644 sdks/api/runtime/rust/docs/ActorsCreateActorNetworkRequest.md delete mode 100644 sdks/api/runtime/rust/docs/ActorsCreateActorRuntimeNetworkRequest.md delete mode 100644 sdks/api/runtime/rust/docs/ActorsCreateActorRuntimeRequest.md delete mode 100644 sdks/api/runtime/rust/docs/ActorsLifecycle.md delete mode 100644 sdks/api/runtime/rust/docs/ActorsNetwork.md delete mode 100644 sdks/api/runtime/rust/docs/ActorsRuntime.md delete mode 100644 sdks/api/runtime/rust/docs/BuildsAllocation.md delete mode 100644 sdks/api/runtime/rust/docs/BuildsAllocationMulti.md rename sdks/api/{full/rust/docs/ActorsNetworkMode.md => runtime/rust/docs/BuildsNetworkMode.md} (93%) rename sdks/api/runtime/rust/docs/{ActorsPortProtocol.md => BuildsPortProtocol.md} (92%) rename sdks/api/runtime/rust/docs/{ActorsCreateActorPortRequest.md => BuildsPortRequest.md} (64%) rename sdks/api/runtime/rust/docs/{ActorsPortRouting.md => BuildsPortRouting.md} (95%) rename sdks/api/{full/rust/docs/ActorsCreateActorRuntimeNetworkRequest.md => runtime/rust/docs/BuildsRuntime.md} (54%) rename sdks/api/{full/rust/docs/ActorsCreateActorRuntimeRequest.md => runtime/rust/docs/BuildsRuntimeActor.md} (50%) rename sdks/api/{full/rust/docs/ActorsRuntime.md => runtime/rust/docs/BuildsRuntimeContainer.md} (58%) delete mode 100644 sdks/api/runtime/rust/docs/ContainersCreateContainerNetworkRequest.md delete mode 100644 sdks/api/runtime/rust/docs/ContainersCreateContainerPortRequest.md delete mode 100644 sdks/api/runtime/rust/docs/ContainersCreateContainerRuntimeNetworkRequest.md delete mode 100644 sdks/api/runtime/rust/docs/ContainersCreateContainerRuntimeRequest.md delete mode 100644 sdks/api/runtime/rust/docs/ContainersLifecycle.md delete mode 100644 sdks/api/runtime/rust/docs/ContainersNetwork.md delete mode 100644 sdks/api/runtime/rust/docs/ContainersNetworkMode.md delete mode 100644 sdks/api/runtime/rust/docs/ContainersPortProtocol.md delete mode 100644 sdks/api/runtime/rust/docs/ContainersPortRouting.md delete mode 100644 sdks/api/runtime/rust/docs/ContainersResources.md delete mode 100644 sdks/api/runtime/rust/docs/ContainersRuntime.md delete mode 100644 sdks/api/runtime/rust/src/models/actors_create_actor_network_request.rs delete mode 100644 sdks/api/runtime/rust/src/models/actors_create_actor_runtime_network_request.rs delete mode 100644 sdks/api/runtime/rust/src/models/actors_lifecycle.rs delete mode 100644 sdks/api/runtime/rust/src/models/actors_network.rs delete mode 100644 sdks/api/runtime/rust/src/models/actors_runtime.rs delete mode 100644 sdks/api/runtime/rust/src/models/builds_allocation.rs delete mode 100644 sdks/api/runtime/rust/src/models/builds_allocation_multi.rs rename sdks/api/runtime/rust/src/models/{actors_network_mode.rs => builds_network_mode.rs} (81%) rename sdks/api/runtime/rust/src/models/{actors_port_protocol.rs => builds_port_protocol.rs} (85%) rename sdks/api/runtime/rust/src/models/{actors_create_actor_port_request.rs => builds_port_request.rs} (65%) rename sdks/api/runtime/rust/src/models/{actors_port_routing.rs => builds_port_routing.rs} (82%) create mode 100644 sdks/api/runtime/rust/src/models/builds_runtime.rs create mode 100644 sdks/api/runtime/rust/src/models/builds_runtime_actor.rs rename sdks/api/runtime/rust/src/models/{actors_create_actor_runtime_request.rs => builds_runtime_container.rs} (50%) delete mode 100644 sdks/api/runtime/rust/src/models/containers_create_container_network_request.rs delete mode 100644 sdks/api/runtime/rust/src/models/containers_create_container_port_request.rs delete mode 100644 sdks/api/runtime/rust/src/models/containers_create_container_runtime_network_request.rs delete mode 100644 sdks/api/runtime/rust/src/models/containers_create_container_runtime_request.rs delete mode 100644 sdks/api/runtime/rust/src/models/containers_lifecycle.rs delete mode 100644 sdks/api/runtime/rust/src/models/containers_network.rs delete mode 100644 sdks/api/runtime/rust/src/models/containers_network_mode.rs delete mode 100644 sdks/api/runtime/rust/src/models/containers_port_protocol.rs delete mode 100644 sdks/api/runtime/rust/src/models/containers_port_routing.rs delete mode 100644 sdks/api/runtime/rust/src/models/containers_resources.rs delete mode 100644 sdks/api/runtime/rust/src/models/containers_runtime.rs delete mode 100644 sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/GuardRouting.ts delete mode 100644 sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/HostRouting.ts delete mode 100644 sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/Lifecycle.ts delete mode 100644 sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/NetworkMode.ts delete mode 100644 sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/PortProtocol.ts delete mode 100644 sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/Runtime.ts delete mode 100644 sdks/api/runtime/typescript/src/api/resources/actors/types/CreateActorNetworkRequest.ts delete mode 100644 sdks/api/runtime/typescript/src/api/resources/actors/types/CreateActorPortRequest.ts delete mode 100644 sdks/api/runtime/typescript/src/api/resources/actors/types/CreateActorRuntimeNetworkRequest.ts delete mode 100644 sdks/api/runtime/typescript/src/api/resources/actors/types/CreateActorRuntimeRequest.ts delete mode 100644 sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/Allocation.ts delete mode 100644 sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/AllocationMulti.ts delete mode 100644 sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/AllocationSingle.ts rename sdks/api/{full/typescript/src/api/resources/containers => runtime/typescript/src/api/resources/builds}/resources/common/types/GuardRouting.ts (100%) rename sdks/api/{full/typescript/src/api/resources/containers => runtime/typescript/src/api/resources/builds}/resources/common/types/HostRouting.ts (100%) rename sdks/api/{full/typescript/src/api/resources/containers => runtime/typescript/src/api/resources/builds}/resources/common/types/NetworkMode.ts (100%) rename sdks/api/{full/typescript/src/api/resources/containers => runtime/typescript/src/api/resources/builds}/resources/common/types/PortProtocol.ts (100%) create mode 100644 sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/PortRequest.ts rename sdks/api/{full/typescript/src/api/resources/actors => runtime/typescript/src/api/resources/builds}/resources/common/types/PortRouting.ts (67%) rename sdks/api/runtime/typescript/src/api/resources/{actors/resources/common/types/Network.ts => builds/resources/common/types/Runtime.ts} (52%) create mode 100644 sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/RuntimeActor.ts create mode 100644 sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/RuntimeContainer.ts delete mode 100644 sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/GuardRouting.ts delete mode 100644 sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/HostRouting.ts delete mode 100644 sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/Lifecycle.ts delete mode 100644 sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/Network.ts delete mode 100644 sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/NetworkMode.ts delete mode 100644 sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/PortProtocol.ts delete mode 100644 sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/PortRouting.ts delete mode 100644 sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/Resources.ts delete mode 100644 sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/Runtime.ts delete mode 100644 sdks/api/runtime/typescript/src/api/resources/containers/types/CreateContainerNetworkRequest.ts delete mode 100644 sdks/api/runtime/typescript/src/api/resources/containers/types/CreateContainerPortRequest.ts delete mode 100644 sdks/api/runtime/typescript/src/api/resources/containers/types/CreateContainerRuntimeNetworkRequest.ts delete mode 100644 sdks/api/runtime/typescript/src/api/resources/containers/types/CreateContainerRuntimeRequest.ts delete mode 100644 sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/Lifecycle.ts delete mode 100644 sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/Network.ts delete mode 100644 sdks/api/runtime/typescript/src/serialization/resources/actors/types/CreateActorNetworkRequest.ts delete mode 100644 sdks/api/runtime/typescript/src/serialization/resources/actors/types/CreateActorPortRequest.ts delete mode 100644 sdks/api/runtime/typescript/src/serialization/resources/actors/types/CreateActorRuntimeNetworkRequest.ts delete mode 100644 sdks/api/runtime/typescript/src/serialization/resources/actors/types/CreateActorRuntimeRequest.ts delete mode 100644 sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/Allocation.ts delete mode 100644 sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/AllocationMulti.ts delete mode 100644 sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/AllocationSingle.ts rename sdks/api/runtime/typescript/src/serialization/resources/{actors => builds}/resources/common/types/GuardRouting.ts (84%) rename sdks/api/{full/typescript/src/serialization/resources/actors => runtime/typescript/src/serialization/resources/builds}/resources/common/types/HostRouting.ts (85%) rename sdks/api/{full/typescript/src/serialization/resources/actors => runtime/typescript/src/serialization/resources/builds}/resources/common/types/NetworkMode.ts (89%) rename sdks/api/{full/typescript/src/serialization/resources/actors => runtime/typescript/src/serialization/resources/builds}/resources/common/types/PortProtocol.ts (89%) create mode 100644 sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/PortRequest.ts rename sdks/api/runtime/typescript/src/serialization/resources/{actors => builds}/resources/common/types/PortRouting.ts (90%) rename sdks/api/runtime/typescript/src/serialization/resources/{actors => builds}/resources/common/types/Runtime.ts (50%) create mode 100644 sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/RuntimeActor.ts create mode 100644 sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/RuntimeContainer.ts delete mode 100644 sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/GuardRouting.ts delete mode 100644 sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/HostRouting.ts delete mode 100644 sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/Lifecycle.ts delete mode 100644 sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/Network.ts delete mode 100644 sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/NetworkMode.ts delete mode 100644 sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/PortProtocol.ts delete mode 100644 sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/PortRouting.ts delete mode 100644 sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/Resources.ts delete mode 100644 sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/Runtime.ts delete mode 100644 sdks/api/runtime/typescript/src/serialization/resources/containers/types/CreateContainerNetworkRequest.ts delete mode 100644 sdks/api/runtime/typescript/src/serialization/resources/containers/types/CreateContainerPortRequest.ts delete mode 100644 sdks/api/runtime/typescript/src/serialization/resources/containers/types/CreateContainerRuntimeNetworkRequest.ts delete mode 100644 sdks/api/runtime/typescript/src/serialization/resources/containers/types/CreateContainerRuntimeRequest.ts diff --git a/packages/common/formatted-error/errors/actor/build/invalid_config.md b/packages/common/formatted-error/errors/actor/build/invalid_config.md deleted file mode 100644 index 8df21fac67..0000000000 --- a/packages/common/formatted-error/errors/actor/build/invalid_config.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -name = "ACTOR_BUILD_INVALID_CONFIG" -description = "Invalid build config: {error}." -http_status = 400 ---- - -# Actor Build Invalid Config - -The config provided to create a build was invalid. diff --git a/packages/common/formatted-error/errors/actor/build/invalid_patch_config.md b/packages/common/formatted-error/errors/build/invalid_patch_config.md similarity index 62% rename from packages/common/formatted-error/errors/actor/build/invalid_patch_config.md rename to packages/common/formatted-error/errors/build/invalid_patch_config.md index 226d3f05b8..3c8a5fb4da 100644 --- a/packages/common/formatted-error/errors/actor/build/invalid_patch_config.md +++ b/packages/common/formatted-error/errors/build/invalid_patch_config.md @@ -1,9 +1,9 @@ --- -name = "ACTOR_BUILD_INVALID_PATCH_CONFIG" +name = "BUILD_INVALID_PATCH_CONFIG" description = "Invalid build patch config: {error}." http_status = 400 --- -# Actor Build Invalid Patch Config +# Build Invalid Patch Config The config provided to patch a build was invalid. diff --git a/packages/common/util/core/src/serde.rs b/packages/common/util/core/src/serde.rs index 581cadcc54..ac7c70a455 100644 --- a/packages/common/util/core/src/serde.rs +++ b/packages/common/util/core/src/serde.rs @@ -192,6 +192,12 @@ impl From> for HashableMap< } } +impl From> for HashMap { + fn from(val: HashableMap) -> Self { + val.into_iter().collect() + } +} + impl FromIterator<(K, V)> for HashableMap { fn from_iter>(iter: I) -> Self { HashableMap(iter.into_iter().collect()) diff --git a/packages/core/api/actor/src/route/actors/v1/mod.rs b/packages/core/api/actor/src/route/actors/v1/mod.rs index 081fda4d48..67c8f1acad 100644 --- a/packages/core/api/actor/src/route/actors/v1/mod.rs +++ b/packages/core/api/actor/src/route/actors/v1/mod.rs @@ -7,7 +7,7 @@ use api_helper::{anchor::WatchIndexQuery, ctx::Ctx}; use futures_util::{StreamExt, TryStreamExt}; use proto::backend; use rivet_api::{ - apis::{actors_api, configuration::Configuration}, + apis::{actors_v1_api, configuration::Configuration}, models, }; use rivet_operation::prelude::*; @@ -29,7 +29,7 @@ pub mod metrics; pub struct GlobalEndpointTypeQuery { #[serde(flatten)] global: GlobalQuery, - endpoint_type: Option, + endpoint_type: Option, } // MARK: GET /actors/{} @@ -39,7 +39,7 @@ pub async fn get( actor_id: Uuid, watch_index: WatchIndexQuery, query: GlobalEndpointTypeQuery, -) -> GlobalResult { +) -> GlobalResult { get_inner(&ctx, actor_id, watch_index, query).await } @@ -48,7 +48,7 @@ async fn get_inner( actor_id: Uuid, _watch_index: WatchIndexQuery, query: GlobalEndpointTypeQuery, -) -> GlobalResult { +) -> GlobalResult { let CheckOutput { game_id, .. } = ctx .auth() .check( @@ -105,8 +105,8 @@ async fn get_inner( }; // Pass the request to the edge api - use actors_api::ActorsGetError::*; - match actors_api::actors_get( + use actors_v1_api::ActorsV1GetError::*; + match actors_v1_api::actors_v1_get( &config, &actor_id.to_string(), query.global.project.as_deref(), @@ -196,9 +196,9 @@ pub async fn get_deprecated( #[tracing::instrument(skip_all)] pub async fn create( ctx: Ctx, - body: models::ActorsCreateActorRequest, + body: models::ActorsV1CreateActorRequest, query: GlobalEndpointTypeQuery, -) -> GlobalResult { +) -> GlobalResult { let CheckOutput { game_id, .. } = ctx .auth() .check( @@ -227,8 +227,8 @@ pub async fn create( }; // Pass the request to the edge api - use actors_api::ActorsCreateError::*; - match actors_api::actors_create( + use actors_v1_api::ActorsV1CreateError::*; + match actors_v1_api::actors_v1_create( &config, body, query.global.project.as_deref(), @@ -272,18 +272,18 @@ pub async fn create_deprecated( let global = build_global_query_compat(&ctx, game_id, env_id).await?; let create_res = create( ctx, - models::ActorsCreateActorRequest { + models::ActorsV1CreateActorRequest { region: Some(dc.name_id.clone()), lifecycle: body.lifecycle.map(|l| { - Box::new(models::ActorsLifecycle { + Box::new(models::ActorsV1Lifecycle { kill_timeout: l.kill_timeout, durable: Some(false), }) }), - network: Some(Box::new(models::ActorsCreateActorNetworkRequest { + network: Some(Box::new(models::ActorsV1CreateActorNetworkRequest { mode: body.network.mode.map(|n| match n { - models::ServersNetworkMode::Host => models::ActorsNetworkMode::Host, - models::ServersNetworkMode::Bridge => models::ActorsNetworkMode::Bridge, + models::ServersNetworkMode::Host => models::ActorsV1NetworkMode::Host, + models::ServersNetworkMode::Bridge => models::ActorsV1NetworkMode::Bridge, }), ports: Some( body.network @@ -292,30 +292,30 @@ pub async fn create_deprecated( .map(|(k, p)| { ( k, - models::ActorsCreateActorPortRequest { + models::ActorsV1CreateActorPortRequest { internal_port: p.internal_port, protocol: match p.protocol { models::ServersPortProtocol::Http => { - models::ActorsPortProtocol::Http + models::ActorsV1PortProtocol::Http } models::ServersPortProtocol::Https => { - models::ActorsPortProtocol::Https + models::ActorsV1PortProtocol::Https } models::ServersPortProtocol::Tcp => { - models::ActorsPortProtocol::Tcp + models::ActorsV1PortProtocol::Tcp } models::ServersPortProtocol::TcpTls => { - models::ActorsPortProtocol::TcpTls + models::ActorsV1PortProtocol::TcpTls } models::ServersPortProtocol::Udp => { - models::ActorsPortProtocol::Udp + models::ActorsV1PortProtocol::Udp } }, routing: p.routing.map(|r| { - Box::new(models::ActorsPortRouting { + Box::new(models::ActorsV1PortRouting { // Temporarily disabled // guard: r.game_guard.map(|_| { - // Box::new(models::ActorsGuardRouting::default()) + // Box::new(models::ActorsV1GuardRouting::default()) // }), guard: r.game_guard.map(|_| json!({})), host: r.host.map(|_| json!({})), @@ -328,7 +328,11 @@ pub async fn create_deprecated( ), wait_ready: None, })), - runtime: Some(Box::new(models::ActorsCreateActorRuntimeRequest { + resources: Some(Box::new(models::ActorsV1Resources { + cpu: body.resources.cpu, + memory: body.resources.memory, + })), + runtime: Some(Box::new(models::ActorsV1CreateActorRuntimeRequest { environment: body.runtime.environment, network: None, })), @@ -418,8 +422,8 @@ pub async fn destroy( }; // Pass the request to the edge api - use actors_api::ActorsDestroyError::*; - match actors_api::actors_destroy( + use actors_v1_api::ActorsV1DestroyError::*; + match actors_v1_api::actors_v1_destroy( &config, &actor_id.to_string(), query.global.project.as_deref(), @@ -493,7 +497,7 @@ pub async fn destroy_deprecated( pub async fn upgrade( ctx: Ctx, actor_id: Uuid, - body: models::ActorsUpgradeActorRequest, + body: models::ActorsV1UpgradeActorRequest, query: GlobalQuery, ) -> GlobalResult { let CheckOutput { game_id, .. } = ctx @@ -552,8 +556,8 @@ pub async fn upgrade( }; // Pass the request to the edge api - use actors_api::ActorsUpgradeError::*; - match actors_api::actors_upgrade( + use actors_v1_api::ActorsV1UpgradeError::*; + match actors_v1_api::actors_v1_upgrade( &config, &actor_id.to_string(), body.clone(), @@ -598,9 +602,9 @@ pub async fn upgrade( #[tracing::instrument(skip_all)] pub async fn upgrade_all( ctx: Ctx, - body: models::ActorsUpgradeAllActorsRequest, + body: models::ActorsV1UpgradeAllActorsRequest, query: GlobalQuery, -) -> GlobalResult { +) -> GlobalResult { let CheckOutput { game_id, .. } = ctx .auth() .check( @@ -697,8 +701,8 @@ pub async fn upgrade_all( }; // Pass the request to the edge api - use actors_api::ActorsUpgradeAllError::*; - match actors_api::actors_upgrade_all( + use actors_v1_api::ActorsV1UpgradeAllError::*; + match actors_v1_api::actors_v1_upgrade_all( &config, body.clone(), query.project.as_deref(), @@ -731,7 +735,7 @@ pub async fn upgrade_all( .try_fold(0, |a, res| std::future::ready(Ok(a + res.count))) .await?; - Ok(models::ActorsUpgradeAllActorsResponse { count }) + Ok(models::ActorsV1UpgradeAllActorsResponse { count }) } // MARK: GET /actors @@ -749,7 +753,7 @@ pub async fn list_actors( ctx: Ctx, watch_index: WatchIndexQuery, query: ListQuery, -) -> GlobalResult { +) -> GlobalResult { list_actors_inner(&ctx, watch_index, query).await } @@ -757,7 +761,7 @@ async fn list_actors_inner( ctx: &Ctx, _watch_index: WatchIndexQuery, query: ListQuery, -) -> GlobalResult { +) -> GlobalResult { let CheckOutput { game_id, .. } = ctx .auth() .check( @@ -863,7 +867,7 @@ async fn list_actors_inner( // Pass the request to the edge api let timeout_res = tokio::time::timeout( Duration::from_secs(30), - actors_api::actors_list( + actors_v1_api::actors_v1_list( &config, query.global_endpoint_type.global.project.as_deref(), query.global_endpoint_type.global.environment.as_deref(), @@ -876,7 +880,7 @@ async fn list_actors_inner( ) .await; - use actors_api::ActorsListError::*; + use actors_v1_api::ActorsV1ListError::*; match timeout_res { Ok(timeout_res) => match timeout_res { Ok(res) => Ok(res), @@ -943,7 +947,7 @@ async fn list_actors_inner( unix_ts.to_string() }); - Ok(models::ActorsListActorsResponse { + Ok(models::ActorsV1ListActorsResponse { actors, pagination: Box::new(models::Pagination { cursor }), }) @@ -1014,7 +1018,7 @@ pub async fn list_servers_deprecated( } fn legacy_convert_actor_to_server( - a: models::ActorsActor, + a: models::ActorsV1Actor, datacenter: &cluster::types::Datacenter, ) -> GlobalResult { Ok(models::ServersServer { @@ -1033,14 +1037,14 @@ fn legacy_convert_actor_to_server( }) .transpose()?, environment: Uuid::nil(), - id: util::uuid::parse(&a.id)?, + id: a.id.into(), lifecycle: Box::new(models::ServersLifecycle { kill_timeout: a.lifecycle.kill_timeout, }), network: Box::new(models::ServersNetwork { mode: Some(match a.network.mode { - models::ActorsNetworkMode::Host => models::ServersNetworkMode::Host, - models::ActorsNetworkMode::Bridge => models::ServersNetworkMode::Bridge, + models::ActorsV1NetworkMode::Host => models::ServersNetworkMode::Host, + models::ActorsV1NetworkMode::Bridge => models::ServersNetworkMode::Bridge, }), ports: a .network @@ -1052,17 +1056,21 @@ fn legacy_convert_actor_to_server( models::ServersPort { internal_port: p.internal_port, protocol: match p.protocol { - models::ActorsPortProtocol::Http => { + models::ActorsV1PortProtocol::Http => { models::ServersPortProtocol::Http } - models::ActorsPortProtocol::Https => { + models::ActorsV1PortProtocol::Https => { models::ServersPortProtocol::Https } - models::ActorsPortProtocol::Tcp => models::ServersPortProtocol::Tcp, - models::ActorsPortProtocol::TcpTls => { + models::ActorsV1PortProtocol::Tcp => { + models::ServersPortProtocol::Tcp + } + models::ActorsV1PortProtocol::TcpTls => { models::ServersPortProtocol::TcpTls } - models::ActorsPortProtocol::Udp => models::ServersPortProtocol::Udp, + models::ActorsV1PortProtocol::Udp => { + models::ServersPortProtocol::Udp + } }, public_hostname: p.hostname, public_port: p.port, diff --git a/packages/core/api/actor/src/route/builds.rs b/packages/core/api/actor/src/route/builds.rs index 4eb0a01274..1b5c88c86d 100644 --- a/packages/core/api/actor/src/route/builds.rs +++ b/packages/core/api/actor/src/route/builds.rs @@ -48,7 +48,7 @@ pub async fn get( build_ids: vec![build_id], }) .await?; - let build = unwrap_with!(builds_res.builds.first(), BUILD_NOT_FOUND); + let build = unwrap_with!(builds_res.builds.into_iter().next(), BUILD_NOT_FOUND); ensure_with!( unwrap_with!(build.env_id, BUILD_NOT_FOUND) == env_id, BUILD_NOT_FOUND @@ -65,22 +65,8 @@ pub async fn get( name: build.display_name.clone(), created_at: timestamp::to_string(build.create_ts)?, content_length: upload.content_length.api_try_into()?, - allocation: match build.allocation_type { - build::types::BuildAllocationType::None => None, - build::types::BuildAllocationType::Single => Some(Box::new(models::BuildsAllocation { - single: Some(json!({})), - multi: None, - })), - build::types::BuildAllocationType::Multi => Some(Box::new(models::BuildsAllocation { - single: None, - multi: Some(Box::new(models::BuildsAllocationMulti { - slots: build.allocation_total_slots.try_into()?, - })), - })), - }, - resources: build - .resources - .clone() + runtime: build + .runtime .map(ApiTryInto::api_try_into) .transpose()? .map(Box::new), @@ -162,7 +148,7 @@ pub async fn list( // Convert the build data structures let mut builds = builds_res .builds - .iter() + .into_iter() .filter_map(|build| { let proto_upload_id = Some(build.upload_id.into()); @@ -180,26 +166,8 @@ pub async fn list( name: build.display_name.clone(), created_at: timestamp::to_string(build.create_ts)?, content_length: upload.content_length.api_try_into()?, - allocation: match build.allocation_type { - build::types::BuildAllocationType::None => None, - build::types::BuildAllocationType::Single => { - Some(Box::new(models::BuildsAllocation { - single: Some(json!({})), - multi: None, - })) - } - build::types::BuildAllocationType::Multi => { - Some(Box::new(models::BuildsAllocation { - single: None, - multi: Some(Box::new(models::BuildsAllocationMulti { - slots: build.allocation_total_slots.try_into()?, - })), - })) - } - }, - resources: build - .resources - .clone() + runtime: build + .runtime .map(ApiTryInto::api_try_into) .transpose()? .map(Box::new), @@ -275,7 +243,7 @@ pub async fn patch_tags( ensure_with!( tags.as_object().map(|x| x.len()).unwrap_or_default() <= 8, - ACTOR_BUILD_INVALID_PATCH_CONFIG, + BUILD_INVALID_PATCH_CONFIG, error = "Too many tags (max 8)." ); @@ -290,7 +258,7 @@ pub async fn patch_tags( ); ensure_with!( k.len() <= 32, - ACTOR_BUILD_INVALID_PATCH_CONFIG, + BUILD_INVALID_PATCH_CONFIG, error = format!( "tags[{:?}]: Tag label too large (max 32).", util::safe_slice(k, 0, 32), @@ -303,7 +271,7 @@ pub async fn patch_tags( ); ensure_with!( v.len() <= 1024, - ACTOR_BUILD_INVALID_PATCH_CONFIG, + BUILD_INVALID_PATCH_CONFIG, error = format!("tags[k:?]: Tag value too large (max 1024 bytes).") ); } @@ -393,27 +361,6 @@ pub async fn create_build( ), }; - let (allocation_type, allocation_total_slots) = if let Some(alloc) = &body.allocation { - match (&alloc.single, &alloc.multi) { - (Some(_), None) => (build::types::BuildAllocationType::Single, 1), - (None, Some(multi)) => (build::types::BuildAllocationType::Multi, multi.slots), - (Some(_), Some(_)) => { - bail_with!( - API_BAD_BODY, - reason = "cannot set both `single` and `multi` in `allocation`" - ); - } - (None, None) => { - bail_with!( - API_BAD_BODY, - reason = "must set one of `single` or `multi` in `allocation`" - ); - } - } - } else { - (build::types::BuildAllocationType::None, 1) - }; - let create_res = ctx .op(build::ops::create::Input { owner: build::ops::create::Owner::Env(env_id), @@ -427,9 +374,11 @@ pub async fn create_build( .compression .map(ApiInto::api_into) .unwrap_or(build::types::BuildCompression::None), - allocation_type, - allocation_total_slots: allocation_total_slots.try_into()?, - resources: body.resources.map(|x| (*x).api_try_into()).transpose()?, + runtime: body + .runtime + .map(|x| *x) + .map(ApiTryInto::api_try_into) + .transpose()?, }) .await?; @@ -463,8 +412,7 @@ pub async fn create_build_deprecated( models::ServersBuildKind::DockerImage => models::BuildsKind::DockerImage, models::ServersBuildKind::OciBundle => models::BuildsKind::OciBundle, }), - allocation: None, - resources: None, + runtime: None, }, global, ) diff --git a/packages/core/services/build/Cargo.toml b/packages/core/services/build/Cargo.toml index a9997d0387..0a3d17b464 100644 --- a/packages/core/services/build/Cargo.toml +++ b/packages/core/services/build/Cargo.toml @@ -37,6 +37,7 @@ game-get.workspace = true game-namespace-get.workspace = true ip-info.workspace = true linode.workspace = true +tier.workspace = true token-create.workspace = true upload-get.workspace = true upload-prepare.workspace = true diff --git a/packages/core/services/build/db/build/migrations/20250508204859_alloc_type.down.sql b/packages/core/services/build/db/build/migrations/20250508204859_alloc_type.down.sql deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/core/services/build/db/build/migrations/20250508204859_alloc_type.up.sql b/packages/core/services/build/db/build/migrations/20250508204859_alloc_type.up.sql deleted file mode 100644 index 4f809054a0..0000000000 --- a/packages/core/services/build/db/build/migrations/20250508204859_alloc_type.up.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE builds - ADD allocation_type INT NOT NULL DEFAULT 0, - ADD allocation_total_slots INT NOT NULL DEFAULT 1; diff --git a/packages/core/services/build/db/build/migrations/20250508204859_runtime.down.sql b/packages/core/services/build/db/build/migrations/20250508204859_runtime.down.sql new file mode 100644 index 0000000000..ecdd771c7f --- /dev/null +++ b/packages/core/services/build/db/build/migrations/20250508204859_runtime.down.sql @@ -0,0 +1,2 @@ +ALTER TABLE builds + DROP COLUMN runtime; diff --git a/packages/core/services/build/db/build/migrations/20250508204859_runtime.up.sql b/packages/core/services/build/db/build/migrations/20250508204859_runtime.up.sql new file mode 100644 index 0000000000..beae9b078d --- /dev/null +++ b/packages/core/services/build/db/build/migrations/20250508204859_runtime.up.sql @@ -0,0 +1,2 @@ +ALTER TABLE builds + ADD COLUMN runtime JSONB; diff --git a/packages/core/services/build/db/build/migrations/20250520152659_resources.down.sql b/packages/core/services/build/db/build/migrations/20250520152659_resources.down.sql deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/core/services/build/db/build/migrations/20250520152659_resources.up.sql b/packages/core/services/build/db/build/migrations/20250520152659_resources.up.sql deleted file mode 100644 index 2d7003db09..0000000000 --- a/packages/core/services/build/db/build/migrations/20250520152659_resources.up.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE builds - ADD resources_cpu_millicores INT, - ADD resources_memory_mib INT; \ No newline at end of file diff --git a/packages/core/services/build/src/ops/create.rs b/packages/core/services/build/src/ops/create.rs index 438db4f7ef..ddb0db2339 100644 --- a/packages/core/services/build/src/ops/create.rs +++ b/packages/core/services/build/src/ops/create.rs @@ -5,8 +5,8 @@ const MAX_UPLOAD_SIZE: u64 = util::file_size::gigabytes(8); const MAX_JS_BUILD_UPLOAD_SIZE: u64 = util::file_size::megabytes(10); use crate::{ types::{ - upload::PrepareFile, upload::PresignedUploadRequest, BuildAllocationType, BuildCompression, - BuildKind, BuildResources, + upload::PrepareFile, upload::PresignedUploadRequest, BuildCompression, BuildKind, + BuildNetworkMode, BuildRuntime, }, utils, }; @@ -18,9 +18,7 @@ pub struct Input { pub content: Content, pub kind: BuildKind, pub compression: BuildCompression, - pub allocation_type: BuildAllocationType, - pub allocation_total_slots: u32, - pub resources: Option, + pub runtime: Option, } #[derive(Debug)] @@ -48,37 +46,22 @@ pub struct Output { } #[operation] -pub async fn get(ctx: &OperationCtx, input: &Input) -> GlobalResult { +pub async fn build_create(ctx: &OperationCtx, input: &Input) -> GlobalResult { + let dc_id = ctx.config().server()?.rivet.edge()?.datacenter_id; + ensure_with!( util::check::display_name_long(&input.display_name), BUILD_INVALID, reason = "invalid display name" ); - // Validate allocation and resources - match input.allocation_type { - BuildAllocationType::None => { - ensure_with!( - input.resources.is_none(), - BUILD_INVALID, - reason = "`resources` can only be specified if `allocation_type` = `multi`" - ); - } - BuildAllocationType::Single => { - ensure_with!( - input.resources.is_none(), - BUILD_INVALID, - reason = "builds with `allocation_type` = `single` cannot have `resources`" - ); - } - BuildAllocationType::Multi => { - ensure_with!( - input.resources.is_some(), - BUILD_INVALID, - reason = "builds with `allocation_type` = `multi` must specify `resources`" - ); - } - } + let tier_res = ctx + .op(tier::ops::list::Input { + datacenter_ids: vec![dc_id], + pegboard: true, + }) + .await?; + let tier_dc = unwrap!(tier_res.datacenters.into_iter().next()); // Validate game exists let (game_id, env_id) = match input.owner { @@ -104,6 +87,100 @@ pub async fn get(ctx: &OperationCtx, input: &Input) -> GlobalResult { } }; + // Validate runtime config + if let Some(runtime) = &input.runtime { + if let BuildRuntime::Actor { resources, .. } = &runtime { + // Find any tier that has more CPU and memory than the requested resources + let has_tier = tier_dc.tiers.iter().any(|t| { + t.cpu_millicores >= resources.cpu_millicores && t.memory >= resources.memory_mib + }); + + ensure_with!( + has_tier, + BUILD_INVALID, + reason = "Too many resources allocated." + ); + } + + ensure_with!( + runtime.args().len() <= 64, + BUILD_INVALID, + reason = "Too many arguments (max 64)." + ); + + for (i, arg) in runtime.args().iter().enumerate() { + ensure_with!( + arg.len() <= 256, + BUILD_INVALID, + reason = format!("runtime.args[{i}]: Argument too large (max 256 bytes).") + ); + } + + ensure_with!( + runtime.environment().len() <= 64, + BUILD_INVALID, + reason = "Too many environment variables (max 64)." + ); + + for (k, v) in runtime.environment() { + ensure_with!( + k.len() <= 256, + BUILD_INVALID, + reason = format!( + "runtime.environment[{:?}]: Key too large (max 256 bytes).", + util::safe_slice(k, 0, 256), + ) + ); + + ensure_with!( + v.len() <= 1024, + BUILD_INVALID, + reason = format!("runtime.environment[{k:?}]: Value too large (max 1024 bytes).") + ); + } + + ensure_with!( + runtime.ports().len() <= 8, + BUILD_INVALID, + reason = "Too many ports (max 8)." + ); + + for (name, port) in runtime.ports() { + ensure_with!( + name.len() <= 16, + BUILD_INVALID, + reason = format!( + "runtime.ports[{:?}]: Port name too large (max 16 bytes).", + util::safe_slice(name, 0, 16), + ) + ); + + match runtime.network_mode() { + BuildNetworkMode::Bridge => { + // NOTE: Temporary validation until we implement bridge networking for isolates + if let BuildKind::JavaScript = input.kind { + ensure_with!( + port.internal_port.is_none(), + BUILD_INVALID, + reason = format!( + "runtime.ports[{name:?}].internal_port: Must be null when `network.mode` = \"bridge\" and using a JS build." + ) + ); + } + } + BuildNetworkMode::Host => { + ensure_with!( + port.internal_port.is_none(), + BUILD_INVALID, + reason = format!( + "runtime.ports[{name:?}].internal_port: Must be null when `network.mode` = \"host\"." + ) + ); + } + } + } + } + let (image_tag, upload_id, presigned_requests) = match &input.content { Content::Default { build_kind } => { let default_build_row = sql_fetch_optional!( @@ -191,13 +268,10 @@ pub async fn get(ctx: &OperationCtx, input: &Input) -> GlobalResult { create_ts, kind, compression, - allocation_type, - allocation_total_slots, - resources_cpu_millicores, - resources_memory_mib + runtime ) VALUES - ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13) + ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) ", build_id, game_id, @@ -208,10 +282,7 @@ pub async fn get(ctx: &OperationCtx, input: &Input) -> GlobalResult { ctx.ts(), input.kind as i32, input.compression as i32, - input.allocation_type as i32, - input.allocation_total_slots as i64, - input.resources.as_ref().map(|x| x.cpu_millicores as i64), - input.resources.as_ref().map(|x| x.memory_mib as i64), + sqlx::types::Json(&input.runtime), ) .await?; diff --git a/packages/core/services/build/src/ops/get.rs b/packages/core/services/build/src/ops/get.rs index bf74fbef1e..677b688d0c 100644 --- a/packages/core/services/build/src/ops/get.rs +++ b/packages/core/services/build/src/ops/get.rs @@ -24,10 +24,7 @@ pub(crate) struct BuildRow { create_ts: i64, kind: i64, compression: i64, - allocation_type: i64, - allocation_total_slots: i64, - resources_cpu_millicores: Option, - resources_memory_mib: Option, + runtime: Option>, tags: sqlx::types::Json>, } @@ -47,20 +44,7 @@ impl TryInto for BuildRow { compression: unwrap!(types::BuildCompression::from_repr( self.compression.try_into()? )), - allocation_type: unwrap!(types::BuildAllocationType::from_repr( - self.allocation_type.try_into()? - )), - allocation_total_slots: self.allocation_total_slots.try_into()?, - resources: if let (Some(cpu_millicores), Some(memory_mib)) = - (self.resources_cpu_millicores, self.resources_memory_mib) - { - Some(types::BuildResources { - cpu_millicores: cpu_millicores.try_into()?, - memory_mib: memory_mib.try_into()?, - }) - } else { - None - }, + runtime: self.runtime.map(|x| x.0), // Filter out null values on tags tags: serde_json::from_str::>>(self.tags.0.get())? .into_iter() @@ -74,7 +58,7 @@ impl TryInto for BuildRow { pub async fn build_get(ctx: &OperationCtx, input: &Input) -> GlobalResult { let builds = ctx .cache() - .fetch_all_json("build", input.build_ids.clone(), { + .fetch_all_json("build2", input.build_ids.clone(), { let ctx = ctx.clone(); move |mut cache, build_ids| { let ctx = ctx.clone(); @@ -92,10 +76,7 @@ pub async fn build_get(ctx: &OperationCtx, input: &Input) -> GlobalResult GlobalResult { +pub async fn build_patch_tags(ctx: &OperationCtx, input: &Input) -> GlobalResult { let exclusive_tags_json = if let Some(exclusive_tags) = &input.exclusive_tags { // Validate tags don't overlap let exclusive_tags_map = exclusive_tags diff --git a/packages/core/services/build/src/types.rs b/packages/core/services/build/src/types.rs index 9eb635aa42..6ec4887f97 100644 --- a/packages/core/services/build/src/types.rs +++ b/packages/core/services/build/src/types.rs @@ -1,8 +1,9 @@ -use std::collections::HashMap; +use std::{collections::HashMap, fmt}; use chirp_workflow::prelude::*; use rivet_api::models; -use rivet_convert::{ApiFrom, ApiTryFrom}; +use rivet_convert::{ApiFrom, ApiInto, ApiTryFrom, ApiTryInto}; +use serde_json::json; use strum::FromRepr; // NOTE: Do not change the serde case of this or else it will break workflow hashes @@ -13,16 +14,6 @@ pub enum BuildKind { JavaScript = 2, } -impl ApiFrom for BuildKind { - fn api_from(value: models::BuildsKind) -> BuildKind { - match value { - models::BuildsKind::DockerImage => BuildKind::DockerImage, - models::BuildsKind::OciBundle => BuildKind::OciBundle, - models::BuildsKind::Javascript => BuildKind::JavaScript, - } - } -} - // NOTE: Do not change the serde case of this or else it will break workflow hashes #[derive(Clone, Copy, Debug, Serialize, Deserialize, Hash, PartialEq, Eq, FromRepr)] pub enum BuildCompression { @@ -30,15 +21,6 @@ pub enum BuildCompression { Lz4 = 1, } -impl ApiFrom for BuildCompression { - fn api_from(value: models::BuildsCompression) -> BuildCompression { - match value { - models::BuildsCompression::None => BuildCompression::None, - models::BuildsCompression::Lz4 => BuildCompression::Lz4, - } - } -} - #[derive(Debug, Serialize, Deserialize)] pub struct Build { pub build_id: Uuid, @@ -50,26 +32,399 @@ pub struct Build { pub create_ts: i64, pub kind: BuildKind, pub compression: BuildCompression, - pub allocation_type: BuildAllocationType, - pub allocation_total_slots: u32, - pub resources: Option, + pub runtime: Option, pub tags: HashMap, } +#[derive(Debug, Clone, Serialize, Deserialize, Hash)] +pub enum BuildRuntime { + Container { + args: Vec, + environment: util::serde::HashableMap, + network_mode: BuildNetworkMode, + ports: util::serde::HashableMap, + }, + Actor { + args: Vec, + environment: util::serde::HashableMap, + network_mode: BuildNetworkMode, + ports: util::serde::HashableMap, + resources: BuildResources, + slots: u32, + }, +} + +impl BuildRuntime { + pub fn slots(&self) -> u32 { + match self { + BuildRuntime::Container { .. } => 1, + BuildRuntime::Actor { slots, .. } => *slots, + } + } + + pub fn args(&self) -> &[String] { + match self { + BuildRuntime::Container { args, .. } => args, + BuildRuntime::Actor { args, .. } => args, + } + } + + pub fn environment(&self) -> &util::serde::HashableMap { + match self { + BuildRuntime::Container { environment, .. } => environment, + BuildRuntime::Actor { environment, .. } => environment, + } + } + + pub fn network_mode(&self) -> BuildNetworkMode { + match self { + BuildRuntime::Container { network_mode, .. } => *network_mode, + BuildRuntime::Actor { network_mode, .. } => *network_mode, + } + } + + pub fn ports(&self) -> &util::serde::HashableMap { + match self { + BuildRuntime::Container { ports, .. } => ports, + BuildRuntime::Actor { ports, .. } => ports, + } + } + + pub fn kind(&self) -> BuildRuntimeKind { + match self { + BuildRuntime::Container { .. } => BuildRuntimeKind::Container, + BuildRuntime::Actor { .. } => BuildRuntimeKind::Actor, + } + } +} + #[derive(Clone, Copy, Debug, Serialize, Deserialize, Hash, PartialEq, Eq, FromRepr)] #[serde(rename_all = "snake_case")] -pub enum BuildAllocationType { - None = 0, - Single = 1, - Multi = 2, +pub enum BuildRuntimeKind { + Container = 0, + Actor = 1, +} + +// TODO: These types are copied from pegboard types +#[derive(Serialize, Deserialize, Hash, Debug, Clone, Copy, PartialEq, Eq, FromRepr)] +pub enum BuildNetworkMode { + Bridge = 0, + Host = 1, +} + +#[derive(Debug, Clone, Serialize, Deserialize, Hash)] +pub struct BuildPort { + // Null when using host networking since one is automatically assigned + pub internal_port: Option, + pub routing: PortRouting, +} + +#[derive(Debug, Clone, Serialize, Deserialize, Hash)] +pub enum PortRouting { + GameGuard { protocol: GameGuardProtocol }, + Host { protocol: HostProtocol }, +} + +#[derive(Serialize, Deserialize, Hash, Debug, Clone, Copy, PartialEq, Eq, FromRepr)] +pub enum GameGuardProtocol { + Http = 0, + Https = 1, + Tcp = 2, + TcpTls = 3, + Udp = 4, } -#[derive(Clone, Debug, Serialize, Deserialize, Hash, PartialEq, Eq)] +impl fmt::Display for GameGuardProtocol { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + GameGuardProtocol::Http => write!(f, "http"), + GameGuardProtocol::Https => write!(f, "https"), + GameGuardProtocol::Tcp => write!(f, "tcp"), + GameGuardProtocol::TcpTls => write!(f, "tcps"), + GameGuardProtocol::Udp => write!(f, "udp"), + } + } +} + +#[derive(Serialize, Deserialize, Hash, Debug, Clone, Copy, PartialEq, Eq, FromRepr)] +pub enum HostProtocol { + Tcp = 0, + Udp = 1, +} + +#[derive(Debug, Clone, Serialize, Deserialize, Hash)] pub struct BuildResources { pub cpu_millicores: u32, pub memory_mib: u32, } +impl ApiFrom for BuildKind { + fn api_from(value: models::BuildsKind) -> BuildKind { + match value { + models::BuildsKind::DockerImage => BuildKind::DockerImage, + models::BuildsKind::OciBundle => BuildKind::OciBundle, + models::BuildsKind::Javascript => BuildKind::JavaScript, + } + } +} + +impl ApiFrom for BuildCompression { + fn api_from(value: models::BuildsCompression) -> BuildCompression { + match value { + models::BuildsCompression::None => BuildCompression::None, + models::BuildsCompression::Lz4 => BuildCompression::Lz4, + } + } +} +impl ApiTryFrom for models::BuildsRuntime { + type Error = GlobalError; + + fn api_try_from(value: BuildRuntime) -> GlobalResult { + match value { + BuildRuntime::Container { + environment, + network_mode, + ports, + .. + } => Ok(models::BuildsRuntime { + container: Some(Box::new(models::BuildsRuntimeContainer { + environment: Some(environment.into()), + network_mode: Some(network_mode.api_into()), + ports: Some( + ports + .into_iter() + .map(|(s, p)| Ok((s, p.api_try_into()?))) + .collect::>>()?, + ), + })), + actor: None, + }), + BuildRuntime::Actor { + environment, + network_mode, + ports, + resources, + slots, + .. + } => Ok(models::BuildsRuntime { + container: None, + actor: Some(Box::new(models::BuildsRuntimeActor { + environment: Some(environment.into()), + network_mode: Some(network_mode.api_into()), + ports: Some( + ports + .into_iter() + .map(|(s, p)| Ok((s, p.api_try_into()?))) + .collect::>>()?, + ), + resources: Box::new(resources.api_try_into()?), + slots: slots.try_into()?, + })), + }), + } + } +} + +impl ApiTryFrom for BuildRuntime { + type Error = GlobalError; + + fn api_try_from(value: models::BuildsRuntime) -> GlobalResult { + match (value.container, value.actor) { + (Some(container_runtime), None) => Ok(BuildRuntime::Container { + args: Default::default(), + environment: container_runtime + .environment + .clone() + .unwrap_or_default() + .into(), + network_mode: container_runtime + .network_mode + .unwrap_or_default() + .api_into(), + ports: container_runtime + .ports + .clone() + .unwrap_or_default() + .into_iter() + .map(|(s, port)| { + let port = convert_port_request_from_api(&s, port)?; + Ok((s, port)) + }) + .collect::>>()?, + }), + (None, Some(actor_runtime)) => Ok(BuildRuntime::Actor { + args: Default::default(), + environment: actor_runtime.environment.clone().unwrap_or_default().into(), + network_mode: actor_runtime.network_mode.unwrap_or_default().api_into(), + ports: actor_runtime + .ports + .clone() + .unwrap_or_default() + .into_iter() + .map(|(s, port)| { + let port = convert_port_request_from_api(&s, port)?; + Ok((s, port)) + }) + .collect::>>()?, + resources: (*actor_runtime.resources).api_try_into()?, + slots: actor_runtime.slots.try_into()?, + }), + (Some(_), Some(_)) => { + bail_with!( + API_BAD_BODY, + reason = "cannot set both `actor` and `container` in `runtime`" + ); + } + (None, None) => { + bail_with!( + API_BAD_BODY, + reason = "must set one of `actor` or `container` in `runtime`" + ); + } + } + } +} + +impl ApiFrom for BuildNetworkMode { + fn api_from(value: models::BuildsNetworkMode) -> BuildNetworkMode { + match value { + models::BuildsNetworkMode::Bridge => BuildNetworkMode::Bridge, + models::BuildsNetworkMode::Host => BuildNetworkMode::Host, + } + } +} + +impl ApiFrom for models::BuildsNetworkMode { + fn api_from(value: BuildNetworkMode) -> models::BuildsNetworkMode { + match value { + BuildNetworkMode::Bridge => models::BuildsNetworkMode::Bridge, + BuildNetworkMode::Host => models::BuildsNetworkMode::Host, + } + } +} + +impl ApiTryFrom for models::BuildsPortRequest { + type Error = GlobalError; + + fn api_try_from(value: BuildPort) -> GlobalResult { + Ok(models::BuildsPortRequest { + internal_port: value.internal_port.map(TryInto::try_into).transpose()?, + protocol: match value.routing { + PortRouting::GameGuard { protocol } => protocol.api_into(), + PortRouting::Host { protocol } => protocol.api_into(), + }, + routing: match value.routing { + PortRouting::GameGuard { .. } => Some(Box::new(models::BuildsPortRouting { + guard: Some(json!({})), + host: None, + })), + PortRouting::Host { .. } => Some(Box::new(models::BuildsPortRouting { + guard: None, + host: Some(json!({})), + })), + }, + }) + } +} + +pub fn convert_port_request_from_api( + port_name: &str, + port: models::BuildsPortRequest, +) -> GlobalResult { + Ok(BuildPort { + internal_port: port.internal_port.map(TryInto::try_into).transpose()?, + routing: if let Some(routing) = port.routing { + match *routing { + models::BuildsPortRouting { + guard: Some(_gg), + host: None, + } => PortRouting::GameGuard { + protocol: port.protocol.api_into(), + }, + models::BuildsPortRouting { + guard: None, + host: Some(_), + } => PortRouting::Host { + protocol: match port.protocol.api_try_into() { + Err(err) + if GlobalError::is( + &err, + formatted_error::code::BUILD_INVALID, + ) => + { + // Add location + bail_with!( + BUILD_INVALID, + reason = format!("network.ports[{port_name:?}].protocol: Host port protocol must be either TCP or UDP.") + ); + } + x => x?, + }, + }, + models::BuildsPortRouting { .. } => { + bail_with!( + BUILD_INVALID, + reason = format!("network.ports[{port_name:?}].routing: Must specify either `guard` or `host` routing type.") + ); + } + } + } else { + PortRouting::GameGuard { + protocol: port.protocol.api_into(), + } + }, + }) +} + +impl ApiFrom for GameGuardProtocol { + fn api_from(value: models::BuildsPortProtocol) -> GameGuardProtocol { + match value { + models::BuildsPortProtocol::Udp => GameGuardProtocol::Udp, + models::BuildsPortProtocol::Tcp => GameGuardProtocol::Tcp, + models::BuildsPortProtocol::Http => GameGuardProtocol::Http, + models::BuildsPortProtocol::Https => GameGuardProtocol::Https, + models::BuildsPortProtocol::TcpTls => GameGuardProtocol::TcpTls, + } + } +} + +impl ApiFrom for models::BuildsPortProtocol { + fn api_from(value: GameGuardProtocol) -> models::BuildsPortProtocol { + match value { + GameGuardProtocol::Udp => models::BuildsPortProtocol::Udp, + GameGuardProtocol::Tcp => models::BuildsPortProtocol::Tcp, + GameGuardProtocol::Http => models::BuildsPortProtocol::Http, + GameGuardProtocol::Https => models::BuildsPortProtocol::Https, + GameGuardProtocol::TcpTls => models::BuildsPortProtocol::TcpTls, + } + } +} + +impl ApiTryFrom for HostProtocol { + type Error = GlobalError; + fn api_try_from(value: models::BuildsPortProtocol) -> GlobalResult { + Ok(match value { + models::BuildsPortProtocol::Udp => HostProtocol::Udp, + models::BuildsPortProtocol::Tcp => HostProtocol::Tcp, + _ => { + bail_with!( + BUILD_INVALID, + reason = "Host port protocol must be either TCP or UDP." + ); + } + }) + } +} + +impl ApiFrom for models::BuildsPortProtocol { + fn api_from(value: HostProtocol) -> models::BuildsPortProtocol { + match value { + HostProtocol::Udp => models::BuildsPortProtocol::Udp, + HostProtocol::Tcp => models::BuildsPortProtocol::Tcp, + } + } +} + impl ApiTryFrom for BuildResources { type Error = GlobalError; diff --git a/packages/edge/api/actor/src/route/actors/mod.rs b/packages/edge/api/actor/src/route/actors/mod.rs index e5d6d2fd41..b55f43907d 100644 --- a/packages/edge/api/actor/src/route/actors/mod.rs +++ b/packages/edge/api/actor/src/route/actors/mod.rs @@ -1,13 +1,13 @@ use std::collections::HashMap; use api_helper::{anchor::WatchIndexQuery, ctx::Ctx}; +use build::types::BuildRuntime; use chirp_workflow::prelude::*; use futures_util::{FutureExt, StreamExt, TryStreamExt}; use rivet_api::models; -use rivet_convert::{ApiInto, ApiTryInto}; +use rivet_convert::ApiInto; use serde::Deserialize; use serde_json::json; -use util::serde::AsHashableExt; use crate::{ assert, @@ -91,20 +91,15 @@ pub async fn create( ) .await?; - let (game_configs_res, build) = tokio::try_join!( - ctx.op(pegboard::ops::game_config::get::Input { - game_ids: vec![game_id], - }), - resolve_build( - &ctx, - game_id, - env_id, - body.build, - body.build_tags.flatten(), - false - ), - )?; - let game_config = unwrap!(game_configs_res.game_configs.first()); + let build = resolve_build( + &ctx, + game_id, + env_id, + body.build, + body.build_tags.flatten(), + false, + ) + .await?; let tags = unwrap_with!( serde_json::from_value(body.tags.unwrap_or_default()).ok(), @@ -112,22 +107,28 @@ pub async fn create( error = "`tags` must be `Map`" ); - if let build::types::BuildAllocationType::None = build.allocation_type { - // todo unsupported build allocation type, use v1 endpoint. + // Validate runtime + match build.runtime { + None => { + bail_with!( + ACTOR_FAILED_TO_CREATE, + error = "cannot use this build with the v2 endpoint" + ); + } + Some(BuildRuntime::Container { .. }) => { + bail_with!( + ACTOR_FAILED_TO_CREATE, + error = + "cannot container build for actor. Use the containers create endpoint instead" + ); + } + Some(BuildRuntime::Actor { .. }) => {} } - let network = body.network.unwrap_or_default(); - let endpoint_type = body - .runtime - .as_ref() - .and_then(|r| r.network.as_ref()) - .map(|n| n.endpoint_type) - .map(ApiInto::api_into); - let actor_id = util::Id::new_v1(ctx.config().server()?.rivet.edge()?.datacenter_label()); tracing::info!(?actor_id, ?tags, "creating actor with tags"); - let created_fut = if network.wait_ready.unwrap_or_default() { + let created_fut = if body.wait_for_network_ready.unwrap_or_default() { std::future::pending().boxed() } else { let mut created_sub = ctx @@ -151,65 +152,15 @@ pub async fn create( env_id, tags, resources: None, - lifecycle: body.lifecycle.map(|x| (*x).api_into()).unwrap_or_else(|| { - pegboard::types::ActorLifecycle { - kill_timeout_ms: 5000, - durable: false, - } - }), + lifecycle: pegboard::types::ActorLifecycle { + kill_timeout_ms: body.kill_timeout.unwrap_or(5000), + durable: body.durable.unwrap_or(false), + }, image_id: build.build_id, - root_user_enabled: game_config.root_user_enabled, - // args: body.runtime.arguments.unwrap_or_default(), args: Vec::new(), - network_mode: network.mode.unwrap_or_default().api_into(), - environment: body.runtime.and_then(|r| r.environment).unwrap_or_default().as_hashable(), - network_ports: network - .ports - .unwrap_or_default() - .into_iter() - .map(|(s, p)| GlobalResult::Ok(( - s.clone(), - pegboard::workflows::actor::Port { - internal_port: p.internal_port.map(TryInto::try_into).transpose()?, - routing: if let Some(routing) = p.routing { - match *routing { - models::ActorsPortRouting { - guard: Some(_gg), - host: None, - } => pegboard::types::Routing::GameGuard { - protocol: p.protocol.api_into(), - }, - models::ActorsPortRouting { - guard: None, - host: Some(_), - } => pegboard::types::Routing::Host { - protocol: match p.protocol.api_try_into() { - Err(err) if GlobalError::is(&err, formatted_error::code::ACTOR_FAILED_TO_CREATE) => { - // Add location - bail_with!( - ACTOR_FAILED_TO_CREATE, - error = format!("network.ports[{s:?}].protocol: Host port protocol must be either TCP or UDP.") - ); - } - x => x?, - }, - }, - models::ActorsPortRouting { .. } => { - bail_with!( - ACTOR_FAILED_TO_CREATE, - error = format!("network.ports[{s:?}].routing: Must specify either `guard` or `host` routing type.") - ); - } - } - } else { - pegboard::types::Routing::GameGuard { - protocol: p.protocol.api_into(), - } - } - } - ))) - .collect::>>()?, - endpoint_type, + environment: Default::default(), + network_ports: Default::default(), + endpoint_type: body.network_endpoint_type.map(ApiInto::api_into), }) .tag("actor_id", actor_id) .dispatch() diff --git a/packages/edge/api/actor/src/route/actors/v1.rs b/packages/edge/api/actor/src/route/actors/v1.rs index 3e5c1c1c37..53c0ff0c88 100644 --- a/packages/edge/api/actor/src/route/actors/v1.rs +++ b/packages/edge/api/actor/src/route/actors/v1.rs @@ -113,9 +113,12 @@ pub async fn create( error = "`tags` must be `Map`" ); - if let build::types::BuildAllocationType::None = build.allocation_type { - // todo unsupported build allocation type, use v2 endpoint. - } + // Validate runtime + ensure_with!( + build.runtime.is_none(), + ACTOR_FAILED_TO_CREATE, + error = "cannot use this build with the v1 endpoint" + ); let network = body.network.unwrap_or_default(); let endpoint_type = body diff --git a/packages/edge/api/actor/src/route/containers.rs b/packages/edge/api/actor/src/route/containers.rs index 818af5fd78..dbb6fc777c 100644 --- a/packages/edge/api/actor/src/route/containers.rs +++ b/packages/edge/api/actor/src/route/containers.rs @@ -1,6 +1,7 @@ use std::collections::HashMap; use api_helper::{anchor::WatchIndexQuery, ctx::Ctx}; +use build::types::BuildRuntime; use chirp_workflow::prelude::*; use futures_util::{FutureExt, StreamExt, TryStreamExt}; use rivet_api::models; @@ -92,20 +93,15 @@ pub async fn create( ) .await?; - let (game_configs_res, build) = tokio::try_join!( - ctx.op(pegboard::ops::game_config::get::Input { - game_ids: vec![game_id], - }), - resolve_build( - &ctx, - game_id, - env_id, - body.build, - body.build_tags.flatten(), - false - ), - )?; - let game_config = unwrap!(game_configs_res.game_configs.first()); + let build = resolve_build( + &ctx, + game_id, + env_id, + body.build, + body.build_tags.flatten(), + false, + ) + .await?; let tags = unwrap_with!( serde_json::from_value(body.tags.unwrap_or_default()).ok(), @@ -113,22 +109,28 @@ pub async fn create( error = "`tags` must be `Map`" ); - if let build::types::BuildAllocationType::None = build.allocation_type { - // todo unsupported build allocation type, use v1 endpoint. + // Validate runtime + match build.runtime { + None => { + bail_with!( + ACTOR_FAILED_TO_CREATE, + error = "cannot use this build with the v2 endpoint" + ); + } + Some(BuildRuntime::Container { .. }) => {} + Some(BuildRuntime::Actor { .. }) => { + bail_with!( + ACTOR_FAILED_TO_CREATE, + error = + "cannot container build for actor. Use the containers create endpoint instead" + ); + } } - let network = body.network.unwrap_or_default(); - let endpoint_type = body - .runtime - .as_ref() - .and_then(|r| r.network.as_ref()) - .map(|n| n.endpoint_type) - .map(ApiInto::api_into); - let actor_id = util::Id::new_v1(ctx.config().server()?.rivet.edge()?.datacenter_label()); tracing::info!(?actor_id, ?tags, "creating container with tags"); - let created_fut = if network.wait_ready.unwrap_or_default() { + let created_fut = if body.wait_for_network_ready.unwrap_or_default() { std::future::pending().boxed() } else { let mut created_sub = ctx @@ -151,66 +153,26 @@ pub async fn create( actor_id, env_id, tags, - resources: Some((*body.resources).api_into()), - lifecycle: body.lifecycle.map(|x| (*x).api_into()).unwrap_or_else(|| { - pegboard::types::ActorLifecycle { - kill_timeout_ms: 5000, - durable: false, - } - }), + resources: Some((*body.resources).api_try_into()?), + lifecycle: pegboard::types::ActorLifecycle { + kill_timeout_ms: body.kill_timeout.unwrap_or(5000), + durable: body.durable.unwrap_or(false), + }, image_id: build.build_id, - root_user_enabled: game_config.root_user_enabled, // args: body.runtime.arguments.unwrap_or_default(), args: Vec::new(), - network_mode: network.mode.unwrap_or_default().api_into(), - environment: body.runtime.and_then(|r| r.environment).unwrap_or_default().as_hashable(), - network_ports: network + environment: body.environment.unwrap_or_default().as_hashable(), + network_ports: body .ports .unwrap_or_default() .into_iter() - .map(|(s, p)| GlobalResult::Ok(( - s.clone(), - pegboard::workflows::actor::Port { - internal_port: p.internal_port.map(TryInto::try_into).transpose()?, - routing: if let Some(routing) = p.routing { - match *routing { - models::ContainersPortRouting { - guard: Some(_gg), - host: None, - } => pegboard::types::Routing::GameGuard { - protocol: p.protocol.api_into(), - }, - models::ContainersPortRouting { - guard: None, - host: Some(_), - } => pegboard::types::Routing::Host { - protocol: match p.protocol.api_try_into() { - Err(err) if GlobalError::is(&err, formatted_error::code::CONTAINER_FAILED_TO_CREATE) => { - // Add location - bail_with!( - CONTAINER_FAILED_TO_CREATE, - error = format!("network.ports[{s:?}].protocol: Host port protocol must be either TCP or UDP.") - ); - } - x => x?, - }, - }, - models::ContainersPortRouting { .. } => { - bail_with!( - CONTAINER_FAILED_TO_CREATE, - error = format!("network.ports[{s:?}].routing: Must specify either `guard` or `host` routing type.") - ); - } - } - } else { - pegboard::types::Routing::GameGuard { - protocol: p.protocol.api_into(), - } - } - } - ))) + .map(|(s, p)| { + let port = + pegboard::workflows::actor::convert_port_request_from_api(s.as_str(), p)?; + Ok((s, port)) + }) .collect::>>()?, - endpoint_type, + endpoint_type: body.network_endpoint_type.map(ApiInto::api_into), }) .tag("actor_id", actor_id) .dispatch() diff --git a/packages/edge/services/pegboard/src/keys/datacenter.rs b/packages/edge/services/pegboard/src/keys/datacenter.rs index e00e270a82..8c29e41fa0 100644 --- a/packages/edge/services/pegboard/src/keys/datacenter.rs +++ b/packages/edge/services/pegboard/src/keys/datacenter.rs @@ -1,7 +1,7 @@ use std::result::Result::Ok; use anyhow::*; -use build::types::BuildAllocationType; +use build::types::BuildRuntime; use chirp_workflow::prelude::*; use fdb_util::prelude::*; use serde::{Deserialize, Serialize}; @@ -342,12 +342,11 @@ impl<'de> TupleUnpack<'de> for PendingActorByImageIdKey { #[derive(Debug, Deserialize, Serialize)] pub struct PendingActorByImageIdKeyData { pub generation: u32, - pub build_allocation_type: BuildAllocationType, - pub build_allocation_total_slots: u32, + pub build_runtime: BuildRuntime, /// Millicore (1/1000 of a core). - pub cpu: u64, + pub selected_cpu: u64, /// Bytes. - pub memory: u64, + pub selected_mem: u64, } pub struct PendingActorByImageIdSubspaceKey { @@ -433,12 +432,11 @@ impl<'de> TupleUnpack<'de> for PendingActorKey { pub struct PendingActorKeyData { pub generation: u32, pub image_id: Uuid, - pub build_allocation_type: BuildAllocationType, - pub build_allocation_total_slots: u32, + pub build_runtime: BuildRuntime, /// Millicore (1/1000 of a core). - pub cpu: u64, + pub selected_cpu: u64, /// Bytes. - pub memory: u64, + pub selected_mem: u64, } pub struct PendingActorSubspaceKey {} diff --git a/packages/edge/services/pegboard/src/ops/actor/get.rs b/packages/edge/services/pegboard/src/ops/actor/get.rs index 40f2e65275..6e7a16ca19 100644 --- a/packages/edge/services/pegboard/src/ops/actor/get.rs +++ b/packages/edge/services/pegboard/src/ops/actor/get.rs @@ -8,8 +8,8 @@ use futures_util::{StreamExt, TryStreamExt}; use crate::{ keys, types::{ - Actor, ActorLifecycle, ActorResources, EndpointType, GameGuardProtocol, HostProtocol, - NetworkMode, Port, Routing, + Actor, ActorLifecycle, ActorResources, EndpointType, GameGuardProtocol, HostProtocol, Port, + Routing, }, }; @@ -30,7 +30,6 @@ struct ActorRow { client_wan_hostname: Option, image_id: Uuid, args: sqlx::types::Json>, - network_mode: i64, environment: sqlx::types::Json>, } @@ -169,7 +168,6 @@ pub async fn pegboard_actor_get(ctx: &OperationCtx, input: &Input) -> GlobalResu client_wan_hostname, image_id, json(args) AS args, - network_mode, json(environment) AS environment FROM state ", @@ -314,7 +312,7 @@ pub async fn pegboard_actor_get(ctx: &OperationCtx, input: &Input) -> GlobalResu args: s.row.args.0.clone(), environment: s.row.environment.0.clone(), image_id: s.row.image_id, - network_mode: unwrap!(NetworkMode::from_repr(s.row.network_mode.try_into()?)), + network_mode: None, network_ports: ports, create_ts: s.row.create_ts, start_ts: s.row.start_ts, diff --git a/packages/edge/services/pegboard/src/ops/actor/v1/get.rs b/packages/edge/services/pegboard/src/ops/actor/v1/get.rs index fecf049e15..69172c510a 100644 --- a/packages/edge/services/pegboard/src/ops/actor/v1/get.rs +++ b/packages/edge/services/pegboard/src/ops/actor/v1/get.rs @@ -297,7 +297,9 @@ pub async fn pegboard_actor_get(ctx: &OperationCtx, input: &Input) -> GlobalResu args: s.row.args.0.clone(), environment: s.row.environment.0.clone(), image_id: s.row.image_id, - network_mode: unwrap!(NetworkMode::from_repr(s.row.network_mode.try_into()?)), + network_mode: Some(unwrap!(NetworkMode::from_repr( + s.row.network_mode.try_into()? + ))), network_ports: ports, create_ts: s.row.create_ts, start_ts: s.row.start_ts, diff --git a/packages/edge/services/pegboard/src/protocol.rs b/packages/edge/services/pegboard/src/protocol.rs index ea68b8289e..8b32a2ee71 100644 --- a/packages/edge/services/pegboard/src/protocol.rs +++ b/packages/edge/services/pegboard/src/protocol.rs @@ -108,9 +108,11 @@ pub enum Command { pub struct ActorConfig { // TODO: Once old actors are all gone, make this not optional pub runner: Option, - pub env: HashableMap, pub metadata: Raw, + // TODO: Remove when old actors are gone + #[deprecated] + pub env: HashableMap, #[deprecated] pub image: Image, #[deprecated] @@ -146,7 +148,7 @@ pub enum ImageKind { } impl From for ImageKind { - fn from(value: build::types::BuildKind) -> Self { + fn from(value: build::types::BuildKind) -> ImageKind { match value { build::types::BuildKind::DockerImage => ImageKind::DockerImage, build::types::BuildKind::OciBundle => ImageKind::OciBundle, @@ -162,6 +164,15 @@ pub enum ImageAllocationType { Multi, } +impl From for ImageAllocationType { + fn from(value: build::types::BuildRuntimeKind) -> ImageAllocationType { + match value { + build::types::BuildRuntimeKind::Container => ImageAllocationType::Single, + build::types::BuildRuntimeKind::Actor => ImageAllocationType::Multi, + } + } +} + #[derive(Serialize, Deserialize, Hash, Debug, Clone, Copy, PartialEq, Eq)] #[serde(rename_all = "snake_case")] pub enum ImageCompression { @@ -170,7 +181,7 @@ pub enum ImageCompression { } impl From for ImageCompression { - fn from(value: build::types::BuildCompression) -> Self { + fn from(value: build::types::BuildCompression) -> ImageCompression { match value { build::types::BuildCompression::None => ImageCompression::None, build::types::BuildCompression::Lz4 => ImageCompression::Lz4, diff --git a/packages/edge/services/pegboard/src/types.rs b/packages/edge/services/pegboard/src/types.rs index d9bd6718d7..f39dc7cc34 100644 --- a/packages/edge/services/pegboard/src/types.rs +++ b/packages/edge/services/pegboard/src/types.rs @@ -2,7 +2,7 @@ use std::{collections::HashMap, fmt}; use chirp_workflow::prelude::*; use rivet_api::models; -use rivet_convert::{ApiFrom, ApiInto, ApiTryFrom}; +use rivet_convert::{ApiFrom, ApiInto, ApiTryFrom, ApiTryInto}; use serde::{Deserialize, Serialize}; use serde_json::json; use strum::FromRepr; @@ -22,7 +22,8 @@ pub struct Actor { pub lifecycle: ActorLifecycle, pub resources: Option, pub args: Vec, - pub network_mode: NetworkMode, + /// Deprecated, will be removed + pub network_mode: Option, pub environment: HashMap, pub network_ports: HashMap, } @@ -50,8 +51,9 @@ pub struct ActorLifecycle { pub durable: bool, } -#[derive(Serialize, Deserialize, Hash, Debug, Clone, Copy, PartialEq, Eq, FromRepr)] +#[derive(Serialize, Default, Deserialize, Hash, Debug, Clone, Copy, PartialEq, Eq, FromRepr)] pub enum NetworkMode { + #[default] Bridge = 0, Host = 1, } @@ -72,6 +74,19 @@ pub enum Routing { Host { protocol: HostProtocol }, } +impl From for Routing { + fn from(value: build::types::PortRouting) -> Routing { + match value { + build::types::PortRouting::GameGuard { protocol } => Routing::GameGuard { + protocol: protocol.into(), + }, + build::types::PortRouting::Host { protocol } => Routing::Host { + protocol: protocol.into(), + }, + } + } +} + #[derive(Serialize, Deserialize, Hash, Debug, Clone, Copy, PartialEq, Eq, FromRepr)] pub enum GameGuardProtocol { Http = 0, @@ -81,6 +96,18 @@ pub enum GameGuardProtocol { Udp = 4, } +impl From for GameGuardProtocol { + fn from(value: build::types::GameGuardProtocol) -> GameGuardProtocol { + match value { + build::types::GameGuardProtocol::Http => GameGuardProtocol::Http, + build::types::GameGuardProtocol::Https => GameGuardProtocol::Https, + build::types::GameGuardProtocol::Tcp => GameGuardProtocol::Tcp, + build::types::GameGuardProtocol::TcpTls => GameGuardProtocol::TcpTls, + build::types::GameGuardProtocol::Udp => GameGuardProtocol::Udp, + } + } +} + impl fmt::Display for GameGuardProtocol { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { @@ -99,6 +126,15 @@ pub enum HostProtocol { Udp = 1, } +impl From for HostProtocol { + fn from(value: build::types::HostProtocol) -> HostProtocol { + match value { + build::types::HostProtocol::Tcp => HostProtocol::Tcp, + build::types::HostProtocol::Udp => HostProtocol::Udp, + } + } +} + #[derive(Debug, Clone, Serialize, Deserialize)] pub struct GameConfig { pub game_id: Uuid, @@ -172,56 +208,47 @@ pub fn convert_actor_to_api( .map(util::timestamp::to_string) .transpose()?, tags: Some(serde_json::to_value(value.tags)?), - runtime: Box::new(models::ActorsRuntime { - build: value.image_id, - arguments: Some(value.args), - environment: Some(value.environment), - }), - network: Box::new(models::ActorsNetwork { - mode: value.network_mode.api_into(), - ports: value - .network_ports - .into_iter() - .map(|(s, p)| (s, p.api_into())) - .collect::>(), - }), - lifecycle: Box::new(value.lifecycle.api_into()), + build: value.image_id, + ports: value + .network_ports + .into_iter() + .map(|(s, p)| (s, p.api_into())) + .collect::>(), + kill_timeout: Some(value.lifecycle.kill_timeout_ms), + durable: Some(value.lifecycle.durable), }) } -impl ApiFrom for ActorLifecycle { - fn api_from(value: models::ActorsLifecycle) -> ActorLifecycle { - ActorLifecycle { - kill_timeout_ms: value.kill_timeout.unwrap_or_default(), - durable: value.durable.unwrap_or_default(), - } - } -} +impl ApiTryFrom for ActorResources { + type Error = GlobalError; -impl ApiFrom for models::ActorsLifecycle { - fn api_from(value: ActorLifecycle) -> models::ActorsLifecycle { - models::ActorsLifecycle { - kill_timeout: Some(value.kill_timeout_ms), - durable: Some(value.durable), - } + fn api_try_from(value: models::BuildsResources) -> GlobalResult { + ensure_with!( + value.cpu >= 0, + API_BAD_BODY, + reason = "`resources.cpu` must be positive" + ); + ensure_with!( + value.memory >= 0, + API_BAD_BODY, + reason = "`resources.memory` must be positive" + ); + + Ok(ActorResources { + cpu_millicores: value.cpu.try_into()?, + memory_mib: value.memory.try_into()?, + }) } } -impl ApiFrom for NetworkMode { - fn api_from(value: models::ActorsNetworkMode) -> NetworkMode { - match value { - models::ActorsNetworkMode::Bridge => NetworkMode::Bridge, - models::ActorsNetworkMode::Host => NetworkMode::Host, - } - } -} +impl ApiTryFrom for models::BuildsResources { + type Error = GlobalError; -impl ApiFrom for models::ActorsNetworkMode { - fn api_from(value: NetworkMode) -> models::ActorsNetworkMode { - match value { - NetworkMode::Bridge => models::ActorsNetworkMode::Bridge, - NetworkMode::Host => models::ActorsNetworkMode::Host, - } + fn api_try_from(value: ActorResources) -> GlobalResult { + Ok(models::BuildsResources { + cpu: value.cpu_millicores.try_into()?, + memory: value.memory_mib.try_into()?, + }) } } @@ -262,7 +289,7 @@ impl ApiFrom for models::ActorsPort { ( (*protocol).api_into(), - models::ActorsPortRouting { + models::BuildsPortRouting { guard: Some(json!({})), ..Default::default() }, @@ -271,7 +298,7 @@ impl ApiFrom for models::ActorsPort { } Routing::Host { protocol } => ( (*protocol).api_into(), - models::ActorsPortRouting { + models::BuildsPortRouting { host: Some(json!({})), ..Default::default() }, @@ -291,36 +318,36 @@ impl ApiFrom for models::ActorsPort { } } -impl ApiFrom for GameGuardProtocol { - fn api_from(value: models::ActorsPortProtocol) -> GameGuardProtocol { +impl ApiFrom for GameGuardProtocol { + fn api_from(value: models::BuildsPortProtocol) -> GameGuardProtocol { match value { - models::ActorsPortProtocol::Udp => GameGuardProtocol::Udp, - models::ActorsPortProtocol::Tcp => GameGuardProtocol::Tcp, - models::ActorsPortProtocol::Http => GameGuardProtocol::Http, - models::ActorsPortProtocol::Https => GameGuardProtocol::Https, - models::ActorsPortProtocol::TcpTls => GameGuardProtocol::TcpTls, + models::BuildsPortProtocol::Udp => GameGuardProtocol::Udp, + models::BuildsPortProtocol::Tcp => GameGuardProtocol::Tcp, + models::BuildsPortProtocol::Http => GameGuardProtocol::Http, + models::BuildsPortProtocol::Https => GameGuardProtocol::Https, + models::BuildsPortProtocol::TcpTls => GameGuardProtocol::TcpTls, } } } -impl ApiFrom for models::ActorsPortProtocol { - fn api_from(value: GameGuardProtocol) -> models::ActorsPortProtocol { +impl ApiFrom for models::BuildsPortProtocol { + fn api_from(value: GameGuardProtocol) -> models::BuildsPortProtocol { match value { - GameGuardProtocol::Udp => models::ActorsPortProtocol::Udp, - GameGuardProtocol::Tcp => models::ActorsPortProtocol::Tcp, - GameGuardProtocol::Http => models::ActorsPortProtocol::Http, - GameGuardProtocol::Https => models::ActorsPortProtocol::Https, - GameGuardProtocol::TcpTls => models::ActorsPortProtocol::TcpTls, + GameGuardProtocol::Udp => models::BuildsPortProtocol::Udp, + GameGuardProtocol::Tcp => models::BuildsPortProtocol::Tcp, + GameGuardProtocol::Http => models::BuildsPortProtocol::Http, + GameGuardProtocol::Https => models::BuildsPortProtocol::Https, + GameGuardProtocol::TcpTls => models::BuildsPortProtocol::TcpTls, } } } -impl ApiTryFrom for HostProtocol { +impl ApiTryFrom for HostProtocol { type Error = GlobalError; - fn api_try_from(value: models::ActorsPortProtocol) -> GlobalResult { + fn api_try_from(value: models::BuildsPortProtocol) -> GlobalResult { Ok(match value { - models::ActorsPortProtocol::Udp => HostProtocol::Udp, - models::ActorsPortProtocol::Tcp => HostProtocol::Tcp, + models::BuildsPortProtocol::Udp => HostProtocol::Udp, + models::BuildsPortProtocol::Tcp => HostProtocol::Tcp, _ => { bail_with!( ACTOR_FAILED_TO_CREATE, @@ -331,11 +358,11 @@ impl ApiTryFrom for HostProtocol { } } -impl ApiFrom for models::ActorsPortProtocol { - fn api_from(value: HostProtocol) -> models::ActorsPortProtocol { +impl ApiFrom for models::BuildsPortProtocol { + fn api_from(value: HostProtocol) -> models::BuildsPortProtocol { match value { - HostProtocol::Udp => models::ActorsPortProtocol::Udp, - HostProtocol::Tcp => models::ActorsPortProtocol::Tcp, + HostProtocol::Udp => models::BuildsPortProtocol::Udp, + HostProtocol::Tcp => models::BuildsPortProtocol::Tcp, } } } @@ -379,78 +406,22 @@ pub fn convert_container_to_api( .map(util::timestamp::to_string) .transpose()?, tags: Some(serde_json::to_value(value.tags)?), - runtime: Box::new(models::ContainersRuntime { - build: value.image_id, - arguments: Some(value.args), - environment: Some(value.environment), - }), - network: Box::new(models::ContainersNetwork { - mode: value.network_mode.api_into(), - ports: value - .network_ports - .into_iter() - .map(|(s, p)| (s, p.api_into())) - .collect::>(), - }), - lifecycle: Box::new(value.lifecycle.api_into()), - resources: Box::new(unwrap!(value.resources, "container should have resources").api_into()), + build: value.image_id, + arguments: Some(value.args), + environment: Some(value.environment), + ports: value + .network_ports + .into_iter() + .map(|(s, p)| (s, p.api_into())) + .collect::>(), + kill_timeout: Some(value.lifecycle.kill_timeout_ms), + durable: Some(value.lifecycle.durable), + resources: Box::new( + unwrap!(value.resources, "container should have resources").api_try_into()?, + ), }) } -impl ApiFrom for ActorResources { - fn api_from(value: models::ContainersResources) -> ActorResources { - ActorResources { - cpu_millicores: value.cpu as u32, - memory_mib: value.memory as u32, - } - } -} - -impl ApiFrom for models::ContainersResources { - fn api_from(value: ActorResources) -> models::ContainersResources { - models::ContainersResources { - cpu: value.cpu_millicores as i32, - memory: value.memory_mib as i32, - } - } -} - -impl ApiFrom for ActorLifecycle { - fn api_from(value: models::ContainersLifecycle) -> ActorLifecycle { - ActorLifecycle { - kill_timeout_ms: value.kill_timeout.unwrap_or_default(), - durable: value.durable.unwrap_or_default(), - } - } -} - -impl ApiFrom for models::ContainersLifecycle { - fn api_from(value: ActorLifecycle) -> models::ContainersLifecycle { - models::ContainersLifecycle { - kill_timeout: Some(value.kill_timeout_ms), - durable: Some(value.durable), - } - } -} - -impl ApiFrom for NetworkMode { - fn api_from(value: models::ContainersNetworkMode) -> NetworkMode { - match value { - models::ContainersNetworkMode::Bridge => NetworkMode::Bridge, - models::ContainersNetworkMode::Host => NetworkMode::Host, - } - } -} - -impl ApiFrom for models::ContainersNetworkMode { - fn api_from(value: NetworkMode) -> models::ContainersNetworkMode { - match value { - NetworkMode::Bridge => models::ContainersNetworkMode::Bridge, - NetworkMode::Host => models::ContainersNetworkMode::Host, - } - } -} - impl ApiFrom for models::ContainersPort { fn api_from(value: Port) -> models::ContainersPort { let (protocol, routing, url) = match &value.routing { @@ -488,7 +459,7 @@ impl ApiFrom for models::ContainersPort { ( (*protocol).api_into(), - models::ContainersPortRouting { + models::BuildsPortRouting { guard: Some(json!({})), ..Default::default() }, @@ -497,7 +468,7 @@ impl ApiFrom for models::ContainersPort { } Routing::Host { protocol } => ( (*protocol).api_into(), - models::ContainersPortRouting { + models::BuildsPortRouting { host: Some(json!({})), ..Default::default() }, @@ -517,55 +488,6 @@ impl ApiFrom for models::ContainersPort { } } -impl ApiFrom for GameGuardProtocol { - fn api_from(value: models::ContainersPortProtocol) -> GameGuardProtocol { - match value { - models::ContainersPortProtocol::Udp => GameGuardProtocol::Udp, - models::ContainersPortProtocol::Tcp => GameGuardProtocol::Tcp, - models::ContainersPortProtocol::Http => GameGuardProtocol::Http, - models::ContainersPortProtocol::Https => GameGuardProtocol::Https, - models::ContainersPortProtocol::TcpTls => GameGuardProtocol::TcpTls, - } - } -} - -impl ApiFrom for models::ContainersPortProtocol { - fn api_from(value: GameGuardProtocol) -> models::ContainersPortProtocol { - match value { - GameGuardProtocol::Udp => models::ContainersPortProtocol::Udp, - GameGuardProtocol::Tcp => models::ContainersPortProtocol::Tcp, - GameGuardProtocol::Http => models::ContainersPortProtocol::Http, - GameGuardProtocol::Https => models::ContainersPortProtocol::Https, - GameGuardProtocol::TcpTls => models::ContainersPortProtocol::TcpTls, - } - } -} - -impl ApiTryFrom for HostProtocol { - type Error = GlobalError; - fn api_try_from(value: models::ContainersPortProtocol) -> GlobalResult { - Ok(match value { - models::ContainersPortProtocol::Udp => HostProtocol::Udp, - models::ContainersPortProtocol::Tcp => HostProtocol::Tcp, - _ => { - bail_with!( - CONTAINER_FAILED_TO_CREATE, - error = "Host port protocol must be either TCP or UDP." - ); - } - }) - } -} - -impl ApiFrom for models::ContainersPortProtocol { - fn api_from(value: HostProtocol) -> models::ContainersPortProtocol { - match value { - HostProtocol::Udp => models::ContainersPortProtocol::Udp, - HostProtocol::Tcp => models::ContainersPortProtocol::Tcp, - } - } -} - impl ApiFrom for EndpointType { fn api_from(value: models::ContainersEndpointType) -> EndpointType { match value { @@ -614,7 +536,7 @@ pub mod v1 { environment: Some(value.environment), }), network: Box::new(models::ActorsV1Network { - mode: value.network_mode.api_into(), + mode: value.network_mode.unwrap_or_default().api_into(), ports: value .network_ports .into_iter() diff --git a/packages/edge/services/pegboard/src/workflows/actor/analytics.rs b/packages/edge/services/pegboard/src/workflows/actor/analytics.rs index a0e349eca8..bfd568bac7 100644 --- a/packages/edge/services/pegboard/src/workflows/actor/analytics.rs +++ b/packages/edge/services/pegboard/src/workflows/actor/analytics.rs @@ -28,7 +28,6 @@ pub struct ActorClickHouseRow { runner_id: Uuid, selected_cpu_millicores: u32, selected_memory_mib: u32, - root_user_enabled: bool, env_vars: i64, env_var_bytes: i64, args: i64, @@ -110,7 +109,6 @@ struct StateRow { image_id: Uuid, build_kind: i64, build_compression: i64, - root_user_enabled: bool, args: sqlx::types::Json>, network_mode: i64, environment: sqlx::types::Json>, @@ -159,7 +157,6 @@ pub async fn insert_clickhouse( image_id, build_kind, build_compression, - root_user_enabled, json(args) AS args, network_mode, json(environment) AS environment @@ -281,7 +278,6 @@ pub async fn insert_clickhouse( .selected_resources_cpu_millicores .unwrap_or_default() as u32, selected_memory_mib: state_row.selected_resources_memory_mib.unwrap_or_default() as u32, - root_user_enabled: state_row.root_user_enabled, env_vars: state_row.environment.len() as i64, env_var_bytes: state_row .environment diff --git a/packages/edge/services/pegboard/src/workflows/actor/destroy.rs b/packages/edge/services/pegboard/src/workflows/actor/destroy.rs index 91e80b1fe3..fc4eb4e1c0 100644 --- a/packages/edge/services/pegboard/src/workflows/actor/destroy.rs +++ b/packages/edge/services/pegboard/src/workflows/actor/destroy.rs @@ -1,4 +1,4 @@ -use build::types::BuildAllocationType; +use build::types::BuildRuntimeKind; use chirp_workflow::prelude::*; use fdb_util::{end_of_key_range, FormalKey, SERIALIZABLE}; use foundationdb::{self as fdb, options::ConflictRangeType}; @@ -20,7 +20,7 @@ pub(crate) struct Input { pub actor_id: util::Id, pub generation: u32, pub image_id: Uuid, - pub build_allocation_type: Option, + pub build_runtime_kind: Option, /// Whether or not to send signals to the pb actor. In the case that the actor was already stopped /// or exited, signals are unnecessary. pub kill: Option, @@ -55,7 +55,7 @@ pub(crate) async fn pegboard_actor_destroy( .activity(UpdateFdbInput { actor_id: input.actor_id, image_id: input.image_id, - build_allocation_type: input.build_allocation_type, + build_runtime_kind: input.build_runtime_kind, actor, }) .await?; @@ -180,7 +180,7 @@ async fn finish_runner_clickhouse( pub struct UpdateFdbInput { actor_id: util::Id, image_id: Uuid, - build_allocation_type: Option, + build_runtime_kind: Option, actor: UpdateDbOutput, } @@ -231,7 +231,7 @@ pub async fn update_fdb( clear_ports_and_resources( input.actor_id, input.image_id, - input.build_allocation_type, + input.build_runtime_kind, ingress_ports, input.actor.runner_id, input.actor.client_id, @@ -254,7 +254,7 @@ pub async fn update_fdb( pub(crate) async fn clear_ports_and_resources( actor_id: util::Id, image_id: Uuid, - build_allocation_type: Option, + build_runtime_kind: Option, ingress_ports: Vec<(i64, i64)>, runner_id: Option, client_id: Option, @@ -295,14 +295,14 @@ pub(crate) async fn clear_ports_and_resources( // Release client's resources and update allocation index if let ( - Some(build_allocation_type), + Some(build_runtime_kind), Some(runner_id), Some(client_id), Some(client_workflow_id), Some(selected_resources_memory_mib), Some(selected_resources_cpu_millicores), ) = ( - build_allocation_type, + build_runtime_kind, runner_id, client_id, client_workflow_id, @@ -487,7 +487,7 @@ pub(crate) async fn clear_ports_and_resources( // Single container per runner allocations don't require explicitly destroying the runner because // it is already stopped; the container = the actor. - matches!(build_allocation_type, BuildAllocationType::Multi) + matches!(build_runtime_kind, BuildRuntimeKind::Actor) }; Ok(destroy_runner) diff --git a/packages/edge/services/pegboard/src/workflows/actor/migrations.rs b/packages/edge/services/pegboard/src/workflows/actor/migrations.rs index ede6f53156..232a83e308 100644 --- a/packages/edge/services/pegboard/src/workflows/actor/migrations.rs +++ b/packages/edge/services/pegboard/src/workflows/actor/migrations.rs @@ -51,11 +51,9 @@ async fn migrate_init(ctx: &ActivityCtx, _input: &MigrateInitInput) -> GlobalRes image_id BLOB NOT NULL, -- UUID args BLOB NOT NULL, -- JSONB, list - network_mode INT NOT NULL, -- pegboard::types::NetworkMode environment BLOB NOT NULL, -- JSONB, map -- Updated later - root_user_enabled INT NOT NULL DEFAULT false, build_kind INT NOT NULL DEFAULT -1, build_compression INT NOT NULL DEFAULT -1 ) STRICT; diff --git a/packages/edge/services/pegboard/src/workflows/actor/mod.rs b/packages/edge/services/pegboard/src/workflows/actor/mod.rs index 5ea77154af..7a793beaa8 100644 --- a/packages/edge/services/pegboard/src/workflows/actor/mod.rs +++ b/packages/edge/services/pegboard/src/workflows/actor/mod.rs @@ -2,10 +2,12 @@ use analytics::InsertClickHouseInput; use chirp_workflow::prelude::*; use destroy::KillCtx; use futures_util::FutureExt; +use rivet_api::models; +use rivet_convert::{ApiInto, ApiTryInto}; use crate::{ protocol, - types::{ActorLifecycle, ActorResources, EndpointType, NetworkMode, Routing}, + types::{ActorLifecycle, ActorResources, EndpointType, Routing}, workflows::client::AllocatePendingActorsInput, }; @@ -40,9 +42,7 @@ pub struct Input { pub resources: Option, pub lifecycle: ActorLifecycle, pub image_id: Uuid, - pub root_user_enabled: bool, pub args: Vec, - pub network_mode: NetworkMode, pub environment: util::serde::HashableMap, pub network_ports: util::serde::HashableMap, pub endpoint_type: Option, @@ -55,6 +55,15 @@ pub struct Port { pub routing: Routing, } +impl From for Port { + fn from(value: build::types::BuildPort) -> Port { + Port { + internal_port: value.internal_port, + routing: value.routing.into(), + } + } +} + #[workflow] pub async fn pegboard_actor2(ctx: &mut WorkflowCtx, input: &Input) -> GlobalResult<()> { migrations::run(ctx).await?; @@ -65,9 +74,7 @@ pub async fn pegboard_actor2(ctx: &mut WorkflowCtx, input: &Input) -> GlobalResu tags: input.tags.clone(), resources: input.resources.clone(), image_id: input.image_id, - root_user_enabled: input.root_user_enabled, args: input.args.clone(), - network_mode: input.network_mode, environment: input.environment.clone(), network_ports: input.network_ports.clone(), }) @@ -85,20 +92,7 @@ pub async fn pegboard_actor2(ctx: &mut WorkflowCtx, input: &Input) -> GlobalResu return Ok(()); } - let network_ports = ctx - .activity(setup::DisableTlsPortsInput { - network_ports: input.network_ports.clone(), - }) - .await?; - - let res = setup::setup( - ctx, - input, - setup::SetupCtx::Init { - network_ports: network_ports.clone(), - }, - ) - .await; + let res = setup::setup(ctx, input, setup::SetupCtx::Init).await; let initial_actor_setup = match ctx.catch_unrecoverable(res)? { Ok(res) => res, Err(err) => { @@ -115,7 +109,7 @@ pub async fn pegboard_actor2(ctx: &mut WorkflowCtx, input: &Input) -> GlobalResu actor_id: input.actor_id, generation: 0, image_id: input.image_id, - build_allocation_type: None, + build_runtime_kind: None, kill: None, }) .output() @@ -144,7 +138,7 @@ pub async fn pegboard_actor2(ctx: &mut WorkflowCtx, input: &Input) -> GlobalResu actor_id: input.actor_id, generation: 0, image_id: input.image_id, - build_allocation_type: Some(initial_actor_setup.meta.build_allocation_type), + build_runtime_kind: Some(initial_actor_setup.meta.build_runtime.kind()), kill: None, }) .output() @@ -163,6 +157,7 @@ pub async fn pegboard_actor2(ctx: &mut WorkflowCtx, input: &Input) -> GlobalResu ), |ctx, state| { let input = input.clone(); + let initial_build_runtime_kind = initial_actor_setup.meta.build_runtime.kind(); async move { let sig = if let Some(drain_timeout_ts) = state.drain_timeout_ts { @@ -375,9 +370,7 @@ pub async fn pegboard_actor2(ctx: &mut WorkflowCtx, input: &Input) -> GlobalResu let validation_res = ctx .activity(runtime::ValidateUpgradeInput { - initial_build_allocation_type: initial_actor_setup - .meta - .build_allocation_type, + initial_build_runtime_kind, image_id: sig.image_id, }) .await?; @@ -463,7 +456,7 @@ pub async fn pegboard_actor2(ctx: &mut WorkflowCtx, input: &Input) -> GlobalResu actor_id: input.actor_id, generation: lifecycle_res.generation, image_id: lifecycle_res.image_id, - build_allocation_type: Some(initial_actor_setup.meta.build_allocation_type), + build_runtime_kind: Some(initial_actor_setup.meta.build_runtime.kind()), kill: lifecycle_res.kill, }) .output() @@ -552,7 +545,7 @@ pub struct UpgradeComplete {} join_signal!(PendingAllocation { Allocate, Destroy, - // + // Comment to prevent invalid formatting }); join_signal!(Main { @@ -562,3 +555,52 @@ join_signal!(Main { Undrain, Destroy, }); + +pub fn convert_port_request_from_api( + port_name: &str, + port: models::BuildsPortRequest, +) -> GlobalResult { + Ok(Port { + internal_port: port.internal_port.map(TryInto::try_into).transpose()?, + routing: if let Some(routing) = port.routing { + match *routing { + models::BuildsPortRouting { + guard: Some(_gg), + host: None, + } => crate::types::Routing::GameGuard { + protocol: port.protocol.api_into(), + }, + models::BuildsPortRouting { + guard: None, + host: Some(_), + } => crate::types::Routing::Host { + protocol: match port.protocol.api_try_into() { + Err(err) + if GlobalError::is( + &err, + formatted_error::code::ACTOR_FAILED_TO_CREATE, + ) => + { + // Add location + bail_with!( + ACTOR_FAILED_TO_CREATE, + error = format!("network.ports[{port_name:?}].protocol: Host port protocol must be either TCP or UDP.") + ); + } + x => x?, + }, + }, + models::BuildsPortRouting { .. } => { + bail_with!( + ACTOR_FAILED_TO_CREATE, + error = format!("network.ports[{port_name:?}].routing: Must specify either `guard` or `host` routing type.") + ); + } + } + } else { + crate::types::Routing::GameGuard { + protocol: port.protocol.api_into(), + } + }, + }) +} diff --git a/packages/edge/services/pegboard/src/workflows/actor/runtime.rs b/packages/edge/services/pegboard/src/workflows/actor/runtime.rs index 8e304649e8..5949e5ed3c 100644 --- a/packages/edge/services/pegboard/src/workflows/actor/runtime.rs +++ b/packages/edge/services/pegboard/src/workflows/actor/runtime.rs @@ -1,6 +1,6 @@ use std::time::Instant; -use build::types::{BuildAllocationType, BuildKind}; +use build::types::{BuildKind, BuildNetworkMode, BuildRuntime, BuildRuntimeKind}; use chirp_workflow::prelude::*; use cluster::types::BuildDeliveryMethod; use fdb_util::{end_of_key_range, FormalKey, SERIALIZABLE, SNAPSHOT}; @@ -22,7 +22,7 @@ use crate::{ keys, metrics, ops::actor::get, protocol, - types::{EndpointType, GameGuardProtocol, HostProtocol, NetworkMode, Port, Routing}, + types::{EndpointType, GameGuardProtocol, HostProtocol, Port, Routing}, workflows::client::CLIENT_ELIGIBLE_THRESHOLD_MS, }; @@ -288,14 +288,39 @@ async fn fetch_ports(ctx: &ActivityCtx, input: &FetchPortsInput) -> GlobalResult Ok(FetchPortsOutput { ports }) } +#[derive(Debug, Serialize, Deserialize, Hash)] +struct FetchRootUserEnabledInput { + env_id: Uuid, +} + +#[activity(FetchRootUserEnabled)] +async fn fetch_root_user_enabled( + ctx: &ActivityCtx, + input: &FetchRootUserEnabledInput, +) -> GlobalResult { + let games_res = op!([ctx] game_resolve_namespace_id { + namespace_ids: vec![input.env_id.into()], + }) + .await?; + let game = unwrap!(games_res.games.first()); + + let game_config_res = ctx + .op(crate::ops::game_config::get::Input { + game_ids: vec![unwrap!(game.game_id).into()], + }) + .await?; + let game_config = unwrap!(game_config_res.game_configs.first()); + + Ok(game_config.root_user_enabled) +} + #[derive(Debug, Serialize, Deserialize, Hash)] struct AllocateActorInput { actor_id: util::Id, generation: u32, image_id: Uuid, - build_allocation_type: BuildAllocationType, - build_allocation_total_slots: u32, - resources: protocol::Resources, + build_runtime: BuildRuntime, + selected_resources: protocol::Resources, } #[derive(Debug, Serialize, Deserialize)] @@ -312,10 +337,9 @@ async fn allocate_actor( ctx: &ActivityCtx, input: &AllocateActorInput, ) -> GlobalResult> { - let client_flavor = protocol::ClientFlavor::Multi; - let memory_mib = input.resources.memory / 1024 / 1024; - let start_instant = Instant::now(); + let client_flavor = protocol::ClientFlavor::Multi; + let memory_mib = input.selected_resources.memory / 1024 / 1024; // NOTE: This txn should closely resemble the one found in the allocate_pending_actors activity of the // client wf @@ -324,8 +348,7 @@ async fn allocate_actor( .await? .run(|tx, _mc| async move { // Check for availability amongst existing runners - let image_queue_exists = if let BuildAllocationType::Multi = input.build_allocation_type - { + let image_queue_exists = if let BuildRuntime::Actor { .. } = input.build_runtime { // Check if a queue for this image exists let pending_actor_by_image_subspace = keys::subspace().subspace( &keys::datacenter::PendingActorByImageIdKey::subspace(input.image_id), @@ -544,7 +567,7 @@ async fn allocate_actor( // Update allocated amount let new_remaining_mem = old_client_allocation_key.remaining_mem - memory_mib; - let new_remaining_cpu = old_remaining_cpu - input.resources.cpu; + let new_remaining_cpu = old_remaining_cpu - input.selected_resources.cpu; let new_allocation_key = keys::datacenter::ClientsByRemainingMemKey::new( client_flavor, new_remaining_mem, @@ -578,8 +601,8 @@ async fn allocate_actor( .map_err(|x| fdb::FdbBindingError::CustomError(x.into()))?, ); - let remaining_slots = input.build_allocation_total_slots.saturating_sub(1); - let total_slots = input.build_allocation_total_slots; + let remaining_slots = input.build_runtime.slots().saturating_sub(1); + let total_slots = input.build_runtime.slots(); // Insert runner records let remaining_slots_key = keys::runner::RemainingSlotsKey::new(runner_id); @@ -606,9 +629,9 @@ async fn allocate_actor( .map_err(|x| fdb::FdbBindingError::CustomError(x.into()))?, ); - // Insert runner index key if multi. Single allocation per container runners don't need to be - // in the alloc idx because they only have 1 slot - if let BuildAllocationType::Multi = input.build_allocation_type { + // Insert runner index key if actor. Container actor runners don't need to be in the alloc + // idx because they only have 1 slot + if let BuildRuntime::Actor { .. } = input.build_runtime { let runner_idx_key = keys::datacenter::RunnersByRemainingSlotsKey::new( input.image_id, remaining_slots, @@ -651,7 +674,7 @@ async fn allocate_actor( let pending_ts = util::timestamp::now(); // Write self to image alloc queue - if let BuildAllocationType::Multi = input.build_allocation_type { + if let BuildRuntime::Actor { .. } = &input.build_runtime { let image_pending_alloc_key = keys::datacenter::PendingActorByImageIdKey::new( input.image_id, pending_ts, @@ -659,10 +682,9 @@ async fn allocate_actor( ); let image_pending_alloc_data = keys::datacenter::PendingActorByImageIdKeyData { generation: input.generation, - build_allocation_type: input.build_allocation_type, - build_allocation_total_slots: input.build_allocation_total_slots, - cpu: input.resources.cpu, - memory: input.resources.memory, + build_runtime: input.build_runtime.clone(), + selected_cpu: input.selected_resources.cpu, + selected_mem: input.selected_resources.memory, }; // NOTE: This will conflict with serializable reads to the alloc queue, which is the behavior we @@ -682,10 +704,9 @@ async fn allocate_actor( let pending_alloc_data = keys::datacenter::PendingActorKeyData { generation: input.generation, image_id: input.image_id, - build_allocation_type: input.build_allocation_type, - build_allocation_total_slots: input.build_allocation_total_slots, - cpu: input.resources.cpu, - memory: input.resources.memory, + build_runtime: input.build_runtime.clone(), + selected_cpu: input.selected_resources.cpu, + selected_mem: input.selected_resources.memory, }; // NOTE: This will conflict with serializable reads to the alloc queue, which is the behavior we @@ -1009,9 +1030,8 @@ pub async fn spawn_actor( actor_id: input.actor_id, generation, image_id: actor_setup.image_id, - build_allocation_type: actor_setup.meta.build_allocation_type, - build_allocation_total_slots: actor_setup.meta.build_allocation_total_slots, - resources: actor_setup.resources.clone(), + build_runtime: actor_setup.meta.build_runtime.clone(), + selected_resources: actor_setup.selected_resources.clone(), }) .await?; @@ -1067,7 +1087,7 @@ pub async fn spawn_actor( } }; - let (_, artifacts_res, ports_res) = ctx + let (_, artifacts_res, ports_res, root_user_enabled) = ctx .join(( activity(UpdateClientAndRunnerInput { client_id: allocate_res.client_id, @@ -1086,6 +1106,9 @@ pub async fn spawn_actor( actor_id: input.actor_id, endpoint_type: input.endpoint_type, }), + activity(FetchRootUserEnabledInput { + env_id: input.env_id, + }), )) .await?; @@ -1102,11 +1125,7 @@ pub async fn spawn_actor( BuildKind::JavaScript => bail!("actors do not support js builds"), }, compression: actor_setup.meta.build_compression.into(), - allocation_type: match actor_setup.meta.build_allocation_type { - BuildAllocationType::None => bail!("actors do not support old builds"), - BuildAllocationType::Single => protocol::ImageAllocationType::Single, - BuildAllocationType::Multi => protocol::ImageAllocationType::Multi, - }, + allocation_type: actor_setup.meta.build_runtime.kind().into(), }; let ports = ports_res .ports @@ -1139,9 +1158,9 @@ pub async fn spawn_actor( ), }) .collect::>(); - let network_mode = match input.network_mode { - NetworkMode::Bridge => protocol::NetworkMode::Bridge, - NetworkMode::Host => protocol::NetworkMode::Host, + let network_mode = match actor_setup.meta.build_runtime.network_mode() { + BuildNetworkMode::Bridge => protocol::NetworkMode::Bridge, + BuildNetworkMode::Host => protocol::NetworkMode::Host, }; ctx.signal(protocol::Command::StartActor { @@ -1153,9 +1172,17 @@ pub async fn spawn_actor( runner_id: allocate_res.runner_id, config: protocol::RunnerConfig { image: image.clone(), - root_user_enabled: input.root_user_enabled, - resources: actor_setup.resources.clone(), - env: input.environment.clone(), + root_user_enabled, + resources: actor_setup.selected_resources.clone(), + // Merge provided env with build env + env: actor_setup + .meta + .build_runtime + .environment() + .iter() + .chain(&input.environment) + .map(|(k, v)| (k.clone(), v.clone())) + .collect(), ports: ports.clone(), network_mode, }, @@ -1165,7 +1192,6 @@ pub async fn spawn_actor( runner_id: allocate_res.runner_id, }) }, - env: input.environment.clone(), metadata: util::serde::Raw::new(&protocol::ActorMetadata { actor: protocol::ActorMetadataActor { actor_id: input.actor_id, @@ -1197,10 +1223,11 @@ pub async fn spawn_actor( }, })?, - // Deprecated + // Deprecated, will be removed after old actors are gone + env: input.environment.clone(), image, - root_user_enabled: input.root_user_enabled, - resources: actor_setup.resources.clone(), + root_user_enabled, + resources: actor_setup.selected_resources.clone(), ports, network_mode, }), @@ -1390,43 +1417,61 @@ async fn clear_ports_and_resources( input: &ClearPortsAndResourcesInput, ) -> GlobalResult { let pool = &ctx.sqlite().await?; + let mut conn = pool.conn().await?; + let mut tx = conn.begin().await?; - let ( - build_res, - (selected_resources_cpu_millicores, selected_resources_memory_mib), - _, - ) = tokio::try_join!( - ctx.op(build::ops::get::Input { + let build_res = ctx + .op(build::ops::get::Input { build_ids: vec![input.image_id], - }), - sql_fetch_one!( - [ctx, (Option, Option), pool] - " - SELECT selected_resources_cpu_millicores, selected_resources_memory_mib - FROM state - ", - ), - // Idempotent - sql_execute!( - [ctx, pool] - " - DELETE FROM ports_proxied - ", - ), - )?; + }) + .await?; + + let (selected_resources_cpu_millicores, selected_resources_memory_mib) = sql_fetch_one!( + [ctx, (Option, Option), @tx &mut tx] + " + SELECT selected_resources_cpu_millicores, selected_resources_memory_mib + FROM state + ", + ) + .await?; + + let ingress_ports = sql_fetch_all!( + [ctx, (i64, i64), @tx &mut tx] + " + DELETE FROM ports_ingress + RETURNING protocol, ingress_port_number + ", + ) + .await?; + sql_execute!( + [ctx, @tx &mut tx] + " + DELETE FROM ports_proxied + ", + ) + .await?; + sql_execute!( + [ctx, @tx &mut tx] + " + DELETE FROM ports_host + ", + ) + .await?; + let build = unwrap_with!(build_res.builds.first(), BUILD_NOT_FOUND); + let build_runtime_kind = unwrap_ref!(build.runtime, "cannot be old build").kind(); let destroy_runner = ctx .fdb() .await? .run(|tx, _mc| { + let ingress_ports = ingress_ports.clone(); async move { destroy::clear_ports_and_resources( input.actor_id, input.image_id, - Some(build.allocation_type), - // NOTE: Ingress ports are not cleared upon reschedule, they are reused - Vec::new(), + Some(build_runtime_kind), + ingress_ports, Some(input.runner_id), Some(input.client_id), Some(input.client_workflow_id), @@ -1440,6 +1485,8 @@ async fn clear_ports_and_resources( .custom_instrument(tracing::info_span!("actor_clear_ports_and_resources_tx")) .await?; + tx.commit().await?; + Ok(ClearPortsAndResourcesOutput { destroy_runner }) } @@ -1465,7 +1512,7 @@ pub async fn set_finished(ctx: &ActivityCtx, input: &SetFinishedInput) -> Global #[derive(Debug, Clone, Serialize, Deserialize, Hash)] pub struct ValidateUpgradeInput { - pub initial_build_allocation_type: BuildAllocationType, + pub initial_build_runtime_kind: BuildRuntimeKind, pub image_id: Uuid, } @@ -1495,20 +1542,23 @@ pub async fn validate_upgrade( return Ok(Some("Build upload not complete.".into())); } - if build.allocation_type != input.initial_build_allocation_type { - match input.initial_build_allocation_type { - BuildAllocationType::None => { - // NOTE: This should be unreachable because if an old build is encountered the old actor wf is used. - return Ok(Some("Old builds not supported.".into())); - } - BuildAllocationType::Single => { - return Ok(Some("Cannot use container build for actor.".into())); - } - BuildAllocationType::Multi => { - return Ok(Some("Cannot use actor build for container.".into())); - } + match ( + input.initial_build_runtime_kind, + unwrap!(build.runtime, "cannot be old build").kind(), + ) { + (BuildRuntimeKind::Actor, BuildRuntimeKind::Container) => { + return Ok(Some("Cannot use container build for actor.".into())); + } + (BuildRuntimeKind::Container, BuildRuntimeKind::Actor) => { + return Ok(Some("Cannot use actor build for container.".into())); } + _ => {} } + // TODO: Validate lengths of build env + input env, args, and ports + + // NOTE: We don't have to validate build properties here because they were already validated when the + // build was created + Ok(None) } diff --git a/packages/edge/services/pegboard/src/workflows/actor/setup.rs b/packages/edge/services/pegboard/src/workflows/actor/setup.rs index 48bc0bf874..e2ec6a2386 100644 --- a/packages/edge/services/pegboard/src/workflows/actor/setup.rs +++ b/packages/edge/services/pegboard/src/workflows/actor/setup.rs @@ -1,4 +1,4 @@ -use build::types::{BuildAllocationType, BuildCompression, BuildKind, BuildResources}; +use build::types::{BuildCompression, BuildKind, BuildNetworkMode, BuildRuntime}; use chirp_workflow::prelude::*; use cluster::types::BuildDeliveryMethod; use fdb_util::{end_of_key_range, FormalKey, SNAPSHOT}; @@ -13,7 +13,7 @@ use sqlx::Acquire; use super::{Input, Port}; use crate::{ keys, protocol, - types::{ActorLifecycle, ActorResources, GameGuardProtocol, NetworkMode, Routing}, + types::{ActorLifecycle, ActorResources, GameGuardProtocol, Routing}, }; #[derive(Debug, Clone, Serialize, Deserialize, Hash)] @@ -22,29 +22,14 @@ pub struct ValidateInput { pub tags: util::serde::HashableMap, pub resources: Option, pub image_id: Uuid, - pub root_user_enabled: bool, pub args: Vec, - pub network_mode: NetworkMode, pub environment: util::serde::HashableMap, pub network_ports: util::serde::HashableMap, } #[activity(Validate)] pub async fn validate(ctx: &ActivityCtx, input: &ValidateInput) -> GlobalResult> { - let dc_id = ctx.config().server()?.rivet.edge()?.datacenter_id; - - let (tiers, upload_res, game_config_res) = tokio::try_join!( - async { - let tier_res = ctx - .op(tier::ops::list::Input { - datacenter_ids: vec![dc_id], - pegboard: true, - }) - .await?; - let tier_dc = unwrap!(tier_res.datacenters.into_iter().next()); - - GlobalResult::Ok(tier_dc.tiers) - }, + let (upload_res, game_config_res) = tokio::try_join!( async { let builds_res = ctx .op(build::ops::get::Input { @@ -73,7 +58,7 @@ pub async fn validate(ctx: &ActivityCtx, input: &ValidateInput) -> GlobalResult< .await?; let Some(game) = games_res.games.first() else { - return Ok(None); + return GlobalResult::Ok(None); }; let game_config_res = ctx @@ -95,58 +80,33 @@ pub async fn validate(ctx: &ActivityCtx, input: &ValidateInput) -> GlobalResult< return Ok(Some("Build upload not complete.".into())); } - let resources = match build.allocation_type { - BuildAllocationType::None => { - // NOTE: This should be unreachable because if an old build is encountered the old actor wf is used. - return Ok(Some("Old builds not supported.".into())); - } - BuildAllocationType::Single => { - if let Some(resources) = &input.resources { - resources.clone() - } else { - return Ok(Some( - "Actors with builds of `allocation_type` = `single` must specify `resources`." - .into(), - )); + let Some(build_runtime) = build.runtime else { + return Ok(Some("Old builds not allowed".into())); + }; + + match &build_runtime { + BuildRuntime::Container { .. } => { + if input.resources.is_none() { + return Ok(Some("Containers must specify `resources`.".into())); } } - BuildAllocationType::Multi => { + BuildRuntime::Actor { .. } => { if input.resources.is_some() { - return Ok(Some("Cannot specify `resources` for actors with builds of `allocation_type` = `multi`.".into())); - } - - let build_resources = unwrap!(build.resources, "multi build should have resources"); - - ActorResources { - cpu_millicores: build_resources.cpu_millicores, - memory_mib: build_resources.memory_mib, + return Ok(Some("Actors cannot specify `resources`.".into())); } } - }; - - // Find any tier that has more CPU and memory than the requested resources - let has_tier = tiers - .iter() - .any(|t| t.cpu_millicores >= resources.cpu_millicores && t.memory >= resources.memory_mib); - - if !has_tier { - return Ok(Some("Too many resources allocated.".into())); } let Some(game_config) = game_config_res else { return Ok(Some("Environment not found.".into())); }; - if matches!(input.network_mode, NetworkMode::Host) && !game_config.host_networking_enabled { + if matches!(build_runtime.network_mode(), BuildNetworkMode::Host) + && !game_config.host_networking_enabled + { return Ok(Some("Host networking is not enabled for this game.".into())); } - if input.root_user_enabled && !game_config.root_user_enabled { - return Ok(Some( - "Docker root user is not enabled for this game.".into(), - )); - } - if input.tags.len() > 8 { return Ok(Some("Too many tags (max 8).".into())); } @@ -178,7 +138,7 @@ pub async fn validate(ctx: &ActivityCtx, input: &ValidateInput) -> GlobalResult< for (i, arg) in input.args.iter().enumerate() { if arg.len() > 256 { return Ok(Some(format!( - "runtime.args[{i}]: Argument too large (max 256 bytes)." + "args[{i}]: Argument too large (max 256 bytes)." ))); } } @@ -190,13 +150,13 @@ pub async fn validate(ctx: &ActivityCtx, input: &ValidateInput) -> GlobalResult< for (k, v) in &input.environment { if k.len() > 256 { return Ok(Some(format!( - "runtime.environment[{:?}]: Key too large (max 256 bytes).", + "environment[{:?}]: Key too large (max 256 bytes).", util::safe_slice(k, 0, 256), ))); } if v.len() > 1024 { return Ok(Some(format!( - "runtime.environment[{k:?}]: Value too large (max 1024 bytes)." + "environment[{k:?}]: Value too large (max 1024 bytes)." ))); } } @@ -208,26 +168,26 @@ pub async fn validate(ctx: &ActivityCtx, input: &ValidateInput) -> GlobalResult< for (name, port) in &input.network_ports { if name.len() > 16 { return Ok(Some(format!( - "runtime.ports[{:?}]: Port name too large (max 16 bytes).", + "ports[{:?}]: Port name too large (max 16 bytes).", util::safe_slice(name, 0, 16), ))); } - match input.network_mode { - NetworkMode::Bridge => { + match build_runtime.network_mode() { + BuildNetworkMode::Bridge => { // NOTE: Temporary validation until we implement bridge networking for isolates if let BuildKind::JavaScript = build.kind { if port.internal_port.is_some() { return Ok(Some(format!( - "runtime.ports[{name:?}].internal_port: Must be null when `network.mode` = \"bridge\" and using a JS build.", + "ports[{name:?}].internal_port: Must be null when `network.mode` = \"bridge\" and using a JS build.", ))); } } } - NetworkMode::Host => { + BuildNetworkMode::Host => { if port.internal_port.is_some() { return Ok(Some(format!( - "runtime.ports[{name:?}].internal_port: Must be null when `network.mode` = \"host\".", + "ports[{name:?}].internal_port: Must be null when `network.mode` = \"host\".", ))); } } @@ -238,14 +198,14 @@ pub async fn validate(ctx: &ActivityCtx, input: &ValidateInput) -> GlobalResult< } #[derive(Debug, Clone, Serialize, Deserialize, Hash)] -pub struct DisableTlsPortsInput { - pub network_ports: util::serde::HashableMap, +struct DisableTlsPortsInput { + network_ports: util::serde::HashableMap, } /// If TLS is not enabled in the cluster, we downgrade all protocols to the non-TLS equivalents. /// This allows developers to develop locally with the same code they would use in production. #[activity(DisableTlsPorts)] -pub async fn disable_tls_ports( +async fn disable_tls_ports( ctx: &ActivityCtx, input: &DisableTlsPortsInput, ) -> GlobalResult> { @@ -293,7 +253,6 @@ struct InsertDbInput { lifecycle: ActorLifecycle, image_id: Uuid, args: Vec, - network_mode: NetworkMode, environment: util::serde::HashableMap, } @@ -315,7 +274,6 @@ async fn insert_db(ctx: &ActivityCtx, input: &InsertDbInput) -> GlobalResult GlobalResult, + pub build_runtime: BuildRuntime, pub dc_name_id: String, pub dc_display_name: String, pub dc_build_delivery_method: BuildDeliveryMethod, @@ -727,9 +682,7 @@ async fn get_meta(ctx: &ActivityCtx, input: &GetMetaInput) -> GlobalResult GlobalResult SET project_id = ?, build_kind = ?, - build_compression = ?, - root_user_enabled = ? + build_compression = ? ", input.project_id, input.build_kind as i64, input.build_compression as i64, - input.root_user_enabled, ) .await?; @@ -769,19 +719,15 @@ async fn insert_meta(ctx: &ActivityCtx, input: &InsertMetaInput) -> GlobalResult } pub enum SetupCtx { - Init { - network_ports: util::serde::HashableMap, - }, - Reschedule { - image_id: Uuid, - }, + Init, + Reschedule { image_id: Uuid }, } #[derive(Clone)] pub struct ActorSetupCtx { pub image_id: Uuid, pub meta: GetMetaOutput, - pub resources: protocol::Resources, + pub selected_resources: protocol::Resources, } pub async fn setup( @@ -790,7 +736,7 @@ pub async fn setup( setup: SetupCtx, ) -> GlobalResult { let image_id = match setup { - SetupCtx::Init { network_ports } => { + SetupCtx::Init => { let tags = input.tags.clone(); let create_ts = ctx .activity(InsertDbInput { @@ -801,25 +747,10 @@ pub async fn setup( lifecycle: input.lifecycle.clone(), image_id: input.image_id, args: input.args.clone(), - network_mode: input.network_mode, environment: input.environment.clone(), }) .await?; - let ingress_ports_res = ctx - .activity(AllocateIngressPortsInput { - actor_id: input.actor_id, - network_ports: network_ports.clone(), - }) - .await?; - - ctx.activity(InsertPortsInput { - actor_id: input.actor_id, - network_ports, - ingress_ports: ingress_ports_res.ports, - }) - .await?; - ctx.activity(InsertFdbInput { actor_id: input.actor_id, env_id: input.env_id, @@ -840,34 +771,60 @@ pub async fn setup( }) .await?; + let network_ports = ctx + .activity(DisableTlsPortsInput { + // Merge provided ports with build ports + network_ports: meta + .build_runtime + .ports() + .iter() + .map(|(k, port)| (k.clone(), port.clone().into())) + .chain( + input + .network_ports + .iter() + .map(|(k, v)| (k.clone(), v.clone())), + ) + .collect(), + }) + .await?; + + let ingress_ports_res = ctx + .activity(AllocateIngressPortsInput { + actor_id: input.actor_id, + network_ports: network_ports.clone(), + }) + .await?; + + ctx.activity(InsertPortsInput { + actor_id: input.actor_id, + network_ports, + ingress_ports: ingress_ports_res.ports, + }) + .await?; + ctx.v(2) .activity(InsertMetaInput { project_id: meta.project_id, build_kind: meta.build_kind, build_compression: meta.build_compression, - root_user_enabled: input.root_user_enabled, }) .await?; // Use resources from build or from actor config - let resources = match meta.build_allocation_type { - BuildAllocationType::None => bail!("actors do not support old builds"), - BuildAllocationType::Single => unwrap!( + let resources = match &meta.build_runtime { + BuildRuntime::Container { .. } => unwrap!( input.resources.clone(), - "single builds should have actor resources" + "containers should have resources property set" ), - BuildAllocationType::Multi => { - let build_resources = - unwrap_ref!(meta.build_resources, "multi builds should have resources"); - - ActorResources { - cpu_millicores: build_resources.cpu_millicores, - memory_mib: build_resources.memory_mib, - } - } + BuildRuntime::Actor { resources, .. } => ActorResources { + cpu_millicores: resources.cpu_millicores, + memory_mib: resources.memory_mib, + }, }; - let resources = ctx + // Choose resources based on tier + let selected_resources = ctx .activity(SelectResourcesInput { cpu_millicores: resources.cpu_millicores, memory_mib: resources.memory_mib, @@ -877,7 +834,7 @@ pub async fn setup( Ok(ActorSetupCtx { image_id, meta, - resources, + selected_resources, }) } diff --git a/packages/edge/services/pegboard/src/workflows/client/mod.rs b/packages/edge/services/pegboard/src/workflows/client/mod.rs index e629e9e4a8..c7241baa25 100644 --- a/packages/edge/services/pegboard/src/workflows/client/mod.rs +++ b/packages/edge/services/pegboard/src/workflows/client/mod.rs @@ -1,6 +1,6 @@ use std::convert::TryInto; -use ::build::types::BuildAllocationType; +use ::build::types::BuildRuntime; use chirp_workflow::prelude::*; use fdb_util::{end_of_key_range, FormalKey, SERIALIZABLE, SNAPSHOT}; use foundationdb::{ @@ -1143,10 +1143,10 @@ pub(crate) async fn allocate_pending_actors( let queue_value = queue_key .deserialize(queue_entry.value()) .map_err(|x| fdb::FdbBindingError::CustomError(x.into()))?; - let memory_mib = queue_value.memory / 1024 / 1024; + let memory_mib = queue_value.selected_mem / 1024 / 1024; // Check for availability amongst existing runners - if let BuildAllocationType::Multi = queue_value.build_allocation_type { + if let BuildRuntime::Actor { .. } = &queue_value.build_runtime { // Select a range that only includes runners that have enough remaining slots to allocate // this actor let start = keys::subspace().pack( @@ -1333,7 +1333,7 @@ pub(crate) async fn allocate_pending_actors( // Update allocated amount let new_remaining_mem = old_client_allocation_key.remaining_mem - memory_mib; - let new_remaining_cpu = old_remaining_cpu - queue_value.cpu; + let new_remaining_cpu = old_remaining_cpu - queue_value.selected_cpu; let new_allocation_key = keys::datacenter::ClientsByRemainingMemKey::new( client_flavor, new_remaining_mem, @@ -1367,9 +1367,8 @@ pub(crate) async fn allocate_pending_actors( .map_err(|x| fdb::FdbBindingError::CustomError(x.into()))?, ); - let remaining_slots = - queue_value.build_allocation_total_slots.saturating_sub(1); - let total_slots = queue_value.build_allocation_total_slots; + let remaining_slots = queue_value.build_runtime.slots().saturating_sub(1); + let total_slots = queue_value.build_runtime.slots(); // Insert runner records let remaining_slots_key = keys::runner::RemainingSlotsKey::new(runner_id); @@ -1396,9 +1395,9 @@ pub(crate) async fn allocate_pending_actors( .map_err(|x| fdb::FdbBindingError::CustomError(x.into()))?, ); - // Insert runner index key if multi. Single allocation per container runners don't need to be - // in the alloc idx because they only have 1 slot - if let BuildAllocationType::Multi = queue_value.build_allocation_type { + // Insert runner index key if actor. Container actor runners don't need to be in the alloc + // idx because they only have 1 slot + if let BuildRuntime::Actor { .. } = queue_value.build_runtime { let runner_idx_key = keys::datacenter::RunnersByRemainingSlotsKey::new( queue_value.image_id, remaining_slots, diff --git a/packages/edge/services/pegboard/standalone/usage-metrics-publish/src/lib.rs b/packages/edge/services/pegboard/standalone/usage-metrics-publish/src/lib.rs index be5ea9ba25..5aa03f03f7 100644 --- a/packages/edge/services/pegboard/standalone/usage-metrics-publish/src/lib.rs +++ b/packages/edge/services/pegboard/standalone/usage-metrics-publish/src/lib.rs @@ -1,6 +1,6 @@ use std::collections::HashMap; -use build::types::{BuildAllocationType, BuildKind}; +use build::types::{BuildKind, BuildRuntime}; use chirp_workflow::prelude::*; use fdb_util::{FormalKey, SNAPSHOT}; use foundationdb::{self as fdb, options::StreamingMode}; @@ -134,9 +134,9 @@ pub async fn run_from_env( .entry(value.image_id) .or_insert_with(|| ImagePendingStats { actors: 0, - slots: value.build_allocation_total_slots, - cpu: value.cpu, - memory: value.memory / 1024 / 1024, + slots: value.build_runtime.slots(), + cpu: value.selected_cpu, + memory: value.selected_mem / 1024 / 1024, }); entry.actors += 1; @@ -202,36 +202,36 @@ pub async fn run_from_env( continue; }; - let client_flavor = match build.allocation_type { - BuildAllocationType::None => match build.kind { + let client_flavor = match build.runtime { + None => match build.kind { BuildKind::DockerImage | BuildKind::OciBundle => protocol::ClientFlavor::Container, BuildKind::JavaScript => protocol::ClientFlavor::Isolate, }, - BuildAllocationType::Single | BuildAllocationType::Multi => { - protocol::ClientFlavor::Multi - } + Some(_) => protocol::ClientFlavor::Multi, }; let env_usage = usage_by_env_and_flavor .entry((actor.env_id, client_flavor)) .or_insert(Usage { cpu: 0, memory: 0 }); - match build.allocation_type { - BuildAllocationType::None | BuildAllocationType::Single => { - if let Some(resources) = &actor.resources { + // NOTE: actor resources here is slightly different from build resources because it is + // selected based on tier + if let Some(resources) = &actor.resources { + match build.runtime { + None | Some(BuildRuntime::Container { .. }) => { env_usage.cpu += resources.cpu_millicores as u64; env_usage.memory += resources.memory_mib as u64; } + Some(BuildRuntime::Actor { + resources, slots, .. + }) => { + // TODO: This calculates multi runner metrics wrong, it should chunk by runner not divide by + // slots + env_usage.cpu += (resources.cpu_millicores / slots) as u64; + env_usage.memory += (resources.memory_mib / slots) as u64; + } } - BuildAllocationType::Multi => { - // TODO: This calculates multi runner metrics wrong, it should only add this for the runner - // not for each actor in the runner - // if let Some(resources) = build.resources { - // env_usage.cpu += build_resources.cpu_millicores as u64; - // env_usage.memory += build_resources.memory_mib as u64; - // } - } - }; + } } // Clear old metrics because they will never be set to 0 (due to no actors being present and thus no diff --git a/sdks/api/fern/definition/actors/__package__.yml b/sdks/api/fern/definition/actors/__package__.yml index 19efa6ae13..4bf1153c9c 100644 --- a/sdks/api/fern/definition/actors/__package__.yml +++ b/sdks/api/fern/definition/actors/__package__.yml @@ -163,18 +163,13 @@ types: tags: unknown build: optional build_tags: optional - # arguments: optional> - environment: optional> - network_mode: optional - network_endpoint_type: localCommons.EndpointType - ports: optional> + network_endpoint_type: optional wait_for_network_ready: optional - resources: optional kill_timeout: docs: >- - The duration to wait for in milliseconds before killing the actor. - This should be set to a safe default, and can be overridden during a - DELETE request if needed. + The duration to wait for in milliseconds before force killing the actor after a DELETE request. + This gives the actor time to perform a shutdown sequence before being killed. This should be set to + a safe default, and can be overridden during a DELETE request if needed. type: optional durable: docs: >- @@ -182,12 +177,6 @@ types: datacenter failover. The actor will not reschedule if it exits successfully. type: optional - CreateActorPortRequest: - properties: - protocol: localCommons.PortProtocol - internal_port: optional - routing: optional - CreateActorResponse: properties: actor: diff --git a/sdks/api/fern/definition/actors/common.yml b/sdks/api/fern/definition/actors/common.yml index d515d19662..bcb88f719e 100644 --- a/sdks/api/fern/definition/actors/common.yml +++ b/sdks/api/fern/definition/actors/common.yml @@ -2,6 +2,7 @@ imports: commons: ../common.yml + buildCommons: ../builds/common.yml types: Actor: @@ -10,15 +11,12 @@ types: region: string tags: unknown build: uuid - arguments: optional> - environment: optional> - network_mode: NetworkMode ports: map kill_timeout: docs: >- - The duration to wait for in milliseconds before killing the actor. - This should be set to a safe default, and can be overridden during a - DELETE request if needed. + The duration to wait for in milliseconds before force killing the actor after a DELETE request. + This gives the actor time to perform a shutdown sequence before being killed. This should be set to + a safe default, and can be overridden during a DELETE request if needed. type: optional durable: docs: >- @@ -29,14 +27,9 @@ types: started_at: optional destroyed_at: optional - NetworkMode: - enum: - - bridge - - host - Port: properties: - protocol: PortProtocol + protocol: buildCommons.PortProtocol internal_port: optional hostname: optional port: optional @@ -45,41 +38,9 @@ types: docs: | Fully formed connection URL including protocol, hostname, port, and path, if applicable. type: optional - routing: PortRouting - - PortProtocol: - enum: - - http - - https - - tcp - - tcp_tls - - udp - - PortRouting: - properties: - guard: optional - host: optional - - GuardRouting: - properties: {} - - HostRouting: - properties: {} + routing: buildCommons.PortRouting EndpointType: enum: - hostname - path - - Resources: - properties: - cpu: - docs: | - The number of CPU cores in millicores, or 1/1000 of a core. For example, - 1/8 of a core would be 125 millicores, and 1 core would be 1000 - millicores. - type: integer - memory: - docs: The amount of memory in megabytes - type: integer - diff --git a/sdks/api/fern/definition/actors/v1/common.yml b/sdks/api/fern/definition/actors/v1/common.yml index 1798bc79f1..1b81022d98 100644 --- a/sdks/api/fern/definition/actors/v1/common.yml +++ b/sdks/api/fern/definition/actors/v1/common.yml @@ -46,12 +46,15 @@ types: millicores. type: integer memory: - docs: The amount of memory in megabytes + docs: The amount of memory in mebibytes type: integer Network: properties: - mode: NetworkMode + mode: + docs: | + **Deprecated** + type: NetworkMode ports: map NetworkMode: diff --git a/sdks/api/fern/definition/builds/__package__.yml b/sdks/api/fern/definition/builds/__package__.yml index bd81b65c81..07684a6b6c 100644 --- a/sdks/api/fern/definition/builds/__package__.yml +++ b/sdks/api/fern/definition/builds/__package__.yml @@ -108,8 +108,7 @@ types: image_file: uploadCommons.PrepareFile kind: optional compression: optional - allocation: optional - resources: optional + runtime: optional PrepareBuildResponse: properties: diff --git a/sdks/api/fern/definition/builds/common.yml b/sdks/api/fern/definition/builds/common.yml index f559b871fd..7a646fa231 100644 --- a/sdks/api/fern/definition/builds/common.yml +++ b/sdks/api/fern/definition/builds/common.yml @@ -2,6 +2,8 @@ imports: commons: ../common.yml + actorCommons: ../actors/common.yml + containerCommons: ../containers/common.yml types: Build: @@ -12,11 +14,10 @@ types: content_length: docs: Unsigned 64 bit integer. type: long - allocation: optional - resources: optional tags: docs: Tags of this build type: map + runtime: optional Kind: enum: @@ -36,18 +37,52 @@ types: - value: lz4 docs: LZ4 compression. Use the minimum compression level. - Allocation: + Runtime: properties: - single: optional - multi: optional + container: optional + actor: optional - AllocationSingle: - properties: {} + RuntimeContainer: + properties: + # arguments: optional> + environment: optional> + network_mode: optional + ports: optional> - AllocationMulti: + RuntimeActor: properties: + # arguments: optional> + environment: optional> + network_mode: optional + ports: optional> + resources: Resources slots: integer + PortProtocol: + enum: + - http + - https + - tcp + - tcp_tls + - udp + + PortRouting: + properties: + guard: optional + host: optional + + GuardRouting: + properties: {} + + HostRouting: + properties: {} + + PortRequest: + properties: + protocol: PortProtocol + internal_port: optional + routing: optional + Resources: properties: cpu: @@ -57,5 +92,10 @@ types: millicores. type: integer memory: - docs: The amount of memory in megabytes - type: integer \ No newline at end of file + docs: The amount of memory in mebibytes + type: integer + + NetworkMode: + enum: + - bridge + - host diff --git a/sdks/api/fern/definition/containers/__package__.yml b/sdks/api/fern/definition/containers/__package__.yml index 510978619a..9333d08f03 100644 --- a/sdks/api/fern/definition/containers/__package__.yml +++ b/sdks/api/fern/definition/containers/__package__.yml @@ -2,6 +2,7 @@ imports: commons: ../common.yml + buildCommons: ../builds/common.yml localCommons: common.yml service: @@ -116,32 +117,23 @@ types: tags: unknown build: optional build_tags: optional - runtime: optional - network: optional - resources: localCommons.Resources - lifecycle: optional - - CreateContainerRuntimeRequest: - properties: # arguments: optional> environment: optional> - network: optional - - CreateContainerRuntimeNetworkRequest: - properties: - endpoint_type: localCommons.EndpointType - - CreateContainerNetworkRequest: - properties: - mode: optional - ports: optional> - wait_ready: optional - - CreateContainerPortRequest: - properties: - protocol: localCommons.PortProtocol - internal_port: optional - routing: optional + network_endpoint_type: optional + wait_for_network_ready: optional + ports: optional> + resources: buildCommons.Resources + kill_timeout: + docs: >- + The duration to wait for in milliseconds before force killing the actor after a DELETE request. + This gives the actor time to perform a shutdown sequence before being killed. This should be set to + a safe default, and can be overridden during a DELETE request if needed. + type: optional + durable: + docs: >- + If true, the actor will try to reschedule itself automatically in the event of a crash or a + datacenter failover. The actor will not reschedule if it exits successfully. + type: optional CreateContainerResponse: properties: diff --git a/sdks/api/fern/definition/containers/common.yml b/sdks/api/fern/definition/containers/common.yml index 6a15afac2c..c32b6571be 100644 --- a/sdks/api/fern/definition/containers/common.yml +++ b/sdks/api/fern/definition/containers/common.yml @@ -2,6 +2,7 @@ imports: commons: ../common.yml + buildCommons: ../builds/common.yml types: Container: @@ -9,59 +10,29 @@ types: id: commons.Id region: string tags: unknown - runtime: Runtime - network: Network - resources: Resources - lifecycle: Lifecycle - created_at: commons.Timestamp - started_at: optional - destroyed_at: optional - - Runtime: - properties: build: uuid arguments: optional> environment: optional> - - Lifecycle: - properties: + ports: map + resources: buildCommons.Resources kill_timeout: docs: >- - The duration to wait for in milliseconds before killing the container. - This should be set to a safe default, and can be overridden during a - DELETE request if needed. + The duration to wait for in milliseconds before force killing the actor after a DELETE request. + This gives the actor time to perform a shutdown sequence before being killed. This should be set to + a safe default, and can be overridden during a DELETE request if needed. type: optional durable: docs: >- - If true, the container will try to reschedule itself automatically in the event of a crash or a - datacenter failover. The container will not reschedule if it exits successfully. + If true, the actor will try to reschedule itself automatically in the event of a crash or a + datacenter failover. The actor will not reschedule if it exits successfully. type: optional - - Resources: - properties: - cpu: - docs: | - The number of CPU cores in millicores, or 1/1000 of a core. For example, - 1/8 of a core would be 125 millicores, and 1 core would be 1000 - millicores. - type: integer - memory: - docs: The amount of memory in megabytes - type: integer - - Network: - properties: - mode: NetworkMode - ports: map - - NetworkMode: - enum: - - bridge - - host + created_at: commons.Timestamp + started_at: optional + destroyed_at: optional Port: properties: - protocol: PortProtocol + protocol: buildCommons.PortProtocol internal_port: optional hostname: optional port: optional @@ -70,26 +41,7 @@ types: docs: | Fully formed connection URL including protocol, hostname, port, and path, if applicable. type: optional - routing: PortRouting - - PortProtocol: - enum: - - http - - https - - tcp - - tcp_tls - - udp - - PortRouting: - properties: - guard: optional - host: optional - - GuardRouting: - properties: {} - - HostRouting: - properties: {} + routing: buildCommons.PortRouting EndpointType: enum: diff --git a/sdks/api/full/go/actors/actors.go b/sdks/api/full/go/actors/actors.go index bab2fcb7b2..167c4f6ef1 100644 --- a/sdks/api/full/go/actors/actors.go +++ b/sdks/api/full/go/actors/actors.go @@ -11,13 +11,16 @@ import ( ) type CreateActorRequest struct { - Region *string `json:"region,omitempty"` - Tags interface{} `json:"tags,omitempty"` - Build *uuid.UUID `json:"build,omitempty"` - BuildTags interface{} `json:"build_tags,omitempty"` - Runtime *CreateActorRuntimeRequest `json:"runtime,omitempty"` - Network *CreateActorNetworkRequest `json:"network,omitempty"` - Lifecycle *Lifecycle `json:"lifecycle,omitempty"` + Region *string `json:"region,omitempty"` + Tags interface{} `json:"tags,omitempty"` + Build *uuid.UUID `json:"build,omitempty"` + BuildTags interface{} `json:"build_tags,omitempty"` + NetworkEndpointType *EndpointType `json:"network_endpoint_type,omitempty"` + WaitForNetworkReady *bool `json:"wait_for_network_ready,omitempty"` + // The duration to wait for in milliseconds before force killing the actor after a DELETE request. This gives the actor time to perform a shutdown sequence before being killed. This should be set to a safe default, and can be overridden during a DELETE request if needed. + KillTimeout *int64 `json:"kill_timeout,omitempty"` + // If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. + Durable *bool `json:"durable,omitempty"` _rawJSON json.RawMessage } diff --git a/sdks/api/full/go/actors/types.go b/sdks/api/full/go/actors/types.go index b5af2044e9..5907560fe1 100644 --- a/sdks/api/full/go/actors/types.go +++ b/sdks/api/full/go/actors/types.go @@ -7,6 +7,7 @@ import ( fmt "fmt" uuid "github.com/google/uuid" sdk "sdk" + builds "sdk/builds" core "sdk/core" ) @@ -62,12 +63,15 @@ type QueryActorsRequestQuery struct { } type Actor struct { - Id sdk.Id `json:"id"` - Region string `json:"region"` - Tags interface{} `json:"tags,omitempty"` - Runtime *Runtime `json:"runtime,omitempty"` - Network *Network `json:"network,omitempty"` - Lifecycle *Lifecycle `json:"lifecycle,omitempty"` + Id sdk.Id `json:"id"` + Region string `json:"region"` + Tags interface{} `json:"tags,omitempty"` + Build uuid.UUID `json:"build"` + Ports map[string]*Port `json:"ports,omitempty"` + // The duration to wait for in milliseconds before force killing the actor after a DELETE request. This gives the actor time to perform a shutdown sequence before being killed. This should be set to a safe default, and can be overridden during a DELETE request if needed. + KillTimeout *int64 `json:"kill_timeout,omitempty"` + // If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. + Durable *bool `json:"durable,omitempty"` CreatedAt sdk.Timestamp `json:"created_at"` StartedAt *sdk.Timestamp `json:"started_at,omitempty"` DestroyedAt *sdk.Timestamp `json:"destroyed_at,omitempty"` @@ -120,153 +124,15 @@ func (e EndpointType) Ptr() *EndpointType { return &e } -type GuardRouting struct { - _rawJSON json.RawMessage -} - -func (g *GuardRouting) UnmarshalJSON(data []byte) error { - type unmarshaler GuardRouting - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *g = GuardRouting(value) - g._rawJSON = json.RawMessage(data) - return nil -} - -func (g *GuardRouting) String() string { - if len(g._rawJSON) > 0 { - if value, err := core.StringifyJSON(g._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(g); err == nil { - return value - } - return fmt.Sprintf("%#v", g) -} - -type HostRouting struct { - _rawJSON json.RawMessage -} - -func (h *HostRouting) UnmarshalJSON(data []byte) error { - type unmarshaler HostRouting - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *h = HostRouting(value) - h._rawJSON = json.RawMessage(data) - return nil -} - -func (h *HostRouting) String() string { - if len(h._rawJSON) > 0 { - if value, err := core.StringifyJSON(h._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(h); err == nil { - return value - } - return fmt.Sprintf("%#v", h) -} - -type Lifecycle struct { - // The duration to wait for in milliseconds before killing the actor. This should be set to a safe default, and can be overridden during a DELETE request if needed. - KillTimeout *int64 `json:"kill_timeout,omitempty"` - // If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. - Durable *bool `json:"durable,omitempty"` - - _rawJSON json.RawMessage -} - -func (l *Lifecycle) UnmarshalJSON(data []byte) error { - type unmarshaler Lifecycle - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *l = Lifecycle(value) - l._rawJSON = json.RawMessage(data) - return nil -} - -func (l *Lifecycle) String() string { - if len(l._rawJSON) > 0 { - if value, err := core.StringifyJSON(l._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(l); err == nil { - return value - } - return fmt.Sprintf("%#v", l) -} - -type Network struct { - Mode NetworkMode `json:"mode,omitempty"` - Ports map[string]*Port `json:"ports,omitempty"` - - _rawJSON json.RawMessage -} - -func (n *Network) UnmarshalJSON(data []byte) error { - type unmarshaler Network - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *n = Network(value) - n._rawJSON = json.RawMessage(data) - return nil -} - -func (n *Network) String() string { - if len(n._rawJSON) > 0 { - if value, err := core.StringifyJSON(n._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(n); err == nil { - return value - } - return fmt.Sprintf("%#v", n) -} - -type NetworkMode string - -const ( - NetworkModeBridge NetworkMode = "bridge" - NetworkModeHost NetworkMode = "host" -) - -func NewNetworkModeFromString(s string) (NetworkMode, error) { - switch s { - case "bridge": - return NetworkModeBridge, nil - case "host": - return NetworkModeHost, nil - } - var t NetworkMode - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (n NetworkMode) Ptr() *NetworkMode { - return &n -} - type Port struct { - Protocol PortProtocol `json:"protocol,omitempty"` - InternalPort *int `json:"internal_port,omitempty"` - Hostname *string `json:"hostname,omitempty"` - Port *int `json:"port,omitempty"` - Path *string `json:"path,omitempty"` + Protocol builds.PortProtocol `json:"protocol,omitempty"` + InternalPort *int `json:"internal_port,omitempty"` + Hostname *string `json:"hostname,omitempty"` + Port *int `json:"port,omitempty"` + Path *string `json:"path,omitempty"` // Fully formed connection URL including protocol, hostname, port, and path, if applicable. - Url *string `json:"url,omitempty"` - Routing *PortRouting `json:"routing,omitempty"` + Url *string `json:"url,omitempty"` + Routing *builds.PortRouting `json:"routing,omitempty"` _rawJSON json.RawMessage } @@ -294,219 +160,6 @@ func (p *Port) String() string { return fmt.Sprintf("%#v", p) } -type PortProtocol string - -const ( - PortProtocolHttp PortProtocol = "http" - PortProtocolHttps PortProtocol = "https" - PortProtocolTcp PortProtocol = "tcp" - PortProtocolTcpTls PortProtocol = "tcp_tls" - PortProtocolUdp PortProtocol = "udp" -) - -func NewPortProtocolFromString(s string) (PortProtocol, error) { - switch s { - case "http": - return PortProtocolHttp, nil - case "https": - return PortProtocolHttps, nil - case "tcp": - return PortProtocolTcp, nil - case "tcp_tls": - return PortProtocolTcpTls, nil - case "udp": - return PortProtocolUdp, nil - } - var t PortProtocol - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (p PortProtocol) Ptr() *PortProtocol { - return &p -} - -type PortRouting struct { - Guard *GuardRouting `json:"guard,omitempty"` - Host *HostRouting `json:"host,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PortRouting) UnmarshalJSON(data []byte) error { - type unmarshaler PortRouting - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PortRouting(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PortRouting) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -type Runtime struct { - Build uuid.UUID `json:"build"` - Arguments []string `json:"arguments,omitempty"` - Environment map[string]string `json:"environment,omitempty"` - - _rawJSON json.RawMessage -} - -func (r *Runtime) UnmarshalJSON(data []byte) error { - type unmarshaler Runtime - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *r = Runtime(value) - r._rawJSON = json.RawMessage(data) - return nil -} - -func (r *Runtime) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(r); err == nil { - return value - } - return fmt.Sprintf("%#v", r) -} - -type CreateActorNetworkRequest struct { - Mode *NetworkMode `json:"mode,omitempty"` - Ports map[string]*CreateActorPortRequest `json:"ports,omitempty"` - WaitReady *bool `json:"wait_ready,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *CreateActorNetworkRequest) UnmarshalJSON(data []byte) error { - type unmarshaler CreateActorNetworkRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = CreateActorNetworkRequest(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *CreateActorNetworkRequest) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - -type CreateActorPortRequest struct { - Protocol PortProtocol `json:"protocol,omitempty"` - InternalPort *int `json:"internal_port,omitempty"` - Routing *PortRouting `json:"routing,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *CreateActorPortRequest) UnmarshalJSON(data []byte) error { - type unmarshaler CreateActorPortRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = CreateActorPortRequest(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *CreateActorPortRequest) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - -type CreateActorRuntimeNetworkRequest struct { - EndpointType EndpointType `json:"endpoint_type,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *CreateActorRuntimeNetworkRequest) UnmarshalJSON(data []byte) error { - type unmarshaler CreateActorRuntimeNetworkRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = CreateActorRuntimeNetworkRequest(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *CreateActorRuntimeNetworkRequest) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - -type CreateActorRuntimeRequest struct { - Environment map[string]string `json:"environment,omitempty"` - Network *CreateActorRuntimeNetworkRequest `json:"network,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *CreateActorRuntimeRequest) UnmarshalJSON(data []byte) error { - type unmarshaler CreateActorRuntimeRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = CreateActorRuntimeRequest(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *CreateActorRuntimeRequest) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - type UpgradeActorRequestQuery struct { Project *string `json:"-"` Environment *string `json:"-"` diff --git a/sdks/api/full/go/actors/v1/types.go b/sdks/api/full/go/actors/v1/types.go index e6332de451..599c4f2f10 100644 --- a/sdks/api/full/go/actors/v1/types.go +++ b/sdks/api/full/go/actors/v1/types.go @@ -199,6 +199,7 @@ func (l *Lifecycle) String() string { } type Network struct { + // **Deprecated** Mode NetworkMode `json:"mode,omitempty"` Ports map[string]*Port `json:"ports,omitempty"` @@ -352,7 +353,7 @@ type Resources struct { // 1/8 of a core would be 125 millicores, and 1 core would be 1000 // millicores. Cpu int `json:"cpu"` - // The amount of memory in megabytes + // The amount of memory in mebibytes Memory int `json:"memory"` _rawJSON json.RawMessage diff --git a/sdks/api/full/go/builds/builds.go b/sdks/api/full/go/builds/builds.go index d786388a22..51290a3081 100644 --- a/sdks/api/full/go/builds/builds.go +++ b/sdks/api/full/go/builds/builds.go @@ -134,8 +134,7 @@ type PrepareBuildRequest struct { ImageFile *upload.PrepareFile `json:"image_file,omitempty"` Kind *Kind `json:"kind,omitempty"` Compression *Compression `json:"compression,omitempty"` - Allocation *Allocation `json:"allocation,omitempty"` - Resources *Resources `json:"resources,omitempty"` + Runtime *Runtime `json:"runtime,omitempty"` _rawJSON json.RawMessage } diff --git a/sdks/api/full/go/builds/types.go b/sdks/api/full/go/builds/types.go index c9dfbdcb28..5236ab8af3 100644 --- a/sdks/api/full/go/builds/types.go +++ b/sdks/api/full/go/builds/types.go @@ -64,151 +64,118 @@ func (p *PrepareBuildRequestQuery) MarshalJSON() ([]byte, error) { return json.Marshal(p.Body) } -type Allocation struct { - Single *AllocationSingle `json:"single,omitempty"` - Multi *AllocationMulti `json:"multi,omitempty"` +type Build struct { + Id uuid.UUID `json:"id"` + Name string `json:"name"` + CreatedAt sdk.Timestamp `json:"created_at"` + // Unsigned 64 bit integer. + ContentLength int64 `json:"content_length"` + // Tags of this build + Tags map[string]string `json:"tags,omitempty"` + Runtime *Runtime `json:"runtime,omitempty"` _rawJSON json.RawMessage } -func (a *Allocation) UnmarshalJSON(data []byte) error { - type unmarshaler Allocation +func (b *Build) UnmarshalJSON(data []byte) error { + type unmarshaler Build var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *a = Allocation(value) - a._rawJSON = json.RawMessage(data) + *b = Build(value) + b._rawJSON = json.RawMessage(data) return nil } -func (a *Allocation) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { +func (b *Build) String() string { + if len(b._rawJSON) > 0 { + if value, err := core.StringifyJSON(b._rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(a); err == nil { + if value, err := core.StringifyJSON(b); err == nil { return value } - return fmt.Sprintf("%#v", a) + return fmt.Sprintf("%#v", b) } -type AllocationMulti struct { - Slots int `json:"slots"` +type Compression string - _rawJSON json.RawMessage -} +const ( + // None compression. + CompressionNone Compression = "none" + // LZ4 compression. Use the minimum compression level. + CompressionLz4 Compression = "lz4" +) -func (a *AllocationMulti) UnmarshalJSON(data []byte) error { - type unmarshaler AllocationMulti - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func NewCompressionFromString(s string) (Compression, error) { + switch s { + case "none": + return CompressionNone, nil + case "lz4": + return CompressionLz4, nil } - *a = AllocationMulti(value) - a._rawJSON = json.RawMessage(data) - return nil + var t Compression + return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (a *AllocationMulti) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value - } - return fmt.Sprintf("%#v", a) +func (c Compression) Ptr() *Compression { + return &c } -type AllocationSingle struct { +type GuardRouting struct { _rawJSON json.RawMessage } -func (a *AllocationSingle) UnmarshalJSON(data []byte) error { - type unmarshaler AllocationSingle +func (g *GuardRouting) UnmarshalJSON(data []byte) error { + type unmarshaler GuardRouting var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *a = AllocationSingle(value) - a._rawJSON = json.RawMessage(data) + *g = GuardRouting(value) + g._rawJSON = json.RawMessage(data) return nil } -func (a *AllocationSingle) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { +func (g *GuardRouting) String() string { + if len(g._rawJSON) > 0 { + if value, err := core.StringifyJSON(g._rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(a); err == nil { + if value, err := core.StringifyJSON(g); err == nil { return value } - return fmt.Sprintf("%#v", a) + return fmt.Sprintf("%#v", g) } -type Build struct { - Id uuid.UUID `json:"id"` - Name string `json:"name"` - CreatedAt sdk.Timestamp `json:"created_at"` - // Unsigned 64 bit integer. - ContentLength int64 `json:"content_length"` - Allocation *Allocation `json:"allocation,omitempty"` - Resources *Resources `json:"resources,omitempty"` - // Tags of this build - Tags map[string]string `json:"tags,omitempty"` - +type HostRouting struct { _rawJSON json.RawMessage } -func (b *Build) UnmarshalJSON(data []byte) error { - type unmarshaler Build +func (h *HostRouting) UnmarshalJSON(data []byte) error { + type unmarshaler HostRouting var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *b = Build(value) - b._rawJSON = json.RawMessage(data) + *h = HostRouting(value) + h._rawJSON = json.RawMessage(data) return nil } -func (b *Build) String() string { - if len(b._rawJSON) > 0 { - if value, err := core.StringifyJSON(b._rawJSON); err == nil { +func (h *HostRouting) String() string { + if len(h._rawJSON) > 0 { + if value, err := core.StringifyJSON(h._rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(b); err == nil { + if value, err := core.StringifyJSON(h); err == nil { return value } - return fmt.Sprintf("%#v", b) -} - -type Compression string - -const ( - // None compression. - CompressionNone Compression = "none" - // LZ4 compression. Use the minimum compression level. - CompressionLz4 Compression = "lz4" -) - -func NewCompressionFromString(s string) (Compression, error) { - switch s { - case "none": - return CompressionNone, nil - case "lz4": - return CompressionLz4, nil - } - var t Compression - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (c Compression) Ptr() *Compression { - return &c + return fmt.Sprintf("%#v", h) } type Kind string @@ -218,6 +185,7 @@ const ( KindDockerImage Kind = "docker_image" // OCI-compliant bundle. KindOciBundle Kind = "oci_bundle" + // **Deprecated** // A JavaScript file. KindJavascript Kind = "javascript" ) @@ -239,12 +207,126 @@ func (k Kind) Ptr() *Kind { return &k } +type NetworkMode string + +const ( + NetworkModeBridge NetworkMode = "bridge" + NetworkModeHost NetworkMode = "host" +) + +func NewNetworkModeFromString(s string) (NetworkMode, error) { + switch s { + case "bridge": + return NetworkModeBridge, nil + case "host": + return NetworkModeHost, nil + } + var t NetworkMode + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (n NetworkMode) Ptr() *NetworkMode { + return &n +} + +type PortProtocol string + +const ( + PortProtocolHttp PortProtocol = "http" + PortProtocolHttps PortProtocol = "https" + PortProtocolTcp PortProtocol = "tcp" + PortProtocolTcpTls PortProtocol = "tcp_tls" + PortProtocolUdp PortProtocol = "udp" +) + +func NewPortProtocolFromString(s string) (PortProtocol, error) { + switch s { + case "http": + return PortProtocolHttp, nil + case "https": + return PortProtocolHttps, nil + case "tcp": + return PortProtocolTcp, nil + case "tcp_tls": + return PortProtocolTcpTls, nil + case "udp": + return PortProtocolUdp, nil + } + var t PortProtocol + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (p PortProtocol) Ptr() *PortProtocol { + return &p +} + +type PortRequest struct { + Protocol PortProtocol `json:"protocol,omitempty"` + InternalPort *int `json:"internal_port,omitempty"` + Routing *PortRouting `json:"routing,omitempty"` + + _rawJSON json.RawMessage +} + +func (p *PortRequest) UnmarshalJSON(data []byte) error { + type unmarshaler PortRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PortRequest(value) + p._rawJSON = json.RawMessage(data) + return nil +} + +func (p *PortRequest) String() string { + if len(p._rawJSON) > 0 { + if value, err := core.StringifyJSON(p._rawJSON); err == nil { + return value + } + } + if value, err := core.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +type PortRouting struct { + Guard *GuardRouting `json:"guard,omitempty"` + Host *HostRouting `json:"host,omitempty"` + + _rawJSON json.RawMessage +} + +func (p *PortRouting) UnmarshalJSON(data []byte) error { + type unmarshaler PortRouting + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PortRouting(value) + p._rawJSON = json.RawMessage(data) + return nil +} + +func (p *PortRouting) String() string { + if len(p._rawJSON) > 0 { + if value, err := core.StringifyJSON(p._rawJSON); err == nil { + return value + } + } + if value, err := core.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + type Resources struct { // The number of CPU cores in millicores, or 1/1000 of a core. For example, // 1/8 of a core would be 125 millicores, and 1 core would be 1000 // millicores. Cpu int `json:"cpu"` - // The amount of memory in megabytes + // The amount of memory in mebibytes Memory int `json:"memory"` _rawJSON json.RawMessage @@ -272,3 +354,97 @@ func (r *Resources) String() string { } return fmt.Sprintf("%#v", r) } + +type Runtime struct { + Container *RuntimeContainer `json:"container,omitempty"` + Actor *RuntimeActor `json:"actor,omitempty"` + + _rawJSON json.RawMessage +} + +func (r *Runtime) UnmarshalJSON(data []byte) error { + type unmarshaler Runtime + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *r = Runtime(value) + r._rawJSON = json.RawMessage(data) + return nil +} + +func (r *Runtime) String() string { + if len(r._rawJSON) > 0 { + if value, err := core.StringifyJSON(r._rawJSON); err == nil { + return value + } + } + if value, err := core.StringifyJSON(r); err == nil { + return value + } + return fmt.Sprintf("%#v", r) +} + +type RuntimeActor struct { + Environment map[string]string `json:"environment,omitempty"` + NetworkMode *NetworkMode `json:"network_mode,omitempty"` + Ports map[string]*PortRequest `json:"ports,omitempty"` + Resources *Resources `json:"resources,omitempty"` + Slots int `json:"slots"` + + _rawJSON json.RawMessage +} + +func (r *RuntimeActor) UnmarshalJSON(data []byte) error { + type unmarshaler RuntimeActor + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *r = RuntimeActor(value) + r._rawJSON = json.RawMessage(data) + return nil +} + +func (r *RuntimeActor) String() string { + if len(r._rawJSON) > 0 { + if value, err := core.StringifyJSON(r._rawJSON); err == nil { + return value + } + } + if value, err := core.StringifyJSON(r); err == nil { + return value + } + return fmt.Sprintf("%#v", r) +} + +type RuntimeContainer struct { + Environment map[string]string `json:"environment,omitempty"` + NetworkMode *NetworkMode `json:"network_mode,omitempty"` + Ports map[string]*PortRequest `json:"ports,omitempty"` + + _rawJSON json.RawMessage +} + +func (r *RuntimeContainer) UnmarshalJSON(data []byte) error { + type unmarshaler RuntimeContainer + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *r = RuntimeContainer(value) + r._rawJSON = json.RawMessage(data) + return nil +} + +func (r *RuntimeContainer) String() string { + if len(r._rawJSON) > 0 { + if value, err := core.StringifyJSON(r._rawJSON); err == nil { + return value + } + } + if value, err := core.StringifyJSON(r); err == nil { + return value + } + return fmt.Sprintf("%#v", r) +} diff --git a/sdks/api/full/go/containers/containers.go b/sdks/api/full/go/containers/containers.go index 63b15b5a86..66336b7c67 100644 --- a/sdks/api/full/go/containers/containers.go +++ b/sdks/api/full/go/containers/containers.go @@ -7,18 +7,24 @@ import ( fmt "fmt" uuid "github.com/google/uuid" sdk "sdk" + builds "sdk/builds" core "sdk/core" ) type CreateContainerRequest struct { - Region *string `json:"region,omitempty"` - Tags interface{} `json:"tags,omitempty"` - Build *uuid.UUID `json:"build,omitempty"` - BuildTags interface{} `json:"build_tags,omitempty"` - Runtime *CreateContainerRuntimeRequest `json:"runtime,omitempty"` - Network *CreateContainerNetworkRequest `json:"network,omitempty"` - Resources *Resources `json:"resources,omitempty"` - Lifecycle *Lifecycle `json:"lifecycle,omitempty"` + Region *string `json:"region,omitempty"` + Tags interface{} `json:"tags,omitempty"` + Build *uuid.UUID `json:"build,omitempty"` + BuildTags interface{} `json:"build_tags,omitempty"` + Environment map[string]string `json:"environment,omitempty"` + NetworkEndpointType *EndpointType `json:"network_endpoint_type,omitempty"` + WaitForNetworkReady *bool `json:"wait_for_network_ready,omitempty"` + Ports map[string]*builds.PortRequest `json:"ports,omitempty"` + Resources *builds.Resources `json:"resources,omitempty"` + // The duration to wait for in milliseconds before force killing the actor after a DELETE request. This gives the actor time to perform a shutdown sequence before being killed. This should be set to a safe default, and can be overridden during a DELETE request if needed. + KillTimeout *int64 `json:"kill_timeout,omitempty"` + // If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. + Durable *bool `json:"durable,omitempty"` _rawJSON json.RawMessage } diff --git a/sdks/api/full/go/containers/types.go b/sdks/api/full/go/containers/types.go index 383dcf1cc9..1489cd0799 100644 --- a/sdks/api/full/go/containers/types.go +++ b/sdks/api/full/go/containers/types.go @@ -7,6 +7,7 @@ import ( fmt "fmt" uuid "github.com/google/uuid" sdk "sdk" + builds "sdk/builds" core "sdk/core" ) @@ -53,13 +54,18 @@ type GetContainersRequestQuery struct { } type Container struct { - Id sdk.Id `json:"id"` - Region string `json:"region"` - Tags interface{} `json:"tags,omitempty"` - Runtime *Runtime `json:"runtime,omitempty"` - Network *Network `json:"network,omitempty"` - Resources *Resources `json:"resources,omitempty"` - Lifecycle *Lifecycle `json:"lifecycle,omitempty"` + Id sdk.Id `json:"id"` + Region string `json:"region"` + Tags interface{} `json:"tags,omitempty"` + Build uuid.UUID `json:"build"` + Arguments []string `json:"arguments,omitempty"` + Environment map[string]string `json:"environment,omitempty"` + Ports map[string]*Port `json:"ports,omitempty"` + Resources *builds.Resources `json:"resources,omitempty"` + // The duration to wait for in milliseconds before force killing the actor after a DELETE request. This gives the actor time to perform a shutdown sequence before being killed. This should be set to a safe default, and can be overridden during a DELETE request if needed. + KillTimeout *int64 `json:"kill_timeout,omitempty"` + // If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. + Durable *bool `json:"durable,omitempty"` CreatedAt sdk.Timestamp `json:"created_at"` StartedAt *sdk.Timestamp `json:"started_at,omitempty"` DestroyedAt *sdk.Timestamp `json:"destroyed_at,omitempty"` @@ -112,153 +118,15 @@ func (e EndpointType) Ptr() *EndpointType { return &e } -type GuardRouting struct { - _rawJSON json.RawMessage -} - -func (g *GuardRouting) UnmarshalJSON(data []byte) error { - type unmarshaler GuardRouting - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *g = GuardRouting(value) - g._rawJSON = json.RawMessage(data) - return nil -} - -func (g *GuardRouting) String() string { - if len(g._rawJSON) > 0 { - if value, err := core.StringifyJSON(g._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(g); err == nil { - return value - } - return fmt.Sprintf("%#v", g) -} - -type HostRouting struct { - _rawJSON json.RawMessage -} - -func (h *HostRouting) UnmarshalJSON(data []byte) error { - type unmarshaler HostRouting - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *h = HostRouting(value) - h._rawJSON = json.RawMessage(data) - return nil -} - -func (h *HostRouting) String() string { - if len(h._rawJSON) > 0 { - if value, err := core.StringifyJSON(h._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(h); err == nil { - return value - } - return fmt.Sprintf("%#v", h) -} - -type Lifecycle struct { - // The duration to wait for in milliseconds before killing the container. This should be set to a safe default, and can be overridden during a DELETE request if needed. - KillTimeout *int64 `json:"kill_timeout,omitempty"` - // If true, the container will try to reschedule itself automatically in the event of a crash or a datacenter failover. The container will not reschedule if it exits successfully. - Durable *bool `json:"durable,omitempty"` - - _rawJSON json.RawMessage -} - -func (l *Lifecycle) UnmarshalJSON(data []byte) error { - type unmarshaler Lifecycle - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *l = Lifecycle(value) - l._rawJSON = json.RawMessage(data) - return nil -} - -func (l *Lifecycle) String() string { - if len(l._rawJSON) > 0 { - if value, err := core.StringifyJSON(l._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(l); err == nil { - return value - } - return fmt.Sprintf("%#v", l) -} - -type Network struct { - Mode NetworkMode `json:"mode,omitempty"` - Ports map[string]*Port `json:"ports,omitempty"` - - _rawJSON json.RawMessage -} - -func (n *Network) UnmarshalJSON(data []byte) error { - type unmarshaler Network - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *n = Network(value) - n._rawJSON = json.RawMessage(data) - return nil -} - -func (n *Network) String() string { - if len(n._rawJSON) > 0 { - if value, err := core.StringifyJSON(n._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(n); err == nil { - return value - } - return fmt.Sprintf("%#v", n) -} - -type NetworkMode string - -const ( - NetworkModeBridge NetworkMode = "bridge" - NetworkModeHost NetworkMode = "host" -) - -func NewNetworkModeFromString(s string) (NetworkMode, error) { - switch s { - case "bridge": - return NetworkModeBridge, nil - case "host": - return NetworkModeHost, nil - } - var t NetworkMode - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (n NetworkMode) Ptr() *NetworkMode { - return &n -} - type Port struct { - Protocol PortProtocol `json:"protocol,omitempty"` - InternalPort *int `json:"internal_port,omitempty"` - Hostname *string `json:"hostname,omitempty"` - Port *int `json:"port,omitempty"` - Path *string `json:"path,omitempty"` + Protocol builds.PortProtocol `json:"protocol,omitempty"` + InternalPort *int `json:"internal_port,omitempty"` + Hostname *string `json:"hostname,omitempty"` + Port *int `json:"port,omitempty"` + Path *string `json:"path,omitempty"` // Fully formed connection URL including protocol, hostname, port, and path, if applicable. - Url *string `json:"url,omitempty"` - Routing *PortRouting `json:"routing,omitempty"` + Url *string `json:"url,omitempty"` + Routing *builds.PortRouting `json:"routing,omitempty"` _rawJSON json.RawMessage } @@ -286,253 +154,6 @@ func (p *Port) String() string { return fmt.Sprintf("%#v", p) } -type PortProtocol string - -const ( - PortProtocolHttp PortProtocol = "http" - PortProtocolHttps PortProtocol = "https" - PortProtocolTcp PortProtocol = "tcp" - PortProtocolTcpTls PortProtocol = "tcp_tls" - PortProtocolUdp PortProtocol = "udp" -) - -func NewPortProtocolFromString(s string) (PortProtocol, error) { - switch s { - case "http": - return PortProtocolHttp, nil - case "https": - return PortProtocolHttps, nil - case "tcp": - return PortProtocolTcp, nil - case "tcp_tls": - return PortProtocolTcpTls, nil - case "udp": - return PortProtocolUdp, nil - } - var t PortProtocol - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (p PortProtocol) Ptr() *PortProtocol { - return &p -} - -type PortRouting struct { - Guard *GuardRouting `json:"guard,omitempty"` - Host *HostRouting `json:"host,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PortRouting) UnmarshalJSON(data []byte) error { - type unmarshaler PortRouting - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PortRouting(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PortRouting) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -type Resources struct { - // The number of CPU cores in millicores, or 1/1000 of a core. For example, - // 1/8 of a core would be 125 millicores, and 1 core would be 1000 - // millicores. - Cpu int `json:"cpu"` - // The amount of memory in megabytes - Memory int `json:"memory"` - - _rawJSON json.RawMessage -} - -func (r *Resources) UnmarshalJSON(data []byte) error { - type unmarshaler Resources - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *r = Resources(value) - r._rawJSON = json.RawMessage(data) - return nil -} - -func (r *Resources) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(r); err == nil { - return value - } - return fmt.Sprintf("%#v", r) -} - -type Runtime struct { - Build uuid.UUID `json:"build"` - Arguments []string `json:"arguments,omitempty"` - Environment map[string]string `json:"environment,omitempty"` - - _rawJSON json.RawMessage -} - -func (r *Runtime) UnmarshalJSON(data []byte) error { - type unmarshaler Runtime - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *r = Runtime(value) - r._rawJSON = json.RawMessage(data) - return nil -} - -func (r *Runtime) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(r); err == nil { - return value - } - return fmt.Sprintf("%#v", r) -} - -type CreateContainerNetworkRequest struct { - Mode *NetworkMode `json:"mode,omitempty"` - Ports map[string]*CreateContainerPortRequest `json:"ports,omitempty"` - WaitReady *bool `json:"wait_ready,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *CreateContainerNetworkRequest) UnmarshalJSON(data []byte) error { - type unmarshaler CreateContainerNetworkRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = CreateContainerNetworkRequest(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *CreateContainerNetworkRequest) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - -type CreateContainerPortRequest struct { - Protocol PortProtocol `json:"protocol,omitempty"` - InternalPort *int `json:"internal_port,omitempty"` - Routing *PortRouting `json:"routing,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *CreateContainerPortRequest) UnmarshalJSON(data []byte) error { - type unmarshaler CreateContainerPortRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = CreateContainerPortRequest(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *CreateContainerPortRequest) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - -type CreateContainerRuntimeNetworkRequest struct { - EndpointType EndpointType `json:"endpoint_type,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *CreateContainerRuntimeNetworkRequest) UnmarshalJSON(data []byte) error { - type unmarshaler CreateContainerRuntimeNetworkRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = CreateContainerRuntimeNetworkRequest(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *CreateContainerRuntimeNetworkRequest) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - -type CreateContainerRuntimeRequest struct { - Environment map[string]string `json:"environment,omitempty"` - Network *CreateContainerRuntimeNetworkRequest `json:"network,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *CreateContainerRuntimeRequest) UnmarshalJSON(data []byte) error { - type unmarshaler CreateContainerRuntimeRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = CreateContainerRuntimeRequest(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *CreateContainerRuntimeRequest) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - type UpgradeContainerRequestQuery struct { Project *string `json:"-"` Environment *string `json:"-"` diff --git a/sdks/api/full/openapi/openapi.yml b/sdks/api/full/openapi/openapi.yml index 63d95642ab..1c89d7a7cb 100644 --- a/sdks/api/full/openapi/openapi.yml +++ b/sdks/api/full/openapi/openapi.yml @@ -10780,52 +10780,26 @@ components: type: string format: uuid build_tags: {} - runtime: - $ref: '#/components/schemas/ActorsCreateActorRuntimeRequest' - network: - $ref: '#/components/schemas/ActorsCreateActorNetworkRequest' - lifecycle: - $ref: '#/components/schemas/ActorsLifecycle' - required: - - tags - ActorsCreateActorRuntimeRequest: - type: object - properties: - environment: - type: object - additionalProperties: - type: string - network: - $ref: '#/components/schemas/ActorsCreateActorRuntimeNetworkRequest' - ActorsCreateActorRuntimeNetworkRequest: - type: object - properties: - endpoint_type: + network_endpoint_type: $ref: '#/components/schemas/ActorsEndpointType' - required: - - endpoint_type - ActorsCreateActorNetworkRequest: - type: object - properties: - mode: - $ref: '#/components/schemas/ActorsNetworkMode' - ports: - type: object - additionalProperties: - $ref: '#/components/schemas/ActorsCreateActorPortRequest' - wait_ready: + wait_for_network_ready: type: boolean - ActorsCreateActorPortRequest: - type: object - properties: - protocol: - $ref: '#/components/schemas/ActorsPortProtocol' - internal_port: + kill_timeout: type: integer - routing: - $ref: '#/components/schemas/ActorsPortRouting' + format: int64 + description: >- + The duration to wait for in milliseconds before force killing the + actor after a DELETE request. This gives the actor time to perform a + shutdown sequence before being killed. This should be set to a safe + default, and can be overridden during a DELETE request if needed. + durable: + type: boolean + description: >- + If true, the actor will try to reschedule itself automatically in + the event of a crash or a datacenter failover. The actor will not + reschedule if it exits successfully. required: - - protocol + - tags ActorsCreateActorResponse: type: object properties: @@ -11078,10 +11052,8 @@ components: $ref: '#/components/schemas/BuildsKind' compression: $ref: '#/components/schemas/BuildsCompression' - allocation: - $ref: '#/components/schemas/BuildsAllocation' - resources: - $ref: '#/components/schemas/BuildsResources' + runtime: + $ref: '#/components/schemas/BuildsRuntime' required: - image_file BuildsPrepareBuildResponse: @@ -11762,55 +11734,37 @@ components: type: string format: uuid build_tags: {} - runtime: - $ref: '#/components/schemas/ContainersCreateContainerRuntimeRequest' - network: - $ref: '#/components/schemas/ContainersCreateContainerNetworkRequest' - resources: - $ref: '#/components/schemas/ContainersResources' - lifecycle: - $ref: '#/components/schemas/ContainersLifecycle' - required: - - tags - - resources - ContainersCreateContainerRuntimeRequest: - type: object - properties: environment: type: object additionalProperties: type: string - network: - $ref: '#/components/schemas/ContainersCreateContainerRuntimeNetworkRequest' - ContainersCreateContainerRuntimeNetworkRequest: - type: object - properties: - endpoint_type: + network_endpoint_type: $ref: '#/components/schemas/ContainersEndpointType' - required: - - endpoint_type - ContainersCreateContainerNetworkRequest: - type: object - properties: - mode: - $ref: '#/components/schemas/ContainersNetworkMode' + wait_for_network_ready: + type: boolean ports: type: object additionalProperties: - $ref: '#/components/schemas/ContainersCreateContainerPortRequest' - wait_ready: - type: boolean - ContainersCreateContainerPortRequest: - type: object - properties: - protocol: - $ref: '#/components/schemas/ContainersPortProtocol' - internal_port: + $ref: '#/components/schemas/BuildsPortRequest' + resources: + $ref: '#/components/schemas/BuildsResources' + kill_timeout: type: integer - routing: - $ref: '#/components/schemas/ContainersPortRouting' + format: int64 + description: >- + The duration to wait for in milliseconds before force killing the + actor after a DELETE request. This gives the actor time to perform a + shutdown sequence before being killed. This should be set to a safe + default, and can be overridden during a DELETE request if needed. + durable: + type: boolean + description: >- + If true, the actor will try to reschedule itself automatically in + the event of a crash or a datacenter failover. The actor will not + reschedule if it exits successfully. required: - - protocol + - tags + - resources ContainersCreateContainerResponse: type: object properties: @@ -12387,80 +12341,45 @@ components: region: type: string tags: {} - runtime: - $ref: '#/components/schemas/ActorsRuntime' - network: - $ref: '#/components/schemas/ActorsNetwork' - lifecycle: - $ref: '#/components/schemas/ActorsLifecycle' - created_at: - $ref: '#/components/schemas/Timestamp' - started_at: - $ref: '#/components/schemas/Timestamp' - destroyed_at: - $ref: '#/components/schemas/Timestamp' - required: - - id - - region - - tags - - runtime - - network - - lifecycle - - created_at - ActorsRuntime: - type: object - properties: build: type: string format: uuid - arguments: - type: array - items: - type: string - environment: + ports: type: object additionalProperties: - type: string - required: - - build - ActorsLifecycle: - type: object - properties: + $ref: '#/components/schemas/ActorsPort' kill_timeout: type: integer format: int64 description: >- - The duration to wait for in milliseconds before killing the actor. - This should be set to a safe default, and can be overridden during a - DELETE request if needed. + The duration to wait for in milliseconds before force killing the + actor after a DELETE request. This gives the actor time to perform a + shutdown sequence before being killed. This should be set to a safe + default, and can be overridden during a DELETE request if needed. durable: type: boolean description: >- If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. - ActorsNetwork: - type: object - properties: - mode: - $ref: '#/components/schemas/ActorsNetworkMode' - ports: - type: object - additionalProperties: - $ref: '#/components/schemas/ActorsPort' + created_at: + $ref: '#/components/schemas/Timestamp' + started_at: + $ref: '#/components/schemas/Timestamp' + destroyed_at: + $ref: '#/components/schemas/Timestamp' required: - - mode + - id + - region + - tags + - build - ports - ActorsNetworkMode: - type: string - enum: - - bridge - - host + - created_at ActorsPort: type: object properties: protocol: - $ref: '#/components/schemas/ActorsPortProtocol' + $ref: '#/components/schemas/BuildsPortProtocol' internal_port: type: integer hostname: @@ -12475,31 +12394,10 @@ components: Fully formed connection URL including protocol, hostname, port, and path, if applicable. routing: - $ref: '#/components/schemas/ActorsPortRouting' + $ref: '#/components/schemas/BuildsPortRouting' required: - protocol - routing - ActorsPortProtocol: - type: string - enum: - - http - - https - - tcp - - tcp_tls - - udp - ActorsPortRouting: - type: object - properties: - guard: - $ref: '#/components/schemas/ActorsGuardRouting' - host: - $ref: '#/components/schemas/ActorsHostRouting' - ActorsGuardRouting: - type: object - properties: {} - ActorsHostRouting: - type: object - properties: {} ActorsEndpointType: type: string enum: @@ -12675,7 +12573,7 @@ components: millicores. memory: type: integer - description: The amount of memory in megabytes + description: The amount of memory in mebibytes required: - cpu - memory @@ -12684,6 +12582,7 @@ components: properties: mode: $ref: '#/components/schemas/ActorsV1NetworkMode' + description: '**Deprecated**' ports: type: object additionalProperties: @@ -12923,15 +12822,13 @@ components: type: integer format: int64 description: Unsigned 64 bit integer. - allocation: - $ref: '#/components/schemas/BuildsAllocation' - resources: - $ref: '#/components/schemas/BuildsResources' tags: type: object additionalProperties: type: string description: Tags of this build + runtime: + $ref: '#/components/schemas/BuildsRuntime' required: - id - name @@ -12949,23 +12846,78 @@ components: enum: - none - lz4 - BuildsAllocation: + BuildsRuntime: type: object properties: - single: - $ref: '#/components/schemas/BuildsAllocationSingle' - multi: - $ref: '#/components/schemas/BuildsAllocationMulti' - BuildsAllocationSingle: + container: + $ref: '#/components/schemas/BuildsRuntimeContainer' + actor: + $ref: '#/components/schemas/BuildsRuntimeActor' + BuildsRuntimeContainer: type: object - properties: {} - BuildsAllocationMulti: + properties: + environment: + type: object + additionalProperties: + type: string + network_mode: + $ref: '#/components/schemas/BuildsNetworkMode' + ports: + type: object + additionalProperties: + $ref: '#/components/schemas/BuildsPortRequest' + BuildsRuntimeActor: type: object properties: + environment: + type: object + additionalProperties: + type: string + network_mode: + $ref: '#/components/schemas/BuildsNetworkMode' + ports: + type: object + additionalProperties: + $ref: '#/components/schemas/BuildsPortRequest' + resources: + $ref: '#/components/schemas/BuildsResources' slots: type: integer required: + - resources - slots + BuildsPortProtocol: + type: string + enum: + - http + - https + - tcp + - tcp_tls + - udp + BuildsPortRouting: + type: object + properties: + guard: + $ref: '#/components/schemas/BuildsGuardRouting' + host: + $ref: '#/components/schemas/BuildsHostRouting' + BuildsGuardRouting: + type: object + properties: {} + BuildsHostRouting: + type: object + properties: {} + BuildsPortRequest: + type: object + properties: + protocol: + $ref: '#/components/schemas/BuildsPortProtocol' + internal_port: + type: integer + routing: + $ref: '#/components/schemas/BuildsPortRouting' + required: + - protocol BuildsResources: type: object properties: @@ -12980,10 +12932,15 @@ components: millicores. memory: type: integer - description: The amount of memory in megabytes + description: The amount of memory in mebibytes required: - cpu - memory + BuildsNetworkMode: + type: string + enum: + - bridge + - host CaptchaConfig: type: object description: Methods to verify a captcha @@ -14850,32 +14807,6 @@ components: region: type: string tags: {} - runtime: - $ref: '#/components/schemas/ContainersRuntime' - network: - $ref: '#/components/schemas/ContainersNetwork' - resources: - $ref: '#/components/schemas/ContainersResources' - lifecycle: - $ref: '#/components/schemas/ContainersLifecycle' - created_at: - $ref: '#/components/schemas/Timestamp' - started_at: - $ref: '#/components/schemas/Timestamp' - destroyed_at: - $ref: '#/components/schemas/Timestamp' - required: - - id - - region - - tags - - runtime - - network - - resources - - lifecycle - - created_at - ContainersRuntime: - type: object - properties: build: type: string format: uuid @@ -14887,64 +14818,45 @@ components: type: object additionalProperties: type: string - required: - - build - ContainersLifecycle: - type: object - properties: + ports: + type: object + additionalProperties: + $ref: '#/components/schemas/ContainersPort' + resources: + $ref: '#/components/schemas/BuildsResources' kill_timeout: type: integer format: int64 description: >- - The duration to wait for in milliseconds before killing the - container. This should be set to a safe default, and can be - overridden during a DELETE request if needed. + The duration to wait for in milliseconds before force killing the + actor after a DELETE request. This gives the actor time to perform a + shutdown sequence before being killed. This should be set to a safe + default, and can be overridden during a DELETE request if needed. durable: type: boolean description: >- - If true, the container will try to reschedule itself automatically - in the event of a crash or a datacenter failover. The container will - not reschedule if it exits successfully. - ContainersResources: - type: object - properties: - cpu: - type: integer - description: >- - The number of CPU cores in millicores, or 1/1000 of a core. For - example, - - 1/8 of a core would be 125 millicores, and 1 core would be 1000 - - millicores. - memory: - type: integer - description: The amount of memory in megabytes - required: - - cpu - - memory - ContainersNetwork: - type: object - properties: - mode: - $ref: '#/components/schemas/ContainersNetworkMode' - ports: - type: object - additionalProperties: - $ref: '#/components/schemas/ContainersPort' + If true, the actor will try to reschedule itself automatically in + the event of a crash or a datacenter failover. The actor will not + reschedule if it exits successfully. + created_at: + $ref: '#/components/schemas/Timestamp' + started_at: + $ref: '#/components/schemas/Timestamp' + destroyed_at: + $ref: '#/components/schemas/Timestamp' required: - - mode + - id + - region + - tags + - build - ports - ContainersNetworkMode: - type: string - enum: - - bridge - - host + - resources + - created_at ContainersPort: type: object properties: protocol: - $ref: '#/components/schemas/ContainersPortProtocol' + $ref: '#/components/schemas/BuildsPortProtocol' internal_port: type: integer hostname: @@ -14959,31 +14871,10 @@ components: Fully formed connection URL including protocol, hostname, port, and path, if applicable. routing: - $ref: '#/components/schemas/ContainersPortRouting' + $ref: '#/components/schemas/BuildsPortRouting' required: - protocol - routing - ContainersPortProtocol: - type: string - enum: - - http - - https - - tcp - - tcp_tls - - udp - ContainersPortRouting: - type: object - properties: - guard: - $ref: '#/components/schemas/ContainersGuardRouting' - host: - $ref: '#/components/schemas/ContainersHostRouting' - ContainersGuardRouting: - type: object - properties: {} - ContainersHostRouting: - type: object - properties: {} ContainersEndpointType: type: string enum: diff --git a/sdks/api/full/openapi_compat/openapi.yml b/sdks/api/full/openapi_compat/openapi.yml index b482319870..6eb0214595 100644 --- a/sdks/api/full/openapi_compat/openapi.yml +++ b/sdks/api/full/openapi_compat/openapi.yml @@ -10780,52 +10780,26 @@ components: type: string format: uuid build_tags: {} - runtime: - $ref: '#/components/schemas/ActorsCreateActorRuntimeRequest' - network: - $ref: '#/components/schemas/ActorsCreateActorNetworkRequest' - lifecycle: - $ref: '#/components/schemas/ActorsLifecycle' - required: - - tags - ActorsCreateActorRuntimeRequest: - type: object - properties: - environment: - type: object - additionalProperties: - type: string - network: - $ref: '#/components/schemas/ActorsCreateActorRuntimeNetworkRequest' - ActorsCreateActorRuntimeNetworkRequest: - type: object - properties: - endpoint_type: + network_endpoint_type: $ref: '#/components/schemas/ActorsEndpointType' - required: - - endpoint_type - ActorsCreateActorNetworkRequest: - type: object - properties: - mode: - $ref: '#/components/schemas/ActorsNetworkMode' - ports: - type: object - additionalProperties: - $ref: '#/components/schemas/ActorsCreateActorPortRequest' - wait_ready: + wait_for_network_ready: type: boolean - ActorsCreateActorPortRequest: - type: object - properties: - protocol: - $ref: '#/components/schemas/ActorsPortProtocol' - internal_port: + kill_timeout: type: integer - routing: - $ref: '#/components/schemas/ActorsPortRouting' + format: int64 + description: >- + The duration to wait for in milliseconds before force killing the + actor after a DELETE request. This gives the actor time to perform a + shutdown sequence before being killed. This should be set to a safe + default, and can be overridden during a DELETE request if needed. + durable: + type: boolean + description: >- + If true, the actor will try to reschedule itself automatically in + the event of a crash or a datacenter failover. The actor will not + reschedule if it exits successfully. required: - - protocol + - tags ActorsCreateActorResponse: type: object properties: @@ -11078,10 +11052,8 @@ components: $ref: '#/components/schemas/BuildsKind' compression: $ref: '#/components/schemas/BuildsCompression' - allocation: - $ref: '#/components/schemas/BuildsAllocation' - resources: - $ref: '#/components/schemas/BuildsResources' + runtime: + $ref: '#/components/schemas/BuildsRuntime' required: - image_file BuildsPrepareBuildResponse: @@ -11762,55 +11734,37 @@ components: type: string format: uuid build_tags: {} - runtime: - $ref: '#/components/schemas/ContainersCreateContainerRuntimeRequest' - network: - $ref: '#/components/schemas/ContainersCreateContainerNetworkRequest' - resources: - $ref: '#/components/schemas/ContainersResources' - lifecycle: - $ref: '#/components/schemas/ContainersLifecycle' - required: - - tags - - resources - ContainersCreateContainerRuntimeRequest: - type: object - properties: environment: type: object additionalProperties: type: string - network: - $ref: '#/components/schemas/ContainersCreateContainerRuntimeNetworkRequest' - ContainersCreateContainerRuntimeNetworkRequest: - type: object - properties: - endpoint_type: + network_endpoint_type: $ref: '#/components/schemas/ContainersEndpointType' - required: - - endpoint_type - ContainersCreateContainerNetworkRequest: - type: object - properties: - mode: - $ref: '#/components/schemas/ContainersNetworkMode' + wait_for_network_ready: + type: boolean ports: type: object additionalProperties: - $ref: '#/components/schemas/ContainersCreateContainerPortRequest' - wait_ready: - type: boolean - ContainersCreateContainerPortRequest: - type: object - properties: - protocol: - $ref: '#/components/schemas/ContainersPortProtocol' - internal_port: + $ref: '#/components/schemas/BuildsPortRequest' + resources: + $ref: '#/components/schemas/BuildsResources' + kill_timeout: type: integer - routing: - $ref: '#/components/schemas/ContainersPortRouting' + format: int64 + description: >- + The duration to wait for in milliseconds before force killing the + actor after a DELETE request. This gives the actor time to perform a + shutdown sequence before being killed. This should be set to a safe + default, and can be overridden during a DELETE request if needed. + durable: + type: boolean + description: >- + If true, the actor will try to reschedule itself automatically in + the event of a crash or a datacenter failover. The actor will not + reschedule if it exits successfully. required: - - protocol + - tags + - resources ContainersCreateContainerResponse: type: object properties: @@ -12387,80 +12341,45 @@ components: region: type: string tags: {} - runtime: - $ref: '#/components/schemas/ActorsRuntime' - network: - $ref: '#/components/schemas/ActorsNetwork' - lifecycle: - $ref: '#/components/schemas/ActorsLifecycle' - created_at: - $ref: '#/components/schemas/Timestamp' - started_at: - $ref: '#/components/schemas/Timestamp' - destroyed_at: - $ref: '#/components/schemas/Timestamp' - required: - - id - - region - - tags - - runtime - - network - - lifecycle - - created_at - ActorsRuntime: - type: object - properties: build: type: string format: uuid - arguments: - type: array - items: - type: string - environment: + ports: type: object additionalProperties: - type: string - required: - - build - ActorsLifecycle: - type: object - properties: + $ref: '#/components/schemas/ActorsPort' kill_timeout: type: integer format: int64 description: >- - The duration to wait for in milliseconds before killing the actor. - This should be set to a safe default, and can be overridden during a - DELETE request if needed. + The duration to wait for in milliseconds before force killing the + actor after a DELETE request. This gives the actor time to perform a + shutdown sequence before being killed. This should be set to a safe + default, and can be overridden during a DELETE request if needed. durable: type: boolean description: >- If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. - ActorsNetwork: - type: object - properties: - mode: - $ref: '#/components/schemas/ActorsNetworkMode' - ports: - type: object - additionalProperties: - $ref: '#/components/schemas/ActorsPort' + created_at: + $ref: '#/components/schemas/Timestamp' + started_at: + $ref: '#/components/schemas/Timestamp' + destroyed_at: + $ref: '#/components/schemas/Timestamp' required: - - mode + - id + - region + - tags + - build - ports - ActorsNetworkMode: - type: string - enum: - - bridge - - host + - created_at ActorsPort: type: object properties: protocol: - $ref: '#/components/schemas/ActorsPortProtocol' + $ref: '#/components/schemas/BuildsPortProtocol' internal_port: type: integer hostname: @@ -12475,31 +12394,10 @@ components: Fully formed connection URL including protocol, hostname, port, and path, if applicable. routing: - $ref: '#/components/schemas/ActorsPortRouting' + $ref: '#/components/schemas/BuildsPortRouting' required: - protocol - routing - ActorsPortProtocol: - type: string - enum: - - http - - https - - tcp - - tcp_tls - - udp - ActorsPortRouting: - type: object - properties: - guard: - $ref: '#/components/schemas/ActorsGuardRouting' - host: - $ref: '#/components/schemas/ActorsHostRouting' - ActorsGuardRouting: - type: object - properties: {} - ActorsHostRouting: - type: object - properties: {} ActorsEndpointType: type: string enum: @@ -12675,7 +12573,7 @@ components: millicores. memory: type: integer - description: The amount of memory in megabytes + description: The amount of memory in mebibytes required: - cpu - memory @@ -12684,6 +12582,7 @@ components: properties: mode: $ref: '#/components/schemas/ActorsV1NetworkMode' + description: '**Deprecated**' ports: type: object additionalProperties: @@ -12923,15 +12822,13 @@ components: type: integer format: int64 description: Unsigned 64 bit integer. - allocation: - $ref: '#/components/schemas/BuildsAllocation' - resources: - $ref: '#/components/schemas/BuildsResources' tags: type: object additionalProperties: type: string description: Tags of this build + runtime: + $ref: '#/components/schemas/BuildsRuntime' required: - id - name @@ -12949,23 +12846,78 @@ components: enum: - none - lz4 - BuildsAllocation: + BuildsRuntime: type: object properties: - single: - $ref: '#/components/schemas/BuildsAllocationSingle' - multi: - $ref: '#/components/schemas/BuildsAllocationMulti' - BuildsAllocationSingle: + container: + $ref: '#/components/schemas/BuildsRuntimeContainer' + actor: + $ref: '#/components/schemas/BuildsRuntimeActor' + BuildsRuntimeContainer: type: object - properties: {} - BuildsAllocationMulti: + properties: + environment: + type: object + additionalProperties: + type: string + network_mode: + $ref: '#/components/schemas/BuildsNetworkMode' + ports: + type: object + additionalProperties: + $ref: '#/components/schemas/BuildsPortRequest' + BuildsRuntimeActor: type: object properties: + environment: + type: object + additionalProperties: + type: string + network_mode: + $ref: '#/components/schemas/BuildsNetworkMode' + ports: + type: object + additionalProperties: + $ref: '#/components/schemas/BuildsPortRequest' + resources: + $ref: '#/components/schemas/BuildsResources' slots: type: integer required: + - resources - slots + BuildsPortProtocol: + type: string + enum: + - http + - https + - tcp + - tcp_tls + - udp + BuildsPortRouting: + type: object + properties: + guard: + $ref: '#/components/schemas/BuildsGuardRouting' + host: + $ref: '#/components/schemas/BuildsHostRouting' + BuildsGuardRouting: + type: object + properties: {} + BuildsHostRouting: + type: object + properties: {} + BuildsPortRequest: + type: object + properties: + protocol: + $ref: '#/components/schemas/BuildsPortProtocol' + internal_port: + type: integer + routing: + $ref: '#/components/schemas/BuildsPortRouting' + required: + - protocol BuildsResources: type: object properties: @@ -12980,10 +12932,15 @@ components: millicores. memory: type: integer - description: The amount of memory in megabytes + description: The amount of memory in mebibytes required: - cpu - memory + BuildsNetworkMode: + type: string + enum: + - bridge + - host CaptchaConfig: type: object description: Methods to verify a captcha @@ -14850,32 +14807,6 @@ components: region: type: string tags: {} - runtime: - $ref: '#/components/schemas/ContainersRuntime' - network: - $ref: '#/components/schemas/ContainersNetwork' - resources: - $ref: '#/components/schemas/ContainersResources' - lifecycle: - $ref: '#/components/schemas/ContainersLifecycle' - created_at: - $ref: '#/components/schemas/Timestamp' - started_at: - $ref: '#/components/schemas/Timestamp' - destroyed_at: - $ref: '#/components/schemas/Timestamp' - required: - - id - - region - - tags - - runtime - - network - - resources - - lifecycle - - created_at - ContainersRuntime: - type: object - properties: build: type: string format: uuid @@ -14887,64 +14818,45 @@ components: type: object additionalProperties: type: string - required: - - build - ContainersLifecycle: - type: object - properties: + ports: + type: object + additionalProperties: + $ref: '#/components/schemas/ContainersPort' + resources: + $ref: '#/components/schemas/BuildsResources' kill_timeout: type: integer format: int64 description: >- - The duration to wait for in milliseconds before killing the - container. This should be set to a safe default, and can be - overridden during a DELETE request if needed. + The duration to wait for in milliseconds before force killing the + actor after a DELETE request. This gives the actor time to perform a + shutdown sequence before being killed. This should be set to a safe + default, and can be overridden during a DELETE request if needed. durable: type: boolean description: >- - If true, the container will try to reschedule itself automatically - in the event of a crash or a datacenter failover. The container will - not reschedule if it exits successfully. - ContainersResources: - type: object - properties: - cpu: - type: integer - description: >- - The number of CPU cores in millicores, or 1/1000 of a core. For - example, - - 1/8 of a core would be 125 millicores, and 1 core would be 1000 - - millicores. - memory: - type: integer - description: The amount of memory in megabytes - required: - - cpu - - memory - ContainersNetwork: - type: object - properties: - mode: - $ref: '#/components/schemas/ContainersNetworkMode' - ports: - type: object - additionalProperties: - $ref: '#/components/schemas/ContainersPort' + If true, the actor will try to reschedule itself automatically in + the event of a crash or a datacenter failover. The actor will not + reschedule if it exits successfully. + created_at: + $ref: '#/components/schemas/Timestamp' + started_at: + $ref: '#/components/schemas/Timestamp' + destroyed_at: + $ref: '#/components/schemas/Timestamp' required: - - mode + - id + - region + - tags + - build - ports - ContainersNetworkMode: - type: string - enum: - - bridge - - host + - resources + - created_at ContainersPort: type: object properties: protocol: - $ref: '#/components/schemas/ContainersPortProtocol' + $ref: '#/components/schemas/BuildsPortProtocol' internal_port: type: integer hostname: @@ -14959,31 +14871,10 @@ components: Fully formed connection URL including protocol, hostname, port, and path, if applicable. routing: - $ref: '#/components/schemas/ContainersPortRouting' + $ref: '#/components/schemas/BuildsPortRouting' required: - protocol - routing - ContainersPortProtocol: - type: string - enum: - - http - - https - - tcp - - tcp_tls - - udp - ContainersPortRouting: - type: object - properties: - guard: - $ref: '#/components/schemas/ContainersGuardRouting' - host: - $ref: '#/components/schemas/ContainersHostRouting' - ContainersGuardRouting: - type: object - properties: {} - ContainersHostRouting: - type: object - properties: {} ContainersEndpointType: type: string enum: diff --git a/sdks/api/full/rust/.openapi-generator/FILES b/sdks/api/full/rust/.openapi-generator/FILES index 97ad299d8b..127dcc4a1c 100644 --- a/sdks/api/full/rust/.openapi-generator/FILES +++ b/sdks/api/full/rust/.openapi-generator/FILES @@ -5,26 +5,24 @@ Cargo.toml README.md docs/ActorsActor.md docs/ActorsApi.md -docs/ActorsCreateActorNetworkRequest.md -docs/ActorsCreateActorPortRequest.md docs/ActorsCreateActorRequest.md docs/ActorsCreateActorResponse.md -docs/ActorsCreateActorRuntimeNetworkRequest.md -docs/ActorsCreateActorRuntimeRequest.md docs/ActorsEndpointType.md docs/ActorsExportActorLogsResponse.md docs/ActorsGetActorLogsResponse.md docs/ActorsGetActorMetricsResponse.md docs/ActorsGetActorResponse.md +<<<<<<< HEAD docs/ActorsGetActorUsageResponse.md docs/ActorsLifecycle.md +======= +>>>>>>> a7d912278 (fix: even more actor api changes) docs/ActorsListActorsResponse.md docs/ActorsLogsApi.md docs/ActorsLogsExportRequest.md docs/ActorsMetricsApi.md -docs/ActorsNetwork.md -docs/ActorsNetworkMode.md docs/ActorsPort.md +<<<<<<< HEAD docs/ActorsPortProtocol.md docs/ActorsPortRouting.md <<<<<<< HEAD @@ -34,6 +32,9 @@ docs/ActorsResources.md docs/ActorsQueryLogStream.md >>>>>>> 43e5048bc (fix: api changes) docs/ActorsRuntime.md +======= +docs/ActorsQueryLogStream.md +>>>>>>> a7d912278 (fix: even more actor api changes) docs/ActorsUpgradeActorRequest.md docs/ActorsUpgradeAllActorsRequest.md docs/ActorsUpgradeAllActorsResponse.md @@ -73,18 +74,23 @@ docs/AuthIdentityStartEmailVerificationResponse.md docs/AuthRefreshIdentityTokenRequest.md docs/AuthRefreshIdentityTokenResponse.md docs/AuthTokensApi.md -docs/BuildsAllocation.md -docs/BuildsAllocationMulti.md docs/BuildsApi.md docs/BuildsBuild.md docs/BuildsCompression.md docs/BuildsGetBuildResponse.md docs/BuildsKind.md docs/BuildsListBuildsResponse.md +docs/BuildsNetworkMode.md docs/BuildsPatchBuildTagsRequest.md +docs/BuildsPortProtocol.md +docs/BuildsPortRequest.md +docs/BuildsPortRouting.md docs/BuildsPrepareBuildRequest.md docs/BuildsPrepareBuildResponse.md docs/BuildsResources.md +docs/BuildsRuntime.md +docs/BuildsRuntimeActor.md +docs/BuildsRuntimeContainer.md docs/CaptchaConfig.md docs/CaptchaConfigHcaptcha.md docs/CaptchaConfigTurnstile.md @@ -256,28 +262,17 @@ docs/CloudVersionMatchmakerProxyKind.md docs/CloudVersionSummary.md docs/ContainersApi.md docs/ContainersContainer.md -docs/ContainersCreateContainerNetworkRequest.md -docs/ContainersCreateContainerPortRequest.md docs/ContainersCreateContainerRequest.md docs/ContainersCreateContainerResponse.md -docs/ContainersCreateContainerRuntimeNetworkRequest.md -docs/ContainersCreateContainerRuntimeRequest.md docs/ContainersEndpointType.md docs/ContainersGetContainerLogsResponse.md docs/ContainersGetContainerMetricsResponse.md docs/ContainersGetContainerResponse.md -docs/ContainersLifecycle.md docs/ContainersListContainersResponse.md docs/ContainersLogsApi.md docs/ContainersMetricsApi.md -docs/ContainersNetwork.md -docs/ContainersNetworkMode.md docs/ContainersPort.md -docs/ContainersPortProtocol.md -docs/ContainersPortRouting.md docs/ContainersQueryLogStream.md -docs/ContainersResources.md -docs/ContainersRuntime.md docs/ContainersUpgradeAllContainersRequest.md docs/ContainersUpgradeAllContainersResponse.md docs/ContainersUpgradeContainerRequest.md @@ -511,17 +506,14 @@ src/apis/servers_datacenters_api.rs src/apis/servers_logs_api.rs src/lib.rs src/models/actors_actor.rs -src/models/actors_create_actor_network_request.rs -src/models/actors_create_actor_port_request.rs src/models/actors_create_actor_request.rs src/models/actors_create_actor_response.rs -src/models/actors_create_actor_runtime_network_request.rs -src/models/actors_create_actor_runtime_request.rs src/models/actors_endpoint_type.rs src/models/actors_export_actor_logs_response.rs src/models/actors_get_actor_logs_response.rs src/models/actors_get_actor_metrics_response.rs src/models/actors_get_actor_response.rs +<<<<<<< HEAD src/models/actors_get_actor_usage_response.rs src/models/actors_lifecycle.rs src/models/actors_list_actors_response.rs @@ -538,6 +530,11 @@ src/models/actors_resources.rs src/models/actors_query_log_stream.rs >>>>>>> 43e5048bc (fix: api changes) src/models/actors_runtime.rs +======= +src/models/actors_list_actors_response.rs +src/models/actors_port.rs +src/models/actors_query_log_stream.rs +>>>>>>> a7d912278 (fix: even more actor api changes) src/models/actors_upgrade_actor_request.rs src/models/actors_upgrade_all_actors_request.rs src/models/actors_upgrade_all_actors_response.rs @@ -572,17 +569,22 @@ src/models/auth_identity_start_email_verification_request.rs src/models/auth_identity_start_email_verification_response.rs src/models/auth_refresh_identity_token_request.rs src/models/auth_refresh_identity_token_response.rs -src/models/builds_allocation.rs -src/models/builds_allocation_multi.rs src/models/builds_build.rs src/models/builds_compression.rs src/models/builds_get_build_response.rs src/models/builds_kind.rs src/models/builds_list_builds_response.rs +src/models/builds_network_mode.rs src/models/builds_patch_build_tags_request.rs +src/models/builds_port_protocol.rs +src/models/builds_port_request.rs +src/models/builds_port_routing.rs src/models/builds_prepare_build_request.rs src/models/builds_prepare_build_response.rs src/models/builds_resources.rs +src/models/builds_runtime.rs +src/models/builds_runtime_actor.rs +src/models/builds_runtime_container.rs src/models/captcha_config.rs src/models/captcha_config_hcaptcha.rs src/models/captcha_config_turnstile.rs @@ -736,26 +738,15 @@ src/models/cloud_version_matchmaker_port_range.rs src/models/cloud_version_matchmaker_proxy_kind.rs src/models/cloud_version_summary.rs src/models/containers_container.rs -src/models/containers_create_container_network_request.rs -src/models/containers_create_container_port_request.rs src/models/containers_create_container_request.rs src/models/containers_create_container_response.rs -src/models/containers_create_container_runtime_network_request.rs -src/models/containers_create_container_runtime_request.rs src/models/containers_endpoint_type.rs src/models/containers_get_container_logs_response.rs src/models/containers_get_container_metrics_response.rs src/models/containers_get_container_response.rs -src/models/containers_lifecycle.rs src/models/containers_list_containers_response.rs -src/models/containers_network.rs -src/models/containers_network_mode.rs src/models/containers_port.rs -src/models/containers_port_protocol.rs -src/models/containers_port_routing.rs src/models/containers_query_log_stream.rs -src/models/containers_resources.rs -src/models/containers_runtime.rs src/models/containers_upgrade_all_containers_request.rs src/models/containers_upgrade_all_containers_response.rs src/models/containers_upgrade_container_request.rs diff --git a/sdks/api/full/rust/README.md b/sdks/api/full/rust/README.md index 67098bbc24..7ed52e676e 100644 --- a/sdks/api/full/rust/README.md +++ b/sdks/api/full/rust/README.md @@ -205,17 +205,14 @@ Class | Method | HTTP request | Description ## Documentation For Models - [ActorsActor](docs/ActorsActor.md) - - [ActorsCreateActorNetworkRequest](docs/ActorsCreateActorNetworkRequest.md) - - [ActorsCreateActorPortRequest](docs/ActorsCreateActorPortRequest.md) - [ActorsCreateActorRequest](docs/ActorsCreateActorRequest.md) - [ActorsCreateActorResponse](docs/ActorsCreateActorResponse.md) - - [ActorsCreateActorRuntimeNetworkRequest](docs/ActorsCreateActorRuntimeNetworkRequest.md) - - [ActorsCreateActorRuntimeRequest](docs/ActorsCreateActorRuntimeRequest.md) - [ActorsEndpointType](docs/ActorsEndpointType.md) - [ActorsExportActorLogsResponse](docs/ActorsExportActorLogsResponse.md) - [ActorsGetActorLogsResponse](docs/ActorsGetActorLogsResponse.md) - [ActorsGetActorMetricsResponse](docs/ActorsGetActorMetricsResponse.md) - [ActorsGetActorResponse](docs/ActorsGetActorResponse.md) +<<<<<<< HEAD - [ActorsGetActorUsageResponse](docs/ActorsGetActorUsageResponse.md) - [ActorsLifecycle](docs/ActorsLifecycle.md) - [ActorsListActorsResponse](docs/ActorsListActorsResponse.md) @@ -232,6 +229,11 @@ Class | Method | HTTP request | Description - [ActorsQueryLogStream](docs/ActorsQueryLogStream.md) >>>>>>> 43e5048bc (fix: api changes) - [ActorsRuntime](docs/ActorsRuntime.md) +======= + - [ActorsListActorsResponse](docs/ActorsListActorsResponse.md) + - [ActorsPort](docs/ActorsPort.md) + - [ActorsQueryLogStream](docs/ActorsQueryLogStream.md) +>>>>>>> a7d912278 (fix: even more actor api changes) - [ActorsUpgradeActorRequest](docs/ActorsUpgradeActorRequest.md) - [ActorsUpgradeAllActorsRequest](docs/ActorsUpgradeAllActorsRequest.md) - [ActorsUpgradeAllActorsResponse](docs/ActorsUpgradeAllActorsResponse.md) @@ -266,17 +268,22 @@ Class | Method | HTTP request | Description - [AuthIdentityStartEmailVerificationResponse](docs/AuthIdentityStartEmailVerificationResponse.md) - [AuthRefreshIdentityTokenRequest](docs/AuthRefreshIdentityTokenRequest.md) - [AuthRefreshIdentityTokenResponse](docs/AuthRefreshIdentityTokenResponse.md) - - [BuildsAllocation](docs/BuildsAllocation.md) - - [BuildsAllocationMulti](docs/BuildsAllocationMulti.md) - [BuildsBuild](docs/BuildsBuild.md) - [BuildsCompression](docs/BuildsCompression.md) - [BuildsGetBuildResponse](docs/BuildsGetBuildResponse.md) - [BuildsKind](docs/BuildsKind.md) - [BuildsListBuildsResponse](docs/BuildsListBuildsResponse.md) + - [BuildsNetworkMode](docs/BuildsNetworkMode.md) - [BuildsPatchBuildTagsRequest](docs/BuildsPatchBuildTagsRequest.md) + - [BuildsPortProtocol](docs/BuildsPortProtocol.md) + - [BuildsPortRequest](docs/BuildsPortRequest.md) + - [BuildsPortRouting](docs/BuildsPortRouting.md) - [BuildsPrepareBuildRequest](docs/BuildsPrepareBuildRequest.md) - [BuildsPrepareBuildResponse](docs/BuildsPrepareBuildResponse.md) - [BuildsResources](docs/BuildsResources.md) + - [BuildsRuntime](docs/BuildsRuntime.md) + - [BuildsRuntimeActor](docs/BuildsRuntimeActor.md) + - [BuildsRuntimeContainer](docs/BuildsRuntimeContainer.md) - [CaptchaConfig](docs/CaptchaConfig.md) - [CaptchaConfigHcaptcha](docs/CaptchaConfigHcaptcha.md) - [CaptchaConfigTurnstile](docs/CaptchaConfigTurnstile.md) @@ -430,26 +437,15 @@ Class | Method | HTTP request | Description - [CloudVersionMatchmakerProxyKind](docs/CloudVersionMatchmakerProxyKind.md) - [CloudVersionSummary](docs/CloudVersionSummary.md) - [ContainersContainer](docs/ContainersContainer.md) - - [ContainersCreateContainerNetworkRequest](docs/ContainersCreateContainerNetworkRequest.md) - - [ContainersCreateContainerPortRequest](docs/ContainersCreateContainerPortRequest.md) - [ContainersCreateContainerRequest](docs/ContainersCreateContainerRequest.md) - [ContainersCreateContainerResponse](docs/ContainersCreateContainerResponse.md) - - [ContainersCreateContainerRuntimeNetworkRequest](docs/ContainersCreateContainerRuntimeNetworkRequest.md) - - [ContainersCreateContainerRuntimeRequest](docs/ContainersCreateContainerRuntimeRequest.md) - [ContainersEndpointType](docs/ContainersEndpointType.md) - [ContainersGetContainerLogsResponse](docs/ContainersGetContainerLogsResponse.md) - [ContainersGetContainerMetricsResponse](docs/ContainersGetContainerMetricsResponse.md) - [ContainersGetContainerResponse](docs/ContainersGetContainerResponse.md) - - [ContainersLifecycle](docs/ContainersLifecycle.md) - [ContainersListContainersResponse](docs/ContainersListContainersResponse.md) - - [ContainersNetwork](docs/ContainersNetwork.md) - - [ContainersNetworkMode](docs/ContainersNetworkMode.md) - [ContainersPort](docs/ContainersPort.md) - - [ContainersPortProtocol](docs/ContainersPortProtocol.md) - - [ContainersPortRouting](docs/ContainersPortRouting.md) - [ContainersQueryLogStream](docs/ContainersQueryLogStream.md) - - [ContainersResources](docs/ContainersResources.md) - - [ContainersRuntime](docs/ContainersRuntime.md) - [ContainersUpgradeAllContainersRequest](docs/ContainersUpgradeAllContainersRequest.md) - [ContainersUpgradeAllContainersResponse](docs/ContainersUpgradeAllContainersResponse.md) - [ContainersUpgradeContainerRequest](docs/ContainersUpgradeContainerRequest.md) diff --git a/sdks/api/full/rust/docs/ActorsActor.md b/sdks/api/full/rust/docs/ActorsActor.md index 51f1a591c7..326151ca92 100644 --- a/sdks/api/full/rust/docs/ActorsActor.md +++ b/sdks/api/full/rust/docs/ActorsActor.md @@ -7,9 +7,10 @@ Name | Type | Description | Notes **id** | **String** | Can be a UUID or base36 encoded binary data. | **region** | **String** | | **tags** | Option<[**serde_json::Value**](.md)> | | -**runtime** | [**crate::models::ActorsRuntime**](ActorsRuntime.md) | | -**network** | [**crate::models::ActorsNetwork**](ActorsNetwork.md) | | -**lifecycle** | [**crate::models::ActorsLifecycle**](ActorsLifecycle.md) | | +**build** | [**uuid::Uuid**](uuid::Uuid.md) | | +**ports** | [**::std::collections::HashMap**](ActorsPort.md) | | +**kill_timeout** | Option<**i64**> | The duration to wait for in milliseconds before force killing the actor after a DELETE request. This gives the actor time to perform a shutdown sequence before being killed. This should be set to a safe default, and can be overridden during a DELETE request if needed. | [optional] +**durable** | Option<**bool**> | If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. | [optional] **created_at** | **String** | RFC3339 timestamp | **started_at** | Option<**String**> | RFC3339 timestamp | [optional] **destroyed_at** | Option<**String**> | RFC3339 timestamp | [optional] diff --git a/sdks/api/full/rust/docs/ActorsCreateActorNetworkRequest.md b/sdks/api/full/rust/docs/ActorsCreateActorNetworkRequest.md deleted file mode 100644 index b55ab1fdd1..0000000000 --- a/sdks/api/full/rust/docs/ActorsCreateActorNetworkRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# ActorsCreateActorNetworkRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mode** | Option<[**crate::models::ActorsNetworkMode**](ActorsNetworkMode.md)> | | [optional] -**ports** | Option<[**::std::collections::HashMap**](ActorsCreateActorPortRequest.md)> | | [optional] -**wait_ready** | Option<**bool**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/api/full/rust/docs/ActorsCreateActorRequest.md b/sdks/api/full/rust/docs/ActorsCreateActorRequest.md index 5f5686b46b..e76e0936d4 100644 --- a/sdks/api/full/rust/docs/ActorsCreateActorRequest.md +++ b/sdks/api/full/rust/docs/ActorsCreateActorRequest.md @@ -8,9 +8,10 @@ Name | Type | Description | Notes **tags** | Option<[**serde_json::Value**](.md)> | | **build** | Option<[**uuid::Uuid**](uuid::Uuid.md)> | | [optional] **build_tags** | Option<[**serde_json::Value**](.md)> | | [optional] -**runtime** | Option<[**crate::models::ActorsCreateActorRuntimeRequest**](ActorsCreateActorRuntimeRequest.md)> | | [optional] -**network** | Option<[**crate::models::ActorsCreateActorNetworkRequest**](ActorsCreateActorNetworkRequest.md)> | | [optional] -**lifecycle** | Option<[**crate::models::ActorsLifecycle**](ActorsLifecycle.md)> | | [optional] +**network_endpoint_type** | Option<[**crate::models::ActorsEndpointType**](ActorsEndpointType.md)> | | [optional] +**wait_for_network_ready** | Option<**bool**> | | [optional] +**kill_timeout** | Option<**i64**> | The duration to wait for in milliseconds before force killing the actor after a DELETE request. This gives the actor time to perform a shutdown sequence before being killed. This should be set to a safe default, and can be overridden during a DELETE request if needed. | [optional] +**durable** | Option<**bool**> | If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/api/full/rust/docs/ActorsLifecycle.md b/sdks/api/full/rust/docs/ActorsLifecycle.md deleted file mode 100644 index d02b4958c4..0000000000 --- a/sdks/api/full/rust/docs/ActorsLifecycle.md +++ /dev/null @@ -1,12 +0,0 @@ -# ActorsLifecycle - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kill_timeout** | Option<**i64**> | The duration to wait for in milliseconds before killing the actor. This should be set to a safe default, and can be overridden during a DELETE request if needed. | [optional] -**durable** | Option<**bool**> | If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/api/full/rust/docs/ActorsPort.md b/sdks/api/full/rust/docs/ActorsPort.md index 48620bad95..4e1a0943cc 100644 --- a/sdks/api/full/rust/docs/ActorsPort.md +++ b/sdks/api/full/rust/docs/ActorsPort.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**protocol** | [**crate::models::ActorsPortProtocol**](ActorsPortProtocol.md) | | +**protocol** | [**crate::models::BuildsPortProtocol**](BuildsPortProtocol.md) | | **internal_port** | Option<**i32**> | | [optional] **hostname** | Option<**String**> | | [optional] **port** | Option<**i32**> | | [optional] **path** | Option<**String**> | | [optional] **url** | Option<**String**> | Fully formed connection URL including protocol, hostname, port, and path, if applicable. | [optional] -**routing** | [**crate::models::ActorsPortRouting**](ActorsPortRouting.md) | | +**routing** | [**crate::models::BuildsPortRouting**](BuildsPortRouting.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/api/full/rust/docs/ActorsV1Resources.md b/sdks/api/full/rust/docs/ActorsV1Resources.md index 77af9f6f2a..0623537a9f 100644 --- a/sdks/api/full/rust/docs/ActorsV1Resources.md +++ b/sdks/api/full/rust/docs/ActorsV1Resources.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **cpu** | **i32** | The number of CPU cores in millicores, or 1/1000 of a core. For example, 1/8 of a core would be 125 millicores, and 1 core would be 1000 millicores. | -**memory** | **i32** | The amount of memory in megabytes | +**memory** | **i32** | The amount of memory in mebibytes | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/api/full/rust/docs/BuildsAllocation.md b/sdks/api/full/rust/docs/BuildsAllocation.md deleted file mode 100644 index 0717f386d9..0000000000 --- a/sdks/api/full/rust/docs/BuildsAllocation.md +++ /dev/null @@ -1,12 +0,0 @@ -# BuildsAllocation - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**single** | Option<[**serde_json::Value**](.md)> | | [optional] -**multi** | Option<[**crate::models::BuildsAllocationMulti**](BuildsAllocationMulti.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/api/full/rust/docs/BuildsAllocationMulti.md b/sdks/api/full/rust/docs/BuildsAllocationMulti.md deleted file mode 100644 index 9096b6faa4..0000000000 --- a/sdks/api/full/rust/docs/BuildsAllocationMulti.md +++ /dev/null @@ -1,11 +0,0 @@ -# BuildsAllocationMulti - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**slots** | **i32** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/api/full/rust/docs/BuildsBuild.md b/sdks/api/full/rust/docs/BuildsBuild.md index 401ee67790..182e02ea31 100644 --- a/sdks/api/full/rust/docs/BuildsBuild.md +++ b/sdks/api/full/rust/docs/BuildsBuild.md @@ -8,9 +8,8 @@ Name | Type | Description | Notes **name** | **String** | | **created_at** | **String** | RFC3339 timestamp | **content_length** | **i64** | Unsigned 64 bit integer. | -**allocation** | Option<[**crate::models::BuildsAllocation**](BuildsAllocation.md)> | | [optional] -**resources** | Option<[**crate::models::BuildsResources**](BuildsResources.md)> | | [optional] **tags** | **::std::collections::HashMap** | Tags of this build | +**runtime** | Option<[**crate::models::BuildsRuntime**](BuildsRuntime.md)> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/api/runtime/rust/docs/ActorsNetworkMode.md b/sdks/api/full/rust/docs/BuildsNetworkMode.md similarity index 93% rename from sdks/api/runtime/rust/docs/ActorsNetworkMode.md rename to sdks/api/full/rust/docs/BuildsNetworkMode.md index 51e712c997..3d764610bc 100644 --- a/sdks/api/runtime/rust/docs/ActorsNetworkMode.md +++ b/sdks/api/full/rust/docs/BuildsNetworkMode.md @@ -1,4 +1,4 @@ -# ActorsNetworkMode +# BuildsNetworkMode ## Properties diff --git a/sdks/api/full/rust/docs/ActorsPortProtocol.md b/sdks/api/full/rust/docs/BuildsPortProtocol.md similarity index 92% rename from sdks/api/full/rust/docs/ActorsPortProtocol.md rename to sdks/api/full/rust/docs/BuildsPortProtocol.md index 0fe82e63d3..f60dd14efc 100644 --- a/sdks/api/full/rust/docs/ActorsPortProtocol.md +++ b/sdks/api/full/rust/docs/BuildsPortProtocol.md @@ -1,4 +1,4 @@ -# ActorsPortProtocol +# BuildsPortProtocol ## Properties diff --git a/sdks/api/full/rust/docs/ActorsCreateActorPortRequest.md b/sdks/api/full/rust/docs/BuildsPortRequest.md similarity index 64% rename from sdks/api/full/rust/docs/ActorsCreateActorPortRequest.md rename to sdks/api/full/rust/docs/BuildsPortRequest.md index d63c5a929d..2d64a9e5cd 100644 --- a/sdks/api/full/rust/docs/ActorsCreateActorPortRequest.md +++ b/sdks/api/full/rust/docs/BuildsPortRequest.md @@ -1,12 +1,12 @@ -# ActorsCreateActorPortRequest +# BuildsPortRequest ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**protocol** | [**crate::models::ActorsPortProtocol**](ActorsPortProtocol.md) | | +**protocol** | [**crate::models::BuildsPortProtocol**](BuildsPortProtocol.md) | | **internal_port** | Option<**i32**> | | [optional] -**routing** | Option<[**crate::models::ActorsPortRouting**](ActorsPortRouting.md)> | | [optional] +**routing** | Option<[**crate::models::BuildsPortRouting**](BuildsPortRouting.md)> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/api/full/rust/docs/ActorsPortRouting.md b/sdks/api/full/rust/docs/BuildsPortRouting.md similarity index 95% rename from sdks/api/full/rust/docs/ActorsPortRouting.md rename to sdks/api/full/rust/docs/BuildsPortRouting.md index 032387081b..5687fb3caf 100644 --- a/sdks/api/full/rust/docs/ActorsPortRouting.md +++ b/sdks/api/full/rust/docs/BuildsPortRouting.md @@ -1,4 +1,4 @@ -# ActorsPortRouting +# BuildsPortRouting ## Properties diff --git a/sdks/api/full/rust/docs/BuildsPrepareBuildRequest.md b/sdks/api/full/rust/docs/BuildsPrepareBuildRequest.md index 5dfc2aa88c..00c611fb27 100644 --- a/sdks/api/full/rust/docs/BuildsPrepareBuildRequest.md +++ b/sdks/api/full/rust/docs/BuildsPrepareBuildRequest.md @@ -8,8 +8,7 @@ Name | Type | Description | Notes **image_file** | [**crate::models::UploadPrepareFile**](UploadPrepareFile.md) | | **kind** | Option<[**crate::models::BuildsKind**](BuildsKind.md)> | | [optional] **compression** | Option<[**crate::models::BuildsCompression**](BuildsCompression.md)> | | [optional] -**allocation** | Option<[**crate::models::BuildsAllocation**](BuildsAllocation.md)> | | [optional] -**resources** | Option<[**crate::models::BuildsResources**](BuildsResources.md)> | | [optional] +**runtime** | Option<[**crate::models::BuildsRuntime**](BuildsRuntime.md)> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/api/full/rust/docs/BuildsResources.md b/sdks/api/full/rust/docs/BuildsResources.md index 597030f849..4116ed14e3 100644 --- a/sdks/api/full/rust/docs/BuildsResources.md +++ b/sdks/api/full/rust/docs/BuildsResources.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **cpu** | **i32** | The number of CPU cores in millicores, or 1/1000 of a core. For example, 1/8 of a core would be 125 millicores, and 1 core would be 1000 millicores. | -**memory** | **i32** | The amount of memory in megabytes | +**memory** | **i32** | The amount of memory in mebibytes | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/api/full/rust/docs/ActorsNetwork.md b/sdks/api/full/rust/docs/BuildsRuntime.md similarity index 54% rename from sdks/api/full/rust/docs/ActorsNetwork.md rename to sdks/api/full/rust/docs/BuildsRuntime.md index 776edaedbe..e24bfbe377 100644 --- a/sdks/api/full/rust/docs/ActorsNetwork.md +++ b/sdks/api/full/rust/docs/BuildsRuntime.md @@ -1,11 +1,11 @@ -# ActorsNetwork +# BuildsRuntime ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**mode** | [**crate::models::ActorsNetworkMode**](ActorsNetworkMode.md) | | -**ports** | [**::std::collections::HashMap**](ActorsPort.md) | | +**container** | Option<[**crate::models::BuildsRuntimeContainer**](BuildsRuntimeContainer.md)> | | [optional] +**actor** | Option<[**crate::models::BuildsRuntimeActor**](BuildsRuntimeActor.md)> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/api/full/rust/docs/ContainersCreateContainerRuntimeRequest.md b/sdks/api/full/rust/docs/BuildsRuntimeActor.md similarity index 50% rename from sdks/api/full/rust/docs/ContainersCreateContainerRuntimeRequest.md rename to sdks/api/full/rust/docs/BuildsRuntimeActor.md index 0873cd62be..9d3c6eda35 100644 --- a/sdks/api/full/rust/docs/ContainersCreateContainerRuntimeRequest.md +++ b/sdks/api/full/rust/docs/BuildsRuntimeActor.md @@ -1,11 +1,14 @@ -# ContainersCreateContainerRuntimeRequest +# BuildsRuntimeActor ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **environment** | Option<**::std::collections::HashMap**> | | [optional] -**network** | Option<[**crate::models::ContainersCreateContainerRuntimeNetworkRequest**](ContainersCreateContainerRuntimeNetworkRequest.md)> | | [optional] +**network_mode** | Option<[**crate::models::BuildsNetworkMode**](BuildsNetworkMode.md)> | | [optional] +**ports** | Option<[**::std::collections::HashMap**](BuildsPortRequest.md)> | | [optional] +**resources** | [**crate::models::BuildsResources**](BuildsResources.md) | | +**slots** | **i32** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/api/full/rust/docs/ContainersRuntime.md b/sdks/api/full/rust/docs/BuildsRuntimeContainer.md similarity index 58% rename from sdks/api/full/rust/docs/ContainersRuntime.md rename to sdks/api/full/rust/docs/BuildsRuntimeContainer.md index ea30224b4b..5ba71efad7 100644 --- a/sdks/api/full/rust/docs/ContainersRuntime.md +++ b/sdks/api/full/rust/docs/BuildsRuntimeContainer.md @@ -1,12 +1,12 @@ -# ContainersRuntime +# BuildsRuntimeContainer ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**build** | [**uuid::Uuid**](uuid::Uuid.md) | | -**arguments** | Option<**Vec**> | | [optional] **environment** | Option<**::std::collections::HashMap**> | | [optional] +**network_mode** | Option<[**crate::models::BuildsNetworkMode**](BuildsNetworkMode.md)> | | [optional] +**ports** | Option<[**::std::collections::HashMap**](BuildsPortRequest.md)> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/api/full/rust/docs/ContainersContainer.md b/sdks/api/full/rust/docs/ContainersContainer.md index d6d59a5979..0909512078 100644 --- a/sdks/api/full/rust/docs/ContainersContainer.md +++ b/sdks/api/full/rust/docs/ContainersContainer.md @@ -7,10 +7,13 @@ Name | Type | Description | Notes **id** | **String** | Can be a UUID or base36 encoded binary data. | **region** | **String** | | **tags** | Option<[**serde_json::Value**](.md)> | | -**runtime** | [**crate::models::ContainersRuntime**](ContainersRuntime.md) | | -**network** | [**crate::models::ContainersNetwork**](ContainersNetwork.md) | | -**resources** | [**crate::models::ContainersResources**](ContainersResources.md) | | -**lifecycle** | [**crate::models::ContainersLifecycle**](ContainersLifecycle.md) | | +**build** | [**uuid::Uuid**](uuid::Uuid.md) | | +**arguments** | Option<**Vec**> | | [optional] +**environment** | Option<**::std::collections::HashMap**> | | [optional] +**ports** | [**::std::collections::HashMap**](ContainersPort.md) | | +**resources** | [**crate::models::BuildsResources**](BuildsResources.md) | | +**kill_timeout** | Option<**i64**> | The duration to wait for in milliseconds before force killing the actor after a DELETE request. This gives the actor time to perform a shutdown sequence before being killed. This should be set to a safe default, and can be overridden during a DELETE request if needed. | [optional] +**durable** | Option<**bool**> | If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. | [optional] **created_at** | **String** | RFC3339 timestamp | **started_at** | Option<**String**> | RFC3339 timestamp | [optional] **destroyed_at** | Option<**String**> | RFC3339 timestamp | [optional] diff --git a/sdks/api/full/rust/docs/ContainersCreateContainerNetworkRequest.md b/sdks/api/full/rust/docs/ContainersCreateContainerNetworkRequest.md deleted file mode 100644 index 75819c3d43..0000000000 --- a/sdks/api/full/rust/docs/ContainersCreateContainerNetworkRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# ContainersCreateContainerNetworkRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mode** | Option<[**crate::models::ContainersNetworkMode**](ContainersNetworkMode.md)> | | [optional] -**ports** | Option<[**::std::collections::HashMap**](ContainersCreateContainerPortRequest.md)> | | [optional] -**wait_ready** | Option<**bool**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/api/full/rust/docs/ContainersCreateContainerPortRequest.md b/sdks/api/full/rust/docs/ContainersCreateContainerPortRequest.md deleted file mode 100644 index 1b0e5932e5..0000000000 --- a/sdks/api/full/rust/docs/ContainersCreateContainerPortRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# ContainersCreateContainerPortRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**protocol** | [**crate::models::ContainersPortProtocol**](ContainersPortProtocol.md) | | -**internal_port** | Option<**i32**> | | [optional] -**routing** | Option<[**crate::models::ContainersPortRouting**](ContainersPortRouting.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/api/full/rust/docs/ContainersCreateContainerRequest.md b/sdks/api/full/rust/docs/ContainersCreateContainerRequest.md index 0eb6be73e2..cd29faf228 100644 --- a/sdks/api/full/rust/docs/ContainersCreateContainerRequest.md +++ b/sdks/api/full/rust/docs/ContainersCreateContainerRequest.md @@ -8,10 +8,13 @@ Name | Type | Description | Notes **tags** | Option<[**serde_json::Value**](.md)> | | **build** | Option<[**uuid::Uuid**](uuid::Uuid.md)> | | [optional] **build_tags** | Option<[**serde_json::Value**](.md)> | | [optional] -**runtime** | Option<[**crate::models::ContainersCreateContainerRuntimeRequest**](ContainersCreateContainerRuntimeRequest.md)> | | [optional] -**network** | Option<[**crate::models::ContainersCreateContainerNetworkRequest**](ContainersCreateContainerNetworkRequest.md)> | | [optional] -**resources** | [**crate::models::ContainersResources**](ContainersResources.md) | | -**lifecycle** | Option<[**crate::models::ContainersLifecycle**](ContainersLifecycle.md)> | | [optional] +**environment** | Option<**::std::collections::HashMap**> | | [optional] +**network_endpoint_type** | Option<[**crate::models::ContainersEndpointType**](ContainersEndpointType.md)> | | [optional] +**wait_for_network_ready** | Option<**bool**> | | [optional] +**ports** | Option<[**::std::collections::HashMap**](BuildsPortRequest.md)> | | [optional] +**resources** | [**crate::models::BuildsResources**](BuildsResources.md) | | +**kill_timeout** | Option<**i64**> | The duration to wait for in milliseconds before force killing the actor after a DELETE request. This gives the actor time to perform a shutdown sequence before being killed. This should be set to a safe default, and can be overridden during a DELETE request if needed. | [optional] +**durable** | Option<**bool**> | If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/api/full/rust/docs/ContainersCreateContainerRuntimeNetworkRequest.md b/sdks/api/full/rust/docs/ContainersCreateContainerRuntimeNetworkRequest.md deleted file mode 100644 index d724ce6351..0000000000 --- a/sdks/api/full/rust/docs/ContainersCreateContainerRuntimeNetworkRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# ContainersCreateContainerRuntimeNetworkRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**endpoint_type** | [**crate::models::ContainersEndpointType**](ContainersEndpointType.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/api/full/rust/docs/ContainersLifecycle.md b/sdks/api/full/rust/docs/ContainersLifecycle.md deleted file mode 100644 index 6e5dc7cef0..0000000000 --- a/sdks/api/full/rust/docs/ContainersLifecycle.md +++ /dev/null @@ -1,12 +0,0 @@ -# ContainersLifecycle - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kill_timeout** | Option<**i64**> | The duration to wait for in milliseconds before killing the container. This should be set to a safe default, and can be overridden during a DELETE request if needed. | [optional] -**durable** | Option<**bool**> | If true, the container will try to reschedule itself automatically in the event of a crash or a datacenter failover. The container will not reschedule if it exits successfully. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/api/full/rust/docs/ContainersNetwork.md b/sdks/api/full/rust/docs/ContainersNetwork.md deleted file mode 100644 index 41b81ebb4f..0000000000 --- a/sdks/api/full/rust/docs/ContainersNetwork.md +++ /dev/null @@ -1,12 +0,0 @@ -# ContainersNetwork - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mode** | [**crate::models::ContainersNetworkMode**](ContainersNetworkMode.md) | | -**ports** | [**::std::collections::HashMap**](ContainersPort.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/api/full/rust/docs/ContainersNetworkMode.md b/sdks/api/full/rust/docs/ContainersNetworkMode.md deleted file mode 100644 index bc4a4e115b..0000000000 --- a/sdks/api/full/rust/docs/ContainersNetworkMode.md +++ /dev/null @@ -1,10 +0,0 @@ -# ContainersNetworkMode - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/api/full/rust/docs/ContainersPort.md b/sdks/api/full/rust/docs/ContainersPort.md index 46ace3b43e..23c0afc541 100644 --- a/sdks/api/full/rust/docs/ContainersPort.md +++ b/sdks/api/full/rust/docs/ContainersPort.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**protocol** | [**crate::models::ContainersPortProtocol**](ContainersPortProtocol.md) | | +**protocol** | [**crate::models::BuildsPortProtocol**](BuildsPortProtocol.md) | | **internal_port** | Option<**i32**> | | [optional] **hostname** | Option<**String**> | | [optional] **port** | Option<**i32**> | | [optional] **path** | Option<**String**> | | [optional] **url** | Option<**String**> | Fully formed connection URL including protocol, hostname, port, and path, if applicable. | [optional] -**routing** | [**crate::models::ContainersPortRouting**](ContainersPortRouting.md) | | +**routing** | [**crate::models::BuildsPortRouting**](BuildsPortRouting.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/api/full/rust/docs/ContainersPortProtocol.md b/sdks/api/full/rust/docs/ContainersPortProtocol.md deleted file mode 100644 index a69a314e54..0000000000 --- a/sdks/api/full/rust/docs/ContainersPortProtocol.md +++ /dev/null @@ -1,10 +0,0 @@ -# ContainersPortProtocol - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/api/full/rust/docs/ContainersPortRouting.md b/sdks/api/full/rust/docs/ContainersPortRouting.md deleted file mode 100644 index dd0c620964..0000000000 --- a/sdks/api/full/rust/docs/ContainersPortRouting.md +++ /dev/null @@ -1,12 +0,0 @@ -# ContainersPortRouting - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**guard** | Option<[**serde_json::Value**](.md)> | | [optional] -**host** | Option<[**serde_json::Value**](.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/api/full/rust/docs/ContainersResources.md b/sdks/api/full/rust/docs/ContainersResources.md deleted file mode 100644 index a32f979d17..0000000000 --- a/sdks/api/full/rust/docs/ContainersResources.md +++ /dev/null @@ -1,12 +0,0 @@ -# ContainersResources - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cpu** | **i32** | The number of CPU cores in millicores, or 1/1000 of a core. For example, 1/8 of a core would be 125 millicores, and 1 core would be 1000 millicores. | -**memory** | **i32** | The amount of memory in megabytes | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/api/full/rust/src/models/actors_actor.rs b/sdks/api/full/rust/src/models/actors_actor.rs index 969702f2d9..1b699840b9 100644 --- a/sdks/api/full/rust/src/models/actors_actor.rs +++ b/sdks/api/full/rust/src/models/actors_actor.rs @@ -17,12 +17,16 @@ pub struct ActorsActor { pub region: String, #[serde(rename = "tags", deserialize_with = "Option::deserialize")] pub tags: Option, - #[serde(rename = "runtime")] - pub runtime: Box, - #[serde(rename = "network")] - pub network: Box, - #[serde(rename = "lifecycle")] - pub lifecycle: Box, + #[serde(rename = "build")] + pub build: uuid::Uuid, + #[serde(rename = "ports")] + pub ports: ::std::collections::HashMap, + /// The duration to wait for in milliseconds before force killing the actor after a DELETE request. This gives the actor time to perform a shutdown sequence before being killed. This should be set to a safe default, and can be overridden during a DELETE request if needed. + #[serde(rename = "kill_timeout", skip_serializing_if = "Option::is_none")] + pub kill_timeout: Option, + /// If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. + #[serde(rename = "durable", skip_serializing_if = "Option::is_none")] + pub durable: Option, /// RFC3339 timestamp #[serde(rename = "created_at")] pub created_at: String, @@ -39,18 +43,18 @@ impl ActorsActor { id: String, region: String, tags: Option, - runtime: crate::models::ActorsRuntime, - network: crate::models::ActorsNetwork, - lifecycle: crate::models::ActorsLifecycle, + build: uuid::Uuid, + ports: ::std::collections::HashMap, created_at: String, ) -> ActorsActor { ActorsActor { id, region, tags, - runtime: Box::new(runtime), - network: Box::new(network), - lifecycle: Box::new(lifecycle), + build, + ports, + kill_timeout: None, + durable: None, created_at, started_at: None, destroyed_at: None, diff --git a/sdks/api/full/rust/src/models/actors_create_actor_network_request.rs b/sdks/api/full/rust/src/models/actors_create_actor_network_request.rs deleted file mode 100644 index 493558b0c8..0000000000 --- a/sdks/api/full/rust/src/models/actors_create_actor_network_request.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct ActorsCreateActorNetworkRequest { - #[serde(rename = "mode", skip_serializing_if = "Option::is_none")] - pub mode: Option, - #[serde(rename = "ports", skip_serializing_if = "Option::is_none")] - pub ports: - Option<::std::collections::HashMap>, - #[serde(rename = "wait_ready", skip_serializing_if = "Option::is_none")] - pub wait_ready: Option, -} - -impl ActorsCreateActorNetworkRequest { - pub fn new() -> ActorsCreateActorNetworkRequest { - ActorsCreateActorNetworkRequest { - mode: None, - ports: None, - wait_ready: None, - } - } -} diff --git a/sdks/api/full/rust/src/models/actors_create_actor_request.rs b/sdks/api/full/rust/src/models/actors_create_actor_request.rs index f585c3dfe9..438a572f6c 100644 --- a/sdks/api/full/rust/src/models/actors_create_actor_request.rs +++ b/sdks/api/full/rust/src/models/actors_create_actor_request.rs @@ -23,12 +23,22 @@ pub struct ActorsCreateActorRequest { skip_serializing_if = "Option::is_none" )] pub build_tags: Option>, - #[serde(rename = "runtime", skip_serializing_if = "Option::is_none")] - pub runtime: Option>, - #[serde(rename = "network", skip_serializing_if = "Option::is_none")] - pub network: Option>, - #[serde(rename = "lifecycle", skip_serializing_if = "Option::is_none")] - pub lifecycle: Option>, + #[serde( + rename = "network_endpoint_type", + skip_serializing_if = "Option::is_none" + )] + pub network_endpoint_type: Option, + #[serde( + rename = "wait_for_network_ready", + skip_serializing_if = "Option::is_none" + )] + pub wait_for_network_ready: Option, + /// The duration to wait for in milliseconds before force killing the actor after a DELETE request. This gives the actor time to perform a shutdown sequence before being killed. This should be set to a safe default, and can be overridden during a DELETE request if needed. + #[serde(rename = "kill_timeout", skip_serializing_if = "Option::is_none")] + pub kill_timeout: Option, + /// If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. + #[serde(rename = "durable", skip_serializing_if = "Option::is_none")] + pub durable: Option, } impl ActorsCreateActorRequest { @@ -38,9 +48,10 @@ impl ActorsCreateActorRequest { tags, build: None, build_tags: None, - runtime: None, - network: None, - lifecycle: None, + network_endpoint_type: None, + wait_for_network_ready: None, + kill_timeout: None, + durable: None, } } } diff --git a/sdks/api/full/rust/src/models/actors_create_actor_runtime_network_request.rs b/sdks/api/full/rust/src/models/actors_create_actor_runtime_network_request.rs deleted file mode 100644 index 15cd6bf825..0000000000 --- a/sdks/api/full/rust/src/models/actors_create_actor_runtime_network_request.rs +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct ActorsCreateActorRuntimeNetworkRequest { - #[serde(rename = "endpoint_type")] - pub endpoint_type: crate::models::ActorsEndpointType, -} - -impl ActorsCreateActorRuntimeNetworkRequest { - pub fn new( - endpoint_type: crate::models::ActorsEndpointType, - ) -> ActorsCreateActorRuntimeNetworkRequest { - ActorsCreateActorRuntimeNetworkRequest { endpoint_type } - } -} diff --git a/sdks/api/full/rust/src/models/actors_create_actor_runtime_request.rs b/sdks/api/full/rust/src/models/actors_create_actor_runtime_request.rs deleted file mode 100644 index 17eb6bf0cd..0000000000 --- a/sdks/api/full/rust/src/models/actors_create_actor_runtime_request.rs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct ActorsCreateActorRuntimeRequest { - #[serde(rename = "environment", skip_serializing_if = "Option::is_none")] - pub environment: Option<::std::collections::HashMap>, - #[serde(rename = "network", skip_serializing_if = "Option::is_none")] - pub network: Option>, -} - -impl ActorsCreateActorRuntimeRequest { - pub fn new() -> ActorsCreateActorRuntimeRequest { - ActorsCreateActorRuntimeRequest { - environment: None, - network: None, - } - } -} diff --git a/sdks/api/full/rust/src/models/actors_lifecycle.rs b/sdks/api/full/rust/src/models/actors_lifecycle.rs deleted file mode 100644 index c966944556..0000000000 --- a/sdks/api/full/rust/src/models/actors_lifecycle.rs +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct ActorsLifecycle { - /// The duration to wait for in milliseconds before killing the actor. This should be set to a safe default, and can be overridden during a DELETE request if needed. - #[serde(rename = "kill_timeout", skip_serializing_if = "Option::is_none")] - pub kill_timeout: Option, - /// If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. - #[serde(rename = "durable", skip_serializing_if = "Option::is_none")] - pub durable: Option, -} - -impl ActorsLifecycle { - pub fn new() -> ActorsLifecycle { - ActorsLifecycle { - kill_timeout: None, - durable: None, - } - } -} diff --git a/sdks/api/full/rust/src/models/actors_network.rs b/sdks/api/full/rust/src/models/actors_network.rs deleted file mode 100644 index cc84ddb576..0000000000 --- a/sdks/api/full/rust/src/models/actors_network.rs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct ActorsNetwork { - #[serde(rename = "mode")] - pub mode: crate::models::ActorsNetworkMode, - #[serde(rename = "ports")] - pub ports: ::std::collections::HashMap, -} - -impl ActorsNetwork { - pub fn new( - mode: crate::models::ActorsNetworkMode, - ports: ::std::collections::HashMap, - ) -> ActorsNetwork { - ActorsNetwork { mode, ports } - } -} diff --git a/sdks/api/full/rust/src/models/actors_port.rs b/sdks/api/full/rust/src/models/actors_port.rs index 5ad177a9c9..d6ce087147 100644 --- a/sdks/api/full/rust/src/models/actors_port.rs +++ b/sdks/api/full/rust/src/models/actors_port.rs @@ -11,7 +11,7 @@ #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ActorsPort { #[serde(rename = "protocol")] - pub protocol: crate::models::ActorsPortProtocol, + pub protocol: crate::models::BuildsPortProtocol, #[serde(rename = "internal_port", skip_serializing_if = "Option::is_none")] pub internal_port: Option, #[serde(rename = "hostname", skip_serializing_if = "Option::is_none")] @@ -24,13 +24,13 @@ pub struct ActorsPort { #[serde(rename = "url", skip_serializing_if = "Option::is_none")] pub url: Option, #[serde(rename = "routing")] - pub routing: Box, + pub routing: Box, } impl ActorsPort { pub fn new( - protocol: crate::models::ActorsPortProtocol, - routing: crate::models::ActorsPortRouting, + protocol: crate::models::BuildsPortProtocol, + routing: crate::models::BuildsPortRouting, ) -> ActorsPort { ActorsPort { protocol, diff --git a/sdks/api/full/rust/src/models/actors_runtime.rs b/sdks/api/full/rust/src/models/actors_runtime.rs deleted file mode 100644 index 649f1f6267..0000000000 --- a/sdks/api/full/rust/src/models/actors_runtime.rs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct ActorsRuntime { - #[serde(rename = "build")] - pub build: uuid::Uuid, - #[serde(rename = "arguments", skip_serializing_if = "Option::is_none")] - pub arguments: Option>, - #[serde(rename = "environment", skip_serializing_if = "Option::is_none")] - pub environment: Option<::std::collections::HashMap>, -} - -impl ActorsRuntime { - pub fn new(build: uuid::Uuid) -> ActorsRuntime { - ActorsRuntime { - build, - arguments: None, - environment: None, - } - } -} diff --git a/sdks/api/full/rust/src/models/actors_v1_resources.rs b/sdks/api/full/rust/src/models/actors_v1_resources.rs index 401b03a7e9..f8121f595c 100644 --- a/sdks/api/full/rust/src/models/actors_v1_resources.rs +++ b/sdks/api/full/rust/src/models/actors_v1_resources.rs @@ -13,7 +13,7 @@ pub struct ActorsV1Resources { /// The number of CPU cores in millicores, or 1/1000 of a core. For example, 1/8 of a core would be 125 millicores, and 1 core would be 1000 millicores. #[serde(rename = "cpu")] pub cpu: i32, - /// The amount of memory in megabytes + /// The amount of memory in mebibytes #[serde(rename = "memory")] pub memory: i32, } diff --git a/sdks/api/full/rust/src/models/builds_allocation.rs b/sdks/api/full/rust/src/models/builds_allocation.rs deleted file mode 100644 index bc5c78b694..0000000000 --- a/sdks/api/full/rust/src/models/builds_allocation.rs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct BuildsAllocation { - #[serde(rename = "single", skip_serializing_if = "Option::is_none")] - pub single: Option, - #[serde(rename = "multi", skip_serializing_if = "Option::is_none")] - pub multi: Option>, -} - -impl BuildsAllocation { - pub fn new() -> BuildsAllocation { - BuildsAllocation { - single: None, - multi: None, - } - } -} diff --git a/sdks/api/full/rust/src/models/builds_allocation_multi.rs b/sdks/api/full/rust/src/models/builds_allocation_multi.rs deleted file mode 100644 index 544f01341b..0000000000 --- a/sdks/api/full/rust/src/models/builds_allocation_multi.rs +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct BuildsAllocationMulti { - #[serde(rename = "slots")] - pub slots: i32, -} - -impl BuildsAllocationMulti { - pub fn new(slots: i32) -> BuildsAllocationMulti { - BuildsAllocationMulti { slots } - } -} diff --git a/sdks/api/full/rust/src/models/builds_build.rs b/sdks/api/full/rust/src/models/builds_build.rs index 544925cef1..0df3336ca6 100644 --- a/sdks/api/full/rust/src/models/builds_build.rs +++ b/sdks/api/full/rust/src/models/builds_build.rs @@ -20,13 +20,11 @@ pub struct BuildsBuild { /// Unsigned 64 bit integer. #[serde(rename = "content_length")] pub content_length: i64, - #[serde(rename = "allocation", skip_serializing_if = "Option::is_none")] - pub allocation: Option>, - #[serde(rename = "resources", skip_serializing_if = "Option::is_none")] - pub resources: Option>, /// Tags of this build #[serde(rename = "tags")] pub tags: ::std::collections::HashMap, + #[serde(rename = "runtime", skip_serializing_if = "Option::is_none")] + pub runtime: Option>, } impl BuildsBuild { @@ -42,9 +40,8 @@ impl BuildsBuild { name, created_at, content_length, - allocation: None, - resources: None, tags, + runtime: None, } } } diff --git a/sdks/api/full/rust/src/models/actors_network_mode.rs b/sdks/api/full/rust/src/models/builds_network_mode.rs similarity index 80% rename from sdks/api/full/rust/src/models/actors_network_mode.rs rename to sdks/api/full/rust/src/models/builds_network_mode.rs index 32dfda5dcb..92c8d4eddf 100644 --- a/sdks/api/full/rust/src/models/actors_network_mode.rs +++ b/sdks/api/full/rust/src/models/builds_network_mode.rs @@ -10,14 +10,14 @@ /// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum ActorsNetworkMode { +pub enum BuildsNetworkMode { #[serde(rename = "bridge")] Bridge, #[serde(rename = "host")] Host, } -impl ToString for ActorsNetworkMode { +impl ToString for BuildsNetworkMode { fn to_string(&self) -> String { match self { Self::Bridge => String::from("bridge"), @@ -26,8 +26,8 @@ impl ToString for ActorsNetworkMode { } } -impl Default for ActorsNetworkMode { - fn default() -> ActorsNetworkMode { +impl Default for BuildsNetworkMode { + fn default() -> BuildsNetworkMode { Self::Bridge } } diff --git a/sdks/api/full/rust/src/models/actors_port_protocol.rs b/sdks/api/full/rust/src/models/builds_port_protocol.rs similarity index 84% rename from sdks/api/full/rust/src/models/actors_port_protocol.rs rename to sdks/api/full/rust/src/models/builds_port_protocol.rs index be5e29840b..14b20be96f 100644 --- a/sdks/api/full/rust/src/models/actors_port_protocol.rs +++ b/sdks/api/full/rust/src/models/builds_port_protocol.rs @@ -10,7 +10,7 @@ /// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum ActorsPortProtocol { +pub enum BuildsPortProtocol { #[serde(rename = "http")] Http, #[serde(rename = "https")] @@ -23,7 +23,7 @@ pub enum ActorsPortProtocol { Udp, } -impl ToString for ActorsPortProtocol { +impl ToString for BuildsPortProtocol { fn to_string(&self) -> String { match self { Self::Http => String::from("http"), @@ -35,8 +35,8 @@ impl ToString for ActorsPortProtocol { } } -impl Default for ActorsPortProtocol { - fn default() -> ActorsPortProtocol { +impl Default for BuildsPortProtocol { + fn default() -> BuildsPortProtocol { Self::Http } } diff --git a/sdks/api/full/rust/src/models/actors_create_actor_port_request.rs b/sdks/api/full/rust/src/models/builds_port_request.rs similarity index 64% rename from sdks/api/full/rust/src/models/actors_create_actor_port_request.rs rename to sdks/api/full/rust/src/models/builds_port_request.rs index 9f8508e5d4..1dcd352b0f 100644 --- a/sdks/api/full/rust/src/models/actors_create_actor_port_request.rs +++ b/sdks/api/full/rust/src/models/builds_port_request.rs @@ -9,18 +9,18 @@ */ #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct ActorsCreateActorPortRequest { +pub struct BuildsPortRequest { #[serde(rename = "protocol")] - pub protocol: crate::models::ActorsPortProtocol, + pub protocol: crate::models::BuildsPortProtocol, #[serde(rename = "internal_port", skip_serializing_if = "Option::is_none")] pub internal_port: Option, #[serde(rename = "routing", skip_serializing_if = "Option::is_none")] - pub routing: Option>, + pub routing: Option>, } -impl ActorsCreateActorPortRequest { - pub fn new(protocol: crate::models::ActorsPortProtocol) -> ActorsCreateActorPortRequest { - ActorsCreateActorPortRequest { +impl BuildsPortRequest { + pub fn new(protocol: crate::models::BuildsPortProtocol) -> BuildsPortRequest { + BuildsPortRequest { protocol, internal_port: None, routing: None, diff --git a/sdks/api/full/rust/src/models/actors_port_routing.rs b/sdks/api/full/rust/src/models/builds_port_routing.rs similarity index 82% rename from sdks/api/full/rust/src/models/actors_port_routing.rs rename to sdks/api/full/rust/src/models/builds_port_routing.rs index 3261dd8a22..425a3bed53 100644 --- a/sdks/api/full/rust/src/models/actors_port_routing.rs +++ b/sdks/api/full/rust/src/models/builds_port_routing.rs @@ -9,16 +9,16 @@ */ #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct ActorsPortRouting { +pub struct BuildsPortRouting { #[serde(rename = "guard", skip_serializing_if = "Option::is_none")] pub guard: Option, #[serde(rename = "host", skip_serializing_if = "Option::is_none")] pub host: Option, } -impl ActorsPortRouting { - pub fn new() -> ActorsPortRouting { - ActorsPortRouting { +impl BuildsPortRouting { + pub fn new() -> BuildsPortRouting { + BuildsPortRouting { guard: None, host: None, } diff --git a/sdks/api/full/rust/src/models/builds_prepare_build_request.rs b/sdks/api/full/rust/src/models/builds_prepare_build_request.rs index cc6fd40168..b1bef7a166 100644 --- a/sdks/api/full/rust/src/models/builds_prepare_build_request.rs +++ b/sdks/api/full/rust/src/models/builds_prepare_build_request.rs @@ -19,10 +19,8 @@ pub struct BuildsPrepareBuildRequest { pub kind: Option, #[serde(rename = "compression", skip_serializing_if = "Option::is_none")] pub compression: Option, - #[serde(rename = "allocation", skip_serializing_if = "Option::is_none")] - pub allocation: Option>, - #[serde(rename = "resources", skip_serializing_if = "Option::is_none")] - pub resources: Option>, + #[serde(rename = "runtime", skip_serializing_if = "Option::is_none")] + pub runtime: Option>, } impl BuildsPrepareBuildRequest { @@ -32,8 +30,7 @@ impl BuildsPrepareBuildRequest { image_file: Box::new(image_file), kind: None, compression: None, - allocation: None, - resources: None, + runtime: None, } } } diff --git a/sdks/api/full/rust/src/models/builds_resources.rs b/sdks/api/full/rust/src/models/builds_resources.rs index 96db577e50..d2b6bb061b 100644 --- a/sdks/api/full/rust/src/models/builds_resources.rs +++ b/sdks/api/full/rust/src/models/builds_resources.rs @@ -13,7 +13,7 @@ pub struct BuildsResources { /// The number of CPU cores in millicores, or 1/1000 of a core. For example, 1/8 of a core would be 125 millicores, and 1 core would be 1000 millicores. #[serde(rename = "cpu")] pub cpu: i32, - /// The amount of memory in megabytes + /// The amount of memory in mebibytes #[serde(rename = "memory")] pub memory: i32, } diff --git a/sdks/api/full/rust/src/models/builds_runtime.rs b/sdks/api/full/rust/src/models/builds_runtime.rs new file mode 100644 index 0000000000..e1ada32eda --- /dev/null +++ b/sdks/api/full/rust/src/models/builds_runtime.rs @@ -0,0 +1,26 @@ +/* + * Rivet API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct BuildsRuntime { + #[serde(rename = "container", skip_serializing_if = "Option::is_none")] + pub container: Option>, + #[serde(rename = "actor", skip_serializing_if = "Option::is_none")] + pub actor: Option>, +} + +impl BuildsRuntime { + pub fn new() -> BuildsRuntime { + BuildsRuntime { + container: None, + actor: None, + } + } +} diff --git a/sdks/api/full/rust/src/models/builds_runtime_actor.rs b/sdks/api/full/rust/src/models/builds_runtime_actor.rs new file mode 100644 index 0000000000..bf681d0ae8 --- /dev/null +++ b/sdks/api/full/rust/src/models/builds_runtime_actor.rs @@ -0,0 +1,35 @@ +/* + * Rivet API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct BuildsRuntimeActor { + #[serde(rename = "environment", skip_serializing_if = "Option::is_none")] + pub environment: Option<::std::collections::HashMap>, + #[serde(rename = "network_mode", skip_serializing_if = "Option::is_none")] + pub network_mode: Option, + #[serde(rename = "ports", skip_serializing_if = "Option::is_none")] + pub ports: Option<::std::collections::HashMap>, + #[serde(rename = "resources")] + pub resources: Box, + #[serde(rename = "slots")] + pub slots: i32, +} + +impl BuildsRuntimeActor { + pub fn new(resources: crate::models::BuildsResources, slots: i32) -> BuildsRuntimeActor { + BuildsRuntimeActor { + environment: None, + network_mode: None, + ports: None, + resources: Box::new(resources), + slots, + } + } +} diff --git a/sdks/api/full/rust/src/models/containers_runtime.rs b/sdks/api/full/rust/src/models/builds_runtime_container.rs similarity index 50% rename from sdks/api/full/rust/src/models/containers_runtime.rs rename to sdks/api/full/rust/src/models/builds_runtime_container.rs index 2de7b3b33d..8e4be7894e 100644 --- a/sdks/api/full/rust/src/models/containers_runtime.rs +++ b/sdks/api/full/rust/src/models/builds_runtime_container.rs @@ -9,21 +9,21 @@ */ #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct ContainersRuntime { - #[serde(rename = "build")] - pub build: uuid::Uuid, - #[serde(rename = "arguments", skip_serializing_if = "Option::is_none")] - pub arguments: Option>, +pub struct BuildsRuntimeContainer { #[serde(rename = "environment", skip_serializing_if = "Option::is_none")] pub environment: Option<::std::collections::HashMap>, + #[serde(rename = "network_mode", skip_serializing_if = "Option::is_none")] + pub network_mode: Option, + #[serde(rename = "ports", skip_serializing_if = "Option::is_none")] + pub ports: Option<::std::collections::HashMap>, } -impl ContainersRuntime { - pub fn new(build: uuid::Uuid) -> ContainersRuntime { - ContainersRuntime { - build, - arguments: None, +impl BuildsRuntimeContainer { + pub fn new() -> BuildsRuntimeContainer { + BuildsRuntimeContainer { environment: None, + network_mode: None, + ports: None, } } } diff --git a/sdks/api/full/rust/src/models/containers_container.rs b/sdks/api/full/rust/src/models/containers_container.rs index 25a7d237cb..27eb4fa44e 100644 --- a/sdks/api/full/rust/src/models/containers_container.rs +++ b/sdks/api/full/rust/src/models/containers_container.rs @@ -17,14 +17,22 @@ pub struct ContainersContainer { pub region: String, #[serde(rename = "tags", deserialize_with = "Option::deserialize")] pub tags: Option, - #[serde(rename = "runtime")] - pub runtime: Box, - #[serde(rename = "network")] - pub network: Box, + #[serde(rename = "build")] + pub build: uuid::Uuid, + #[serde(rename = "arguments", skip_serializing_if = "Option::is_none")] + pub arguments: Option>, + #[serde(rename = "environment", skip_serializing_if = "Option::is_none")] + pub environment: Option<::std::collections::HashMap>, + #[serde(rename = "ports")] + pub ports: ::std::collections::HashMap, #[serde(rename = "resources")] - pub resources: Box, - #[serde(rename = "lifecycle")] - pub lifecycle: Box, + pub resources: Box, + /// The duration to wait for in milliseconds before force killing the actor after a DELETE request. This gives the actor time to perform a shutdown sequence before being killed. This should be set to a safe default, and can be overridden during a DELETE request if needed. + #[serde(rename = "kill_timeout", skip_serializing_if = "Option::is_none")] + pub kill_timeout: Option, + /// If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. + #[serde(rename = "durable", skip_serializing_if = "Option::is_none")] + pub durable: Option, /// RFC3339 timestamp #[serde(rename = "created_at")] pub created_at: String, @@ -41,20 +49,22 @@ impl ContainersContainer { id: String, region: String, tags: Option, - runtime: crate::models::ContainersRuntime, - network: crate::models::ContainersNetwork, - resources: crate::models::ContainersResources, - lifecycle: crate::models::ContainersLifecycle, + build: uuid::Uuid, + ports: ::std::collections::HashMap, + resources: crate::models::BuildsResources, created_at: String, ) -> ContainersContainer { ContainersContainer { id, region, tags, - runtime: Box::new(runtime), - network: Box::new(network), + build, + arguments: None, + environment: None, + ports, resources: Box::new(resources), - lifecycle: Box::new(lifecycle), + kill_timeout: None, + durable: None, created_at, started_at: None, destroyed_at: None, diff --git a/sdks/api/full/rust/src/models/containers_create_container_network_request.rs b/sdks/api/full/rust/src/models/containers_create_container_network_request.rs deleted file mode 100644 index 29db603d2c..0000000000 --- a/sdks/api/full/rust/src/models/containers_create_container_network_request.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct ContainersCreateContainerNetworkRequest { - #[serde(rename = "mode", skip_serializing_if = "Option::is_none")] - pub mode: Option, - #[serde(rename = "ports", skip_serializing_if = "Option::is_none")] - pub ports: Option< - ::std::collections::HashMap, - >, - #[serde(rename = "wait_ready", skip_serializing_if = "Option::is_none")] - pub wait_ready: Option, -} - -impl ContainersCreateContainerNetworkRequest { - pub fn new() -> ContainersCreateContainerNetworkRequest { - ContainersCreateContainerNetworkRequest { - mode: None, - ports: None, - wait_ready: None, - } - } -} diff --git a/sdks/api/full/rust/src/models/containers_create_container_port_request.rs b/sdks/api/full/rust/src/models/containers_create_container_port_request.rs deleted file mode 100644 index 3de16d3ffa..0000000000 --- a/sdks/api/full/rust/src/models/containers_create_container_port_request.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct ContainersCreateContainerPortRequest { - #[serde(rename = "protocol")] - pub protocol: crate::models::ContainersPortProtocol, - #[serde(rename = "internal_port", skip_serializing_if = "Option::is_none")] - pub internal_port: Option, - #[serde(rename = "routing", skip_serializing_if = "Option::is_none")] - pub routing: Option>, -} - -impl ContainersCreateContainerPortRequest { - pub fn new( - protocol: crate::models::ContainersPortProtocol, - ) -> ContainersCreateContainerPortRequest { - ContainersCreateContainerPortRequest { - protocol, - internal_port: None, - routing: None, - } - } -} diff --git a/sdks/api/full/rust/src/models/containers_create_container_request.rs b/sdks/api/full/rust/src/models/containers_create_container_request.rs index 86f4b4c2e3..9a42ce0d01 100644 --- a/sdks/api/full/rust/src/models/containers_create_container_request.rs +++ b/sdks/api/full/rust/src/models/containers_create_container_request.rs @@ -23,30 +23,47 @@ pub struct ContainersCreateContainerRequest { skip_serializing_if = "Option::is_none" )] pub build_tags: Option>, - #[serde(rename = "runtime", skip_serializing_if = "Option::is_none")] - pub runtime: Option>, - #[serde(rename = "network", skip_serializing_if = "Option::is_none")] - pub network: Option>, + #[serde(rename = "environment", skip_serializing_if = "Option::is_none")] + pub environment: Option<::std::collections::HashMap>, + #[serde( + rename = "network_endpoint_type", + skip_serializing_if = "Option::is_none" + )] + pub network_endpoint_type: Option, + #[serde( + rename = "wait_for_network_ready", + skip_serializing_if = "Option::is_none" + )] + pub wait_for_network_ready: Option, + #[serde(rename = "ports", skip_serializing_if = "Option::is_none")] + pub ports: Option<::std::collections::HashMap>, #[serde(rename = "resources")] - pub resources: Box, - #[serde(rename = "lifecycle", skip_serializing_if = "Option::is_none")] - pub lifecycle: Option>, + pub resources: Box, + /// The duration to wait for in milliseconds before force killing the actor after a DELETE request. This gives the actor time to perform a shutdown sequence before being killed. This should be set to a safe default, and can be overridden during a DELETE request if needed. + #[serde(rename = "kill_timeout", skip_serializing_if = "Option::is_none")] + pub kill_timeout: Option, + /// If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. + #[serde(rename = "durable", skip_serializing_if = "Option::is_none")] + pub durable: Option, } impl ContainersCreateContainerRequest { pub fn new( tags: Option, - resources: crate::models::ContainersResources, + resources: crate::models::BuildsResources, ) -> ContainersCreateContainerRequest { ContainersCreateContainerRequest { region: None, tags, build: None, build_tags: None, - runtime: None, - network: None, + environment: None, + network_endpoint_type: None, + wait_for_network_ready: None, + ports: None, resources: Box::new(resources), - lifecycle: None, + kill_timeout: None, + durable: None, } } } diff --git a/sdks/api/full/rust/src/models/containers_create_container_runtime_network_request.rs b/sdks/api/full/rust/src/models/containers_create_container_runtime_network_request.rs deleted file mode 100644 index a2e59cc84a..0000000000 --- a/sdks/api/full/rust/src/models/containers_create_container_runtime_network_request.rs +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct ContainersCreateContainerRuntimeNetworkRequest { - #[serde(rename = "endpoint_type")] - pub endpoint_type: crate::models::ContainersEndpointType, -} - -impl ContainersCreateContainerRuntimeNetworkRequest { - pub fn new( - endpoint_type: crate::models::ContainersEndpointType, - ) -> ContainersCreateContainerRuntimeNetworkRequest { - ContainersCreateContainerRuntimeNetworkRequest { endpoint_type } - } -} diff --git a/sdks/api/full/rust/src/models/containers_create_container_runtime_request.rs b/sdks/api/full/rust/src/models/containers_create_container_runtime_request.rs deleted file mode 100644 index 782856511a..0000000000 --- a/sdks/api/full/rust/src/models/containers_create_container_runtime_request.rs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct ContainersCreateContainerRuntimeRequest { - #[serde(rename = "environment", skip_serializing_if = "Option::is_none")] - pub environment: Option<::std::collections::HashMap>, - #[serde(rename = "network", skip_serializing_if = "Option::is_none")] - pub network: Option>, -} - -impl ContainersCreateContainerRuntimeRequest { - pub fn new() -> ContainersCreateContainerRuntimeRequest { - ContainersCreateContainerRuntimeRequest { - environment: None, - network: None, - } - } -} diff --git a/sdks/api/full/rust/src/models/containers_lifecycle.rs b/sdks/api/full/rust/src/models/containers_lifecycle.rs deleted file mode 100644 index 9b731cf9ef..0000000000 --- a/sdks/api/full/rust/src/models/containers_lifecycle.rs +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct ContainersLifecycle { - /// The duration to wait for in milliseconds before killing the container. This should be set to a safe default, and can be overridden during a DELETE request if needed. - #[serde(rename = "kill_timeout", skip_serializing_if = "Option::is_none")] - pub kill_timeout: Option, - /// If true, the container will try to reschedule itself automatically in the event of a crash or a datacenter failover. The container will not reschedule if it exits successfully. - #[serde(rename = "durable", skip_serializing_if = "Option::is_none")] - pub durable: Option, -} - -impl ContainersLifecycle { - pub fn new() -> ContainersLifecycle { - ContainersLifecycle { - kill_timeout: None, - durable: None, - } - } -} diff --git a/sdks/api/full/rust/src/models/containers_network.rs b/sdks/api/full/rust/src/models/containers_network.rs deleted file mode 100644 index d0343c4895..0000000000 --- a/sdks/api/full/rust/src/models/containers_network.rs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct ContainersNetwork { - #[serde(rename = "mode")] - pub mode: crate::models::ContainersNetworkMode, - #[serde(rename = "ports")] - pub ports: ::std::collections::HashMap, -} - -impl ContainersNetwork { - pub fn new( - mode: crate::models::ContainersNetworkMode, - ports: ::std::collections::HashMap, - ) -> ContainersNetwork { - ContainersNetwork { mode, ports } - } -} diff --git a/sdks/api/full/rust/src/models/containers_network_mode.rs b/sdks/api/full/rust/src/models/containers_network_mode.rs deleted file mode 100644 index 4e3eda1bbc..0000000000 --- a/sdks/api/full/rust/src/models/containers_network_mode.rs +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum ContainersNetworkMode { - #[serde(rename = "bridge")] - Bridge, - #[serde(rename = "host")] - Host, -} - -impl ToString for ContainersNetworkMode { - fn to_string(&self) -> String { - match self { - Self::Bridge => String::from("bridge"), - Self::Host => String::from("host"), - } - } -} - -impl Default for ContainersNetworkMode { - fn default() -> ContainersNetworkMode { - Self::Bridge - } -} diff --git a/sdks/api/full/rust/src/models/containers_port.rs b/sdks/api/full/rust/src/models/containers_port.rs index aeab73a366..ea47188710 100644 --- a/sdks/api/full/rust/src/models/containers_port.rs +++ b/sdks/api/full/rust/src/models/containers_port.rs @@ -11,7 +11,7 @@ #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ContainersPort { #[serde(rename = "protocol")] - pub protocol: crate::models::ContainersPortProtocol, + pub protocol: crate::models::BuildsPortProtocol, #[serde(rename = "internal_port", skip_serializing_if = "Option::is_none")] pub internal_port: Option, #[serde(rename = "hostname", skip_serializing_if = "Option::is_none")] @@ -24,13 +24,13 @@ pub struct ContainersPort { #[serde(rename = "url", skip_serializing_if = "Option::is_none")] pub url: Option, #[serde(rename = "routing")] - pub routing: Box, + pub routing: Box, } impl ContainersPort { pub fn new( - protocol: crate::models::ContainersPortProtocol, - routing: crate::models::ContainersPortRouting, + protocol: crate::models::BuildsPortProtocol, + routing: crate::models::BuildsPortRouting, ) -> ContainersPort { ContainersPort { protocol, diff --git a/sdks/api/full/rust/src/models/containers_port_protocol.rs b/sdks/api/full/rust/src/models/containers_port_protocol.rs deleted file mode 100644 index 389025831c..0000000000 --- a/sdks/api/full/rust/src/models/containers_port_protocol.rs +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum ContainersPortProtocol { - #[serde(rename = "http")] - Http, - #[serde(rename = "https")] - Https, - #[serde(rename = "tcp")] - Tcp, - #[serde(rename = "tcp_tls")] - TcpTls, - #[serde(rename = "udp")] - Udp, -} - -impl ToString for ContainersPortProtocol { - fn to_string(&self) -> String { - match self { - Self::Http => String::from("http"), - Self::Https => String::from("https"), - Self::Tcp => String::from("tcp"), - Self::TcpTls => String::from("tcp_tls"), - Self::Udp => String::from("udp"), - } - } -} - -impl Default for ContainersPortProtocol { - fn default() -> ContainersPortProtocol { - Self::Http - } -} diff --git a/sdks/api/full/rust/src/models/containers_port_routing.rs b/sdks/api/full/rust/src/models/containers_port_routing.rs deleted file mode 100644 index 3d65bd9901..0000000000 --- a/sdks/api/full/rust/src/models/containers_port_routing.rs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct ContainersPortRouting { - #[serde(rename = "guard", skip_serializing_if = "Option::is_none")] - pub guard: Option, - #[serde(rename = "host", skip_serializing_if = "Option::is_none")] - pub host: Option, -} - -impl ContainersPortRouting { - pub fn new() -> ContainersPortRouting { - ContainersPortRouting { - guard: None, - host: None, - } - } -} diff --git a/sdks/api/full/rust/src/models/containers_resources.rs b/sdks/api/full/rust/src/models/containers_resources.rs deleted file mode 100644 index 0e7e3a7bb9..0000000000 --- a/sdks/api/full/rust/src/models/containers_resources.rs +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct ContainersResources { - /// The number of CPU cores in millicores, or 1/1000 of a core. For example, 1/8 of a core would be 125 millicores, and 1 core would be 1000 millicores. - #[serde(rename = "cpu")] - pub cpu: i32, - /// The amount of memory in megabytes - #[serde(rename = "memory")] - pub memory: i32, -} - -impl ContainersResources { - pub fn new(cpu: i32, memory: i32) -> ContainersResources { - ContainersResources { cpu, memory } - } -} diff --git a/sdks/api/full/rust/src/models/mod.rs b/sdks/api/full/rust/src/models/mod.rs index b524f9c3ba..06028cf449 100644 --- a/sdks/api/full/rust/src/models/mod.rs +++ b/sdks/api/full/rust/src/models/mod.rs @@ -1,17 +1,9 @@ pub mod actors_actor; pub use self::actors_actor::ActorsActor; -pub mod actors_create_actor_network_request; -pub use self::actors_create_actor_network_request::ActorsCreateActorNetworkRequest; -pub mod actors_create_actor_port_request; -pub use self::actors_create_actor_port_request::ActorsCreateActorPortRequest; pub mod actors_create_actor_request; pub use self::actors_create_actor_request::ActorsCreateActorRequest; pub mod actors_create_actor_response; pub use self::actors_create_actor_response::ActorsCreateActorResponse; -pub mod actors_create_actor_runtime_network_request; -pub use self::actors_create_actor_runtime_network_request::ActorsCreateActorRuntimeNetworkRequest; -pub mod actors_create_actor_runtime_request; -pub use self::actors_create_actor_runtime_request::ActorsCreateActorRuntimeRequest; pub mod actors_endpoint_type; pub use self::actors_endpoint_type::ActorsEndpointType; pub mod actors_export_actor_logs_response; @@ -22,6 +14,7 @@ pub mod actors_get_actor_metrics_response; pub use self::actors_get_actor_metrics_response::ActorsGetActorMetricsResponse; pub mod actors_get_actor_response; pub use self::actors_get_actor_response::ActorsGetActorResponse; +<<<<<<< HEAD pub mod actors_get_actor_usage_response; pub use self::actors_get_actor_usage_response::ActorsGetActorUsageResponse; pub mod actors_lifecycle; @@ -51,6 +44,14 @@ pub use self::actors_query_log_stream::ActorsQueryLogStream; >>>>>>> 43e5048bc (fix: api changes) pub mod actors_runtime; pub use self::actors_runtime::ActorsRuntime; +======= +pub mod actors_list_actors_response; +pub use self::actors_list_actors_response::ActorsListActorsResponse; +pub mod actors_port; +pub use self::actors_port::ActorsPort; +pub mod actors_query_log_stream; +pub use self::actors_query_log_stream::ActorsQueryLogStream; +>>>>>>> a7d912278 (fix: even more actor api changes) pub mod actors_upgrade_actor_request; pub use self::actors_upgrade_actor_request::ActorsUpgradeActorRequest; pub mod actors_upgrade_all_actors_request; @@ -119,10 +120,6 @@ pub mod auth_refresh_identity_token_request; pub use self::auth_refresh_identity_token_request::AuthRefreshIdentityTokenRequest; pub mod auth_refresh_identity_token_response; pub use self::auth_refresh_identity_token_response::AuthRefreshIdentityTokenResponse; -pub mod builds_allocation; -pub use self::builds_allocation::BuildsAllocation; -pub mod builds_allocation_multi; -pub use self::builds_allocation_multi::BuildsAllocationMulti; pub mod builds_build; pub use self::builds_build::BuildsBuild; pub mod builds_compression; @@ -133,14 +130,28 @@ pub mod builds_kind; pub use self::builds_kind::BuildsKind; pub mod builds_list_builds_response; pub use self::builds_list_builds_response::BuildsListBuildsResponse; +pub mod builds_network_mode; +pub use self::builds_network_mode::BuildsNetworkMode; pub mod builds_patch_build_tags_request; pub use self::builds_patch_build_tags_request::BuildsPatchBuildTagsRequest; +pub mod builds_port_protocol; +pub use self::builds_port_protocol::BuildsPortProtocol; +pub mod builds_port_request; +pub use self::builds_port_request::BuildsPortRequest; +pub mod builds_port_routing; +pub use self::builds_port_routing::BuildsPortRouting; pub mod builds_prepare_build_request; pub use self::builds_prepare_build_request::BuildsPrepareBuildRequest; pub mod builds_prepare_build_response; pub use self::builds_prepare_build_response::BuildsPrepareBuildResponse; pub mod builds_resources; pub use self::builds_resources::BuildsResources; +pub mod builds_runtime; +pub use self::builds_runtime::BuildsRuntime; +pub mod builds_runtime_actor; +pub use self::builds_runtime_actor::BuildsRuntimeActor; +pub mod builds_runtime_container; +pub use self::builds_runtime_container::BuildsRuntimeContainer; pub mod captcha_config; pub use self::captcha_config::CaptchaConfig; pub mod captcha_config_hcaptcha; @@ -447,18 +458,10 @@ pub mod cloud_version_summary; pub use self::cloud_version_summary::CloudVersionSummary; pub mod containers_container; pub use self::containers_container::ContainersContainer; -pub mod containers_create_container_network_request; -pub use self::containers_create_container_network_request::ContainersCreateContainerNetworkRequest; -pub mod containers_create_container_port_request; -pub use self::containers_create_container_port_request::ContainersCreateContainerPortRequest; pub mod containers_create_container_request; pub use self::containers_create_container_request::ContainersCreateContainerRequest; pub mod containers_create_container_response; pub use self::containers_create_container_response::ContainersCreateContainerResponse; -pub mod containers_create_container_runtime_network_request; -pub use self::containers_create_container_runtime_network_request::ContainersCreateContainerRuntimeNetworkRequest; -pub mod containers_create_container_runtime_request; -pub use self::containers_create_container_runtime_request::ContainersCreateContainerRuntimeRequest; pub mod containers_endpoint_type; pub use self::containers_endpoint_type::ContainersEndpointType; pub mod containers_get_container_logs_response; @@ -467,26 +470,12 @@ pub mod containers_get_container_metrics_response; pub use self::containers_get_container_metrics_response::ContainersGetContainerMetricsResponse; pub mod containers_get_container_response; pub use self::containers_get_container_response::ContainersGetContainerResponse; -pub mod containers_lifecycle; -pub use self::containers_lifecycle::ContainersLifecycle; pub mod containers_list_containers_response; pub use self::containers_list_containers_response::ContainersListContainersResponse; -pub mod containers_network; -pub use self::containers_network::ContainersNetwork; -pub mod containers_network_mode; -pub use self::containers_network_mode::ContainersNetworkMode; pub mod containers_port; pub use self::containers_port::ContainersPort; -pub mod containers_port_protocol; -pub use self::containers_port_protocol::ContainersPortProtocol; -pub mod containers_port_routing; -pub use self::containers_port_routing::ContainersPortRouting; pub mod containers_query_log_stream; pub use self::containers_query_log_stream::ContainersQueryLogStream; -pub mod containers_resources; -pub use self::containers_resources::ContainersResources; -pub mod containers_runtime; -pub use self::containers_runtime::ContainersRuntime; pub mod containers_upgrade_all_containers_request; pub use self::containers_upgrade_all_containers_request::ContainersUpgradeAllContainersRequest; pub mod containers_upgrade_all_containers_response; diff --git a/sdks/api/full/typescript/src/api/resources/actors/client/Client.ts b/sdks/api/full/typescript/src/api/resources/actors/client/Client.ts index a7b01a5eb4..f5e44ceced 100644 --- a/sdks/api/full/typescript/src/api/resources/actors/client/Client.ts +++ b/sdks/api/full/typescript/src/api/resources/actors/client/Client.ts @@ -416,21 +416,10 @@ export class Actors { * buildTags: { * "key": "value" * }, - * runtime: { - * environment: {}, - * network: { - * endpointType: "hostname" - * } - * }, - * network: { - * mode: "bridge", - * ports: {}, - * waitReady: true - * }, - * lifecycle: { - * killTimeout: 1000000, - * durable: true - * } + * networkEndpointType: "hostname", + * waitForNetworkReady: true, + * killTimeout: 1000000, + * durable: true * } * }) */ diff --git a/sdks/api/full/typescript/src/api/resources/actors/client/requests/CreateActorRequestQuery.ts b/sdks/api/full/typescript/src/api/resources/actors/client/requests/CreateActorRequestQuery.ts index 90685a87a4..5ed1660cc8 100644 --- a/sdks/api/full/typescript/src/api/resources/actors/client/requests/CreateActorRequestQuery.ts +++ b/sdks/api/full/typescript/src/api/resources/actors/client/requests/CreateActorRequestQuery.ts @@ -19,21 +19,10 @@ import * as Rivet from "../../../../index"; * buildTags: { * "key": "value" * }, - * runtime: { - * environment: {}, - * network: { - * endpointType: "hostname" - * } - * }, - * network: { - * mode: "bridge", - * ports: {}, - * waitReady: true - * }, - * lifecycle: { - * killTimeout: 1000000, - * durable: true - * } + * networkEndpointType: "hostname", + * waitForNetworkReady: true, + * killTimeout: 1000000, + * durable: true * } * } */ diff --git a/sdks/api/full/typescript/src/api/resources/actors/resources/common/types/Actor.ts b/sdks/api/full/typescript/src/api/resources/actors/resources/common/types/Actor.ts index 268707a801..853cf01e21 100644 --- a/sdks/api/full/typescript/src/api/resources/actors/resources/common/types/Actor.ts +++ b/sdks/api/full/typescript/src/api/resources/actors/resources/common/types/Actor.ts @@ -8,9 +8,12 @@ export interface Actor { id: Rivet.Id; region: string; tags?: unknown; - runtime: Rivet.actors.Runtime; - network: Rivet.actors.Network; - lifecycle: Rivet.actors.Lifecycle; + build: string; + ports: Record; + /** The duration to wait for in milliseconds before force killing the actor after a DELETE request. This gives the actor time to perform a shutdown sequence before being killed. This should be set to a safe default, and can be overridden during a DELETE request if needed. */ + killTimeout?: number; + /** If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. */ + durable?: boolean; createdAt: Rivet.Timestamp; startedAt?: Rivet.Timestamp; destroyedAt?: Rivet.Timestamp; diff --git a/sdks/api/full/typescript/src/api/resources/actors/resources/common/types/Lifecycle.ts b/sdks/api/full/typescript/src/api/resources/actors/resources/common/types/Lifecycle.ts deleted file mode 100644 index c6c949e83f..0000000000 --- a/sdks/api/full/typescript/src/api/resources/actors/resources/common/types/Lifecycle.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export interface Lifecycle { - /** The duration to wait for in milliseconds before killing the actor. This should be set to a safe default, and can be overridden during a DELETE request if needed. */ - killTimeout?: number; - /** If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. */ - durable?: boolean; -} diff --git a/sdks/api/full/typescript/src/api/resources/actors/resources/common/types/Port.ts b/sdks/api/full/typescript/src/api/resources/actors/resources/common/types/Port.ts index c93c5b0e70..af1cc8cf1a 100644 --- a/sdks/api/full/typescript/src/api/resources/actors/resources/common/types/Port.ts +++ b/sdks/api/full/typescript/src/api/resources/actors/resources/common/types/Port.ts @@ -5,12 +5,12 @@ import * as Rivet from "../../../../../index"; export interface Port { - protocol: Rivet.actors.PortProtocol; + protocol: Rivet.builds.PortProtocol; internalPort?: number; hostname?: string; port?: number; path?: string; /** Fully formed connection URL including protocol, hostname, port, and path, if applicable. */ url?: string; - routing: Rivet.actors.PortRouting; + routing: Rivet.builds.PortRouting; } diff --git a/sdks/api/full/typescript/src/api/resources/actors/resources/common/types/Runtime.ts b/sdks/api/full/typescript/src/api/resources/actors/resources/common/types/Runtime.ts deleted file mode 100644 index a918ef8387..0000000000 --- a/sdks/api/full/typescript/src/api/resources/actors/resources/common/types/Runtime.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export interface Runtime { - build: string; - arguments?: string[]; - environment?: Record; -} diff --git a/sdks/api/full/typescript/src/api/resources/actors/resources/common/types/index.ts b/sdks/api/full/typescript/src/api/resources/actors/resources/common/types/index.ts index ced439f191..09dd4ed15b 100644 --- a/sdks/api/full/typescript/src/api/resources/actors/resources/common/types/index.ts +++ b/sdks/api/full/typescript/src/api/resources/actors/resources/common/types/index.ts @@ -1,11 +1,3 @@ export * from "./Actor"; -export * from "./Runtime"; -export * from "./Lifecycle"; -export * from "./Network"; -export * from "./NetworkMode"; export * from "./Port"; -export * from "./PortProtocol"; -export * from "./PortRouting"; -export * from "./GuardRouting"; -export * from "./HostRouting"; export * from "./EndpointType"; diff --git a/sdks/api/full/typescript/src/api/resources/actors/resources/v1/client/Client.ts b/sdks/api/full/typescript/src/api/resources/actors/resources/v1/client/Client.ts index 1d489d1e5a..68a3183a6d 100644 --- a/sdks/api/full/typescript/src/api/resources/actors/resources/v1/client/Client.ts +++ b/sdks/api/full/typescript/src/api/resources/actors/resources/v1/client/Client.ts @@ -18,7 +18,7 @@ export declare namespace V1 { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the X-API-Version header */ - xApiVersion?: "25.5.0"; + xApiVersion?: "25.5.1"; fetcher?: core.FetchFunction; } @@ -32,7 +32,7 @@ export declare namespace V1 { /** Additional headers to include in the request. */ headers?: Record; /** Override the X-API-Version header */ - xApiVersion?: "25.5.0"; + xApiVersion?: "25.5.1"; } } @@ -103,7 +103,7 @@ export class V1 { headers: { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", - "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.0", + "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -276,7 +276,7 @@ export class V1 { headers: { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", - "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.0", + "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -463,7 +463,7 @@ export class V1 { headers: { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", - "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.0", + "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -622,7 +622,7 @@ export class V1 { headers: { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", - "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.0", + "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -781,7 +781,7 @@ export class V1 { headers: { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", - "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.0", + "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -942,7 +942,7 @@ export class V1 { headers: { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", - "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.0", + "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/sdks/api/full/typescript/src/api/resources/actors/resources/v1/resources/common/types/Network.ts b/sdks/api/full/typescript/src/api/resources/actors/resources/v1/resources/common/types/Network.ts index 70a960fece..92f033b69b 100644 --- a/sdks/api/full/typescript/src/api/resources/actors/resources/v1/resources/common/types/Network.ts +++ b/sdks/api/full/typescript/src/api/resources/actors/resources/v1/resources/common/types/Network.ts @@ -5,6 +5,7 @@ import * as Rivet from "../../../../../../../index"; export interface Network { + /** **Deprecated** */ mode: Rivet.actors.v1.NetworkMode; ports: Record; } diff --git a/sdks/api/full/typescript/src/api/resources/actors/resources/v1/resources/common/types/Resources.ts b/sdks/api/full/typescript/src/api/resources/actors/resources/v1/resources/common/types/Resources.ts index 8255dc6705..230c0cadd5 100644 --- a/sdks/api/full/typescript/src/api/resources/actors/resources/v1/resources/common/types/Resources.ts +++ b/sdks/api/full/typescript/src/api/resources/actors/resources/v1/resources/common/types/Resources.ts @@ -9,6 +9,6 @@ export interface Resources { * millicores. */ cpu: number; - /** The amount of memory in megabytes */ + /** The amount of memory in mebibytes */ memory: number; } diff --git a/sdks/api/full/typescript/src/api/resources/actors/resources/v1/resources/logs/client/Client.ts b/sdks/api/full/typescript/src/api/resources/actors/resources/v1/resources/logs/client/Client.ts index 2043eba0a0..0fb2a9d57d 100644 --- a/sdks/api/full/typescript/src/api/resources/actors/resources/v1/resources/logs/client/Client.ts +++ b/sdks/api/full/typescript/src/api/resources/actors/resources/v1/resources/logs/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace Logs { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the X-API-Version header */ - xApiVersion?: "25.5.0"; + xApiVersion?: "25.5.1"; fetcher?: core.FetchFunction; } @@ -30,7 +30,7 @@ export declare namespace Logs { /** Additional headers to include in the request. */ headers?: Record; /** Override the X-API-Version header */ - xApiVersion?: "25.5.0"; + xApiVersion?: "25.5.1"; } } @@ -116,7 +116,7 @@ export class Logs { headers: { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", - "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.0", + "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/sdks/api/full/typescript/src/api/resources/actors/resources/v1/resources/metrics/client/Client.ts b/sdks/api/full/typescript/src/api/resources/actors/resources/v1/resources/metrics/client/Client.ts index b436cdc96a..725513a634 100644 --- a/sdks/api/full/typescript/src/api/resources/actors/resources/v1/resources/metrics/client/Client.ts +++ b/sdks/api/full/typescript/src/api/resources/actors/resources/v1/resources/metrics/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace Metrics { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the X-API-Version header */ - xApiVersion?: "25.5.0"; + xApiVersion?: "25.5.1"; fetcher?: core.FetchFunction; } @@ -30,7 +30,7 @@ export declare namespace Metrics { /** Additional headers to include in the request. */ headers?: Record; /** Override the X-API-Version header */ - xApiVersion?: "25.5.0"; + xApiVersion?: "25.5.1"; } } @@ -89,7 +89,7 @@ export class Metrics { headers: { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", - "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.0", + "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/sdks/api/full/typescript/src/api/resources/actors/types/CreateActorNetworkRequest.ts b/sdks/api/full/typescript/src/api/resources/actors/types/CreateActorNetworkRequest.ts deleted file mode 100644 index 0c0ad2b046..0000000000 --- a/sdks/api/full/typescript/src/api/resources/actors/types/CreateActorNetworkRequest.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../index"; - -export interface CreateActorNetworkRequest { - mode?: Rivet.actors.NetworkMode; - ports?: Record; - waitReady?: boolean; -} diff --git a/sdks/api/full/typescript/src/api/resources/actors/types/CreateActorPortRequest.ts b/sdks/api/full/typescript/src/api/resources/actors/types/CreateActorPortRequest.ts deleted file mode 100644 index f67160d1ca..0000000000 --- a/sdks/api/full/typescript/src/api/resources/actors/types/CreateActorPortRequest.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../index"; - -export interface CreateActorPortRequest { - protocol: Rivet.actors.PortProtocol; - internalPort?: number; - routing?: Rivet.actors.PortRouting; -} diff --git a/sdks/api/full/typescript/src/api/resources/actors/types/CreateActorRequest.ts b/sdks/api/full/typescript/src/api/resources/actors/types/CreateActorRequest.ts index dc7b38fc28..c3eb8fe673 100644 --- a/sdks/api/full/typescript/src/api/resources/actors/types/CreateActorRequest.ts +++ b/sdks/api/full/typescript/src/api/resources/actors/types/CreateActorRequest.ts @@ -9,7 +9,10 @@ export interface CreateActorRequest { tags?: unknown; build?: string; buildTags?: unknown; - runtime?: Rivet.actors.CreateActorRuntimeRequest; - network?: Rivet.actors.CreateActorNetworkRequest; - lifecycle?: Rivet.actors.Lifecycle; + networkEndpointType?: Rivet.actors.EndpointType; + waitForNetworkReady?: boolean; + /** The duration to wait for in milliseconds before force killing the actor after a DELETE request. This gives the actor time to perform a shutdown sequence before being killed. This should be set to a safe default, and can be overridden during a DELETE request if needed. */ + killTimeout?: number; + /** If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. */ + durable?: boolean; } diff --git a/sdks/api/full/typescript/src/api/resources/actors/types/CreateActorRuntimeNetworkRequest.ts b/sdks/api/full/typescript/src/api/resources/actors/types/CreateActorRuntimeNetworkRequest.ts deleted file mode 100644 index 1d16fab1fa..0000000000 --- a/sdks/api/full/typescript/src/api/resources/actors/types/CreateActorRuntimeNetworkRequest.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../index"; - -export interface CreateActorRuntimeNetworkRequest { - endpointType: Rivet.actors.EndpointType; -} diff --git a/sdks/api/full/typescript/src/api/resources/actors/types/CreateActorRuntimeRequest.ts b/sdks/api/full/typescript/src/api/resources/actors/types/CreateActorRuntimeRequest.ts deleted file mode 100644 index 1068e794a4..0000000000 --- a/sdks/api/full/typescript/src/api/resources/actors/types/CreateActorRuntimeRequest.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../index"; - -export interface CreateActorRuntimeRequest { - environment?: Record; - network?: Rivet.actors.CreateActorRuntimeNetworkRequest; -} diff --git a/sdks/api/full/typescript/src/api/resources/actors/types/index.ts b/sdks/api/full/typescript/src/api/resources/actors/types/index.ts index 785b43b9fd..830fb6ec41 100644 --- a/sdks/api/full/typescript/src/api/resources/actors/types/index.ts +++ b/sdks/api/full/typescript/src/api/resources/actors/types/index.ts @@ -1,9 +1,5 @@ export * from "./GetActorResponse"; export * from "./CreateActorRequest"; -export * from "./CreateActorRuntimeRequest"; -export * from "./CreateActorRuntimeNetworkRequest"; -export * from "./CreateActorNetworkRequest"; -export * from "./CreateActorPortRequest"; export * from "./CreateActorResponse"; export * from "./DestroyActorResponse"; export * from "./UpgradeActorRequest"; diff --git a/sdks/api/full/typescript/src/api/resources/builds/client/Client.ts b/sdks/api/full/typescript/src/api/resources/builds/client/Client.ts index 0e1d267eae..696f665640 100644 --- a/sdks/api/full/typescript/src/api/resources/builds/client/Client.ts +++ b/sdks/api/full/typescript/src/api/resources/builds/client/Client.ts @@ -530,15 +530,22 @@ export class Builds { * }, * kind: "docker_image", * compression: "none", - * allocation: { - * single: {}, - * multi: { + * runtime: { + * container: { + * environment: undefined, + * networkMode: undefined, + * ports: undefined + * }, + * actor: { + * environment: undefined, + * networkMode: undefined, + * ports: undefined, + * resources: { + * cpu: 1, + * memory: 1 + * }, * slots: 1 * } - * }, - * resources: { - * cpu: 1, - * memory: 1 * } * } * }) diff --git a/sdks/api/full/typescript/src/api/resources/builds/client/requests/PrepareBuildRequestQuery.ts b/sdks/api/full/typescript/src/api/resources/builds/client/requests/PrepareBuildRequestQuery.ts index 2c1689af33..735113f750 100644 --- a/sdks/api/full/typescript/src/api/resources/builds/client/requests/PrepareBuildRequestQuery.ts +++ b/sdks/api/full/typescript/src/api/resources/builds/client/requests/PrepareBuildRequestQuery.ts @@ -18,15 +18,22 @@ import * as Rivet from "../../../../index"; * }, * kind: "docker_image", * compression: "none", - * allocation: { - * single: {}, - * multi: { + * runtime: { + * container: { + * environment: undefined, + * networkMode: undefined, + * ports: undefined + * }, + * actor: { + * environment: undefined, + * networkMode: undefined, + * ports: undefined, + * resources: { + * cpu: 1, + * memory: 1 + * }, * slots: 1 * } - * }, - * resources: { - * cpu: 1, - * memory: 1 * } * } * } diff --git a/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/Allocation.ts b/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/Allocation.ts deleted file mode 100644 index c6029fbc0d..0000000000 --- a/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/Allocation.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../../../index"; - -export interface Allocation { - single?: Rivet.builds.AllocationSingle; - multi?: Rivet.builds.AllocationMulti; -} diff --git a/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/AllocationMulti.ts b/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/AllocationMulti.ts deleted file mode 100644 index b09f4586d4..0000000000 --- a/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/AllocationMulti.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export interface AllocationMulti { - slots: number; -} diff --git a/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/AllocationSingle.ts b/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/AllocationSingle.ts deleted file mode 100644 index 4a9f426a0b..0000000000 --- a/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/AllocationSingle.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export interface AllocationSingle {} diff --git a/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/Build.ts b/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/Build.ts index e3f9dcbe8f..1de126d5e3 100644 --- a/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/Build.ts +++ b/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/Build.ts @@ -10,8 +10,7 @@ export interface Build { createdAt: Rivet.Timestamp; /** Unsigned 64 bit integer. */ contentLength: number; - allocation?: Rivet.builds.Allocation; - resources?: Rivet.builds.Resources; /** Tags of this build */ tags: Record; + runtime?: Rivet.builds.Runtime; } diff --git a/sdks/api/full/typescript/src/api/resources/actors/resources/common/types/GuardRouting.ts b/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/GuardRouting.ts similarity index 100% rename from sdks/api/full/typescript/src/api/resources/actors/resources/common/types/GuardRouting.ts rename to sdks/api/full/typescript/src/api/resources/builds/resources/common/types/GuardRouting.ts diff --git a/sdks/api/full/typescript/src/api/resources/actors/resources/common/types/HostRouting.ts b/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/HostRouting.ts similarity index 100% rename from sdks/api/full/typescript/src/api/resources/actors/resources/common/types/HostRouting.ts rename to sdks/api/full/typescript/src/api/resources/builds/resources/common/types/HostRouting.ts diff --git a/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/Kind.ts b/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/Kind.ts index 6beda3d32f..6e07cb9a8a 100644 --- a/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/Kind.ts +++ b/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/Kind.ts @@ -10,6 +10,7 @@ export type Kind = * OCI-compliant bundle. */ | "oci_bundle" /** + * **Deprecated** * A JavaScript file. */ | "javascript"; export const Kind = { diff --git a/sdks/api/full/typescript/src/api/resources/actors/resources/common/types/NetworkMode.ts b/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/NetworkMode.ts similarity index 100% rename from sdks/api/full/typescript/src/api/resources/actors/resources/common/types/NetworkMode.ts rename to sdks/api/full/typescript/src/api/resources/builds/resources/common/types/NetworkMode.ts diff --git a/sdks/api/full/typescript/src/api/resources/actors/resources/common/types/PortProtocol.ts b/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/PortProtocol.ts similarity index 100% rename from sdks/api/full/typescript/src/api/resources/actors/resources/common/types/PortProtocol.ts rename to sdks/api/full/typescript/src/api/resources/builds/resources/common/types/PortProtocol.ts diff --git a/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/PortRequest.ts b/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/PortRequest.ts new file mode 100644 index 0000000000..b1b06ef9ff --- /dev/null +++ b/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/PortRequest.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Rivet from "../../../../../index"; + +export interface PortRequest { + protocol: Rivet.builds.PortProtocol; + internalPort?: number; + routing?: Rivet.builds.PortRouting; +} diff --git a/sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/PortRouting.ts b/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/PortRouting.ts similarity index 67% rename from sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/PortRouting.ts rename to sdks/api/full/typescript/src/api/resources/builds/resources/common/types/PortRouting.ts index b7bfa3ed8f..6732079ba6 100644 --- a/sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/PortRouting.ts +++ b/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/PortRouting.ts @@ -5,6 +5,6 @@ import * as Rivet from "../../../../../index"; export interface PortRouting { - guard?: Rivet.actors.GuardRouting; - host?: Rivet.actors.HostRouting; + guard?: Rivet.builds.GuardRouting; + host?: Rivet.builds.HostRouting; } diff --git a/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/Resources.ts b/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/Resources.ts index 8255dc6705..230c0cadd5 100644 --- a/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/Resources.ts +++ b/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/Resources.ts @@ -9,6 +9,6 @@ export interface Resources { * millicores. */ cpu: number; - /** The amount of memory in megabytes */ + /** The amount of memory in mebibytes */ memory: number; } diff --git a/sdks/api/full/typescript/src/api/resources/actors/resources/common/types/Network.ts b/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/Runtime.ts similarity index 52% rename from sdks/api/full/typescript/src/api/resources/actors/resources/common/types/Network.ts rename to sdks/api/full/typescript/src/api/resources/builds/resources/common/types/Runtime.ts index a760bf0314..4a137d379a 100644 --- a/sdks/api/full/typescript/src/api/resources/actors/resources/common/types/Network.ts +++ b/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/Runtime.ts @@ -4,7 +4,7 @@ import * as Rivet from "../../../../../index"; -export interface Network { - mode: Rivet.actors.NetworkMode; - ports: Record; +export interface Runtime { + container?: Rivet.builds.RuntimeContainer; + actor?: Rivet.builds.RuntimeActor; } diff --git a/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/RuntimeActor.ts b/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/RuntimeActor.ts new file mode 100644 index 0000000000..63e77ca6e0 --- /dev/null +++ b/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/RuntimeActor.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Rivet from "../../../../../index"; + +export interface RuntimeActor { + environment?: Record; + networkMode?: Rivet.builds.NetworkMode; + ports?: Record; + resources: Rivet.builds.Resources; + slots: number; +} diff --git a/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/RuntimeContainer.ts b/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/RuntimeContainer.ts new file mode 100644 index 0000000000..e379628461 --- /dev/null +++ b/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/RuntimeContainer.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Rivet from "../../../../../index"; + +export interface RuntimeContainer { + environment?: Record; + networkMode?: Rivet.builds.NetworkMode; + ports?: Record; +} diff --git a/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/index.ts b/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/index.ts index b71c7706dc..f8dfc5e0d2 100644 --- a/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/index.ts +++ b/sdks/api/full/typescript/src/api/resources/builds/resources/common/types/index.ts @@ -1,7 +1,13 @@ export * from "./Build"; export * from "./Kind"; export * from "./Compression"; -export * from "./Allocation"; -export * from "./AllocationSingle"; -export * from "./AllocationMulti"; +export * from "./Runtime"; +export * from "./RuntimeContainer"; +export * from "./RuntimeActor"; +export * from "./PortProtocol"; +export * from "./PortRouting"; +export * from "./GuardRouting"; +export * from "./HostRouting"; +export * from "./PortRequest"; export * from "./Resources"; +export * from "./NetworkMode"; diff --git a/sdks/api/full/typescript/src/api/resources/builds/types/PrepareBuildRequest.ts b/sdks/api/full/typescript/src/api/resources/builds/types/PrepareBuildRequest.ts index 0b479b5536..9cea1708d7 100644 --- a/sdks/api/full/typescript/src/api/resources/builds/types/PrepareBuildRequest.ts +++ b/sdks/api/full/typescript/src/api/resources/builds/types/PrepareBuildRequest.ts @@ -10,6 +10,5 @@ export interface PrepareBuildRequest { imageFile: Rivet.upload.PrepareFile; kind?: Rivet.builds.Kind; compression?: Rivet.builds.Compression; - allocation?: Rivet.builds.Allocation; - resources?: Rivet.builds.Resources; + runtime?: Rivet.builds.Runtime; } diff --git a/sdks/api/full/typescript/src/api/resources/containers/client/Client.ts b/sdks/api/full/typescript/src/api/resources/containers/client/Client.ts index 883a6bb63c..b0681a1d58 100644 --- a/sdks/api/full/typescript/src/api/resources/containers/client/Client.ts +++ b/sdks/api/full/typescript/src/api/resources/containers/client/Client.ts @@ -18,7 +18,7 @@ export declare namespace Containers { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the X-API-Version header */ - xApiVersion?: "25.5.0"; + xApiVersion?: "25.5.1"; fetcher?: core.FetchFunction; } @@ -32,7 +32,7 @@ export declare namespace Containers { /** Additional headers to include in the request. */ headers?: Record; /** Override the X-API-Version header */ - xApiVersion?: "25.5.0"; + xApiVersion?: "25.5.1"; } } @@ -103,7 +103,7 @@ export class Containers { headers: { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", - "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.0", + "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -276,7 +276,7 @@ export class Containers { headers: { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", - "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.0", + "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -410,25 +410,24 @@ export class Containers { * buildTags: { * "key": "value" * }, - * runtime: { - * environment: {}, - * network: { - * endpointType: "hostname" - * } + * environment: { + * "string": "string" * }, - * network: { - * mode: "bridge", - * ports: {}, - * waitReady: true + * networkEndpointType: "hostname", + * waitForNetworkReady: true, + * ports: { + * "string": { + * protocol: "http", + * internalPort: undefined, + * routing: undefined + * } * }, * resources: { * cpu: 1, * memory: 1 * }, - * lifecycle: { - * killTimeout: 1000000, - * durable: true - * } + * killTimeout: 1000000, + * durable: true * } * }) */ @@ -463,7 +462,7 @@ export class Containers { headers: { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", - "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.0", + "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -622,7 +621,7 @@ export class Containers { headers: { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", - "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.0", + "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -781,7 +780,7 @@ export class Containers { headers: { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", - "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.0", + "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -946,7 +945,7 @@ export class Containers { headers: { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", - "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.0", + "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/sdks/api/full/typescript/src/api/resources/containers/client/requests/CreateContainerRequestQuery.ts b/sdks/api/full/typescript/src/api/resources/containers/client/requests/CreateContainerRequestQuery.ts index 4cc48c6f03..50e672909b 100644 --- a/sdks/api/full/typescript/src/api/resources/containers/client/requests/CreateContainerRequestQuery.ts +++ b/sdks/api/full/typescript/src/api/resources/containers/client/requests/CreateContainerRequestQuery.ts @@ -19,25 +19,24 @@ import * as Rivet from "../../../../index"; * buildTags: { * "key": "value" * }, - * runtime: { - * environment: {}, - * network: { - * endpointType: "hostname" - * } + * environment: { + * "string": "string" * }, - * network: { - * mode: "bridge", - * ports: {}, - * waitReady: true + * networkEndpointType: "hostname", + * waitForNetworkReady: true, + * ports: { + * "string": { + * protocol: "http", + * internalPort: undefined, + * routing: undefined + * } * }, * resources: { * cpu: 1, * memory: 1 * }, - * lifecycle: { - * killTimeout: 1000000, - * durable: true - * } + * killTimeout: 1000000, + * durable: true * } * } */ diff --git a/sdks/api/full/typescript/src/api/resources/containers/resources/common/types/Container.ts b/sdks/api/full/typescript/src/api/resources/containers/resources/common/types/Container.ts index 3b8f94a422..98a21e9fa7 100644 --- a/sdks/api/full/typescript/src/api/resources/containers/resources/common/types/Container.ts +++ b/sdks/api/full/typescript/src/api/resources/containers/resources/common/types/Container.ts @@ -8,10 +8,15 @@ export interface Container { id: Rivet.Id; region: string; tags?: unknown; - runtime: Rivet.containers.Runtime; - network: Rivet.containers.Network; - resources: Rivet.containers.Resources; - lifecycle: Rivet.containers.Lifecycle; + build: string; + arguments?: string[]; + environment?: Record; + ports: Record; + resources: Rivet.builds.Resources; + /** The duration to wait for in milliseconds before force killing the actor after a DELETE request. This gives the actor time to perform a shutdown sequence before being killed. This should be set to a safe default, and can be overridden during a DELETE request if needed. */ + killTimeout?: number; + /** If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. */ + durable?: boolean; createdAt: Rivet.Timestamp; startedAt?: Rivet.Timestamp; destroyedAt?: Rivet.Timestamp; diff --git a/sdks/api/full/typescript/src/api/resources/containers/resources/common/types/Lifecycle.ts b/sdks/api/full/typescript/src/api/resources/containers/resources/common/types/Lifecycle.ts deleted file mode 100644 index e45d39b181..0000000000 --- a/sdks/api/full/typescript/src/api/resources/containers/resources/common/types/Lifecycle.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export interface Lifecycle { - /** The duration to wait for in milliseconds before killing the container. This should be set to a safe default, and can be overridden during a DELETE request if needed. */ - killTimeout?: number; - /** If true, the container will try to reschedule itself automatically in the event of a crash or a datacenter failover. The container will not reschedule if it exits successfully. */ - durable?: boolean; -} diff --git a/sdks/api/full/typescript/src/api/resources/containers/resources/common/types/Network.ts b/sdks/api/full/typescript/src/api/resources/containers/resources/common/types/Network.ts deleted file mode 100644 index 7bb456e91d..0000000000 --- a/sdks/api/full/typescript/src/api/resources/containers/resources/common/types/Network.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../../../index"; - -export interface Network { - mode: Rivet.containers.NetworkMode; - ports: Record; -} diff --git a/sdks/api/full/typescript/src/api/resources/containers/resources/common/types/Port.ts b/sdks/api/full/typescript/src/api/resources/containers/resources/common/types/Port.ts index 0fa9c5e224..af1cc8cf1a 100644 --- a/sdks/api/full/typescript/src/api/resources/containers/resources/common/types/Port.ts +++ b/sdks/api/full/typescript/src/api/resources/containers/resources/common/types/Port.ts @@ -5,12 +5,12 @@ import * as Rivet from "../../../../../index"; export interface Port { - protocol: Rivet.containers.PortProtocol; + protocol: Rivet.builds.PortProtocol; internalPort?: number; hostname?: string; port?: number; path?: string; /** Fully formed connection URL including protocol, hostname, port, and path, if applicable. */ url?: string; - routing: Rivet.containers.PortRouting; + routing: Rivet.builds.PortRouting; } diff --git a/sdks/api/full/typescript/src/api/resources/containers/resources/common/types/PortRouting.ts b/sdks/api/full/typescript/src/api/resources/containers/resources/common/types/PortRouting.ts deleted file mode 100644 index 6ec92a6d0a..0000000000 --- a/sdks/api/full/typescript/src/api/resources/containers/resources/common/types/PortRouting.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../../../index"; - -export interface PortRouting { - guard?: Rivet.containers.GuardRouting; - host?: Rivet.containers.HostRouting; -} diff --git a/sdks/api/full/typescript/src/api/resources/containers/resources/common/types/Resources.ts b/sdks/api/full/typescript/src/api/resources/containers/resources/common/types/Resources.ts deleted file mode 100644 index 8255dc6705..0000000000 --- a/sdks/api/full/typescript/src/api/resources/containers/resources/common/types/Resources.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export interface Resources { - /** - * The number of CPU cores in millicores, or 1/1000 of a core. For example, - * 1/8 of a core would be 125 millicores, and 1 core would be 1000 - * millicores. - */ - cpu: number; - /** The amount of memory in megabytes */ - memory: number; -} diff --git a/sdks/api/full/typescript/src/api/resources/containers/resources/common/types/Runtime.ts b/sdks/api/full/typescript/src/api/resources/containers/resources/common/types/Runtime.ts deleted file mode 100644 index a918ef8387..0000000000 --- a/sdks/api/full/typescript/src/api/resources/containers/resources/common/types/Runtime.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export interface Runtime { - build: string; - arguments?: string[]; - environment?: Record; -} diff --git a/sdks/api/full/typescript/src/api/resources/containers/resources/common/types/index.ts b/sdks/api/full/typescript/src/api/resources/containers/resources/common/types/index.ts index 634dcaff02..f9f014863f 100644 --- a/sdks/api/full/typescript/src/api/resources/containers/resources/common/types/index.ts +++ b/sdks/api/full/typescript/src/api/resources/containers/resources/common/types/index.ts @@ -1,12 +1,3 @@ export * from "./Container"; -export * from "./Runtime"; -export * from "./Lifecycle"; -export * from "./Resources"; -export * from "./Network"; -export * from "./NetworkMode"; export * from "./Port"; -export * from "./PortProtocol"; -export * from "./PortRouting"; -export * from "./GuardRouting"; -export * from "./HostRouting"; export * from "./EndpointType"; diff --git a/sdks/api/full/typescript/src/api/resources/containers/resources/logs/client/Client.ts b/sdks/api/full/typescript/src/api/resources/containers/resources/logs/client/Client.ts index d8ff58ebf2..23c3fb892b 100644 --- a/sdks/api/full/typescript/src/api/resources/containers/resources/logs/client/Client.ts +++ b/sdks/api/full/typescript/src/api/resources/containers/resources/logs/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace Logs { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the X-API-Version header */ - xApiVersion?: "25.5.0"; + xApiVersion?: "25.5.1"; fetcher?: core.FetchFunction; } @@ -30,7 +30,7 @@ export declare namespace Logs { /** Additional headers to include in the request. */ headers?: Record; /** Override the X-API-Version header */ - xApiVersion?: "25.5.0"; + xApiVersion?: "25.5.1"; } } @@ -116,7 +116,7 @@ export class Logs { headers: { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", - "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.0", + "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/sdks/api/full/typescript/src/api/resources/containers/resources/metrics/client/Client.ts b/sdks/api/full/typescript/src/api/resources/containers/resources/metrics/client/Client.ts index 9c02a77644..2d471c76a3 100644 --- a/sdks/api/full/typescript/src/api/resources/containers/resources/metrics/client/Client.ts +++ b/sdks/api/full/typescript/src/api/resources/containers/resources/metrics/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace Metrics { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the X-API-Version header */ - xApiVersion?: "25.5.0"; + xApiVersion?: "25.5.1"; fetcher?: core.FetchFunction; } @@ -30,7 +30,7 @@ export declare namespace Metrics { /** Additional headers to include in the request. */ headers?: Record; /** Override the X-API-Version header */ - xApiVersion?: "25.5.0"; + xApiVersion?: "25.5.1"; } } @@ -89,7 +89,7 @@ export class Metrics { headers: { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", - "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.0", + "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/sdks/api/full/typescript/src/api/resources/containers/types/CreateContainerNetworkRequest.ts b/sdks/api/full/typescript/src/api/resources/containers/types/CreateContainerNetworkRequest.ts deleted file mode 100644 index 928c65a843..0000000000 --- a/sdks/api/full/typescript/src/api/resources/containers/types/CreateContainerNetworkRequest.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../index"; - -export interface CreateContainerNetworkRequest { - mode?: Rivet.containers.NetworkMode; - ports?: Record; - waitReady?: boolean; -} diff --git a/sdks/api/full/typescript/src/api/resources/containers/types/CreateContainerPortRequest.ts b/sdks/api/full/typescript/src/api/resources/containers/types/CreateContainerPortRequest.ts deleted file mode 100644 index 5be8ff1e37..0000000000 --- a/sdks/api/full/typescript/src/api/resources/containers/types/CreateContainerPortRequest.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../index"; - -export interface CreateContainerPortRequest { - protocol: Rivet.containers.PortProtocol; - internalPort?: number; - routing?: Rivet.containers.PortRouting; -} diff --git a/sdks/api/full/typescript/src/api/resources/containers/types/CreateContainerRequest.ts b/sdks/api/full/typescript/src/api/resources/containers/types/CreateContainerRequest.ts index eacb98877b..65a05b80b3 100644 --- a/sdks/api/full/typescript/src/api/resources/containers/types/CreateContainerRequest.ts +++ b/sdks/api/full/typescript/src/api/resources/containers/types/CreateContainerRequest.ts @@ -9,8 +9,13 @@ export interface CreateContainerRequest { tags?: unknown; build?: string; buildTags?: unknown; - runtime?: Rivet.containers.CreateContainerRuntimeRequest; - network?: Rivet.containers.CreateContainerNetworkRequest; - resources: Rivet.containers.Resources; - lifecycle?: Rivet.containers.Lifecycle; + environment?: Record; + networkEndpointType?: Rivet.containers.EndpointType; + waitForNetworkReady?: boolean; + ports?: Record; + resources: Rivet.builds.Resources; + /** The duration to wait for in milliseconds before force killing the actor after a DELETE request. This gives the actor time to perform a shutdown sequence before being killed. This should be set to a safe default, and can be overridden during a DELETE request if needed. */ + killTimeout?: number; + /** If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. */ + durable?: boolean; } diff --git a/sdks/api/full/typescript/src/api/resources/containers/types/CreateContainerRuntimeNetworkRequest.ts b/sdks/api/full/typescript/src/api/resources/containers/types/CreateContainerRuntimeNetworkRequest.ts deleted file mode 100644 index 5d9748a261..0000000000 --- a/sdks/api/full/typescript/src/api/resources/containers/types/CreateContainerRuntimeNetworkRequest.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../index"; - -export interface CreateContainerRuntimeNetworkRequest { - endpointType: Rivet.containers.EndpointType; -} diff --git a/sdks/api/full/typescript/src/api/resources/containers/types/CreateContainerRuntimeRequest.ts b/sdks/api/full/typescript/src/api/resources/containers/types/CreateContainerRuntimeRequest.ts deleted file mode 100644 index a8589fcb6e..0000000000 --- a/sdks/api/full/typescript/src/api/resources/containers/types/CreateContainerRuntimeRequest.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../index"; - -export interface CreateContainerRuntimeRequest { - environment?: Record; - network?: Rivet.containers.CreateContainerRuntimeNetworkRequest; -} diff --git a/sdks/api/full/typescript/src/api/resources/containers/types/index.ts b/sdks/api/full/typescript/src/api/resources/containers/types/index.ts index 436ea216ac..46162ce204 100644 --- a/sdks/api/full/typescript/src/api/resources/containers/types/index.ts +++ b/sdks/api/full/typescript/src/api/resources/containers/types/index.ts @@ -1,9 +1,5 @@ export * from "./GetContainerResponse"; export * from "./CreateContainerRequest"; -export * from "./CreateContainerRuntimeRequest"; -export * from "./CreateContainerRuntimeNetworkRequest"; -export * from "./CreateContainerNetworkRequest"; -export * from "./CreateContainerPortRequest"; export * from "./CreateContainerResponse"; export * from "./DestroyContainerResponse"; export * from "./UpgradeContainerRequest"; diff --git a/sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/Actor.ts b/sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/Actor.ts index 0759888555..554714766f 100644 --- a/sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/Actor.ts +++ b/sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/Actor.ts @@ -6,9 +6,7 @@ import * as serializers from "../../../../../index"; import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; import { Id } from "../../../../common/types/Id"; -import { Runtime } from "./Runtime"; -import { Network } from "./Network"; -import { Lifecycle } from "./Lifecycle"; +import { Port } from "./Port"; import { Timestamp } from "../../../../common/types/Timestamp"; export const Actor: core.serialization.ObjectSchema = @@ -16,9 +14,10 @@ export const Actor: core.serialization.ObjectSchema; + kill_timeout?: number | null; + durable?: boolean | null; created_at: Timestamp.Raw; started_at?: Timestamp.Raw | null; destroyed_at?: Timestamp.Raw | null; diff --git a/sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/Lifecycle.ts b/sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/Lifecycle.ts deleted file mode 100644 index 3a46f9b098..0000000000 --- a/sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/Lifecycle.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; - -export const Lifecycle: core.serialization.ObjectSchema = - core.serialization.object({ - killTimeout: core.serialization.property("kill_timeout", core.serialization.number().optional()), - durable: core.serialization.boolean().optional(), - }); - -export declare namespace Lifecycle { - export interface Raw { - kill_timeout?: number | null; - durable?: boolean | null; - } -} diff --git a/sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/Network.ts b/sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/Network.ts deleted file mode 100644 index d7a85b7dcf..0000000000 --- a/sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/Network.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; -import { NetworkMode } from "./NetworkMode"; -import { Port } from "./Port"; - -export const Network: core.serialization.ObjectSchema = - core.serialization.object({ - mode: NetworkMode, - ports: core.serialization.record(core.serialization.string(), Port), - }); - -export declare namespace Network { - export interface Raw { - mode: NetworkMode.Raw; - ports: Record; - } -} diff --git a/sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/Port.ts b/sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/Port.ts index cd5cba7b5f..9962f19b28 100644 --- a/sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/Port.ts +++ b/sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/Port.ts @@ -5,8 +5,8 @@ import * as serializers from "../../../../../index"; import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; -import { PortProtocol } from "./PortProtocol"; -import { PortRouting } from "./PortRouting"; +import { PortProtocol } from "../../../../builds/resources/common/types/PortProtocol"; +import { PortRouting } from "../../../../builds/resources/common/types/PortRouting"; export const Port: core.serialization.ObjectSchema = core.serialization.object({ diff --git a/sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/index.ts b/sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/index.ts index ced439f191..09dd4ed15b 100644 --- a/sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/index.ts +++ b/sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/index.ts @@ -1,11 +1,3 @@ export * from "./Actor"; -export * from "./Runtime"; -export * from "./Lifecycle"; -export * from "./Network"; -export * from "./NetworkMode"; export * from "./Port"; -export * from "./PortProtocol"; -export * from "./PortRouting"; -export * from "./GuardRouting"; -export * from "./HostRouting"; export * from "./EndpointType"; diff --git a/sdks/api/full/typescript/src/serialization/resources/actors/types/CreateActorNetworkRequest.ts b/sdks/api/full/typescript/src/serialization/resources/actors/types/CreateActorNetworkRequest.ts deleted file mode 100644 index 48a821fd65..0000000000 --- a/sdks/api/full/typescript/src/serialization/resources/actors/types/CreateActorNetworkRequest.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as Rivet from "../../../../api/index"; -import * as core from "../../../../core"; -import { NetworkMode } from "../resources/common/types/NetworkMode"; -import { CreateActorPortRequest } from "./CreateActorPortRequest"; - -export const CreateActorNetworkRequest: core.serialization.ObjectSchema< - serializers.actors.CreateActorNetworkRequest.Raw, - Rivet.actors.CreateActorNetworkRequest -> = core.serialization.object({ - mode: NetworkMode.optional(), - ports: core.serialization.record(core.serialization.string(), CreateActorPortRequest).optional(), - waitReady: core.serialization.property("wait_ready", core.serialization.boolean().optional()), -}); - -export declare namespace CreateActorNetworkRequest { - export interface Raw { - mode?: NetworkMode.Raw | null; - ports?: Record | null; - wait_ready?: boolean | null; - } -} diff --git a/sdks/api/full/typescript/src/serialization/resources/actors/types/CreateActorPortRequest.ts b/sdks/api/full/typescript/src/serialization/resources/actors/types/CreateActorPortRequest.ts deleted file mode 100644 index 591f359b52..0000000000 --- a/sdks/api/full/typescript/src/serialization/resources/actors/types/CreateActorPortRequest.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as Rivet from "../../../../api/index"; -import * as core from "../../../../core"; -import { PortProtocol } from "../resources/common/types/PortProtocol"; -import { PortRouting } from "../resources/common/types/PortRouting"; - -export const CreateActorPortRequest: core.serialization.ObjectSchema< - serializers.actors.CreateActorPortRequest.Raw, - Rivet.actors.CreateActorPortRequest -> = core.serialization.object({ - protocol: PortProtocol, - internalPort: core.serialization.property("internal_port", core.serialization.number().optional()), - routing: PortRouting.optional(), -}); - -export declare namespace CreateActorPortRequest { - export interface Raw { - protocol: PortProtocol.Raw; - internal_port?: number | null; - routing?: PortRouting.Raw | null; - } -} diff --git a/sdks/api/full/typescript/src/serialization/resources/actors/types/CreateActorRequest.ts b/sdks/api/full/typescript/src/serialization/resources/actors/types/CreateActorRequest.ts index 564b80275e..529cc59602 100644 --- a/sdks/api/full/typescript/src/serialization/resources/actors/types/CreateActorRequest.ts +++ b/sdks/api/full/typescript/src/serialization/resources/actors/types/CreateActorRequest.ts @@ -5,9 +5,7 @@ import * as serializers from "../../../index"; import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; -import { CreateActorRuntimeRequest } from "./CreateActorRuntimeRequest"; -import { CreateActorNetworkRequest } from "./CreateActorNetworkRequest"; -import { Lifecycle } from "../resources/common/types/Lifecycle"; +import { EndpointType } from "../resources/common/types/EndpointType"; export const CreateActorRequest: core.serialization.ObjectSchema< serializers.actors.CreateActorRequest.Raw, @@ -17,9 +15,10 @@ export const CreateActorRequest: core.serialization.ObjectSchema< tags: core.serialization.unknown(), build: core.serialization.string().optional(), buildTags: core.serialization.property("build_tags", core.serialization.unknown().optional()), - runtime: CreateActorRuntimeRequest.optional(), - network: CreateActorNetworkRequest.optional(), - lifecycle: Lifecycle.optional(), + networkEndpointType: core.serialization.property("network_endpoint_type", EndpointType.optional()), + waitForNetworkReady: core.serialization.property("wait_for_network_ready", core.serialization.boolean().optional()), + killTimeout: core.serialization.property("kill_timeout", core.serialization.number().optional()), + durable: core.serialization.boolean().optional(), }); export declare namespace CreateActorRequest { @@ -28,8 +27,9 @@ export declare namespace CreateActorRequest { tags?: unknown; build?: string | null; build_tags?: unknown | null; - runtime?: CreateActorRuntimeRequest.Raw | null; - network?: CreateActorNetworkRequest.Raw | null; - lifecycle?: Lifecycle.Raw | null; + network_endpoint_type?: EndpointType.Raw | null; + wait_for_network_ready?: boolean | null; + kill_timeout?: number | null; + durable?: boolean | null; } } diff --git a/sdks/api/full/typescript/src/serialization/resources/actors/types/CreateActorRuntimeNetworkRequest.ts b/sdks/api/full/typescript/src/serialization/resources/actors/types/CreateActorRuntimeNetworkRequest.ts deleted file mode 100644 index 8877b07909..0000000000 --- a/sdks/api/full/typescript/src/serialization/resources/actors/types/CreateActorRuntimeNetworkRequest.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as Rivet from "../../../../api/index"; -import * as core from "../../../../core"; -import { EndpointType } from "../resources/common/types/EndpointType"; - -export const CreateActorRuntimeNetworkRequest: core.serialization.ObjectSchema< - serializers.actors.CreateActorRuntimeNetworkRequest.Raw, - Rivet.actors.CreateActorRuntimeNetworkRequest -> = core.serialization.object({ - endpointType: core.serialization.property("endpoint_type", EndpointType), -}); - -export declare namespace CreateActorRuntimeNetworkRequest { - export interface Raw { - endpoint_type: EndpointType.Raw; - } -} diff --git a/sdks/api/full/typescript/src/serialization/resources/actors/types/CreateActorRuntimeRequest.ts b/sdks/api/full/typescript/src/serialization/resources/actors/types/CreateActorRuntimeRequest.ts deleted file mode 100644 index 6ebae952c9..0000000000 --- a/sdks/api/full/typescript/src/serialization/resources/actors/types/CreateActorRuntimeRequest.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as Rivet from "../../../../api/index"; -import * as core from "../../../../core"; -import { CreateActorRuntimeNetworkRequest } from "./CreateActorRuntimeNetworkRequest"; - -export const CreateActorRuntimeRequest: core.serialization.ObjectSchema< - serializers.actors.CreateActorRuntimeRequest.Raw, - Rivet.actors.CreateActorRuntimeRequest -> = core.serialization.object({ - environment: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(), - network: CreateActorRuntimeNetworkRequest.optional(), -}); - -export declare namespace CreateActorRuntimeRequest { - export interface Raw { - environment?: Record | null; - network?: CreateActorRuntimeNetworkRequest.Raw | null; - } -} diff --git a/sdks/api/full/typescript/src/serialization/resources/actors/types/index.ts b/sdks/api/full/typescript/src/serialization/resources/actors/types/index.ts index 785b43b9fd..830fb6ec41 100644 --- a/sdks/api/full/typescript/src/serialization/resources/actors/types/index.ts +++ b/sdks/api/full/typescript/src/serialization/resources/actors/types/index.ts @@ -1,9 +1,5 @@ export * from "./GetActorResponse"; export * from "./CreateActorRequest"; -export * from "./CreateActorRuntimeRequest"; -export * from "./CreateActorRuntimeNetworkRequest"; -export * from "./CreateActorNetworkRequest"; -export * from "./CreateActorPortRequest"; export * from "./CreateActorResponse"; export * from "./DestroyActorResponse"; export * from "./UpgradeActorRequest"; diff --git a/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/Allocation.ts b/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/Allocation.ts deleted file mode 100644 index 48012b0cb5..0000000000 --- a/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/Allocation.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; -import { AllocationSingle } from "./AllocationSingle"; -import { AllocationMulti } from "./AllocationMulti"; - -export const Allocation: core.serialization.ObjectSchema = - core.serialization.object({ - single: AllocationSingle.optional(), - multi: AllocationMulti.optional(), - }); - -export declare namespace Allocation { - export interface Raw { - single?: AllocationSingle.Raw | null; - multi?: AllocationMulti.Raw | null; - } -} diff --git a/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/AllocationMulti.ts b/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/AllocationMulti.ts deleted file mode 100644 index fd44fef322..0000000000 --- a/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/AllocationMulti.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; - -export const AllocationMulti: core.serialization.ObjectSchema< - serializers.builds.AllocationMulti.Raw, - Rivet.builds.AllocationMulti -> = core.serialization.object({ - slots: core.serialization.number(), -}); - -export declare namespace AllocationMulti { - export interface Raw { - slots: number; - } -} diff --git a/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/AllocationSingle.ts b/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/AllocationSingle.ts deleted file mode 100644 index b27fd90845..0000000000 --- a/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/AllocationSingle.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; - -export const AllocationSingle: core.serialization.ObjectSchema< - serializers.builds.AllocationSingle.Raw, - Rivet.builds.AllocationSingle -> = core.serialization.object({}); - -export declare namespace AllocationSingle { - export interface Raw {} -} diff --git a/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/Build.ts b/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/Build.ts index 13147b3c66..25d2738bf2 100644 --- a/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/Build.ts +++ b/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/Build.ts @@ -6,8 +6,7 @@ import * as serializers from "../../../../../index"; import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; import { Timestamp } from "../../../../common/types/Timestamp"; -import { Allocation } from "./Allocation"; -import { Resources } from "./Resources"; +import { Runtime } from "./Runtime"; export const Build: core.serialization.ObjectSchema = core.serialization.object({ @@ -15,9 +14,8 @@ export const Build: core.serialization.ObjectSchema; + runtime?: Runtime.Raw | null; } } diff --git a/sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/GuardRouting.ts b/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/GuardRouting.ts similarity index 84% rename from sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/GuardRouting.ts rename to sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/GuardRouting.ts index c90dc72be1..c393cdd749 100644 --- a/sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/GuardRouting.ts +++ b/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/GuardRouting.ts @@ -7,8 +7,8 @@ import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const GuardRouting: core.serialization.ObjectSchema< - serializers.actors.GuardRouting.Raw, - Rivet.actors.GuardRouting + serializers.builds.GuardRouting.Raw, + Rivet.builds.GuardRouting > = core.serialization.object({}); export declare namespace GuardRouting { diff --git a/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/HostRouting.ts b/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/HostRouting.ts similarity index 85% rename from sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/HostRouting.ts rename to sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/HostRouting.ts index ea0be489e3..9d48327159 100644 --- a/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/HostRouting.ts +++ b/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/HostRouting.ts @@ -7,8 +7,8 @@ import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const HostRouting: core.serialization.ObjectSchema< - serializers.actors.HostRouting.Raw, - Rivet.actors.HostRouting + serializers.builds.HostRouting.Raw, + Rivet.builds.HostRouting > = core.serialization.object({}); export declare namespace HostRouting { diff --git a/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/NetworkMode.ts b/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/NetworkMode.ts similarity index 89% rename from sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/NetworkMode.ts rename to sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/NetworkMode.ts index 2acc209d87..74e5438844 100644 --- a/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/NetworkMode.ts +++ b/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/NetworkMode.ts @@ -6,7 +6,7 @@ import * as serializers from "../../../../../index"; import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; -export const NetworkMode: core.serialization.Schema = +export const NetworkMode: core.serialization.Schema = core.serialization.enum_(["bridge", "host"]); export declare namespace NetworkMode { diff --git a/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/PortProtocol.ts b/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/PortProtocol.ts similarity index 89% rename from sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/PortProtocol.ts rename to sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/PortProtocol.ts index d96849f568..5978fd2ecd 100644 --- a/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/PortProtocol.ts +++ b/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/PortProtocol.ts @@ -6,7 +6,7 @@ import * as serializers from "../../../../../index"; import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; -export const PortProtocol: core.serialization.Schema = +export const PortProtocol: core.serialization.Schema = core.serialization.enum_(["http", "https", "tcp", "tcp_tls", "udp"]); export declare namespace PortProtocol { diff --git a/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/PortRequest.ts b/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/PortRequest.ts new file mode 100644 index 0000000000..93326a6c6f --- /dev/null +++ b/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/PortRequest.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; +import * as core from "../../../../../../core"; +import { PortProtocol } from "./PortProtocol"; +import { PortRouting } from "./PortRouting"; + +export const PortRequest: core.serialization.ObjectSchema< + serializers.builds.PortRequest.Raw, + Rivet.builds.PortRequest +> = core.serialization.object({ + protocol: PortProtocol, + internalPort: core.serialization.property("internal_port", core.serialization.number().optional()), + routing: PortRouting.optional(), +}); + +export declare namespace PortRequest { + export interface Raw { + protocol: PortProtocol.Raw; + internal_port?: number | null; + routing?: PortRouting.Raw | null; + } +} diff --git a/sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/PortRouting.ts b/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/PortRouting.ts similarity index 90% rename from sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/PortRouting.ts rename to sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/PortRouting.ts index 7374da8309..4d720429e0 100644 --- a/sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/PortRouting.ts +++ b/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/PortRouting.ts @@ -9,8 +9,8 @@ import { GuardRouting } from "./GuardRouting"; import { HostRouting } from "./HostRouting"; export const PortRouting: core.serialization.ObjectSchema< - serializers.actors.PortRouting.Raw, - Rivet.actors.PortRouting + serializers.builds.PortRouting.Raw, + Rivet.builds.PortRouting > = core.serialization.object({ guard: GuardRouting.optional(), host: HostRouting.optional(), diff --git a/sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/Runtime.ts b/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/Runtime.ts similarity index 50% rename from sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/Runtime.ts rename to sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/Runtime.ts index 05b015eb05..1bed25e5ec 100644 --- a/sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/Runtime.ts +++ b/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/Runtime.ts @@ -5,18 +5,18 @@ import * as serializers from "../../../../../index"; import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { RuntimeContainer } from "./RuntimeContainer"; +import { RuntimeActor } from "./RuntimeActor"; -export const Runtime: core.serialization.ObjectSchema = +export const Runtime: core.serialization.ObjectSchema = core.serialization.object({ - build: core.serialization.string(), - arguments: core.serialization.list(core.serialization.string()).optional(), - environment: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(), + container: RuntimeContainer.optional(), + actor: RuntimeActor.optional(), }); export declare namespace Runtime { export interface Raw { - build: string; - arguments?: string[] | null; - environment?: Record | null; + container?: RuntimeContainer.Raw | null; + actor?: RuntimeActor.Raw | null; } } diff --git a/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/RuntimeActor.ts b/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/RuntimeActor.ts new file mode 100644 index 0000000000..55bdd695d3 --- /dev/null +++ b/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/RuntimeActor.ts @@ -0,0 +1,31 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; +import * as core from "../../../../../../core"; +import { NetworkMode } from "./NetworkMode"; +import { PortRequest } from "./PortRequest"; +import { Resources } from "./Resources"; + +export const RuntimeActor: core.serialization.ObjectSchema< + serializers.builds.RuntimeActor.Raw, + Rivet.builds.RuntimeActor +> = core.serialization.object({ + environment: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(), + networkMode: core.serialization.property("network_mode", NetworkMode.optional()), + ports: core.serialization.record(core.serialization.string(), PortRequest).optional(), + resources: Resources, + slots: core.serialization.number(), +}); + +export declare namespace RuntimeActor { + export interface Raw { + environment?: Record | null; + network_mode?: NetworkMode.Raw | null; + ports?: Record | null; + resources: Resources.Raw; + slots: number; + } +} diff --git a/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/RuntimeContainer.ts b/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/RuntimeContainer.ts new file mode 100644 index 0000000000..aa7a450b63 --- /dev/null +++ b/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/RuntimeContainer.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; +import * as core from "../../../../../../core"; +import { NetworkMode } from "./NetworkMode"; +import { PortRequest } from "./PortRequest"; + +export const RuntimeContainer: core.serialization.ObjectSchema< + serializers.builds.RuntimeContainer.Raw, + Rivet.builds.RuntimeContainer +> = core.serialization.object({ + environment: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(), + networkMode: core.serialization.property("network_mode", NetworkMode.optional()), + ports: core.serialization.record(core.serialization.string(), PortRequest).optional(), +}); + +export declare namespace RuntimeContainer { + export interface Raw { + environment?: Record | null; + network_mode?: NetworkMode.Raw | null; + ports?: Record | null; + } +} diff --git a/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/index.ts b/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/index.ts index b71c7706dc..f8dfc5e0d2 100644 --- a/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/index.ts +++ b/sdks/api/full/typescript/src/serialization/resources/builds/resources/common/types/index.ts @@ -1,7 +1,13 @@ export * from "./Build"; export * from "./Kind"; export * from "./Compression"; -export * from "./Allocation"; -export * from "./AllocationSingle"; -export * from "./AllocationMulti"; +export * from "./Runtime"; +export * from "./RuntimeContainer"; +export * from "./RuntimeActor"; +export * from "./PortProtocol"; +export * from "./PortRouting"; +export * from "./GuardRouting"; +export * from "./HostRouting"; +export * from "./PortRequest"; export * from "./Resources"; +export * from "./NetworkMode"; diff --git a/sdks/api/full/typescript/src/serialization/resources/builds/types/PrepareBuildRequest.ts b/sdks/api/full/typescript/src/serialization/resources/builds/types/PrepareBuildRequest.ts index c7416df518..1492968e86 100644 --- a/sdks/api/full/typescript/src/serialization/resources/builds/types/PrepareBuildRequest.ts +++ b/sdks/api/full/typescript/src/serialization/resources/builds/types/PrepareBuildRequest.ts @@ -8,8 +8,7 @@ import * as core from "../../../../core"; import { PrepareFile } from "../../upload/resources/common/types/PrepareFile"; import { Kind } from "../resources/common/types/Kind"; import { Compression } from "../resources/common/types/Compression"; -import { Allocation } from "../resources/common/types/Allocation"; -import { Resources } from "../resources/common/types/Resources"; +import { Runtime } from "../resources/common/types/Runtime"; export const PrepareBuildRequest: core.serialization.ObjectSchema< serializers.builds.PrepareBuildRequest.Raw, @@ -19,8 +18,7 @@ export const PrepareBuildRequest: core.serialization.ObjectSchema< imageFile: core.serialization.property("image_file", PrepareFile), kind: Kind.optional(), compression: Compression.optional(), - allocation: Allocation.optional(), - resources: Resources.optional(), + runtime: Runtime.optional(), }); export declare namespace PrepareBuildRequest { @@ -29,7 +27,6 @@ export declare namespace PrepareBuildRequest { image_file: PrepareFile.Raw; kind?: Kind.Raw | null; compression?: Compression.Raw | null; - allocation?: Allocation.Raw | null; - resources?: Resources.Raw | null; + runtime?: Runtime.Raw | null; } } diff --git a/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/Container.ts b/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/Container.ts index 003549295d..4f01c760bb 100644 --- a/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/Container.ts +++ b/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/Container.ts @@ -6,10 +6,8 @@ import * as serializers from "../../../../../index"; import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; import { Id } from "../../../../common/types/Id"; -import { Runtime } from "./Runtime"; -import { Network } from "./Network"; -import { Resources } from "./Resources"; -import { Lifecycle } from "./Lifecycle"; +import { Port } from "./Port"; +import { Resources } from "../../../../builds/resources/common/types/Resources"; import { Timestamp } from "../../../../common/types/Timestamp"; export const Container: core.serialization.ObjectSchema< @@ -19,10 +17,13 @@ export const Container: core.serialization.ObjectSchema< id: Id, region: core.serialization.string(), tags: core.serialization.unknown(), - runtime: Runtime, - network: Network, + build: core.serialization.string(), + arguments: core.serialization.list(core.serialization.string()).optional(), + environment: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(), + ports: core.serialization.record(core.serialization.string(), Port), resources: Resources, - lifecycle: Lifecycle, + killTimeout: core.serialization.property("kill_timeout", core.serialization.number().optional()), + durable: core.serialization.boolean().optional(), createdAt: core.serialization.property("created_at", Timestamp), startedAt: core.serialization.property("started_at", Timestamp.optional()), destroyedAt: core.serialization.property("destroyed_at", Timestamp.optional()), @@ -33,10 +34,13 @@ export declare namespace Container { id: Id.Raw; region: string; tags?: unknown; - runtime: Runtime.Raw; - network: Network.Raw; + build: string; + arguments?: string[] | null; + environment?: Record | null; + ports: Record; resources: Resources.Raw; - lifecycle: Lifecycle.Raw; + kill_timeout?: number | null; + durable?: boolean | null; created_at: Timestamp.Raw; started_at?: Timestamp.Raw | null; destroyed_at?: Timestamp.Raw | null; diff --git a/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/GuardRouting.ts b/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/GuardRouting.ts deleted file mode 100644 index 19859fe146..0000000000 --- a/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/GuardRouting.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; - -export const GuardRouting: core.serialization.ObjectSchema< - serializers.containers.GuardRouting.Raw, - Rivet.containers.GuardRouting -> = core.serialization.object({}); - -export declare namespace GuardRouting { - export interface Raw {} -} diff --git a/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/HostRouting.ts b/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/HostRouting.ts deleted file mode 100644 index 7af0c934be..0000000000 --- a/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/HostRouting.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; - -export const HostRouting: core.serialization.ObjectSchema< - serializers.containers.HostRouting.Raw, - Rivet.containers.HostRouting -> = core.serialization.object({}); - -export declare namespace HostRouting { - export interface Raw {} -} diff --git a/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/Lifecycle.ts b/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/Lifecycle.ts deleted file mode 100644 index dfce2b7327..0000000000 --- a/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/Lifecycle.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; - -export const Lifecycle: core.serialization.ObjectSchema< - serializers.containers.Lifecycle.Raw, - Rivet.containers.Lifecycle -> = core.serialization.object({ - killTimeout: core.serialization.property("kill_timeout", core.serialization.number().optional()), - durable: core.serialization.boolean().optional(), -}); - -export declare namespace Lifecycle { - export interface Raw { - kill_timeout?: number | null; - durable?: boolean | null; - } -} diff --git a/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/Network.ts b/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/Network.ts deleted file mode 100644 index 8e4600735c..0000000000 --- a/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/Network.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; -import { NetworkMode } from "./NetworkMode"; -import { Port } from "./Port"; - -export const Network: core.serialization.ObjectSchema = - core.serialization.object({ - mode: NetworkMode, - ports: core.serialization.record(core.serialization.string(), Port), - }); - -export declare namespace Network { - export interface Raw { - mode: NetworkMode.Raw; - ports: Record; - } -} diff --git a/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/NetworkMode.ts b/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/NetworkMode.ts deleted file mode 100644 index 69d5581298..0000000000 --- a/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/NetworkMode.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; - -export const NetworkMode: core.serialization.Schema< - serializers.containers.NetworkMode.Raw, - Rivet.containers.NetworkMode -> = core.serialization.enum_(["bridge", "host"]); - -export declare namespace NetworkMode { - export type Raw = "bridge" | "host"; -} diff --git a/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/Port.ts b/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/Port.ts index 3c9cb6d654..aad8a34700 100644 --- a/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/Port.ts +++ b/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/Port.ts @@ -5,8 +5,8 @@ import * as serializers from "../../../../../index"; import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; -import { PortProtocol } from "./PortProtocol"; -import { PortRouting } from "./PortRouting"; +import { PortProtocol } from "../../../../builds/resources/common/types/PortProtocol"; +import { PortRouting } from "../../../../builds/resources/common/types/PortRouting"; export const Port: core.serialization.ObjectSchema = core.serialization.object({ diff --git a/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/PortProtocol.ts b/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/PortProtocol.ts deleted file mode 100644 index c45d0c9be2..0000000000 --- a/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/PortProtocol.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; - -export const PortProtocol: core.serialization.Schema< - serializers.containers.PortProtocol.Raw, - Rivet.containers.PortProtocol -> = core.serialization.enum_(["http", "https", "tcp", "tcp_tls", "udp"]); - -export declare namespace PortProtocol { - export type Raw = "http" | "https" | "tcp" | "tcp_tls" | "udp"; -} diff --git a/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/PortRouting.ts b/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/PortRouting.ts deleted file mode 100644 index e84aace739..0000000000 --- a/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/PortRouting.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; -import { GuardRouting } from "./GuardRouting"; -import { HostRouting } from "./HostRouting"; - -export const PortRouting: core.serialization.ObjectSchema< - serializers.containers.PortRouting.Raw, - Rivet.containers.PortRouting -> = core.serialization.object({ - guard: GuardRouting.optional(), - host: HostRouting.optional(), -}); - -export declare namespace PortRouting { - export interface Raw { - guard?: GuardRouting.Raw | null; - host?: HostRouting.Raw | null; - } -} diff --git a/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/Resources.ts b/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/Resources.ts deleted file mode 100644 index f2cdd4f846..0000000000 --- a/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/Resources.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; - -export const Resources: core.serialization.ObjectSchema< - serializers.containers.Resources.Raw, - Rivet.containers.Resources -> = core.serialization.object({ - cpu: core.serialization.number(), - memory: core.serialization.number(), -}); - -export declare namespace Resources { - export interface Raw { - cpu: number; - memory: number; - } -} diff --git a/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/Runtime.ts b/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/Runtime.ts deleted file mode 100644 index 2966bdc0d1..0000000000 --- a/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/Runtime.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; - -export const Runtime: core.serialization.ObjectSchema = - core.serialization.object({ - build: core.serialization.string(), - arguments: core.serialization.list(core.serialization.string()).optional(), - environment: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(), - }); - -export declare namespace Runtime { - export interface Raw { - build: string; - arguments?: string[] | null; - environment?: Record | null; - } -} diff --git a/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/index.ts b/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/index.ts index 634dcaff02..f9f014863f 100644 --- a/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/index.ts +++ b/sdks/api/full/typescript/src/serialization/resources/containers/resources/common/types/index.ts @@ -1,12 +1,3 @@ export * from "./Container"; -export * from "./Runtime"; -export * from "./Lifecycle"; -export * from "./Resources"; -export * from "./Network"; -export * from "./NetworkMode"; export * from "./Port"; -export * from "./PortProtocol"; -export * from "./PortRouting"; -export * from "./GuardRouting"; -export * from "./HostRouting"; export * from "./EndpointType"; diff --git a/sdks/api/full/typescript/src/serialization/resources/containers/types/CreateContainerNetworkRequest.ts b/sdks/api/full/typescript/src/serialization/resources/containers/types/CreateContainerNetworkRequest.ts deleted file mode 100644 index 9da2cd4cc8..0000000000 --- a/sdks/api/full/typescript/src/serialization/resources/containers/types/CreateContainerNetworkRequest.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as Rivet from "../../../../api/index"; -import * as core from "../../../../core"; -import { NetworkMode } from "../resources/common/types/NetworkMode"; -import { CreateContainerPortRequest } from "./CreateContainerPortRequest"; - -export const CreateContainerNetworkRequest: core.serialization.ObjectSchema< - serializers.containers.CreateContainerNetworkRequest.Raw, - Rivet.containers.CreateContainerNetworkRequest -> = core.serialization.object({ - mode: NetworkMode.optional(), - ports: core.serialization.record(core.serialization.string(), CreateContainerPortRequest).optional(), - waitReady: core.serialization.property("wait_ready", core.serialization.boolean().optional()), -}); - -export declare namespace CreateContainerNetworkRequest { - export interface Raw { - mode?: NetworkMode.Raw | null; - ports?: Record | null; - wait_ready?: boolean | null; - } -} diff --git a/sdks/api/full/typescript/src/serialization/resources/containers/types/CreateContainerPortRequest.ts b/sdks/api/full/typescript/src/serialization/resources/containers/types/CreateContainerPortRequest.ts deleted file mode 100644 index 9016ed4e9f..0000000000 --- a/sdks/api/full/typescript/src/serialization/resources/containers/types/CreateContainerPortRequest.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as Rivet from "../../../../api/index"; -import * as core from "../../../../core"; -import { PortProtocol } from "../resources/common/types/PortProtocol"; -import { PortRouting } from "../resources/common/types/PortRouting"; - -export const CreateContainerPortRequest: core.serialization.ObjectSchema< - serializers.containers.CreateContainerPortRequest.Raw, - Rivet.containers.CreateContainerPortRequest -> = core.serialization.object({ - protocol: PortProtocol, - internalPort: core.serialization.property("internal_port", core.serialization.number().optional()), - routing: PortRouting.optional(), -}); - -export declare namespace CreateContainerPortRequest { - export interface Raw { - protocol: PortProtocol.Raw; - internal_port?: number | null; - routing?: PortRouting.Raw | null; - } -} diff --git a/sdks/api/full/typescript/src/serialization/resources/containers/types/CreateContainerRequest.ts b/sdks/api/full/typescript/src/serialization/resources/containers/types/CreateContainerRequest.ts index d929186141..fa626d423b 100644 --- a/sdks/api/full/typescript/src/serialization/resources/containers/types/CreateContainerRequest.ts +++ b/sdks/api/full/typescript/src/serialization/resources/containers/types/CreateContainerRequest.ts @@ -5,10 +5,9 @@ import * as serializers from "../../../index"; import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; -import { CreateContainerRuntimeRequest } from "./CreateContainerRuntimeRequest"; -import { CreateContainerNetworkRequest } from "./CreateContainerNetworkRequest"; -import { Resources } from "../resources/common/types/Resources"; -import { Lifecycle } from "../resources/common/types/Lifecycle"; +import { EndpointType } from "../resources/common/types/EndpointType"; +import { PortRequest } from "../../builds/resources/common/types/PortRequest"; +import { Resources } from "../../builds/resources/common/types/Resources"; export const CreateContainerRequest: core.serialization.ObjectSchema< serializers.containers.CreateContainerRequest.Raw, @@ -18,10 +17,13 @@ export const CreateContainerRequest: core.serialization.ObjectSchema< tags: core.serialization.unknown(), build: core.serialization.string().optional(), buildTags: core.serialization.property("build_tags", core.serialization.unknown().optional()), - runtime: CreateContainerRuntimeRequest.optional(), - network: CreateContainerNetworkRequest.optional(), + environment: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(), + networkEndpointType: core.serialization.property("network_endpoint_type", EndpointType.optional()), + waitForNetworkReady: core.serialization.property("wait_for_network_ready", core.serialization.boolean().optional()), + ports: core.serialization.record(core.serialization.string(), PortRequest).optional(), resources: Resources, - lifecycle: Lifecycle.optional(), + killTimeout: core.serialization.property("kill_timeout", core.serialization.number().optional()), + durable: core.serialization.boolean().optional(), }); export declare namespace CreateContainerRequest { @@ -30,9 +32,12 @@ export declare namespace CreateContainerRequest { tags?: unknown; build?: string | null; build_tags?: unknown | null; - runtime?: CreateContainerRuntimeRequest.Raw | null; - network?: CreateContainerNetworkRequest.Raw | null; + environment?: Record | null; + network_endpoint_type?: EndpointType.Raw | null; + wait_for_network_ready?: boolean | null; + ports?: Record | null; resources: Resources.Raw; - lifecycle?: Lifecycle.Raw | null; + kill_timeout?: number | null; + durable?: boolean | null; } } diff --git a/sdks/api/full/typescript/src/serialization/resources/containers/types/CreateContainerRuntimeNetworkRequest.ts b/sdks/api/full/typescript/src/serialization/resources/containers/types/CreateContainerRuntimeNetworkRequest.ts deleted file mode 100644 index adc30398c8..0000000000 --- a/sdks/api/full/typescript/src/serialization/resources/containers/types/CreateContainerRuntimeNetworkRequest.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as Rivet from "../../../../api/index"; -import * as core from "../../../../core"; -import { EndpointType } from "../resources/common/types/EndpointType"; - -export const CreateContainerRuntimeNetworkRequest: core.serialization.ObjectSchema< - serializers.containers.CreateContainerRuntimeNetworkRequest.Raw, - Rivet.containers.CreateContainerRuntimeNetworkRequest -> = core.serialization.object({ - endpointType: core.serialization.property("endpoint_type", EndpointType), -}); - -export declare namespace CreateContainerRuntimeNetworkRequest { - export interface Raw { - endpoint_type: EndpointType.Raw; - } -} diff --git a/sdks/api/full/typescript/src/serialization/resources/containers/types/CreateContainerRuntimeRequest.ts b/sdks/api/full/typescript/src/serialization/resources/containers/types/CreateContainerRuntimeRequest.ts deleted file mode 100644 index b4cd6b0c0e..0000000000 --- a/sdks/api/full/typescript/src/serialization/resources/containers/types/CreateContainerRuntimeRequest.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as Rivet from "../../../../api/index"; -import * as core from "../../../../core"; -import { CreateContainerRuntimeNetworkRequest } from "./CreateContainerRuntimeNetworkRequest"; - -export const CreateContainerRuntimeRequest: core.serialization.ObjectSchema< - serializers.containers.CreateContainerRuntimeRequest.Raw, - Rivet.containers.CreateContainerRuntimeRequest -> = core.serialization.object({ - environment: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(), - network: CreateContainerRuntimeNetworkRequest.optional(), -}); - -export declare namespace CreateContainerRuntimeRequest { - export interface Raw { - environment?: Record | null; - network?: CreateContainerRuntimeNetworkRequest.Raw | null; - } -} diff --git a/sdks/api/full/typescript/src/serialization/resources/containers/types/index.ts b/sdks/api/full/typescript/src/serialization/resources/containers/types/index.ts index 436ea216ac..46162ce204 100644 --- a/sdks/api/full/typescript/src/serialization/resources/containers/types/index.ts +++ b/sdks/api/full/typescript/src/serialization/resources/containers/types/index.ts @@ -1,9 +1,5 @@ export * from "./GetContainerResponse"; export * from "./CreateContainerRequest"; -export * from "./CreateContainerRuntimeRequest"; -export * from "./CreateContainerRuntimeNetworkRequest"; -export * from "./CreateContainerNetworkRequest"; -export * from "./CreateContainerPortRequest"; export * from "./CreateContainerResponse"; export * from "./DestroyContainerResponse"; export * from "./UpgradeContainerRequest"; diff --git a/sdks/api/runtime/go/actors/actors.go b/sdks/api/runtime/go/actors/actors.go index bab2fcb7b2..167c4f6ef1 100644 --- a/sdks/api/runtime/go/actors/actors.go +++ b/sdks/api/runtime/go/actors/actors.go @@ -11,13 +11,16 @@ import ( ) type CreateActorRequest struct { - Region *string `json:"region,omitempty"` - Tags interface{} `json:"tags,omitempty"` - Build *uuid.UUID `json:"build,omitempty"` - BuildTags interface{} `json:"build_tags,omitempty"` - Runtime *CreateActorRuntimeRequest `json:"runtime,omitempty"` - Network *CreateActorNetworkRequest `json:"network,omitempty"` - Lifecycle *Lifecycle `json:"lifecycle,omitempty"` + Region *string `json:"region,omitempty"` + Tags interface{} `json:"tags,omitempty"` + Build *uuid.UUID `json:"build,omitempty"` + BuildTags interface{} `json:"build_tags,omitempty"` + NetworkEndpointType *EndpointType `json:"network_endpoint_type,omitempty"` + WaitForNetworkReady *bool `json:"wait_for_network_ready,omitempty"` + // The duration to wait for in milliseconds before force killing the actor after a DELETE request. This gives the actor time to perform a shutdown sequence before being killed. This should be set to a safe default, and can be overridden during a DELETE request if needed. + KillTimeout *int64 `json:"kill_timeout,omitempty"` + // If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. + Durable *bool `json:"durable,omitempty"` _rawJSON json.RawMessage } diff --git a/sdks/api/runtime/go/actors/types.go b/sdks/api/runtime/go/actors/types.go index b5af2044e9..5907560fe1 100644 --- a/sdks/api/runtime/go/actors/types.go +++ b/sdks/api/runtime/go/actors/types.go @@ -7,6 +7,7 @@ import ( fmt "fmt" uuid "github.com/google/uuid" sdk "sdk" + builds "sdk/builds" core "sdk/core" ) @@ -62,12 +63,15 @@ type QueryActorsRequestQuery struct { } type Actor struct { - Id sdk.Id `json:"id"` - Region string `json:"region"` - Tags interface{} `json:"tags,omitempty"` - Runtime *Runtime `json:"runtime,omitempty"` - Network *Network `json:"network,omitempty"` - Lifecycle *Lifecycle `json:"lifecycle,omitempty"` + Id sdk.Id `json:"id"` + Region string `json:"region"` + Tags interface{} `json:"tags,omitempty"` + Build uuid.UUID `json:"build"` + Ports map[string]*Port `json:"ports,omitempty"` + // The duration to wait for in milliseconds before force killing the actor after a DELETE request. This gives the actor time to perform a shutdown sequence before being killed. This should be set to a safe default, and can be overridden during a DELETE request if needed. + KillTimeout *int64 `json:"kill_timeout,omitempty"` + // If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. + Durable *bool `json:"durable,omitempty"` CreatedAt sdk.Timestamp `json:"created_at"` StartedAt *sdk.Timestamp `json:"started_at,omitempty"` DestroyedAt *sdk.Timestamp `json:"destroyed_at,omitempty"` @@ -120,153 +124,15 @@ func (e EndpointType) Ptr() *EndpointType { return &e } -type GuardRouting struct { - _rawJSON json.RawMessage -} - -func (g *GuardRouting) UnmarshalJSON(data []byte) error { - type unmarshaler GuardRouting - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *g = GuardRouting(value) - g._rawJSON = json.RawMessage(data) - return nil -} - -func (g *GuardRouting) String() string { - if len(g._rawJSON) > 0 { - if value, err := core.StringifyJSON(g._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(g); err == nil { - return value - } - return fmt.Sprintf("%#v", g) -} - -type HostRouting struct { - _rawJSON json.RawMessage -} - -func (h *HostRouting) UnmarshalJSON(data []byte) error { - type unmarshaler HostRouting - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *h = HostRouting(value) - h._rawJSON = json.RawMessage(data) - return nil -} - -func (h *HostRouting) String() string { - if len(h._rawJSON) > 0 { - if value, err := core.StringifyJSON(h._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(h); err == nil { - return value - } - return fmt.Sprintf("%#v", h) -} - -type Lifecycle struct { - // The duration to wait for in milliseconds before killing the actor. This should be set to a safe default, and can be overridden during a DELETE request if needed. - KillTimeout *int64 `json:"kill_timeout,omitempty"` - // If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. - Durable *bool `json:"durable,omitempty"` - - _rawJSON json.RawMessage -} - -func (l *Lifecycle) UnmarshalJSON(data []byte) error { - type unmarshaler Lifecycle - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *l = Lifecycle(value) - l._rawJSON = json.RawMessage(data) - return nil -} - -func (l *Lifecycle) String() string { - if len(l._rawJSON) > 0 { - if value, err := core.StringifyJSON(l._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(l); err == nil { - return value - } - return fmt.Sprintf("%#v", l) -} - -type Network struct { - Mode NetworkMode `json:"mode,omitempty"` - Ports map[string]*Port `json:"ports,omitempty"` - - _rawJSON json.RawMessage -} - -func (n *Network) UnmarshalJSON(data []byte) error { - type unmarshaler Network - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *n = Network(value) - n._rawJSON = json.RawMessage(data) - return nil -} - -func (n *Network) String() string { - if len(n._rawJSON) > 0 { - if value, err := core.StringifyJSON(n._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(n); err == nil { - return value - } - return fmt.Sprintf("%#v", n) -} - -type NetworkMode string - -const ( - NetworkModeBridge NetworkMode = "bridge" - NetworkModeHost NetworkMode = "host" -) - -func NewNetworkModeFromString(s string) (NetworkMode, error) { - switch s { - case "bridge": - return NetworkModeBridge, nil - case "host": - return NetworkModeHost, nil - } - var t NetworkMode - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (n NetworkMode) Ptr() *NetworkMode { - return &n -} - type Port struct { - Protocol PortProtocol `json:"protocol,omitempty"` - InternalPort *int `json:"internal_port,omitempty"` - Hostname *string `json:"hostname,omitempty"` - Port *int `json:"port,omitempty"` - Path *string `json:"path,omitempty"` + Protocol builds.PortProtocol `json:"protocol,omitempty"` + InternalPort *int `json:"internal_port,omitempty"` + Hostname *string `json:"hostname,omitempty"` + Port *int `json:"port,omitempty"` + Path *string `json:"path,omitempty"` // Fully formed connection URL including protocol, hostname, port, and path, if applicable. - Url *string `json:"url,omitempty"` - Routing *PortRouting `json:"routing,omitempty"` + Url *string `json:"url,omitempty"` + Routing *builds.PortRouting `json:"routing,omitempty"` _rawJSON json.RawMessage } @@ -294,219 +160,6 @@ func (p *Port) String() string { return fmt.Sprintf("%#v", p) } -type PortProtocol string - -const ( - PortProtocolHttp PortProtocol = "http" - PortProtocolHttps PortProtocol = "https" - PortProtocolTcp PortProtocol = "tcp" - PortProtocolTcpTls PortProtocol = "tcp_tls" - PortProtocolUdp PortProtocol = "udp" -) - -func NewPortProtocolFromString(s string) (PortProtocol, error) { - switch s { - case "http": - return PortProtocolHttp, nil - case "https": - return PortProtocolHttps, nil - case "tcp": - return PortProtocolTcp, nil - case "tcp_tls": - return PortProtocolTcpTls, nil - case "udp": - return PortProtocolUdp, nil - } - var t PortProtocol - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (p PortProtocol) Ptr() *PortProtocol { - return &p -} - -type PortRouting struct { - Guard *GuardRouting `json:"guard,omitempty"` - Host *HostRouting `json:"host,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PortRouting) UnmarshalJSON(data []byte) error { - type unmarshaler PortRouting - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PortRouting(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PortRouting) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -type Runtime struct { - Build uuid.UUID `json:"build"` - Arguments []string `json:"arguments,omitempty"` - Environment map[string]string `json:"environment,omitempty"` - - _rawJSON json.RawMessage -} - -func (r *Runtime) UnmarshalJSON(data []byte) error { - type unmarshaler Runtime - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *r = Runtime(value) - r._rawJSON = json.RawMessage(data) - return nil -} - -func (r *Runtime) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(r); err == nil { - return value - } - return fmt.Sprintf("%#v", r) -} - -type CreateActorNetworkRequest struct { - Mode *NetworkMode `json:"mode,omitempty"` - Ports map[string]*CreateActorPortRequest `json:"ports,omitempty"` - WaitReady *bool `json:"wait_ready,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *CreateActorNetworkRequest) UnmarshalJSON(data []byte) error { - type unmarshaler CreateActorNetworkRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = CreateActorNetworkRequest(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *CreateActorNetworkRequest) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - -type CreateActorPortRequest struct { - Protocol PortProtocol `json:"protocol,omitempty"` - InternalPort *int `json:"internal_port,omitempty"` - Routing *PortRouting `json:"routing,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *CreateActorPortRequest) UnmarshalJSON(data []byte) error { - type unmarshaler CreateActorPortRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = CreateActorPortRequest(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *CreateActorPortRequest) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - -type CreateActorRuntimeNetworkRequest struct { - EndpointType EndpointType `json:"endpoint_type,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *CreateActorRuntimeNetworkRequest) UnmarshalJSON(data []byte) error { - type unmarshaler CreateActorRuntimeNetworkRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = CreateActorRuntimeNetworkRequest(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *CreateActorRuntimeNetworkRequest) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - -type CreateActorRuntimeRequest struct { - Environment map[string]string `json:"environment,omitempty"` - Network *CreateActorRuntimeNetworkRequest `json:"network,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *CreateActorRuntimeRequest) UnmarshalJSON(data []byte) error { - type unmarshaler CreateActorRuntimeRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = CreateActorRuntimeRequest(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *CreateActorRuntimeRequest) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - type UpgradeActorRequestQuery struct { Project *string `json:"-"` Environment *string `json:"-"` diff --git a/sdks/api/runtime/go/builds/builds.go b/sdks/api/runtime/go/builds/builds.go index d786388a22..51290a3081 100644 --- a/sdks/api/runtime/go/builds/builds.go +++ b/sdks/api/runtime/go/builds/builds.go @@ -134,8 +134,7 @@ type PrepareBuildRequest struct { ImageFile *upload.PrepareFile `json:"image_file,omitempty"` Kind *Kind `json:"kind,omitempty"` Compression *Compression `json:"compression,omitempty"` - Allocation *Allocation `json:"allocation,omitempty"` - Resources *Resources `json:"resources,omitempty"` + Runtime *Runtime `json:"runtime,omitempty"` _rawJSON json.RawMessage } diff --git a/sdks/api/runtime/go/builds/types.go b/sdks/api/runtime/go/builds/types.go index c9dfbdcb28..5236ab8af3 100644 --- a/sdks/api/runtime/go/builds/types.go +++ b/sdks/api/runtime/go/builds/types.go @@ -64,151 +64,118 @@ func (p *PrepareBuildRequestQuery) MarshalJSON() ([]byte, error) { return json.Marshal(p.Body) } -type Allocation struct { - Single *AllocationSingle `json:"single,omitempty"` - Multi *AllocationMulti `json:"multi,omitempty"` +type Build struct { + Id uuid.UUID `json:"id"` + Name string `json:"name"` + CreatedAt sdk.Timestamp `json:"created_at"` + // Unsigned 64 bit integer. + ContentLength int64 `json:"content_length"` + // Tags of this build + Tags map[string]string `json:"tags,omitempty"` + Runtime *Runtime `json:"runtime,omitempty"` _rawJSON json.RawMessage } -func (a *Allocation) UnmarshalJSON(data []byte) error { - type unmarshaler Allocation +func (b *Build) UnmarshalJSON(data []byte) error { + type unmarshaler Build var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *a = Allocation(value) - a._rawJSON = json.RawMessage(data) + *b = Build(value) + b._rawJSON = json.RawMessage(data) return nil } -func (a *Allocation) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { +func (b *Build) String() string { + if len(b._rawJSON) > 0 { + if value, err := core.StringifyJSON(b._rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(a); err == nil { + if value, err := core.StringifyJSON(b); err == nil { return value } - return fmt.Sprintf("%#v", a) + return fmt.Sprintf("%#v", b) } -type AllocationMulti struct { - Slots int `json:"slots"` +type Compression string - _rawJSON json.RawMessage -} +const ( + // None compression. + CompressionNone Compression = "none" + // LZ4 compression. Use the minimum compression level. + CompressionLz4 Compression = "lz4" +) -func (a *AllocationMulti) UnmarshalJSON(data []byte) error { - type unmarshaler AllocationMulti - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func NewCompressionFromString(s string) (Compression, error) { + switch s { + case "none": + return CompressionNone, nil + case "lz4": + return CompressionLz4, nil } - *a = AllocationMulti(value) - a._rawJSON = json.RawMessage(data) - return nil + var t Compression + return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (a *AllocationMulti) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value - } - return fmt.Sprintf("%#v", a) +func (c Compression) Ptr() *Compression { + return &c } -type AllocationSingle struct { +type GuardRouting struct { _rawJSON json.RawMessage } -func (a *AllocationSingle) UnmarshalJSON(data []byte) error { - type unmarshaler AllocationSingle +func (g *GuardRouting) UnmarshalJSON(data []byte) error { + type unmarshaler GuardRouting var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *a = AllocationSingle(value) - a._rawJSON = json.RawMessage(data) + *g = GuardRouting(value) + g._rawJSON = json.RawMessage(data) return nil } -func (a *AllocationSingle) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { +func (g *GuardRouting) String() string { + if len(g._rawJSON) > 0 { + if value, err := core.StringifyJSON(g._rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(a); err == nil { + if value, err := core.StringifyJSON(g); err == nil { return value } - return fmt.Sprintf("%#v", a) + return fmt.Sprintf("%#v", g) } -type Build struct { - Id uuid.UUID `json:"id"` - Name string `json:"name"` - CreatedAt sdk.Timestamp `json:"created_at"` - // Unsigned 64 bit integer. - ContentLength int64 `json:"content_length"` - Allocation *Allocation `json:"allocation,omitempty"` - Resources *Resources `json:"resources,omitempty"` - // Tags of this build - Tags map[string]string `json:"tags,omitempty"` - +type HostRouting struct { _rawJSON json.RawMessage } -func (b *Build) UnmarshalJSON(data []byte) error { - type unmarshaler Build +func (h *HostRouting) UnmarshalJSON(data []byte) error { + type unmarshaler HostRouting var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *b = Build(value) - b._rawJSON = json.RawMessage(data) + *h = HostRouting(value) + h._rawJSON = json.RawMessage(data) return nil } -func (b *Build) String() string { - if len(b._rawJSON) > 0 { - if value, err := core.StringifyJSON(b._rawJSON); err == nil { +func (h *HostRouting) String() string { + if len(h._rawJSON) > 0 { + if value, err := core.StringifyJSON(h._rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(b); err == nil { + if value, err := core.StringifyJSON(h); err == nil { return value } - return fmt.Sprintf("%#v", b) -} - -type Compression string - -const ( - // None compression. - CompressionNone Compression = "none" - // LZ4 compression. Use the minimum compression level. - CompressionLz4 Compression = "lz4" -) - -func NewCompressionFromString(s string) (Compression, error) { - switch s { - case "none": - return CompressionNone, nil - case "lz4": - return CompressionLz4, nil - } - var t Compression - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (c Compression) Ptr() *Compression { - return &c + return fmt.Sprintf("%#v", h) } type Kind string @@ -218,6 +185,7 @@ const ( KindDockerImage Kind = "docker_image" // OCI-compliant bundle. KindOciBundle Kind = "oci_bundle" + // **Deprecated** // A JavaScript file. KindJavascript Kind = "javascript" ) @@ -239,12 +207,126 @@ func (k Kind) Ptr() *Kind { return &k } +type NetworkMode string + +const ( + NetworkModeBridge NetworkMode = "bridge" + NetworkModeHost NetworkMode = "host" +) + +func NewNetworkModeFromString(s string) (NetworkMode, error) { + switch s { + case "bridge": + return NetworkModeBridge, nil + case "host": + return NetworkModeHost, nil + } + var t NetworkMode + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (n NetworkMode) Ptr() *NetworkMode { + return &n +} + +type PortProtocol string + +const ( + PortProtocolHttp PortProtocol = "http" + PortProtocolHttps PortProtocol = "https" + PortProtocolTcp PortProtocol = "tcp" + PortProtocolTcpTls PortProtocol = "tcp_tls" + PortProtocolUdp PortProtocol = "udp" +) + +func NewPortProtocolFromString(s string) (PortProtocol, error) { + switch s { + case "http": + return PortProtocolHttp, nil + case "https": + return PortProtocolHttps, nil + case "tcp": + return PortProtocolTcp, nil + case "tcp_tls": + return PortProtocolTcpTls, nil + case "udp": + return PortProtocolUdp, nil + } + var t PortProtocol + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (p PortProtocol) Ptr() *PortProtocol { + return &p +} + +type PortRequest struct { + Protocol PortProtocol `json:"protocol,omitempty"` + InternalPort *int `json:"internal_port,omitempty"` + Routing *PortRouting `json:"routing,omitempty"` + + _rawJSON json.RawMessage +} + +func (p *PortRequest) UnmarshalJSON(data []byte) error { + type unmarshaler PortRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PortRequest(value) + p._rawJSON = json.RawMessage(data) + return nil +} + +func (p *PortRequest) String() string { + if len(p._rawJSON) > 0 { + if value, err := core.StringifyJSON(p._rawJSON); err == nil { + return value + } + } + if value, err := core.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +type PortRouting struct { + Guard *GuardRouting `json:"guard,omitempty"` + Host *HostRouting `json:"host,omitempty"` + + _rawJSON json.RawMessage +} + +func (p *PortRouting) UnmarshalJSON(data []byte) error { + type unmarshaler PortRouting + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PortRouting(value) + p._rawJSON = json.RawMessage(data) + return nil +} + +func (p *PortRouting) String() string { + if len(p._rawJSON) > 0 { + if value, err := core.StringifyJSON(p._rawJSON); err == nil { + return value + } + } + if value, err := core.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + type Resources struct { // The number of CPU cores in millicores, or 1/1000 of a core. For example, // 1/8 of a core would be 125 millicores, and 1 core would be 1000 // millicores. Cpu int `json:"cpu"` - // The amount of memory in megabytes + // The amount of memory in mebibytes Memory int `json:"memory"` _rawJSON json.RawMessage @@ -272,3 +354,97 @@ func (r *Resources) String() string { } return fmt.Sprintf("%#v", r) } + +type Runtime struct { + Container *RuntimeContainer `json:"container,omitempty"` + Actor *RuntimeActor `json:"actor,omitempty"` + + _rawJSON json.RawMessage +} + +func (r *Runtime) UnmarshalJSON(data []byte) error { + type unmarshaler Runtime + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *r = Runtime(value) + r._rawJSON = json.RawMessage(data) + return nil +} + +func (r *Runtime) String() string { + if len(r._rawJSON) > 0 { + if value, err := core.StringifyJSON(r._rawJSON); err == nil { + return value + } + } + if value, err := core.StringifyJSON(r); err == nil { + return value + } + return fmt.Sprintf("%#v", r) +} + +type RuntimeActor struct { + Environment map[string]string `json:"environment,omitempty"` + NetworkMode *NetworkMode `json:"network_mode,omitempty"` + Ports map[string]*PortRequest `json:"ports,omitempty"` + Resources *Resources `json:"resources,omitempty"` + Slots int `json:"slots"` + + _rawJSON json.RawMessage +} + +func (r *RuntimeActor) UnmarshalJSON(data []byte) error { + type unmarshaler RuntimeActor + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *r = RuntimeActor(value) + r._rawJSON = json.RawMessage(data) + return nil +} + +func (r *RuntimeActor) String() string { + if len(r._rawJSON) > 0 { + if value, err := core.StringifyJSON(r._rawJSON); err == nil { + return value + } + } + if value, err := core.StringifyJSON(r); err == nil { + return value + } + return fmt.Sprintf("%#v", r) +} + +type RuntimeContainer struct { + Environment map[string]string `json:"environment,omitempty"` + NetworkMode *NetworkMode `json:"network_mode,omitempty"` + Ports map[string]*PortRequest `json:"ports,omitempty"` + + _rawJSON json.RawMessage +} + +func (r *RuntimeContainer) UnmarshalJSON(data []byte) error { + type unmarshaler RuntimeContainer + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *r = RuntimeContainer(value) + r._rawJSON = json.RawMessage(data) + return nil +} + +func (r *RuntimeContainer) String() string { + if len(r._rawJSON) > 0 { + if value, err := core.StringifyJSON(r._rawJSON); err == nil { + return value + } + } + if value, err := core.StringifyJSON(r); err == nil { + return value + } + return fmt.Sprintf("%#v", r) +} diff --git a/sdks/api/runtime/go/containers/containers.go b/sdks/api/runtime/go/containers/containers.go index 63b15b5a86..66336b7c67 100644 --- a/sdks/api/runtime/go/containers/containers.go +++ b/sdks/api/runtime/go/containers/containers.go @@ -7,18 +7,24 @@ import ( fmt "fmt" uuid "github.com/google/uuid" sdk "sdk" + builds "sdk/builds" core "sdk/core" ) type CreateContainerRequest struct { - Region *string `json:"region,omitempty"` - Tags interface{} `json:"tags,omitempty"` - Build *uuid.UUID `json:"build,omitempty"` - BuildTags interface{} `json:"build_tags,omitempty"` - Runtime *CreateContainerRuntimeRequest `json:"runtime,omitempty"` - Network *CreateContainerNetworkRequest `json:"network,omitempty"` - Resources *Resources `json:"resources,omitempty"` - Lifecycle *Lifecycle `json:"lifecycle,omitempty"` + Region *string `json:"region,omitempty"` + Tags interface{} `json:"tags,omitempty"` + Build *uuid.UUID `json:"build,omitempty"` + BuildTags interface{} `json:"build_tags,omitempty"` + Environment map[string]string `json:"environment,omitempty"` + NetworkEndpointType *EndpointType `json:"network_endpoint_type,omitempty"` + WaitForNetworkReady *bool `json:"wait_for_network_ready,omitempty"` + Ports map[string]*builds.PortRequest `json:"ports,omitempty"` + Resources *builds.Resources `json:"resources,omitempty"` + // The duration to wait for in milliseconds before force killing the actor after a DELETE request. This gives the actor time to perform a shutdown sequence before being killed. This should be set to a safe default, and can be overridden during a DELETE request if needed. + KillTimeout *int64 `json:"kill_timeout,omitempty"` + // If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. + Durable *bool `json:"durable,omitempty"` _rawJSON json.RawMessage } diff --git a/sdks/api/runtime/go/containers/types.go b/sdks/api/runtime/go/containers/types.go index 383dcf1cc9..1489cd0799 100644 --- a/sdks/api/runtime/go/containers/types.go +++ b/sdks/api/runtime/go/containers/types.go @@ -7,6 +7,7 @@ import ( fmt "fmt" uuid "github.com/google/uuid" sdk "sdk" + builds "sdk/builds" core "sdk/core" ) @@ -53,13 +54,18 @@ type GetContainersRequestQuery struct { } type Container struct { - Id sdk.Id `json:"id"` - Region string `json:"region"` - Tags interface{} `json:"tags,omitempty"` - Runtime *Runtime `json:"runtime,omitempty"` - Network *Network `json:"network,omitempty"` - Resources *Resources `json:"resources,omitempty"` - Lifecycle *Lifecycle `json:"lifecycle,omitempty"` + Id sdk.Id `json:"id"` + Region string `json:"region"` + Tags interface{} `json:"tags,omitempty"` + Build uuid.UUID `json:"build"` + Arguments []string `json:"arguments,omitempty"` + Environment map[string]string `json:"environment,omitempty"` + Ports map[string]*Port `json:"ports,omitempty"` + Resources *builds.Resources `json:"resources,omitempty"` + // The duration to wait for in milliseconds before force killing the actor after a DELETE request. This gives the actor time to perform a shutdown sequence before being killed. This should be set to a safe default, and can be overridden during a DELETE request if needed. + KillTimeout *int64 `json:"kill_timeout,omitempty"` + // If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. + Durable *bool `json:"durable,omitempty"` CreatedAt sdk.Timestamp `json:"created_at"` StartedAt *sdk.Timestamp `json:"started_at,omitempty"` DestroyedAt *sdk.Timestamp `json:"destroyed_at,omitempty"` @@ -112,153 +118,15 @@ func (e EndpointType) Ptr() *EndpointType { return &e } -type GuardRouting struct { - _rawJSON json.RawMessage -} - -func (g *GuardRouting) UnmarshalJSON(data []byte) error { - type unmarshaler GuardRouting - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *g = GuardRouting(value) - g._rawJSON = json.RawMessage(data) - return nil -} - -func (g *GuardRouting) String() string { - if len(g._rawJSON) > 0 { - if value, err := core.StringifyJSON(g._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(g); err == nil { - return value - } - return fmt.Sprintf("%#v", g) -} - -type HostRouting struct { - _rawJSON json.RawMessage -} - -func (h *HostRouting) UnmarshalJSON(data []byte) error { - type unmarshaler HostRouting - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *h = HostRouting(value) - h._rawJSON = json.RawMessage(data) - return nil -} - -func (h *HostRouting) String() string { - if len(h._rawJSON) > 0 { - if value, err := core.StringifyJSON(h._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(h); err == nil { - return value - } - return fmt.Sprintf("%#v", h) -} - -type Lifecycle struct { - // The duration to wait for in milliseconds before killing the container. This should be set to a safe default, and can be overridden during a DELETE request if needed. - KillTimeout *int64 `json:"kill_timeout,omitempty"` - // If true, the container will try to reschedule itself automatically in the event of a crash or a datacenter failover. The container will not reschedule if it exits successfully. - Durable *bool `json:"durable,omitempty"` - - _rawJSON json.RawMessage -} - -func (l *Lifecycle) UnmarshalJSON(data []byte) error { - type unmarshaler Lifecycle - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *l = Lifecycle(value) - l._rawJSON = json.RawMessage(data) - return nil -} - -func (l *Lifecycle) String() string { - if len(l._rawJSON) > 0 { - if value, err := core.StringifyJSON(l._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(l); err == nil { - return value - } - return fmt.Sprintf("%#v", l) -} - -type Network struct { - Mode NetworkMode `json:"mode,omitempty"` - Ports map[string]*Port `json:"ports,omitempty"` - - _rawJSON json.RawMessage -} - -func (n *Network) UnmarshalJSON(data []byte) error { - type unmarshaler Network - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *n = Network(value) - n._rawJSON = json.RawMessage(data) - return nil -} - -func (n *Network) String() string { - if len(n._rawJSON) > 0 { - if value, err := core.StringifyJSON(n._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(n); err == nil { - return value - } - return fmt.Sprintf("%#v", n) -} - -type NetworkMode string - -const ( - NetworkModeBridge NetworkMode = "bridge" - NetworkModeHost NetworkMode = "host" -) - -func NewNetworkModeFromString(s string) (NetworkMode, error) { - switch s { - case "bridge": - return NetworkModeBridge, nil - case "host": - return NetworkModeHost, nil - } - var t NetworkMode - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (n NetworkMode) Ptr() *NetworkMode { - return &n -} - type Port struct { - Protocol PortProtocol `json:"protocol,omitempty"` - InternalPort *int `json:"internal_port,omitempty"` - Hostname *string `json:"hostname,omitempty"` - Port *int `json:"port,omitempty"` - Path *string `json:"path,omitempty"` + Protocol builds.PortProtocol `json:"protocol,omitempty"` + InternalPort *int `json:"internal_port,omitempty"` + Hostname *string `json:"hostname,omitempty"` + Port *int `json:"port,omitempty"` + Path *string `json:"path,omitempty"` // Fully formed connection URL including protocol, hostname, port, and path, if applicable. - Url *string `json:"url,omitempty"` - Routing *PortRouting `json:"routing,omitempty"` + Url *string `json:"url,omitempty"` + Routing *builds.PortRouting `json:"routing,omitempty"` _rawJSON json.RawMessage } @@ -286,253 +154,6 @@ func (p *Port) String() string { return fmt.Sprintf("%#v", p) } -type PortProtocol string - -const ( - PortProtocolHttp PortProtocol = "http" - PortProtocolHttps PortProtocol = "https" - PortProtocolTcp PortProtocol = "tcp" - PortProtocolTcpTls PortProtocol = "tcp_tls" - PortProtocolUdp PortProtocol = "udp" -) - -func NewPortProtocolFromString(s string) (PortProtocol, error) { - switch s { - case "http": - return PortProtocolHttp, nil - case "https": - return PortProtocolHttps, nil - case "tcp": - return PortProtocolTcp, nil - case "tcp_tls": - return PortProtocolTcpTls, nil - case "udp": - return PortProtocolUdp, nil - } - var t PortProtocol - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (p PortProtocol) Ptr() *PortProtocol { - return &p -} - -type PortRouting struct { - Guard *GuardRouting `json:"guard,omitempty"` - Host *HostRouting `json:"host,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PortRouting) UnmarshalJSON(data []byte) error { - type unmarshaler PortRouting - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PortRouting(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PortRouting) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -type Resources struct { - // The number of CPU cores in millicores, or 1/1000 of a core. For example, - // 1/8 of a core would be 125 millicores, and 1 core would be 1000 - // millicores. - Cpu int `json:"cpu"` - // The amount of memory in megabytes - Memory int `json:"memory"` - - _rawJSON json.RawMessage -} - -func (r *Resources) UnmarshalJSON(data []byte) error { - type unmarshaler Resources - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *r = Resources(value) - r._rawJSON = json.RawMessage(data) - return nil -} - -func (r *Resources) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(r); err == nil { - return value - } - return fmt.Sprintf("%#v", r) -} - -type Runtime struct { - Build uuid.UUID `json:"build"` - Arguments []string `json:"arguments,omitempty"` - Environment map[string]string `json:"environment,omitempty"` - - _rawJSON json.RawMessage -} - -func (r *Runtime) UnmarshalJSON(data []byte) error { - type unmarshaler Runtime - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *r = Runtime(value) - r._rawJSON = json.RawMessage(data) - return nil -} - -func (r *Runtime) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(r); err == nil { - return value - } - return fmt.Sprintf("%#v", r) -} - -type CreateContainerNetworkRequest struct { - Mode *NetworkMode `json:"mode,omitempty"` - Ports map[string]*CreateContainerPortRequest `json:"ports,omitempty"` - WaitReady *bool `json:"wait_ready,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *CreateContainerNetworkRequest) UnmarshalJSON(data []byte) error { - type unmarshaler CreateContainerNetworkRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = CreateContainerNetworkRequest(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *CreateContainerNetworkRequest) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - -type CreateContainerPortRequest struct { - Protocol PortProtocol `json:"protocol,omitempty"` - InternalPort *int `json:"internal_port,omitempty"` - Routing *PortRouting `json:"routing,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *CreateContainerPortRequest) UnmarshalJSON(data []byte) error { - type unmarshaler CreateContainerPortRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = CreateContainerPortRequest(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *CreateContainerPortRequest) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - -type CreateContainerRuntimeNetworkRequest struct { - EndpointType EndpointType `json:"endpoint_type,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *CreateContainerRuntimeNetworkRequest) UnmarshalJSON(data []byte) error { - type unmarshaler CreateContainerRuntimeNetworkRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = CreateContainerRuntimeNetworkRequest(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *CreateContainerRuntimeNetworkRequest) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - -type CreateContainerRuntimeRequest struct { - Environment map[string]string `json:"environment,omitempty"` - Network *CreateContainerRuntimeNetworkRequest `json:"network,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *CreateContainerRuntimeRequest) UnmarshalJSON(data []byte) error { - type unmarshaler CreateContainerRuntimeRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = CreateContainerRuntimeRequest(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *CreateContainerRuntimeRequest) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - type UpgradeContainerRequestQuery struct { Project *string `json:"-"` Environment *string `json:"-"` diff --git a/sdks/api/runtime/openapi/openapi.yml b/sdks/api/runtime/openapi/openapi.yml index 5fc2031e59..6cb59b9755 100644 --- a/sdks/api/runtime/openapi/openapi.yml +++ b/sdks/api/runtime/openapi/openapi.yml @@ -2205,52 +2205,26 @@ components: type: string format: uuid build_tags: {} - runtime: - $ref: '#/components/schemas/ActorsCreateActorRuntimeRequest' - network: - $ref: '#/components/schemas/ActorsCreateActorNetworkRequest' - lifecycle: - $ref: '#/components/schemas/ActorsLifecycle' - required: - - tags - ActorsCreateActorRuntimeRequest: - type: object - properties: - environment: - type: object - additionalProperties: - type: string - network: - $ref: '#/components/schemas/ActorsCreateActorRuntimeNetworkRequest' - ActorsCreateActorRuntimeNetworkRequest: - type: object - properties: - endpoint_type: + network_endpoint_type: $ref: '#/components/schemas/ActorsEndpointType' - required: - - endpoint_type - ActorsCreateActorNetworkRequest: - type: object - properties: - mode: - $ref: '#/components/schemas/ActorsNetworkMode' - ports: - type: object - additionalProperties: - $ref: '#/components/schemas/ActorsCreateActorPortRequest' - wait_ready: + wait_for_network_ready: type: boolean - ActorsCreateActorPortRequest: - type: object - properties: - protocol: - $ref: '#/components/schemas/ActorsPortProtocol' - internal_port: + kill_timeout: type: integer - routing: - $ref: '#/components/schemas/ActorsPortRouting' + format: int64 + description: >- + The duration to wait for in milliseconds before force killing the + actor after a DELETE request. This gives the actor time to perform a + shutdown sequence before being killed. This should be set to a safe + default, and can be overridden during a DELETE request if needed. + durable: + type: boolean + description: >- + If true, the actor will try to reschedule itself automatically in + the event of a crash or a datacenter failover. The actor will not + reschedule if it exits successfully. required: - - protocol + - tags ActorsCreateActorResponse: type: object properties: @@ -2390,10 +2364,8 @@ components: $ref: '#/components/schemas/BuildsKind' compression: $ref: '#/components/schemas/BuildsCompression' - allocation: - $ref: '#/components/schemas/BuildsAllocation' - resources: - $ref: '#/components/schemas/BuildsResources' + runtime: + $ref: '#/components/schemas/BuildsRuntime' required: - image_file BuildsPrepareBuildResponse: @@ -2426,55 +2398,37 @@ components: type: string format: uuid build_tags: {} - runtime: - $ref: '#/components/schemas/ContainersCreateContainerRuntimeRequest' - network: - $ref: '#/components/schemas/ContainersCreateContainerNetworkRequest' - resources: - $ref: '#/components/schemas/ContainersResources' - lifecycle: - $ref: '#/components/schemas/ContainersLifecycle' - required: - - tags - - resources - ContainersCreateContainerRuntimeRequest: - type: object - properties: environment: type: object additionalProperties: type: string - network: - $ref: '#/components/schemas/ContainersCreateContainerRuntimeNetworkRequest' - ContainersCreateContainerRuntimeNetworkRequest: - type: object - properties: - endpoint_type: + network_endpoint_type: $ref: '#/components/schemas/ContainersEndpointType' - required: - - endpoint_type - ContainersCreateContainerNetworkRequest: - type: object - properties: - mode: - $ref: '#/components/schemas/ContainersNetworkMode' + wait_for_network_ready: + type: boolean ports: type: object additionalProperties: - $ref: '#/components/schemas/ContainersCreateContainerPortRequest' - wait_ready: - type: boolean - ContainersCreateContainerPortRequest: - type: object - properties: - protocol: - $ref: '#/components/schemas/ContainersPortProtocol' - internal_port: + $ref: '#/components/schemas/BuildsPortRequest' + resources: + $ref: '#/components/schemas/BuildsResources' + kill_timeout: type: integer - routing: - $ref: '#/components/schemas/ContainersPortRouting' + format: int64 + description: >- + The duration to wait for in milliseconds before force killing the + actor after a DELETE request. This gives the actor time to perform a + shutdown sequence before being killed. This should be set to a safe + default, and can be overridden during a DELETE request if needed. + durable: + type: boolean + description: >- + If true, the actor will try to reschedule itself automatically in + the event of a crash or a datacenter failover. The actor will not + reschedule if it exits successfully. required: - - protocol + - tags + - resources ContainersCreateContainerResponse: type: object properties: @@ -2618,80 +2572,45 @@ components: region: type: string tags: {} - runtime: - $ref: '#/components/schemas/ActorsRuntime' - network: - $ref: '#/components/schemas/ActorsNetwork' - lifecycle: - $ref: '#/components/schemas/ActorsLifecycle' - created_at: - $ref: '#/components/schemas/Timestamp' - started_at: - $ref: '#/components/schemas/Timestamp' - destroyed_at: - $ref: '#/components/schemas/Timestamp' - required: - - id - - region - - tags - - runtime - - network - - lifecycle - - created_at - ActorsRuntime: - type: object - properties: build: type: string format: uuid - arguments: - type: array - items: - type: string - environment: + ports: type: object additionalProperties: - type: string - required: - - build - ActorsLifecycle: - type: object - properties: + $ref: '#/components/schemas/ActorsPort' kill_timeout: type: integer format: int64 description: >- - The duration to wait for in milliseconds before killing the actor. - This should be set to a safe default, and can be overridden during a - DELETE request if needed. + The duration to wait for in milliseconds before force killing the + actor after a DELETE request. This gives the actor time to perform a + shutdown sequence before being killed. This should be set to a safe + default, and can be overridden during a DELETE request if needed. durable: type: boolean description: >- If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. - ActorsNetwork: - type: object - properties: - mode: - $ref: '#/components/schemas/ActorsNetworkMode' - ports: - type: object - additionalProperties: - $ref: '#/components/schemas/ActorsPort' + created_at: + $ref: '#/components/schemas/Timestamp' + started_at: + $ref: '#/components/schemas/Timestamp' + destroyed_at: + $ref: '#/components/schemas/Timestamp' required: - - mode + - id + - region + - tags + - build - ports - ActorsNetworkMode: - type: string - enum: - - bridge - - host + - created_at ActorsPort: type: object properties: protocol: - $ref: '#/components/schemas/ActorsPortProtocol' + $ref: '#/components/schemas/BuildsPortProtocol' internal_port: type: integer hostname: @@ -2706,31 +2625,10 @@ components: Fully formed connection URL including protocol, hostname, port, and path, if applicable. routing: - $ref: '#/components/schemas/ActorsPortRouting' + $ref: '#/components/schemas/BuildsPortRouting' required: - protocol - routing - ActorsPortProtocol: - type: string - enum: - - http - - https - - tcp - - tcp_tls - - udp - ActorsPortRouting: - type: object - properties: - guard: - $ref: '#/components/schemas/ActorsGuardRouting' - host: - $ref: '#/components/schemas/ActorsHostRouting' - ActorsGuardRouting: - type: object - properties: {} - ActorsHostRouting: - type: object - properties: {} ActorsEndpointType: type: string enum: @@ -2852,15 +2750,13 @@ components: type: integer format: int64 description: Unsigned 64 bit integer. - allocation: - $ref: '#/components/schemas/BuildsAllocation' - resources: - $ref: '#/components/schemas/BuildsResources' tags: type: object additionalProperties: type: string description: Tags of this build + runtime: + $ref: '#/components/schemas/BuildsRuntime' required: - id - name @@ -2878,23 +2774,78 @@ components: enum: - none - lz4 - BuildsAllocation: + BuildsRuntime: type: object properties: - single: - $ref: '#/components/schemas/BuildsAllocationSingle' - multi: - $ref: '#/components/schemas/BuildsAllocationMulti' - BuildsAllocationSingle: + container: + $ref: '#/components/schemas/BuildsRuntimeContainer' + actor: + $ref: '#/components/schemas/BuildsRuntimeActor' + BuildsRuntimeContainer: type: object - properties: {} - BuildsAllocationMulti: + properties: + environment: + type: object + additionalProperties: + type: string + network_mode: + $ref: '#/components/schemas/BuildsNetworkMode' + ports: + type: object + additionalProperties: + $ref: '#/components/schemas/BuildsPortRequest' + BuildsRuntimeActor: type: object properties: + environment: + type: object + additionalProperties: + type: string + network_mode: + $ref: '#/components/schemas/BuildsNetworkMode' + ports: + type: object + additionalProperties: + $ref: '#/components/schemas/BuildsPortRequest' + resources: + $ref: '#/components/schemas/BuildsResources' slots: type: integer required: + - resources - slots + BuildsPortProtocol: + type: string + enum: + - http + - https + - tcp + - tcp_tls + - udp + BuildsPortRouting: + type: object + properties: + guard: + $ref: '#/components/schemas/BuildsGuardRouting' + host: + $ref: '#/components/schemas/BuildsHostRouting' + BuildsGuardRouting: + type: object + properties: {} + BuildsHostRouting: + type: object + properties: {} + BuildsPortRequest: + type: object + properties: + protocol: + $ref: '#/components/schemas/BuildsPortProtocol' + internal_port: + type: integer + routing: + $ref: '#/components/schemas/BuildsPortRouting' + required: + - protocol BuildsResources: type: object properties: @@ -2909,10 +2860,15 @@ components: millicores. memory: type: integer - description: The amount of memory in megabytes + description: The amount of memory in mebibytes required: - cpu - memory + BuildsNetworkMode: + type: string + enum: + - bridge + - host Id: type: string description: Can be a UUID or base36 encoded binary data. @@ -2963,32 +2919,6 @@ components: region: type: string tags: {} - runtime: - $ref: '#/components/schemas/ContainersRuntime' - network: - $ref: '#/components/schemas/ContainersNetwork' - resources: - $ref: '#/components/schemas/ContainersResources' - lifecycle: - $ref: '#/components/schemas/ContainersLifecycle' - created_at: - $ref: '#/components/schemas/Timestamp' - started_at: - $ref: '#/components/schemas/Timestamp' - destroyed_at: - $ref: '#/components/schemas/Timestamp' - required: - - id - - region - - tags - - runtime - - network - - resources - - lifecycle - - created_at - ContainersRuntime: - type: object - properties: build: type: string format: uuid @@ -3000,64 +2930,45 @@ components: type: object additionalProperties: type: string - required: - - build - ContainersLifecycle: - type: object - properties: + ports: + type: object + additionalProperties: + $ref: '#/components/schemas/ContainersPort' + resources: + $ref: '#/components/schemas/BuildsResources' kill_timeout: type: integer format: int64 description: >- - The duration to wait for in milliseconds before killing the - container. This should be set to a safe default, and can be - overridden during a DELETE request if needed. + The duration to wait for in milliseconds before force killing the + actor after a DELETE request. This gives the actor time to perform a + shutdown sequence before being killed. This should be set to a safe + default, and can be overridden during a DELETE request if needed. durable: type: boolean description: >- - If true, the container will try to reschedule itself automatically - in the event of a crash or a datacenter failover. The container will - not reschedule if it exits successfully. - ContainersResources: - type: object - properties: - cpu: - type: integer - description: >- - The number of CPU cores in millicores, or 1/1000 of a core. For - example, - - 1/8 of a core would be 125 millicores, and 1 core would be 1000 - - millicores. - memory: - type: integer - description: The amount of memory in megabytes - required: - - cpu - - memory - ContainersNetwork: - type: object - properties: - mode: - $ref: '#/components/schemas/ContainersNetworkMode' - ports: - type: object - additionalProperties: - $ref: '#/components/schemas/ContainersPort' + If true, the actor will try to reschedule itself automatically in + the event of a crash or a datacenter failover. The actor will not + reschedule if it exits successfully. + created_at: + $ref: '#/components/schemas/Timestamp' + started_at: + $ref: '#/components/schemas/Timestamp' + destroyed_at: + $ref: '#/components/schemas/Timestamp' required: - - mode + - id + - region + - tags + - build - ports - ContainersNetworkMode: - type: string - enum: - - bridge - - host + - resources + - created_at ContainersPort: type: object properties: protocol: - $ref: '#/components/schemas/ContainersPortProtocol' + $ref: '#/components/schemas/BuildsPortProtocol' internal_port: type: integer hostname: @@ -3072,31 +2983,10 @@ components: Fully formed connection URL including protocol, hostname, port, and path, if applicable. routing: - $ref: '#/components/schemas/ContainersPortRouting' + $ref: '#/components/schemas/BuildsPortRouting' required: - protocol - routing - ContainersPortProtocol: - type: string - enum: - - http - - https - - tcp - - tcp_tls - - udp - ContainersPortRouting: - type: object - properties: - guard: - $ref: '#/components/schemas/ContainersGuardRouting' - host: - $ref: '#/components/schemas/ContainersHostRouting' - ContainersGuardRouting: - type: object - properties: {} - ContainersHostRouting: - type: object - properties: {} ContainersEndpointType: type: string enum: diff --git a/sdks/api/runtime/openapi_compat/openapi.yml b/sdks/api/runtime/openapi_compat/openapi.yml index 122a0fca14..3729125b97 100644 --- a/sdks/api/runtime/openapi_compat/openapi.yml +++ b/sdks/api/runtime/openapi_compat/openapi.yml @@ -2205,52 +2205,26 @@ components: type: string format: uuid build_tags: {} - runtime: - $ref: '#/components/schemas/ActorsCreateActorRuntimeRequest' - network: - $ref: '#/components/schemas/ActorsCreateActorNetworkRequest' - lifecycle: - $ref: '#/components/schemas/ActorsLifecycle' - required: - - tags - ActorsCreateActorRuntimeRequest: - type: object - properties: - environment: - type: object - additionalProperties: - type: string - network: - $ref: '#/components/schemas/ActorsCreateActorRuntimeNetworkRequest' - ActorsCreateActorRuntimeNetworkRequest: - type: object - properties: - endpoint_type: + network_endpoint_type: $ref: '#/components/schemas/ActorsEndpointType' - required: - - endpoint_type - ActorsCreateActorNetworkRequest: - type: object - properties: - mode: - $ref: '#/components/schemas/ActorsNetworkMode' - ports: - type: object - additionalProperties: - $ref: '#/components/schemas/ActorsCreateActorPortRequest' - wait_ready: + wait_for_network_ready: type: boolean - ActorsCreateActorPortRequest: - type: object - properties: - protocol: - $ref: '#/components/schemas/ActorsPortProtocol' - internal_port: + kill_timeout: type: integer - routing: - $ref: '#/components/schemas/ActorsPortRouting' + format: int64 + description: >- + The duration to wait for in milliseconds before force killing the + actor after a DELETE request. This gives the actor time to perform a + shutdown sequence before being killed. This should be set to a safe + default, and can be overridden during a DELETE request if needed. + durable: + type: boolean + description: >- + If true, the actor will try to reschedule itself automatically in + the event of a crash or a datacenter failover. The actor will not + reschedule if it exits successfully. required: - - protocol + - tags ActorsCreateActorResponse: type: object properties: @@ -2390,10 +2364,8 @@ components: $ref: '#/components/schemas/BuildsKind' compression: $ref: '#/components/schemas/BuildsCompression' - allocation: - $ref: '#/components/schemas/BuildsAllocation' - resources: - $ref: '#/components/schemas/BuildsResources' + runtime: + $ref: '#/components/schemas/BuildsRuntime' required: - image_file BuildsPrepareBuildResponse: @@ -2426,55 +2398,37 @@ components: type: string format: uuid build_tags: {} - runtime: - $ref: '#/components/schemas/ContainersCreateContainerRuntimeRequest' - network: - $ref: '#/components/schemas/ContainersCreateContainerNetworkRequest' - resources: - $ref: '#/components/schemas/ContainersResources' - lifecycle: - $ref: '#/components/schemas/ContainersLifecycle' - required: - - tags - - resources - ContainersCreateContainerRuntimeRequest: - type: object - properties: environment: type: object additionalProperties: type: string - network: - $ref: '#/components/schemas/ContainersCreateContainerRuntimeNetworkRequest' - ContainersCreateContainerRuntimeNetworkRequest: - type: object - properties: - endpoint_type: + network_endpoint_type: $ref: '#/components/schemas/ContainersEndpointType' - required: - - endpoint_type - ContainersCreateContainerNetworkRequest: - type: object - properties: - mode: - $ref: '#/components/schemas/ContainersNetworkMode' + wait_for_network_ready: + type: boolean ports: type: object additionalProperties: - $ref: '#/components/schemas/ContainersCreateContainerPortRequest' - wait_ready: - type: boolean - ContainersCreateContainerPortRequest: - type: object - properties: - protocol: - $ref: '#/components/schemas/ContainersPortProtocol' - internal_port: + $ref: '#/components/schemas/BuildsPortRequest' + resources: + $ref: '#/components/schemas/BuildsResources' + kill_timeout: type: integer - routing: - $ref: '#/components/schemas/ContainersPortRouting' + format: int64 + description: >- + The duration to wait for in milliseconds before force killing the + actor after a DELETE request. This gives the actor time to perform a + shutdown sequence before being killed. This should be set to a safe + default, and can be overridden during a DELETE request if needed. + durable: + type: boolean + description: >- + If true, the actor will try to reschedule itself automatically in + the event of a crash or a datacenter failover. The actor will not + reschedule if it exits successfully. required: - - protocol + - tags + - resources ContainersCreateContainerResponse: type: object properties: @@ -2618,80 +2572,45 @@ components: region: type: string tags: {} - runtime: - $ref: '#/components/schemas/ActorsRuntime' - network: - $ref: '#/components/schemas/ActorsNetwork' - lifecycle: - $ref: '#/components/schemas/ActorsLifecycle' - created_at: - $ref: '#/components/schemas/Timestamp' - started_at: - $ref: '#/components/schemas/Timestamp' - destroyed_at: - $ref: '#/components/schemas/Timestamp' - required: - - id - - region - - tags - - runtime - - network - - lifecycle - - created_at - ActorsRuntime: - type: object - properties: build: type: string format: uuid - arguments: - type: array - items: - type: string - environment: + ports: type: object additionalProperties: - type: string - required: - - build - ActorsLifecycle: - type: object - properties: + $ref: '#/components/schemas/ActorsPort' kill_timeout: type: integer format: int64 description: >- - The duration to wait for in milliseconds before killing the actor. - This should be set to a safe default, and can be overridden during a - DELETE request if needed. + The duration to wait for in milliseconds before force killing the + actor after a DELETE request. This gives the actor time to perform a + shutdown sequence before being killed. This should be set to a safe + default, and can be overridden during a DELETE request if needed. durable: type: boolean description: >- If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. - ActorsNetwork: - type: object - properties: - mode: - $ref: '#/components/schemas/ActorsNetworkMode' - ports: - type: object - additionalProperties: - $ref: '#/components/schemas/ActorsPort' + created_at: + $ref: '#/components/schemas/Timestamp' + started_at: + $ref: '#/components/schemas/Timestamp' + destroyed_at: + $ref: '#/components/schemas/Timestamp' required: - - mode + - id + - region + - tags + - build - ports - ActorsNetworkMode: - type: string - enum: - - bridge - - host + - created_at ActorsPort: type: object properties: protocol: - $ref: '#/components/schemas/ActorsPortProtocol' + $ref: '#/components/schemas/BuildsPortProtocol' internal_port: type: integer hostname: @@ -2706,31 +2625,10 @@ components: Fully formed connection URL including protocol, hostname, port, and path, if applicable. routing: - $ref: '#/components/schemas/ActorsPortRouting' + $ref: '#/components/schemas/BuildsPortRouting' required: - protocol - routing - ActorsPortProtocol: - type: string - enum: - - http - - https - - tcp - - tcp_tls - - udp - ActorsPortRouting: - type: object - properties: - guard: - $ref: '#/components/schemas/ActorsGuardRouting' - host: - $ref: '#/components/schemas/ActorsHostRouting' - ActorsGuardRouting: - type: object - properties: {} - ActorsHostRouting: - type: object - properties: {} ActorsEndpointType: type: string enum: @@ -2852,15 +2750,13 @@ components: type: integer format: int64 description: Unsigned 64 bit integer. - allocation: - $ref: '#/components/schemas/BuildsAllocation' - resources: - $ref: '#/components/schemas/BuildsResources' tags: type: object additionalProperties: type: string description: Tags of this build + runtime: + $ref: '#/components/schemas/BuildsRuntime' required: - id - name @@ -2878,23 +2774,78 @@ components: enum: - none - lz4 - BuildsAllocation: + BuildsRuntime: type: object properties: - single: - $ref: '#/components/schemas/BuildsAllocationSingle' - multi: - $ref: '#/components/schemas/BuildsAllocationMulti' - BuildsAllocationSingle: + container: + $ref: '#/components/schemas/BuildsRuntimeContainer' + actor: + $ref: '#/components/schemas/BuildsRuntimeActor' + BuildsRuntimeContainer: type: object - properties: {} - BuildsAllocationMulti: + properties: + environment: + type: object + additionalProperties: + type: string + network_mode: + $ref: '#/components/schemas/BuildsNetworkMode' + ports: + type: object + additionalProperties: + $ref: '#/components/schemas/BuildsPortRequest' + BuildsRuntimeActor: type: object properties: + environment: + type: object + additionalProperties: + type: string + network_mode: + $ref: '#/components/schemas/BuildsNetworkMode' + ports: + type: object + additionalProperties: + $ref: '#/components/schemas/BuildsPortRequest' + resources: + $ref: '#/components/schemas/BuildsResources' slots: type: integer required: + - resources - slots + BuildsPortProtocol: + type: string + enum: + - http + - https + - tcp + - tcp_tls + - udp + BuildsPortRouting: + type: object + properties: + guard: + $ref: '#/components/schemas/BuildsGuardRouting' + host: + $ref: '#/components/schemas/BuildsHostRouting' + BuildsGuardRouting: + type: object + properties: {} + BuildsHostRouting: + type: object + properties: {} + BuildsPortRequest: + type: object + properties: + protocol: + $ref: '#/components/schemas/BuildsPortProtocol' + internal_port: + type: integer + routing: + $ref: '#/components/schemas/BuildsPortRouting' + required: + - protocol BuildsResources: type: object properties: @@ -2909,10 +2860,15 @@ components: millicores. memory: type: integer - description: The amount of memory in megabytes + description: The amount of memory in mebibytes required: - cpu - memory + BuildsNetworkMode: + type: string + enum: + - bridge + - host Id: type: string description: Can be a UUID or base36 encoded binary data. @@ -2963,32 +2919,6 @@ components: region: type: string tags: {} - runtime: - $ref: '#/components/schemas/ContainersRuntime' - network: - $ref: '#/components/schemas/ContainersNetwork' - resources: - $ref: '#/components/schemas/ContainersResources' - lifecycle: - $ref: '#/components/schemas/ContainersLifecycle' - created_at: - $ref: '#/components/schemas/Timestamp' - started_at: - $ref: '#/components/schemas/Timestamp' - destroyed_at: - $ref: '#/components/schemas/Timestamp' - required: - - id - - region - - tags - - runtime - - network - - resources - - lifecycle - - created_at - ContainersRuntime: - type: object - properties: build: type: string format: uuid @@ -3000,64 +2930,45 @@ components: type: object additionalProperties: type: string - required: - - build - ContainersLifecycle: - type: object - properties: + ports: + type: object + additionalProperties: + $ref: '#/components/schemas/ContainersPort' + resources: + $ref: '#/components/schemas/BuildsResources' kill_timeout: type: integer format: int64 description: >- - The duration to wait for in milliseconds before killing the - container. This should be set to a safe default, and can be - overridden during a DELETE request if needed. + The duration to wait for in milliseconds before force killing the + actor after a DELETE request. This gives the actor time to perform a + shutdown sequence before being killed. This should be set to a safe + default, and can be overridden during a DELETE request if needed. durable: type: boolean description: >- - If true, the container will try to reschedule itself automatically - in the event of a crash or a datacenter failover. The container will - not reschedule if it exits successfully. - ContainersResources: - type: object - properties: - cpu: - type: integer - description: >- - The number of CPU cores in millicores, or 1/1000 of a core. For - example, - - 1/8 of a core would be 125 millicores, and 1 core would be 1000 - - millicores. - memory: - type: integer - description: The amount of memory in megabytes - required: - - cpu - - memory - ContainersNetwork: - type: object - properties: - mode: - $ref: '#/components/schemas/ContainersNetworkMode' - ports: - type: object - additionalProperties: - $ref: '#/components/schemas/ContainersPort' + If true, the actor will try to reschedule itself automatically in + the event of a crash or a datacenter failover. The actor will not + reschedule if it exits successfully. + created_at: + $ref: '#/components/schemas/Timestamp' + started_at: + $ref: '#/components/schemas/Timestamp' + destroyed_at: + $ref: '#/components/schemas/Timestamp' required: - - mode + - id + - region + - tags + - build - ports - ContainersNetworkMode: - type: string - enum: - - bridge - - host + - resources + - created_at ContainersPort: type: object properties: protocol: - $ref: '#/components/schemas/ContainersPortProtocol' + $ref: '#/components/schemas/BuildsPortProtocol' internal_port: type: integer hostname: @@ -3072,31 +2983,10 @@ components: Fully formed connection URL including protocol, hostname, port, and path, if applicable. routing: - $ref: '#/components/schemas/ContainersPortRouting' + $ref: '#/components/schemas/BuildsPortRouting' required: - protocol - routing - ContainersPortProtocol: - type: string - enum: - - http - - https - - tcp - - tcp_tls - - udp - ContainersPortRouting: - type: object - properties: - guard: - $ref: '#/components/schemas/ContainersGuardRouting' - host: - $ref: '#/components/schemas/ContainersHostRouting' - ContainersGuardRouting: - type: object - properties: {} - ContainersHostRouting: - type: object - properties: {} ContainersEndpointType: type: string enum: diff --git a/sdks/api/runtime/rust/.openapi-generator/FILES b/sdks/api/runtime/rust/.openapi-generator/FILES index e133b96e1c..5797bcbf2e 100644 --- a/sdks/api/runtime/rust/.openapi-generator/FILES +++ b/sdks/api/runtime/rust/.openapi-generator/FILES @@ -5,25 +5,25 @@ Cargo.toml README.md docs/ActorsActor.md docs/ActorsApi.md -docs/ActorsCreateActorNetworkRequest.md -docs/ActorsCreateActorPortRequest.md docs/ActorsCreateActorRequest.md docs/ActorsCreateActorResponse.md -docs/ActorsCreateActorRuntimeNetworkRequest.md -docs/ActorsCreateActorRuntimeRequest.md docs/ActorsEndpointType.md docs/ActorsExportActorLogsResponse.md docs/ActorsGetActorLogsResponse.md docs/ActorsGetActorMetricsResponse.md docs/ActorsGetActorResponse.md +<<<<<<< HEAD docs/ActorsGetActorUsageResponse.md docs/ActorsLifecycle.md +======= +>>>>>>> a7d912278 (fix: even more actor api changes) docs/ActorsListActorsResponse.md docs/ActorsLogsApi.md <<<<<<< HEAD docs/ActorsLogsExportRequest.md ======= docs/ActorsMetricsApi.md +<<<<<<< HEAD >>>>>>> 43e5048bc (fix: api changes) docs/ActorsNetwork.md docs/ActorsNetworkMode.md @@ -37,45 +37,43 @@ docs/ActorsResources.md docs/ActorsQueryLogStream.md >>>>>>> 43e5048bc (fix: api changes) docs/ActorsRuntime.md +======= +docs/ActorsPort.md +docs/ActorsQueryLogStream.md +>>>>>>> a7d912278 (fix: even more actor api changes) docs/ActorsUpgradeActorRequest.md docs/ActorsUpgradeAllActorsRequest.md docs/ActorsUpgradeAllActorsResponse.md -docs/BuildsAllocation.md -docs/BuildsAllocationMulti.md docs/BuildsApi.md docs/BuildsBuild.md docs/BuildsCompression.md docs/BuildsGetBuildResponse.md docs/BuildsKind.md docs/BuildsListBuildsResponse.md +docs/BuildsNetworkMode.md docs/BuildsPatchBuildTagsRequest.md +docs/BuildsPortProtocol.md +docs/BuildsPortRequest.md +docs/BuildsPortRouting.md docs/BuildsPrepareBuildRequest.md docs/BuildsPrepareBuildResponse.md docs/BuildsResources.md +docs/BuildsRuntime.md +docs/BuildsRuntimeActor.md +docs/BuildsRuntimeContainer.md docs/ContainersApi.md docs/ContainersContainer.md -docs/ContainersCreateContainerNetworkRequest.md -docs/ContainersCreateContainerPortRequest.md docs/ContainersCreateContainerRequest.md docs/ContainersCreateContainerResponse.md -docs/ContainersCreateContainerRuntimeNetworkRequest.md -docs/ContainersCreateContainerRuntimeRequest.md docs/ContainersEndpointType.md docs/ContainersGetContainerLogsResponse.md docs/ContainersGetContainerMetricsResponse.md docs/ContainersGetContainerResponse.md -docs/ContainersLifecycle.md docs/ContainersListContainersResponse.md docs/ContainersLogsApi.md docs/ContainersMetricsApi.md -docs/ContainersNetwork.md -docs/ContainersNetworkMode.md docs/ContainersPort.md -docs/ContainersPortProtocol.md -docs/ContainersPortRouting.md docs/ContainersQueryLogStream.md -docs/ContainersResources.md -docs/ContainersRuntime.md docs/ContainersUpgradeAllContainersRequest.md docs/ContainersUpgradeAllContainersResponse.md docs/ContainersUpgradeContainerRequest.md @@ -109,17 +107,14 @@ src/apis/regions_api.rs src/apis/routes_api.rs src/lib.rs src/models/actors_actor.rs -src/models/actors_create_actor_network_request.rs -src/models/actors_create_actor_port_request.rs src/models/actors_create_actor_request.rs src/models/actors_create_actor_response.rs -src/models/actors_create_actor_runtime_network_request.rs -src/models/actors_create_actor_runtime_request.rs src/models/actors_endpoint_type.rs src/models/actors_export_actor_logs_response.rs src/models/actors_get_actor_logs_response.rs src/models/actors_get_actor_metrics_response.rs src/models/actors_get_actor_response.rs +<<<<<<< HEAD src/models/actors_get_actor_usage_response.rs src/models/actors_lifecycle.rs src/models/actors_list_actors_response.rs @@ -136,41 +131,40 @@ src/models/actors_resources.rs src/models/actors_query_log_stream.rs >>>>>>> 43e5048bc (fix: api changes) src/models/actors_runtime.rs +======= +src/models/actors_list_actors_response.rs +src/models/actors_port.rs +src/models/actors_query_log_stream.rs +>>>>>>> a7d912278 (fix: even more actor api changes) src/models/actors_upgrade_actor_request.rs src/models/actors_upgrade_all_actors_request.rs src/models/actors_upgrade_all_actors_response.rs -src/models/builds_allocation.rs -src/models/builds_allocation_multi.rs src/models/builds_build.rs src/models/builds_compression.rs src/models/builds_get_build_response.rs src/models/builds_kind.rs src/models/builds_list_builds_response.rs +src/models/builds_network_mode.rs src/models/builds_patch_build_tags_request.rs +src/models/builds_port_protocol.rs +src/models/builds_port_request.rs +src/models/builds_port_routing.rs src/models/builds_prepare_build_request.rs src/models/builds_prepare_build_response.rs src/models/builds_resources.rs +src/models/builds_runtime.rs +src/models/builds_runtime_actor.rs +src/models/builds_runtime_container.rs src/models/containers_container.rs -src/models/containers_create_container_network_request.rs -src/models/containers_create_container_port_request.rs src/models/containers_create_container_request.rs src/models/containers_create_container_response.rs -src/models/containers_create_container_runtime_network_request.rs -src/models/containers_create_container_runtime_request.rs src/models/containers_endpoint_type.rs src/models/containers_get_container_logs_response.rs src/models/containers_get_container_metrics_response.rs src/models/containers_get_container_response.rs -src/models/containers_lifecycle.rs src/models/containers_list_containers_response.rs -src/models/containers_network.rs -src/models/containers_network_mode.rs src/models/containers_port.rs -src/models/containers_port_protocol.rs -src/models/containers_port_routing.rs src/models/containers_query_log_stream.rs -src/models/containers_resources.rs -src/models/containers_runtime.rs src/models/containers_upgrade_all_containers_request.rs src/models/containers_upgrade_all_containers_response.rs src/models/containers_upgrade_container_request.rs diff --git a/sdks/api/runtime/rust/README.md b/sdks/api/runtime/rust/README.md index 47963ed294..8036a7357d 100644 --- a/sdks/api/runtime/rust/README.md +++ b/sdks/api/runtime/rust/README.md @@ -70,17 +70,14 @@ Class | Method | HTTP request | Description ## Documentation For Models - [ActorsActor](docs/ActorsActor.md) - - [ActorsCreateActorNetworkRequest](docs/ActorsCreateActorNetworkRequest.md) - - [ActorsCreateActorPortRequest](docs/ActorsCreateActorPortRequest.md) - [ActorsCreateActorRequest](docs/ActorsCreateActorRequest.md) - [ActorsCreateActorResponse](docs/ActorsCreateActorResponse.md) - - [ActorsCreateActorRuntimeNetworkRequest](docs/ActorsCreateActorRuntimeNetworkRequest.md) - - [ActorsCreateActorRuntimeRequest](docs/ActorsCreateActorRuntimeRequest.md) - [ActorsEndpointType](docs/ActorsEndpointType.md) - [ActorsExportActorLogsResponse](docs/ActorsExportActorLogsResponse.md) - [ActorsGetActorLogsResponse](docs/ActorsGetActorLogsResponse.md) - [ActorsGetActorMetricsResponse](docs/ActorsGetActorMetricsResponse.md) - [ActorsGetActorResponse](docs/ActorsGetActorResponse.md) +<<<<<<< HEAD - [ActorsGetActorUsageResponse](docs/ActorsGetActorUsageResponse.md) - [ActorsLifecycle](docs/ActorsLifecycle.md) - [ActorsListActorsResponse](docs/ActorsListActorsResponse.md) @@ -97,41 +94,40 @@ Class | Method | HTTP request | Description - [ActorsQueryLogStream](docs/ActorsQueryLogStream.md) >>>>>>> 43e5048bc (fix: api changes) - [ActorsRuntime](docs/ActorsRuntime.md) +======= + - [ActorsListActorsResponse](docs/ActorsListActorsResponse.md) + - [ActorsPort](docs/ActorsPort.md) + - [ActorsQueryLogStream](docs/ActorsQueryLogStream.md) +>>>>>>> a7d912278 (fix: even more actor api changes) - [ActorsUpgradeActorRequest](docs/ActorsUpgradeActorRequest.md) - [ActorsUpgradeAllActorsRequest](docs/ActorsUpgradeAllActorsRequest.md) - [ActorsUpgradeAllActorsResponse](docs/ActorsUpgradeAllActorsResponse.md) - - [BuildsAllocation](docs/BuildsAllocation.md) - - [BuildsAllocationMulti](docs/BuildsAllocationMulti.md) - [BuildsBuild](docs/BuildsBuild.md) - [BuildsCompression](docs/BuildsCompression.md) - [BuildsGetBuildResponse](docs/BuildsGetBuildResponse.md) - [BuildsKind](docs/BuildsKind.md) - [BuildsListBuildsResponse](docs/BuildsListBuildsResponse.md) + - [BuildsNetworkMode](docs/BuildsNetworkMode.md) - [BuildsPatchBuildTagsRequest](docs/BuildsPatchBuildTagsRequest.md) + - [BuildsPortProtocol](docs/BuildsPortProtocol.md) + - [BuildsPortRequest](docs/BuildsPortRequest.md) + - [BuildsPortRouting](docs/BuildsPortRouting.md) - [BuildsPrepareBuildRequest](docs/BuildsPrepareBuildRequest.md) - [BuildsPrepareBuildResponse](docs/BuildsPrepareBuildResponse.md) - [BuildsResources](docs/BuildsResources.md) + - [BuildsRuntime](docs/BuildsRuntime.md) + - [BuildsRuntimeActor](docs/BuildsRuntimeActor.md) + - [BuildsRuntimeContainer](docs/BuildsRuntimeContainer.md) - [ContainersContainer](docs/ContainersContainer.md) - - [ContainersCreateContainerNetworkRequest](docs/ContainersCreateContainerNetworkRequest.md) - - [ContainersCreateContainerPortRequest](docs/ContainersCreateContainerPortRequest.md) - [ContainersCreateContainerRequest](docs/ContainersCreateContainerRequest.md) - [ContainersCreateContainerResponse](docs/ContainersCreateContainerResponse.md) - - [ContainersCreateContainerRuntimeNetworkRequest](docs/ContainersCreateContainerRuntimeNetworkRequest.md) - - [ContainersCreateContainerRuntimeRequest](docs/ContainersCreateContainerRuntimeRequest.md) - [ContainersEndpointType](docs/ContainersEndpointType.md) - [ContainersGetContainerLogsResponse](docs/ContainersGetContainerLogsResponse.md) - [ContainersGetContainerMetricsResponse](docs/ContainersGetContainerMetricsResponse.md) - [ContainersGetContainerResponse](docs/ContainersGetContainerResponse.md) - - [ContainersLifecycle](docs/ContainersLifecycle.md) - [ContainersListContainersResponse](docs/ContainersListContainersResponse.md) - - [ContainersNetwork](docs/ContainersNetwork.md) - - [ContainersNetworkMode](docs/ContainersNetworkMode.md) - [ContainersPort](docs/ContainersPort.md) - - [ContainersPortProtocol](docs/ContainersPortProtocol.md) - - [ContainersPortRouting](docs/ContainersPortRouting.md) - [ContainersQueryLogStream](docs/ContainersQueryLogStream.md) - - [ContainersResources](docs/ContainersResources.md) - - [ContainersRuntime](docs/ContainersRuntime.md) - [ContainersUpgradeAllContainersRequest](docs/ContainersUpgradeAllContainersRequest.md) - [ContainersUpgradeAllContainersResponse](docs/ContainersUpgradeAllContainersResponse.md) - [ContainersUpgradeContainerRequest](docs/ContainersUpgradeContainerRequest.md) diff --git a/sdks/api/runtime/rust/docs/ActorsActor.md b/sdks/api/runtime/rust/docs/ActorsActor.md index 51f1a591c7..326151ca92 100644 --- a/sdks/api/runtime/rust/docs/ActorsActor.md +++ b/sdks/api/runtime/rust/docs/ActorsActor.md @@ -7,9 +7,10 @@ Name | Type | Description | Notes **id** | **String** | Can be a UUID or base36 encoded binary data. | **region** | **String** | | **tags** | Option<[**serde_json::Value**](.md)> | | -**runtime** | [**crate::models::ActorsRuntime**](ActorsRuntime.md) | | -**network** | [**crate::models::ActorsNetwork**](ActorsNetwork.md) | | -**lifecycle** | [**crate::models::ActorsLifecycle**](ActorsLifecycle.md) | | +**build** | [**uuid::Uuid**](uuid::Uuid.md) | | +**ports** | [**::std::collections::HashMap**](ActorsPort.md) | | +**kill_timeout** | Option<**i64**> | The duration to wait for in milliseconds before force killing the actor after a DELETE request. This gives the actor time to perform a shutdown sequence before being killed. This should be set to a safe default, and can be overridden during a DELETE request if needed. | [optional] +**durable** | Option<**bool**> | If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. | [optional] **created_at** | **String** | RFC3339 timestamp | **started_at** | Option<**String**> | RFC3339 timestamp | [optional] **destroyed_at** | Option<**String**> | RFC3339 timestamp | [optional] diff --git a/sdks/api/runtime/rust/docs/ActorsCreateActorNetworkRequest.md b/sdks/api/runtime/rust/docs/ActorsCreateActorNetworkRequest.md deleted file mode 100644 index b55ab1fdd1..0000000000 --- a/sdks/api/runtime/rust/docs/ActorsCreateActorNetworkRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# ActorsCreateActorNetworkRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mode** | Option<[**crate::models::ActorsNetworkMode**](ActorsNetworkMode.md)> | | [optional] -**ports** | Option<[**::std::collections::HashMap**](ActorsCreateActorPortRequest.md)> | | [optional] -**wait_ready** | Option<**bool**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/api/runtime/rust/docs/ActorsCreateActorRequest.md b/sdks/api/runtime/rust/docs/ActorsCreateActorRequest.md index 5f5686b46b..e76e0936d4 100644 --- a/sdks/api/runtime/rust/docs/ActorsCreateActorRequest.md +++ b/sdks/api/runtime/rust/docs/ActorsCreateActorRequest.md @@ -8,9 +8,10 @@ Name | Type | Description | Notes **tags** | Option<[**serde_json::Value**](.md)> | | **build** | Option<[**uuid::Uuid**](uuid::Uuid.md)> | | [optional] **build_tags** | Option<[**serde_json::Value**](.md)> | | [optional] -**runtime** | Option<[**crate::models::ActorsCreateActorRuntimeRequest**](ActorsCreateActorRuntimeRequest.md)> | | [optional] -**network** | Option<[**crate::models::ActorsCreateActorNetworkRequest**](ActorsCreateActorNetworkRequest.md)> | | [optional] -**lifecycle** | Option<[**crate::models::ActorsLifecycle**](ActorsLifecycle.md)> | | [optional] +**network_endpoint_type** | Option<[**crate::models::ActorsEndpointType**](ActorsEndpointType.md)> | | [optional] +**wait_for_network_ready** | Option<**bool**> | | [optional] +**kill_timeout** | Option<**i64**> | The duration to wait for in milliseconds before force killing the actor after a DELETE request. This gives the actor time to perform a shutdown sequence before being killed. This should be set to a safe default, and can be overridden during a DELETE request if needed. | [optional] +**durable** | Option<**bool**> | If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/api/runtime/rust/docs/ActorsCreateActorRuntimeNetworkRequest.md b/sdks/api/runtime/rust/docs/ActorsCreateActorRuntimeNetworkRequest.md deleted file mode 100644 index 91e5bb7669..0000000000 --- a/sdks/api/runtime/rust/docs/ActorsCreateActorRuntimeNetworkRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# ActorsCreateActorRuntimeNetworkRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**endpoint_type** | [**crate::models::ActorsEndpointType**](ActorsEndpointType.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/api/runtime/rust/docs/ActorsCreateActorRuntimeRequest.md b/sdks/api/runtime/rust/docs/ActorsCreateActorRuntimeRequest.md deleted file mode 100644 index 6dd58cb309..0000000000 --- a/sdks/api/runtime/rust/docs/ActorsCreateActorRuntimeRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# ActorsCreateActorRuntimeRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**environment** | Option<**::std::collections::HashMap**> | | [optional] -**network** | Option<[**crate::models::ActorsCreateActorRuntimeNetworkRequest**](ActorsCreateActorRuntimeNetworkRequest.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/api/runtime/rust/docs/ActorsLifecycle.md b/sdks/api/runtime/rust/docs/ActorsLifecycle.md deleted file mode 100644 index d02b4958c4..0000000000 --- a/sdks/api/runtime/rust/docs/ActorsLifecycle.md +++ /dev/null @@ -1,12 +0,0 @@ -# ActorsLifecycle - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kill_timeout** | Option<**i64**> | The duration to wait for in milliseconds before killing the actor. This should be set to a safe default, and can be overridden during a DELETE request if needed. | [optional] -**durable** | Option<**bool**> | If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/api/runtime/rust/docs/ActorsNetwork.md b/sdks/api/runtime/rust/docs/ActorsNetwork.md deleted file mode 100644 index 776edaedbe..0000000000 --- a/sdks/api/runtime/rust/docs/ActorsNetwork.md +++ /dev/null @@ -1,12 +0,0 @@ -# ActorsNetwork - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mode** | [**crate::models::ActorsNetworkMode**](ActorsNetworkMode.md) | | -**ports** | [**::std::collections::HashMap**](ActorsPort.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/api/runtime/rust/docs/ActorsPort.md b/sdks/api/runtime/rust/docs/ActorsPort.md index 48620bad95..4e1a0943cc 100644 --- a/sdks/api/runtime/rust/docs/ActorsPort.md +++ b/sdks/api/runtime/rust/docs/ActorsPort.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**protocol** | [**crate::models::ActorsPortProtocol**](ActorsPortProtocol.md) | | +**protocol** | [**crate::models::BuildsPortProtocol**](BuildsPortProtocol.md) | | **internal_port** | Option<**i32**> | | [optional] **hostname** | Option<**String**> | | [optional] **port** | Option<**i32**> | | [optional] **path** | Option<**String**> | | [optional] **url** | Option<**String**> | Fully formed connection URL including protocol, hostname, port, and path, if applicable. | [optional] -**routing** | [**crate::models::ActorsPortRouting**](ActorsPortRouting.md) | | +**routing** | [**crate::models::BuildsPortRouting**](BuildsPortRouting.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/api/runtime/rust/docs/ActorsRuntime.md b/sdks/api/runtime/rust/docs/ActorsRuntime.md deleted file mode 100644 index d064e7c235..0000000000 --- a/sdks/api/runtime/rust/docs/ActorsRuntime.md +++ /dev/null @@ -1,13 +0,0 @@ -# ActorsRuntime - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**build** | [**uuid::Uuid**](uuid::Uuid.md) | | -**arguments** | Option<**Vec**> | | [optional] -**environment** | Option<**::std::collections::HashMap**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/api/runtime/rust/docs/BuildsAllocation.md b/sdks/api/runtime/rust/docs/BuildsAllocation.md deleted file mode 100644 index 0717f386d9..0000000000 --- a/sdks/api/runtime/rust/docs/BuildsAllocation.md +++ /dev/null @@ -1,12 +0,0 @@ -# BuildsAllocation - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**single** | Option<[**serde_json::Value**](.md)> | | [optional] -**multi** | Option<[**crate::models::BuildsAllocationMulti**](BuildsAllocationMulti.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/api/runtime/rust/docs/BuildsAllocationMulti.md b/sdks/api/runtime/rust/docs/BuildsAllocationMulti.md deleted file mode 100644 index 9096b6faa4..0000000000 --- a/sdks/api/runtime/rust/docs/BuildsAllocationMulti.md +++ /dev/null @@ -1,11 +0,0 @@ -# BuildsAllocationMulti - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**slots** | **i32** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/api/runtime/rust/docs/BuildsBuild.md b/sdks/api/runtime/rust/docs/BuildsBuild.md index 401ee67790..182e02ea31 100644 --- a/sdks/api/runtime/rust/docs/BuildsBuild.md +++ b/sdks/api/runtime/rust/docs/BuildsBuild.md @@ -8,9 +8,8 @@ Name | Type | Description | Notes **name** | **String** | | **created_at** | **String** | RFC3339 timestamp | **content_length** | **i64** | Unsigned 64 bit integer. | -**allocation** | Option<[**crate::models::BuildsAllocation**](BuildsAllocation.md)> | | [optional] -**resources** | Option<[**crate::models::BuildsResources**](BuildsResources.md)> | | [optional] **tags** | **::std::collections::HashMap** | Tags of this build | +**runtime** | Option<[**crate::models::BuildsRuntime**](BuildsRuntime.md)> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/api/full/rust/docs/ActorsNetworkMode.md b/sdks/api/runtime/rust/docs/BuildsNetworkMode.md similarity index 93% rename from sdks/api/full/rust/docs/ActorsNetworkMode.md rename to sdks/api/runtime/rust/docs/BuildsNetworkMode.md index 51e712c997..3d764610bc 100644 --- a/sdks/api/full/rust/docs/ActorsNetworkMode.md +++ b/sdks/api/runtime/rust/docs/BuildsNetworkMode.md @@ -1,4 +1,4 @@ -# ActorsNetworkMode +# BuildsNetworkMode ## Properties diff --git a/sdks/api/runtime/rust/docs/ActorsPortProtocol.md b/sdks/api/runtime/rust/docs/BuildsPortProtocol.md similarity index 92% rename from sdks/api/runtime/rust/docs/ActorsPortProtocol.md rename to sdks/api/runtime/rust/docs/BuildsPortProtocol.md index 0fe82e63d3..f60dd14efc 100644 --- a/sdks/api/runtime/rust/docs/ActorsPortProtocol.md +++ b/sdks/api/runtime/rust/docs/BuildsPortProtocol.md @@ -1,4 +1,4 @@ -# ActorsPortProtocol +# BuildsPortProtocol ## Properties diff --git a/sdks/api/runtime/rust/docs/ActorsCreateActorPortRequest.md b/sdks/api/runtime/rust/docs/BuildsPortRequest.md similarity index 64% rename from sdks/api/runtime/rust/docs/ActorsCreateActorPortRequest.md rename to sdks/api/runtime/rust/docs/BuildsPortRequest.md index d63c5a929d..2d64a9e5cd 100644 --- a/sdks/api/runtime/rust/docs/ActorsCreateActorPortRequest.md +++ b/sdks/api/runtime/rust/docs/BuildsPortRequest.md @@ -1,12 +1,12 @@ -# ActorsCreateActorPortRequest +# BuildsPortRequest ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**protocol** | [**crate::models::ActorsPortProtocol**](ActorsPortProtocol.md) | | +**protocol** | [**crate::models::BuildsPortProtocol**](BuildsPortProtocol.md) | | **internal_port** | Option<**i32**> | | [optional] -**routing** | Option<[**crate::models::ActorsPortRouting**](ActorsPortRouting.md)> | | [optional] +**routing** | Option<[**crate::models::BuildsPortRouting**](BuildsPortRouting.md)> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/api/runtime/rust/docs/ActorsPortRouting.md b/sdks/api/runtime/rust/docs/BuildsPortRouting.md similarity index 95% rename from sdks/api/runtime/rust/docs/ActorsPortRouting.md rename to sdks/api/runtime/rust/docs/BuildsPortRouting.md index 032387081b..5687fb3caf 100644 --- a/sdks/api/runtime/rust/docs/ActorsPortRouting.md +++ b/sdks/api/runtime/rust/docs/BuildsPortRouting.md @@ -1,4 +1,4 @@ -# ActorsPortRouting +# BuildsPortRouting ## Properties diff --git a/sdks/api/runtime/rust/docs/BuildsPrepareBuildRequest.md b/sdks/api/runtime/rust/docs/BuildsPrepareBuildRequest.md index 5dfc2aa88c..00c611fb27 100644 --- a/sdks/api/runtime/rust/docs/BuildsPrepareBuildRequest.md +++ b/sdks/api/runtime/rust/docs/BuildsPrepareBuildRequest.md @@ -8,8 +8,7 @@ Name | Type | Description | Notes **image_file** | [**crate::models::UploadPrepareFile**](UploadPrepareFile.md) | | **kind** | Option<[**crate::models::BuildsKind**](BuildsKind.md)> | | [optional] **compression** | Option<[**crate::models::BuildsCompression**](BuildsCompression.md)> | | [optional] -**allocation** | Option<[**crate::models::BuildsAllocation**](BuildsAllocation.md)> | | [optional] -**resources** | Option<[**crate::models::BuildsResources**](BuildsResources.md)> | | [optional] +**runtime** | Option<[**crate::models::BuildsRuntime**](BuildsRuntime.md)> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/api/runtime/rust/docs/BuildsResources.md b/sdks/api/runtime/rust/docs/BuildsResources.md index 597030f849..4116ed14e3 100644 --- a/sdks/api/runtime/rust/docs/BuildsResources.md +++ b/sdks/api/runtime/rust/docs/BuildsResources.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **cpu** | **i32** | The number of CPU cores in millicores, or 1/1000 of a core. For example, 1/8 of a core would be 125 millicores, and 1 core would be 1000 millicores. | -**memory** | **i32** | The amount of memory in megabytes | +**memory** | **i32** | The amount of memory in mebibytes | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/api/full/rust/docs/ActorsCreateActorRuntimeNetworkRequest.md b/sdks/api/runtime/rust/docs/BuildsRuntime.md similarity index 54% rename from sdks/api/full/rust/docs/ActorsCreateActorRuntimeNetworkRequest.md rename to sdks/api/runtime/rust/docs/BuildsRuntime.md index 91e5bb7669..e24bfbe377 100644 --- a/sdks/api/full/rust/docs/ActorsCreateActorRuntimeNetworkRequest.md +++ b/sdks/api/runtime/rust/docs/BuildsRuntime.md @@ -1,10 +1,11 @@ -# ActorsCreateActorRuntimeNetworkRequest +# BuildsRuntime ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**endpoint_type** | [**crate::models::ActorsEndpointType**](ActorsEndpointType.md) | | +**container** | Option<[**crate::models::BuildsRuntimeContainer**](BuildsRuntimeContainer.md)> | | [optional] +**actor** | Option<[**crate::models::BuildsRuntimeActor**](BuildsRuntimeActor.md)> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/api/full/rust/docs/ActorsCreateActorRuntimeRequest.md b/sdks/api/runtime/rust/docs/BuildsRuntimeActor.md similarity index 50% rename from sdks/api/full/rust/docs/ActorsCreateActorRuntimeRequest.md rename to sdks/api/runtime/rust/docs/BuildsRuntimeActor.md index 6dd58cb309..9d3c6eda35 100644 --- a/sdks/api/full/rust/docs/ActorsCreateActorRuntimeRequest.md +++ b/sdks/api/runtime/rust/docs/BuildsRuntimeActor.md @@ -1,11 +1,14 @@ -# ActorsCreateActorRuntimeRequest +# BuildsRuntimeActor ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **environment** | Option<**::std::collections::HashMap**> | | [optional] -**network** | Option<[**crate::models::ActorsCreateActorRuntimeNetworkRequest**](ActorsCreateActorRuntimeNetworkRequest.md)> | | [optional] +**network_mode** | Option<[**crate::models::BuildsNetworkMode**](BuildsNetworkMode.md)> | | [optional] +**ports** | Option<[**::std::collections::HashMap**](BuildsPortRequest.md)> | | [optional] +**resources** | [**crate::models::BuildsResources**](BuildsResources.md) | | +**slots** | **i32** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/api/full/rust/docs/ActorsRuntime.md b/sdks/api/runtime/rust/docs/BuildsRuntimeContainer.md similarity index 58% rename from sdks/api/full/rust/docs/ActorsRuntime.md rename to sdks/api/runtime/rust/docs/BuildsRuntimeContainer.md index d064e7c235..5ba71efad7 100644 --- a/sdks/api/full/rust/docs/ActorsRuntime.md +++ b/sdks/api/runtime/rust/docs/BuildsRuntimeContainer.md @@ -1,12 +1,12 @@ -# ActorsRuntime +# BuildsRuntimeContainer ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**build** | [**uuid::Uuid**](uuid::Uuid.md) | | -**arguments** | Option<**Vec**> | | [optional] **environment** | Option<**::std::collections::HashMap**> | | [optional] +**network_mode** | Option<[**crate::models::BuildsNetworkMode**](BuildsNetworkMode.md)> | | [optional] +**ports** | Option<[**::std::collections::HashMap**](BuildsPortRequest.md)> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/api/runtime/rust/docs/ContainersContainer.md b/sdks/api/runtime/rust/docs/ContainersContainer.md index d6d59a5979..0909512078 100644 --- a/sdks/api/runtime/rust/docs/ContainersContainer.md +++ b/sdks/api/runtime/rust/docs/ContainersContainer.md @@ -7,10 +7,13 @@ Name | Type | Description | Notes **id** | **String** | Can be a UUID or base36 encoded binary data. | **region** | **String** | | **tags** | Option<[**serde_json::Value**](.md)> | | -**runtime** | [**crate::models::ContainersRuntime**](ContainersRuntime.md) | | -**network** | [**crate::models::ContainersNetwork**](ContainersNetwork.md) | | -**resources** | [**crate::models::ContainersResources**](ContainersResources.md) | | -**lifecycle** | [**crate::models::ContainersLifecycle**](ContainersLifecycle.md) | | +**build** | [**uuid::Uuid**](uuid::Uuid.md) | | +**arguments** | Option<**Vec**> | | [optional] +**environment** | Option<**::std::collections::HashMap**> | | [optional] +**ports** | [**::std::collections::HashMap**](ContainersPort.md) | | +**resources** | [**crate::models::BuildsResources**](BuildsResources.md) | | +**kill_timeout** | Option<**i64**> | The duration to wait for in milliseconds before force killing the actor after a DELETE request. This gives the actor time to perform a shutdown sequence before being killed. This should be set to a safe default, and can be overridden during a DELETE request if needed. | [optional] +**durable** | Option<**bool**> | If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. | [optional] **created_at** | **String** | RFC3339 timestamp | **started_at** | Option<**String**> | RFC3339 timestamp | [optional] **destroyed_at** | Option<**String**> | RFC3339 timestamp | [optional] diff --git a/sdks/api/runtime/rust/docs/ContainersCreateContainerNetworkRequest.md b/sdks/api/runtime/rust/docs/ContainersCreateContainerNetworkRequest.md deleted file mode 100644 index 75819c3d43..0000000000 --- a/sdks/api/runtime/rust/docs/ContainersCreateContainerNetworkRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# ContainersCreateContainerNetworkRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mode** | Option<[**crate::models::ContainersNetworkMode**](ContainersNetworkMode.md)> | | [optional] -**ports** | Option<[**::std::collections::HashMap**](ContainersCreateContainerPortRequest.md)> | | [optional] -**wait_ready** | Option<**bool**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/api/runtime/rust/docs/ContainersCreateContainerPortRequest.md b/sdks/api/runtime/rust/docs/ContainersCreateContainerPortRequest.md deleted file mode 100644 index 1b0e5932e5..0000000000 --- a/sdks/api/runtime/rust/docs/ContainersCreateContainerPortRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# ContainersCreateContainerPortRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**protocol** | [**crate::models::ContainersPortProtocol**](ContainersPortProtocol.md) | | -**internal_port** | Option<**i32**> | | [optional] -**routing** | Option<[**crate::models::ContainersPortRouting**](ContainersPortRouting.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/api/runtime/rust/docs/ContainersCreateContainerRequest.md b/sdks/api/runtime/rust/docs/ContainersCreateContainerRequest.md index 0eb6be73e2..cd29faf228 100644 --- a/sdks/api/runtime/rust/docs/ContainersCreateContainerRequest.md +++ b/sdks/api/runtime/rust/docs/ContainersCreateContainerRequest.md @@ -8,10 +8,13 @@ Name | Type | Description | Notes **tags** | Option<[**serde_json::Value**](.md)> | | **build** | Option<[**uuid::Uuid**](uuid::Uuid.md)> | | [optional] **build_tags** | Option<[**serde_json::Value**](.md)> | | [optional] -**runtime** | Option<[**crate::models::ContainersCreateContainerRuntimeRequest**](ContainersCreateContainerRuntimeRequest.md)> | | [optional] -**network** | Option<[**crate::models::ContainersCreateContainerNetworkRequest**](ContainersCreateContainerNetworkRequest.md)> | | [optional] -**resources** | [**crate::models::ContainersResources**](ContainersResources.md) | | -**lifecycle** | Option<[**crate::models::ContainersLifecycle**](ContainersLifecycle.md)> | | [optional] +**environment** | Option<**::std::collections::HashMap**> | | [optional] +**network_endpoint_type** | Option<[**crate::models::ContainersEndpointType**](ContainersEndpointType.md)> | | [optional] +**wait_for_network_ready** | Option<**bool**> | | [optional] +**ports** | Option<[**::std::collections::HashMap**](BuildsPortRequest.md)> | | [optional] +**resources** | [**crate::models::BuildsResources**](BuildsResources.md) | | +**kill_timeout** | Option<**i64**> | The duration to wait for in milliseconds before force killing the actor after a DELETE request. This gives the actor time to perform a shutdown sequence before being killed. This should be set to a safe default, and can be overridden during a DELETE request if needed. | [optional] +**durable** | Option<**bool**> | If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/api/runtime/rust/docs/ContainersCreateContainerRuntimeNetworkRequest.md b/sdks/api/runtime/rust/docs/ContainersCreateContainerRuntimeNetworkRequest.md deleted file mode 100644 index d724ce6351..0000000000 --- a/sdks/api/runtime/rust/docs/ContainersCreateContainerRuntimeNetworkRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# ContainersCreateContainerRuntimeNetworkRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**endpoint_type** | [**crate::models::ContainersEndpointType**](ContainersEndpointType.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/api/runtime/rust/docs/ContainersCreateContainerRuntimeRequest.md b/sdks/api/runtime/rust/docs/ContainersCreateContainerRuntimeRequest.md deleted file mode 100644 index 0873cd62be..0000000000 --- a/sdks/api/runtime/rust/docs/ContainersCreateContainerRuntimeRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# ContainersCreateContainerRuntimeRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**environment** | Option<**::std::collections::HashMap**> | | [optional] -**network** | Option<[**crate::models::ContainersCreateContainerRuntimeNetworkRequest**](ContainersCreateContainerRuntimeNetworkRequest.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/api/runtime/rust/docs/ContainersLifecycle.md b/sdks/api/runtime/rust/docs/ContainersLifecycle.md deleted file mode 100644 index 6e5dc7cef0..0000000000 --- a/sdks/api/runtime/rust/docs/ContainersLifecycle.md +++ /dev/null @@ -1,12 +0,0 @@ -# ContainersLifecycle - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kill_timeout** | Option<**i64**> | The duration to wait for in milliseconds before killing the container. This should be set to a safe default, and can be overridden during a DELETE request if needed. | [optional] -**durable** | Option<**bool**> | If true, the container will try to reschedule itself automatically in the event of a crash or a datacenter failover. The container will not reschedule if it exits successfully. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/api/runtime/rust/docs/ContainersNetwork.md b/sdks/api/runtime/rust/docs/ContainersNetwork.md deleted file mode 100644 index 41b81ebb4f..0000000000 --- a/sdks/api/runtime/rust/docs/ContainersNetwork.md +++ /dev/null @@ -1,12 +0,0 @@ -# ContainersNetwork - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mode** | [**crate::models::ContainersNetworkMode**](ContainersNetworkMode.md) | | -**ports** | [**::std::collections::HashMap**](ContainersPort.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/api/runtime/rust/docs/ContainersNetworkMode.md b/sdks/api/runtime/rust/docs/ContainersNetworkMode.md deleted file mode 100644 index bc4a4e115b..0000000000 --- a/sdks/api/runtime/rust/docs/ContainersNetworkMode.md +++ /dev/null @@ -1,10 +0,0 @@ -# ContainersNetworkMode - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/api/runtime/rust/docs/ContainersPort.md b/sdks/api/runtime/rust/docs/ContainersPort.md index 46ace3b43e..23c0afc541 100644 --- a/sdks/api/runtime/rust/docs/ContainersPort.md +++ b/sdks/api/runtime/rust/docs/ContainersPort.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**protocol** | [**crate::models::ContainersPortProtocol**](ContainersPortProtocol.md) | | +**protocol** | [**crate::models::BuildsPortProtocol**](BuildsPortProtocol.md) | | **internal_port** | Option<**i32**> | | [optional] **hostname** | Option<**String**> | | [optional] **port** | Option<**i32**> | | [optional] **path** | Option<**String**> | | [optional] **url** | Option<**String**> | Fully formed connection URL including protocol, hostname, port, and path, if applicable. | [optional] -**routing** | [**crate::models::ContainersPortRouting**](ContainersPortRouting.md) | | +**routing** | [**crate::models::BuildsPortRouting**](BuildsPortRouting.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/api/runtime/rust/docs/ContainersPortProtocol.md b/sdks/api/runtime/rust/docs/ContainersPortProtocol.md deleted file mode 100644 index a69a314e54..0000000000 --- a/sdks/api/runtime/rust/docs/ContainersPortProtocol.md +++ /dev/null @@ -1,10 +0,0 @@ -# ContainersPortProtocol - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/api/runtime/rust/docs/ContainersPortRouting.md b/sdks/api/runtime/rust/docs/ContainersPortRouting.md deleted file mode 100644 index dd0c620964..0000000000 --- a/sdks/api/runtime/rust/docs/ContainersPortRouting.md +++ /dev/null @@ -1,12 +0,0 @@ -# ContainersPortRouting - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**guard** | Option<[**serde_json::Value**](.md)> | | [optional] -**host** | Option<[**serde_json::Value**](.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/api/runtime/rust/docs/ContainersResources.md b/sdks/api/runtime/rust/docs/ContainersResources.md deleted file mode 100644 index a32f979d17..0000000000 --- a/sdks/api/runtime/rust/docs/ContainersResources.md +++ /dev/null @@ -1,12 +0,0 @@ -# ContainersResources - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cpu** | **i32** | The number of CPU cores in millicores, or 1/1000 of a core. For example, 1/8 of a core would be 125 millicores, and 1 core would be 1000 millicores. | -**memory** | **i32** | The amount of memory in megabytes | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/api/runtime/rust/docs/ContainersRuntime.md b/sdks/api/runtime/rust/docs/ContainersRuntime.md deleted file mode 100644 index ea30224b4b..0000000000 --- a/sdks/api/runtime/rust/docs/ContainersRuntime.md +++ /dev/null @@ -1,13 +0,0 @@ -# ContainersRuntime - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**build** | [**uuid::Uuid**](uuid::Uuid.md) | | -**arguments** | Option<**Vec**> | | [optional] -**environment** | Option<**::std::collections::HashMap**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/sdks/api/runtime/rust/src/models/actors_actor.rs b/sdks/api/runtime/rust/src/models/actors_actor.rs index 425c5c846b..b636736c39 100644 --- a/sdks/api/runtime/rust/src/models/actors_actor.rs +++ b/sdks/api/runtime/rust/src/models/actors_actor.rs @@ -20,12 +20,16 @@ pub struct ActorsActor { pub region: String, #[serde(rename = "tags", deserialize_with = "Option::deserialize")] pub tags: Option, - #[serde(rename = "runtime")] - pub runtime: Box, - #[serde(rename = "network")] - pub network: Box, - #[serde(rename = "lifecycle")] - pub lifecycle: Box, + #[serde(rename = "build")] + pub build: uuid::Uuid, + #[serde(rename = "ports")] + pub ports: ::std::collections::HashMap, + /// The duration to wait for in milliseconds before force killing the actor after a DELETE request. This gives the actor time to perform a shutdown sequence before being killed. This should be set to a safe default, and can be overridden during a DELETE request if needed. + #[serde(rename = "kill_timeout", skip_serializing_if = "Option::is_none")] + pub kill_timeout: Option, + /// If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. + #[serde(rename = "durable", skip_serializing_if = "Option::is_none")] + pub durable: Option, /// RFC3339 timestamp #[serde(rename = "created_at")] pub created_at: String, @@ -38,14 +42,15 @@ pub struct ActorsActor { } impl ActorsActor { - pub fn new(id: String, region: String, tags: Option, runtime: crate::models::ActorsRuntime, network: crate::models::ActorsNetwork, lifecycle: crate::models::ActorsLifecycle, created_at: String) -> ActorsActor { + pub fn new(id: String, region: String, tags: Option, build: uuid::Uuid, ports: ::std::collections::HashMap, created_at: String) -> ActorsActor { ActorsActor { id, region, tags, - runtime: Box::new(runtime), - network: Box::new(network), - lifecycle: Box::new(lifecycle), + build, + ports, + kill_timeout: None, + durable: None, created_at, started_at: None, destroyed_at: None, diff --git a/sdks/api/runtime/rust/src/models/actors_create_actor_network_request.rs b/sdks/api/runtime/rust/src/models/actors_create_actor_network_request.rs deleted file mode 100644 index 7904cb2267..0000000000 --- a/sdks/api/runtime/rust/src/models/actors_create_actor_network_request.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct ActorsCreateActorNetworkRequest { - #[serde(rename = "mode", skip_serializing_if = "Option::is_none")] - pub mode: Option, - #[serde(rename = "ports", skip_serializing_if = "Option::is_none")] - pub ports: Option<::std::collections::HashMap>, - #[serde(rename = "wait_ready", skip_serializing_if = "Option::is_none")] - pub wait_ready: Option, -} - -impl ActorsCreateActorNetworkRequest { - pub fn new() -> ActorsCreateActorNetworkRequest { - ActorsCreateActorNetworkRequest { - mode: None, - ports: None, - wait_ready: None, - } - } -} - - diff --git a/sdks/api/runtime/rust/src/models/actors_create_actor_request.rs b/sdks/api/runtime/rust/src/models/actors_create_actor_request.rs index 5256ec681c..ea2d4faccc 100644 --- a/sdks/api/runtime/rust/src/models/actors_create_actor_request.rs +++ b/sdks/api/runtime/rust/src/models/actors_create_actor_request.rs @@ -21,12 +21,16 @@ pub struct ActorsCreateActorRequest { pub build: Option, #[serde(rename = "build_tags", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub build_tags: Option>, - #[serde(rename = "runtime", skip_serializing_if = "Option::is_none")] - pub runtime: Option>, - #[serde(rename = "network", skip_serializing_if = "Option::is_none")] - pub network: Option>, - #[serde(rename = "lifecycle", skip_serializing_if = "Option::is_none")] - pub lifecycle: Option>, + #[serde(rename = "network_endpoint_type", skip_serializing_if = "Option::is_none")] + pub network_endpoint_type: Option, + #[serde(rename = "wait_for_network_ready", skip_serializing_if = "Option::is_none")] + pub wait_for_network_ready: Option, + /// The duration to wait for in milliseconds before force killing the actor after a DELETE request. This gives the actor time to perform a shutdown sequence before being killed. This should be set to a safe default, and can be overridden during a DELETE request if needed. + #[serde(rename = "kill_timeout", skip_serializing_if = "Option::is_none")] + pub kill_timeout: Option, + /// If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. + #[serde(rename = "durable", skip_serializing_if = "Option::is_none")] + pub durable: Option, } impl ActorsCreateActorRequest { @@ -36,9 +40,10 @@ impl ActorsCreateActorRequest { tags, build: None, build_tags: None, - runtime: None, - network: None, - lifecycle: None, + network_endpoint_type: None, + wait_for_network_ready: None, + kill_timeout: None, + durable: None, } } } diff --git a/sdks/api/runtime/rust/src/models/actors_create_actor_runtime_network_request.rs b/sdks/api/runtime/rust/src/models/actors_create_actor_runtime_network_request.rs deleted file mode 100644 index e2baa914ec..0000000000 --- a/sdks/api/runtime/rust/src/models/actors_create_actor_runtime_network_request.rs +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct ActorsCreateActorRuntimeNetworkRequest { - #[serde(rename = "endpoint_type")] - pub endpoint_type: crate::models::ActorsEndpointType, -} - -impl ActorsCreateActorRuntimeNetworkRequest { - pub fn new(endpoint_type: crate::models::ActorsEndpointType) -> ActorsCreateActorRuntimeNetworkRequest { - ActorsCreateActorRuntimeNetworkRequest { - endpoint_type, - } - } -} - - diff --git a/sdks/api/runtime/rust/src/models/actors_lifecycle.rs b/sdks/api/runtime/rust/src/models/actors_lifecycle.rs deleted file mode 100644 index a43e2b85ad..0000000000 --- a/sdks/api/runtime/rust/src/models/actors_lifecycle.rs +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct ActorsLifecycle { - /// The duration to wait for in milliseconds before killing the actor. This should be set to a safe default, and can be overridden during a DELETE request if needed. - #[serde(rename = "kill_timeout", skip_serializing_if = "Option::is_none")] - pub kill_timeout: Option, - /// If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. - #[serde(rename = "durable", skip_serializing_if = "Option::is_none")] - pub durable: Option, -} - -impl ActorsLifecycle { - pub fn new() -> ActorsLifecycle { - ActorsLifecycle { - kill_timeout: None, - durable: None, - } - } -} - - diff --git a/sdks/api/runtime/rust/src/models/actors_network.rs b/sdks/api/runtime/rust/src/models/actors_network.rs deleted file mode 100644 index da9b3c770a..0000000000 --- a/sdks/api/runtime/rust/src/models/actors_network.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct ActorsNetwork { - #[serde(rename = "mode")] - pub mode: crate::models::ActorsNetworkMode, - #[serde(rename = "ports")] - pub ports: ::std::collections::HashMap, -} - -impl ActorsNetwork { - pub fn new(mode: crate::models::ActorsNetworkMode, ports: ::std::collections::HashMap) -> ActorsNetwork { - ActorsNetwork { - mode, - ports, - } - } -} - - diff --git a/sdks/api/runtime/rust/src/models/actors_port.rs b/sdks/api/runtime/rust/src/models/actors_port.rs index fe4d88daa0..0cc888c123 100644 --- a/sdks/api/runtime/rust/src/models/actors_port.rs +++ b/sdks/api/runtime/rust/src/models/actors_port.rs @@ -14,7 +14,7 @@ #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ActorsPort { #[serde(rename = "protocol")] - pub protocol: crate::models::ActorsPortProtocol, + pub protocol: crate::models::BuildsPortProtocol, #[serde(rename = "internal_port", skip_serializing_if = "Option::is_none")] pub internal_port: Option, #[serde(rename = "hostname", skip_serializing_if = "Option::is_none")] @@ -27,11 +27,11 @@ pub struct ActorsPort { #[serde(rename = "url", skip_serializing_if = "Option::is_none")] pub url: Option, #[serde(rename = "routing")] - pub routing: Box, + pub routing: Box, } impl ActorsPort { - pub fn new(protocol: crate::models::ActorsPortProtocol, routing: crate::models::ActorsPortRouting) -> ActorsPort { + pub fn new(protocol: crate::models::BuildsPortProtocol, routing: crate::models::BuildsPortRouting) -> ActorsPort { ActorsPort { protocol, internal_port: None, diff --git a/sdks/api/runtime/rust/src/models/actors_runtime.rs b/sdks/api/runtime/rust/src/models/actors_runtime.rs deleted file mode 100644 index f8e092c6e0..0000000000 --- a/sdks/api/runtime/rust/src/models/actors_runtime.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct ActorsRuntime { - #[serde(rename = "build")] - pub build: uuid::Uuid, - #[serde(rename = "arguments", skip_serializing_if = "Option::is_none")] - pub arguments: Option>, - #[serde(rename = "environment", skip_serializing_if = "Option::is_none")] - pub environment: Option<::std::collections::HashMap>, -} - -impl ActorsRuntime { - pub fn new(build: uuid::Uuid) -> ActorsRuntime { - ActorsRuntime { - build, - arguments: None, - environment: None, - } - } -} - - diff --git a/sdks/api/runtime/rust/src/models/builds_allocation.rs b/sdks/api/runtime/rust/src/models/builds_allocation.rs deleted file mode 100644 index 8506507c52..0000000000 --- a/sdks/api/runtime/rust/src/models/builds_allocation.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct BuildsAllocation { - #[serde(rename = "single", skip_serializing_if = "Option::is_none")] - pub single: Option, - #[serde(rename = "multi", skip_serializing_if = "Option::is_none")] - pub multi: Option>, -} - -impl BuildsAllocation { - pub fn new() -> BuildsAllocation { - BuildsAllocation { - single: None, - multi: None, - } - } -} - - diff --git a/sdks/api/runtime/rust/src/models/builds_allocation_multi.rs b/sdks/api/runtime/rust/src/models/builds_allocation_multi.rs deleted file mode 100644 index 3151620af6..0000000000 --- a/sdks/api/runtime/rust/src/models/builds_allocation_multi.rs +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct BuildsAllocationMulti { - #[serde(rename = "slots")] - pub slots: i32, -} - -impl BuildsAllocationMulti { - pub fn new(slots: i32) -> BuildsAllocationMulti { - BuildsAllocationMulti { - slots, - } - } -} - - diff --git a/sdks/api/runtime/rust/src/models/builds_build.rs b/sdks/api/runtime/rust/src/models/builds_build.rs index 025f79ac23..bbd461b334 100644 --- a/sdks/api/runtime/rust/src/models/builds_build.rs +++ b/sdks/api/runtime/rust/src/models/builds_build.rs @@ -23,13 +23,11 @@ pub struct BuildsBuild { /// Unsigned 64 bit integer. #[serde(rename = "content_length")] pub content_length: i64, - #[serde(rename = "allocation", skip_serializing_if = "Option::is_none")] - pub allocation: Option>, - #[serde(rename = "resources", skip_serializing_if = "Option::is_none")] - pub resources: Option>, /// Tags of this build #[serde(rename = "tags")] pub tags: ::std::collections::HashMap, + #[serde(rename = "runtime", skip_serializing_if = "Option::is_none")] + pub runtime: Option>, } impl BuildsBuild { @@ -39,9 +37,8 @@ impl BuildsBuild { name, created_at, content_length, - allocation: None, - resources: None, tags, + runtime: None, } } } diff --git a/sdks/api/runtime/rust/src/models/actors_network_mode.rs b/sdks/api/runtime/rust/src/models/builds_network_mode.rs similarity index 81% rename from sdks/api/runtime/rust/src/models/actors_network_mode.rs rename to sdks/api/runtime/rust/src/models/builds_network_mode.rs index 8c8fe255ff..a93b417de5 100644 --- a/sdks/api/runtime/rust/src/models/actors_network_mode.rs +++ b/sdks/api/runtime/rust/src/models/builds_network_mode.rs @@ -11,7 +11,7 @@ /// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum ActorsNetworkMode { +pub enum BuildsNetworkMode { #[serde(rename = "bridge")] Bridge, #[serde(rename = "host")] @@ -19,7 +19,7 @@ pub enum ActorsNetworkMode { } -impl ToString for ActorsNetworkMode { +impl ToString for BuildsNetworkMode { fn to_string(&self) -> String { match self { Self::Bridge => String::from("bridge"), @@ -28,8 +28,8 @@ impl ToString for ActorsNetworkMode { } } -impl Default for ActorsNetworkMode { - fn default() -> ActorsNetworkMode { +impl Default for BuildsNetworkMode { + fn default() -> BuildsNetworkMode { Self::Bridge } } diff --git a/sdks/api/runtime/rust/src/models/actors_port_protocol.rs b/sdks/api/runtime/rust/src/models/builds_port_protocol.rs similarity index 85% rename from sdks/api/runtime/rust/src/models/actors_port_protocol.rs rename to sdks/api/runtime/rust/src/models/builds_port_protocol.rs index 5a42f4ff9d..1319ad38de 100644 --- a/sdks/api/runtime/rust/src/models/actors_port_protocol.rs +++ b/sdks/api/runtime/rust/src/models/builds_port_protocol.rs @@ -11,7 +11,7 @@ /// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum ActorsPortProtocol { +pub enum BuildsPortProtocol { #[serde(rename = "http")] Http, #[serde(rename = "https")] @@ -25,7 +25,7 @@ pub enum ActorsPortProtocol { } -impl ToString for ActorsPortProtocol { +impl ToString for BuildsPortProtocol { fn to_string(&self) -> String { match self { Self::Http => String::from("http"), @@ -37,8 +37,8 @@ impl ToString for ActorsPortProtocol { } } -impl Default for ActorsPortProtocol { - fn default() -> ActorsPortProtocol { +impl Default for BuildsPortProtocol { + fn default() -> BuildsPortProtocol { Self::Http } } diff --git a/sdks/api/runtime/rust/src/models/actors_create_actor_port_request.rs b/sdks/api/runtime/rust/src/models/builds_port_request.rs similarity index 65% rename from sdks/api/runtime/rust/src/models/actors_create_actor_port_request.rs rename to sdks/api/runtime/rust/src/models/builds_port_request.rs index f1aa42cc06..eaaf8b4ba6 100644 --- a/sdks/api/runtime/rust/src/models/actors_create_actor_port_request.rs +++ b/sdks/api/runtime/rust/src/models/builds_port_request.rs @@ -12,18 +12,18 @@ #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct ActorsCreateActorPortRequest { +pub struct BuildsPortRequest { #[serde(rename = "protocol")] - pub protocol: crate::models::ActorsPortProtocol, + pub protocol: crate::models::BuildsPortProtocol, #[serde(rename = "internal_port", skip_serializing_if = "Option::is_none")] pub internal_port: Option, #[serde(rename = "routing", skip_serializing_if = "Option::is_none")] - pub routing: Option>, + pub routing: Option>, } -impl ActorsCreateActorPortRequest { - pub fn new(protocol: crate::models::ActorsPortProtocol) -> ActorsCreateActorPortRequest { - ActorsCreateActorPortRequest { +impl BuildsPortRequest { + pub fn new(protocol: crate::models::BuildsPortProtocol) -> BuildsPortRequest { + BuildsPortRequest { protocol, internal_port: None, routing: None, diff --git a/sdks/api/runtime/rust/src/models/actors_port_routing.rs b/sdks/api/runtime/rust/src/models/builds_port_routing.rs similarity index 82% rename from sdks/api/runtime/rust/src/models/actors_port_routing.rs rename to sdks/api/runtime/rust/src/models/builds_port_routing.rs index 71ac26e24a..8cfbc9a4b8 100644 --- a/sdks/api/runtime/rust/src/models/actors_port_routing.rs +++ b/sdks/api/runtime/rust/src/models/builds_port_routing.rs @@ -12,16 +12,16 @@ #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct ActorsPortRouting { +pub struct BuildsPortRouting { #[serde(rename = "guard", skip_serializing_if = "Option::is_none")] pub guard: Option, #[serde(rename = "host", skip_serializing_if = "Option::is_none")] pub host: Option, } -impl ActorsPortRouting { - pub fn new() -> ActorsPortRouting { - ActorsPortRouting { +impl BuildsPortRouting { + pub fn new() -> BuildsPortRouting { + BuildsPortRouting { guard: None, host: None, } diff --git a/sdks/api/runtime/rust/src/models/builds_prepare_build_request.rs b/sdks/api/runtime/rust/src/models/builds_prepare_build_request.rs index dcaa998e2d..e4c917a60e 100644 --- a/sdks/api/runtime/rust/src/models/builds_prepare_build_request.rs +++ b/sdks/api/runtime/rust/src/models/builds_prepare_build_request.rs @@ -22,10 +22,8 @@ pub struct BuildsPrepareBuildRequest { pub kind: Option, #[serde(rename = "compression", skip_serializing_if = "Option::is_none")] pub compression: Option, - #[serde(rename = "allocation", skip_serializing_if = "Option::is_none")] - pub allocation: Option>, - #[serde(rename = "resources", skip_serializing_if = "Option::is_none")] - pub resources: Option>, + #[serde(rename = "runtime", skip_serializing_if = "Option::is_none")] + pub runtime: Option>, } impl BuildsPrepareBuildRequest { @@ -35,8 +33,7 @@ impl BuildsPrepareBuildRequest { image_file: Box::new(image_file), kind: None, compression: None, - allocation: None, - resources: None, + runtime: None, } } } diff --git a/sdks/api/runtime/rust/src/models/builds_resources.rs b/sdks/api/runtime/rust/src/models/builds_resources.rs index 48b481410b..87506445e0 100644 --- a/sdks/api/runtime/rust/src/models/builds_resources.rs +++ b/sdks/api/runtime/rust/src/models/builds_resources.rs @@ -16,7 +16,7 @@ pub struct BuildsResources { /// The number of CPU cores in millicores, or 1/1000 of a core. For example, 1/8 of a core would be 125 millicores, and 1 core would be 1000 millicores. #[serde(rename = "cpu")] pub cpu: i32, - /// The amount of memory in megabytes + /// The amount of memory in mebibytes #[serde(rename = "memory")] pub memory: i32, } diff --git a/sdks/api/runtime/rust/src/models/builds_runtime.rs b/sdks/api/runtime/rust/src/models/builds_runtime.rs new file mode 100644 index 0000000000..f651fcc3e1 --- /dev/null +++ b/sdks/api/runtime/rust/src/models/builds_runtime.rs @@ -0,0 +1,31 @@ +/* + * Rivet API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct BuildsRuntime { + #[serde(rename = "container", skip_serializing_if = "Option::is_none")] + pub container: Option>, + #[serde(rename = "actor", skip_serializing_if = "Option::is_none")] + pub actor: Option>, +} + +impl BuildsRuntime { + pub fn new() -> BuildsRuntime { + BuildsRuntime { + container: None, + actor: None, + } + } +} + + diff --git a/sdks/api/runtime/rust/src/models/builds_runtime_actor.rs b/sdks/api/runtime/rust/src/models/builds_runtime_actor.rs new file mode 100644 index 0000000000..07bf77c7e9 --- /dev/null +++ b/sdks/api/runtime/rust/src/models/builds_runtime_actor.rs @@ -0,0 +1,40 @@ +/* + * Rivet API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct BuildsRuntimeActor { + #[serde(rename = "environment", skip_serializing_if = "Option::is_none")] + pub environment: Option<::std::collections::HashMap>, + #[serde(rename = "network_mode", skip_serializing_if = "Option::is_none")] + pub network_mode: Option, + #[serde(rename = "ports", skip_serializing_if = "Option::is_none")] + pub ports: Option<::std::collections::HashMap>, + #[serde(rename = "resources")] + pub resources: Box, + #[serde(rename = "slots")] + pub slots: i32, +} + +impl BuildsRuntimeActor { + pub fn new(resources: crate::models::BuildsResources, slots: i32) -> BuildsRuntimeActor { + BuildsRuntimeActor { + environment: None, + network_mode: None, + ports: None, + resources: Box::new(resources), + slots, + } + } +} + + diff --git a/sdks/api/runtime/rust/src/models/actors_create_actor_runtime_request.rs b/sdks/api/runtime/rust/src/models/builds_runtime_container.rs similarity index 50% rename from sdks/api/runtime/rust/src/models/actors_create_actor_runtime_request.rs rename to sdks/api/runtime/rust/src/models/builds_runtime_container.rs index 93d670c19c..692fb47dfa 100644 --- a/sdks/api/runtime/rust/src/models/actors_create_actor_runtime_request.rs +++ b/sdks/api/runtime/rust/src/models/builds_runtime_container.rs @@ -12,18 +12,21 @@ #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct ActorsCreateActorRuntimeRequest { +pub struct BuildsRuntimeContainer { #[serde(rename = "environment", skip_serializing_if = "Option::is_none")] pub environment: Option<::std::collections::HashMap>, - #[serde(rename = "network", skip_serializing_if = "Option::is_none")] - pub network: Option>, + #[serde(rename = "network_mode", skip_serializing_if = "Option::is_none")] + pub network_mode: Option, + #[serde(rename = "ports", skip_serializing_if = "Option::is_none")] + pub ports: Option<::std::collections::HashMap>, } -impl ActorsCreateActorRuntimeRequest { - pub fn new() -> ActorsCreateActorRuntimeRequest { - ActorsCreateActorRuntimeRequest { +impl BuildsRuntimeContainer { + pub fn new() -> BuildsRuntimeContainer { + BuildsRuntimeContainer { environment: None, - network: None, + network_mode: None, + ports: None, } } } diff --git a/sdks/api/runtime/rust/src/models/containers_container.rs b/sdks/api/runtime/rust/src/models/containers_container.rs index 8bc53f90d7..8c817b3966 100644 --- a/sdks/api/runtime/rust/src/models/containers_container.rs +++ b/sdks/api/runtime/rust/src/models/containers_container.rs @@ -20,14 +20,22 @@ pub struct ContainersContainer { pub region: String, #[serde(rename = "tags", deserialize_with = "Option::deserialize")] pub tags: Option, - #[serde(rename = "runtime")] - pub runtime: Box, - #[serde(rename = "network")] - pub network: Box, + #[serde(rename = "build")] + pub build: uuid::Uuid, + #[serde(rename = "arguments", skip_serializing_if = "Option::is_none")] + pub arguments: Option>, + #[serde(rename = "environment", skip_serializing_if = "Option::is_none")] + pub environment: Option<::std::collections::HashMap>, + #[serde(rename = "ports")] + pub ports: ::std::collections::HashMap, #[serde(rename = "resources")] - pub resources: Box, - #[serde(rename = "lifecycle")] - pub lifecycle: Box, + pub resources: Box, + /// The duration to wait for in milliseconds before force killing the actor after a DELETE request. This gives the actor time to perform a shutdown sequence before being killed. This should be set to a safe default, and can be overridden during a DELETE request if needed. + #[serde(rename = "kill_timeout", skip_serializing_if = "Option::is_none")] + pub kill_timeout: Option, + /// If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. + #[serde(rename = "durable", skip_serializing_if = "Option::is_none")] + pub durable: Option, /// RFC3339 timestamp #[serde(rename = "created_at")] pub created_at: String, @@ -40,15 +48,18 @@ pub struct ContainersContainer { } impl ContainersContainer { - pub fn new(id: String, region: String, tags: Option, runtime: crate::models::ContainersRuntime, network: crate::models::ContainersNetwork, resources: crate::models::ContainersResources, lifecycle: crate::models::ContainersLifecycle, created_at: String) -> ContainersContainer { + pub fn new(id: String, region: String, tags: Option, build: uuid::Uuid, ports: ::std::collections::HashMap, resources: crate::models::BuildsResources, created_at: String) -> ContainersContainer { ContainersContainer { id, region, tags, - runtime: Box::new(runtime), - network: Box::new(network), + build, + arguments: None, + environment: None, + ports, resources: Box::new(resources), - lifecycle: Box::new(lifecycle), + kill_timeout: None, + durable: None, created_at, started_at: None, destroyed_at: None, diff --git a/sdks/api/runtime/rust/src/models/containers_create_container_network_request.rs b/sdks/api/runtime/rust/src/models/containers_create_container_network_request.rs deleted file mode 100644 index ac0e9726c3..0000000000 --- a/sdks/api/runtime/rust/src/models/containers_create_container_network_request.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct ContainersCreateContainerNetworkRequest { - #[serde(rename = "mode", skip_serializing_if = "Option::is_none")] - pub mode: Option, - #[serde(rename = "ports", skip_serializing_if = "Option::is_none")] - pub ports: Option<::std::collections::HashMap>, - #[serde(rename = "wait_ready", skip_serializing_if = "Option::is_none")] - pub wait_ready: Option, -} - -impl ContainersCreateContainerNetworkRequest { - pub fn new() -> ContainersCreateContainerNetworkRequest { - ContainersCreateContainerNetworkRequest { - mode: None, - ports: None, - wait_ready: None, - } - } -} - - diff --git a/sdks/api/runtime/rust/src/models/containers_create_container_port_request.rs b/sdks/api/runtime/rust/src/models/containers_create_container_port_request.rs deleted file mode 100644 index 3741e52d6a..0000000000 --- a/sdks/api/runtime/rust/src/models/containers_create_container_port_request.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct ContainersCreateContainerPortRequest { - #[serde(rename = "protocol")] - pub protocol: crate::models::ContainersPortProtocol, - #[serde(rename = "internal_port", skip_serializing_if = "Option::is_none")] - pub internal_port: Option, - #[serde(rename = "routing", skip_serializing_if = "Option::is_none")] - pub routing: Option>, -} - -impl ContainersCreateContainerPortRequest { - pub fn new(protocol: crate::models::ContainersPortProtocol) -> ContainersCreateContainerPortRequest { - ContainersCreateContainerPortRequest { - protocol, - internal_port: None, - routing: None, - } - } -} - - diff --git a/sdks/api/runtime/rust/src/models/containers_create_container_request.rs b/sdks/api/runtime/rust/src/models/containers_create_container_request.rs index ae6763b81e..1193102f99 100644 --- a/sdks/api/runtime/rust/src/models/containers_create_container_request.rs +++ b/sdks/api/runtime/rust/src/models/containers_create_container_request.rs @@ -21,27 +21,38 @@ pub struct ContainersCreateContainerRequest { pub build: Option, #[serde(rename = "build_tags", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub build_tags: Option>, - #[serde(rename = "runtime", skip_serializing_if = "Option::is_none")] - pub runtime: Option>, - #[serde(rename = "network", skip_serializing_if = "Option::is_none")] - pub network: Option>, + #[serde(rename = "environment", skip_serializing_if = "Option::is_none")] + pub environment: Option<::std::collections::HashMap>, + #[serde(rename = "network_endpoint_type", skip_serializing_if = "Option::is_none")] + pub network_endpoint_type: Option, + #[serde(rename = "wait_for_network_ready", skip_serializing_if = "Option::is_none")] + pub wait_for_network_ready: Option, + #[serde(rename = "ports", skip_serializing_if = "Option::is_none")] + pub ports: Option<::std::collections::HashMap>, #[serde(rename = "resources")] - pub resources: Box, - #[serde(rename = "lifecycle", skip_serializing_if = "Option::is_none")] - pub lifecycle: Option>, + pub resources: Box, + /// The duration to wait for in milliseconds before force killing the actor after a DELETE request. This gives the actor time to perform a shutdown sequence before being killed. This should be set to a safe default, and can be overridden during a DELETE request if needed. + #[serde(rename = "kill_timeout", skip_serializing_if = "Option::is_none")] + pub kill_timeout: Option, + /// If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. + #[serde(rename = "durable", skip_serializing_if = "Option::is_none")] + pub durable: Option, } impl ContainersCreateContainerRequest { - pub fn new(tags: Option, resources: crate::models::ContainersResources) -> ContainersCreateContainerRequest { + pub fn new(tags: Option, resources: crate::models::BuildsResources) -> ContainersCreateContainerRequest { ContainersCreateContainerRequest { region: None, tags, build: None, build_tags: None, - runtime: None, - network: None, + environment: None, + network_endpoint_type: None, + wait_for_network_ready: None, + ports: None, resources: Box::new(resources), - lifecycle: None, + kill_timeout: None, + durable: None, } } } diff --git a/sdks/api/runtime/rust/src/models/containers_create_container_runtime_network_request.rs b/sdks/api/runtime/rust/src/models/containers_create_container_runtime_network_request.rs deleted file mode 100644 index 8e61dce98a..0000000000 --- a/sdks/api/runtime/rust/src/models/containers_create_container_runtime_network_request.rs +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct ContainersCreateContainerRuntimeNetworkRequest { - #[serde(rename = "endpoint_type")] - pub endpoint_type: crate::models::ContainersEndpointType, -} - -impl ContainersCreateContainerRuntimeNetworkRequest { - pub fn new(endpoint_type: crate::models::ContainersEndpointType) -> ContainersCreateContainerRuntimeNetworkRequest { - ContainersCreateContainerRuntimeNetworkRequest { - endpoint_type, - } - } -} - - diff --git a/sdks/api/runtime/rust/src/models/containers_create_container_runtime_request.rs b/sdks/api/runtime/rust/src/models/containers_create_container_runtime_request.rs deleted file mode 100644 index 8915fe4b94..0000000000 --- a/sdks/api/runtime/rust/src/models/containers_create_container_runtime_request.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct ContainersCreateContainerRuntimeRequest { - #[serde(rename = "environment", skip_serializing_if = "Option::is_none")] - pub environment: Option<::std::collections::HashMap>, - #[serde(rename = "network", skip_serializing_if = "Option::is_none")] - pub network: Option>, -} - -impl ContainersCreateContainerRuntimeRequest { - pub fn new() -> ContainersCreateContainerRuntimeRequest { - ContainersCreateContainerRuntimeRequest { - environment: None, - network: None, - } - } -} - - diff --git a/sdks/api/runtime/rust/src/models/containers_lifecycle.rs b/sdks/api/runtime/rust/src/models/containers_lifecycle.rs deleted file mode 100644 index decbcb830b..0000000000 --- a/sdks/api/runtime/rust/src/models/containers_lifecycle.rs +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct ContainersLifecycle { - /// The duration to wait for in milliseconds before killing the container. This should be set to a safe default, and can be overridden during a DELETE request if needed. - #[serde(rename = "kill_timeout", skip_serializing_if = "Option::is_none")] - pub kill_timeout: Option, - /// If true, the container will try to reschedule itself automatically in the event of a crash or a datacenter failover. The container will not reschedule if it exits successfully. - #[serde(rename = "durable", skip_serializing_if = "Option::is_none")] - pub durable: Option, -} - -impl ContainersLifecycle { - pub fn new() -> ContainersLifecycle { - ContainersLifecycle { - kill_timeout: None, - durable: None, - } - } -} - - diff --git a/sdks/api/runtime/rust/src/models/containers_network.rs b/sdks/api/runtime/rust/src/models/containers_network.rs deleted file mode 100644 index 09e41996f3..0000000000 --- a/sdks/api/runtime/rust/src/models/containers_network.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct ContainersNetwork { - #[serde(rename = "mode")] - pub mode: crate::models::ContainersNetworkMode, - #[serde(rename = "ports")] - pub ports: ::std::collections::HashMap, -} - -impl ContainersNetwork { - pub fn new(mode: crate::models::ContainersNetworkMode, ports: ::std::collections::HashMap) -> ContainersNetwork { - ContainersNetwork { - mode, - ports, - } - } -} - - diff --git a/sdks/api/runtime/rust/src/models/containers_network_mode.rs b/sdks/api/runtime/rust/src/models/containers_network_mode.rs deleted file mode 100644 index a2d7589c1f..0000000000 --- a/sdks/api/runtime/rust/src/models/containers_network_mode.rs +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum ContainersNetworkMode { - #[serde(rename = "bridge")] - Bridge, - #[serde(rename = "host")] - Host, - -} - -impl ToString for ContainersNetworkMode { - fn to_string(&self) -> String { - match self { - Self::Bridge => String::from("bridge"), - Self::Host => String::from("host"), - } - } -} - -impl Default for ContainersNetworkMode { - fn default() -> ContainersNetworkMode { - Self::Bridge - } -} - - - - diff --git a/sdks/api/runtime/rust/src/models/containers_port.rs b/sdks/api/runtime/rust/src/models/containers_port.rs index 70d72c6831..85454b61d1 100644 --- a/sdks/api/runtime/rust/src/models/containers_port.rs +++ b/sdks/api/runtime/rust/src/models/containers_port.rs @@ -14,7 +14,7 @@ #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ContainersPort { #[serde(rename = "protocol")] - pub protocol: crate::models::ContainersPortProtocol, + pub protocol: crate::models::BuildsPortProtocol, #[serde(rename = "internal_port", skip_serializing_if = "Option::is_none")] pub internal_port: Option, #[serde(rename = "hostname", skip_serializing_if = "Option::is_none")] @@ -27,11 +27,11 @@ pub struct ContainersPort { #[serde(rename = "url", skip_serializing_if = "Option::is_none")] pub url: Option, #[serde(rename = "routing")] - pub routing: Box, + pub routing: Box, } impl ContainersPort { - pub fn new(protocol: crate::models::ContainersPortProtocol, routing: crate::models::ContainersPortRouting) -> ContainersPort { + pub fn new(protocol: crate::models::BuildsPortProtocol, routing: crate::models::BuildsPortRouting) -> ContainersPort { ContainersPort { protocol, internal_port: None, diff --git a/sdks/api/runtime/rust/src/models/containers_port_protocol.rs b/sdks/api/runtime/rust/src/models/containers_port_protocol.rs deleted file mode 100644 index e54bd29740..0000000000 --- a/sdks/api/runtime/rust/src/models/containers_port_protocol.rs +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum ContainersPortProtocol { - #[serde(rename = "http")] - Http, - #[serde(rename = "https")] - Https, - #[serde(rename = "tcp")] - Tcp, - #[serde(rename = "tcp_tls")] - TcpTls, - #[serde(rename = "udp")] - Udp, - -} - -impl ToString for ContainersPortProtocol { - fn to_string(&self) -> String { - match self { - Self::Http => String::from("http"), - Self::Https => String::from("https"), - Self::Tcp => String::from("tcp"), - Self::TcpTls => String::from("tcp_tls"), - Self::Udp => String::from("udp"), - } - } -} - -impl Default for ContainersPortProtocol { - fn default() -> ContainersPortProtocol { - Self::Http - } -} - - - - diff --git a/sdks/api/runtime/rust/src/models/containers_port_routing.rs b/sdks/api/runtime/rust/src/models/containers_port_routing.rs deleted file mode 100644 index 3098c15996..0000000000 --- a/sdks/api/runtime/rust/src/models/containers_port_routing.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct ContainersPortRouting { - #[serde(rename = "guard", skip_serializing_if = "Option::is_none")] - pub guard: Option, - #[serde(rename = "host", skip_serializing_if = "Option::is_none")] - pub host: Option, -} - -impl ContainersPortRouting { - pub fn new() -> ContainersPortRouting { - ContainersPortRouting { - guard: None, - host: None, - } - } -} - - diff --git a/sdks/api/runtime/rust/src/models/containers_resources.rs b/sdks/api/runtime/rust/src/models/containers_resources.rs deleted file mode 100644 index 9e85ee3bd1..0000000000 --- a/sdks/api/runtime/rust/src/models/containers_resources.rs +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct ContainersResources { - /// The number of CPU cores in millicores, or 1/1000 of a core. For example, 1/8 of a core would be 125 millicores, and 1 core would be 1000 millicores. - #[serde(rename = "cpu")] - pub cpu: i32, - /// The amount of memory in megabytes - #[serde(rename = "memory")] - pub memory: i32, -} - -impl ContainersResources { - pub fn new(cpu: i32, memory: i32) -> ContainersResources { - ContainersResources { - cpu, - memory, - } - } -} - - diff --git a/sdks/api/runtime/rust/src/models/containers_runtime.rs b/sdks/api/runtime/rust/src/models/containers_runtime.rs deleted file mode 100644 index 68f2bf7e0f..0000000000 --- a/sdks/api/runtime/rust/src/models/containers_runtime.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Rivet API - * - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 0.0.1 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct ContainersRuntime { - #[serde(rename = "build")] - pub build: uuid::Uuid, - #[serde(rename = "arguments", skip_serializing_if = "Option::is_none")] - pub arguments: Option>, - #[serde(rename = "environment", skip_serializing_if = "Option::is_none")] - pub environment: Option<::std::collections::HashMap>, -} - -impl ContainersRuntime { - pub fn new(build: uuid::Uuid) -> ContainersRuntime { - ContainersRuntime { - build, - arguments: None, - environment: None, - } - } -} - - diff --git a/sdks/api/runtime/rust/src/models/mod.rs b/sdks/api/runtime/rust/src/models/mod.rs index 1f888f66ea..812d530509 100644 --- a/sdks/api/runtime/rust/src/models/mod.rs +++ b/sdks/api/runtime/rust/src/models/mod.rs @@ -1,17 +1,9 @@ pub mod actors_actor; pub use self::actors_actor::ActorsActor; -pub mod actors_create_actor_network_request; -pub use self::actors_create_actor_network_request::ActorsCreateActorNetworkRequest; -pub mod actors_create_actor_port_request; -pub use self::actors_create_actor_port_request::ActorsCreateActorPortRequest; pub mod actors_create_actor_request; pub use self::actors_create_actor_request::ActorsCreateActorRequest; pub mod actors_create_actor_response; pub use self::actors_create_actor_response::ActorsCreateActorResponse; -pub mod actors_create_actor_runtime_network_request; -pub use self::actors_create_actor_runtime_network_request::ActorsCreateActorRuntimeNetworkRequest; -pub mod actors_create_actor_runtime_request; -pub use self::actors_create_actor_runtime_request::ActorsCreateActorRuntimeRequest; pub mod actors_endpoint_type; pub use self::actors_endpoint_type::ActorsEndpointType; pub mod actors_export_actor_logs_response; @@ -22,6 +14,7 @@ pub mod actors_get_actor_metrics_response; pub use self::actors_get_actor_metrics_response::ActorsGetActorMetricsResponse; pub mod actors_get_actor_response; pub use self::actors_get_actor_response::ActorsGetActorResponse; +<<<<<<< HEAD pub mod actors_get_actor_usage_response; pub use self::actors_get_actor_usage_response::ActorsGetActorUsageResponse; pub mod actors_lifecycle; @@ -51,16 +44,20 @@ pub use self::actors_query_log_stream::ActorsQueryLogStream; >>>>>>> 43e5048bc (fix: api changes) pub mod actors_runtime; pub use self::actors_runtime::ActorsRuntime; +======= +pub mod actors_list_actors_response; +pub use self::actors_list_actors_response::ActorsListActorsResponse; +pub mod actors_port; +pub use self::actors_port::ActorsPort; +pub mod actors_query_log_stream; +pub use self::actors_query_log_stream::ActorsQueryLogStream; +>>>>>>> a7d912278 (fix: even more actor api changes) pub mod actors_upgrade_actor_request; pub use self::actors_upgrade_actor_request::ActorsUpgradeActorRequest; pub mod actors_upgrade_all_actors_request; pub use self::actors_upgrade_all_actors_request::ActorsUpgradeAllActorsRequest; pub mod actors_upgrade_all_actors_response; pub use self::actors_upgrade_all_actors_response::ActorsUpgradeAllActorsResponse; -pub mod builds_allocation; -pub use self::builds_allocation::BuildsAllocation; -pub mod builds_allocation_multi; -pub use self::builds_allocation_multi::BuildsAllocationMulti; pub mod builds_build; pub use self::builds_build::BuildsBuild; pub mod builds_compression; @@ -71,28 +68,34 @@ pub mod builds_kind; pub use self::builds_kind::BuildsKind; pub mod builds_list_builds_response; pub use self::builds_list_builds_response::BuildsListBuildsResponse; +pub mod builds_network_mode; +pub use self::builds_network_mode::BuildsNetworkMode; pub mod builds_patch_build_tags_request; pub use self::builds_patch_build_tags_request::BuildsPatchBuildTagsRequest; +pub mod builds_port_protocol; +pub use self::builds_port_protocol::BuildsPortProtocol; +pub mod builds_port_request; +pub use self::builds_port_request::BuildsPortRequest; +pub mod builds_port_routing; +pub use self::builds_port_routing::BuildsPortRouting; pub mod builds_prepare_build_request; pub use self::builds_prepare_build_request::BuildsPrepareBuildRequest; pub mod builds_prepare_build_response; pub use self::builds_prepare_build_response::BuildsPrepareBuildResponse; pub mod builds_resources; pub use self::builds_resources::BuildsResources; +pub mod builds_runtime; +pub use self::builds_runtime::BuildsRuntime; +pub mod builds_runtime_actor; +pub use self::builds_runtime_actor::BuildsRuntimeActor; +pub mod builds_runtime_container; +pub use self::builds_runtime_container::BuildsRuntimeContainer; pub mod containers_container; pub use self::containers_container::ContainersContainer; -pub mod containers_create_container_network_request; -pub use self::containers_create_container_network_request::ContainersCreateContainerNetworkRequest; -pub mod containers_create_container_port_request; -pub use self::containers_create_container_port_request::ContainersCreateContainerPortRequest; pub mod containers_create_container_request; pub use self::containers_create_container_request::ContainersCreateContainerRequest; pub mod containers_create_container_response; pub use self::containers_create_container_response::ContainersCreateContainerResponse; -pub mod containers_create_container_runtime_network_request; -pub use self::containers_create_container_runtime_network_request::ContainersCreateContainerRuntimeNetworkRequest; -pub mod containers_create_container_runtime_request; -pub use self::containers_create_container_runtime_request::ContainersCreateContainerRuntimeRequest; pub mod containers_endpoint_type; pub use self::containers_endpoint_type::ContainersEndpointType; pub mod containers_get_container_logs_response; @@ -101,26 +104,12 @@ pub mod containers_get_container_metrics_response; pub use self::containers_get_container_metrics_response::ContainersGetContainerMetricsResponse; pub mod containers_get_container_response; pub use self::containers_get_container_response::ContainersGetContainerResponse; -pub mod containers_lifecycle; -pub use self::containers_lifecycle::ContainersLifecycle; pub mod containers_list_containers_response; pub use self::containers_list_containers_response::ContainersListContainersResponse; -pub mod containers_network; -pub use self::containers_network::ContainersNetwork; -pub mod containers_network_mode; -pub use self::containers_network_mode::ContainersNetworkMode; pub mod containers_port; pub use self::containers_port::ContainersPort; -pub mod containers_port_protocol; -pub use self::containers_port_protocol::ContainersPortProtocol; -pub mod containers_port_routing; -pub use self::containers_port_routing::ContainersPortRouting; pub mod containers_query_log_stream; pub use self::containers_query_log_stream::ContainersQueryLogStream; -pub mod containers_resources; -pub use self::containers_resources::ContainersResources; -pub mod containers_runtime; -pub use self::containers_runtime::ContainersRuntime; pub mod containers_upgrade_all_containers_request; pub use self::containers_upgrade_all_containers_request::ContainersUpgradeAllContainersRequest; pub mod containers_upgrade_all_containers_response; diff --git a/sdks/api/runtime/typescript/src/api/resources/actors/client/Client.ts b/sdks/api/runtime/typescript/src/api/resources/actors/client/Client.ts index 16af41d930..998ad1697c 100644 --- a/sdks/api/runtime/typescript/src/api/resources/actors/client/Client.ts +++ b/sdks/api/runtime/typescript/src/api/resources/actors/client/Client.ts @@ -410,21 +410,10 @@ export class Actors { * buildTags: { * "key": "value" * }, - * runtime: { - * environment: {}, - * network: { - * endpointType: "hostname" - * } - * }, - * network: { - * mode: "bridge", - * ports: {}, - * waitReady: true - * }, - * lifecycle: { - * killTimeout: 1000000, - * durable: true - * } + * networkEndpointType: "hostname", + * waitForNetworkReady: true, + * killTimeout: 1000000, + * durable: true * } * }) */ diff --git a/sdks/api/runtime/typescript/src/api/resources/actors/client/requests/CreateActorRequestQuery.ts b/sdks/api/runtime/typescript/src/api/resources/actors/client/requests/CreateActorRequestQuery.ts index 90685a87a4..5ed1660cc8 100644 --- a/sdks/api/runtime/typescript/src/api/resources/actors/client/requests/CreateActorRequestQuery.ts +++ b/sdks/api/runtime/typescript/src/api/resources/actors/client/requests/CreateActorRequestQuery.ts @@ -19,21 +19,10 @@ import * as Rivet from "../../../../index"; * buildTags: { * "key": "value" * }, - * runtime: { - * environment: {}, - * network: { - * endpointType: "hostname" - * } - * }, - * network: { - * mode: "bridge", - * ports: {}, - * waitReady: true - * }, - * lifecycle: { - * killTimeout: 1000000, - * durable: true - * } + * networkEndpointType: "hostname", + * waitForNetworkReady: true, + * killTimeout: 1000000, + * durable: true * } * } */ diff --git a/sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/Actor.ts b/sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/Actor.ts index 268707a801..853cf01e21 100644 --- a/sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/Actor.ts +++ b/sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/Actor.ts @@ -8,9 +8,12 @@ export interface Actor { id: Rivet.Id; region: string; tags?: unknown; - runtime: Rivet.actors.Runtime; - network: Rivet.actors.Network; - lifecycle: Rivet.actors.Lifecycle; + build: string; + ports: Record; + /** The duration to wait for in milliseconds before force killing the actor after a DELETE request. This gives the actor time to perform a shutdown sequence before being killed. This should be set to a safe default, and can be overridden during a DELETE request if needed. */ + killTimeout?: number; + /** If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. */ + durable?: boolean; createdAt: Rivet.Timestamp; startedAt?: Rivet.Timestamp; destroyedAt?: Rivet.Timestamp; diff --git a/sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/GuardRouting.ts b/sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/GuardRouting.ts deleted file mode 100644 index 039f163247..0000000000 --- a/sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/GuardRouting.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export interface GuardRouting {} diff --git a/sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/HostRouting.ts b/sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/HostRouting.ts deleted file mode 100644 index cdd2164517..0000000000 --- a/sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/HostRouting.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export interface HostRouting {} diff --git a/sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/Lifecycle.ts b/sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/Lifecycle.ts deleted file mode 100644 index c6c949e83f..0000000000 --- a/sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/Lifecycle.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export interface Lifecycle { - /** The duration to wait for in milliseconds before killing the actor. This should be set to a safe default, and can be overridden during a DELETE request if needed. */ - killTimeout?: number; - /** If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. */ - durable?: boolean; -} diff --git a/sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/NetworkMode.ts b/sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/NetworkMode.ts deleted file mode 100644 index 14aee186e8..0000000000 --- a/sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/NetworkMode.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export type NetworkMode = "bridge" | "host"; -export const NetworkMode = { - Bridge: "bridge", - Host: "host", -} as const; diff --git a/sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/Port.ts b/sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/Port.ts index c93c5b0e70..af1cc8cf1a 100644 --- a/sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/Port.ts +++ b/sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/Port.ts @@ -5,12 +5,12 @@ import * as Rivet from "../../../../../index"; export interface Port { - protocol: Rivet.actors.PortProtocol; + protocol: Rivet.builds.PortProtocol; internalPort?: number; hostname?: string; port?: number; path?: string; /** Fully formed connection URL including protocol, hostname, port, and path, if applicable. */ url?: string; - routing: Rivet.actors.PortRouting; + routing: Rivet.builds.PortRouting; } diff --git a/sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/PortProtocol.ts b/sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/PortProtocol.ts deleted file mode 100644 index 0ec9364df2..0000000000 --- a/sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/PortProtocol.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export type PortProtocol = "http" | "https" | "tcp" | "tcp_tls" | "udp"; -export const PortProtocol = { - Http: "http", - Https: "https", - Tcp: "tcp", - TcpTls: "tcp_tls", - Udp: "udp", -} as const; diff --git a/sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/Runtime.ts b/sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/Runtime.ts deleted file mode 100644 index a918ef8387..0000000000 --- a/sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/Runtime.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export interface Runtime { - build: string; - arguments?: string[]; - environment?: Record; -} diff --git a/sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/index.ts b/sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/index.ts index ced439f191..09dd4ed15b 100644 --- a/sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/index.ts +++ b/sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/index.ts @@ -1,11 +1,3 @@ export * from "./Actor"; -export * from "./Runtime"; -export * from "./Lifecycle"; -export * from "./Network"; -export * from "./NetworkMode"; export * from "./Port"; -export * from "./PortProtocol"; -export * from "./PortRouting"; -export * from "./GuardRouting"; -export * from "./HostRouting"; export * from "./EndpointType"; diff --git a/sdks/api/runtime/typescript/src/api/resources/actors/resources/metrics/client/Client.ts b/sdks/api/runtime/typescript/src/api/resources/actors/resources/metrics/client/Client.ts index b8d7eb13c7..511d5c485f 100644 --- a/sdks/api/runtime/typescript/src/api/resources/actors/resources/metrics/client/Client.ts +++ b/sdks/api/runtime/typescript/src/api/resources/actors/resources/metrics/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace Metrics { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the X-API-Version header */ - xApiVersion?: "25.5.0"; + xApiVersion?: "25.5.1"; fetcher?: core.FetchFunction; } @@ -30,7 +30,7 @@ export declare namespace Metrics { /** Additional headers to include in the request. */ headers?: Record; /** Override the X-API-Version header */ - xApiVersion?: "25.5.0"; + xApiVersion?: "25.5.1"; } } @@ -89,7 +89,7 @@ export class Metrics { headers: { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", - "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.0", + "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/sdks/api/runtime/typescript/src/api/resources/actors/types/CreateActorNetworkRequest.ts b/sdks/api/runtime/typescript/src/api/resources/actors/types/CreateActorNetworkRequest.ts deleted file mode 100644 index 0c0ad2b046..0000000000 --- a/sdks/api/runtime/typescript/src/api/resources/actors/types/CreateActorNetworkRequest.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../index"; - -export interface CreateActorNetworkRequest { - mode?: Rivet.actors.NetworkMode; - ports?: Record; - waitReady?: boolean; -} diff --git a/sdks/api/runtime/typescript/src/api/resources/actors/types/CreateActorPortRequest.ts b/sdks/api/runtime/typescript/src/api/resources/actors/types/CreateActorPortRequest.ts deleted file mode 100644 index f67160d1ca..0000000000 --- a/sdks/api/runtime/typescript/src/api/resources/actors/types/CreateActorPortRequest.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../index"; - -export interface CreateActorPortRequest { - protocol: Rivet.actors.PortProtocol; - internalPort?: number; - routing?: Rivet.actors.PortRouting; -} diff --git a/sdks/api/runtime/typescript/src/api/resources/actors/types/CreateActorRequest.ts b/sdks/api/runtime/typescript/src/api/resources/actors/types/CreateActorRequest.ts index dc7b38fc28..c3eb8fe673 100644 --- a/sdks/api/runtime/typescript/src/api/resources/actors/types/CreateActorRequest.ts +++ b/sdks/api/runtime/typescript/src/api/resources/actors/types/CreateActorRequest.ts @@ -9,7 +9,10 @@ export interface CreateActorRequest { tags?: unknown; build?: string; buildTags?: unknown; - runtime?: Rivet.actors.CreateActorRuntimeRequest; - network?: Rivet.actors.CreateActorNetworkRequest; - lifecycle?: Rivet.actors.Lifecycle; + networkEndpointType?: Rivet.actors.EndpointType; + waitForNetworkReady?: boolean; + /** The duration to wait for in milliseconds before force killing the actor after a DELETE request. This gives the actor time to perform a shutdown sequence before being killed. This should be set to a safe default, and can be overridden during a DELETE request if needed. */ + killTimeout?: number; + /** If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. */ + durable?: boolean; } diff --git a/sdks/api/runtime/typescript/src/api/resources/actors/types/CreateActorRuntimeNetworkRequest.ts b/sdks/api/runtime/typescript/src/api/resources/actors/types/CreateActorRuntimeNetworkRequest.ts deleted file mode 100644 index 1d16fab1fa..0000000000 --- a/sdks/api/runtime/typescript/src/api/resources/actors/types/CreateActorRuntimeNetworkRequest.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../index"; - -export interface CreateActorRuntimeNetworkRequest { - endpointType: Rivet.actors.EndpointType; -} diff --git a/sdks/api/runtime/typescript/src/api/resources/actors/types/CreateActorRuntimeRequest.ts b/sdks/api/runtime/typescript/src/api/resources/actors/types/CreateActorRuntimeRequest.ts deleted file mode 100644 index 1068e794a4..0000000000 --- a/sdks/api/runtime/typescript/src/api/resources/actors/types/CreateActorRuntimeRequest.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../index"; - -export interface CreateActorRuntimeRequest { - environment?: Record; - network?: Rivet.actors.CreateActorRuntimeNetworkRequest; -} diff --git a/sdks/api/runtime/typescript/src/api/resources/actors/types/index.ts b/sdks/api/runtime/typescript/src/api/resources/actors/types/index.ts index 785b43b9fd..830fb6ec41 100644 --- a/sdks/api/runtime/typescript/src/api/resources/actors/types/index.ts +++ b/sdks/api/runtime/typescript/src/api/resources/actors/types/index.ts @@ -1,9 +1,5 @@ export * from "./GetActorResponse"; export * from "./CreateActorRequest"; -export * from "./CreateActorRuntimeRequest"; -export * from "./CreateActorRuntimeNetworkRequest"; -export * from "./CreateActorNetworkRequest"; -export * from "./CreateActorPortRequest"; export * from "./CreateActorResponse"; export * from "./DestroyActorResponse"; export * from "./UpgradeActorRequest"; diff --git a/sdks/api/runtime/typescript/src/api/resources/builds/client/Client.ts b/sdks/api/runtime/typescript/src/api/resources/builds/client/Client.ts index 0e1d267eae..b138b56ba1 100644 --- a/sdks/api/runtime/typescript/src/api/resources/builds/client/Client.ts +++ b/sdks/api/runtime/typescript/src/api/resources/builds/client/Client.ts @@ -530,15 +530,15 @@ export class Builds { * }, * kind: "docker_image", * compression: "none", - * allocation: { - * single: {}, - * multi: { + * runtime: { + * container: {}, + * actor: { + * resources: { + * cpu: 1, + * memory: 1 + * }, * slots: 1 * } - * }, - * resources: { - * cpu: 1, - * memory: 1 * } * } * }) diff --git a/sdks/api/runtime/typescript/src/api/resources/builds/client/requests/PrepareBuildRequestQuery.ts b/sdks/api/runtime/typescript/src/api/resources/builds/client/requests/PrepareBuildRequestQuery.ts index 2c1689af33..d309c8d051 100644 --- a/sdks/api/runtime/typescript/src/api/resources/builds/client/requests/PrepareBuildRequestQuery.ts +++ b/sdks/api/runtime/typescript/src/api/resources/builds/client/requests/PrepareBuildRequestQuery.ts @@ -18,15 +18,15 @@ import * as Rivet from "../../../../index"; * }, * kind: "docker_image", * compression: "none", - * allocation: { - * single: {}, - * multi: { + * runtime: { + * container: {}, + * actor: { + * resources: { + * cpu: 1, + * memory: 1 + * }, * slots: 1 * } - * }, - * resources: { - * cpu: 1, - * memory: 1 * } * } * } diff --git a/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/Allocation.ts b/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/Allocation.ts deleted file mode 100644 index c6029fbc0d..0000000000 --- a/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/Allocation.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../../../index"; - -export interface Allocation { - single?: Rivet.builds.AllocationSingle; - multi?: Rivet.builds.AllocationMulti; -} diff --git a/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/AllocationMulti.ts b/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/AllocationMulti.ts deleted file mode 100644 index b09f4586d4..0000000000 --- a/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/AllocationMulti.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export interface AllocationMulti { - slots: number; -} diff --git a/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/AllocationSingle.ts b/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/AllocationSingle.ts deleted file mode 100644 index 4a9f426a0b..0000000000 --- a/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/AllocationSingle.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export interface AllocationSingle {} diff --git a/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/Build.ts b/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/Build.ts index e3f9dcbe8f..1de126d5e3 100644 --- a/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/Build.ts +++ b/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/Build.ts @@ -10,8 +10,7 @@ export interface Build { createdAt: Rivet.Timestamp; /** Unsigned 64 bit integer. */ contentLength: number; - allocation?: Rivet.builds.Allocation; - resources?: Rivet.builds.Resources; /** Tags of this build */ tags: Record; + runtime?: Rivet.builds.Runtime; } diff --git a/sdks/api/full/typescript/src/api/resources/containers/resources/common/types/GuardRouting.ts b/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/GuardRouting.ts similarity index 100% rename from sdks/api/full/typescript/src/api/resources/containers/resources/common/types/GuardRouting.ts rename to sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/GuardRouting.ts diff --git a/sdks/api/full/typescript/src/api/resources/containers/resources/common/types/HostRouting.ts b/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/HostRouting.ts similarity index 100% rename from sdks/api/full/typescript/src/api/resources/containers/resources/common/types/HostRouting.ts rename to sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/HostRouting.ts diff --git a/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/Kind.ts b/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/Kind.ts index 6beda3d32f..6e07cb9a8a 100644 --- a/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/Kind.ts +++ b/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/Kind.ts @@ -10,6 +10,7 @@ export type Kind = * OCI-compliant bundle. */ | "oci_bundle" /** + * **Deprecated** * A JavaScript file. */ | "javascript"; export const Kind = { diff --git a/sdks/api/full/typescript/src/api/resources/containers/resources/common/types/NetworkMode.ts b/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/NetworkMode.ts similarity index 100% rename from sdks/api/full/typescript/src/api/resources/containers/resources/common/types/NetworkMode.ts rename to sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/NetworkMode.ts diff --git a/sdks/api/full/typescript/src/api/resources/containers/resources/common/types/PortProtocol.ts b/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/PortProtocol.ts similarity index 100% rename from sdks/api/full/typescript/src/api/resources/containers/resources/common/types/PortProtocol.ts rename to sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/PortProtocol.ts diff --git a/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/PortRequest.ts b/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/PortRequest.ts new file mode 100644 index 0000000000..b1b06ef9ff --- /dev/null +++ b/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/PortRequest.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Rivet from "../../../../../index"; + +export interface PortRequest { + protocol: Rivet.builds.PortProtocol; + internalPort?: number; + routing?: Rivet.builds.PortRouting; +} diff --git a/sdks/api/full/typescript/src/api/resources/actors/resources/common/types/PortRouting.ts b/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/PortRouting.ts similarity index 67% rename from sdks/api/full/typescript/src/api/resources/actors/resources/common/types/PortRouting.ts rename to sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/PortRouting.ts index b7bfa3ed8f..6732079ba6 100644 --- a/sdks/api/full/typescript/src/api/resources/actors/resources/common/types/PortRouting.ts +++ b/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/PortRouting.ts @@ -5,6 +5,6 @@ import * as Rivet from "../../../../../index"; export interface PortRouting { - guard?: Rivet.actors.GuardRouting; - host?: Rivet.actors.HostRouting; + guard?: Rivet.builds.GuardRouting; + host?: Rivet.builds.HostRouting; } diff --git a/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/Resources.ts b/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/Resources.ts index 8255dc6705..230c0cadd5 100644 --- a/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/Resources.ts +++ b/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/Resources.ts @@ -9,6 +9,6 @@ export interface Resources { * millicores. */ cpu: number; - /** The amount of memory in megabytes */ + /** The amount of memory in mebibytes */ memory: number; } diff --git a/sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/Network.ts b/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/Runtime.ts similarity index 52% rename from sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/Network.ts rename to sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/Runtime.ts index a760bf0314..4a137d379a 100644 --- a/sdks/api/runtime/typescript/src/api/resources/actors/resources/common/types/Network.ts +++ b/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/Runtime.ts @@ -4,7 +4,7 @@ import * as Rivet from "../../../../../index"; -export interface Network { - mode: Rivet.actors.NetworkMode; - ports: Record; +export interface Runtime { + container?: Rivet.builds.RuntimeContainer; + actor?: Rivet.builds.RuntimeActor; } diff --git a/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/RuntimeActor.ts b/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/RuntimeActor.ts new file mode 100644 index 0000000000..63e77ca6e0 --- /dev/null +++ b/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/RuntimeActor.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Rivet from "../../../../../index"; + +export interface RuntimeActor { + environment?: Record; + networkMode?: Rivet.builds.NetworkMode; + ports?: Record; + resources: Rivet.builds.Resources; + slots: number; +} diff --git a/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/RuntimeContainer.ts b/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/RuntimeContainer.ts new file mode 100644 index 0000000000..e379628461 --- /dev/null +++ b/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/RuntimeContainer.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Rivet from "../../../../../index"; + +export interface RuntimeContainer { + environment?: Record; + networkMode?: Rivet.builds.NetworkMode; + ports?: Record; +} diff --git a/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/index.ts b/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/index.ts index b71c7706dc..f8dfc5e0d2 100644 --- a/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/index.ts +++ b/sdks/api/runtime/typescript/src/api/resources/builds/resources/common/types/index.ts @@ -1,7 +1,13 @@ export * from "./Build"; export * from "./Kind"; export * from "./Compression"; -export * from "./Allocation"; -export * from "./AllocationSingle"; -export * from "./AllocationMulti"; +export * from "./Runtime"; +export * from "./RuntimeContainer"; +export * from "./RuntimeActor"; +export * from "./PortProtocol"; +export * from "./PortRouting"; +export * from "./GuardRouting"; +export * from "./HostRouting"; +export * from "./PortRequest"; export * from "./Resources"; +export * from "./NetworkMode"; diff --git a/sdks/api/runtime/typescript/src/api/resources/builds/types/PrepareBuildRequest.ts b/sdks/api/runtime/typescript/src/api/resources/builds/types/PrepareBuildRequest.ts index 0b479b5536..9cea1708d7 100644 --- a/sdks/api/runtime/typescript/src/api/resources/builds/types/PrepareBuildRequest.ts +++ b/sdks/api/runtime/typescript/src/api/resources/builds/types/PrepareBuildRequest.ts @@ -10,6 +10,5 @@ export interface PrepareBuildRequest { imageFile: Rivet.upload.PrepareFile; kind?: Rivet.builds.Kind; compression?: Rivet.builds.Compression; - allocation?: Rivet.builds.Allocation; - resources?: Rivet.builds.Resources; + runtime?: Rivet.builds.Runtime; } diff --git a/sdks/api/runtime/typescript/src/api/resources/containers/client/Client.ts b/sdks/api/runtime/typescript/src/api/resources/containers/client/Client.ts index 883a6bb63c..b03e1be9be 100644 --- a/sdks/api/runtime/typescript/src/api/resources/containers/client/Client.ts +++ b/sdks/api/runtime/typescript/src/api/resources/containers/client/Client.ts @@ -18,7 +18,7 @@ export declare namespace Containers { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the X-API-Version header */ - xApiVersion?: "25.5.0"; + xApiVersion?: "25.5.1"; fetcher?: core.FetchFunction; } @@ -32,7 +32,7 @@ export declare namespace Containers { /** Additional headers to include in the request. */ headers?: Record; /** Override the X-API-Version header */ - xApiVersion?: "25.5.0"; + xApiVersion?: "25.5.1"; } } @@ -103,7 +103,7 @@ export class Containers { headers: { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", - "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.0", + "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -276,7 +276,7 @@ export class Containers { headers: { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", - "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.0", + "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -410,25 +410,22 @@ export class Containers { * buildTags: { * "key": "value" * }, - * runtime: { - * environment: {}, - * network: { - * endpointType: "hostname" - * } + * environment: { + * "string": "string" * }, - * network: { - * mode: "bridge", - * ports: {}, - * waitReady: true + * networkEndpointType: "hostname", + * waitForNetworkReady: true, + * ports: { + * "string": { + * protocol: "http" + * } * }, * resources: { * cpu: 1, * memory: 1 * }, - * lifecycle: { - * killTimeout: 1000000, - * durable: true - * } + * killTimeout: 1000000, + * durable: true * } * }) */ @@ -463,7 +460,7 @@ export class Containers { headers: { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", - "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.0", + "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -622,7 +619,7 @@ export class Containers { headers: { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", - "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.0", + "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -781,7 +778,7 @@ export class Containers { headers: { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", - "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.0", + "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, @@ -946,7 +943,7 @@ export class Containers { headers: { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", - "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.0", + "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/sdks/api/runtime/typescript/src/api/resources/containers/client/requests/CreateContainerRequestQuery.ts b/sdks/api/runtime/typescript/src/api/resources/containers/client/requests/CreateContainerRequestQuery.ts index 4cc48c6f03..44af24032d 100644 --- a/sdks/api/runtime/typescript/src/api/resources/containers/client/requests/CreateContainerRequestQuery.ts +++ b/sdks/api/runtime/typescript/src/api/resources/containers/client/requests/CreateContainerRequestQuery.ts @@ -19,25 +19,22 @@ import * as Rivet from "../../../../index"; * buildTags: { * "key": "value" * }, - * runtime: { - * environment: {}, - * network: { - * endpointType: "hostname" - * } + * environment: { + * "string": "string" * }, - * network: { - * mode: "bridge", - * ports: {}, - * waitReady: true + * networkEndpointType: "hostname", + * waitForNetworkReady: true, + * ports: { + * "string": { + * protocol: "http" + * } * }, * resources: { * cpu: 1, * memory: 1 * }, - * lifecycle: { - * killTimeout: 1000000, - * durable: true - * } + * killTimeout: 1000000, + * durable: true * } * } */ diff --git a/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/Container.ts b/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/Container.ts index 3b8f94a422..98a21e9fa7 100644 --- a/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/Container.ts +++ b/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/Container.ts @@ -8,10 +8,15 @@ export interface Container { id: Rivet.Id; region: string; tags?: unknown; - runtime: Rivet.containers.Runtime; - network: Rivet.containers.Network; - resources: Rivet.containers.Resources; - lifecycle: Rivet.containers.Lifecycle; + build: string; + arguments?: string[]; + environment?: Record; + ports: Record; + resources: Rivet.builds.Resources; + /** The duration to wait for in milliseconds before force killing the actor after a DELETE request. This gives the actor time to perform a shutdown sequence before being killed. This should be set to a safe default, and can be overridden during a DELETE request if needed. */ + killTimeout?: number; + /** If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. */ + durable?: boolean; createdAt: Rivet.Timestamp; startedAt?: Rivet.Timestamp; destroyedAt?: Rivet.Timestamp; diff --git a/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/GuardRouting.ts b/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/GuardRouting.ts deleted file mode 100644 index 039f163247..0000000000 --- a/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/GuardRouting.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export interface GuardRouting {} diff --git a/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/HostRouting.ts b/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/HostRouting.ts deleted file mode 100644 index cdd2164517..0000000000 --- a/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/HostRouting.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export interface HostRouting {} diff --git a/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/Lifecycle.ts b/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/Lifecycle.ts deleted file mode 100644 index e45d39b181..0000000000 --- a/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/Lifecycle.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export interface Lifecycle { - /** The duration to wait for in milliseconds before killing the container. This should be set to a safe default, and can be overridden during a DELETE request if needed. */ - killTimeout?: number; - /** If true, the container will try to reschedule itself automatically in the event of a crash or a datacenter failover. The container will not reschedule if it exits successfully. */ - durable?: boolean; -} diff --git a/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/Network.ts b/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/Network.ts deleted file mode 100644 index 7bb456e91d..0000000000 --- a/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/Network.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../../../index"; - -export interface Network { - mode: Rivet.containers.NetworkMode; - ports: Record; -} diff --git a/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/NetworkMode.ts b/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/NetworkMode.ts deleted file mode 100644 index 14aee186e8..0000000000 --- a/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/NetworkMode.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export type NetworkMode = "bridge" | "host"; -export const NetworkMode = { - Bridge: "bridge", - Host: "host", -} as const; diff --git a/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/Port.ts b/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/Port.ts index 0fa9c5e224..af1cc8cf1a 100644 --- a/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/Port.ts +++ b/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/Port.ts @@ -5,12 +5,12 @@ import * as Rivet from "../../../../../index"; export interface Port { - protocol: Rivet.containers.PortProtocol; + protocol: Rivet.builds.PortProtocol; internalPort?: number; hostname?: string; port?: number; path?: string; /** Fully formed connection URL including protocol, hostname, port, and path, if applicable. */ url?: string; - routing: Rivet.containers.PortRouting; + routing: Rivet.builds.PortRouting; } diff --git a/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/PortProtocol.ts b/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/PortProtocol.ts deleted file mode 100644 index 0ec9364df2..0000000000 --- a/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/PortProtocol.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export type PortProtocol = "http" | "https" | "tcp" | "tcp_tls" | "udp"; -export const PortProtocol = { - Http: "http", - Https: "https", - Tcp: "tcp", - TcpTls: "tcp_tls", - Udp: "udp", -} as const; diff --git a/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/PortRouting.ts b/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/PortRouting.ts deleted file mode 100644 index 6ec92a6d0a..0000000000 --- a/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/PortRouting.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../../../index"; - -export interface PortRouting { - guard?: Rivet.containers.GuardRouting; - host?: Rivet.containers.HostRouting; -} diff --git a/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/Resources.ts b/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/Resources.ts deleted file mode 100644 index 8255dc6705..0000000000 --- a/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/Resources.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export interface Resources { - /** - * The number of CPU cores in millicores, or 1/1000 of a core. For example, - * 1/8 of a core would be 125 millicores, and 1 core would be 1000 - * millicores. - */ - cpu: number; - /** The amount of memory in megabytes */ - memory: number; -} diff --git a/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/Runtime.ts b/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/Runtime.ts deleted file mode 100644 index a918ef8387..0000000000 --- a/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/Runtime.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export interface Runtime { - build: string; - arguments?: string[]; - environment?: Record; -} diff --git a/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/index.ts b/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/index.ts index 634dcaff02..f9f014863f 100644 --- a/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/index.ts +++ b/sdks/api/runtime/typescript/src/api/resources/containers/resources/common/types/index.ts @@ -1,12 +1,3 @@ export * from "./Container"; -export * from "./Runtime"; -export * from "./Lifecycle"; -export * from "./Resources"; -export * from "./Network"; -export * from "./NetworkMode"; export * from "./Port"; -export * from "./PortProtocol"; -export * from "./PortRouting"; -export * from "./GuardRouting"; -export * from "./HostRouting"; export * from "./EndpointType"; diff --git a/sdks/api/runtime/typescript/src/api/resources/containers/resources/logs/client/Client.ts b/sdks/api/runtime/typescript/src/api/resources/containers/resources/logs/client/Client.ts index d8ff58ebf2..23c3fb892b 100644 --- a/sdks/api/runtime/typescript/src/api/resources/containers/resources/logs/client/Client.ts +++ b/sdks/api/runtime/typescript/src/api/resources/containers/resources/logs/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace Logs { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the X-API-Version header */ - xApiVersion?: "25.5.0"; + xApiVersion?: "25.5.1"; fetcher?: core.FetchFunction; } @@ -30,7 +30,7 @@ export declare namespace Logs { /** Additional headers to include in the request. */ headers?: Record; /** Override the X-API-Version header */ - xApiVersion?: "25.5.0"; + xApiVersion?: "25.5.1"; } } @@ -116,7 +116,7 @@ export class Logs { headers: { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", - "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.0", + "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/sdks/api/runtime/typescript/src/api/resources/containers/resources/metrics/client/Client.ts b/sdks/api/runtime/typescript/src/api/resources/containers/resources/metrics/client/Client.ts index 9c02a77644..2d471c76a3 100644 --- a/sdks/api/runtime/typescript/src/api/resources/containers/resources/metrics/client/Client.ts +++ b/sdks/api/runtime/typescript/src/api/resources/containers/resources/metrics/client/Client.ts @@ -16,7 +16,7 @@ export declare namespace Metrics { baseUrl?: core.Supplier; token?: core.Supplier; /** Override the X-API-Version header */ - xApiVersion?: "25.5.0"; + xApiVersion?: "25.5.1"; fetcher?: core.FetchFunction; } @@ -30,7 +30,7 @@ export declare namespace Metrics { /** Additional headers to include in the request. */ headers?: Record; /** Override the X-API-Version header */ - xApiVersion?: "25.5.0"; + xApiVersion?: "25.5.1"; } } @@ -89,7 +89,7 @@ export class Metrics { headers: { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", - "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.0", + "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...requestOptions?.headers, diff --git a/sdks/api/runtime/typescript/src/api/resources/containers/types/CreateContainerNetworkRequest.ts b/sdks/api/runtime/typescript/src/api/resources/containers/types/CreateContainerNetworkRequest.ts deleted file mode 100644 index 928c65a843..0000000000 --- a/sdks/api/runtime/typescript/src/api/resources/containers/types/CreateContainerNetworkRequest.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../index"; - -export interface CreateContainerNetworkRequest { - mode?: Rivet.containers.NetworkMode; - ports?: Record; - waitReady?: boolean; -} diff --git a/sdks/api/runtime/typescript/src/api/resources/containers/types/CreateContainerPortRequest.ts b/sdks/api/runtime/typescript/src/api/resources/containers/types/CreateContainerPortRequest.ts deleted file mode 100644 index 5be8ff1e37..0000000000 --- a/sdks/api/runtime/typescript/src/api/resources/containers/types/CreateContainerPortRequest.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../index"; - -export interface CreateContainerPortRequest { - protocol: Rivet.containers.PortProtocol; - internalPort?: number; - routing?: Rivet.containers.PortRouting; -} diff --git a/sdks/api/runtime/typescript/src/api/resources/containers/types/CreateContainerRequest.ts b/sdks/api/runtime/typescript/src/api/resources/containers/types/CreateContainerRequest.ts index eacb98877b..65a05b80b3 100644 --- a/sdks/api/runtime/typescript/src/api/resources/containers/types/CreateContainerRequest.ts +++ b/sdks/api/runtime/typescript/src/api/resources/containers/types/CreateContainerRequest.ts @@ -9,8 +9,13 @@ export interface CreateContainerRequest { tags?: unknown; build?: string; buildTags?: unknown; - runtime?: Rivet.containers.CreateContainerRuntimeRequest; - network?: Rivet.containers.CreateContainerNetworkRequest; - resources: Rivet.containers.Resources; - lifecycle?: Rivet.containers.Lifecycle; + environment?: Record; + networkEndpointType?: Rivet.containers.EndpointType; + waitForNetworkReady?: boolean; + ports?: Record; + resources: Rivet.builds.Resources; + /** The duration to wait for in milliseconds before force killing the actor after a DELETE request. This gives the actor time to perform a shutdown sequence before being killed. This should be set to a safe default, and can be overridden during a DELETE request if needed. */ + killTimeout?: number; + /** If true, the actor will try to reschedule itself automatically in the event of a crash or a datacenter failover. The actor will not reschedule if it exits successfully. */ + durable?: boolean; } diff --git a/sdks/api/runtime/typescript/src/api/resources/containers/types/CreateContainerRuntimeNetworkRequest.ts b/sdks/api/runtime/typescript/src/api/resources/containers/types/CreateContainerRuntimeNetworkRequest.ts deleted file mode 100644 index 5d9748a261..0000000000 --- a/sdks/api/runtime/typescript/src/api/resources/containers/types/CreateContainerRuntimeNetworkRequest.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../index"; - -export interface CreateContainerRuntimeNetworkRequest { - endpointType: Rivet.containers.EndpointType; -} diff --git a/sdks/api/runtime/typescript/src/api/resources/containers/types/CreateContainerRuntimeRequest.ts b/sdks/api/runtime/typescript/src/api/resources/containers/types/CreateContainerRuntimeRequest.ts deleted file mode 100644 index a8589fcb6e..0000000000 --- a/sdks/api/runtime/typescript/src/api/resources/containers/types/CreateContainerRuntimeRequest.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Rivet from "../../../index"; - -export interface CreateContainerRuntimeRequest { - environment?: Record; - network?: Rivet.containers.CreateContainerRuntimeNetworkRequest; -} diff --git a/sdks/api/runtime/typescript/src/api/resources/containers/types/index.ts b/sdks/api/runtime/typescript/src/api/resources/containers/types/index.ts index 436ea216ac..46162ce204 100644 --- a/sdks/api/runtime/typescript/src/api/resources/containers/types/index.ts +++ b/sdks/api/runtime/typescript/src/api/resources/containers/types/index.ts @@ -1,9 +1,5 @@ export * from "./GetContainerResponse"; export * from "./CreateContainerRequest"; -export * from "./CreateContainerRuntimeRequest"; -export * from "./CreateContainerRuntimeNetworkRequest"; -export * from "./CreateContainerNetworkRequest"; -export * from "./CreateContainerPortRequest"; export * from "./CreateContainerResponse"; export * from "./DestroyContainerResponse"; export * from "./UpgradeContainerRequest"; diff --git a/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/Actor.ts b/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/Actor.ts index 0759888555..554714766f 100644 --- a/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/Actor.ts +++ b/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/Actor.ts @@ -6,9 +6,7 @@ import * as serializers from "../../../../../index"; import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; import { Id } from "../../../../common/types/Id"; -import { Runtime } from "./Runtime"; -import { Network } from "./Network"; -import { Lifecycle } from "./Lifecycle"; +import { Port } from "./Port"; import { Timestamp } from "../../../../common/types/Timestamp"; export const Actor: core.serialization.ObjectSchema = @@ -16,9 +14,10 @@ export const Actor: core.serialization.ObjectSchema; + kill_timeout?: number | null; + durable?: boolean | null; created_at: Timestamp.Raw; started_at?: Timestamp.Raw | null; destroyed_at?: Timestamp.Raw | null; diff --git a/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/Lifecycle.ts b/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/Lifecycle.ts deleted file mode 100644 index 3a46f9b098..0000000000 --- a/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/Lifecycle.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; - -export const Lifecycle: core.serialization.ObjectSchema = - core.serialization.object({ - killTimeout: core.serialization.property("kill_timeout", core.serialization.number().optional()), - durable: core.serialization.boolean().optional(), - }); - -export declare namespace Lifecycle { - export interface Raw { - kill_timeout?: number | null; - durable?: boolean | null; - } -} diff --git a/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/Network.ts b/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/Network.ts deleted file mode 100644 index d7a85b7dcf..0000000000 --- a/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/Network.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; -import { NetworkMode } from "./NetworkMode"; -import { Port } from "./Port"; - -export const Network: core.serialization.ObjectSchema = - core.serialization.object({ - mode: NetworkMode, - ports: core.serialization.record(core.serialization.string(), Port), - }); - -export declare namespace Network { - export interface Raw { - mode: NetworkMode.Raw; - ports: Record; - } -} diff --git a/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/Port.ts b/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/Port.ts index cd5cba7b5f..9962f19b28 100644 --- a/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/Port.ts +++ b/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/Port.ts @@ -5,8 +5,8 @@ import * as serializers from "../../../../../index"; import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; -import { PortProtocol } from "./PortProtocol"; -import { PortRouting } from "./PortRouting"; +import { PortProtocol } from "../../../../builds/resources/common/types/PortProtocol"; +import { PortRouting } from "../../../../builds/resources/common/types/PortRouting"; export const Port: core.serialization.ObjectSchema = core.serialization.object({ diff --git a/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/index.ts b/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/index.ts index ced439f191..09dd4ed15b 100644 --- a/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/index.ts +++ b/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/index.ts @@ -1,11 +1,3 @@ export * from "./Actor"; -export * from "./Runtime"; -export * from "./Lifecycle"; -export * from "./Network"; -export * from "./NetworkMode"; export * from "./Port"; -export * from "./PortProtocol"; -export * from "./PortRouting"; -export * from "./GuardRouting"; -export * from "./HostRouting"; export * from "./EndpointType"; diff --git a/sdks/api/runtime/typescript/src/serialization/resources/actors/types/CreateActorNetworkRequest.ts b/sdks/api/runtime/typescript/src/serialization/resources/actors/types/CreateActorNetworkRequest.ts deleted file mode 100644 index 48a821fd65..0000000000 --- a/sdks/api/runtime/typescript/src/serialization/resources/actors/types/CreateActorNetworkRequest.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as Rivet from "../../../../api/index"; -import * as core from "../../../../core"; -import { NetworkMode } from "../resources/common/types/NetworkMode"; -import { CreateActorPortRequest } from "./CreateActorPortRequest"; - -export const CreateActorNetworkRequest: core.serialization.ObjectSchema< - serializers.actors.CreateActorNetworkRequest.Raw, - Rivet.actors.CreateActorNetworkRequest -> = core.serialization.object({ - mode: NetworkMode.optional(), - ports: core.serialization.record(core.serialization.string(), CreateActorPortRequest).optional(), - waitReady: core.serialization.property("wait_ready", core.serialization.boolean().optional()), -}); - -export declare namespace CreateActorNetworkRequest { - export interface Raw { - mode?: NetworkMode.Raw | null; - ports?: Record | null; - wait_ready?: boolean | null; - } -} diff --git a/sdks/api/runtime/typescript/src/serialization/resources/actors/types/CreateActorPortRequest.ts b/sdks/api/runtime/typescript/src/serialization/resources/actors/types/CreateActorPortRequest.ts deleted file mode 100644 index 591f359b52..0000000000 --- a/sdks/api/runtime/typescript/src/serialization/resources/actors/types/CreateActorPortRequest.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as Rivet from "../../../../api/index"; -import * as core from "../../../../core"; -import { PortProtocol } from "../resources/common/types/PortProtocol"; -import { PortRouting } from "../resources/common/types/PortRouting"; - -export const CreateActorPortRequest: core.serialization.ObjectSchema< - serializers.actors.CreateActorPortRequest.Raw, - Rivet.actors.CreateActorPortRequest -> = core.serialization.object({ - protocol: PortProtocol, - internalPort: core.serialization.property("internal_port", core.serialization.number().optional()), - routing: PortRouting.optional(), -}); - -export declare namespace CreateActorPortRequest { - export interface Raw { - protocol: PortProtocol.Raw; - internal_port?: number | null; - routing?: PortRouting.Raw | null; - } -} diff --git a/sdks/api/runtime/typescript/src/serialization/resources/actors/types/CreateActorRequest.ts b/sdks/api/runtime/typescript/src/serialization/resources/actors/types/CreateActorRequest.ts index 564b80275e..529cc59602 100644 --- a/sdks/api/runtime/typescript/src/serialization/resources/actors/types/CreateActorRequest.ts +++ b/sdks/api/runtime/typescript/src/serialization/resources/actors/types/CreateActorRequest.ts @@ -5,9 +5,7 @@ import * as serializers from "../../../index"; import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; -import { CreateActorRuntimeRequest } from "./CreateActorRuntimeRequest"; -import { CreateActorNetworkRequest } from "./CreateActorNetworkRequest"; -import { Lifecycle } from "../resources/common/types/Lifecycle"; +import { EndpointType } from "../resources/common/types/EndpointType"; export const CreateActorRequest: core.serialization.ObjectSchema< serializers.actors.CreateActorRequest.Raw, @@ -17,9 +15,10 @@ export const CreateActorRequest: core.serialization.ObjectSchema< tags: core.serialization.unknown(), build: core.serialization.string().optional(), buildTags: core.serialization.property("build_tags", core.serialization.unknown().optional()), - runtime: CreateActorRuntimeRequest.optional(), - network: CreateActorNetworkRequest.optional(), - lifecycle: Lifecycle.optional(), + networkEndpointType: core.serialization.property("network_endpoint_type", EndpointType.optional()), + waitForNetworkReady: core.serialization.property("wait_for_network_ready", core.serialization.boolean().optional()), + killTimeout: core.serialization.property("kill_timeout", core.serialization.number().optional()), + durable: core.serialization.boolean().optional(), }); export declare namespace CreateActorRequest { @@ -28,8 +27,9 @@ export declare namespace CreateActorRequest { tags?: unknown; build?: string | null; build_tags?: unknown | null; - runtime?: CreateActorRuntimeRequest.Raw | null; - network?: CreateActorNetworkRequest.Raw | null; - lifecycle?: Lifecycle.Raw | null; + network_endpoint_type?: EndpointType.Raw | null; + wait_for_network_ready?: boolean | null; + kill_timeout?: number | null; + durable?: boolean | null; } } diff --git a/sdks/api/runtime/typescript/src/serialization/resources/actors/types/CreateActorRuntimeNetworkRequest.ts b/sdks/api/runtime/typescript/src/serialization/resources/actors/types/CreateActorRuntimeNetworkRequest.ts deleted file mode 100644 index 8877b07909..0000000000 --- a/sdks/api/runtime/typescript/src/serialization/resources/actors/types/CreateActorRuntimeNetworkRequest.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as Rivet from "../../../../api/index"; -import * as core from "../../../../core"; -import { EndpointType } from "../resources/common/types/EndpointType"; - -export const CreateActorRuntimeNetworkRequest: core.serialization.ObjectSchema< - serializers.actors.CreateActorRuntimeNetworkRequest.Raw, - Rivet.actors.CreateActorRuntimeNetworkRequest -> = core.serialization.object({ - endpointType: core.serialization.property("endpoint_type", EndpointType), -}); - -export declare namespace CreateActorRuntimeNetworkRequest { - export interface Raw { - endpoint_type: EndpointType.Raw; - } -} diff --git a/sdks/api/runtime/typescript/src/serialization/resources/actors/types/CreateActorRuntimeRequest.ts b/sdks/api/runtime/typescript/src/serialization/resources/actors/types/CreateActorRuntimeRequest.ts deleted file mode 100644 index 6ebae952c9..0000000000 --- a/sdks/api/runtime/typescript/src/serialization/resources/actors/types/CreateActorRuntimeRequest.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as Rivet from "../../../../api/index"; -import * as core from "../../../../core"; -import { CreateActorRuntimeNetworkRequest } from "./CreateActorRuntimeNetworkRequest"; - -export const CreateActorRuntimeRequest: core.serialization.ObjectSchema< - serializers.actors.CreateActorRuntimeRequest.Raw, - Rivet.actors.CreateActorRuntimeRequest -> = core.serialization.object({ - environment: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(), - network: CreateActorRuntimeNetworkRequest.optional(), -}); - -export declare namespace CreateActorRuntimeRequest { - export interface Raw { - environment?: Record | null; - network?: CreateActorRuntimeNetworkRequest.Raw | null; - } -} diff --git a/sdks/api/runtime/typescript/src/serialization/resources/actors/types/index.ts b/sdks/api/runtime/typescript/src/serialization/resources/actors/types/index.ts index 785b43b9fd..830fb6ec41 100644 --- a/sdks/api/runtime/typescript/src/serialization/resources/actors/types/index.ts +++ b/sdks/api/runtime/typescript/src/serialization/resources/actors/types/index.ts @@ -1,9 +1,5 @@ export * from "./GetActorResponse"; export * from "./CreateActorRequest"; -export * from "./CreateActorRuntimeRequest"; -export * from "./CreateActorRuntimeNetworkRequest"; -export * from "./CreateActorNetworkRequest"; -export * from "./CreateActorPortRequest"; export * from "./CreateActorResponse"; export * from "./DestroyActorResponse"; export * from "./UpgradeActorRequest"; diff --git a/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/Allocation.ts b/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/Allocation.ts deleted file mode 100644 index 48012b0cb5..0000000000 --- a/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/Allocation.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; -import { AllocationSingle } from "./AllocationSingle"; -import { AllocationMulti } from "./AllocationMulti"; - -export const Allocation: core.serialization.ObjectSchema = - core.serialization.object({ - single: AllocationSingle.optional(), - multi: AllocationMulti.optional(), - }); - -export declare namespace Allocation { - export interface Raw { - single?: AllocationSingle.Raw | null; - multi?: AllocationMulti.Raw | null; - } -} diff --git a/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/AllocationMulti.ts b/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/AllocationMulti.ts deleted file mode 100644 index fd44fef322..0000000000 --- a/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/AllocationMulti.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; - -export const AllocationMulti: core.serialization.ObjectSchema< - serializers.builds.AllocationMulti.Raw, - Rivet.builds.AllocationMulti -> = core.serialization.object({ - slots: core.serialization.number(), -}); - -export declare namespace AllocationMulti { - export interface Raw { - slots: number; - } -} diff --git a/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/AllocationSingle.ts b/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/AllocationSingle.ts deleted file mode 100644 index b27fd90845..0000000000 --- a/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/AllocationSingle.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; - -export const AllocationSingle: core.serialization.ObjectSchema< - serializers.builds.AllocationSingle.Raw, - Rivet.builds.AllocationSingle -> = core.serialization.object({}); - -export declare namespace AllocationSingle { - export interface Raw {} -} diff --git a/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/Build.ts b/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/Build.ts index 13147b3c66..25d2738bf2 100644 --- a/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/Build.ts +++ b/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/Build.ts @@ -6,8 +6,7 @@ import * as serializers from "../../../../../index"; import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; import { Timestamp } from "../../../../common/types/Timestamp"; -import { Allocation } from "./Allocation"; -import { Resources } from "./Resources"; +import { Runtime } from "./Runtime"; export const Build: core.serialization.ObjectSchema = core.serialization.object({ @@ -15,9 +14,8 @@ export const Build: core.serialization.ObjectSchema; + runtime?: Runtime.Raw | null; } } diff --git a/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/GuardRouting.ts b/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/GuardRouting.ts similarity index 84% rename from sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/GuardRouting.ts rename to sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/GuardRouting.ts index c90dc72be1..c393cdd749 100644 --- a/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/GuardRouting.ts +++ b/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/GuardRouting.ts @@ -7,8 +7,8 @@ import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const GuardRouting: core.serialization.ObjectSchema< - serializers.actors.GuardRouting.Raw, - Rivet.actors.GuardRouting + serializers.builds.GuardRouting.Raw, + Rivet.builds.GuardRouting > = core.serialization.object({}); export declare namespace GuardRouting { diff --git a/sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/HostRouting.ts b/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/HostRouting.ts similarity index 85% rename from sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/HostRouting.ts rename to sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/HostRouting.ts index ea0be489e3..9d48327159 100644 --- a/sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/HostRouting.ts +++ b/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/HostRouting.ts @@ -7,8 +7,8 @@ import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; export const HostRouting: core.serialization.ObjectSchema< - serializers.actors.HostRouting.Raw, - Rivet.actors.HostRouting + serializers.builds.HostRouting.Raw, + Rivet.builds.HostRouting > = core.serialization.object({}); export declare namespace HostRouting { diff --git a/sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/NetworkMode.ts b/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/NetworkMode.ts similarity index 89% rename from sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/NetworkMode.ts rename to sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/NetworkMode.ts index 2acc209d87..74e5438844 100644 --- a/sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/NetworkMode.ts +++ b/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/NetworkMode.ts @@ -6,7 +6,7 @@ import * as serializers from "../../../../../index"; import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; -export const NetworkMode: core.serialization.Schema = +export const NetworkMode: core.serialization.Schema = core.serialization.enum_(["bridge", "host"]); export declare namespace NetworkMode { diff --git a/sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/PortProtocol.ts b/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/PortProtocol.ts similarity index 89% rename from sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/PortProtocol.ts rename to sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/PortProtocol.ts index d96849f568..5978fd2ecd 100644 --- a/sdks/api/full/typescript/src/serialization/resources/actors/resources/common/types/PortProtocol.ts +++ b/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/PortProtocol.ts @@ -6,7 +6,7 @@ import * as serializers from "../../../../../index"; import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; -export const PortProtocol: core.serialization.Schema = +export const PortProtocol: core.serialization.Schema = core.serialization.enum_(["http", "https", "tcp", "tcp_tls", "udp"]); export declare namespace PortProtocol { diff --git a/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/PortRequest.ts b/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/PortRequest.ts new file mode 100644 index 0000000000..93326a6c6f --- /dev/null +++ b/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/PortRequest.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; +import * as core from "../../../../../../core"; +import { PortProtocol } from "./PortProtocol"; +import { PortRouting } from "./PortRouting"; + +export const PortRequest: core.serialization.ObjectSchema< + serializers.builds.PortRequest.Raw, + Rivet.builds.PortRequest +> = core.serialization.object({ + protocol: PortProtocol, + internalPort: core.serialization.property("internal_port", core.serialization.number().optional()), + routing: PortRouting.optional(), +}); + +export declare namespace PortRequest { + export interface Raw { + protocol: PortProtocol.Raw; + internal_port?: number | null; + routing?: PortRouting.Raw | null; + } +} diff --git a/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/PortRouting.ts b/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/PortRouting.ts similarity index 90% rename from sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/PortRouting.ts rename to sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/PortRouting.ts index 7374da8309..4d720429e0 100644 --- a/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/PortRouting.ts +++ b/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/PortRouting.ts @@ -9,8 +9,8 @@ import { GuardRouting } from "./GuardRouting"; import { HostRouting } from "./HostRouting"; export const PortRouting: core.serialization.ObjectSchema< - serializers.actors.PortRouting.Raw, - Rivet.actors.PortRouting + serializers.builds.PortRouting.Raw, + Rivet.builds.PortRouting > = core.serialization.object({ guard: GuardRouting.optional(), host: HostRouting.optional(), diff --git a/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/Runtime.ts b/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/Runtime.ts similarity index 50% rename from sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/Runtime.ts rename to sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/Runtime.ts index 05b015eb05..1bed25e5ec 100644 --- a/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/common/types/Runtime.ts +++ b/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/Runtime.ts @@ -5,18 +5,18 @@ import * as serializers from "../../../../../index"; import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; +import { RuntimeContainer } from "./RuntimeContainer"; +import { RuntimeActor } from "./RuntimeActor"; -export const Runtime: core.serialization.ObjectSchema = +export const Runtime: core.serialization.ObjectSchema = core.serialization.object({ - build: core.serialization.string(), - arguments: core.serialization.list(core.serialization.string()).optional(), - environment: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(), + container: RuntimeContainer.optional(), + actor: RuntimeActor.optional(), }); export declare namespace Runtime { export interface Raw { - build: string; - arguments?: string[] | null; - environment?: Record | null; + container?: RuntimeContainer.Raw | null; + actor?: RuntimeActor.Raw | null; } } diff --git a/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/RuntimeActor.ts b/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/RuntimeActor.ts new file mode 100644 index 0000000000..55bdd695d3 --- /dev/null +++ b/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/RuntimeActor.ts @@ -0,0 +1,31 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; +import * as core from "../../../../../../core"; +import { NetworkMode } from "./NetworkMode"; +import { PortRequest } from "./PortRequest"; +import { Resources } from "./Resources"; + +export const RuntimeActor: core.serialization.ObjectSchema< + serializers.builds.RuntimeActor.Raw, + Rivet.builds.RuntimeActor +> = core.serialization.object({ + environment: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(), + networkMode: core.serialization.property("network_mode", NetworkMode.optional()), + ports: core.serialization.record(core.serialization.string(), PortRequest).optional(), + resources: Resources, + slots: core.serialization.number(), +}); + +export declare namespace RuntimeActor { + export interface Raw { + environment?: Record | null; + network_mode?: NetworkMode.Raw | null; + ports?: Record | null; + resources: Resources.Raw; + slots: number; + } +} diff --git a/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/RuntimeContainer.ts b/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/RuntimeContainer.ts new file mode 100644 index 0000000000..aa7a450b63 --- /dev/null +++ b/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/RuntimeContainer.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as Rivet from "../../../../../../api/index"; +import * as core from "../../../../../../core"; +import { NetworkMode } from "./NetworkMode"; +import { PortRequest } from "./PortRequest"; + +export const RuntimeContainer: core.serialization.ObjectSchema< + serializers.builds.RuntimeContainer.Raw, + Rivet.builds.RuntimeContainer +> = core.serialization.object({ + environment: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(), + networkMode: core.serialization.property("network_mode", NetworkMode.optional()), + ports: core.serialization.record(core.serialization.string(), PortRequest).optional(), +}); + +export declare namespace RuntimeContainer { + export interface Raw { + environment?: Record | null; + network_mode?: NetworkMode.Raw | null; + ports?: Record | null; + } +} diff --git a/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/index.ts b/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/index.ts index b71c7706dc..f8dfc5e0d2 100644 --- a/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/index.ts +++ b/sdks/api/runtime/typescript/src/serialization/resources/builds/resources/common/types/index.ts @@ -1,7 +1,13 @@ export * from "./Build"; export * from "./Kind"; export * from "./Compression"; -export * from "./Allocation"; -export * from "./AllocationSingle"; -export * from "./AllocationMulti"; +export * from "./Runtime"; +export * from "./RuntimeContainer"; +export * from "./RuntimeActor"; +export * from "./PortProtocol"; +export * from "./PortRouting"; +export * from "./GuardRouting"; +export * from "./HostRouting"; +export * from "./PortRequest"; export * from "./Resources"; +export * from "./NetworkMode"; diff --git a/sdks/api/runtime/typescript/src/serialization/resources/builds/types/PrepareBuildRequest.ts b/sdks/api/runtime/typescript/src/serialization/resources/builds/types/PrepareBuildRequest.ts index c7416df518..1492968e86 100644 --- a/sdks/api/runtime/typescript/src/serialization/resources/builds/types/PrepareBuildRequest.ts +++ b/sdks/api/runtime/typescript/src/serialization/resources/builds/types/PrepareBuildRequest.ts @@ -8,8 +8,7 @@ import * as core from "../../../../core"; import { PrepareFile } from "../../upload/resources/common/types/PrepareFile"; import { Kind } from "../resources/common/types/Kind"; import { Compression } from "../resources/common/types/Compression"; -import { Allocation } from "../resources/common/types/Allocation"; -import { Resources } from "../resources/common/types/Resources"; +import { Runtime } from "../resources/common/types/Runtime"; export const PrepareBuildRequest: core.serialization.ObjectSchema< serializers.builds.PrepareBuildRequest.Raw, @@ -19,8 +18,7 @@ export const PrepareBuildRequest: core.serialization.ObjectSchema< imageFile: core.serialization.property("image_file", PrepareFile), kind: Kind.optional(), compression: Compression.optional(), - allocation: Allocation.optional(), - resources: Resources.optional(), + runtime: Runtime.optional(), }); export declare namespace PrepareBuildRequest { @@ -29,7 +27,6 @@ export declare namespace PrepareBuildRequest { image_file: PrepareFile.Raw; kind?: Kind.Raw | null; compression?: Compression.Raw | null; - allocation?: Allocation.Raw | null; - resources?: Resources.Raw | null; + runtime?: Runtime.Raw | null; } } diff --git a/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/Container.ts b/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/Container.ts index 003549295d..4f01c760bb 100644 --- a/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/Container.ts +++ b/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/Container.ts @@ -6,10 +6,8 @@ import * as serializers from "../../../../../index"; import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; import { Id } from "../../../../common/types/Id"; -import { Runtime } from "./Runtime"; -import { Network } from "./Network"; -import { Resources } from "./Resources"; -import { Lifecycle } from "./Lifecycle"; +import { Port } from "./Port"; +import { Resources } from "../../../../builds/resources/common/types/Resources"; import { Timestamp } from "../../../../common/types/Timestamp"; export const Container: core.serialization.ObjectSchema< @@ -19,10 +17,13 @@ export const Container: core.serialization.ObjectSchema< id: Id, region: core.serialization.string(), tags: core.serialization.unknown(), - runtime: Runtime, - network: Network, + build: core.serialization.string(), + arguments: core.serialization.list(core.serialization.string()).optional(), + environment: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(), + ports: core.serialization.record(core.serialization.string(), Port), resources: Resources, - lifecycle: Lifecycle, + killTimeout: core.serialization.property("kill_timeout", core.serialization.number().optional()), + durable: core.serialization.boolean().optional(), createdAt: core.serialization.property("created_at", Timestamp), startedAt: core.serialization.property("started_at", Timestamp.optional()), destroyedAt: core.serialization.property("destroyed_at", Timestamp.optional()), @@ -33,10 +34,13 @@ export declare namespace Container { id: Id.Raw; region: string; tags?: unknown; - runtime: Runtime.Raw; - network: Network.Raw; + build: string; + arguments?: string[] | null; + environment?: Record | null; + ports: Record; resources: Resources.Raw; - lifecycle: Lifecycle.Raw; + kill_timeout?: number | null; + durable?: boolean | null; created_at: Timestamp.Raw; started_at?: Timestamp.Raw | null; destroyed_at?: Timestamp.Raw | null; diff --git a/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/GuardRouting.ts b/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/GuardRouting.ts deleted file mode 100644 index 19859fe146..0000000000 --- a/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/GuardRouting.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; - -export const GuardRouting: core.serialization.ObjectSchema< - serializers.containers.GuardRouting.Raw, - Rivet.containers.GuardRouting -> = core.serialization.object({}); - -export declare namespace GuardRouting { - export interface Raw {} -} diff --git a/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/HostRouting.ts b/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/HostRouting.ts deleted file mode 100644 index 7af0c934be..0000000000 --- a/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/HostRouting.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; - -export const HostRouting: core.serialization.ObjectSchema< - serializers.containers.HostRouting.Raw, - Rivet.containers.HostRouting -> = core.serialization.object({}); - -export declare namespace HostRouting { - export interface Raw {} -} diff --git a/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/Lifecycle.ts b/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/Lifecycle.ts deleted file mode 100644 index dfce2b7327..0000000000 --- a/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/Lifecycle.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; - -export const Lifecycle: core.serialization.ObjectSchema< - serializers.containers.Lifecycle.Raw, - Rivet.containers.Lifecycle -> = core.serialization.object({ - killTimeout: core.serialization.property("kill_timeout", core.serialization.number().optional()), - durable: core.serialization.boolean().optional(), -}); - -export declare namespace Lifecycle { - export interface Raw { - kill_timeout?: number | null; - durable?: boolean | null; - } -} diff --git a/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/Network.ts b/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/Network.ts deleted file mode 100644 index 8e4600735c..0000000000 --- a/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/Network.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; -import { NetworkMode } from "./NetworkMode"; -import { Port } from "./Port"; - -export const Network: core.serialization.ObjectSchema = - core.serialization.object({ - mode: NetworkMode, - ports: core.serialization.record(core.serialization.string(), Port), - }); - -export declare namespace Network { - export interface Raw { - mode: NetworkMode.Raw; - ports: Record; - } -} diff --git a/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/NetworkMode.ts b/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/NetworkMode.ts deleted file mode 100644 index 69d5581298..0000000000 --- a/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/NetworkMode.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; - -export const NetworkMode: core.serialization.Schema< - serializers.containers.NetworkMode.Raw, - Rivet.containers.NetworkMode -> = core.serialization.enum_(["bridge", "host"]); - -export declare namespace NetworkMode { - export type Raw = "bridge" | "host"; -} diff --git a/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/Port.ts b/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/Port.ts index 3c9cb6d654..aad8a34700 100644 --- a/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/Port.ts +++ b/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/Port.ts @@ -5,8 +5,8 @@ import * as serializers from "../../../../../index"; import * as Rivet from "../../../../../../api/index"; import * as core from "../../../../../../core"; -import { PortProtocol } from "./PortProtocol"; -import { PortRouting } from "./PortRouting"; +import { PortProtocol } from "../../../../builds/resources/common/types/PortProtocol"; +import { PortRouting } from "../../../../builds/resources/common/types/PortRouting"; export const Port: core.serialization.ObjectSchema = core.serialization.object({ diff --git a/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/PortProtocol.ts b/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/PortProtocol.ts deleted file mode 100644 index c45d0c9be2..0000000000 --- a/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/PortProtocol.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; - -export const PortProtocol: core.serialization.Schema< - serializers.containers.PortProtocol.Raw, - Rivet.containers.PortProtocol -> = core.serialization.enum_(["http", "https", "tcp", "tcp_tls", "udp"]); - -export declare namespace PortProtocol { - export type Raw = "http" | "https" | "tcp" | "tcp_tls" | "udp"; -} diff --git a/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/PortRouting.ts b/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/PortRouting.ts deleted file mode 100644 index e84aace739..0000000000 --- a/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/PortRouting.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; -import { GuardRouting } from "./GuardRouting"; -import { HostRouting } from "./HostRouting"; - -export const PortRouting: core.serialization.ObjectSchema< - serializers.containers.PortRouting.Raw, - Rivet.containers.PortRouting -> = core.serialization.object({ - guard: GuardRouting.optional(), - host: HostRouting.optional(), -}); - -export declare namespace PortRouting { - export interface Raw { - guard?: GuardRouting.Raw | null; - host?: HostRouting.Raw | null; - } -} diff --git a/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/Resources.ts b/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/Resources.ts deleted file mode 100644 index f2cdd4f846..0000000000 --- a/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/Resources.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; - -export const Resources: core.serialization.ObjectSchema< - serializers.containers.Resources.Raw, - Rivet.containers.Resources -> = core.serialization.object({ - cpu: core.serialization.number(), - memory: core.serialization.number(), -}); - -export declare namespace Resources { - export interface Raw { - cpu: number; - memory: number; - } -} diff --git a/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/Runtime.ts b/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/Runtime.ts deleted file mode 100644 index 2966bdc0d1..0000000000 --- a/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/Runtime.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../../index"; -import * as Rivet from "../../../../../../api/index"; -import * as core from "../../../../../../core"; - -export const Runtime: core.serialization.ObjectSchema = - core.serialization.object({ - build: core.serialization.string(), - arguments: core.serialization.list(core.serialization.string()).optional(), - environment: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(), - }); - -export declare namespace Runtime { - export interface Raw { - build: string; - arguments?: string[] | null; - environment?: Record | null; - } -} diff --git a/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/index.ts b/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/index.ts index 634dcaff02..f9f014863f 100644 --- a/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/index.ts +++ b/sdks/api/runtime/typescript/src/serialization/resources/containers/resources/common/types/index.ts @@ -1,12 +1,3 @@ export * from "./Container"; -export * from "./Runtime"; -export * from "./Lifecycle"; -export * from "./Resources"; -export * from "./Network"; -export * from "./NetworkMode"; export * from "./Port"; -export * from "./PortProtocol"; -export * from "./PortRouting"; -export * from "./GuardRouting"; -export * from "./HostRouting"; export * from "./EndpointType"; diff --git a/sdks/api/runtime/typescript/src/serialization/resources/containers/types/CreateContainerNetworkRequest.ts b/sdks/api/runtime/typescript/src/serialization/resources/containers/types/CreateContainerNetworkRequest.ts deleted file mode 100644 index 9da2cd4cc8..0000000000 --- a/sdks/api/runtime/typescript/src/serialization/resources/containers/types/CreateContainerNetworkRequest.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as Rivet from "../../../../api/index"; -import * as core from "../../../../core"; -import { NetworkMode } from "../resources/common/types/NetworkMode"; -import { CreateContainerPortRequest } from "./CreateContainerPortRequest"; - -export const CreateContainerNetworkRequest: core.serialization.ObjectSchema< - serializers.containers.CreateContainerNetworkRequest.Raw, - Rivet.containers.CreateContainerNetworkRequest -> = core.serialization.object({ - mode: NetworkMode.optional(), - ports: core.serialization.record(core.serialization.string(), CreateContainerPortRequest).optional(), - waitReady: core.serialization.property("wait_ready", core.serialization.boolean().optional()), -}); - -export declare namespace CreateContainerNetworkRequest { - export interface Raw { - mode?: NetworkMode.Raw | null; - ports?: Record | null; - wait_ready?: boolean | null; - } -} diff --git a/sdks/api/runtime/typescript/src/serialization/resources/containers/types/CreateContainerPortRequest.ts b/sdks/api/runtime/typescript/src/serialization/resources/containers/types/CreateContainerPortRequest.ts deleted file mode 100644 index 9016ed4e9f..0000000000 --- a/sdks/api/runtime/typescript/src/serialization/resources/containers/types/CreateContainerPortRequest.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as Rivet from "../../../../api/index"; -import * as core from "../../../../core"; -import { PortProtocol } from "../resources/common/types/PortProtocol"; -import { PortRouting } from "../resources/common/types/PortRouting"; - -export const CreateContainerPortRequest: core.serialization.ObjectSchema< - serializers.containers.CreateContainerPortRequest.Raw, - Rivet.containers.CreateContainerPortRequest -> = core.serialization.object({ - protocol: PortProtocol, - internalPort: core.serialization.property("internal_port", core.serialization.number().optional()), - routing: PortRouting.optional(), -}); - -export declare namespace CreateContainerPortRequest { - export interface Raw { - protocol: PortProtocol.Raw; - internal_port?: number | null; - routing?: PortRouting.Raw | null; - } -} diff --git a/sdks/api/runtime/typescript/src/serialization/resources/containers/types/CreateContainerRequest.ts b/sdks/api/runtime/typescript/src/serialization/resources/containers/types/CreateContainerRequest.ts index d929186141..fa626d423b 100644 --- a/sdks/api/runtime/typescript/src/serialization/resources/containers/types/CreateContainerRequest.ts +++ b/sdks/api/runtime/typescript/src/serialization/resources/containers/types/CreateContainerRequest.ts @@ -5,10 +5,9 @@ import * as serializers from "../../../index"; import * as Rivet from "../../../../api/index"; import * as core from "../../../../core"; -import { CreateContainerRuntimeRequest } from "./CreateContainerRuntimeRequest"; -import { CreateContainerNetworkRequest } from "./CreateContainerNetworkRequest"; -import { Resources } from "../resources/common/types/Resources"; -import { Lifecycle } from "../resources/common/types/Lifecycle"; +import { EndpointType } from "../resources/common/types/EndpointType"; +import { PortRequest } from "../../builds/resources/common/types/PortRequest"; +import { Resources } from "../../builds/resources/common/types/Resources"; export const CreateContainerRequest: core.serialization.ObjectSchema< serializers.containers.CreateContainerRequest.Raw, @@ -18,10 +17,13 @@ export const CreateContainerRequest: core.serialization.ObjectSchema< tags: core.serialization.unknown(), build: core.serialization.string().optional(), buildTags: core.serialization.property("build_tags", core.serialization.unknown().optional()), - runtime: CreateContainerRuntimeRequest.optional(), - network: CreateContainerNetworkRequest.optional(), + environment: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(), + networkEndpointType: core.serialization.property("network_endpoint_type", EndpointType.optional()), + waitForNetworkReady: core.serialization.property("wait_for_network_ready", core.serialization.boolean().optional()), + ports: core.serialization.record(core.serialization.string(), PortRequest).optional(), resources: Resources, - lifecycle: Lifecycle.optional(), + killTimeout: core.serialization.property("kill_timeout", core.serialization.number().optional()), + durable: core.serialization.boolean().optional(), }); export declare namespace CreateContainerRequest { @@ -30,9 +32,12 @@ export declare namespace CreateContainerRequest { tags?: unknown; build?: string | null; build_tags?: unknown | null; - runtime?: CreateContainerRuntimeRequest.Raw | null; - network?: CreateContainerNetworkRequest.Raw | null; + environment?: Record | null; + network_endpoint_type?: EndpointType.Raw | null; + wait_for_network_ready?: boolean | null; + ports?: Record | null; resources: Resources.Raw; - lifecycle?: Lifecycle.Raw | null; + kill_timeout?: number | null; + durable?: boolean | null; } } diff --git a/sdks/api/runtime/typescript/src/serialization/resources/containers/types/CreateContainerRuntimeNetworkRequest.ts b/sdks/api/runtime/typescript/src/serialization/resources/containers/types/CreateContainerRuntimeNetworkRequest.ts deleted file mode 100644 index adc30398c8..0000000000 --- a/sdks/api/runtime/typescript/src/serialization/resources/containers/types/CreateContainerRuntimeNetworkRequest.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as Rivet from "../../../../api/index"; -import * as core from "../../../../core"; -import { EndpointType } from "../resources/common/types/EndpointType"; - -export const CreateContainerRuntimeNetworkRequest: core.serialization.ObjectSchema< - serializers.containers.CreateContainerRuntimeNetworkRequest.Raw, - Rivet.containers.CreateContainerRuntimeNetworkRequest -> = core.serialization.object({ - endpointType: core.serialization.property("endpoint_type", EndpointType), -}); - -export declare namespace CreateContainerRuntimeNetworkRequest { - export interface Raw { - endpoint_type: EndpointType.Raw; - } -} diff --git a/sdks/api/runtime/typescript/src/serialization/resources/containers/types/CreateContainerRuntimeRequest.ts b/sdks/api/runtime/typescript/src/serialization/resources/containers/types/CreateContainerRuntimeRequest.ts deleted file mode 100644 index b4cd6b0c0e..0000000000 --- a/sdks/api/runtime/typescript/src/serialization/resources/containers/types/CreateContainerRuntimeRequest.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../index"; -import * as Rivet from "../../../../api/index"; -import * as core from "../../../../core"; -import { CreateContainerRuntimeNetworkRequest } from "./CreateContainerRuntimeNetworkRequest"; - -export const CreateContainerRuntimeRequest: core.serialization.ObjectSchema< - serializers.containers.CreateContainerRuntimeRequest.Raw, - Rivet.containers.CreateContainerRuntimeRequest -> = core.serialization.object({ - environment: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(), - network: CreateContainerRuntimeNetworkRequest.optional(), -}); - -export declare namespace CreateContainerRuntimeRequest { - export interface Raw { - environment?: Record | null; - network?: CreateContainerRuntimeNetworkRequest.Raw | null; - } -} diff --git a/sdks/api/runtime/typescript/src/serialization/resources/containers/types/index.ts b/sdks/api/runtime/typescript/src/serialization/resources/containers/types/index.ts index 436ea216ac..46162ce204 100644 --- a/sdks/api/runtime/typescript/src/serialization/resources/containers/types/index.ts +++ b/sdks/api/runtime/typescript/src/serialization/resources/containers/types/index.ts @@ -1,9 +1,5 @@ export * from "./GetContainerResponse"; export * from "./CreateContainerRequest"; -export * from "./CreateContainerRuntimeRequest"; -export * from "./CreateContainerRuntimeNetworkRequest"; -export * from "./CreateContainerNetworkRequest"; -export * from "./CreateContainerPortRequest"; export * from "./CreateContainerResponse"; export * from "./DestroyContainerResponse"; export * from "./UpgradeContainerRequest";