diff --git a/CLAUDE.md b/CLAUDE.md index 26ac4bf372..63eb799f03 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,2 +1,4 @@ - Do not use cat, hexdump, perl, or sed. Always edit files directly. -- If attempting to use Cargo, use `nix-shell --command 'cargo ...'` \ No newline at end of file +- If attempting to use Cargo, use `nix-shell --command 'cargo ...'` +- Public API specs live in sdks/api/fern/ +- When modifying sdks/api/fern/, run ./scripts/fern/gen.sh to regenerate the related libraries \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 72558d3e70..98c0e80bd6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -462,9 +462,11 @@ dependencies = [ "cdn-namespace-domain-create", "chirp-client", "chrono", + "clickhouse-user-query", "cloud-namespace-token-development-create", "cloud-namespace-token-public-create", "cluster", + "core-guard", "faker-build", "faker-game", "faker-game-namespace", @@ -506,6 +508,7 @@ dependencies = [ "tracing-subscriber", "upload-complete", "upload-get", + "upload-prepare", "url", "user-get", "user-identity-get", @@ -3270,12 +3273,6 @@ dependencies = [ "inout", ] -[[package]] -name = "cityhash-rs" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93a719913643003b84bd13022b4b7e703c09342cd03b679c4641c7d2e50dc34d" - [[package]] name = "cjson" version = "0.1.2" @@ -3348,13 +3345,13 @@ checksum = "a0875e527e299fc5f4faba42870bf199a39ab0bb2dbba1b8aef0a2151451130f" dependencies = [ "bstr", "bytes", - "clickhouse-derive 0.1.1", + "clickhouse-derive", "clickhouse-rs-cityhash-sys", "futures", "hyper 0.14.31", "hyper-tls 0.5.0", "lz4", - "sealed 0.4.0", + "sealed", "serde", "static_assertions", "thiserror 1.0.69", @@ -3363,31 +3360,6 @@ dependencies = [ "uuid", ] -[[package]] -name = "clickhouse" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3093f817c4f81c8bd174ed8dd30eac785821a8a7eef27a7dcb7f8cd0d0f6548" -dependencies = [ - "bstr", - "bytes", - "cityhash-rs", - "clickhouse-derive 0.2.0", - "futures", - "futures-channel", - "http-body-util", - "hyper 1.6.0", - "hyper-util", - "lz4_flex", - "replace_with", - "sealed 0.5.0", - "serde", - "static_assertions", - "thiserror 1.0.69", - "tokio", - "url", -] - [[package]] name = "clickhouse-derive" version = "0.1.1" @@ -3400,18 +3372,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "clickhouse-derive" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d70f3e2893f7d3e017eeacdc9a708fbc29a10488e3ebca21f9df6a5d2b616dbb" -dependencies = [ - "proc-macro2", - "quote", - "serde_derive_internals 0.29.1", - "syn 2.0.90", -] - [[package]] name = "clickhouse-inserter" version = "25.5.2" @@ -3442,7 +3402,7 @@ dependencies = [ name = "clickhouse-user-query" version = "25.5.1" dependencies = [ - "clickhouse 0.12.2", + "clickhouse", "serde", "serde_json", "testcontainers 0.24.0", @@ -4037,6 +3997,18 @@ dependencies = [ "libc", ] +[[package]] +name = "core-guard" +version = "0.1.0" +dependencies = [ + "chirp-workflow", + "clickhouse-user-query", + "indoc 2.0.5", + "once_cell", + "rivet-operation", + "serde", +] + [[package]] name = "cpufeatures" version = "0.2.16" @@ -8384,7 +8356,7 @@ dependencies = [ "chirp-client", "chirp-worker", "chrono", - "clickhouse 0.11.6", + "clickhouse", "prost 0.10.4", "rivet-operation", "serde", @@ -8396,7 +8368,7 @@ version = "25.5.2" dependencies = [ "chirp-client", "chirp-worker", - "clickhouse 0.11.6", + "clickhouse", "reqwest 0.11.27", "rivet-config", "rivet-health-checks", @@ -10762,6 +10734,7 @@ dependencies = [ "anyhow", "build", "chirp-workflow", + "clickhouse-user-query", "cluster", "fdb-util", "foundationdb", @@ -10771,6 +10744,7 @@ dependencies = [ "heck 0.3.3", "lazy_static", "nix 0.30.1", + "once_cell", "rand 0.8.5", "regex", "reqwest 0.12.12", @@ -12096,12 +12070,6 @@ dependencies = [ "sqlx", ] -[[package]] -name = "replace_with" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51743d3e274e2b18df81c4dc6caf8a5b8e15dbe799e0dca05c7617380094e884" - [[package]] name = "reqwest" version = "0.11.27" @@ -12595,7 +12563,9 @@ name = "rivet-guard-core" version = "25.5.2" dependencies = [ "bytes", + "chirp-workflow", "clickhouse-inserter", + "clickhouse-user-query", "cluster", "futures", "futures-util", @@ -12607,6 +12577,7 @@ dependencies = [ "hyper-util", "lazy_static", "moka", + "once_cell", "pegboard", "prometheus", "rand 0.8.5", @@ -12869,7 +12840,7 @@ version = "25.5.2" dependencies = [ "anyhow", "async-nats", - "clickhouse 0.11.6", + "clickhouse", "clickhouse-inserter", "dirs", "divan", @@ -13786,18 +13757,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "sealed" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4a8caec23b7800fb97971a1c6ae365b6239aaeddfb934d6265f8505e795699d" -dependencies = [ - "heck 0.4.1", - "proc-macro2", - "quote", - "syn 2.0.90", -] - [[package]] name = "sec1" version = "0.3.0" diff --git a/Cargo.toml b/Cargo.toml index 823d16cebe..4696aad577 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [workspace] resolver = "2" -members = ["packages/common/api-helper/build","packages/common/api-helper/macros","packages/common/cache/build","packages/common/cache/result","packages/common/chirp-workflow/core","packages/common/chirp-workflow/macros","packages/common/chirp/client","packages/common/chirp/metrics","packages/common/chirp/perf","packages/common/chirp/types","packages/common/chirp/worker","packages/common/chirp/worker-attributes","packages/common/claims","packages/common/clickhouse-inserter","packages/common/clickhouse-user-query","packages/common/config","packages/common/connection","packages/common/convert","packages/common/deno-embed","packages/common/env","packages/common/fdb-util","packages/common/formatted-error","packages/common/global-error","packages/common/health-checks","packages/common/kv-str","packages/common/logs","packages/common/metrics","packages/common/migrate","packages/common/nomad-util","packages/common/operation/core","packages/common/operation/macros","packages/common/pools","packages/common/redis-util","packages/common/runtime","packages/common/s3-util","packages/common/schemac","packages/common/server-cli","packages/common/service-discovery","packages/common/service-manager","packages/common/smithy-output/api-auth/rust","packages/common/smithy-output/api-auth/rust-server","packages/common/smithy-output/api-cf-verification/rust","packages/common/smithy-output/api-cf-verification/rust-server","packages/common/smithy-output/api-cloud/rust","packages/common/smithy-output/api-cloud/rust-server","packages/common/smithy-output/api-group/rust","packages/common/smithy-output/api-group/rust-server","packages/common/smithy-output/api-identity/rust","packages/common/smithy-output/api-identity/rust-server","packages/common/smithy-output/api-job/rust","packages/common/smithy-output/api-job/rust-server","packages/common/smithy-output/api-kv/rust","packages/common/smithy-output/api-kv/rust-server","packages/common/smithy-output/api-matchmaker/rust","packages/common/smithy-output/api-matchmaker/rust-server","packages/common/smithy-output/api-party/rust","packages/common/smithy-output/api-party/rust-server","packages/common/smithy-output/api-portal/rust","packages/common/smithy-output/api-portal/rust-server","packages/common/smithy-output/api-status/rust","packages/common/smithy-output/api-status/rust-server","packages/common/smithy-output/api-traefik-provider/rust","packages/common/smithy-output/api-traefik-provider/rust-server","packages/common/test","packages/common/test-images","packages/common/types-proto/build","packages/common/types-proto/core","packages/common/util/core","packages/common/util/macros","packages/common/util/search","packages/core/api/actor","packages/core/api/auth","packages/core/api/cf-verification","packages/core/api/cloud","packages/core/api/games","packages/core/api/group","packages/core/api/identity","packages/core/api/intercom","packages/core/api/job","packages/core/api/matchmaker","packages/core/api/monolith-edge","packages/core/api/monolith-public","packages/core/api/portal","packages/core/api/provision","packages/core/api/status","packages/core/api/traefik-provider","packages/core/api/ui","packages/core/infra/legacy/job-runner","packages/core/infra/schema-generator","packages/core/infra/server","packages/core/services/build","packages/core/services/build/ops/create","packages/core/services/build/ops/get","packages/core/services/build/ops/list-for-env","packages/core/services/build/ops/list-for-game","packages/core/services/build/standalone/default-create","packages/core/services/build/util","packages/core/services/captcha/ops/hcaptcha-config-get","packages/core/services/captcha/ops/hcaptcha-verify","packages/core/services/captcha/ops/request","packages/core/services/captcha/ops/turnstile-config-get","packages/core/services/captcha/ops/turnstile-verify","packages/core/services/captcha/ops/verify","packages/core/services/captcha/util","packages/core/services/cdn/ops/namespace-auth-user-remove","packages/core/services/cdn/ops/namespace-auth-user-update","packages/core/services/cdn/ops/namespace-create","packages/core/services/cdn/ops/namespace-domain-create","packages/core/services/cdn/ops/namespace-domain-remove","packages/core/services/cdn/ops/namespace-get","packages/core/services/cdn/ops/namespace-resolve-domain","packages/core/services/cdn/ops/ns-auth-type-set","packages/core/services/cdn/ops/ns-enable-domain-public-auth-set","packages/core/services/cdn/ops/site-create","packages/core/services/cdn/ops/site-get","packages/core/services/cdn/ops/site-list-for-game","packages/core/services/cdn/ops/version-get","packages/core/services/cdn/ops/version-prepare","packages/core/services/cdn/ops/version-publish","packages/core/services/cdn/util","packages/core/services/cdn/worker","packages/core/services/cf-custom-hostname/ops/get","packages/core/services/cf-custom-hostname/ops/list-for-namespace-id","packages/core/services/cf-custom-hostname/ops/resolve-hostname","packages/core/services/cf-custom-hostname/worker","packages/core/services/cloud/ops/device-link-create","packages/core/services/cloud/ops/game-config-create","packages/core/services/cloud/ops/game-config-get","packages/core/services/cloud/ops/game-token-create","packages/core/services/cloud/ops/namespace-create","packages/core/services/cloud/ops/namespace-get","packages/core/services/cloud/ops/namespace-token-development-create","packages/core/services/cloud/ops/namespace-token-public-create","packages/core/services/cloud/ops/version-get","packages/core/services/cloud/ops/version-publish","packages/core/services/cloud/standalone/default-create","packages/core/services/cloud/worker","packages/core/services/cluster","packages/core/services/cluster/standalone/datacenter-tls-renew","packages/core/services/cluster/standalone/default-update","packages/core/services/cluster/standalone/gc","packages/core/services/cluster/standalone/metrics-publish","packages/core/services/custom-user-avatar/ops/list-for-game","packages/core/services/custom-user-avatar/ops/upload-complete","packages/core/services/debug/ops/email-res","packages/core/services/dynamic-config","packages/core/services/email-verification/ops/complete","packages/core/services/email-verification/ops/create","packages/core/services/email/ops/send","packages/core/services/external/ops/request-validate","packages/core/services/external/worker","packages/core/services/faker/ops/build","packages/core/services/faker/ops/cdn-site","packages/core/services/faker/ops/game","packages/core/services/faker/ops/game-namespace","packages/core/services/faker/ops/game-version","packages/core/services/faker/ops/job-run","packages/core/services/faker/ops/job-template","packages/core/services/faker/ops/mm-lobby","packages/core/services/faker/ops/mm-lobby-row","packages/core/services/faker/ops/mm-player","packages/core/services/faker/ops/region","packages/core/services/faker/ops/team","packages/core/services/faker/ops/user","packages/core/services/game/ops/banner-upload-complete","packages/core/services/game/ops/create","packages/core/services/game/ops/get","packages/core/services/game/ops/list-all","packages/core/services/game/ops/list-for-team","packages/core/services/game/ops/logo-upload-complete","packages/core/services/game/ops/namespace-create","packages/core/services/game/ops/namespace-get","packages/core/services/game/ops/namespace-list","packages/core/services/game/ops/namespace-resolve-name-id","packages/core/services/game/ops/namespace-resolve-url","packages/core/services/game/ops/namespace-validate","packages/core/services/game/ops/namespace-version-history-list","packages/core/services/game/ops/namespace-version-set","packages/core/services/game/ops/recommend","packages/core/services/game/ops/resolve-name-id","packages/core/services/game/ops/resolve-namespace-id","packages/core/services/game/ops/token-development-validate","packages/core/services/game/ops/validate","packages/core/services/game/ops/version-create","packages/core/services/game/ops/version-get","packages/core/services/game/ops/version-list","packages/core/services/game/ops/version-validate","packages/core/services/ip/ops/info","packages/core/services/job-log/ops/read","packages/core/services/job-log/worker","packages/core/services/job-run","packages/core/services/job/standalone/gc","packages/core/services/job/util","packages/core/services/linode","packages/core/services/linode/standalone/gc","packages/core/services/load-test/standalone/api-cloud","packages/core/services/load-test/standalone/mm","packages/core/services/load-test/standalone/mm-sustain","packages/core/services/load-test/standalone/sqlx","packages/core/services/load-test/standalone/watch-requests","packages/core/services/mm-config/ops/game-get","packages/core/services/mm-config/ops/game-upsert","packages/core/services/mm-config/ops/lobby-group-get","packages/core/services/mm-config/ops/lobby-group-resolve-name-id","packages/core/services/mm-config/ops/lobby-group-resolve-version","packages/core/services/mm-config/ops/namespace-config-set","packages/core/services/mm-config/ops/namespace-config-validate","packages/core/services/mm-config/ops/namespace-create","packages/core/services/mm-config/ops/namespace-get","packages/core/services/mm-config/ops/version-get","packages/core/services/mm-config/ops/version-prepare","packages/core/services/mm-config/ops/version-publish","packages/core/services/mm/ops/dev-player-token-create","packages/core/services/mm/ops/lobby-find-fail","packages/core/services/mm/ops/lobby-find-lobby-query-list","packages/core/services/mm/ops/lobby-find-try-complete","packages/core/services/mm/ops/lobby-for-run-id","packages/core/services/mm/ops/lobby-get","packages/core/services/mm/ops/lobby-history","packages/core/services/mm/ops/lobby-idle-update","packages/core/services/mm/ops/lobby-list-for-namespace","packages/core/services/mm/ops/lobby-list-for-user-id","packages/core/services/mm/ops/lobby-player-count","packages/core/services/mm/ops/lobby-runtime-aggregate","packages/core/services/mm/ops/lobby-state-get","packages/core/services/mm/ops/player-count-for-namespace","packages/core/services/mm/ops/player-get","packages/core/services/mm/standalone/gc","packages/core/services/mm/util","packages/core/services/mm/worker","packages/core/services/monolith/standalone/worker","packages/core/services/monolith/standalone/workflow-worker","packages/core/services/nomad/standalone/monitor","packages/core/services/region/ops/get","packages/core/services/region/ops/list","packages/core/services/region/ops/list-for-game","packages/core/services/region/ops/recommend","packages/core/services/region/ops/resolve","packages/core/services/region/ops/resolve-for-game","packages/core/services/route","packages/core/services/server-spec","packages/core/services/team-invite/ops/get","packages/core/services/team-invite/worker","packages/core/services/team/ops/avatar-upload-complete","packages/core/services/team/ops/get","packages/core/services/team/ops/join-request-list","packages/core/services/team/ops/member-count","packages/core/services/team/ops/member-get","packages/core/services/team/ops/member-list","packages/core/services/team/ops/member-relationship-get","packages/core/services/team/ops/profile-validate","packages/core/services/team/ops/recommend","packages/core/services/team/ops/resolve-display-name","packages/core/services/team/ops/user-ban-get","packages/core/services/team/ops/user-ban-list","packages/core/services/team/ops/validate","packages/core/services/team/util","packages/core/services/team/worker","packages/core/services/telemetry/standalone/beacon","packages/core/services/tier","packages/core/services/token/ops/create","packages/core/services/token/ops/exchange","packages/core/services/token/ops/get","packages/core/services/token/ops/revoke","packages/core/services/upload/ops/complete","packages/core/services/upload/ops/file-list","packages/core/services/upload/ops/get","packages/core/services/upload/ops/list-for-user","packages/core/services/upload/ops/prepare","packages/core/services/upload/worker","packages/core/services/user","packages/core/services/user-identity/ops/create","packages/core/services/user-identity/ops/delete","packages/core/services/user-identity/ops/get","packages/core/services/user/ops/avatar-upload-complete","packages/core/services/user/ops/get","packages/core/services/user/ops/pending-delete-toggle","packages/core/services/user/ops/profile-validate","packages/core/services/user/ops/resolve-email","packages/core/services/user/ops/team-list","packages/core/services/user/ops/token-create","packages/core/services/user/standalone/delete-pending","packages/core/services/user/worker","packages/edge/api/actor","packages/edge/api/intercom","packages/edge/api/monolith-edge","packages/edge/api/monolith-public","packages/edge/api/traefik-provider","packages/edge/infra/client/actor-kv","packages/edge/infra/client/config","packages/edge/infra/client/container-runner","packages/edge/infra/client/echo","packages/edge/infra/client/isolate-v8-runner","packages/edge/infra/client/manager","packages/edge/infra/edge-server","packages/edge/infra/guard/core","packages/edge/infra/guard/server","packages/edge/services/monolith/standalone/workflow-worker","packages/edge/services/pegboard","packages/edge/services/pegboard/standalone/usage-metrics-publish","packages/edge/services/pegboard/standalone/ws","packages/toolchain/cli","packages/toolchain/js-utils-embed","packages/toolchain/toolchain","sdks/api/full/rust"] +members = ["packages/common/api-helper/build","packages/common/api-helper/macros","packages/common/cache/build","packages/common/cache/result","packages/common/chirp-workflow/core","packages/common/chirp-workflow/macros","packages/common/chirp/client","packages/common/chirp/metrics","packages/common/chirp/perf","packages/common/chirp/types","packages/common/chirp/worker","packages/common/chirp/worker-attributes","packages/common/claims","packages/common/clickhouse-inserter","packages/common/clickhouse-user-query","packages/common/config","packages/common/connection","packages/common/convert","packages/common/deno-embed","packages/common/env","packages/common/fdb-util","packages/common/formatted-error","packages/common/global-error","packages/common/health-checks","packages/common/kv-str","packages/common/logs","packages/common/metrics","packages/common/migrate","packages/common/nomad-util","packages/common/operation/core","packages/common/operation/macros","packages/common/pools","packages/common/redis-util","packages/common/runtime","packages/common/s3-util","packages/common/schemac","packages/common/server-cli","packages/common/service-discovery","packages/common/service-manager","packages/common/smithy-output/api-auth/rust","packages/common/smithy-output/api-auth/rust-server","packages/common/smithy-output/api-cf-verification/rust","packages/common/smithy-output/api-cf-verification/rust-server","packages/common/smithy-output/api-cloud/rust","packages/common/smithy-output/api-cloud/rust-server","packages/common/smithy-output/api-group/rust","packages/common/smithy-output/api-group/rust-server","packages/common/smithy-output/api-identity/rust","packages/common/smithy-output/api-identity/rust-server","packages/common/smithy-output/api-job/rust","packages/common/smithy-output/api-job/rust-server","packages/common/smithy-output/api-kv/rust","packages/common/smithy-output/api-kv/rust-server","packages/common/smithy-output/api-matchmaker/rust","packages/common/smithy-output/api-matchmaker/rust-server","packages/common/smithy-output/api-party/rust","packages/common/smithy-output/api-party/rust-server","packages/common/smithy-output/api-portal/rust","packages/common/smithy-output/api-portal/rust-server","packages/common/smithy-output/api-status/rust","packages/common/smithy-output/api-status/rust-server","packages/common/smithy-output/api-traefik-provider/rust","packages/common/smithy-output/api-traefik-provider/rust-server","packages/common/test","packages/common/test-images","packages/common/types-proto/build","packages/common/types-proto/core","packages/common/util/core","packages/common/util/macros","packages/common/util/search","packages/core/api/actor","packages/core/api/auth","packages/core/api/cf-verification","packages/core/api/cloud","packages/core/api/games","packages/core/api/group","packages/core/api/identity","packages/core/api/intercom","packages/core/api/job","packages/core/api/matchmaker","packages/core/api/monolith-edge","packages/core/api/monolith-public","packages/core/api/portal","packages/core/api/provision","packages/core/api/status","packages/core/api/traefik-provider","packages/core/api/ui","packages/core/infra/legacy/job-runner","packages/core/infra/schema-generator","packages/core/infra/server","packages/core/services/build","packages/core/services/build/ops/create","packages/core/services/build/ops/get","packages/core/services/build/ops/list-for-env","packages/core/services/build/ops/list-for-game","packages/core/services/build/standalone/default-create","packages/core/services/build/util","packages/core/services/captcha/ops/hcaptcha-config-get","packages/core/services/captcha/ops/hcaptcha-verify","packages/core/services/captcha/ops/request","packages/core/services/captcha/ops/turnstile-config-get","packages/core/services/captcha/ops/turnstile-verify","packages/core/services/captcha/ops/verify","packages/core/services/captcha/util","packages/core/services/cdn/ops/namespace-auth-user-remove","packages/core/services/cdn/ops/namespace-auth-user-update","packages/core/services/cdn/ops/namespace-create","packages/core/services/cdn/ops/namespace-domain-create","packages/core/services/cdn/ops/namespace-domain-remove","packages/core/services/cdn/ops/namespace-get","packages/core/services/cdn/ops/namespace-resolve-domain","packages/core/services/cdn/ops/ns-auth-type-set","packages/core/services/cdn/ops/ns-enable-domain-public-auth-set","packages/core/services/cdn/ops/site-create","packages/core/services/cdn/ops/site-get","packages/core/services/cdn/ops/site-list-for-game","packages/core/services/cdn/ops/version-get","packages/core/services/cdn/ops/version-prepare","packages/core/services/cdn/ops/version-publish","packages/core/services/cdn/util","packages/core/services/cdn/worker","packages/core/services/cf-custom-hostname/ops/get","packages/core/services/cf-custom-hostname/ops/list-for-namespace-id","packages/core/services/cf-custom-hostname/ops/resolve-hostname","packages/core/services/cf-custom-hostname/worker","packages/core/services/cloud/ops/device-link-create","packages/core/services/cloud/ops/game-config-create","packages/core/services/cloud/ops/game-config-get","packages/core/services/cloud/ops/game-token-create","packages/core/services/cloud/ops/namespace-create","packages/core/services/cloud/ops/namespace-get","packages/core/services/cloud/ops/namespace-token-development-create","packages/core/services/cloud/ops/namespace-token-public-create","packages/core/services/cloud/ops/version-get","packages/core/services/cloud/ops/version-publish","packages/core/services/cloud/standalone/default-create","packages/core/services/cloud/worker","packages/core/services/cluster","packages/core/services/cluster/standalone/datacenter-tls-renew","packages/core/services/cluster/standalone/default-update","packages/core/services/cluster/standalone/gc","packages/core/services/cluster/standalone/metrics-publish","packages/core/services/custom-user-avatar/ops/list-for-game","packages/core/services/custom-user-avatar/ops/upload-complete","packages/core/services/debug/ops/email-res","packages/core/services/dynamic-config","packages/core/services/email-verification/ops/complete","packages/core/services/email-verification/ops/create","packages/core/services/email/ops/send","packages/core/services/external/ops/request-validate","packages/core/services/external/worker","packages/core/services/faker/ops/build","packages/core/services/faker/ops/cdn-site","packages/core/services/faker/ops/game","packages/core/services/faker/ops/game-namespace","packages/core/services/faker/ops/game-version","packages/core/services/faker/ops/job-run","packages/core/services/faker/ops/job-template","packages/core/services/faker/ops/mm-lobby","packages/core/services/faker/ops/mm-lobby-row","packages/core/services/faker/ops/mm-player","packages/core/services/faker/ops/region","packages/core/services/faker/ops/team","packages/core/services/faker/ops/user","packages/core/services/game/ops/banner-upload-complete","packages/core/services/game/ops/create","packages/core/services/game/ops/get","packages/core/services/game/ops/list-all","packages/core/services/game/ops/list-for-team","packages/core/services/game/ops/logo-upload-complete","packages/core/services/game/ops/namespace-create","packages/core/services/game/ops/namespace-get","packages/core/services/game/ops/namespace-list","packages/core/services/game/ops/namespace-resolve-name-id","packages/core/services/game/ops/namespace-resolve-url","packages/core/services/game/ops/namespace-validate","packages/core/services/game/ops/namespace-version-history-list","packages/core/services/game/ops/namespace-version-set","packages/core/services/game/ops/recommend","packages/core/services/game/ops/resolve-name-id","packages/core/services/game/ops/resolve-namespace-id","packages/core/services/game/ops/token-development-validate","packages/core/services/game/ops/validate","packages/core/services/game/ops/version-create","packages/core/services/game/ops/version-get","packages/core/services/game/ops/version-list","packages/core/services/game/ops/version-validate","packages/core/services/guard","packages/core/services/ip/ops/info","packages/core/services/job-log/ops/read","packages/core/services/job-log/worker","packages/core/services/job-run","packages/core/services/job/standalone/gc","packages/core/services/job/util","packages/core/services/linode","packages/core/services/linode/standalone/gc","packages/core/services/load-test/standalone/api-cloud","packages/core/services/load-test/standalone/mm","packages/core/services/load-test/standalone/mm-sustain","packages/core/services/load-test/standalone/sqlx","packages/core/services/load-test/standalone/watch-requests","packages/core/services/mm-config/ops/game-get","packages/core/services/mm-config/ops/game-upsert","packages/core/services/mm-config/ops/lobby-group-get","packages/core/services/mm-config/ops/lobby-group-resolve-name-id","packages/core/services/mm-config/ops/lobby-group-resolve-version","packages/core/services/mm-config/ops/namespace-config-set","packages/core/services/mm-config/ops/namespace-config-validate","packages/core/services/mm-config/ops/namespace-create","packages/core/services/mm-config/ops/namespace-get","packages/core/services/mm-config/ops/version-get","packages/core/services/mm-config/ops/version-prepare","packages/core/services/mm-config/ops/version-publish","packages/core/services/mm/ops/dev-player-token-create","packages/core/services/mm/ops/lobby-find-fail","packages/core/services/mm/ops/lobby-find-lobby-query-list","packages/core/services/mm/ops/lobby-find-try-complete","packages/core/services/mm/ops/lobby-for-run-id","packages/core/services/mm/ops/lobby-get","packages/core/services/mm/ops/lobby-history","packages/core/services/mm/ops/lobby-idle-update","packages/core/services/mm/ops/lobby-list-for-namespace","packages/core/services/mm/ops/lobby-list-for-user-id","packages/core/services/mm/ops/lobby-player-count","packages/core/services/mm/ops/lobby-runtime-aggregate","packages/core/services/mm/ops/lobby-state-get","packages/core/services/mm/ops/player-count-for-namespace","packages/core/services/mm/ops/player-get","packages/core/services/mm/standalone/gc","packages/core/services/mm/util","packages/core/services/mm/worker","packages/core/services/monolith/standalone/worker","packages/core/services/monolith/standalone/workflow-worker","packages/core/services/nomad/standalone/monitor","packages/core/services/region/ops/get","packages/core/services/region/ops/list","packages/core/services/region/ops/list-for-game","packages/core/services/region/ops/recommend","packages/core/services/region/ops/resolve","packages/core/services/region/ops/resolve-for-game","packages/core/services/route","packages/core/services/server-spec","packages/core/services/team-invite/ops/get","packages/core/services/team-invite/worker","packages/core/services/team/ops/avatar-upload-complete","packages/core/services/team/ops/get","packages/core/services/team/ops/join-request-list","packages/core/services/team/ops/member-count","packages/core/services/team/ops/member-get","packages/core/services/team/ops/member-list","packages/core/services/team/ops/member-relationship-get","packages/core/services/team/ops/profile-validate","packages/core/services/team/ops/recommend","packages/core/services/team/ops/resolve-display-name","packages/core/services/team/ops/user-ban-get","packages/core/services/team/ops/user-ban-list","packages/core/services/team/ops/validate","packages/core/services/team/util","packages/core/services/team/worker","packages/core/services/telemetry/standalone/beacon","packages/core/services/tier","packages/core/services/token/ops/create","packages/core/services/token/ops/exchange","packages/core/services/token/ops/get","packages/core/services/token/ops/revoke","packages/core/services/upload/ops/complete","packages/core/services/upload/ops/file-list","packages/core/services/upload/ops/get","packages/core/services/upload/ops/list-for-user","packages/core/services/upload/ops/prepare","packages/core/services/upload/worker","packages/core/services/user","packages/core/services/user-identity/ops/create","packages/core/services/user-identity/ops/delete","packages/core/services/user-identity/ops/get","packages/core/services/user/ops/avatar-upload-complete","packages/core/services/user/ops/get","packages/core/services/user/ops/pending-delete-toggle","packages/core/services/user/ops/profile-validate","packages/core/services/user/ops/resolve-email","packages/core/services/user/ops/team-list","packages/core/services/user/ops/token-create","packages/core/services/user/standalone/delete-pending","packages/core/services/user/worker","packages/edge/api/actor","packages/edge/api/intercom","packages/edge/api/monolith-edge","packages/edge/api/monolith-public","packages/edge/api/traefik-provider","packages/edge/infra/client/actor-kv","packages/edge/infra/client/config","packages/edge/infra/client/container-runner","packages/edge/infra/client/echo","packages/edge/infra/client/isolate-v8-runner","packages/edge/infra/client/manager","packages/edge/infra/edge-server","packages/edge/infra/guard/core","packages/edge/infra/guard/server","packages/edge/services/monolith/standalone/workflow-worker","packages/edge/services/pegboard","packages/edge/services/pegboard/standalone/usage-metrics-publish","packages/edge/services/pegboard/standalone/ws","packages/toolchain/cli","packages/toolchain/js-utils-embed","packages/toolchain/toolchain","sdks/api/full/rust"] [workspace.package] version = "25.5.2" @@ -126,6 +126,9 @@ path = "packages/common/claims" [workspace.dependencies.clickhouse-inserter] path = "packages/common/clickhouse-inserter" +[workspace.dependencies.clickhouse-user-query] +path = "packages/common/clickhouse-user-query" + [workspace.dependencies.rivet-config] path = "packages/common/config" diff --git a/packages/common/clickhouse-user-query/Cargo.toml b/packages/common/clickhouse-user-query/Cargo.toml index 74ee737d94..a5fa9bcd2f 100644 --- a/packages/common/clickhouse-user-query/Cargo.toml +++ b/packages/common/clickhouse-user-query/Cargo.toml @@ -6,7 +6,7 @@ authors.workspace = true license.workspace = true [dependencies] -clickhouse = "0.12" +clickhouse = "0.11.2" thiserror = "1.0" serde = { version = "1.0", features = ["derive"] } diff --git a/packages/common/clickhouse-user-query/examples/case_sensitivity_demo.rs b/packages/common/clickhouse-user-query/examples/case_sensitivity_demo.rs new file mode 100644 index 0000000000..94d5a370fc --- /dev/null +++ b/packages/common/clickhouse-user-query/examples/case_sensitivity_demo.rs @@ -0,0 +1,100 @@ +use clickhouse_user_query::*; + +fn main() { + // Create a schema with string properties + let schema = Schema::new(vec![ + Property::new("username".to_string(), false, PropertyType::String).unwrap(), + Property::new("email".to_string(), false, PropertyType::String).unwrap(), + Property::new("tags".to_string(), true, PropertyType::String).unwrap(), + ]) + .unwrap(); + + println!("=== Case Sensitivity Demo ===\n"); + + // Example 1: Case-sensitive string equality + println!("1. Case-sensitive equality:"); + let query1 = QueryExpr::StringEqual { + property: "username".to_string(), + map_key: None, + value: "JohnDoe".to_string(), + case_sensitive: true, + }; + let builder1 = UserDefinedQueryBuilder::new(&schema, &query1).unwrap(); + println!(" Query: {}", builder1.where_expr()); + println!(" -> Will match: 'JohnDoe'"); + println!(" -> Won't match: 'johndoe', 'JOHNDOE'\n"); + + // Example 2: Case-insensitive string equality + println!("2. Case-insensitive equality:"); + let query2 = QueryExpr::StringEqual { + property: "username".to_string(), + map_key: None, + value: "JohnDoe".to_string(), + case_sensitive: false, + }; + let builder2 = UserDefinedQueryBuilder::new(&schema, &query2).unwrap(); + println!(" Query: {}", builder2.where_expr()); + println!(" -> Will match: 'JohnDoe', 'johndoe', 'JOHNDOE', 'jOhNdOe'\n"); + + // Example 3: Case-sensitive regex matching + println!("3. Case-sensitive regex:"); + let query3 = QueryExpr::StringMatchRegex { + property: "email".to_string(), + map_key: None, + pattern: "^[A-Z].*@example\\.com$".to_string(), + case_sensitive: true, + }; + let builder3 = UserDefinedQueryBuilder::new(&schema, &query3).unwrap(); + println!(" Query: {}", builder3.where_expr()); + println!(" Pattern: ^[A-Z].*@example\\.com$"); + println!(" -> Will match: 'Admin@example.com'"); + println!(" -> Won't match: 'admin@example.com'\n"); + + // Example 4: Case-insensitive regex matching + println!("4. Case-insensitive regex:"); + let query4 = QueryExpr::StringMatchRegex { + property: "email".to_string(), + map_key: None, + pattern: "admin|support".to_string(), + case_sensitive: false, + }; + let builder4 = UserDefinedQueryBuilder::new(&schema, &query4).unwrap(); + println!(" Query: {}", builder4.where_expr()); + println!(" Pattern: admin|support (with (?i) prefix)"); + println!(" -> Will match: 'admin@test.com', 'ADMIN@test.com', 'Support@test.com'\n"); + + // Example 5: Case-insensitive IN clause + println!("5. Case-insensitive IN clause:"); + let query5 = QueryExpr::StringIn { + property: "username".to_string(), + map_key: None, + values: vec!["Admin".to_string(), "Support".to_string()], + case_sensitive: false, + }; + let builder5 = UserDefinedQueryBuilder::new(&schema, &query5).unwrap(); + println!(" Query: {}", builder5.where_expr()); + println!(" -> Will match: 'admin', 'ADMIN', 'support', 'SUPPORT'\n"); + + // Example 6: Complex query with mixed case sensitivity + println!("6. Complex query with mixed sensitivity:"); + let query6 = QueryExpr::And { + exprs: vec![ + QueryExpr::StringEqual { + property: "username".to_string(), + map_key: None, + value: "Admin".to_string(), + case_sensitive: false, // Case-insensitive username + }, + QueryExpr::StringMatchRegex { + property: "tags".to_string(), + map_key: Some("role".to_string()), + pattern: "^(Admin|Manager)$".to_string(), + case_sensitive: true, // Case-sensitive role + }, + ], + }; + let builder6 = UserDefinedQueryBuilder::new(&schema, &query6).unwrap(); + println!(" Query: {}", builder6.where_expr()); + println!(" -> Username matches 'admin' (any case)"); + println!(" -> Role must be exactly 'Admin' or 'Manager' (case-sensitive)"); +} diff --git a/packages/common/clickhouse-user-query/examples/group_by_example.rs b/packages/common/clickhouse-user-query/examples/group_by_example.rs new file mode 100644 index 0000000000..84ed2dc84d --- /dev/null +++ b/packages/common/clickhouse-user-query/examples/group_by_example.rs @@ -0,0 +1,50 @@ +use clickhouse_user_query::*; + +fn main() { + // Define a schema with properties that can be grouped by + let schema = Schema::new(vec![ + Property::new("datacenter_id".to_string(), false, PropertyType::String) + .unwrap() + .with_group_by(true), + Property::new("tags".to_string(), true, PropertyType::String) + .unwrap() + .with_group_by(true), + Property::new("cpu_millicores".to_string(), false, PropertyType::Number) + .unwrap() + .with_group_by(false), + ]) + .unwrap(); + + // Example 1: Group by simple property + let query_expr = QueryExpr::NumberGreater { + property: "cpu_millicores".to_string(), + map_key: None, + value: 1000.0, + }; + + let key_path = KeyPath::new("datacenter_id".to_string()); + let builder = + UserDefinedQueryBuilder::new_with_group_by(&schema, &query_expr, Some(&key_path)).unwrap(); + + println!("Simple property GROUP BY:"); + println!("WHERE clause: {}", builder.where_expr()); + println!("GROUP BY clause: {:?}", builder.group_by_expr()); + println!(); + + // Example 2: Group by map property with key + let key_path = KeyPath::with_map_key("tags".to_string(), "region".to_string()); + let builder = + UserDefinedQueryBuilder::new_with_group_by(&schema, &query_expr, Some(&key_path)).unwrap(); + + println!("Map property with key GROUP BY:"); + println!("WHERE clause: {}", builder.where_expr()); + println!("GROUP BY clause: {:?}", builder.group_by_expr()); + println!(); + + // Example 3: No group by + let builder = UserDefinedQueryBuilder::new_with_group_by(&schema, &query_expr, None).unwrap(); + + println!("No GROUP BY:"); + println!("WHERE clause: {}", builder.where_expr()); + println!("GROUP BY clause: {:?}", builder.group_by_expr()); +} diff --git a/packages/common/clickhouse-user-query/src/builder.rs b/packages/common/clickhouse-user-query/src/builder.rs index f3608bddb0..c52b0bf9a7 100644 --- a/packages/common/clickhouse-user-query/src/builder.rs +++ b/packages/common/clickhouse-user-query/src/builder.rs @@ -3,12 +3,13 @@ use clickhouse::sql::Identifier; use serde::{Deserialize, Serialize}; use crate::error::{Result, UserQueryError}; -use crate::query::QueryExpr; +use crate::query::{KeyPath, QueryExpr}; use crate::schema::{PropertyType, Schema}; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct UserDefinedQueryBuilder { where_clause: String, + group_by_clause: Option, bind_values: Vec, } @@ -17,7 +18,6 @@ enum BindValue { Bool(bool), String(String), Number(f64), - ArrayString(Vec), } impl UserDefinedQueryBuilder { @@ -31,6 +31,33 @@ impl UserDefinedQueryBuilder { Ok(Self { where_clause, + group_by_clause: None, + bind_values: builder.bind_values, + }) + } + + pub fn new_with_group_by( + schema: &Schema, + expr: &QueryExpr, + group_by: Option<&KeyPath>, + ) -> Result { + let mut builder = QueryBuilder::new(schema); + let where_clause = builder.build_where_clause(expr)?; + + if where_clause.trim().is_empty() { + return Err(UserQueryError::EmptyQuery); + } + + let group_by_clause = if let Some(key_path) = group_by { + let validated_column = builder.validate_group_by_key_path(key_path)?; + Some(validated_column) + } else { + None + }; + + Ok(Self { + where_clause, + group_by_clause, bind_values: builder.bind_values, }) } @@ -41,7 +68,6 @@ impl UserDefinedQueryBuilder { BindValue::Bool(v) => query.bind(*v), BindValue::String(v) => query.bind(v), BindValue::Number(v) => query.bind(*v), - BindValue::ArrayString(v) => query.bind(v), }; } query @@ -50,6 +76,10 @@ impl UserDefinedQueryBuilder { pub fn where_expr(&self) -> &str { &self.where_clause } + + pub fn group_by_expr(&self) -> Option<&str> { + self.group_by_clause.as_deref() + } } struct QueryBuilder<'a> { @@ -85,143 +115,216 @@ impl<'a> QueryBuilder<'a> { } QueryExpr::BoolEqual { property, - subproperty, + map_key, value, } => { - self.validate_property_access(property, subproperty, &PropertyType::Bool)?; - let column = self.build_column_reference(property, subproperty)?; + self.validate_property_access(property, map_key, &PropertyType::Bool)?; + let column = self.build_column_reference(property, map_key)?; self.bind_values.push(BindValue::Bool(*value)); Ok(format!("{} = ?", column)) } QueryExpr::BoolNotEqual { property, - subproperty, + map_key, value, } => { - self.validate_property_access(property, subproperty, &PropertyType::Bool)?; - let column = self.build_column_reference(property, subproperty)?; + self.validate_property_access(property, map_key, &PropertyType::Bool)?; + let column = self.build_column_reference(property, map_key)?; self.bind_values.push(BindValue::Bool(*value)); Ok(format!("{} != ?", column)) } QueryExpr::StringEqual { property, - subproperty, + map_key, value, + case_sensitive, } => { - self.validate_property_access(property, subproperty, &PropertyType::String)?; - let column = self.build_column_reference(property, subproperty)?; + self.validate_property_access(property, map_key, &PropertyType::String)?; + let column = self.build_column_reference(property, map_key)?; self.bind_values.push(BindValue::String(value.clone())); - Ok(format!("{} = ?", column)) + if *case_sensitive { + Ok(format!("{} = ?", column)) + } else { + Ok(format!("LOWER({}) = LOWER(?)", column)) + } } QueryExpr::StringNotEqual { property, - subproperty, + map_key, value, + case_sensitive, } => { - self.validate_property_access(property, subproperty, &PropertyType::String)?; - let column = self.build_column_reference(property, subproperty)?; + self.validate_property_access(property, map_key, &PropertyType::String)?; + let column = self.build_column_reference(property, map_key)?; self.bind_values.push(BindValue::String(value.clone())); - Ok(format!("{} != ?", column)) + if *case_sensitive { + Ok(format!("{} != ?", column)) + } else { + Ok(format!("LOWER({}) != LOWER(?)", column)) + } } - QueryExpr::ArrayContains { + QueryExpr::StringIn { property, - subproperty, + map_key, values, + case_sensitive, } => { if values.is_empty() { - return Err(UserQueryError::EmptyArrayValues( - "ArrayContains".to_string(), - )); + return Err(UserQueryError::EmptyArrayValues("StringIn".to_string())); + } + self.validate_property_access(property, map_key, &PropertyType::String)?; + let column = self.build_column_reference(property, map_key)?; + let placeholders = vec!["?"; values.len()].join(", "); + for value in values { + self.bind_values.push(BindValue::String(value.clone())); + } + if *case_sensitive { + Ok(format!("{} IN ({})", column, placeholders)) + } else { + let lower_placeholders = vec!["LOWER(?)"; values.len()].join(", "); + Ok(format!("LOWER({}) IN ({})", column, lower_placeholders)) } - self.validate_property_access(property, subproperty, &PropertyType::ArrayString)?; - let column = self.build_column_reference(property, subproperty)?; - self.bind_values - .push(BindValue::ArrayString(values.clone())); - Ok(format!("hasAny({}, ?)", column)) } - QueryExpr::ArrayDoesNotContain { + QueryExpr::StringNotIn { property, - subproperty, + map_key, values, + case_sensitive, } => { if values.is_empty() { - return Err(UserQueryError::EmptyArrayValues( - "ArrayDoesNotContain".to_string(), - )); + return Err(UserQueryError::EmptyArrayValues("StringNotIn".to_string())); + } + self.validate_property_access(property, map_key, &PropertyType::String)?; + let column = self.build_column_reference(property, map_key)?; + let placeholders = vec!["?"; values.len()].join(", "); + for value in values { + self.bind_values.push(BindValue::String(value.clone())); + } + if *case_sensitive { + Ok(format!("{} NOT IN ({})", column, placeholders)) + } else { + let lower_placeholders = vec!["LOWER(?)"; values.len()].join(", "); + Ok(format!("LOWER({}) NOT IN ({})", column, lower_placeholders)) } - self.validate_property_access(property, subproperty, &PropertyType::ArrayString)?; - let column = self.build_column_reference(property, subproperty)?; - self.bind_values - .push(BindValue::ArrayString(values.clone())); - Ok(format!("NOT hasAny({}, ?)", column)) } QueryExpr::NumberEqual { property, - subproperty, + map_key, value, } => { - self.validate_property_access(property, subproperty, &PropertyType::Number)?; - let column = self.build_column_reference(property, subproperty)?; + self.validate_property_access(property, map_key, &PropertyType::Number)?; + let column = self.build_column_reference(property, map_key)?; self.bind_values.push(BindValue::Number(*value)); Ok(format!("{} = ?", column)) } QueryExpr::NumberNotEqual { property, - subproperty, + map_key, value, } => { - self.validate_property_access(property, subproperty, &PropertyType::Number)?; - let column = self.build_column_reference(property, subproperty)?; + self.validate_property_access(property, map_key, &PropertyType::Number)?; + let column = self.build_column_reference(property, map_key)?; self.bind_values.push(BindValue::Number(*value)); Ok(format!("{} != ?", column)) } + QueryExpr::NumberIn { + property, + map_key, + values, + } => { + if values.is_empty() { + return Err(UserQueryError::EmptyArrayValues("NumberIn".to_string())); + } + self.validate_property_access(property, map_key, &PropertyType::Number)?; + let column = self.build_column_reference(property, map_key)?; + let placeholders = vec!["?"; values.len()].join(", "); + for value in values { + self.bind_values.push(BindValue::Number(*value)); + } + Ok(format!("{} IN ({})", column, placeholders)) + } + QueryExpr::NumberNotIn { + property, + map_key, + values, + } => { + if values.is_empty() { + return Err(UserQueryError::EmptyArrayValues("NumberNotIn".to_string())); + } + self.validate_property_access(property, map_key, &PropertyType::Number)?; + let column = self.build_column_reference(property, map_key)?; + let placeholders = vec!["?"; values.len()].join(", "); + for value in values { + self.bind_values.push(BindValue::Number(*value)); + } + Ok(format!("{} NOT IN ({})", column, placeholders)) + } QueryExpr::NumberLess { property, - subproperty, + map_key, value, } => { - self.validate_property_access(property, subproperty, &PropertyType::Number)?; - let column = self.build_column_reference(property, subproperty)?; + self.validate_property_access(property, map_key, &PropertyType::Number)?; + let column = self.build_column_reference(property, map_key)?; self.bind_values.push(BindValue::Number(*value)); Ok(format!("{} < ?", column)) } QueryExpr::NumberLessOrEqual { property, - subproperty, + map_key, value, } => { - self.validate_property_access(property, subproperty, &PropertyType::Number)?; - let column = self.build_column_reference(property, subproperty)?; + self.validate_property_access(property, map_key, &PropertyType::Number)?; + let column = self.build_column_reference(property, map_key)?; self.bind_values.push(BindValue::Number(*value)); Ok(format!("{} <= ?", column)) } QueryExpr::NumberGreater { property, - subproperty, + map_key, value, } => { - self.validate_property_access(property, subproperty, &PropertyType::Number)?; - let column = self.build_column_reference(property, subproperty)?; + self.validate_property_access(property, map_key, &PropertyType::Number)?; + let column = self.build_column_reference(property, map_key)?; self.bind_values.push(BindValue::Number(*value)); Ok(format!("{} > ?", column)) } QueryExpr::NumberGreaterOrEqual { property, - subproperty, + map_key, value, } => { - self.validate_property_access(property, subproperty, &PropertyType::Number)?; - let column = self.build_column_reference(property, subproperty)?; + self.validate_property_access(property, map_key, &PropertyType::Number)?; + let column = self.build_column_reference(property, map_key)?; self.bind_values.push(BindValue::Number(*value)); Ok(format!("{} >= ?", column)) } + QueryExpr::StringMatchRegex { + property, + map_key, + pattern, + case_sensitive, + } => { + self.validate_property_access(property, map_key, &PropertyType::String)?; + let column = self.build_column_reference(property, map_key)?; + if *case_sensitive { + self.bind_values.push(BindValue::String(pattern.clone())); + Ok(format!("match({}, ?)", column)) + } else { + // For case-insensitive regex, prepend (?i) to the pattern + let case_insensitive_pattern = format!("(?i){}", pattern); + self.bind_values + .push(BindValue::String(case_insensitive_pattern)); + Ok(format!("match({}, ?)", column)) + } + } } } fn validate_property_access( &self, property: &str, - subproperty: &Option, + map_key: &Option, expected_type: &PropertyType, ) -> Result<()> { let prop = self @@ -229,10 +332,8 @@ impl<'a> QueryBuilder<'a> { .get_property(property) .ok_or_else(|| UserQueryError::PropertyNotFound(property.to_string()))?; - if subproperty.is_some() && !prop.supports_subproperties { - return Err(UserQueryError::SubpropertiesNotSupported( - property.to_string(), - )); + if map_key.is_some() && !prop.is_map { + return Err(UserQueryError::MapKeysNotSupported(property.to_string())); } if &prop.ty != expected_type { @@ -246,51 +347,78 @@ impl<'a> QueryBuilder<'a> { Ok(()) } - fn build_column_reference( - &self, - property: &str, - subproperty: &Option, - ) -> Result { + fn build_column_reference(&self, property: &str, map_key: &Option) -> Result { let property_ident = Identifier(property); - match subproperty { - Some(subprop) => { - // Validate subproperty name for safe charset - Self::validate_subproperty_name(subprop)?; + match map_key { + Some(key) => { + // Validate map_key name for safe charset + Self::validate_map_key_name(key)?; // For ClickHouse Map access, use string literal syntax Ok(format!( "{}[{}]", property_ident.0, - format!("'{}'", subprop.replace("'", "\\'")) + format!("'{}'", key.replace("'", "\\'")) )) } None => Ok(property_ident.0.to_string()), } } - /// Validates that a subproperty name only contains safe characters for database queries - fn validate_subproperty_name(name: &str) -> Result<()> { + /// Validates that a map_key name only contains safe characters for database queries + fn validate_map_key_name(name: &str) -> Result<()> { // Check if empty if name.is_empty() { - return Err(UserQueryError::InvalidSubpropertyName(name.to_string())); + return Err(UserQueryError::InvalidMapKeyName(name.to_string())); } // Check length (reasonable limit for database identifiers) if name.len() > 64 { - return Err(UserQueryError::InvalidSubpropertyName(name.to_string())); + return Err(UserQueryError::InvalidMapKeyName(name.to_string())); } // Only allow alphanumeric characters and underscores (SQL-safe) if !name.chars().all(|c| c.is_alphanumeric() || c == '_') { - return Err(UserQueryError::InvalidSubpropertyName(name.to_string())); + return Err(UserQueryError::InvalidMapKeyName(name.to_string())); } // Must not start with a number (SQL identifier rule) if name.chars().next().unwrap().is_numeric() { - return Err(UserQueryError::InvalidSubpropertyName(name.to_string())); + return Err(UserQueryError::InvalidMapKeyName(name.to_string())); } Ok(()) } + + fn validate_group_by_key_path(&self, key_path: &KeyPath) -> Result { + let prop = self + .schema + .get_property(&key_path.property) + .ok_or_else(|| UserQueryError::PropertyNotFound(key_path.property.to_string()))?; + + // Check if property can be grouped by + if !prop.can_group_by { + return Err(UserQueryError::PropertyCannotBeGroupedBy( + key_path.property.to_string(), + )); + } + + // If there's a map key, the property must be a map + if key_path.map_key.is_some() && !prop.is_map { + return Err(UserQueryError::MapKeysNotSupported( + key_path.property.to_string(), + )); + } + + // If the property is a map but no key is provided, it cannot be used in GROUP BY + if prop.is_map && key_path.map_key.is_none() { + return Err(UserQueryError::MapPropertyCannotBeGroupedBy( + key_path.property.to_string(), + )); + } + + // Build the column reference for GROUP BY + self.build_column_reference(&key_path.property, &key_path.map_key) + } } diff --git a/packages/common/clickhouse-user-query/src/error.rs b/packages/common/clickhouse-user-query/src/error.rs index b582616169..3e3cec1ba9 100644 --- a/packages/common/clickhouse-user-query/src/error.rs +++ b/packages/common/clickhouse-user-query/src/error.rs @@ -5,8 +5,8 @@ pub enum UserQueryError { #[error("Property '{0}' not found in schema")] PropertyNotFound(String), - #[error("Property '{0}' does not support subproperties")] - SubpropertiesNotSupported(String), + #[error("Property '{0}' does not support map keys")] + MapKeysNotSupported(String), #[error("Property '{0}' type mismatch: expected {1}, got {2}")] PropertyTypeMismatch(String, String, String), @@ -14,14 +14,20 @@ pub enum UserQueryError { #[error("Invalid property name '{0}': must contain only alphanumeric characters and underscores, and cannot start with a number")] InvalidPropertyName(String), - #[error("Invalid subproperty name '{0}': must contain only alphanumeric characters and underscores, and cannot start with a number")] - InvalidSubpropertyName(String), + #[error("Invalid map key name '{0}': must contain only alphanumeric characters and underscores, and cannot start with a number")] + InvalidMapKeyName(String), #[error("Empty query expression")] EmptyQuery, #[error("Empty array values in {0} operation")] EmptyArrayValues(String), + + #[error("Property '{0}' cannot be used in GROUP BY clause")] + PropertyCannotBeGroupedBy(String), + + #[error("Map property '{0}' cannot be used in GROUP BY clause")] + MapPropertyCannotBeGroupedBy(String), } pub type Result = std::result::Result; diff --git a/packages/common/clickhouse-user-query/src/lib.rs b/packages/common/clickhouse-user-query/src/lib.rs index 09c602a4ae..36d8b7f90a 100644 --- a/packages/common/clickhouse-user-query/src/lib.rs +++ b/packages/common/clickhouse-user-query/src/lib.rs @@ -14,7 +14,7 @@ //! Property::new("user_id".to_string(), false, PropertyType::String).unwrap(), //! Property::new("metadata".to_string(), true, PropertyType::String).unwrap(), //! Property::new("active".to_string(), false, PropertyType::Bool).unwrap(), -//! Property::new("tags".to_string(), false, PropertyType::ArrayString).unwrap(), +//! Property::new("score".to_string(), false, PropertyType::Number).unwrap(), //! ]).unwrap(); //! //! // Build a complex query expression @@ -22,18 +22,19 @@ //! exprs: vec![ //! QueryExpr::StringEqual { //! property: "user_id".to_string(), -//! subproperty: None, +//! map_key: None, //! value: "12345".to_string(), +//! case_sensitive: true, //! }, //! QueryExpr::BoolEqual { //! property: "active".to_string(), -//! subproperty: None, +//! map_key: None, //! value: true, //! }, -//! QueryExpr::ArrayContains { -//! property: "tags".to_string(), -//! subproperty: None, -//! values: vec!["premium".to_string(), "verified".to_string()], +//! QueryExpr::NumberGreater { +//! property: "score".to_string(), +//! map_key: None, +//! value: 90.0, //! }, //! ], //! }; @@ -51,7 +52,7 @@ // Re-export all public types for convenience pub use builder::UserDefinedQueryBuilder; pub use error::{Result, UserQueryError}; -pub use query::QueryExpr; +pub use query::{KeyPath, QueryExpr}; pub use schema::{Property, PropertyType, Schema}; pub mod builder; diff --git a/packages/common/clickhouse-user-query/src/query.rs b/packages/common/clickhouse-user-query/src/query.rs index 9fb5489e28..54efb0adc6 100644 --- a/packages/common/clickhouse-user-query/src/query.rs +++ b/packages/common/clickhouse-user-query/src/query.rs @@ -1,5 +1,28 @@ use serde::{Deserialize, Serialize}; +/// Represents a path to a property, optionally including a map key +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Hash)] +pub struct KeyPath { + pub property: String, + pub map_key: Option, +} + +impl KeyPath { + pub fn new(property: String) -> Self { + Self { + property, + map_key: None, + } + } + + pub fn with_map_key(property: String, map_key: String) -> Self { + Self { + property, + map_key: Some(map_key), + } + } +} + #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum QueryExpr { @@ -11,62 +34,82 @@ pub enum QueryExpr { }, BoolEqual { property: String, - subproperty: Option, + map_key: Option, value: bool, }, BoolNotEqual { property: String, - subproperty: Option, + map_key: Option, value: bool, }, StringEqual { property: String, - subproperty: Option, + map_key: Option, value: String, + case_sensitive: bool, }, StringNotEqual { property: String, - subproperty: Option, + map_key: Option, value: String, + case_sensitive: bool, }, - ArrayContains { + StringIn { property: String, - subproperty: Option, + map_key: Option, values: Vec, + case_sensitive: bool, }, - ArrayDoesNotContain { + StringNotIn { property: String, - subproperty: Option, + map_key: Option, values: Vec, + case_sensitive: bool, + }, + StringMatchRegex { + property: String, + map_key: Option, + pattern: String, + case_sensitive: bool, }, NumberEqual { property: String, - subproperty: Option, + map_key: Option, value: f64, }, NumberNotEqual { property: String, - subproperty: Option, + map_key: Option, value: f64, }, + NumberIn { + property: String, + map_key: Option, + values: Vec, + }, + NumberNotIn { + property: String, + map_key: Option, + values: Vec, + }, NumberLess { property: String, - subproperty: Option, + map_key: Option, value: f64, }, NumberLessOrEqual { property: String, - subproperty: Option, + map_key: Option, value: f64, }, NumberGreater { property: String, - subproperty: Option, + map_key: Option, value: f64, }, NumberGreaterOrEqual { property: String, - subproperty: Option, + map_key: Option, value: f64, }, } diff --git a/packages/common/clickhouse-user-query/src/schema.rs b/packages/common/clickhouse-user-query/src/schema.rs index 8938402710..98652c78d8 100644 --- a/packages/common/clickhouse-user-query/src/schema.rs +++ b/packages/common/clickhouse-user-query/src/schema.rs @@ -20,19 +20,28 @@ impl Schema { #[derive(Debug, Clone, Serialize, Deserialize)] pub struct Property { pub name: String, - pub supports_subproperties: bool, + pub is_map: bool, + /// The type of values in the property. For map properties, this is the type of the map values. pub ty: PropertyType, + /// Whether this property can be used in GROUP BY clauses + pub can_group_by: bool, } impl Property { - pub fn new(name: String, supports_subproperties: bool, ty: PropertyType) -> Result { + pub fn new(name: String, is_map: bool, ty: PropertyType) -> Result { validate_property_name(&name)?; Ok(Self { name, - supports_subproperties, + is_map, ty, + can_group_by: false, }) } + + pub fn with_group_by(mut self, can_group_by: bool) -> Self { + self.can_group_by = can_group_by; + self + } } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] @@ -40,7 +49,6 @@ pub enum PropertyType { Bool, String, Number, - ArrayString, } impl PropertyType { @@ -49,7 +57,6 @@ impl PropertyType { PropertyType::Bool => "bool", PropertyType::String => "string", PropertyType::Number => "number", - PropertyType::ArrayString => "array[string]", } } } diff --git a/packages/common/clickhouse-user-query/tests/builder_tests.rs b/packages/common/clickhouse-user-query/tests/builder_tests.rs index fad3c2f40a..ffa6ce4200 100644 --- a/packages/common/clickhouse-user-query/tests/builder_tests.rs +++ b/packages/common/clickhouse-user-query/tests/builder_tests.rs @@ -2,11 +2,18 @@ use clickhouse_user_query::*; fn create_test_schema() -> Schema { Schema::new(vec![ - Property::new("prop_a".to_string(), false, PropertyType::String).unwrap(), - Property::new("prop_b".to_string(), true, PropertyType::String).unwrap(), - Property::new("bool_prop".to_string(), false, PropertyType::Bool).unwrap(), - Property::new("number_prop".to_string(), false, PropertyType::Number).unwrap(), - Property::new("array_prop".to_string(), false, PropertyType::ArrayString).unwrap(), + Property::new("prop_a".to_string(), false, PropertyType::String) + .unwrap() + .with_group_by(false), + Property::new("prop_b".to_string(), true, PropertyType::String) + .unwrap() + .with_group_by(false), + Property::new("bool_prop".to_string(), false, PropertyType::Bool) + .unwrap() + .with_group_by(false), + Property::new("number_prop".to_string(), false, PropertyType::Number) + .unwrap() + .with_group_by(false), ]) .unwrap() } @@ -16,8 +23,9 @@ fn test_simple_string_equal() { let schema = create_test_schema(); let query = QueryExpr::StringEqual { property: "prop_a".to_string(), - subproperty: None, + map_key: None, value: "foo".to_string(), + case_sensitive: true, }; let builder = UserDefinedQueryBuilder::new(&schema, &query).unwrap(); @@ -25,12 +33,13 @@ fn test_simple_string_equal() { } #[test] -fn test_subproperty_access() { +fn test_map_key_access() { let schema = create_test_schema(); let query = QueryExpr::StringEqual { property: "prop_b".to_string(), - subproperty: Some("sub".to_string()), + map_key: Some("sub".to_string()), value: "bar".to_string(), + case_sensitive: true, }; let builder = UserDefinedQueryBuilder::new(&schema, &query).unwrap(); @@ -44,12 +53,13 @@ fn test_and_query() { exprs: vec![ QueryExpr::StringEqual { property: "prop_a".to_string(), - subproperty: None, + map_key: None, value: "foo".to_string(), + case_sensitive: true, }, QueryExpr::BoolEqual { property: "bool_prop".to_string(), - subproperty: None, + map_key: None, value: true, }, ], @@ -59,26 +69,14 @@ fn test_and_query() { assert_eq!(builder.where_expr(), "(prop_a = ? AND bool_prop = ?)"); } -#[test] -fn test_array_contains() { - let schema = create_test_schema(); - let query = QueryExpr::ArrayContains { - property: "array_prop".to_string(), - subproperty: None, - values: vec!["val1".to_string(), "val2".to_string()], - }; - - let builder = UserDefinedQueryBuilder::new(&schema, &query).unwrap(); - assert_eq!(builder.where_expr(), "hasAny(array_prop, ?)"); -} - #[test] fn test_property_not_found() { let schema = create_test_schema(); let query = QueryExpr::StringEqual { property: "nonexistent".to_string(), - subproperty: None, + map_key: None, value: "foo".to_string(), + case_sensitive: true, }; let result = UserDefinedQueryBuilder::new(&schema, &query); @@ -90,7 +88,7 @@ fn test_type_mismatch() { let schema = create_test_schema(); let query = QueryExpr::BoolEqual { property: "prop_a".to_string(), // This is a string property - subproperty: None, + map_key: None, value: true, }; @@ -102,18 +100,19 @@ fn test_type_mismatch() { } #[test] -fn test_subproperties_not_supported() { +fn test_map_keys_not_supported() { let schema = create_test_schema(); let query = QueryExpr::StringEqual { - property: "prop_a".to_string(), // This doesn't support subproperties - subproperty: Some("sub".to_string()), + property: "prop_a".to_string(), // This doesn't support map keys + map_key: Some("sub".to_string()), value: "foo".to_string(), + case_sensitive: true, }; let result = UserDefinedQueryBuilder::new(&schema, &query); assert!(matches!( result, - Err(UserQueryError::SubpropertiesNotSupported(_)) + Err(UserQueryError::MapKeysNotSupported(_)) )); } @@ -122,8 +121,9 @@ fn test_invalid_property_name() { let schema = create_test_schema(); let query = QueryExpr::StringEqual { property: "prop-with-dashes".to_string(), - subproperty: None, + map_key: None, value: "foo".to_string(), + case_sensitive: true, }; // Invalid property names are now caught as "not found" since schema validation @@ -136,15 +136,16 @@ fn test_invalid_property_name() { } #[test] -fn test_subproperty_with_safe_chars() { +fn test_map_key_with_safe_chars() { let schema = create_test_schema(); let query = QueryExpr::StringEqual { - property: "prop_b".to_string(), // This supports subproperties - subproperty: Some("sub_with_underscores123".to_string()), + property: "prop_b".to_string(), // This supports map keys + map_key: Some("sub_with_underscores123".to_string()), value: "foo".to_string(), + case_sensitive: true, }; - // Subproperties with safe characters (alphanumeric + underscore) should work + // Map keys with safe characters (alphanumeric + underscore) should work let builder_result = UserDefinedQueryBuilder::new(&schema, &query); assert!(builder_result.is_ok()); @@ -155,25 +156,12 @@ fn test_subproperty_with_safe_chars() { ); } -#[test] -fn test_empty_array_values() { - let schema = create_test_schema(); - let query = QueryExpr::ArrayContains { - property: "array_prop".to_string(), - subproperty: None, - values: vec![], - }; - - let result = UserDefinedQueryBuilder::new(&schema, &query); - assert!(matches!(result, Err(UserQueryError::EmptyArrayValues(_)))); -} - #[test] fn test_number_greater() { let schema = create_test_schema(); let query = QueryExpr::NumberGreater { property: "number_prop".to_string(), - subproperty: None, + map_key: None, value: 42.5, }; @@ -186,7 +174,7 @@ fn test_number_less_or_equal() { let schema = create_test_schema(); let query = QueryExpr::NumberLessOrEqual { property: "number_prop".to_string(), - subproperty: None, + map_key: None, value: 100.0, }; @@ -195,18 +183,19 @@ fn test_number_less_or_equal() { } #[test] -fn test_number_with_subproperty() { +fn test_number_with_map_key() { let schema = Schema::new(vec![Property::new( "metrics".to_string(), true, PropertyType::Number, ) - .unwrap()]) + .unwrap() + .with_group_by(false)]) .unwrap(); let query = QueryExpr::NumberEqual { property: "metrics".to_string(), - subproperty: Some("score".to_string()), + map_key: Some("score".to_string()), value: 95.5, }; @@ -219,7 +208,7 @@ fn test_number_type_mismatch() { let schema = create_test_schema(); let query = QueryExpr::NumberGreater { property: "prop_a".to_string(), // This is a String type, not Number - subproperty: None, + map_key: None, value: 42.0, }; @@ -231,10 +220,10 @@ fn test_number_type_mismatch() { } #[test] -fn test_subproperty_validation_valid_names() { +fn test_map_key_validation_valid_names() { let schema = create_test_schema(); - // Valid subproperty names + // Valid map key names let valid_names = vec![ "valid_name", "valid123", @@ -248,24 +237,25 @@ fn test_subproperty_validation_valid_names() { for name in valid_names { let query = QueryExpr::StringEqual { property: "prop_b".to_string(), - subproperty: Some(name.to_string()), + map_key: Some(name.to_string()), value: "test".to_string(), + case_sensitive: true, }; let result = UserDefinedQueryBuilder::new(&schema, &query); assert!( result.is_ok(), - "Valid subproperty name '{}' should be accepted", + "Valid map key name '{}' should be accepted", name ); } } #[test] -fn test_subproperty_validation_invalid_names() { +fn test_map_key_validation_invalid_names() { let schema = create_test_schema(); - // Invalid subproperty names + // Invalid map key names let long_name = "a".repeat(65); let invalid_names = vec![ "", // Empty @@ -304,26 +294,27 @@ fn test_subproperty_validation_invalid_names() { for name in invalid_names { let query = QueryExpr::StringEqual { property: "prop_b".to_string(), - subproperty: Some(name.to_string()), + map_key: Some(name.to_string()), value: "test".to_string(), + case_sensitive: true, }; let result = UserDefinedQueryBuilder::new(&schema, &query); assert!( result.is_err(), - "Invalid subproperty name '{}' should be rejected", + "Invalid map key name '{}' should be rejected", name ); assert!( - matches!(result, Err(UserQueryError::InvalidSubpropertyName(_))), - "Invalid subproperty name '{}' should return InvalidSubpropertyName error", + matches!(result, Err(UserQueryError::InvalidMapKeyName(_))), + "Invalid map key name '{}' should return InvalidMapKeyName error", name ); } } #[test] -fn test_subproperty_validation_sql_injection_attempts() { +fn test_map_key_validation_sql_injection_attempts() { let schema = create_test_schema(); // SQL injection attempts @@ -345,8 +336,9 @@ fn test_subproperty_validation_sql_injection_attempts() { for attempt in injection_attempts { let query = QueryExpr::StringEqual { property: "prop_b".to_string(), - subproperty: Some(attempt.to_string()), + map_key: Some(attempt.to_string()), value: "test".to_string(), + case_sensitive: true, }; let result = UserDefinedQueryBuilder::new(&schema, &query); @@ -356,9 +348,260 @@ fn test_subproperty_validation_sql_injection_attempts() { attempt ); assert!( - matches!(result, Err(UserQueryError::InvalidSubpropertyName(_))), - "SQL injection attempt '{}' should return InvalidSubpropertyName error", + matches!(result, Err(UserQueryError::InvalidMapKeyName(_))), + "SQL injection attempt '{}' should return InvalidMapKeyName error", attempt ); } } + +#[test] +fn test_string_in() { + let schema = create_test_schema(); + let query = QueryExpr::StringIn { + property: "prop_a".to_string(), + map_key: None, + values: vec!["foo".to_string(), "bar".to_string()], + case_sensitive: true, + }; + + let builder = UserDefinedQueryBuilder::new(&schema, &query).unwrap(); + assert_eq!(builder.where_expr(), "prop_a IN (?, ?)"); +} + +#[test] +fn test_string_not_in() { + let schema = create_test_schema(); + let query = QueryExpr::StringNotIn { + property: "prop_a".to_string(), + map_key: None, + values: vec!["foo".to_string(), "bar".to_string()], + case_sensitive: true, + }; + + let builder = UserDefinedQueryBuilder::new(&schema, &query).unwrap(); + assert_eq!(builder.where_expr(), "prop_a NOT IN (?, ?)"); +} + +#[test] +fn test_number_in() { + let schema = create_test_schema(); + let query = QueryExpr::NumberIn { + property: "number_prop".to_string(), + map_key: None, + values: vec![42.0, 84.0, 168.0], + }; + + let builder = UserDefinedQueryBuilder::new(&schema, &query).unwrap(); + assert_eq!(builder.where_expr(), "number_prop IN (?, ?, ?)"); +} + +#[test] +fn test_number_not_in() { + let schema = create_test_schema(); + let query = QueryExpr::NumberNotIn { + property: "number_prop".to_string(), + map_key: None, + values: vec![1.0, 2.0], + }; + + let builder = UserDefinedQueryBuilder::new(&schema, &query).unwrap(); + assert_eq!(builder.where_expr(), "number_prop NOT IN (?, ?)"); +} + +#[test] +fn test_string_in_with_map_key() { + let schema = Schema::new(vec![Property::new( + "metadata".to_string(), + true, + PropertyType::String, + ) + .unwrap() + .with_group_by(false)]) + .unwrap(); + + let query = QueryExpr::StringIn { + property: "metadata".to_string(), + map_key: Some("category".to_string()), + values: vec!["premium".to_string(), "basic".to_string()], + case_sensitive: true, + }; + + let builder = UserDefinedQueryBuilder::new(&schema, &query).unwrap(); + assert_eq!(builder.where_expr(), "metadata['category'] IN (?, ?)"); +} + +#[test] +fn test_empty_in_values() { + let schema = create_test_schema(); + let query = QueryExpr::StringIn { + property: "prop_a".to_string(), + map_key: None, + values: vec![], + case_sensitive: true, + }; + + let result = UserDefinedQueryBuilder::new(&schema, &query); + assert!(matches!(result, Err(UserQueryError::EmptyArrayValues(_)))); +} + +#[test] +fn test_group_by_simple() { + let schema = Schema::new(vec![ + Property::new("user_id".to_string(), false, PropertyType::String) + .unwrap() + .with_group_by(true), + Property::new("status".to_string(), false, PropertyType::String) + .unwrap() + .with_group_by(true), + Property::new("score".to_string(), false, PropertyType::Number) + .unwrap() + .with_group_by(false), + ]) + .unwrap(); + + let query = QueryExpr::StringEqual { + property: "status".to_string(), + map_key: None, + value: "active".to_string(), + case_sensitive: true, + }; + + let builder = + UserDefinedQueryBuilder::new_with_group_by(&schema, &query, &["user_id".to_string()]) + .unwrap(); + assert_eq!(builder.where_expr(), "status = ?"); + assert_eq!(builder.group_by_expr(), Some("user_id")); +} + +#[test] +fn test_group_by_multiple_columns() { + let schema = Schema::new(vec![ + Property::new("user_id".to_string(), false, PropertyType::String) + .unwrap() + .with_group_by(true), + Property::new("status".to_string(), false, PropertyType::String) + .unwrap() + .with_group_by(true), + Property::new("region".to_string(), false, PropertyType::String) + .unwrap() + .with_group_by(true), + ]) + .unwrap(); + + let query = QueryExpr::StringEqual { + property: "status".to_string(), + map_key: None, + value: "active".to_string(), + case_sensitive: true, + }; + + let builder = UserDefinedQueryBuilder::new_with_group_by( + &schema, + &query, + &["user_id".to_string(), "region".to_string()], + ) + .unwrap(); + assert_eq!(builder.group_by_expr(), Some("user_id, region")); +} + +#[test] +fn test_group_by_property_not_groupable() { + let schema = Schema::new(vec![ + Property::new("user_id".to_string(), false, PropertyType::String) + .unwrap() + .with_group_by(true), + Property::new("score".to_string(), false, PropertyType::Number) + .unwrap() + .with_group_by(false), + ]) + .unwrap(); + + let query = QueryExpr::NumberGreater { + property: "score".to_string(), + map_key: None, + value: 50.0, + }; + + let result = + UserDefinedQueryBuilder::new_with_group_by(&schema, &query, &["score".to_string()]); + assert!(matches!( + result, + Err(UserQueryError::PropertyCannotBeGroupedBy(_)) + )); +} + +#[test] +fn test_group_by_map_property_rejected() { + let schema = Schema::new(vec![ + Property::new("user_id".to_string(), false, PropertyType::String) + .unwrap() + .with_group_by(true), + Property::new("metadata".to_string(), true, PropertyType::String) + .unwrap() + .with_group_by(true), + ]) + .unwrap(); + + let query = QueryExpr::StringEqual { + property: "user_id".to_string(), + map_key: None, + value: "user123".to_string(), + case_sensitive: true, + }; + + let result = + UserDefinedQueryBuilder::new_with_group_by(&schema, &query, &["metadata".to_string()]); + assert!(matches!( + result, + Err(UserQueryError::MapPropertyCannotBeGroupedBy(_)) + )); +} + +#[test] +fn test_group_by_property_not_found() { + let schema = Schema::new(vec![Property::new( + "user_id".to_string(), + false, + PropertyType::String, + ) + .unwrap() + .with_group_by(true)]) + .unwrap(); + + let query = QueryExpr::StringEqual { + property: "user_id".to_string(), + map_key: None, + value: "user123".to_string(), + case_sensitive: true, + }; + + let result = UserDefinedQueryBuilder::new_with_group_by( + &schema, + &query, + &["unknown_column".to_string()], + ); + assert!(matches!(result, Err(UserQueryError::PropertyNotFound(_)))); +} + +#[test] +fn test_group_by_empty_allowed() { + let schema = Schema::new(vec![Property::new( + "user_id".to_string(), + false, + PropertyType::String, + ) + .unwrap() + .with_group_by(true)]) + .unwrap(); + + let query = QueryExpr::StringEqual { + property: "user_id".to_string(), + map_key: None, + value: "user123".to_string(), + case_sensitive: true, + }; + + let builder = UserDefinedQueryBuilder::new_with_group_by(&schema, &query, &[]).unwrap(); + assert_eq!(builder.group_by_expr(), None); +} diff --git a/packages/common/clickhouse-user-query/tests/case_sensitivity_tests.rs b/packages/common/clickhouse-user-query/tests/case_sensitivity_tests.rs new file mode 100644 index 0000000000..f3647de7fd --- /dev/null +++ b/packages/common/clickhouse-user-query/tests/case_sensitivity_tests.rs @@ -0,0 +1,252 @@ +use clickhouse_user_query::*; + +fn create_test_schema() -> Schema { + Schema::new(vec![ + Property::new("name".to_string(), false, PropertyType::String) + .unwrap() + .with_group_by(false), + Property::new("tags".to_string(), true, PropertyType::String) + .unwrap() + .with_group_by(false), + Property::new("description".to_string(), false, PropertyType::String) + .unwrap() + .with_group_by(false), + ]) + .unwrap() +} + +#[test] +fn test_string_equal_case_sensitive() { + let schema = create_test_schema(); + let query = QueryExpr::StringEqual { + property: "name".to_string(), + map_key: None, + value: "Test".to_string(), + case_sensitive: true, + }; + + let builder = UserDefinedQueryBuilder::new(&schema, &query).unwrap(); + assert_eq!(builder.where_expr(), "name = ?"); +} + +#[test] +fn test_string_equal_case_insensitive() { + let schema = create_test_schema(); + let query = QueryExpr::StringEqual { + property: "name".to_string(), + map_key: None, + value: "Test".to_string(), + case_sensitive: false, + }; + + let builder = UserDefinedQueryBuilder::new(&schema, &query).unwrap(); + assert_eq!(builder.where_expr(), "LOWER(name) = LOWER(?)"); +} + +#[test] +fn test_string_not_equal_case_sensitive() { + let schema = create_test_schema(); + let query = QueryExpr::StringNotEqual { + property: "name".to_string(), + map_key: None, + value: "Test".to_string(), + case_sensitive: true, + }; + + let builder = UserDefinedQueryBuilder::new(&schema, &query).unwrap(); + assert_eq!(builder.where_expr(), "name != ?"); +} + +#[test] +fn test_string_not_equal_case_insensitive() { + let schema = create_test_schema(); + let query = QueryExpr::StringNotEqual { + property: "name".to_string(), + map_key: None, + value: "Test".to_string(), + case_sensitive: false, + }; + + let builder = UserDefinedQueryBuilder::new(&schema, &query).unwrap(); + assert_eq!(builder.where_expr(), "LOWER(name) != LOWER(?)"); +} + +#[test] +fn test_string_in_case_sensitive() { + let schema = create_test_schema(); + let query = QueryExpr::StringIn { + property: "name".to_string(), + map_key: None, + values: vec!["Foo".to_string(), "Bar".to_string()], + case_sensitive: true, + }; + + let builder = UserDefinedQueryBuilder::new(&schema, &query).unwrap(); + assert_eq!(builder.where_expr(), "name IN (?, ?)"); +} + +#[test] +fn test_string_in_case_insensitive() { + let schema = create_test_schema(); + let query = QueryExpr::StringIn { + property: "name".to_string(), + map_key: None, + values: vec!["Foo".to_string(), "Bar".to_string()], + case_sensitive: false, + }; + + let builder = UserDefinedQueryBuilder::new(&schema, &query).unwrap(); + assert_eq!(builder.where_expr(), "LOWER(name) IN (LOWER(?), LOWER(?))"); +} + +#[test] +fn test_string_not_in_case_sensitive() { + let schema = create_test_schema(); + let query = QueryExpr::StringNotIn { + property: "name".to_string(), + map_key: None, + values: vec!["Foo".to_string(), "Bar".to_string()], + case_sensitive: true, + }; + + let builder = UserDefinedQueryBuilder::new(&schema, &query).unwrap(); + assert_eq!(builder.where_expr(), "name NOT IN (?, ?)"); +} + +#[test] +fn test_string_not_in_case_insensitive() { + let schema = create_test_schema(); + let query = QueryExpr::StringNotIn { + property: "name".to_string(), + map_key: None, + values: vec!["Foo".to_string(), "Bar".to_string()], + case_sensitive: false, + }; + + let builder = UserDefinedQueryBuilder::new(&schema, &query).unwrap(); + assert_eq!( + builder.where_expr(), + "LOWER(name) NOT IN (LOWER(?), LOWER(?))" + ); +} + +#[test] +fn test_string_match_regex_case_sensitive() { + let schema = create_test_schema(); + let query = QueryExpr::StringMatchRegex { + property: "description".to_string(), + map_key: None, + pattern: "^Test.*end$".to_string(), + case_sensitive: true, + }; + + let builder = UserDefinedQueryBuilder::new(&schema, &query).unwrap(); + assert_eq!(builder.where_expr(), "match(description, ?)"); +} + +#[test] +fn test_string_match_regex_case_insensitive() { + let schema = create_test_schema(); + let query = QueryExpr::StringMatchRegex { + property: "description".to_string(), + map_key: None, + pattern: "^test.*end$".to_string(), + case_sensitive: false, + }; + + let builder = UserDefinedQueryBuilder::new(&schema, &query).unwrap(); + // The pattern should have (?i) prepended for case-insensitive matching + assert_eq!(builder.where_expr(), "match(description, ?)"); + // Note: The actual pattern bound will be "(?i)^test.*end$" +} + +#[test] +fn test_map_key_with_case_sensitivity() { + let schema = create_test_schema(); + let query = QueryExpr::StringEqual { + property: "tags".to_string(), + map_key: Some("category".to_string()), + value: "Important".to_string(), + case_sensitive: false, + }; + + let builder = UserDefinedQueryBuilder::new(&schema, &query).unwrap(); + assert_eq!(builder.where_expr(), "LOWER(tags['category']) = LOWER(?)"); +} + +#[test] +fn test_regex_with_map_key() { + let schema = create_test_schema(); + let query = QueryExpr::StringMatchRegex { + property: "tags".to_string(), + map_key: Some("status".to_string()), + pattern: "active|pending".to_string(), + case_sensitive: true, + }; + + let builder = UserDefinedQueryBuilder::new(&schema, &query).unwrap(); + assert_eq!(builder.where_expr(), "match(tags['status'], ?)"); +} + +#[test] +fn test_complex_query_with_mixed_case_sensitivity() { + let schema = create_test_schema(); + let query = QueryExpr::And { + exprs: vec![ + QueryExpr::StringEqual { + property: "name".to_string(), + map_key: None, + value: "TestUser".to_string(), + case_sensitive: true, // exact match + }, + QueryExpr::StringMatchRegex { + property: "description".to_string(), + map_key: None, + pattern: "admin|manager".to_string(), + case_sensitive: false, // case-insensitive regex + }, + ], + }; + + let builder = UserDefinedQueryBuilder::new(&schema, &query).unwrap(); + assert_eq!(builder.where_expr(), "(name = ? AND match(description, ?))"); +} + +#[test] +fn test_string_in_with_empty_values_case_insensitive() { + let schema = create_test_schema(); + let query = QueryExpr::StringIn { + property: "name".to_string(), + map_key: None, + values: vec![], + case_sensitive: false, + }; + + let result = UserDefinedQueryBuilder::new(&schema, &query); + assert!(matches!(result, Err(UserQueryError::EmptyArrayValues(_)))); +} + +#[test] +fn test_regex_property_type_mismatch() { + let schema = Schema::new(vec![Property::new( + "count".to_string(), + false, + PropertyType::Number, + ) + .unwrap() + .with_group_by(false)]) + .unwrap(); + + let query = QueryExpr::StringMatchRegex { + property: "count".to_string(), // This is a number property + map_key: None, + pattern: "\\d+".to_string(), + case_sensitive: true, + }; + + let result = UserDefinedQueryBuilder::new(&schema, &query); + assert!(matches!( + result, + Err(UserQueryError::PropertyTypeMismatch(_, _, _)) + )); +} diff --git a/packages/common/clickhouse-user-query/tests/integration_tests.rs b/packages/common/clickhouse-user-query/tests/integration_tests.rs index 8be27e552e..6b20198371 100644 --- a/packages/common/clickhouse-user-query/tests/integration_tests.rs +++ b/packages/common/clickhouse-user-query/tests/integration_tests.rs @@ -52,7 +52,6 @@ impl TestSetup { id String, active Bool, metadata Map(String, String), - tags Array(String), age UInt32, score Float64 ) ENGINE = Memory", @@ -63,13 +62,15 @@ impl TestSetup { // Insert test data self.client - .query("INSERT INTO test_users VALUES - ('user1', true, {'region': 'us-east', 'tier': 'premium'}, ['verified', 'premium'], 25, 95.5), - ('user2', false, {'region': 'us-west', 'tier': 'basic'}, ['basic'], 30, 67.2), - ('user3', true, {'region': 'eu', 'tier': 'premium'}, ['verified', 'premium', 'beta'], 22, 88.9)") - .execute() - .await - .expect("Failed to insert test data"); + .query( + "INSERT INTO test_users VALUES + ('user1', true, {'region': 'us-east', 'tier': 'premium'}, 25, 95.5), + ('user2', false, {'region': 'us-west', 'tier': 'basic'}, 30, 67.2), + ('user3', true, {'region': 'eu', 'tier': 'premium'}, 22, 88.9)", + ) + .execute() + .await + .expect("Failed to insert test data"); } } @@ -83,13 +84,14 @@ async fn test_simple_query_execution() { false, PropertyType::Bool, ) - .unwrap()]) + .unwrap() + .with_group_by(false)]) .unwrap(); // Create query let query_expr = QueryExpr::BoolEqual { property: "active".to_string(), - subproperty: None, + map_key: None, value: true, }; @@ -118,7 +120,7 @@ async fn test_simple_query_execution() { } #[tokio::test] -async fn test_subproperty_query_execution() { +async fn test_map_key_query_execution() { let setup = TestSetup::new().await; // Create schema with map support @@ -127,14 +129,16 @@ async fn test_subproperty_query_execution() { true, PropertyType::String, ) - .unwrap()]) + .unwrap() + .with_group_by(false)]) .unwrap(); // Query for premium tier users let query_expr = QueryExpr::StringEqual { property: "metadata".to_string(), - subproperty: Some("tier".to_string()), + map_key: Some("tier".to_string()), value: "premium".to_string(), + case_sensitive: true, }; let builder = UserDefinedQueryBuilder::new(&schema, &query_expr).unwrap(); @@ -159,81 +163,46 @@ async fn test_subproperty_query_execution() { assert!(result.contains(&"user3".to_string())); } -#[tokio::test] -async fn test_array_contains_query_execution() { - let setup = TestSetup::new().await; - - // Create schema with array support - let schema = Schema::new(vec![Property::new( - "tags".to_string(), - false, - PropertyType::ArrayString, - ) - .unwrap()]) - .unwrap(); - - // Query for users with specific tags - let query_expr = QueryExpr::ArrayContains { - property: "tags".to_string(), - subproperty: None, - values: vec!["verified".to_string(), "beta".to_string()], - }; - - let builder = UserDefinedQueryBuilder::new(&schema, &query_expr).unwrap(); - - let query = setup.client.query(&format!( - "SELECT id FROM test_users WHERE {}", - builder.where_expr() - )); - let query = builder.bind_to(query); - - let result: Vec = query - .fetch_all::() - .await - .expect("Query execution failed") - .into_iter() - .map(|user| user.id) - .collect(); - - // Should return user1 and user3 (have verified) and user3 (has beta) - assert_eq!(result.len(), 2); - assert!(result.contains(&"user1".to_string())); - assert!(result.contains(&"user3".to_string())); -} - #[tokio::test] async fn test_complex_and_or_query_execution() { let setup = TestSetup::new().await; // Create comprehensive schema let schema = Schema::new(vec![ - Property::new("active".to_string(), false, PropertyType::Bool).unwrap(), - Property::new("metadata".to_string(), true, PropertyType::String).unwrap(), - Property::new("tags".to_string(), false, PropertyType::ArrayString).unwrap(), + Property::new("active".to_string(), false, PropertyType::Bool) + .unwrap() + .with_group_by(false), + Property::new("metadata".to_string(), true, PropertyType::String) + .unwrap() + .with_group_by(false), + Property::new("score".to_string(), false, PropertyType::Number) + .unwrap() + .with_group_by(false), ]) .unwrap(); - // Complex query: (active = true AND metadata['tier'] = 'premium') OR tags contains 'beta' + // Complex query: (active = true AND metadata['tier'] = 'premium') OR score > 85 let query_expr = QueryExpr::Or { exprs: vec![ QueryExpr::And { exprs: vec![ QueryExpr::BoolEqual { property: "active".to_string(), - subproperty: None, + map_key: None, value: true, }, QueryExpr::StringEqual { property: "metadata".to_string(), - subproperty: Some("tier".to_string()), + map_key: Some("tier".to_string()), value: "premium".to_string(), + case_sensitive: true, }, ], }, - QueryExpr::ArrayContains { - property: "tags".to_string(), - subproperty: None, - values: vec!["beta".to_string()], + QueryExpr::NumberGreater { + property: "score".to_string(), + map_key: None, + value: 85.0, }, ], }; @@ -256,7 +225,7 @@ async fn test_complex_and_or_query_execution() { // Should return: // - user1 (active=true AND tier=premium) - // - user3 (active=true AND tier=premium AND has beta tag) + // - user3 (active=true AND tier=premium, and score=88.9 > 85) assert_eq!(result.len(), 2); assert!(result.contains(&"user1".to_string())); assert!(result.contains(&"user3".to_string())); @@ -272,14 +241,16 @@ async fn test_sql_injection_protection() { true, PropertyType::String, ) - .unwrap()]) + .unwrap() + .with_group_by(false)]) .unwrap(); - // Attempt SQL injection in subproperty + // Attempt SQL injection in map key let query_expr = QueryExpr::StringEqual { property: "metadata".to_string(), - subproperty: Some("'; DROP TABLE test_users; --".to_string()), + map_key: Some("'; DROP TABLE test_users; --".to_string()), value: "malicious".to_string(), + case_sensitive: true, }; // The builder should reject the SQL injection attempt @@ -287,14 +258,15 @@ async fn test_sql_injection_protection() { assert!(builder_result.is_err()); assert!(matches!( builder_result, - Err(UserQueryError::InvalidSubpropertyName(_)) + Err(UserQueryError::InvalidMapKeyName(_)) )); - // Test with a valid subproperty name to ensure normal operation works + // Test with a valid map key name to ensure normal operation works let safe_query_expr = QueryExpr::StringEqual { property: "metadata".to_string(), - subproperty: Some("safe_key".to_string()), + map_key: Some("safe_key".to_string()), value: "test_value".to_string(), + case_sensitive: true, }; let safe_builder = UserDefinedQueryBuilder::new(&schema, &safe_query_expr); @@ -329,8 +301,12 @@ async fn test_json_serialization_roundtrip() { // Create schema let schema = Schema::new(vec![ - Property::new("active".to_string(), false, PropertyType::Bool).unwrap(), - Property::new("metadata".to_string(), true, PropertyType::String).unwrap(), + Property::new("active".to_string(), false, PropertyType::Bool) + .unwrap() + .with_group_by(false), + Property::new("metadata".to_string(), true, PropertyType::String) + .unwrap() + .with_group_by(false), ]) .unwrap(); @@ -339,13 +315,14 @@ async fn test_json_serialization_roundtrip() { exprs: vec![ QueryExpr::BoolEqual { property: "active".to_string(), - subproperty: None, + map_key: None, value: true, }, QueryExpr::StringEqual { property: "metadata".to_string(), - subproperty: Some("tier".to_string()), + map_key: Some("tier".to_string()), value: "premium".to_string(), + case_sensitive: true, }, ], }; @@ -408,13 +385,14 @@ async fn test_numeric_query_execution() { false, PropertyType::Number, ) - .unwrap()]) + .unwrap() + .with_group_by(false)]) .unwrap(); // Query for users with score greater than 80 let query_expr = QueryExpr::NumberGreater { property: "score".to_string(), - subproperty: None, + map_key: None, value: 80.0, }; @@ -451,13 +429,14 @@ async fn test_numeric_less_or_equal_query() { false, PropertyType::Number, ) - .unwrap()]) + .unwrap() + .with_group_by(false)]) .unwrap(); // Query for users with score <= 90 let query_expr = QueryExpr::NumberLessOrEqual { property: "score".to_string(), - subproperty: None, + map_key: None, value: 90.0, }; @@ -483,3 +462,92 @@ async fn test_numeric_less_or_equal_query() { assert!(result.contains(&"user3".to_string())); assert!(!result.contains(&"user1".to_string())); } + +#[tokio::test] +async fn test_string_in_query_execution() { + let setup = TestSetup::new().await; + + // Create schema + let schema = Schema::new(vec![Property::new( + "metadata".to_string(), + true, + PropertyType::String, + ) + .unwrap() + .with_group_by(false)]) + .unwrap(); + + // Query for users with specific regions + let query_expr = QueryExpr::StringIn { + property: "metadata".to_string(), + map_key: Some("region".to_string()), + values: vec!["us-east".to_string(), "eu".to_string()], + case_sensitive: true, + }; + + let builder = UserDefinedQueryBuilder::new(&schema, &query_expr).unwrap(); + + let query = setup.client.query(&format!( + "SELECT id FROM test_users WHERE {}", + builder.where_expr() + )); + let query = builder.bind_to(query); + + let result: Vec = query + .fetch_all::() + .await + .expect("Query execution failed") + .into_iter() + .map(|user| user.id) + .collect(); + + // Should return user1 (us-east) and user3 (eu), but not user2 (us-west) + assert_eq!(result.len(), 2); + assert!(result.contains(&"user1".to_string())); + assert!(result.contains(&"user3".to_string())); + assert!(!result.contains(&"user2".to_string())); +} + +#[tokio::test] +async fn test_number_not_in_query_execution() { + let setup = TestSetup::new().await; + + // Create schema + let schema = Schema::new(vec![Property::new( + "score".to_string(), + false, + PropertyType::Number, + ) + .unwrap() + .with_group_by(false)]) + .unwrap(); + + // Query for users with score not in specific values + let query_expr = QueryExpr::NumberNotIn { + property: "score".to_string(), + map_key: None, + values: vec![67.2, 88.9], + }; + + let builder = UserDefinedQueryBuilder::new(&schema, &query_expr).unwrap(); + + let query = setup.client.query(&format!( + "SELECT id FROM test_users WHERE {}", + builder.where_expr() + )); + let query = builder.bind_to(query); + + let result: Vec = query + .fetch_all::() + .await + .expect("Query execution failed") + .into_iter() + .map(|user| user.id) + .collect(); + + // Should return only user1 (95.5), not user2 (67.2) or user3 (88.9) + assert_eq!(result.len(), 1); + assert!(result.contains(&"user1".to_string())); + assert!(!result.contains(&"user2".to_string())); + assert!(!result.contains(&"user3".to_string())); +} diff --git a/packages/common/clickhouse-user-query/tests/query_tests.rs b/packages/common/clickhouse-user-query/tests/query_tests.rs index ea162d4033..9a30c7c902 100644 --- a/packages/common/clickhouse-user-query/tests/query_tests.rs +++ b/packages/common/clickhouse-user-query/tests/query_tests.rs @@ -4,8 +4,9 @@ use clickhouse_user_query::*; fn test_query_expr_serde() { let query = QueryExpr::StringEqual { property: "user_id".to_string(), - subproperty: None, + map_key: None, value: "12345".to_string(), + case_sensitive: true, }; // Test serialization @@ -34,13 +35,14 @@ fn test_complex_query_serde() { exprs: vec![ QueryExpr::BoolEqual { property: "active".to_string(), - subproperty: None, + map_key: None, value: true, }, - QueryExpr::ArrayContains { - property: "tags".to_string(), - subproperty: Some("category".to_string()), + QueryExpr::StringIn { + property: "status".to_string(), + map_key: None, values: vec!["premium".to_string(), "verified".to_string()], + case_sensitive: true, }, ], }; @@ -49,7 +51,7 @@ fn test_complex_query_serde() { assert!(json.contains(r#""and""#)); assert!(json.contains(r#""bool_equal""#)); - assert!(json.contains(r#""array_contains""#)); + assert!(json.contains(r#""string_in""#)); let deserialized: QueryExpr = serde_json::from_str(&json).unwrap(); match deserialized { @@ -66,12 +68,13 @@ fn test_query_expr_creation() { exprs: vec![ QueryExpr::StringEqual { property: "user_id".to_string(), - subproperty: None, + map_key: None, value: "12345".to_string(), + case_sensitive: true, }, QueryExpr::BoolEqual { property: "active".to_string(), - subproperty: None, + map_key: None, value: true, }, ], @@ -86,52 +89,34 @@ fn test_query_expr_creation() { } #[test] -fn test_subproperty_query() { +fn test_map_key_query() { let query = QueryExpr::StringEqual { property: "metadata".to_string(), - subproperty: Some("key".to_string()), + map_key: Some("key".to_string()), value: "value".to_string(), + case_sensitive: true, }; match query { QueryExpr::StringEqual { property, - subproperty, + map_key, value, + .. } => { assert_eq!(property, "metadata"); - assert_eq!(subproperty, Some("key".to_string())); + assert_eq!(map_key, Some("key".to_string())); assert_eq!(value, "value"); } _ => panic!("Expected StringEqual expression"), } } -#[test] -fn test_array_query() { - let query = QueryExpr::ArrayContains { - property: "tags".to_string(), - subproperty: None, - values: vec!["premium".to_string(), "verified".to_string()], - }; - - match query { - QueryExpr::ArrayContains { - property, values, .. - } => { - assert_eq!(property, "tags"); - assert_eq!(values.len(), 2); - assert!(values.contains(&"premium".to_string())); - } - _ => panic!("Expected ArrayContains expression"), - } -} - #[test] fn test_numeric_query() { let query = QueryExpr::NumberGreater { property: "score".to_string(), - subproperty: None, + map_key: None, value: 85.5, }; @@ -150,7 +135,7 @@ fn test_numeric_query() { fn test_numeric_query_serde() { let query = QueryExpr::NumberLessOrEqual { property: "metrics".to_string(), - subproperty: Some("latency".to_string()), + map_key: Some("latency".to_string()), value: 100.0, }; @@ -159,7 +144,7 @@ fn test_numeric_query_serde() { assert!(json.contains(r#""number_less_or_equal""#)); assert!(json.contains(r#""property": "metrics""#)); - assert!(json.contains(r#""subproperty": "latency""#)); + assert!(json.contains(r#""map_key": "latency""#)); assert!(json.contains(r#""value": 100.0"#)); // Test deserialization @@ -167,13 +152,112 @@ fn test_numeric_query_serde() { match deserialized { QueryExpr::NumberLessOrEqual { property, - subproperty, + map_key, value, } => { assert_eq!(property, "metrics"); - assert_eq!(subproperty, Some("latency".to_string())); + assert_eq!(map_key, Some("latency".to_string())); assert_eq!(value, 100.0); } _ => panic!("Expected NumberLessOrEqual"), } } + +#[test] +fn test_string_in_query() { + let query = QueryExpr::StringIn { + property: "status".to_string(), + map_key: None, + values: vec!["active".to_string(), "pending".to_string()], + case_sensitive: true, + }; + + match query { + QueryExpr::StringIn { + property, values, .. + } => { + assert_eq!(property, "status"); + assert_eq!(values.len(), 2); + assert!(values.contains(&"active".to_string())); + } + _ => panic!("Expected StringIn expression"), + } +} + +#[test] +fn test_string_not_in_query() { + let query = QueryExpr::StringNotIn { + property: "status".to_string(), + map_key: None, + values: vec!["disabled".to_string(), "archived".to_string()], + case_sensitive: true, + }; + + // Test serialization + let json = serde_json::to_string_pretty(&query).unwrap(); + + assert!(json.contains(r#""string_not_in""#)); + assert!(json.contains(r#""property": "status""#)); + assert!(json.contains(r#""disabled""#)); + + // Test deserialization + let deserialized: QueryExpr = serde_json::from_str(&json).unwrap(); + match deserialized { + QueryExpr::StringNotIn { + property, values, .. + } => { + assert_eq!(property, "status"); + assert_eq!(values.len(), 2); + } + _ => panic!("Expected StringNotIn"), + } +} + +#[test] +fn test_number_in_query() { + let query = QueryExpr::NumberIn { + property: "score".to_string(), + map_key: None, + values: vec![85.0, 90.0, 95.0], + }; + + match query { + QueryExpr::NumberIn { + property, values, .. + } => { + assert_eq!(property, "score"); + assert_eq!(values.len(), 3); + assert!(values.contains(&90.0)); + } + _ => panic!("Expected NumberIn expression"), + } +} + +#[test] +fn test_number_not_in_query() { + let query = QueryExpr::NumberNotIn { + property: "score".to_string(), + map_key: None, + values: vec![0.0, 50.0], + }; + + // Test serialization + let json = serde_json::to_string_pretty(&query).unwrap(); + + assert!(json.contains(r#""number_not_in""#)); + assert!(json.contains(r#""property": "score""#)); + assert!(json.contains(r#"0.0"#)); + assert!(json.contains(r#"50.0"#)); + + // Test deserialization + let deserialized: QueryExpr = serde_json::from_str(&json).unwrap(); + match deserialized { + QueryExpr::NumberNotIn { + property, values, .. + } => { + assert_eq!(property, "score"); + assert_eq!(values.len(), 2); + } + _ => panic!("Expected NumberNotIn"), + } +} diff --git a/packages/common/clickhouse-user-query/tests/schema_tests.rs b/packages/common/clickhouse-user-query/tests/schema_tests.rs index 7e14d310d4..5be1f04929 100644 --- a/packages/common/clickhouse-user-query/tests/schema_tests.rs +++ b/packages/common/clickhouse-user-query/tests/schema_tests.rs @@ -3,8 +3,12 @@ use clickhouse_user_query::*; #[test] fn test_schema_creation() { let schema = Schema::new(vec![ - Property::new("valid_name".to_string(), false, PropertyType::String).unwrap(), - Property::new("another_valid_123".to_string(), true, PropertyType::Bool).unwrap(), + Property::new("valid_name".to_string(), false, PropertyType::String) + .unwrap() + .with_group_by(false), + Property::new("another_valid_123".to_string(), true, PropertyType::Bool) + .unwrap() + .with_group_by(false), ]) .unwrap(); @@ -24,5 +28,17 @@ fn test_property_type_names() { assert_eq!(PropertyType::Bool.type_name(), "bool"); assert_eq!(PropertyType::String.type_name(), "string"); assert_eq!(PropertyType::Number.type_name(), "number"); - assert_eq!(PropertyType::ArrayString.type_name(), "array[string]"); +} + +#[test] +fn test_property_is_map() { + let non_map_prop = Property::new("prop1".to_string(), false, PropertyType::String) + .unwrap() + .with_group_by(false); + let map_prop = Property::new("prop2".to_string(), true, PropertyType::String) + .unwrap() + .with_group_by(false); + + assert!(!non_map_prop.is_map); + assert!(map_prop.is_map); } diff --git a/packages/common/formatted-error/errors/actor/logs/invalid-query-expr.md b/packages/common/formatted-error/errors/actor/logs/invalid-query-expr.md new file mode 100644 index 0000000000..42ad377c43 --- /dev/null +++ b/packages/common/formatted-error/errors/actor/logs/invalid-query-expr.md @@ -0,0 +1,9 @@ +--- +name = "ACTOR_LOGS_INVALID_QUERY_EXPR" +description = "Invalid query expression format." +http_status = 400 +--- + +# Invalid Query Expression + +The provided query expression is not in a valid format. Please provide a valid JSON-encoded query expression. diff --git a/packages/common/formatted-error/errors/request-query/field-not-groupable.md b/packages/common/formatted-error/errors/request-query/field-not-groupable.md new file mode 100644 index 0000000000..28eee70b81 --- /dev/null +++ b/packages/common/formatted-error/errors/request-query/field-not-groupable.md @@ -0,0 +1,15 @@ +--- +name = "REQUEST_QUERY_FIELD_NOT_GROUPABLE" +description = "Field cannot be used in GROUP BY." +http_status = 400 +--- + +# Field Not Groupable + +The specified field exists but cannot be used in GROUP BY operations. + +## Causes + +- Field is not marked as groupable in the schema +- Field type doesn't support grouping +- Using a computed or derived field that can't be grouped \ No newline at end of file diff --git a/packages/common/formatted-error/errors/request-query/field-not-map.md b/packages/common/formatted-error/errors/request-query/field-not-map.md new file mode 100644 index 0000000000..91c9ab1c72 --- /dev/null +++ b/packages/common/formatted-error/errors/request-query/field-not-map.md @@ -0,0 +1,15 @@ +--- +name = "REQUEST_QUERY_FIELD_NOT_MAP" +description = "Field is not a map type." +http_status = 400 +--- + +# Field Not Map + +The specified field is not a map type but a map key was provided. + +## Causes + +- Trying to access a map key on a non-map field +- Field type mismatch in query +- Incorrect field path syntax \ No newline at end of file diff --git a/packages/common/formatted-error/errors/request-query/invalid-group-by-field.md b/packages/common/formatted-error/errors/request-query/invalid-group-by-field.md new file mode 100644 index 0000000000..f330127366 --- /dev/null +++ b/packages/common/formatted-error/errors/request-query/invalid-group-by-field.md @@ -0,0 +1,15 @@ +--- +name = "REQUEST_QUERY_INVALID_GROUP_BY_FIELD" +description = "Invalid group by field specified." +http_status = 400 +--- + +# Invalid Group By Field + +The specified field does not exist in the schema and cannot be used for grouping. + +## Causes + +- Field name is misspelled +- Field doesn't exist in the schema +- Using a field that's not available for grouping \ No newline at end of file diff --git a/packages/common/formatted-error/errors/request-query/map-requires-key.md b/packages/common/formatted-error/errors/request-query/map-requires-key.md new file mode 100644 index 0000000000..11a3ffe294 --- /dev/null +++ b/packages/common/formatted-error/errors/request-query/map-requires-key.md @@ -0,0 +1,15 @@ +--- +name = "REQUEST_QUERY_MAP_REQUIRES_KEY" +description = "Map property requires a key for GROUP BY." +http_status = 400 +--- + +# Map Requires Key + +Map properties require a map key to be specified when used in GROUP BY. + +## Causes + +- Using a map field in GROUP BY without specifying a key +- Missing map key in the KeyPath structure +- Attempting to group by the entire map instead of a specific key \ No newline at end of file diff --git a/packages/core/api/actor/Cargo.toml b/packages/core/api/actor/Cargo.toml index 24fe9957b1..e2541fd367 100644 --- a/packages/core/api/actor/Cargo.toml +++ b/packages/core/api/actor/Cargo.toml @@ -54,10 +54,13 @@ user-get.workspace = true user-identity-get.workspace = true user-team-list.workspace = true route.workspace = true +upload-prepare.workspace = true +core-guard = { path = "../../services/guard" } +clickhouse-user-query.workspace = true +reqwest = "0.11" [dev-dependencies] rivet-connection.workspace = true -reqwest = "0.11" cdn-namespace-domain-create.workspace = true cloud-namespace-token-development-create.workspace = true diff --git a/packages/core/api/actor/src/route/actors.rs b/packages/core/api/actor/src/route/actors.rs index 3be629b32a..af9a9420c2 100644 --- a/packages/core/api/actor/src/route/actors.rs +++ b/packages/core/api/actor/src/route/actors.rs @@ -1173,3 +1173,262 @@ async fn resolve_dc( Ok(dc.name_id.clone()) } } + +// MARK: GET /actors/usage +#[derive(Debug, Clone, Deserialize)] +pub struct UsageQuery { + #[serde(flatten)] + global: GlobalQuery, + start: i64, // Start timestamp in milliseconds + end: i64, // End timestamp in milliseconds + interval: i64, // Time bucket interval in milliseconds + group_by: Option, // JSON-encoded KeyPath + query_json: Option, +} + +#[tracing::instrument(skip_all)] +pub async fn usage( + ctx: Ctx, + _watch_index: WatchIndexQuery, + query: UsageQuery, +) -> GlobalResult { + let CheckOutput { game_id, .. } = ctx + .auth() + .check( + ctx.op_ctx(), + CheckOpts { + query: &query.global, + allow_service_token: false, + opt_auth: false, + }, + ) + .await?; + + // Parse user query if provided + let user_query_expr = if let Some(query_json) = &query.query_json { + match serde_json::from_str::(&query_json) { + Ok(expr) => Some(expr), + Err(e) => { + bail_with!(API_BAD_QUERY, error = e.to_string()); + } + } + } else { + None + }; + + // Parse group by key path if provided + let group_by = if let Some(group_by_json) = &query.group_by { + match serde_json::from_str::(&group_by_json) { + Ok(key_path) => Some(key_path), + Err(e) => { + bail_with!(API_BAD_QUERY, error = format!("Invalid group_by: {}", e)); + } + } + } else { + None + }; + + let usage_res = ctx + .op(pegboard::ops::actor::usage::get::Input { + env_id: game_id, + start_ms: query.start, + end_ms: query.end, + interval_ms: query.interval, + group_by, + user_query_expr, + }) + .await?; + + Ok(models::ActorsGetActorUsageResponse { + metric_names: usage_res.metric_names, + metric_attributes: usage_res + .metric_attributes + .into_iter() + .map(|attrs| attrs.into_iter().collect::>()) + .collect(), + metric_types: usage_res.metric_types, + metric_values: usage_res.metric_values, + }) +} + +// MARK: GET /actors/query +#[derive(Debug, Clone, Deserialize)] +pub struct QueryQuery { + #[serde(flatten)] + global: GlobalQuery, + query_json: String, + cursor: Option, +} + +#[tracing::instrument(skip_all)] +pub async fn query( + ctx: Ctx, + _watch_index: WatchIndexQuery, + query: QueryQuery, +) -> GlobalResult { + let CheckOutput { game_id, .. } = ctx + .auth() + .check( + ctx.op_ctx(), + CheckOpts { + query: &query.global, + allow_service_token: false, + opt_auth: false, + }, + ) + .await?; + + // Parse user query + let user_query_expr = + match serde_json::from_str::(&query.query_json) { + Ok(expr) => expr, + Err(e) => { + bail_with!(API_BAD_QUERY, error = e.to_string()); + } + }; + + // Parse cursor if provided + let cursor = if let Some(cursor_str) = &query.cursor { + match serde_json::from_str::(cursor_str) { + Ok(c) => Some(c), + Err(e) => { + bail_with!(API_BAD_QUERY, error = format!("Invalid cursor: {}", e)); + } + } + } else { + None + }; + + let query_res = ctx + .op(pegboard::ops::actor::query::Input { + env_id: game_id, + user_query_expr, + cursor, + limit: 32, // Same limit as list_actors + }) + .await?; + + // Resolve datacenter names + let clusters_res = ctx + .op(cluster::ops::get_for_game::Input { + game_ids: vec![game_id], + }) + .await?; + let cluster_id = unwrap!(clusters_res.games.first()).cluster_id; + + let datacenter_ids = query_res + .actors + .iter() + .map(|a| a.datacenter_id) + .collect::>() + .into_iter() + .collect::>(); + + let dc_res = ctx + .op(cluster::ops::datacenter::get::Input { datacenter_ids }) + .await?; + + let datacenter_map = dc_res + .datacenters + .into_iter() + .map(|dc| (dc.datacenter_id, dc)) + .collect::>(); + + // Convert actors to API models + let actors = query_res + .actors + .into_iter() + .map(|actor| { + // Get datacenter name + let dc = datacenter_map.get(&actor.datacenter_id); + let region = dc.map(|d| d.name_id.clone()).unwrap_or_default(); + + // Convert timestamp to ISO string + let created_at = + chrono::DateTime::::from_timestamp_nanos(actor.created_at) + .to_rfc3339(); + let started_at = actor + .started_at + .map(|ts| chrono::DateTime::::from_timestamp_nanos(ts).to_rfc3339()); + let connectable_at = actor + .connectable_at + .map(|ts| chrono::DateTime::::from_timestamp_nanos(ts).to_rfc3339()); + let destroyed_at = actor + .destroyed_at + .map(|ts| chrono::DateTime::::from_timestamp_nanos(ts).to_rfc3339()); + + // Convert network mode + let network_mode = match actor.network_mode { + 0 => models::ActorsNetworkMode::Bridge, + 1 => models::ActorsNetworkMode::Host, + _ => models::ActorsNetworkMode::Bridge, + }; + + // Convert network ports + let ports = actor + .network_ports + .into_iter() + .map(|(name, port)| { + // TODO: This needs more complete port conversion logic + ( + name, + models::ActorsPort { + internal_port: Some(port.internal_port as i32), + protocol: models::ActorsPortProtocol::Http, + routing: Box::new(models::ActorsPortRouting { + guard: if port.routing_guard { + Some(json!({})) + } else { + None + }, + host: if port.routing_host { + Some(json!({})) + } else { + None + }, + }), + hostname: None, + port: None, + path: None, + url: None, + }, + ) + }) + .collect(); + + models::ActorsActor { + id: actor.actor_id, + region, + created_at, + started_at, + destroyed_at, + lifecycle: Box::new(models::ActorsLifecycle { + kill_timeout: Some(actor.kill_timeout), + durable: Some(actor.durable), + }), + network: Box::new(models::ActorsNetwork { + mode: network_mode, + ports, + }), + resources: Box::new(models::ActorsResources { + cpu: actor.selected_cpu_millicores as i32, + memory: actor.selected_memory_mib as i32, + }), + runtime: Box::new(models::ActorsRuntime { + build: actor.build_id, + arguments: None, + environment: None, + }), + tags: Some(actor.tags.into_iter().collect()), + } + }) + .collect(); + + // Serialize cursor if present + let cursor_str = query_res.cursor.map(|c| serde_json::to_string(&c).unwrap()); + + Ok(models::ActorsQueryActorsResponse { + actors, + pagination: Box::new(models::Pagination { cursor: cursor_str }), + }) +} diff --git a/packages/core/api/actor/src/route/logs.rs b/packages/core/api/actor/src/route/logs.rs index e2c1287642..547441c072 100644 --- a/packages/core/api/actor/src/route/logs.rs +++ b/packages/core/api/actor/src/route/logs.rs @@ -2,6 +2,7 @@ use api_helper::{ anchor::{WatchIndexQuery, WatchResponse}, ctx::Ctx, }; +use proto::backend; use rivet_api::models; use rivet_operation::prelude::*; use serde::Deserialize; @@ -20,14 +21,8 @@ use super::GlobalQuery; pub struct GetActorLogsQuery { #[serde(flatten)] pub global: GlobalQuery, - pub stream: models::ActorsQueryLogStream, - pub actor_ids_json: String, - #[serde(default)] - pub search_text: Option, - #[serde(default)] - pub search_case_sensitive: Option, - #[serde(default)] - pub search_enable_regex: Option, + /// JSON-encoded user query expression for filtering logs + pub query_json: String, } #[tracing::instrument(skip_all)] @@ -48,12 +43,17 @@ pub async fn get_logs( ) .await?; - // Parse actor IDs from the JSON string - let actor_ids: Vec = unwrap_with!( - serde_json::from_str(&query.actor_ids_json).ok(), - ACTOR_LOGS_INVALID_ACTOR_IDS - ); + // Parse user query expression + let user_query_expr = + match serde_json::from_str::(&query.query_json) { + Ok(expr) => expr, + Err(e) => { + bail_with!(ACTOR_LOGS_INVALID_QUERY_EXPR, error = e.to_string()); + } + }; + // Extract actor IDs from the query expression + let actor_ids = extract_actor_ids_from_query(&user_query_expr)?; ensure_with!(!actor_ids.is_empty(), ACTOR_LOGS_NO_ACTOR_IDS); // Filter to only valid actors for this game/env @@ -65,15 +65,11 @@ pub async fn get_logs( // Use only the valid actor IDs from now on let actor_ids = valid_actor_ids; - // Determine stream type(s) - let stream_types = match query.stream { - models::ActorsQueryLogStream::StdOut => vec![pegboard::types::LogsStreamType::StdOut], - models::ActorsQueryLogStream::StdErr => vec![pegboard::types::LogsStreamType::StdErr], - models::ActorsQueryLogStream::All => vec![ - pegboard::types::LogsStreamType::StdOut, - pegboard::types::LogsStreamType::StdErr, - ], - }; + // Always return all stream types (both stdout and stderr) + let stream_types = vec![ + pegboard::types::LogsStreamType::StdOut, + pegboard::types::LogsStreamType::StdErr, + ]; // Timestamp to start the query at let before_nts = util::timestamp::now() * 1_000_000; @@ -81,8 +77,9 @@ pub async fn get_logs( // Handle anchor let logs_res = if let Some(anchor) = watch_index.as_i64()? { let query_start = tokio::time::Instant::now(); - let stream_types_clone = stream_types.clone(); // Clone here to use in the loop - let actor_ids_clone = actor_ids.clone(); // Clone here to use in the loop + let stream_types_clone = stream_types.clone(); + let actor_ids_clone = actor_ids.clone(); + let user_query_expr_clone = user_query_expr.clone(); // Poll for new logs let logs_res = loop { @@ -95,16 +92,14 @@ pub async fn get_logs( // We return fewer logs than the non-anchor request since this will be called // frequently and should not return a significant amount of logs. let logs_res = ctx - .op(pegboard::ops::actor::log::read::Input { + .op(pegboard::ops::actor::log::read_with_query::Input { env_id, actor_ids: actor_ids_clone.clone(), stream_types: stream_types_clone.clone(), count: 64, - order_by: pegboard::ops::actor::log::read::Order::Desc, - query: pegboard::ops::actor::log::read::Query::AfterNts(anchor), - search_text: query.search_text.clone(), - search_case_sensitive: query.search_case_sensitive, - search_enable_regex: query.search_enable_regex, + order_by: pegboard::ops::actor::log::read_with_query::Order::Desc, + query: pegboard::ops::actor::log::read_with_query::Query::AfterNts(anchor), + user_query_expr: Some(user_query_expr_clone.clone()), }) .await?; @@ -115,7 +110,7 @@ pub async fn get_logs( // Timeout cleanly if query_start.elapsed().as_millis() > util::watch::DEFAULT_TIMEOUT as u128 { - break pegboard::ops::actor::log::read::Output { + break pegboard::ops::actor::log::read_with_query::Output { entries: Vec::new(), }; } @@ -135,21 +130,32 @@ pub async fn get_logs( logs_res } else { // Read most recent logs - - ctx.op(pegboard::ops::actor::log::read::Input { + ctx.op(pegboard::ops::actor::log::read_with_query::Input { env_id, actor_ids: actor_ids.clone(), stream_types: stream_types.clone(), count: 256, - order_by: pegboard::ops::actor::log::read::Order::Desc, - query: pegboard::ops::actor::log::read::Query::BeforeNts(before_nts), - search_text: query.search_text.clone(), - search_case_sensitive: query.search_case_sensitive, - search_enable_regex: query.search_enable_regex, + order_by: pegboard::ops::actor::log::read_with_query::Order::Desc, + query: pegboard::ops::actor::log::read_with_query::Query::BeforeNts(before_nts), + user_query_expr: Some(user_query_expr.clone()), }) .await? }; + // Convert to old Output format for compatibility + let logs_res = pegboard::ops::actor::log::read::Output { + entries: logs_res + .entries + .into_iter() + .map(|e| pegboard::ops::actor::log::read::LogEntry { + ts: e.ts, + message: e.message, + stream_type: e.stream_type, + actor_id: e.actor_id, + }) + .collect(), + }; + // Build actor_ids map for lookup let mut actor_id_to_index: std::collections::HashMap = std::collections::HashMap::new(); @@ -204,6 +210,54 @@ pub async fn get_logs( }) } +/// Helper function to extract actor IDs from a query expression +fn extract_actor_ids_from_query( + expr: &clickhouse_user_query::QueryExpr, +) -> GlobalResult> { + let mut actor_ids = Vec::new(); + extract_actor_ids_recursive(expr, &mut actor_ids)?; + Ok(actor_ids) +} + +fn extract_actor_ids_recursive( + expr: &clickhouse_user_query::QueryExpr, + actor_ids: &mut Vec, +) -> GlobalResult<()> { + use clickhouse_user_query::QueryExpr; + + match expr { + QueryExpr::And { exprs } | QueryExpr::Or { exprs } => { + for sub_expr in exprs { + extract_actor_ids_recursive(sub_expr, actor_ids)?; + } + } + QueryExpr::StringEqual { + property, value, .. + } => { + if property == "actor_id" { + if let Ok(uuid) = Uuid::parse_str(value) { + actor_ids.push(uuid); + } + } + } + QueryExpr::StringIn { + property, values, .. + } => { + if property == "actor_id" { + for value in values { + if let Ok(uuid) = Uuid::parse_str(value) { + actor_ids.push(uuid); + } + } + } + } + // Other expression types don't contain actor IDs + _ => {} + } + + Ok(()) +} + pub async fn get_logs_deprecated( ctx: Ctx, game_id: Uuid, @@ -214,22 +268,16 @@ pub async fn get_logs_deprecated( ) -> GlobalResult { let global = build_global_query_compat(&ctx, game_id, env_id).await?; - // Create a single-item actor_ids_json for the deprecated endpoint - let actor_ids_json = serde_json::to_string(&vec![server_id])?; - - let logs_res = get_logs( - ctx, - watch_index, - GetActorLogsQuery { - global, - stream: query.stream, - actor_ids_json, - search_text: query.search_text.clone(), - search_case_sensitive: query.search_case_sensitive, - search_enable_regex: query.search_enable_regex, - }, - ) - .await?; + // Build a proper query expression for the single actor + let query_expr = clickhouse_user_query::QueryExpr::StringEqual { + property: "actor_id".to_string(), + map_key: None, + value: server_id.to_string(), + case_sensitive: true, + }; + let query_json = serde_json::to_string(&query_expr)?; + + let logs_res = get_logs(ctx, watch_index, GetActorLogsQuery { global, query_json }).await?; Ok(models::ServersGetServerLogsResponse { lines: logs_res.lines, timestamps: logs_res.timestamps, @@ -237,3 +285,153 @@ pub async fn get_logs_deprecated( watch: logs_res.watch, }) } + +// MARK: POST /actors/logs/export +#[tracing::instrument(skip_all)] +pub async fn export_logs( + ctx: Ctx, + body: models::ActorsLogsExportRequest, +) -> GlobalResult { + let CheckOutput { game_id, env_id } = ctx + .auth() + .check( + ctx.op_ctx(), + CheckOpts { + query: &GlobalQuery { + project: body.project, + environment: body.environment, + }, + allow_service_token: false, + opt_auth: false, + }, + ) + .await?; + + // Parse user query expression + let user_query_expr = + match serde_json::from_str::(&body.query_json) { + Ok(expr) => expr, + Err(e) => { + bail_with!(ACTOR_LOGS_INVALID_QUERY_EXPR, error = e.to_string()); + } + }; + + // Extract actor IDs from the query expression + let actor_ids = extract_actor_ids_from_query(&user_query_expr)?; + ensure_with!(!actor_ids.is_empty(), ACTOR_LOGS_NO_ACTOR_IDS); + + // Filter to only valid actors for this game/env + let valid_actor_ids = assert::actor_for_env(&ctx, &actor_ids, game_id, env_id, None).await?; + + // Exit early if no valid actors + ensure_with!(!valid_actor_ids.is_empty(), ACTOR_LOGS_NO_VALID_ACTOR_IDS); + + // Use only the valid actor IDs from now on + let actor_ids = valid_actor_ids; + + // Read all logs (no limit) + let logs_res = ctx + .op(pegboard::ops::actor::log::read_with_query::Input { + env_id, + actor_ids: actor_ids.clone(), + stream_types: vec![ + pegboard::types::LogsStreamType::StdOut, + pegboard::types::LogsStreamType::StdErr, + ], + count: i64::MAX, + order_by: pegboard::ops::actor::log::read_with_query::Order::Asc, + query: pegboard::ops::actor::log::read_with_query::Query::All, + user_query_expr: Some(user_query_expr.clone()), + }) + .await?; + + // Build actor_ids map for lookup + let mut actor_id_to_string: std::collections::HashMap = + std::collections::HashMap::new(); + for id in &actor_ids { + actor_id_to_string.insert(*id, id.to_string()); + } + + // Format logs as JSONL (JSON Lines) + let mut output = String::new(); + for entry in &logs_res.entries { + let log_entry = serde_json::json!({ + "timestamp": entry.ts / 1_000_000, // Convert to milliseconds + "actor_id": actor_id_to_string.get(&entry.actor_id).unwrap_or(&entry.actor_id.to_string()), + "stream": match entry.stream_type { + x if x == (pegboard::types::LogsStreamType::StdOut as u8) => "stdout", + x if x == (pegboard::types::LogsStreamType::StdErr as u8) => "stderr", + x => bail!("unknown stream type {x}") + }, + "message": entry.message, + }); + output.push_str(&serde_json::to_string(&log_entry)?); + output.push('\n'); + } + + // Generate filename + let timestamp = chrono::Utc::now().format("%Y%m%d_%H%M%S"); + let filename = format!("actor_logs_export_{}.jsonl", timestamp); + + // Upload to S3 + let mime = "application/x-ndjson"; + let content_length = output.len(); + let upload_res = op!([ctx] upload_prepare { + bucket: "bucket-actor-log-export".into(), + files: vec![ + backend::upload::PrepareFile { + path: filename.clone(), + mime: Some(mime.into()), + content_length: content_length as u64, + ..Default::default() + }, + ], + }) + .await?; + + let presigned_req = unwrap!(upload_res.presigned_requests.first()); + + // Upload the content + let res = reqwest::Client::new() + .put(&presigned_req.url) + .body(output) + .header(reqwest::header::CONTENT_TYPE, mime) + .header(reqwest::header::CONTENT_LENGTH, content_length) + .send() + .await?; + + if !res.status().is_success() { + let status = res.status(); + let text = res.text().await; + tracing::error!(?status, ?text, "failed to upload logs"); + bail!("failed to upload logs"); + } + + op!([ctx] upload_complete { + upload_id: upload_res.upload_id, + bucket: Some("bucket-actor-log-export".into()), + }) + .await?; + + // Generate download URL (valid for 1 hour) + let s3_client = s3_util::Client::with_bucket_and_endpoint( + ctx.config(), + "bucket-actor-log-export", + s3_util::EndpointKind::External, + ) + .await?; + let presigned_req = s3_client + .get_object() + .bucket(s3_client.bucket()) + .key(filename) + .presigned( + s3_util::aws_sdk_s3::presigning::PresigningConfig::builder() + .expires_in(Duration::from_secs(60 * 60)) + .build()?, + ) + .await?; + + Ok(models::ActorsExportActorLogsResponse { + url: presigned_req.uri().to_string(), + }) +} diff --git a/packages/core/api/actor/src/route/mod.rs b/packages/core/api/actor/src/route/mod.rs index 50deb4e608..d794d6e83f 100644 --- a/packages/core/api/actor/src/route/mod.rs +++ b/packages/core/api/actor/src/route/mod.rs @@ -83,6 +83,30 @@ define_router! { ), }, + "actors" / "usage": { + GET: actors::usage( + query: actors::UsageQuery, + opt_auth: true, + rate_limit: { + buckets: [ + { count: 100, bucket: duration::minutes(1) }, + ], + }, + ), + }, + + "actors" / "query": { + GET: actors::query( + query: actors::QueryQuery, + opt_auth: true, + rate_limit: { + buckets: [ + { count: 100, bucket: duration::minutes(1) }, + ], + }, + ), + }, + "actors" / Uuid: { GET: actors::get( query: actors::GlobalEndpointTypeQuery, @@ -125,6 +149,18 @@ define_router! { ), }, + "actors" / "logs" / "export": { + POST: logs::export_logs( + body: models::ActorsLogsExportRequest, + opt_auth: true, + rate_limit: { + buckets: [ + { count: 10, bucket: duration::minutes(1) }, + ], + }, + ), + }, + "actors" / Uuid / "metrics" / "history": { GET: metrics::get_metrics( query: metrics::GetActorMetricsQuery, @@ -217,6 +253,18 @@ define_router! { ), }, + "routes" / "history": { + GET: routes::history( + query: routes::HistoryQuery, + opt_auth: true, + rate_limit: { + buckets: [ + { count: 100, bucket: duration::minutes(1) }, + ], + }, + ), + }, + "routes" / String: { PUT: routes::update( query: GlobalQuery, diff --git a/packages/core/api/actor/src/route/routes.rs b/packages/core/api/actor/src/route/routes.rs index cec21b7ee4..7f1dab21a2 100644 --- a/packages/core/api/actor/src/route/routes.rs +++ b/packages/core/api/actor/src/route/routes.rs @@ -4,6 +4,7 @@ use rivet_operation::prelude::*; use route::{ops::delete, ops::get, ops::list_for_env, ops::upsert}; use serde::Deserialize; use serde_json::json; +use std::collections::HashMap; use util::timestamp; use crate::auth::{Auth, CheckOpts, CheckOutput}; @@ -159,3 +160,83 @@ pub async fn delete( Ok(json!({})) } + +// MARK: GET /routes/history +#[derive(Debug, Clone, Deserialize)] +pub struct HistoryQuery { + #[serde(flatten)] + global: GlobalQuery, + start: i64, + end: i64, + interval: i64, + query_json: Option, + group_by: Option, // JSON-encoded KeyPath +} + +pub async fn history( + ctx: Ctx, + _watch_index: WatchIndexQuery, + query: HistoryQuery, +) -> GlobalResult { + let CheckOutput { .. } = ctx + .auth() + .check( + ctx.op_ctx(), + CheckOpts { + query: &query.global, + allow_service_token: true, + opt_auth: false, + }, + ) + .await?; + + // Get server namespace + let namespace = ctx.config().server()?.rivet.namespace.clone(); + + // Parse user query if provided + let user_query_expr = if let Some(query_json) = &query.query_json { + match serde_json::from_str::(&query_json) { + Ok(expr) => Some(expr), + Err(e) => { + bail_with!(API_BAD_QUERY, error = e.to_string()); + } + } + } else { + None + }; + + // Parse group by key path if provided + let group_by = if let Some(group_by_json) = &query.group_by { + match serde_json::from_str::(&group_by_json) { + Ok(key_path) => Some(key_path), + Err(e) => { + bail_with!(API_BAD_QUERY, error = format!("Invalid group_by: {}", e)); + } + } + } else { + None + }; + + // Call the guard operation to get history data + let history_res = ctx + .op(core_guard::ops::routes_history::Input { + namespace, + user_query_expr, + group_by, + start_ms: query.start, + end_ms: query.end, + interval_ms: query.interval, + }) + .await?; + + Ok(models::RoutesHistoryResponse { + metric_names: history_res.metric_names, + metric_attributes: history_res + .metric_attributes + .into_iter() + .map(|attrs| attrs.into_iter().collect::>()) + .collect(), + metric_types: history_res.metric_types, + metric_values: history_res.metric_values, + }) +} diff --git a/packages/core/services/guard/Cargo.toml b/packages/core/services/guard/Cargo.toml new file mode 100644 index 0000000000..eacf8f8081 --- /dev/null +++ b/packages/core/services/guard/Cargo.toml @@ -0,0 +1,16 @@ +[package] +name = "core-guard" +version = "0.1.0" +edition = "2021" + +[features] +default = ["ops"] +ops = [] + +[dependencies] +chirp-workflow = { path = "../../../common/chirp-workflow/core" } +clickhouse-user-query = { path = "../../../common/clickhouse-user-query" } +once_cell = "1.19" +indoc = "2.0" +rivet-operation = { path = "../../../common/operation/core" } +serde = { version = "1.0", features = ["derive"] } \ No newline at end of file diff --git a/packages/core/services/guard/src/lib.rs b/packages/core/services/guard/src/lib.rs new file mode 100644 index 0000000000..bc85fb8306 --- /dev/null +++ b/packages/core/services/guard/src/lib.rs @@ -0,0 +1,3 @@ +#[cfg(feature = "ops")] +pub mod ops; +pub mod schema; diff --git a/packages/core/services/guard/src/ops/mod.rs b/packages/core/services/guard/src/ops/mod.rs new file mode 100644 index 0000000000..d36c58a488 --- /dev/null +++ b/packages/core/services/guard/src/ops/mod.rs @@ -0,0 +1 @@ +pub mod routes_history; diff --git a/packages/core/services/guard/src/ops/routes_history.rs b/packages/core/services/guard/src/ops/routes_history.rs new file mode 100644 index 0000000000..00e8a4b654 --- /dev/null +++ b/packages/core/services/guard/src/ops/routes_history.rs @@ -0,0 +1,271 @@ +use chirp_workflow::prelude::*; +use clickhouse_user_query::{KeyPath, QueryExpr, UserDefinedQueryBuilder}; +use serde::Deserialize; +use std::collections::{BTreeMap, HashMap}; + +use crate::schema::HTTP_REQUESTS_SCHEMA; + +#[derive(Debug)] +pub struct Input { + pub namespace: String, + pub user_query_expr: Option, + pub group_by: Option, + pub start_ms: i64, + pub end_ms: i64, + pub interval_ms: i64, +} + +#[derive(Debug)] +pub struct Output { + pub metric_names: Vec, + pub metric_attributes: Vec>, + pub metric_types: Vec, + pub metric_values: Vec>, +} + +#[operation] +pub async fn guard_routes_history(ctx: &OperationCtx, input: &Input) -> GlobalResult { + let clickhouse = ctx.clickhouse().await?; + + // Validate group_by field if provided + let group_by_column = if let Some(key_path) = &input.group_by { + let property = HTTP_REQUESTS_SCHEMA + .get_property(&key_path.property) + .ok_or_else(|| { + err_code!( + REQUEST_QUERY_INVALID_GROUP_BY_FIELD, + field = &key_path.property + ) + })?; + + if !property.can_group_by { + return Err(err_code!( + REQUEST_QUERY_FIELD_NOT_GROUPABLE, + field = &key_path.property, + msg = "This field cannot be used in GROUP BY" + )); + } + + // Build the column reference + let column = if let Some(map_key) = &key_path.map_key { + // For map properties with key + if !property.is_map { + return Err(err_code!( + REQUEST_QUERY_FIELD_NOT_MAP, + field = &key_path.property, + msg = "Property is not a map, cannot use map key" + )); + } + format!("{}['{}']", key_path.property, map_key.replace("'", "\\'")) + } else { + // For simple properties + if property.is_map { + return Err(err_code!( + REQUEST_QUERY_MAP_REQUIRES_KEY, + field = &key_path.property, + msg = "Map property requires a map key for GROUP BY" + )); + } + key_path.property.clone() + }; + Some(column) + } else { + None + }; + + // Build user query filter if provided + let (user_query_where, user_query_builder) = if let Some(ref query_expr) = input.user_query_expr + { + let builder = UserDefinedQueryBuilder::new(&HTTP_REQUESTS_SCHEMA, query_expr) + .map_err(|e| GlobalError::raw(e))?; + let where_clause = format!("AND ({})", builder.where_expr()); + (where_clause, Some(builder)) + } else { + (String::new(), None) + }; + + // Build GROUP BY clause + let group_by_clause = if let Some(column) = &group_by_column { + format!(", {}", column) + } else { + String::new() + }; + + // Build SELECT clause for grouped fields + let select_grouped_fields = if let Some(column) = &group_by_column { + format!(", {} as group_value", column) + } else { + String::new() + }; + + // Build the query for time series data + // Convert interval from milliseconds to seconds for ClickHouse INTERVAL + let interval_seconds = input.interval_ms / 1000; + let query = indoc::formatdoc!( + " + SELECT + toUnixTimestamp64Milli(toStartOfInterval(guard_start_timestamp, INTERVAL ? SECOND)) as time_bucket, + count() as request_count, + avg(service_response_duration_ms) as avg_response_time_ms, + sum(guard_response_body_bytes) as total_response_bytes, + countIf(guard_response_status >= 500) as error_5xx_count, + countIf(guard_response_status >= 400 AND guard_response_status < 500) as error_4xx_count + {select_grouped_fields} + FROM + db_guard_analytics.http_requests + WHERE + namespace = ? + AND guard_start_timestamp >= fromUnixTimestamp64Milli(?) + AND guard_start_timestamp < fromUnixTimestamp64Milli(?) + {user_query_where} + GROUP BY time_bucket{group_by_clause} + ORDER BY time_bucket ASC + " + ); + + // Build and execute query + let mut query_builder = clickhouse + .query(&query) + .bind(interval_seconds) + .bind(&input.namespace) + .bind(input.start_ms) + .bind(input.end_ms); + + // Bind user query parameters if present + if let Some(builder) = user_query_builder { + query_builder = builder.bind_to(query_builder); + } + + // Execute the query + let rows = query_builder + .fetch_all::() + .await + .map_err(|err| GlobalError::from(err))?; + + // Transform results into time series format + let mut time_buckets = Vec::new(); + let mut grouped_metrics: HashMap, TimeSeriesMetrics> = HashMap::new(); + + for row in rows { + // Create attributes from grouped field + let mut attributes = BTreeMap::new(); + if let Some(key_path) = &input.group_by { + // Use the full key path as the key in the result + let key = if let Some(map_key) = &key_path.map_key { + format!("{}.{}", key_path.property, map_key) + } else { + key_path.property.clone() + }; + + // The group_value field contains the actual value + if let Some(value) = &row.group_value { + attributes.insert(key, value.clone()); + } + } + + // Store time bucket + if !time_buckets.contains(&row.time_bucket) { + time_buckets.push(row.time_bucket); + } + + // Store metrics + let metrics = grouped_metrics + .entry(attributes) + .or_insert_with(|| TimeSeriesMetrics::new(time_buckets.len())); + + let bucket_index = time_buckets + .iter() + .position(|&t| t == row.time_bucket) + .unwrap(); + metrics.ensure_capacity(bucket_index + 1); + + metrics.request_count[bucket_index] = row.request_count as f64; + metrics.avg_response_time_ms[bucket_index] = row.avg_response_time_ms; + metrics.total_response_bytes[bucket_index] = row.total_response_bytes as f64; + metrics.error_5xx_count[bucket_index] = row.error_5xx_count as f64; + metrics.error_4xx_count[bucket_index] = row.error_4xx_count as f64; + } + + // Build output + let metric_names = vec![ + "request_count".to_string(), + "avg_response_time_ms".to_string(), + "total_response_bytes".to_string(), + "error_5xx_count".to_string(), + "error_4xx_count".to_string(), + ]; + + let mut metric_attributes = Vec::new(); + let mut metric_types = Vec::new(); + let mut metric_values = Vec::new(); + + // Add metrics for each group + for (attributes, metrics) in grouped_metrics { + // Add each metric type + for metric_name in &metric_names { + metric_attributes.push(attributes.clone()); + metric_types.push(metric_name.clone()); + + let values = match metric_name.as_str() { + "request_count" => metrics.request_count.clone(), + "avg_response_time_ms" => metrics.avg_response_time_ms.clone(), + "total_response_bytes" => metrics.total_response_bytes.clone(), + "error_5xx_count" => metrics.error_5xx_count.clone(), + "error_4xx_count" => metrics.error_4xx_count.clone(), + _ => unreachable!(), + }; + + metric_values.push(values); + } + } + + Ok(Output { + metric_names, + metric_attributes, + metric_types, + metric_values, + }) +} + +#[derive(Debug, clickhouse::Row, Deserialize)] +struct TimeSeriesRow { + time_bucket: i64, + request_count: i64, + avg_response_time_ms: f64, + total_response_bytes: i64, + error_5xx_count: i64, + error_4xx_count: i64, + #[serde(skip_serializing_if = "Option::is_none")] + group_value: Option, +} + +#[derive(Debug)] +struct TimeSeriesMetrics { + request_count: Vec, + avg_response_time_ms: Vec, + total_response_bytes: Vec, + error_5xx_count: Vec, + error_4xx_count: Vec, +} + +impl TimeSeriesMetrics { + fn new(initial_capacity: usize) -> Self { + Self { + request_count: vec![0.0; initial_capacity], + avg_response_time_ms: vec![0.0; initial_capacity], + total_response_bytes: vec![0.0; initial_capacity], + error_5xx_count: vec![0.0; initial_capacity], + error_4xx_count: vec![0.0; initial_capacity], + } + } + + fn ensure_capacity(&mut self, size: usize) { + if self.request_count.len() < size { + self.request_count.resize(size, 0.0); + self.avg_response_time_ms.resize(size, 0.0); + self.total_response_bytes.resize(size, 0.0); + self.error_5xx_count.resize(size, 0.0); + self.error_4xx_count.resize(size, 0.0); + } + } +} diff --git a/packages/core/services/guard/src/schema.rs b/packages/core/services/guard/src/schema.rs new file mode 100644 index 0000000000..dcde6043a5 --- /dev/null +++ b/packages/core/services/guard/src/schema.rs @@ -0,0 +1,135 @@ +use clickhouse_user_query::{Property, PropertyType, Schema}; +use once_cell::sync::Lazy; + +/// Schema for the http_requests analytics table +/// +/// Excludes namespace as it's automatically provided by the system +pub static HTTP_REQUESTS_SCHEMA: Lazy = Lazy::new(|| { + Schema::new(vec![ + Property::new("request_id".to_string(), false, PropertyType::String).unwrap(), + Property::new("client_ip".to_string(), false, PropertyType::String).unwrap(), + Property::new( + "client_request_body_bytes".to_string(), + false, + PropertyType::Number, + ) + .unwrap(), + Property::new( + "client_request_host".to_string(), + false, + PropertyType::String, + ) + .unwrap() + .with_group_by(true), + Property::new( + "client_request_method".to_string(), + false, + PropertyType::String, + ) + .unwrap() + .with_group_by(true), + Property::new( + "client_request_path".to_string(), + false, + PropertyType::String, + ) + .unwrap() + .with_group_by(true), + Property::new( + "client_request_protocol".to_string(), + false, + PropertyType::String, + ) + .unwrap(), + Property::new( + "client_request_referer".to_string(), + false, + PropertyType::String, + ) + .unwrap(), + Property::new( + "client_request_scheme".to_string(), + false, + PropertyType::String, + ) + .unwrap(), + Property::new( + "client_request_uri".to_string(), + false, + PropertyType::String, + ) + .unwrap(), + Property::new( + "client_request_user_agent".to_string(), + false, + PropertyType::String, + ) + .unwrap(), + Property::new("client_src_port".to_string(), false, PropertyType::Number).unwrap(), + Property::new( + "client_x_requested_with".to_string(), + false, + PropertyType::String, + ) + .unwrap(), + Property::new( + "guard_datacenter_id".to_string(), + false, + PropertyType::String, + ) + .unwrap() + .with_group_by(true), + Property::new("guard_cluster_id".to_string(), false, PropertyType::String).unwrap(), + Property::new("guard_server_id".to_string(), false, PropertyType::String).unwrap(), + Property::new( + "guard_response_body_bytes".to_string(), + false, + PropertyType::Number, + ) + .unwrap(), + Property::new( + "guard_response_content_type".to_string(), + false, + PropertyType::String, + ) + .unwrap(), + Property::new( + "guard_response_status".to_string(), + false, + PropertyType::Number, + ) + .unwrap() + .with_group_by(true), + Property::new("service_ip".to_string(), false, PropertyType::String).unwrap(), + Property::new( + "service_response_duration_ms".to_string(), + false, + PropertyType::Number, + ) + .unwrap(), + Property::new( + "service_response_http_expires".to_string(), + false, + PropertyType::String, + ) + .unwrap(), + Property::new( + "service_response_http_last_modified".to_string(), + false, + PropertyType::String, + ) + .unwrap(), + Property::new( + "service_response_status".to_string(), + false, + PropertyType::Number, + ) + .unwrap() + .with_group_by(true), + Property::new("service_actor_id".to_string(), false, PropertyType::String) + .unwrap() + .with_group_by(true), + Property::new("service_server_id".to_string(), false, PropertyType::String).unwrap(), + ]) + .unwrap() +}); diff --git a/packages/edge/infra/guard/core/Cargo.toml b/packages/edge/infra/guard/core/Cargo.toml index e45928d718..3b4b2ad18d 100644 --- a/packages/edge/infra/guard/core/Cargo.toml +++ b/packages/edge/infra/guard/core/Cargo.toml @@ -5,6 +5,9 @@ edition.workspace = true authors.workspace = true license.workspace = true +[features] +ops = ["dep:chirp-workflow", "dep:clickhouse-user-query", "dep:once_cell"] + [dependencies] global-error.workspace = true bytes = "1.6.0" @@ -36,6 +39,11 @@ hyper-tungstenite = "0.17.0" tokio-tungstenite = "0.26.1" clickhouse-inserter.workspace = true +# Optional dependencies for ops feature +chirp-workflow = { workspace = true, optional = true } +clickhouse-user-query = { workspace = true, optional = true } +once_cell = { version = "1.20.2", optional = true } + [dev-dependencies] futures-util = "0.3.30" futures = "0.3.30" diff --git a/packages/edge/services/pegboard/Cargo.toml b/packages/edge/services/pegboard/Cargo.toml index 2e9036ef87..53272b5251 100644 --- a/packages/edge/services/pegboard/Cargo.toml +++ b/packages/edge/services/pegboard/Cargo.toml @@ -14,11 +14,13 @@ chirp = ["chirp-workflow", "sqlx", "nix", "server-spec"] [dependencies] anyhow = "1.0" chirp-workflow = { workspace = true, optional = true } +clickhouse-user-query.workspace = true fdb-util = { workspace = true, optional = true } foundationdb = { workspace = true, optional = true } heck = "0.3" lazy_static = "1.4" nix = { workspace = true, optional = true } +once_cell = "1.20.2" rand = "0.8" regex = "1.10.3" reqwest = { version = "0.12", features = ["json"] } diff --git a/packages/edge/services/pegboard/src/lib.rs b/packages/edge/services/pegboard/src/lib.rs index 0a0dd937ba..a94c96c30e 100644 --- a/packages/edge/services/pegboard/src/lib.rs +++ b/packages/edge/services/pegboard/src/lib.rs @@ -7,6 +7,7 @@ pub mod metrics; #[cfg(feature = "ops")] pub mod ops; pub mod protocol; +pub mod schema; pub mod system_info; pub mod types; pub mod util; diff --git a/packages/edge/services/pegboard/src/ops/actor/log/mod.rs b/packages/edge/services/pegboard/src/ops/actor/log/mod.rs index 2cab8848e7..642bb1c33c 100644 --- a/packages/edge/services/pegboard/src/ops/actor/log/mod.rs +++ b/packages/edge/services/pegboard/src/ops/actor/log/mod.rs @@ -1 +1,2 @@ pub mod read; +pub mod read_with_query; diff --git a/packages/edge/services/pegboard/src/ops/actor/log/read_with_query.rs b/packages/edge/services/pegboard/src/ops/actor/log/read_with_query.rs new file mode 100644 index 0000000000..0f4fb7a85d --- /dev/null +++ b/packages/edge/services/pegboard/src/ops/actor/log/read_with_query.rs @@ -0,0 +1,171 @@ +use chirp_workflow::prelude::*; +use clickhouse_user_query::{QueryExpr, UserDefinedQueryBuilder}; + +use crate::schema::ACTOR_LOGS_SCHEMA; +use crate::types::LogsStreamType; + +#[derive(Debug)] +pub struct Input { + pub env_id: Uuid, + pub actor_ids: Vec, + pub stream_types: Vec, + pub count: i64, + pub order_by: Order, + pub query: Query, + /// User-defined query expression for additional filtering + pub user_query_expr: Option, +} + +#[derive(Debug, Clone, Copy)] +pub enum Query { + All, + BeforeNts(i64), + AfterNts(i64), + Range(i64, i64), +} + +#[derive(Debug, Clone, Copy)] +pub enum Order { + Asc, + Desc, +} + +#[derive(Debug)] +pub struct Output { + pub entries: Vec, +} + +#[derive(Debug, clickhouse::Row, serde::Deserialize)] +pub struct LogEntryRow { + /// In nanoseconds. + pub ts: i64, + pub message: Vec, + pub stream_type: u8, + pub actor_id_str: String, +} + +#[derive(Debug)] +pub struct LogEntry { + /// In nanoseconds. + pub ts: i64, + pub message: Vec, + pub stream_type: u8, + pub actor_id: Uuid, +} + +#[operation] +pub async fn pegboard_actor_log_read_with_query( + ctx: &OperationCtx, + input: &Input, +) -> GlobalResult { + let clickhouse = ctx.clickhouse().await?; + + // Convert stream types to a vector of u8 + let stream_type_values: Vec = input.stream_types.iter().map(|&st| st as u8).collect(); + + // Extract values from query enum + let (is_all, is_before, is_after, before_nts, after_nts) = match input.query { + Query::All => (true, false, false, None, None), + Query::BeforeNts(nts) => (false, true, false, Some(nts), None), + Query::AfterNts(nts) => (false, false, true, None, Some(nts)), + Query::Range(after, before) => (false, true, true, Some(before), Some(after)), + }; + + // Direction for ordering + let order_direction = match input.order_by { + Order::Asc => "ASC", + Order::Desc => "DESC", + }; + + // Build user query filter if provided + let (user_query_where, user_query_builder) = if let Some(ref query_expr) = input.user_query_expr + { + let builder = UserDefinedQueryBuilder::new(&ACTOR_LOGS_SCHEMA, query_expr) + .map_err(|e| GlobalError::raw(e))?; + let where_clause = format!("AND ({})", builder.where_expr()); + (where_clause, Some(builder)) + } else { + (String::new(), None) + }; + + // Convert actor IDs to strings for the query + let actor_id_strings: Vec = input.actor_ids.iter().map(|id| id.to_string()).collect(); + + // Build the query + let query = formatdoc!( + " + SELECT + ts, + message, + stream_type, + actor_id as actor_id_str + FROM + db_pegboard_actor_log.actor_logs3_with_metadata + WHERE + namespace = ? + AND env_id = ? + AND actor_id IN ? + AND stream_type IN ? + -- Apply timestamp filtering based on query type + AND ( + ? -- is_all + OR (? AND ts < fromUnixTimestamp64Nano(?)) -- is_before + OR (? AND ts > fromUnixTimestamp64Nano(?)) -- is_after + OR (? AND ? AND + ts > fromUnixTimestamp64Nano(?) AND + ts < fromUnixTimestamp64Nano(?)) -- is_range + ) + {user_query_where} + -- Use dynamic direction directly in the ORDER BY clause + ORDER BY ts {order_direction} + LIMIT + ? + " + ); + + // Build query with all parameters and safety restrictions + let mut query_builder = clickhouse + .query(&query) + .bind(&ctx.config().server()?.rivet.namespace) + .bind(input.env_id) + .bind(&actor_id_strings) + .bind(stream_type_values) + // Query type parameters + .bind(is_all) + .bind(is_before) + .bind(before_nts.unwrap_or(0)) + .bind(is_after) + .bind(after_nts.unwrap_or(0)) + .bind(is_before) // First part of AND condition for range + .bind(is_after) // Second part of AND condition for range + .bind(after_nts.unwrap_or(0)) + .bind(before_nts.unwrap_or(0)); + + // Bind user query parameters if present + if let Some(builder) = user_query_builder { + query_builder = builder.bind_to(query_builder); + } + + // Add limit + query_builder = query_builder.bind(input.count); + + let entries = query_builder + .fetch_all::() + .await + .map_err(|err| GlobalError::from(err))? + .into_iter() + .map(|x| { + Ok(LogEntry { + ts: x.ts, + message: x.message, + stream_type: x.stream_type, + actor_id: unwrap!( + Uuid::parse_str(&x.actor_id_str).ok(), + "invalid actor log entry uuid" + ), + }) + }) + .collect::>>()?; + + Ok(Output { entries }) +} diff --git a/packages/edge/services/pegboard/src/ops/actor/mod.rs b/packages/edge/services/pegboard/src/ops/actor/mod.rs index de065b4ba9..fe28e55f09 100644 --- a/packages/edge/services/pegboard/src/ops/actor/mod.rs +++ b/packages/edge/services/pegboard/src/ops/actor/mod.rs @@ -2,3 +2,5 @@ pub mod allocate_ingress_ports; pub mod get; pub mod list_for_env; pub mod log; +pub mod query; +pub mod usage; diff --git a/packages/edge/services/pegboard/src/ops/actor/query.rs b/packages/edge/services/pegboard/src/ops/actor/query.rs new file mode 100644 index 0000000000..b6fada684f --- /dev/null +++ b/packages/edge/services/pegboard/src/ops/actor/query.rs @@ -0,0 +1,251 @@ +use chirp_workflow::prelude::*; +use clickhouse_user_query::{KeyPath, QueryExpr, UserDefinedQueryBuilder}; +use std::collections::HashMap; + +use crate::schema::ACTOR_SCHEMA; + +#[derive(Debug)] +pub struct Input { + pub env_id: Uuid, + pub user_query_expr: QueryExpr, + pub cursor: Option, + pub limit: u32, +} + +#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] +pub struct QueryCursor { + pub created_at: i64, + pub actor_id: Uuid, +} + +#[derive(Debug)] +pub struct Output { + pub actors: Vec, + pub cursor: Option, +} + +#[derive(Debug)] +pub struct ActorQueryResult { + pub actor_id: Uuid, + pub datacenter_id: Uuid, + pub tags: HashMap, + pub build_id: Uuid, + pub build_kind: u8, + pub build_compression: u8, + pub network_mode: u8, + pub network_ports: HashMap, + pub network_ports_ingress: HashMap, + pub network_ports_host: HashMap, + pub network_ports_proxied: HashMap, + pub selected_cpu_millicores: u32, + pub selected_memory_mib: u32, + pub durable: bool, + pub kill_timeout: i64, + pub created_at: i64, + pub started_at: Option, + pub connectable_at: Option, + pub finished_at: Option, + pub destroyed_at: Option, +} + +#[operation] +pub async fn pegboard_actor_query(ctx: &OperationCtx, input: &Input) -> GlobalResult { + let clickhouse = ctx.clickhouse().await?; + + // Build user query filter + let builder = UserDefinedQueryBuilder::new(&ACTOR_SCHEMA, &input.user_query_expr) + .map_err(|e| GlobalError::raw(e))?; + let user_query_where = format!("AND ({})", builder.where_expr()); + + // Build cursor condition if provided + let cursor_condition = if let Some(cursor) = &input.cursor { + format!( + "AND (created_at < fromUnixTimestamp64Nano({}) OR (created_at = fromUnixTimestamp64Nano({}) AND actor_id < '{}'))", + cursor.created_at, + cursor.created_at, + cursor.actor_id + ) + } else { + String::new() + }; + + // Build the query - ORDER BY is fixed to (created_at DESC, actor_id DESC) + let query = formatdoc!( + " + SELECT + actor_id, + project_id, + datacenter_id, + tags, + build_id, + build_kind, + build_compression, + network_mode, + network_ports, + network_ports_ingress, + network_ports_host, + network_ports_proxied, + client_id, + client_wan_hostname, + selected_cpu_millicores, + selected_memory_mib, + root_user_enabled, + env_vars, + env_var_bytes, + args, + args_bytes, + durable, + kill_timeout, + cpu_millicores, + memory_mib, + created_at, + started_at, + connectable_at, + finished_at, + destroyed_at + FROM + db_pegboard_analytics.actors + WHERE + namespace = ? + AND env_id = ? + {cursor_condition} + {user_query_where} + ORDER BY created_at DESC, actor_id DESC + LIMIT ? + " + ); + + // Build and execute query + let mut query_builder = clickhouse + .query(&query) + .bind(&ctx.config().server()?.rivet.namespace) + .bind(input.env_id) + .bind(input.limit); + + // Bind user query parameters + query_builder = builder.bind_to(query_builder); + + let rows = query_builder + .fetch_all::() + .await + .map_err(|err| GlobalError::from(err))?; + + // Convert rows to ActorQueryResult structs + let actors = rows + .into_iter() + .map(|row| row.into_actor()) + .collect::>>()?; + + // Build cursor from last actor if we have results + let cursor = actors.last().map(|actor| QueryCursor { + created_at: actor.created_at, + actor_id: actor.actor_id, + }); + + Ok(Output { actors, cursor }) +} + +#[derive(Debug, clickhouse::Row, serde::Deserialize)] +struct ActorRow { + actor_id: String, + project_id: uuid::Uuid, + datacenter_id: uuid::Uuid, + tags: std::collections::HashMap, + build_id: uuid::Uuid, + build_kind: u8, + build_compression: u8, + network_mode: u8, + network_ports: std::collections::HashMap, + network_ports_ingress: std::collections::HashMap, + network_ports_host: std::collections::HashMap, + network_ports_proxied: std::collections::HashMap, + client_id: uuid::Uuid, + client_wan_hostname: String, + selected_cpu_millicores: u32, + selected_memory_mib: u32, + root_user_enabled: bool, + env_vars: i64, + env_var_bytes: i64, + args: i64, + args_bytes: i64, + durable: bool, + kill_timeout: i64, + cpu_millicores: u32, + memory_mib: u32, + created_at: i64, + started_at: i64, + connectable_at: i64, + finished_at: i64, + destroyed_at: i64, +} + +#[derive(Debug, clickhouse::Row, serde::Deserialize)] +pub struct NetworkPort { + pub internal_port: u16, + pub routing_guard: bool, + pub routing_host: bool, + pub routing_guard_protocol: u8, + pub routing_host_protocol: u8, +} + +#[derive(Debug, clickhouse::Row, serde::Deserialize)] +struct NetworkPortIngress { + port_number: u16, + ingress_port_number: u16, + protocol: u8, +} + +#[derive(Debug, clickhouse::Row, serde::Deserialize)] +struct NetworkPortHost { + port_number: u16, + protocol: u8, +} + +#[derive(Debug, clickhouse::Row, serde::Deserialize)] +struct NetworkPortProxied { + ip: String, + source: u8, +} + +impl ActorRow { + fn into_actor(self) -> GlobalResult { + Ok(ActorQueryResult { + actor_id: unwrap!(Uuid::parse_str(&self.actor_id).ok(), "invalid actor uuid"), + datacenter_id: self.datacenter_id, + tags: self.tags, + build_id: self.build_id, + build_kind: self.build_kind, + build_compression: self.build_compression, + network_mode: self.network_mode, + network_ports: self.network_ports, + network_ports_ingress: self.network_ports_ingress, + network_ports_host: self.network_ports_host, + network_ports_proxied: self.network_ports_proxied, + selected_cpu_millicores: self.selected_cpu_millicores, + selected_memory_mib: self.selected_memory_mib, + durable: self.durable, + kill_timeout: self.kill_timeout, + created_at: self.created_at, + started_at: if self.started_at > 0 { + Some(self.started_at) + } else { + None + }, + connectable_at: if self.connectable_at > 0 { + Some(self.connectable_at) + } else { + None + }, + finished_at: if self.finished_at > 0 { + Some(self.finished_at) + } else { + None + }, + destroyed_at: if self.destroyed_at > 0 { + Some(self.destroyed_at) + } else { + None + }, + }) + } +} diff --git a/packages/edge/services/pegboard/src/ops/actor/usage/get.rs b/packages/edge/services/pegboard/src/ops/actor/usage/get.rs new file mode 100644 index 0000000000..474cec5cce --- /dev/null +++ b/packages/edge/services/pegboard/src/ops/actor/usage/get.rs @@ -0,0 +1,266 @@ +use chirp_workflow::prelude::*; +use clickhouse_user_query::{KeyPath, QueryExpr, UserDefinedQueryBuilder}; +use serde::Deserialize; +use std::collections::{BTreeMap, HashMap}; + +use crate::schema::ACTOR_SCHEMA; + +#[derive(Debug)] +pub struct Input { + pub env_id: Uuid, + pub start_ms: i64, + pub end_ms: i64, + pub interval_ms: i64, + pub group_by: Option, + pub user_query_expr: Option, +} + +#[derive(Debug)] +pub struct Output { + pub metric_names: Vec, + pub metric_attributes: Vec>, + pub metric_types: Vec, + pub metric_values: Vec>, +} + +#[operation] +pub async fn pegboard_actor_usage_get(ctx: &OperationCtx, input: &Input) -> GlobalResult { + let server = ctx.config().server()?; + let client = ctx.clickhouse().await?; + + // Validate group_by field if provided + let group_by_column = if let Some(key_path) = &input.group_by { + let property = ACTOR_SCHEMA + .get_property(&key_path.property) + .ok_or_else(|| { + err_code!( + REQUEST_QUERY_INVALID_GROUP_BY_FIELD, + field = &key_path.property + ) + })?; + + if !property.can_group_by { + return Err(err_code!( + REQUEST_QUERY_FIELD_NOT_GROUPABLE, + field = &key_path.property, + msg = "This field cannot be used in GROUP BY" + )); + } + + // Build the column reference + let column = if let Some(map_key) = &key_path.map_key { + // For map properties with key + if !property.is_map { + return Err(err_code!( + REQUEST_QUERY_FIELD_NOT_MAP, + field = &key_path.property, + msg = "Property is not a map, cannot use map key" + )); + } + format!("{}['{}']", key_path.property, map_key.replace("'", "\\'")) + } else { + // For simple properties + if property.is_map { + return Err(err_code!( + REQUEST_QUERY_MAP_REQUIRES_KEY, + field = &key_path.property, + msg = "Map property requires a map key for GROUP BY" + )); + } + key_path.property.clone() + }; + Some(column) + } else { + None + }; + + // Build user query filter if provided + let (user_query_where, user_query_builder) = if let Some(ref query_expr) = input.user_query_expr + { + let builder = UserDefinedQueryBuilder::new(&ACTOR_SCHEMA, query_expr) + .map_err(|e| GlobalError::raw(e))?; + let where_clause = format!("AND ({})", builder.where_expr()); + (where_clause, Some(builder)) + } else { + (String::new(), None) + }; + + // Build GROUP BY clause + let group_by_clause = if let Some(column) = &group_by_column { + format!(", {}", column) + } else { + String::new() + }; + + // Build SELECT clause for grouped fields + let select_grouped_fields = if let Some(column) = &group_by_column { + format!(", {} as group_value", column) + } else { + String::new() + }; + + // Build the query for time series data + // Convert interval from milliseconds to seconds for ClickHouse INTERVAL + let interval_seconds = input.interval_ms / 1000; + let query = formatdoc!( + " + SELECT + toUnixTimestamp64Milli(toStartOfInterval(started_at, INTERVAL ? SECOND)) as time_bucket, + count() as actor_count, + sum(multiIf(finished_at > 0, finished_at - started_at, now64(9) - started_at)) / 1000000000.0 as total_runtime_seconds, + sum(multiIf(finished_at > 0, (finished_at - started_at) * selected_cpu_millicores, (now64(9) - started_at) * selected_cpu_millicores)) / 1000000000000.0 as total_cpu_core_seconds, + sum(multiIf(finished_at > 0, (finished_at - started_at) * selected_memory_mib, (now64(9) - started_at) * selected_memory_mib)) / 1073741824000000000.0 as total_memory_gib_seconds + {select_grouped_fields} + FROM + db_pegboard_analytics.actors + WHERE + namespace = ? + AND env_id = ? + AND started_at >= fromUnixTimestamp64Nano(? * 1000000) + AND started_at < fromUnixTimestamp64Nano(? * 1000000) + {user_query_where} + GROUP BY time_bucket{group_by_clause} + ORDER BY time_bucket ASC + " + ); + + // Build and execute query + let mut query_builder = client + .query(&query) + .bind(interval_seconds) + .bind(&server.rivet.namespace) + .bind(input.env_id) + .bind(input.start_ms) + .bind(input.end_ms); + + // Bind user query parameters if present + if let Some(builder) = user_query_builder { + query_builder = builder.bind_to(query_builder); + } + + // Execute the query + let rows = query_builder + .fetch_all::() + .await + .map_err(|err| GlobalError::from(err))?; + + // Transform results into time series format + let mut time_buckets = Vec::new(); + let mut grouped_metrics: HashMap, TimeSeriesMetrics> = HashMap::new(); + + for row in rows { + // Create attributes from grouped field + let mut attributes = BTreeMap::new(); + if let Some(key_path) = &input.group_by { + // Use the full key path as the key in the result + let key = if let Some(map_key) = &key_path.map_key { + format!("{}.{}", key_path.property, map_key) + } else { + key_path.property.clone() + }; + + // The group_value field contains the actual value + if let Some(value) = &row.group_value { + attributes.insert(key, value.clone()); + } + } + + // Store time bucket + if !time_buckets.contains(&row.time_bucket) { + time_buckets.push(row.time_bucket); + } + + // Store metrics + let metrics = grouped_metrics + .entry(attributes) + .or_insert_with(|| TimeSeriesMetrics::new(time_buckets.len())); + + let bucket_index = time_buckets + .iter() + .position(|&t| t == row.time_bucket) + .unwrap(); + metrics.ensure_capacity(bucket_index + 1); + + metrics.actor_count[bucket_index] = row.actor_count as f64; + metrics.total_runtime_seconds[bucket_index] = row.total_runtime_seconds; + metrics.total_cpu_core_seconds[bucket_index] = row.total_cpu_core_seconds; + metrics.total_memory_gib_seconds[bucket_index] = row.total_memory_gib_seconds; + } + + // Build output + let metric_names = vec![ + "actor_count".to_string(), + "total_runtime_seconds".to_string(), + "total_cpu_core_seconds".to_string(), + "total_memory_gib_seconds".to_string(), + ]; + + let mut metric_attributes = Vec::new(); + let mut metric_types = Vec::new(); + let mut metric_values = Vec::new(); + + // Add metrics for each group + for (attributes, metrics) in grouped_metrics { + // Add each metric type + for metric_name in &metric_names { + metric_attributes.push(attributes.clone()); + metric_types.push(metric_name.clone()); + + let values = match metric_name.as_str() { + "actor_count" => metrics.actor_count.clone(), + "total_runtime_seconds" => metrics.total_runtime_seconds.clone(), + "total_cpu_core_seconds" => metrics.total_cpu_core_seconds.clone(), + "total_memory_gib_seconds" => metrics.total_memory_gib_seconds.clone(), + _ => unreachable!(), + }; + + metric_values.push(values); + } + } + + Ok(Output { + metric_names, + metric_attributes, + metric_types, + metric_values, + }) +} + +#[derive(Debug, clickhouse::Row, Deserialize)] +struct TimeSeriesRow { + time_bucket: i64, + actor_count: i64, + total_runtime_seconds: f64, + total_cpu_core_seconds: f64, + total_memory_gib_seconds: f64, + #[serde(skip_serializing_if = "Option::is_none")] + group_value: Option, +} + +#[derive(Debug)] +struct TimeSeriesMetrics { + actor_count: Vec, + total_runtime_seconds: Vec, + total_cpu_core_seconds: Vec, + total_memory_gib_seconds: Vec, +} + +impl TimeSeriesMetrics { + fn new(initial_capacity: usize) -> Self { + Self { + actor_count: vec![0.0; initial_capacity], + total_runtime_seconds: vec![0.0; initial_capacity], + total_cpu_core_seconds: vec![0.0; initial_capacity], + total_memory_gib_seconds: vec![0.0; initial_capacity], + } + } + + fn ensure_capacity(&mut self, size: usize) { + if self.actor_count.len() < size { + self.actor_count.resize(size, 0.0); + self.total_runtime_seconds.resize(size, 0.0); + self.total_cpu_core_seconds.resize(size, 0.0); + self.total_memory_gib_seconds.resize(size, 0.0); + } + } +} diff --git a/packages/edge/services/pegboard/src/ops/actor/usage/get_aggregated.rs b/packages/edge/services/pegboard/src/ops/actor/usage/get_aggregated.rs new file mode 100644 index 0000000000..750ccde2c1 --- /dev/null +++ b/packages/edge/services/pegboard/src/ops/actor/usage/get_aggregated.rs @@ -0,0 +1,209 @@ +use chirp_workflow::prelude::*; +use clickhouse_user_query::{KeyPath, QueryExpr, UserDefinedQueryBuilder}; +use serde::{Deserialize, Serialize}; +use std::collections::HashMap; +use uuid::Uuid; + +use crate::schema::ACTOR_SCHEMA; + +#[derive(Debug)] +pub struct Input { + pub env_id: Uuid, + pub start_ms: i64, + pub end_ms: i64, + pub group_by: Option, + pub user_query_expr: Option, +} + +#[derive(Debug)] +pub struct Output { + pub usage: Vec, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct UsageMetrics { + pub group: Option>, + pub total_runtime_seconds: f64, + pub total_cpu_core_seconds: f64, + pub total_memory_gib_seconds: f64, +} + +#[operation] +pub async fn pegboard_actor_usage_get_aggregated( + ctx: &OperationCtx, + input: &Input, +) -> GlobalResult { + let server = ctx.config().server()?; + let client = ctx.clickhouse().await?; + + // Build the base query + let mut select_columns = vec![]; + let group_by_column: Option; + + // Add group by column if requested + if let Some(key_path) = &input.group_by { + // Validate the column can be grouped by + let prop = ACTOR_SCHEMA + .get_property(&key_path.property) + .ok_or_else(|| { + err_code!( + REQUEST_QUERY_INVALID_GROUP_BY_FIELD, + field = &key_path.property + ) + })?; + + if !prop.can_group_by { + return Err(err_code!( + REQUEST_QUERY_FIELD_NOT_GROUPABLE, + field = &key_path.property, + msg = "This field cannot be used in GROUP BY" + )); + } + + // Build the column reference + let column = if let Some(map_key) = &key_path.map_key { + // For map properties with key + if !prop.is_map { + return Err(err_code!( + REQUEST_QUERY_FIELD_NOT_MAP, + field = &key_path.property, + msg = "Property is not a map, cannot use map key" + )); + } + format!("{}['{}']", key_path.property, map_key.replace("'", "\\'")) + } else { + // For simple properties + if prop.is_map { + return Err(err_code!( + REQUEST_QUERY_MAP_REQUIRES_KEY, + field = &key_path.property, + msg = "Map property requires a map key for GROUP BY" + )); + } + key_path.property.clone() + }; + + select_columns.push(format!("{} as group_value", column)); + group_by_column = Some(column); + } else { + group_by_column = None; + } + + // Add aggregation columns + select_columns.push("sum(multiIf(finished_at > 0, finished_at - started_at, now64(9) - started_at)) / 1000000000.0 as total_runtime_seconds".to_string()); + select_columns.push("sum(multiIf(finished_at > 0, (finished_at - started_at) * selected_cpu_millicores, (now64(9) - started_at) * selected_cpu_millicores)) / 1000000000000.0 as total_cpu_core_seconds".to_string()); + select_columns.push("sum(multiIf(finished_at > 0, (finished_at - started_at) * selected_memory_mib, (now64(9) - started_at) * selected_memory_mib)) / 1073741824000000000.0 as total_memory_gib_seconds".to_string()); + + let select_clause = select_columns.join(", "); + let group_by_clause = if let Some(column) = &group_by_column { + format!(" GROUP BY {}", column) + } else { + "".to_string() + }; + + // Base query filters + let mut where_conditions = vec![ + "namespace = ?".to_string(), + "env_id = ?".to_string(), + "started_at >= ?".to_string(), + "started_at <= ?".to_string(), + ]; + + // Add user query filter if provided + let user_query_builder = if let Some(ref query_expr) = input.user_query_expr { + let builder = UserDefinedQueryBuilder::new(&ACTOR_SCHEMA, query_expr) + .map_err(Into::::into)?; + where_conditions.push(format!("({})", builder.where_expr())); + Some(builder) + } else { + None + }; + + let where_clause = where_conditions.join(" AND "); + + let query_str = format!( + "SELECT {} FROM actors WHERE {}{} SETTINGS date_time_output_format = 'iso'", + select_clause, where_clause, group_by_clause + ); + + let mut query = client + .query(&query_str) + .bind(&server.rivet.namespace) + .bind(input.env_id) + .bind(input.start_ms * 1_000_000) // Convert milliseconds to nanoseconds + .bind(input.end_ms * 1_000_000); // Convert milliseconds to nanoseconds + + // Bind user query parameters if present + if let Some(builder) = user_query_builder { + query = builder.bind_to(query); + } + + // Define row structure based on whether we have group by + if input.group_by.is_some() { + #[derive(Debug, clickhouse::Row, Deserialize)] + struct UsageRow { + group_value: String, + total_runtime_seconds: f64, + total_cpu_core_seconds: f64, + total_memory_gib_seconds: f64, + } + + let rows = query.fetch_all::().await?; + + let usage = rows + .into_iter() + .map(|row| { + // Extract group value + let mut group = HashMap::new(); + if let Some(key_path) = &input.group_by { + // Use the full key path as the key in the result + let key = if let Some(map_key) = &key_path.map_key { + format!("{}.{}", key_path.property, map_key) + } else { + key_path.property.clone() + }; + group.insert(key, row.group_value); + } + + UsageMetrics { + group: Some(group), + total_runtime_seconds: row.total_runtime_seconds, + total_cpu_core_seconds: row.total_cpu_core_seconds, + total_memory_gib_seconds: row.total_memory_gib_seconds, + } + }) + .collect(); + + Ok(Output { usage }) + } else { + // Simple aggregation without group by + #[derive(Debug, clickhouse::Row, Deserialize)] + struct UsageRow { + total_runtime_seconds: f64, + total_cpu_core_seconds: f64, + total_memory_gib_seconds: f64, + } + + let mut cursor = query.fetch::()?; + + if let Some(row) = cursor.next().await? { + Ok(Output { + usage: vec![UsageMetrics { + group: None, + total_runtime_seconds: row.total_runtime_seconds, + total_cpu_core_seconds: row.total_cpu_core_seconds, + total_memory_gib_seconds: row.total_memory_gib_seconds, + }], + }) + } else { + Ok(Output { + usage: vec![UsageMetrics { + group: None, + total_runtime_seconds: 0.0, + total_cpu_core_seconds: 0.0, + total_memory_gib_seconds: 0.0, + }], + }) + } + } +} diff --git a/packages/edge/services/pegboard/src/ops/actor/usage/mod.rs b/packages/edge/services/pegboard/src/ops/actor/usage/mod.rs new file mode 100644 index 0000000000..55bcce78ac --- /dev/null +++ b/packages/edge/services/pegboard/src/ops/actor/usage/mod.rs @@ -0,0 +1,2 @@ +pub mod get; +pub mod get_aggregated; diff --git a/packages/edge/services/pegboard/src/schema.rs b/packages/edge/services/pegboard/src/schema.rs new file mode 100644 index 0000000000..13b3c9391c --- /dev/null +++ b/packages/edge/services/pegboard/src/schema.rs @@ -0,0 +1,105 @@ +use clickhouse_user_query::{Property, PropertyType, Schema}; +use once_cell::sync::Lazy; + +/// Schema for the actors analytics table +/// +/// Excludes namespace and env_id as they are automatically provided by the system: +/// - namespace: from ctx.config().server()?.rivet.namespace +/// - env_id: from the auth token +pub static ACTOR_SCHEMA: Lazy = Lazy::new(|| { + Schema::new(vec![ + Property::new("actor_id".to_string(), false, PropertyType::String) + .unwrap() + .with_group_by(true), + Property::new("project_id".to_string(), false, PropertyType::String) + .unwrap() + .with_group_by(true), + Property::new("datacenter_id".to_string(), false, PropertyType::String) + .unwrap() + .with_group_by(true), + Property::new("tags".to_string(), true, PropertyType::String).unwrap(), // Map type - is_map is true + Property::new("build_id".to_string(), false, PropertyType::String) + .unwrap() + .with_group_by(true), + Property::new("build_kind".to_string(), false, PropertyType::Number) + .unwrap() + .with_group_by(true), + Property::new("build_compression".to_string(), false, PropertyType::Number) + .unwrap() + .with_group_by(true), + Property::new("network_mode".to_string(), false, PropertyType::Number) + .unwrap() + .with_group_by(true), + Property::new("client_id".to_string(), false, PropertyType::String) + .unwrap() + .with_group_by(true), + Property::new( + "client_wan_hostname".to_string(), + false, + PropertyType::String, + ) + .unwrap(), + Property::new( + "selected_cpu_millicores".to_string(), + false, + PropertyType::Number, + ) + .unwrap(), + Property::new( + "selected_memory_mib".to_string(), + false, + PropertyType::Number, + ) + .unwrap(), + Property::new("root_user_enabled".to_string(), false, PropertyType::Bool) + .unwrap() + .with_group_by(true), + Property::new("env_vars".to_string(), false, PropertyType::Number).unwrap(), + Property::new("env_var_bytes".to_string(), false, PropertyType::Number).unwrap(), + Property::new("args".to_string(), false, PropertyType::Number).unwrap(), + Property::new("args_bytes".to_string(), false, PropertyType::Number).unwrap(), + Property::new("durable".to_string(), false, PropertyType::Bool) + .unwrap() + .with_group_by(true), + Property::new("kill_timeout".to_string(), false, PropertyType::Number).unwrap(), + Property::new("cpu_millicores".to_string(), false, PropertyType::Number).unwrap(), + Property::new("memory_mib".to_string(), false, PropertyType::Number).unwrap(), + Property::new("created_at".to_string(), false, PropertyType::Number).unwrap(), + Property::new("started_at".to_string(), false, PropertyType::Number).unwrap(), + Property::new("connectable_at".to_string(), false, PropertyType::Number).unwrap(), + Property::new("finished_at".to_string(), false, PropertyType::Number).unwrap(), + Property::new("destroyed_at".to_string(), false, PropertyType::Number).unwrap(), + ]) + .unwrap() +}); + +/// Schema for the actor_logs3_with_metadata table +/// +/// Excludes namespace and env_id as they are automatically provided by the system: +/// - namespace: from ctx.config().server()?.rivet.namespace +/// - env_id: from the auth token +pub static ACTOR_LOGS_SCHEMA: Lazy = Lazy::new(|| { + Schema::new(vec![ + Property::new("actor_id".to_string(), false, PropertyType::String) + .unwrap() + .with_group_by(true), + Property::new("stream_type".to_string(), false, PropertyType::Number) + .unwrap() + .with_group_by(true), + Property::new("message".to_string(), false, PropertyType::String).unwrap(), + Property::new("datacenter_id".to_string(), false, PropertyType::String) + .unwrap() + .with_group_by(true), + Property::new("tags".to_string(), true, PropertyType::String).unwrap(), // Map type - is_map is true + Property::new("build_id".to_string(), false, PropertyType::String) + .unwrap() + .with_group_by(true), + Property::new("client_id".to_string(), false, PropertyType::String) + .unwrap() + .with_group_by(true), + Property::new("durable".to_string(), false, PropertyType::Bool) + .unwrap() + .with_group_by(true), + ]) + .unwrap() +}); diff --git a/sdks/api/fern/definition/actors/__package__.yml b/sdks/api/fern/definition/actors/__package__.yml index 983dc7ec4b..192a9f0395 100644 --- a/sdks/api/fern/definition/actors/__package__.yml +++ b/sdks/api/fern/definition/actors/__package__.yml @@ -105,6 +105,53 @@ service: body: UpgradeAllActorsRequest response: UpgradeAllActorsResponse + usage: + path: /usage + method: GET + docs: >- + Returns time series data for actor usage metrics. + Allows filtering and grouping by various actor properties. + request: + name: GetActorUsageRequestQuery + query-parameters: + project: optional + environment: optional + start: + docs: Start timestamp in milliseconds + type: integer + end: + docs: End timestamp in milliseconds + type: integer + interval: + docs: Time bucket interval in milliseconds + type: integer + group_by: + docs: JSON-encoded KeyPath for grouping results (e.g. {"property":"datacenter_id"} or {"property":"tags","map_key":"region"}) + type: optional + query_json: + docs: JSON-encoded query expression for filtering actors + type: optional + response: GetActorUsageResponse + + query: + path: /query + method: GET + docs: >- + Queries actors using a JSON-encoded query expression. + Supports pagination with cursor-based navigation. + request: + name: QueryActorsRequestQuery + query-parameters: + project: optional + environment: optional + query_json: + docs: JSON-encoded query expression for filtering actors + type: string + cursor: + docs: Cursor for pagination + type: optional + response: QueryActorsResponse + types: GetActorResponse: properties: @@ -177,3 +224,17 @@ types: type: list pagination: commons.Pagination + GetActorUsageResponse: + properties: + metric_names: list + metric_attributes: list> + metric_types: list + metric_values: list> + + QueryActorsResponse: + properties: + actors: + docs: A list of actors matching the query + type: list + pagination: commons.Pagination + diff --git a/sdks/api/fern/definition/actors/logs.yml b/sdks/api/fern/definition/actors/logs.yml index bce4dbf54e..fab5091204 100644 --- a/sdks/api/fern/definition/actors/logs.yml +++ b/sdks/api/fern/definition/actors/logs.yml @@ -19,16 +19,30 @@ service: query-parameters: project: optional environment: optional - stream: QueryLogStream - actor_ids_json: string - search_text: optional - search_case_sensitive: optional - search_enable_regex: optional + query_json: + docs: JSON-encoded query expression for filtering logs + type: string watch_index: docs: A query parameter denoting the requests watch index. type: optional response: GetActorLogsResponse + export: + path: /logs/export + method: POST + docs: >- + Exports logs for the given actors to an S3 bucket and returns a presigned URL to download. + request: + name: ExportActorLogsRequest + body: + properties: + project: optional + environment: optional + query_json: + docs: JSON-encoded query expression for filtering logs + type: string + response: ExportActorLogsResponse + types: GetActorLogsResponse: properties: @@ -53,8 +67,8 @@ types: type: list watch: commons.WatchResponse - QueryLogStream: - enum: - - std_out - - std_err - - all + ExportActorLogsResponse: + properties: + url: + docs: Presigned URL to download the exported logs + type: string diff --git a/sdks/api/fern/definition/routes/__package__.yml b/sdks/api/fern/definition/routes/__package__.yml index 11d56a6e22..ef239ff357 100644 --- a/sdks/api/fern/definition/routes/__package__.yml +++ b/sdks/api/fern/definition/routes/__package__.yml @@ -49,6 +49,34 @@ service: environment: optional response: DeleteRouteResponse + history: + path: /history + method: GET + docs: >- + Returns time series data for HTTP requests routed to actors. + Allows filtering and grouping by various request properties. + request: + name: HistoryQuery + query-parameters: + project: optional + environment: optional + start: + docs: Start timestamp in milliseconds + type: integer + end: + docs: End timestamp in milliseconds + type: integer + interval: + docs: Time bucket interval in milliseconds + type: integer + query_json: + docs: JSON-encoded query expression for filtering requests + type: optional + group_by: + docs: JSON-encoded KeyPath for grouping results (e.g. {"property":"client_request_host"} or {"property":"tags","map_key":"version"}) + type: optional + response: HistoryResponse + types: ListRoutesResponse: properties: @@ -71,3 +99,10 @@ types: DeleteRouteResponse: properties: {} + + HistoryResponse: + properties: + metric_names: list + metric_attributes: list> + metric_types: list + metric_values: list> diff --git a/sdks/api/full/go/actors/actors.go b/sdks/api/full/go/actors/actors.go index afc7f28bf2..353a82855a 100644 --- a/sdks/api/full/go/actors/actors.go +++ b/sdks/api/full/go/actors/actors.go @@ -132,6 +132,38 @@ func (g *GetActorResponse) String() string { return fmt.Sprintf("%#v", g) } +type GetActorUsageResponse struct { + MetricNames []string `json:"metric_names,omitempty"` + MetricAttributes []map[string]string `json:"metric_attributes,omitempty"` + MetricTypes []string `json:"metric_types,omitempty"` + MetricValues [][]float64 `json:"metric_values,omitempty"` + + _rawJSON json.RawMessage +} + +func (g *GetActorUsageResponse) UnmarshalJSON(data []byte) error { + type unmarshaler GetActorUsageResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *g = GetActorUsageResponse(value) + g._rawJSON = json.RawMessage(data) + return nil +} + +func (g *GetActorUsageResponse) 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 ListActorsResponse struct { // A list of actors for the project associated with the token. Actors []*Actor `json:"actors,omitempty"` @@ -163,6 +195,37 @@ func (l *ListActorsResponse) String() string { return fmt.Sprintf("%#v", l) } +type QueryActorsResponse struct { + // A list of actors matching the query + Actors []*Actor `json:"actors,omitempty"` + Pagination *sdk.Pagination `json:"pagination,omitempty"` + + _rawJSON json.RawMessage +} + +func (q *QueryActorsResponse) UnmarshalJSON(data []byte) error { + type unmarshaler QueryActorsResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *q = QueryActorsResponse(value) + q._rawJSON = json.RawMessage(data) + return nil +} + +func (q *QueryActorsResponse) String() string { + if len(q._rawJSON) > 0 { + if value, err := core.StringifyJSON(q._rawJSON); err == nil { + return value + } + } + if value, err := core.StringifyJSON(q); err == nil { + return value + } + return fmt.Sprintf("%#v", q) +} + type UpgradeActorRequest struct { Build *uuid.UUID `json:"build,omitempty"` BuildTags interface{} `json:"build_tags,omitempty"` diff --git a/sdks/api/full/go/actors/client/client.go b/sdks/api/full/go/actors/client/client.go index c809490ff2..d51725c246 100644 --- a/sdks/api/full/go/actors/client/client.go +++ b/sdks/api/full/go/actors/client/client.go @@ -605,3 +605,194 @@ func (c *Client) UpgradeAll(ctx context.Context, request *actors.UpgradeAllActor } return response, nil } + +// Returns time series data for actor usage metrics. Allows filtering and grouping by various actor properties. +func (c *Client) Usage(ctx context.Context, request *actors.GetActorUsageRequestQuery) (*actors.GetActorUsageResponse, error) { + baseURL := "https://api.rivet.gg" + if c.baseURL != "" { + baseURL = c.baseURL + } + endpointURL := baseURL + "/" + "actors/usage" + + queryParams := make(url.Values) + if request.Project != nil { + queryParams.Add("project", fmt.Sprintf("%v", *request.Project)) + } + if request.Environment != nil { + queryParams.Add("environment", fmt.Sprintf("%v", *request.Environment)) + } + queryParams.Add("start", fmt.Sprintf("%v", request.Start)) + queryParams.Add("end", fmt.Sprintf("%v", request.End)) + queryParams.Add("interval", fmt.Sprintf("%v", request.Interval)) + if request.GroupBy != nil { + queryParams.Add("group_by", fmt.Sprintf("%v", *request.GroupBy)) + } + if request.QueryJson != nil { + queryParams.Add("query_json", fmt.Sprintf("%v", *request.QueryJson)) + } + if len(queryParams) > 0 { + endpointURL += "?" + queryParams.Encode() + } + + errorDecoder := func(statusCode int, body io.Reader) error { + raw, err := io.ReadAll(body) + if err != nil { + return err + } + apiError := core.NewAPIError(statusCode, errors.New(string(raw))) + decoder := json.NewDecoder(bytes.NewReader(raw)) + switch statusCode { + case 500: + value := new(sdk.InternalError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 429: + value := new(sdk.RateLimitError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 403: + value := new(sdk.ForbiddenError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 408: + value := new(sdk.UnauthorizedError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 404: + value := new(sdk.NotFoundError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 400: + value := new(sdk.BadRequestError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + } + return apiError + } + + var response *actors.GetActorUsageResponse + if err := c.caller.Call( + ctx, + &core.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: c.header, + Response: &response, + ErrorDecoder: errorDecoder, + }, + ); err != nil { + return nil, err + } + return response, nil +} + +// Queries actors using a JSON-encoded query expression. Supports pagination with cursor-based navigation. +func (c *Client) Query(ctx context.Context, request *actors.QueryActorsRequestQuery) (*actors.QueryActorsResponse, error) { + baseURL := "https://api.rivet.gg" + if c.baseURL != "" { + baseURL = c.baseURL + } + endpointURL := baseURL + "/" + "actors/query" + + queryParams := make(url.Values) + if request.Project != nil { + queryParams.Add("project", fmt.Sprintf("%v", *request.Project)) + } + if request.Environment != nil { + queryParams.Add("environment", fmt.Sprintf("%v", *request.Environment)) + } + queryParams.Add("query_json", fmt.Sprintf("%v", request.QueryJson)) + if request.Cursor != nil { + queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) + } + if len(queryParams) > 0 { + endpointURL += "?" + queryParams.Encode() + } + + errorDecoder := func(statusCode int, body io.Reader) error { + raw, err := io.ReadAll(body) + if err != nil { + return err + } + apiError := core.NewAPIError(statusCode, errors.New(string(raw))) + decoder := json.NewDecoder(bytes.NewReader(raw)) + switch statusCode { + case 500: + value := new(sdk.InternalError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 429: + value := new(sdk.RateLimitError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 403: + value := new(sdk.ForbiddenError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 408: + value := new(sdk.UnauthorizedError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 404: + value := new(sdk.NotFoundError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 400: + value := new(sdk.BadRequestError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + } + return apiError + } + + var response *actors.QueryActorsResponse + if err := c.caller.Call( + ctx, + &core.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: c.header, + Response: &response, + ErrorDecoder: errorDecoder, + }, + ); err != nil { + return nil, err + } + return response, nil +} diff --git a/sdks/api/full/go/actors/logs.go b/sdks/api/full/go/actors/logs.go index 789018e6b9..a482f4b37e 100644 --- a/sdks/api/full/go/actors/logs.go +++ b/sdks/api/full/go/actors/logs.go @@ -9,18 +9,52 @@ import ( core "sdk/core" ) +type ExportActorLogsRequest struct { + Project *string `json:"project,omitempty"` + Environment *string `json:"environment,omitempty"` + // JSON-encoded query expression for filtering logs + QueryJson string `json:"query_json"` +} + type GetActorLogsRequestQuery struct { - Project *string `json:"-"` - Environment *string `json:"-"` - Stream QueryLogStream `json:"-"` - ActorIdsJson string `json:"-"` - SearchText *string `json:"-"` - SearchCaseSensitive *bool `json:"-"` - SearchEnableRegex *bool `json:"-"` + Project *string `json:"-"` + Environment *string `json:"-"` + // JSON-encoded query expression for filtering logs + QueryJson string `json:"-"` // A query parameter denoting the requests watch index. WatchIndex *string `json:"-"` } +type ExportActorLogsResponse struct { + // Presigned URL to download the exported logs + Url string `json:"url"` + + _rawJSON json.RawMessage +} + +func (e *ExportActorLogsResponse) UnmarshalJSON(data []byte) error { + type unmarshaler ExportActorLogsResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *e = ExportActorLogsResponse(value) + e._rawJSON = json.RawMessage(data) + return nil +} + +func (e *ExportActorLogsResponse) String() string { + if len(e._rawJSON) > 0 { + if value, err := core.StringifyJSON(e._rawJSON); err == nil { + return value + } + } + if value, err := core.StringifyJSON(e); err == nil { + return value + } + return fmt.Sprintf("%#v", e) +} + type GetActorLogsResponse struct { // List of actor IDs in these logs. The order of these correspond to the index in the log entry. ActorIds []string `json:"actor_ids,omitempty"` @@ -62,28 +96,3 @@ func (g *GetActorLogsResponse) String() string { } return fmt.Sprintf("%#v", g) } - -type QueryLogStream string - -const ( - QueryLogStreamStdOut QueryLogStream = "std_out" - QueryLogStreamStdErr QueryLogStream = "std_err" - QueryLogStreamAll QueryLogStream = "all" -) - -func NewQueryLogStreamFromString(s string) (QueryLogStream, error) { - switch s { - case "std_out": - return QueryLogStreamStdOut, nil - case "std_err": - return QueryLogStreamStdErr, nil - case "all": - return QueryLogStreamAll, nil - } - var t QueryLogStream - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (q QueryLogStream) Ptr() *QueryLogStream { - return &q -} diff --git a/sdks/api/full/go/actors/logs/client.go b/sdks/api/full/go/actors/logs/client.go index 51c0b3886f..c750b36004 100644 --- a/sdks/api/full/go/actors/logs/client.go +++ b/sdks/api/full/go/actors/logs/client.go @@ -49,17 +49,7 @@ func (c *Client) Get(ctx context.Context, request *actors.GetActorLogsRequestQue if request.Environment != nil { queryParams.Add("environment", fmt.Sprintf("%v", *request.Environment)) } - queryParams.Add("stream", fmt.Sprintf("%v", request.Stream)) - queryParams.Add("actor_ids_json", fmt.Sprintf("%v", request.ActorIdsJson)) - if request.SearchText != nil { - queryParams.Add("search_text", fmt.Sprintf("%v", *request.SearchText)) - } - if request.SearchCaseSensitive != nil { - queryParams.Add("search_case_sensitive", fmt.Sprintf("%v", *request.SearchCaseSensitive)) - } - if request.SearchEnableRegex != nil { - queryParams.Add("search_enable_regex", fmt.Sprintf("%v", *request.SearchEnableRegex)) - } + queryParams.Add("query_json", fmt.Sprintf("%v", request.QueryJson)) if request.WatchIndex != nil { queryParams.Add("watch_index", fmt.Sprintf("%v", *request.WatchIndex)) } @@ -136,3 +126,82 @@ func (c *Client) Get(ctx context.Context, request *actors.GetActorLogsRequestQue } return response, nil } + +// Exports logs for the given actors to an S3 bucket and returns a presigned URL to download. +func (c *Client) Export(ctx context.Context, request *actors.ExportActorLogsRequest) (*actors.ExportActorLogsResponse, error) { + baseURL := "https://api.rivet.gg" + if c.baseURL != "" { + baseURL = c.baseURL + } + endpointURL := baseURL + "/" + "actors/logs/export" + + errorDecoder := func(statusCode int, body io.Reader) error { + raw, err := io.ReadAll(body) + if err != nil { + return err + } + apiError := core.NewAPIError(statusCode, errors.New(string(raw))) + decoder := json.NewDecoder(bytes.NewReader(raw)) + switch statusCode { + case 500: + value := new(sdk.InternalError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 429: + value := new(sdk.RateLimitError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 403: + value := new(sdk.ForbiddenError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 408: + value := new(sdk.UnauthorizedError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 404: + value := new(sdk.NotFoundError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 400: + value := new(sdk.BadRequestError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + } + return apiError + } + + var response *actors.ExportActorLogsResponse + if err := c.caller.Call( + ctx, + &core.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: c.header, + Request: request, + Response: &response, + ErrorDecoder: errorDecoder, + }, + ); err != nil { + return nil, err + } + return response, nil +} diff --git a/sdks/api/full/go/actors/types.go b/sdks/api/full/go/actors/types.go index b5ee0636b4..d26de1529b 100644 --- a/sdks/api/full/go/actors/types.go +++ b/sdks/api/full/go/actors/types.go @@ -52,6 +52,15 @@ type GetActorsRequestQuery struct { Cursor *string `json:"-"` } +type QueryActorsRequestQuery struct { + Project *string `json:"-"` + Environment *string `json:"-"` + // JSON-encoded query expression for filtering actors + QueryJson string `json:"-"` + // Cursor for pagination + Cursor *string `json:"-"` +} + type Actor struct { Id uuid.UUID `json:"id"` Region string `json:"region"` @@ -570,3 +579,18 @@ func (u *UpgradeAllActorsRequestQuery) UnmarshalJSON(data []byte) error { func (u *UpgradeAllActorsRequestQuery) MarshalJSON() ([]byte, error) { return json.Marshal(u.Body) } + +type GetActorUsageRequestQuery struct { + Project *string `json:"-"` + Environment *string `json:"-"` + // Start timestamp in milliseconds + Start int `json:"-"` + // End timestamp in milliseconds + End int `json:"-"` + // Time bucket interval in milliseconds + Interval int `json:"-"` + // JSON-encoded KeyPath for grouping results (e.g. {"property":"datacenter_id"} or {"property":"tags","map_key":"region"}) + GroupBy *string `json:"-"` + // JSON-encoded query expression for filtering actors + QueryJson *string `json:"-"` +} diff --git a/sdks/api/full/go/routes/client/client.go b/sdks/api/full/go/routes/client/client.go index 85bfb548bb..ff0188075e 100644 --- a/sdks/api/full/go/routes/client/client.go +++ b/sdks/api/full/go/routes/client/client.go @@ -301,3 +301,101 @@ func (c *Client) Delete(ctx context.Context, id string, request *routes.DeleteRo } return response, nil } + +// Returns time series data for HTTP requests routed to actors. Allows filtering and grouping by various request properties. +func (c *Client) History(ctx context.Context, request *routes.HistoryQuery) (*routes.HistoryResponse, error) { + baseURL := "https://api.rivet.gg" + if c.baseURL != "" { + baseURL = c.baseURL + } + endpointURL := baseURL + "/" + "routes/history" + + queryParams := make(url.Values) + if request.Project != nil { + queryParams.Add("project", fmt.Sprintf("%v", *request.Project)) + } + if request.Environment != nil { + queryParams.Add("environment", fmt.Sprintf("%v", *request.Environment)) + } + queryParams.Add("start", fmt.Sprintf("%v", request.Start)) + queryParams.Add("end", fmt.Sprintf("%v", request.End)) + queryParams.Add("interval", fmt.Sprintf("%v", request.Interval)) + if request.QueryJson != nil { + queryParams.Add("query_json", fmt.Sprintf("%v", *request.QueryJson)) + } + if request.GroupBy != nil { + queryParams.Add("group_by", fmt.Sprintf("%v", *request.GroupBy)) + } + if len(queryParams) > 0 { + endpointURL += "?" + queryParams.Encode() + } + + errorDecoder := func(statusCode int, body io.Reader) error { + raw, err := io.ReadAll(body) + if err != nil { + return err + } + apiError := core.NewAPIError(statusCode, errors.New(string(raw))) + decoder := json.NewDecoder(bytes.NewReader(raw)) + switch statusCode { + case 500: + value := new(sdk.InternalError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 429: + value := new(sdk.RateLimitError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 403: + value := new(sdk.ForbiddenError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 408: + value := new(sdk.UnauthorizedError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 404: + value := new(sdk.NotFoundError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 400: + value := new(sdk.BadRequestError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + } + return apiError + } + + var response *routes.HistoryResponse + if err := c.caller.Call( + ctx, + &core.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: c.header, + Response: &response, + ErrorDecoder: errorDecoder, + }, + ); err != nil { + return nil, err + } + return response, nil +} diff --git a/sdks/api/full/go/routes/routes.go b/sdks/api/full/go/routes/routes.go index f8a56f46fe..3a22051535 100644 --- a/sdks/api/full/go/routes/routes.go +++ b/sdks/api/full/go/routes/routes.go @@ -35,6 +35,38 @@ func (d *DeleteRouteResponse) String() string { return fmt.Sprintf("%#v", d) } +type HistoryResponse struct { + MetricNames []string `json:"metric_names,omitempty"` + MetricAttributes []map[string]string `json:"metric_attributes,omitempty"` + MetricTypes []string `json:"metric_types,omitempty"` + MetricValues [][]float64 `json:"metric_values,omitempty"` + + _rawJSON json.RawMessage +} + +func (h *HistoryResponse) UnmarshalJSON(data []byte) error { + type unmarshaler HistoryResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *h = HistoryResponse(value) + h._rawJSON = json.RawMessage(data) + return nil +} + +func (h *HistoryResponse) 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 ListRoutesResponse struct { Routes []*Route `json:"routes,omitempty"` diff --git a/sdks/api/full/go/routes/types.go b/sdks/api/full/go/routes/types.go index 03aea79ac4..535fabae99 100644 --- a/sdks/api/full/go/routes/types.go +++ b/sdks/api/full/go/routes/types.go @@ -14,6 +14,21 @@ type DeleteRouteQuery struct { Environment *string `json:"-"` } +type HistoryQuery struct { + Project *string `json:"-"` + Environment *string `json:"-"` + // Start timestamp in milliseconds + Start int `json:"-"` + // End timestamp in milliseconds + End int `json:"-"` + // Time bucket interval in milliseconds + Interval int `json:"-"` + // JSON-encoded query expression for filtering requests + QueryJson *string `json:"-"` + // JSON-encoded KeyPath for grouping results (e.g. {"property":"client_request_host"} or {"property":"tags","map_key":"version"}) + GroupBy *string `json:"-"` +} + type ListRoutesQuery struct { Project *string `json:"-"` Environment *string `json:"-"` diff --git a/sdks/api/full/openapi/openapi.yml b/sdks/api/full/openapi/openapi.yml index f7bc9a608a..bcf823dd53 100644 --- a/sdks/api/full/openapi/openapi.yml +++ b/sdks/api/full/openapi/openapi.yml @@ -449,6 +449,177 @@ paths: application/json: schema: $ref: '#/components/schemas/ActorsUpgradeAllActorsRequest' + /actors/usage: + get: + description: >- + Returns time series data for actor usage metrics. Allows filtering and + grouping by various actor properties. + operationId: actors_usage + tags: + - Actors + parameters: + - name: project + in: query + required: false + schema: + type: string + - name: environment + in: query + required: false + schema: + type: string + - name: start + in: query + description: Start timestamp in milliseconds + required: true + schema: + type: integer + - name: end + in: query + description: End timestamp in milliseconds + required: true + schema: + type: integer + - name: interval + in: query + description: Time bucket interval in milliseconds + required: true + schema: + type: integer + - name: group_by + in: query + description: >- + JSON-encoded KeyPath for grouping results (e.g. + {"property":"datacenter_id"} or + {"property":"tags","map_key":"region"}) + required: false + schema: + type: string + - name: query_json + in: query + description: JSON-encoded query expression for filtering actors + required: false + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ActorsGetActorUsageResponse' + '400': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '403': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '404': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '408': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '429': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '500': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + security: *ref_0 + /actors/query: + get: + description: >- + Queries actors using a JSON-encoded query expression. Supports + pagination with cursor-based navigation. + operationId: actors_query + tags: + - Actors + parameters: + - name: project + in: query + required: false + schema: + type: string + - name: environment + in: query + required: false + schema: + type: string + - name: query_json + in: query + description: JSON-encoded query expression for filtering actors + required: true + schema: + type: string + - name: cursor + in: query + description: Cursor for pagination + required: false + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ActorsQueryActorsResponse' + '400': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '403': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '404': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '408': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '429': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '500': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + security: *ref_0 /builds/{build}: get: description: Get a build. @@ -5004,6 +5175,102 @@ paths: schema: $ref: '#/components/schemas/ErrorBody' security: *ref_0 + /routes/history: + get: + description: >- + Returns time series data for HTTP requests routed to actors. Allows + filtering and grouping by various request properties. + operationId: routes_history + tags: + - Routes + parameters: + - name: project + in: query + required: false + schema: + type: string + - name: environment + in: query + required: false + schema: + type: string + - name: start + in: query + description: Start timestamp in milliseconds + required: true + schema: + type: integer + - name: end + in: query + description: End timestamp in milliseconds + required: true + schema: + type: integer + - name: interval + in: query + description: Time bucket interval in milliseconds + required: true + schema: + type: integer + - name: query_json + in: query + description: JSON-encoded query expression for filtering requests + required: false + schema: + type: string + - name: group_by + in: query + description: >- + JSON-encoded KeyPath for grouping results (e.g. + {"property":"client_request_host"} or + {"property":"tags","map_key":"version"}) + required: false + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/RoutesHistoryResponse' + '400': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '403': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '404': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '408': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '429': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '500': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + security: *ref_0 /games/{game_id}/environments/{environment_id}/servers/{server_id}: get: description: Gets a dynamic server. @@ -5319,31 +5586,12 @@ paths: required: false schema: type: string - - name: stream - in: query - required: true - schema: - $ref: '#/components/schemas/ActorsQueryLogStream' - - name: actor_ids_json + - name: query_json in: query + description: JSON-encoded query expression for filtering logs required: true schema: type: string - - name: search_text - in: query - required: false - schema: - type: string - - name: search_case_sensitive - in: query - required: false - schema: - type: boolean - - name: search_enable_regex - in: query - required: false - schema: - type: boolean - name: watch_index in: query description: A query parameter denoting the requests watch index. @@ -5394,6 +5642,75 @@ paths: schema: $ref: '#/components/schemas/ErrorBody' security: *ref_0 + /actors/logs/export: + post: + description: >- + Exports logs for the given actors to an S3 bucket and returns a + presigned URL to download. + operationId: actors_logs_export + tags: + - ActorsLogs + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ActorsExportActorLogsResponse' + '400': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '403': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '404': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '408': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '429': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '500': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + security: *ref_0 + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + project: + type: string + environment: + type: string + query_json: + type: string + description: JSON-encoded query expression for filtering logs + required: + - query_json /actors/{actor}/metrics/history: get: description: Returns the metrics for a given actor. @@ -9418,6 +9735,48 @@ components: required: - actors - pagination + ActorsGetActorUsageResponse: + type: object + properties: + metric_names: + type: array + items: + type: string + metric_attributes: + type: array + items: + type: object + additionalProperties: + type: string + metric_types: + type: array + items: + type: string + metric_values: + type: array + items: + type: array + items: + type: number + format: double + required: + - metric_names + - metric_attributes + - metric_types + - metric_values + ActorsQueryActorsResponse: + type: object + properties: + actors: + type: array + items: + $ref: '#/components/schemas/ActorsActor' + description: A list of actors matching the query + pagination: + $ref: '#/components/schemas/Pagination' + required: + - actors + - pagination BuildsGetBuildResponse: type: object properties: @@ -10537,6 +10896,35 @@ components: RoutesDeleteRouteResponse: type: object properties: {} + RoutesHistoryResponse: + type: object + properties: + metric_names: + type: array + items: + type: string + metric_attributes: + type: array + items: + type: object + additionalProperties: + type: string + metric_types: + type: array + items: + type: string + metric_values: + type: array + items: + type: array + items: + type: number + format: double + required: + - metric_names + - metric_attributes + - metric_types + - metric_values ServersGetServerResponse: type: object properties: @@ -10817,12 +11205,14 @@ components: - streams - actor_indices - watch - ActorsQueryLogStream: - type: string - enum: - - std_out - - std_err - - all + ActorsExportActorLogsResponse: + type: object + properties: + url: + type: string + description: Presigned URL to download the exported logs + required: + - url ActorsGetActorMetricsResponse: type: object properties: diff --git a/sdks/api/full/openapi_compat/openapi.yml b/sdks/api/full/openapi_compat/openapi.yml index 3ab5e446c8..6dc67887b6 100644 --- a/sdks/api/full/openapi_compat/openapi.yml +++ b/sdks/api/full/openapi_compat/openapi.yml @@ -449,6 +449,177 @@ paths: application/json: schema: $ref: '#/components/schemas/ActorsUpgradeAllActorsRequest' + /actors/usage: + get: + description: >- + Returns time series data for actor usage metrics. Allows filtering and + grouping by various actor properties. + operationId: actors_usage + tags: + - Actors + parameters: + - name: project + in: query + required: false + schema: + type: string + - name: environment + in: query + required: false + schema: + type: string + - name: start + in: query + description: Start timestamp in milliseconds + required: true + schema: + type: integer + - name: end + in: query + description: End timestamp in milliseconds + required: true + schema: + type: integer + - name: interval + in: query + description: Time bucket interval in milliseconds + required: true + schema: + type: integer + - name: group_by + in: query + description: >- + JSON-encoded KeyPath for grouping results (e.g. + {"property":"datacenter_id"} or + {"property":"tags","map_key":"region"}) + required: false + schema: + type: string + - name: query_json + in: query + description: JSON-encoded query expression for filtering actors + required: false + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ActorsGetActorUsageResponse' + '400': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '403': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '404': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '408': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '429': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '500': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + security: *ref_0 + /actors/query: + get: + description: >- + Queries actors using a JSON-encoded query expression. Supports + pagination with cursor-based navigation. + operationId: actors_query + tags: + - Actors + parameters: + - name: project + in: query + required: false + schema: + type: string + - name: environment + in: query + required: false + schema: + type: string + - name: query_json + in: query + description: JSON-encoded query expression for filtering actors + required: true + schema: + type: string + - name: cursor + in: query + description: Cursor for pagination + required: false + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ActorsQueryActorsResponse' + '400': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '403': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '404': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '408': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '429': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '500': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + security: *ref_0 '/builds/{build}': get: description: Get a build. @@ -5004,6 +5175,102 @@ paths: schema: $ref: '#/components/schemas/ErrorBody' security: *ref_0 + /routes/history: + get: + description: >- + Returns time series data for HTTP requests routed to actors. Allows + filtering and grouping by various request properties. + operationId: routes_history + tags: + - Routes + parameters: + - name: project + in: query + required: false + schema: + type: string + - name: environment + in: query + required: false + schema: + type: string + - name: start + in: query + description: Start timestamp in milliseconds + required: true + schema: + type: integer + - name: end + in: query + description: End timestamp in milliseconds + required: true + schema: + type: integer + - name: interval + in: query + description: Time bucket interval in milliseconds + required: true + schema: + type: integer + - name: query_json + in: query + description: JSON-encoded query expression for filtering requests + required: false + schema: + type: string + - name: group_by + in: query + description: >- + JSON-encoded KeyPath for grouping results (e.g. + {"property":"client_request_host"} or + {"property":"tags","map_key":"version"}) + required: false + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/RoutesHistoryResponse' + '400': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '403': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '404': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '408': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '429': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '500': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + security: *ref_0 '/games/{game_id}/environments/{environment_id}/servers/{server_id}': get: description: Gets a dynamic server. @@ -5319,31 +5586,12 @@ paths: required: false schema: type: string - - name: stream - in: query - required: true - schema: - $ref: '#/components/schemas/ActorsQueryLogStream' - - name: actor_ids_json + - name: query_json in: query + description: JSON-encoded query expression for filtering logs required: true schema: type: string - - name: search_text - in: query - required: false - schema: - type: string - - name: search_case_sensitive - in: query - required: false - schema: - type: boolean - - name: search_enable_regex - in: query - required: false - schema: - type: boolean - name: watch_index in: query description: A query parameter denoting the requests watch index. @@ -5394,6 +5642,75 @@ paths: schema: $ref: '#/components/schemas/ErrorBody' security: *ref_0 + /actors/logs/export: + post: + description: >- + Exports logs for the given actors to an S3 bucket and returns a + presigned URL to download. + operationId: actors_logs_export + tags: + - ActorsLogs + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ActorsExportActorLogsResponse' + '400': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '403': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '404': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '408': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '429': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '500': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + security: *ref_0 + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + project: + type: string + environment: + type: string + query_json: + type: string + description: JSON-encoded query expression for filtering logs + required: + - query_json '/actors/{actor}/metrics/history': get: description: Returns the metrics for a given actor. @@ -9418,6 +9735,48 @@ components: required: - actors - pagination + ActorsGetActorUsageResponse: + type: object + properties: + metric_names: + type: array + items: + type: string + metric_attributes: + type: array + items: + type: object + additionalProperties: + type: string + metric_types: + type: array + items: + type: string + metric_values: + type: array + items: + type: array + items: + type: number + format: double + required: + - metric_names + - metric_attributes + - metric_types + - metric_values + ActorsQueryActorsResponse: + type: object + properties: + actors: + type: array + items: + $ref: '#/components/schemas/ActorsActor' + description: A list of actors matching the query + pagination: + $ref: '#/components/schemas/Pagination' + required: + - actors + - pagination BuildsGetBuildResponse: type: object properties: @@ -10537,6 +10896,35 @@ components: RoutesDeleteRouteResponse: type: object properties: {} + RoutesHistoryResponse: + type: object + properties: + metric_names: + type: array + items: + type: string + metric_attributes: + type: array + items: + type: object + additionalProperties: + type: string + metric_types: + type: array + items: + type: string + metric_values: + type: array + items: + type: array + items: + type: number + format: double + required: + - metric_names + - metric_attributes + - metric_types + - metric_values ServersGetServerResponse: type: object properties: @@ -10817,12 +11205,14 @@ components: - streams - actor_indices - watch - ActorsQueryLogStream: - type: string - enum: - - std_out - - std_err - - all + ActorsExportActorLogsResponse: + type: object + properties: + url: + type: string + description: Presigned URL to download the exported logs + required: + - url ActorsGetActorMetricsResponse: type: object properties: diff --git a/sdks/api/full/rust/.openapi-generator/FILES b/sdks/api/full/rust/.openapi-generator/FILES index e09b03f5aa..997625b863 100644 --- a/sdks/api/full/rust/.openapi-generator/FILES +++ b/sdks/api/full/rust/.openapi-generator/FILES @@ -12,19 +12,22 @@ docs/ActorsCreateActorResponse.md docs/ActorsCreateActorRuntimeNetworkRequest.md docs/ActorsCreateActorRuntimeRequest.md docs/ActorsEndpointType.md +docs/ActorsExportActorLogsResponse.md docs/ActorsGetActorLogsResponse.md docs/ActorsGetActorMetricsResponse.md docs/ActorsGetActorResponse.md +docs/ActorsGetActorUsageResponse.md docs/ActorsLifecycle.md docs/ActorsListActorsResponse.md docs/ActorsLogsApi.md +docs/ActorsLogsExportRequest.md docs/ActorsMetricsApi.md docs/ActorsNetwork.md docs/ActorsNetworkMode.md docs/ActorsPort.md docs/ActorsPortProtocol.md docs/ActorsPortRouting.md -docs/ActorsQueryLogStream.md +docs/ActorsQueryActorsResponse.md docs/ActorsResources.md docs/ActorsRuntime.md docs/ActorsUpgradeActorRequest.md @@ -348,6 +351,7 @@ docs/RegionsListRegionsResponse.md docs/RegionsRecommendRegionResponse.md docs/RegionsRegion.md docs/RoutesApi.md +docs/RoutesHistoryResponse.md docs/RoutesListRoutesResponse.md docs/RoutesRoute.md docs/RoutesRouteTarget.md @@ -447,17 +451,20 @@ 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 +src/models/actors_get_actor_usage_response.rs src/models/actors_lifecycle.rs src/models/actors_list_actors_response.rs +src/models/actors_logs_export_request.rs src/models/actors_network.rs src/models/actors_network_mode.rs src/models/actors_port.rs src/models/actors_port_protocol.rs src/models/actors_port_routing.rs -src/models/actors_query_log_stream.rs +src/models/actors_query_actors_response.rs src/models/actors_resources.rs src/models/actors_runtime.rs src/models/actors_upgrade_actor_request.rs @@ -743,6 +750,7 @@ src/models/provision_tunnel_get_tls_response.rs src/models/regions_list_regions_response.rs src/models/regions_recommend_region_response.rs src/models/regions_region.rs +src/models/routes_history_response.rs src/models/routes_list_routes_response.rs src/models/routes_route.rs src/models/routes_route_target.rs diff --git a/sdks/api/full/rust/README.md b/sdks/api/full/rust/README.md index b9456143de..0059beae02 100644 --- a/sdks/api/full/rust/README.md +++ b/sdks/api/full/rust/README.md @@ -29,8 +29,11 @@ Class | Method | HTTP request | Description *ActorsApi* | [**actors_destroy**](docs/ActorsApi.md#actors_destroy) | **DELETE** /actors/{actor} | *ActorsApi* | [**actors_get**](docs/ActorsApi.md#actors_get) | **GET** /actors/{actor} | *ActorsApi* | [**actors_list**](docs/ActorsApi.md#actors_list) | **GET** /actors | +*ActorsApi* | [**actors_query**](docs/ActorsApi.md#actors_query) | **GET** /actors/query | *ActorsApi* | [**actors_upgrade**](docs/ActorsApi.md#actors_upgrade) | **POST** /actors/{actor}/upgrade | *ActorsApi* | [**actors_upgrade_all**](docs/ActorsApi.md#actors_upgrade_all) | **POST** /actors/upgrade | +*ActorsApi* | [**actors_usage**](docs/ActorsApi.md#actors_usage) | **GET** /actors/usage | +*ActorsLogsApi* | [**actors_logs_export**](docs/ActorsLogsApi.md#actors_logs_export) | **POST** /actors/logs/export | *ActorsLogsApi* | [**actors_logs_get**](docs/ActorsLogsApi.md#actors_logs_get) | **GET** /actors/logs | *ActorsMetricsApi* | [**actors_metrics_get**](docs/ActorsMetricsApi.md#actors_metrics_get) | **GET** /actors/{actor}/metrics/history | *AuthIdentityEmailApi* | [**auth_identity_email_complete_email_verification**](docs/AuthIdentityEmailApi.md#auth_identity_email_complete_email_verification) | **POST** /auth/identity/email/complete-verification | @@ -156,6 +159,7 @@ Class | Method | HTTP request | Description *RegionsApi* | [**regions_list**](docs/RegionsApi.md#regions_list) | **GET** /regions | *RegionsApi* | [**regions_recommend**](docs/RegionsApi.md#regions_recommend) | **GET** /regions/recommend | *RoutesApi* | [**routes_delete**](docs/RoutesApi.md#routes_delete) | **DELETE** /routes/{id} | +*RoutesApi* | [**routes_history**](docs/RoutesApi.md#routes_history) | **GET** /routes/history | *RoutesApi* | [**routes_list**](docs/RoutesApi.md#routes_list) | **GET** /routes | *RoutesApi* | [**routes_update**](docs/RoutesApi.md#routes_update) | **PUT** /routes/{id} | *ServersApi* | [**servers_create**](docs/ServersApi.md#servers_create) | **POST** /games/{game_id}/environments/{environment_id}/servers | @@ -181,17 +185,20 @@ Class | Method | HTTP request | Description - [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) + - [ActorsGetActorUsageResponse](docs/ActorsGetActorUsageResponse.md) - [ActorsLifecycle](docs/ActorsLifecycle.md) - [ActorsListActorsResponse](docs/ActorsListActorsResponse.md) + - [ActorsLogsExportRequest](docs/ActorsLogsExportRequest.md) - [ActorsNetwork](docs/ActorsNetwork.md) - [ActorsNetworkMode](docs/ActorsNetworkMode.md) - [ActorsPort](docs/ActorsPort.md) - [ActorsPortProtocol](docs/ActorsPortProtocol.md) - [ActorsPortRouting](docs/ActorsPortRouting.md) - - [ActorsQueryLogStream](docs/ActorsQueryLogStream.md) + - [ActorsQueryActorsResponse](docs/ActorsQueryActorsResponse.md) - [ActorsResources](docs/ActorsResources.md) - [ActorsRuntime](docs/ActorsRuntime.md) - [ActorsUpgradeActorRequest](docs/ActorsUpgradeActorRequest.md) @@ -476,6 +483,7 @@ Class | Method | HTTP request | Description - [RegionsListRegionsResponse](docs/RegionsListRegionsResponse.md) - [RegionsRecommendRegionResponse](docs/RegionsRecommendRegionResponse.md) - [RegionsRegion](docs/RegionsRegion.md) + - [RoutesHistoryResponse](docs/RoutesHistoryResponse.md) - [RoutesListRoutesResponse](docs/RoutesListRoutesResponse.md) - [RoutesRoute](docs/RoutesRoute.md) - [RoutesRouteTarget](docs/RoutesRouteTarget.md) diff --git a/sdks/api/full/rust/docs/ActorsApi.md b/sdks/api/full/rust/docs/ActorsApi.md index ffe577ac35..5313cebbf5 100644 --- a/sdks/api/full/rust/docs/ActorsApi.md +++ b/sdks/api/full/rust/docs/ActorsApi.md @@ -8,8 +8,10 @@ Method | HTTP request | Description [**actors_destroy**](ActorsApi.md#actors_destroy) | **DELETE** /actors/{actor} | [**actors_get**](ActorsApi.md#actors_get) | **GET** /actors/{actor} | [**actors_list**](ActorsApi.md#actors_list) | **GET** /actors | +[**actors_query**](ActorsApi.md#actors_query) | **GET** /actors/query | [**actors_upgrade**](ActorsApi.md#actors_upgrade) | **POST** /actors/{actor}/upgrade | [**actors_upgrade_all**](ActorsApi.md#actors_upgrade_all) | **POST** /actors/upgrade | +[**actors_usage**](ActorsApi.md#actors_usage) | **GET** /actors/usage | @@ -147,6 +149,39 @@ Name | Type | Description | Required | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +## actors_query + +> crate::models::ActorsQueryActorsResponse actors_query(query_json, project, environment, cursor) + + +Queries actors using a JSON-encoded query expression. Supports pagination with cursor-based navigation. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**query_json** | **String** | JSON-encoded query expression for filtering actors | [required] | +**project** | Option<**String**> | | | +**environment** | Option<**String**> | | | +**cursor** | Option<**String**> | Cursor for pagination | | + +### Return type + +[**crate::models::ActorsQueryActorsResponse**](ActorsQueryActorsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + ## actors_upgrade > serde_json::Value actors_upgrade(actor, actors_upgrade_actor_request, project, environment) @@ -211,3 +246,39 @@ Name | Type | Description | Required | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +## actors_usage + +> crate::models::ActorsGetActorUsageResponse actors_usage(start, end, interval, project, environment, group_by, query_json) + + +Returns time series data for actor usage metrics. Allows filtering and grouping by various actor properties. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**start** | **i32** | Start timestamp in milliseconds | [required] | +**end** | **i32** | End timestamp in milliseconds | [required] | +**interval** | **i32** | Time bucket interval in milliseconds | [required] | +**project** | Option<**String**> | | | +**environment** | Option<**String**> | | | +**group_by** | Option<**String**> | JSON-encoded KeyPath for grouping results (e.g. {\"property\":\"datacenter_id\"} or {\"property\":\"tags\",\"map_key\":\"region\"}) | | +**query_json** | Option<**String**> | JSON-encoded query expression for filtering actors | | + +### Return type + +[**crate::models::ActorsGetActorUsageResponse**](ActorsGetActorUsageResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/sdks/api/full/rust/docs/ActorsQueryLogStream.md b/sdks/api/full/rust/docs/ActorsExportActorLogsResponse.md similarity index 73% rename from sdks/api/full/rust/docs/ActorsQueryLogStream.md rename to sdks/api/full/rust/docs/ActorsExportActorLogsResponse.md index c3c590b3ff..d510522bd3 100644 --- a/sdks/api/full/rust/docs/ActorsQueryLogStream.md +++ b/sdks/api/full/rust/docs/ActorsExportActorLogsResponse.md @@ -1,9 +1,10 @@ -# ActorsQueryLogStream +# ActorsExportActorLogsResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**url** | **String** | Presigned URL to download the exported logs | [[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/ActorsGetActorUsageResponse.md b/sdks/api/full/rust/docs/ActorsGetActorUsageResponse.md new file mode 100644 index 0000000000..f34240e363 --- /dev/null +++ b/sdks/api/full/rust/docs/ActorsGetActorUsageResponse.md @@ -0,0 +1,14 @@ +# ActorsGetActorUsageResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metric_names** | **Vec** | | +**metric_attributes** | [**Vec<::std::collections::HashMap>**](map.md) | | +**metric_types** | **Vec** | | +**metric_values** | [**Vec>**](array.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/ActorsLogsApi.md b/sdks/api/full/rust/docs/ActorsLogsApi.md index 75b5c0f048..52d6ec66dd 100644 --- a/sdks/api/full/rust/docs/ActorsLogsApi.md +++ b/sdks/api/full/rust/docs/ActorsLogsApi.md @@ -4,13 +4,44 @@ All URIs are relative to *https://api.rivet.gg* Method | HTTP request | Description ------------- | ------------- | ------------- +[**actors_logs_export**](ActorsLogsApi.md#actors_logs_export) | **POST** /actors/logs/export | [**actors_logs_get**](ActorsLogsApi.md#actors_logs_get) | **GET** /actors/logs | +## actors_logs_export + +> crate::models::ActorsExportActorLogsResponse actors_logs_export(actors_logs_export_request) + + +Exports logs for the given actors to an S3 bucket and returns a presigned URL to download. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**actors_logs_export_request** | [**ActorsLogsExportRequest**](ActorsLogsExportRequest.md) | | [required] | + +### Return type + +[**crate::models::ActorsExportActorLogsResponse**](ActorsExportActorLogsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + ## actors_logs_get -> crate::models::ActorsGetActorLogsResponse actors_logs_get(stream, actor_ids_json, project, environment, search_text, search_case_sensitive, search_enable_regex, watch_index) +> crate::models::ActorsGetActorLogsResponse actors_logs_get(query_json, project, environment, watch_index) Returns the logs for a given actor. @@ -20,13 +51,9 @@ Returns the logs for a given actor. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**stream** | [**ActorsQueryLogStream**](.md) | | [required] | -**actor_ids_json** | **String** | | [required] | +**query_json** | **String** | JSON-encoded query expression for filtering logs | [required] | **project** | Option<**String**> | | | **environment** | Option<**String**> | | | -**search_text** | Option<**String**> | | | -**search_case_sensitive** | Option<**bool**> | | | -**search_enable_regex** | Option<**bool**> | | | **watch_index** | Option<**String**> | A query parameter denoting the requests watch index. | | ### Return type diff --git a/sdks/api/full/rust/docs/ActorsLogsExportRequest.md b/sdks/api/full/rust/docs/ActorsLogsExportRequest.md new file mode 100644 index 0000000000..acbeb6b410 --- /dev/null +++ b/sdks/api/full/rust/docs/ActorsLogsExportRequest.md @@ -0,0 +1,13 @@ +# ActorsLogsExportRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**project** | Option<**String**> | | [optional] +**environment** | Option<**String**> | | [optional] +**query_json** | **String** | JSON-encoded query expression for filtering logs | + +[[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/ActorsQueryActorsResponse.md b/sdks/api/full/rust/docs/ActorsQueryActorsResponse.md new file mode 100644 index 0000000000..96ca869d0d --- /dev/null +++ b/sdks/api/full/rust/docs/ActorsQueryActorsResponse.md @@ -0,0 +1,12 @@ +# ActorsQueryActorsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**actors** | [**Vec**](ActorsActor.md) | A list of actors matching the query | +**pagination** | [**crate::models::Pagination**](Pagination.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/RoutesApi.md b/sdks/api/full/rust/docs/RoutesApi.md index 9c8b377f4c..4ef653385c 100644 --- a/sdks/api/full/rust/docs/RoutesApi.md +++ b/sdks/api/full/rust/docs/RoutesApi.md @@ -5,6 +5,7 @@ All URIs are relative to *https://api.rivet.gg* Method | HTTP request | Description ------------- | ------------- | ------------- [**routes_delete**](RoutesApi.md#routes_delete) | **DELETE** /routes/{id} | +[**routes_history**](RoutesApi.md#routes_history) | **GET** /routes/history | [**routes_list**](RoutesApi.md#routes_list) | **GET** /routes | [**routes_update**](RoutesApi.md#routes_update) | **PUT** /routes/{id} | @@ -42,6 +43,42 @@ Name | Type | Description | Required | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +## routes_history + +> crate::models::RoutesHistoryResponse routes_history(start, end, interval, project, environment, query_json, group_by) + + +Returns time series data for HTTP requests routed to actors. Allows filtering and grouping by various request properties. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**start** | **i32** | Start timestamp in milliseconds | [required] | +**end** | **i32** | End timestamp in milliseconds | [required] | +**interval** | **i32** | Time bucket interval in milliseconds | [required] | +**project** | Option<**String**> | | | +**environment** | Option<**String**> | | | +**query_json** | Option<**String**> | JSON-encoded query expression for filtering requests | | +**group_by** | Option<**String**> | JSON-encoded KeyPath for grouping results (e.g. {\"property\":\"client_request_host\"} or {\"property\":\"tags\",\"map_key\":\"version\"}) | | + +### Return type + +[**crate::models::RoutesHistoryResponse**](RoutesHistoryResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + ## routes_list > crate::models::RoutesListRoutesResponse routes_list(project, environment) diff --git a/sdks/api/full/rust/docs/RoutesHistoryResponse.md b/sdks/api/full/rust/docs/RoutesHistoryResponse.md new file mode 100644 index 0000000000..2520698a06 --- /dev/null +++ b/sdks/api/full/rust/docs/RoutesHistoryResponse.md @@ -0,0 +1,14 @@ +# RoutesHistoryResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metric_names** | **Vec** | | +**metric_attributes** | [**Vec<::std::collections::HashMap>**](map.md) | | +**metric_types** | **Vec** | | +**metric_values** | [**Vec>**](array.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/src/apis/actors_api.rs b/sdks/api/full/rust/src/apis/actors_api.rs index e13c99f956..316a991d59 100644 --- a/sdks/api/full/rust/src/apis/actors_api.rs +++ b/sdks/api/full/rust/src/apis/actors_api.rs @@ -4,339 +4,594 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`actors_create`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ActorsCreateError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`actors_destroy`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ActorsDestroyError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`actors_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ActorsGetError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`actors_list`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ActorsListError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`actors_query`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ActorsQueryError { + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`actors_upgrade`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ActorsUpgradeError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`actors_upgrade_all`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ActorsUpgradeAllError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } +/// struct for typed errors of method [`actors_usage`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ActorsUsageError { + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), +} /// Create a new dynamic actor. -pub async fn actors_create(configuration: &configuration::Configuration, actors_create_actor_request: crate::models::ActorsCreateActorRequest, project: Option<&str>, environment: Option<&str>, endpoint_type: Option) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/actors", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = project { - local_var_req_builder = local_var_req_builder.query(&[("project", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = environment { - local_var_req_builder = local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = endpoint_type { - local_var_req_builder = local_var_req_builder.query(&[("endpoint_type", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&actors_create_actor_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn actors_create( + configuration: &configuration::Configuration, + actors_create_actor_request: crate::models::ActorsCreateActorRequest, + project: Option<&str>, + environment: Option<&str>, + endpoint_type: Option, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/actors", local_var_configuration.base_path); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = project { + local_var_req_builder = + local_var_req_builder.query(&[("project", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = environment { + local_var_req_builder = + local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = endpoint_type { + local_var_req_builder = + local_var_req_builder.query(&[("endpoint_type", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&actors_create_actor_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Destroy a dynamic actor. -pub async fn actors_destroy(configuration: &configuration::Configuration, actor: &str, project: Option<&str>, environment: Option<&str>, override_kill_timeout: Option) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/actors/{actor}", local_var_configuration.base_path, actor=crate::apis::urlencode(actor)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = project { - local_var_req_builder = local_var_req_builder.query(&[("project", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = environment { - local_var_req_builder = local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = override_kill_timeout { - local_var_req_builder = local_var_req_builder.query(&[("override_kill_timeout", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn actors_destroy( + configuration: &configuration::Configuration, + actor: &str, + project: Option<&str>, + environment: Option<&str>, + override_kill_timeout: Option, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/actors/{actor}", + local_var_configuration.base_path, + actor = crate::apis::urlencode(actor) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = project { + local_var_req_builder = + local_var_req_builder.query(&[("project", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = environment { + local_var_req_builder = + local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = override_kill_timeout { + local_var_req_builder = + local_var_req_builder.query(&[("override_kill_timeout", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Gets a dynamic actor. -pub async fn actors_get(configuration: &configuration::Configuration, actor: &str, project: Option<&str>, environment: Option<&str>, endpoint_type: Option) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/actors/{actor}", local_var_configuration.base_path, actor=crate::apis::urlencode(actor)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = project { - local_var_req_builder = local_var_req_builder.query(&[("project", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = environment { - local_var_req_builder = local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = endpoint_type { - local_var_req_builder = local_var_req_builder.query(&[("endpoint_type", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn actors_get( + configuration: &configuration::Configuration, + actor: &str, + project: Option<&str>, + environment: Option<&str>, + endpoint_type: Option, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/actors/{actor}", + local_var_configuration.base_path, + actor = crate::apis::urlencode(actor) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = project { + local_var_req_builder = + local_var_req_builder.query(&[("project", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = environment { + local_var_req_builder = + local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = endpoint_type { + local_var_req_builder = + local_var_req_builder.query(&[("endpoint_type", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Lists all actors associated with the token used. Can be filtered by tags in the query string. -pub async fn actors_list(configuration: &configuration::Configuration, project: Option<&str>, environment: Option<&str>, endpoint_type: Option, tags_json: Option<&str>, include_destroyed: Option, cursor: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/actors", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = project { - local_var_req_builder = local_var_req_builder.query(&[("project", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = environment { - local_var_req_builder = local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = endpoint_type { - local_var_req_builder = local_var_req_builder.query(&[("endpoint_type", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = tags_json { - local_var_req_builder = local_var_req_builder.query(&[("tags_json", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = include_destroyed { - local_var_req_builder = local_var_req_builder.query(&[("include_destroyed", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = cursor { - local_var_req_builder = local_var_req_builder.query(&[("cursor", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn actors_list( + configuration: &configuration::Configuration, + project: Option<&str>, + environment: Option<&str>, + endpoint_type: Option, + tags_json: Option<&str>, + include_destroyed: Option, + cursor: Option<&str>, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/actors", local_var_configuration.base_path); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = project { + local_var_req_builder = + local_var_req_builder.query(&[("project", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = environment { + local_var_req_builder = + local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = endpoint_type { + local_var_req_builder = + local_var_req_builder.query(&[("endpoint_type", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = tags_json { + local_var_req_builder = + local_var_req_builder.query(&[("tags_json", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = include_destroyed { + local_var_req_builder = + local_var_req_builder.query(&[("include_destroyed", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = cursor { + local_var_req_builder = + local_var_req_builder.query(&[("cursor", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Queries actors using a JSON-encoded query expression. Supports pagination with cursor-based navigation. +pub async fn actors_query( + configuration: &configuration::Configuration, + query_json: &str, + project: Option<&str>, + environment: Option<&str>, + cursor: Option<&str>, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/actors/query", local_var_configuration.base_path); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = project { + local_var_req_builder = + local_var_req_builder.query(&[("project", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = environment { + local_var_req_builder = + local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("query_json", &query_json.to_string())]); + if let Some(ref local_var_str) = cursor { + local_var_req_builder = + local_var_req_builder.query(&[("cursor", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Upgrades a dynamic actor. -pub async fn actors_upgrade(configuration: &configuration::Configuration, actor: &str, actors_upgrade_actor_request: crate::models::ActorsUpgradeActorRequest, project: Option<&str>, environment: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/actors/{actor}/upgrade", local_var_configuration.base_path, actor=crate::apis::urlencode(actor)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = project { - local_var_req_builder = local_var_req_builder.query(&[("project", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = environment { - local_var_req_builder = local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&actors_upgrade_actor_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn actors_upgrade( + configuration: &configuration::Configuration, + actor: &str, + actors_upgrade_actor_request: crate::models::ActorsUpgradeActorRequest, + project: Option<&str>, + environment: Option<&str>, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/actors/{actor}/upgrade", + local_var_configuration.base_path, + actor = crate::apis::urlencode(actor) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = project { + local_var_req_builder = + local_var_req_builder.query(&[("project", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = environment { + local_var_req_builder = + local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&actors_upgrade_actor_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Upgrades a dynamic actor. -pub async fn actors_upgrade_all(configuration: &configuration::Configuration, actors_upgrade_all_actors_request: crate::models::ActorsUpgradeAllActorsRequest, project: Option<&str>, environment: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/actors/upgrade", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = project { - local_var_req_builder = local_var_req_builder.query(&[("project", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = environment { - local_var_req_builder = local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&actors_upgrade_all_actors_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn actors_upgrade_all( + configuration: &configuration::Configuration, + actors_upgrade_all_actors_request: crate::models::ActorsUpgradeAllActorsRequest, + project: Option<&str>, + environment: Option<&str>, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/actors/upgrade", local_var_configuration.base_path); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = project { + local_var_req_builder = + local_var_req_builder.query(&[("project", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = environment { + local_var_req_builder = + local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&actors_upgrade_all_actors_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } +/// Returns time series data for actor usage metrics. Allows filtering and grouping by various actor properties. +pub async fn actors_usage( + configuration: &configuration::Configuration, + start: i32, + end: i32, + interval: i32, + project: Option<&str>, + environment: Option<&str>, + group_by: Option<&str>, + query_json: Option<&str>, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/actors/usage", local_var_configuration.base_path); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = project { + local_var_req_builder = + local_var_req_builder.query(&[("project", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = environment { + local_var_req_builder = + local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("start", &start.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("end", &end.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("interval", &interval.to_string())]); + if let Some(ref local_var_str) = group_by { + local_var_req_builder = + local_var_req_builder.query(&[("group_by", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = query_json { + local_var_req_builder = + local_var_req_builder.query(&[("query_json", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } +} diff --git a/sdks/api/full/rust/src/apis/actors_logs_api.rs b/sdks/api/full/rust/src/apis/actors_logs_api.rs index be9aed6732..3dc977d7e7 100644 --- a/sdks/api/full/rust/src/apis/actors_logs_api.rs +++ b/sdks/api/full/rust/src/apis/actors_logs_api.rs @@ -4,79 +4,136 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; +/// struct for typed errors of method [`actors_logs_export`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ActorsLogsExportError { + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), +} /// struct for typed errors of method [`actors_logs_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ActorsLogsGetError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } +/// Exports logs for the given actors to an S3 bucket and returns a presigned URL to download. +pub async fn actors_logs_export( + configuration: &configuration::Configuration, + actors_logs_export_request: crate::models::ActorsLogsExportRequest, +) -> Result> { + let local_var_configuration = configuration; -/// Returns the logs for a given actor. -pub async fn actors_logs_get(configuration: &configuration::Configuration, stream: crate::models::ActorsQueryLogStream, actor_ids_json: &str, project: Option<&str>, environment: Option<&str>, search_text: Option<&str>, search_case_sensitive: Option, search_enable_regex: Option, watch_index: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/actors/logs", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = project { - local_var_req_builder = local_var_req_builder.query(&[("project", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = environment { - local_var_req_builder = local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); - } - local_var_req_builder = local_var_req_builder.query(&[("stream", &stream.to_string())]); - local_var_req_builder = local_var_req_builder.query(&[("actor_ids_json", &actor_ids_json.to_string())]); - if let Some(ref local_var_str) = search_text { - local_var_req_builder = local_var_req_builder.query(&[("search_text", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = search_case_sensitive { - local_var_req_builder = local_var_req_builder.query(&[("search_case_sensitive", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = search_enable_regex { - local_var_req_builder = local_var_req_builder.query(&[("search_enable_regex", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/actors/logs/export", local_var_configuration.base_path); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&actors_logs_export_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } +/// Returns the logs for a given actor. +pub async fn actors_logs_get( + configuration: &configuration::Configuration, + query_json: &str, + project: Option<&str>, + environment: Option<&str>, + watch_index: Option<&str>, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/actors/logs", local_var_configuration.base_path); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = project { + local_var_req_builder = + local_var_req_builder.query(&[("project", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = environment { + local_var_req_builder = + local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("query_json", &query_json.to_string())]); + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = + local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } +} diff --git a/sdks/api/full/rust/src/apis/actors_metrics_api.rs b/sdks/api/full/rust/src/apis/actors_metrics_api.rs index 38fbc3e645..6244579e8d 100644 --- a/sdks/api/full/rust/src/apis/actors_metrics_api.rs +++ b/sdks/api/full/rust/src/apis/actors_metrics_api.rs @@ -4,68 +4,85 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`actors_metrics_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ActorsMetricsGetError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - /// Returns the metrics for a given actor. -pub async fn actors_metrics_get(configuration: &configuration::Configuration, actor: &str, start: i32, end: i32, interval: i32, project: Option<&str>, environment: Option<&str>) -> Result> { - let local_var_configuration = configuration; +pub async fn actors_metrics_get( + configuration: &configuration::Configuration, + actor: &str, + start: i32, + end: i32, + interval: i32, + project: Option<&str>, + environment: Option<&str>, +) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &local_var_configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/actors/{actor}/metrics/history", local_var_configuration.base_path, actor=crate::apis::urlencode(actor)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/actors/{actor}/metrics/history", + local_var_configuration.base_path, + actor = crate::apis::urlencode(actor) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - if let Some(ref local_var_str) = project { - local_var_req_builder = local_var_req_builder.query(&[("project", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = environment { - local_var_req_builder = local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); - } - local_var_req_builder = local_var_req_builder.query(&[("start", &start.to_string())]); - local_var_req_builder = local_var_req_builder.query(&[("end", &end.to_string())]); - local_var_req_builder = local_var_req_builder.query(&[("interval", &interval.to_string())]); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; + if let Some(ref local_var_str) = project { + local_var_req_builder = + local_var_req_builder.query(&[("project", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = environment { + local_var_req_builder = + local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("start", &start.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("end", &end.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("interval", &interval.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } - diff --git a/sdks/api/full/rust/src/apis/auth_identity_email_api.rs b/sdks/api/full/rust/src/apis/auth_identity_email_api.rs index 751bdad564..01663ebd12 100644 --- a/sdks/api/full/rust/src/apis/auth_identity_email_api.rs +++ b/sdks/api/full/rust/src/apis/auth_identity_email_api.rs @@ -4,105 +4,135 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`auth_identity_email_complete_email_verification`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum AuthIdentityEmailCompleteEmailVerificationError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`auth_identity_email_start_email_verification`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum AuthIdentityEmailStartEmailVerificationError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - /// Completes the email verification process. -pub async fn auth_identity_email_complete_email_verification(configuration: &configuration::Configuration, auth_identity_complete_email_verification_request: crate::models::AuthIdentityCompleteEmailVerificationRequest) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/auth/identity/email/complete-verification", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&auth_identity_complete_email_verification_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn auth_identity_email_complete_email_verification( + configuration: &configuration::Configuration, + auth_identity_complete_email_verification_request: crate::models::AuthIdentityCompleteEmailVerificationRequest, +) -> Result< + crate::models::AuthIdentityCompleteEmailVerificationResponse, + Error, +> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/auth/identity/email/complete-verification", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = + local_var_req_builder.json(&auth_identity_complete_email_verification_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Starts the verification process for linking an email to your identity. -pub async fn auth_identity_email_start_email_verification(configuration: &configuration::Configuration, auth_identity_start_email_verification_request: crate::models::AuthIdentityStartEmailVerificationRequest) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/auth/identity/email/start-verification", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&auth_identity_start_email_verification_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn auth_identity_email_start_email_verification( + configuration: &configuration::Configuration, + auth_identity_start_email_verification_request: crate::models::AuthIdentityStartEmailVerificationRequest, +) -> Result< + crate::models::AuthIdentityStartEmailVerificationResponse, + Error, +> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/auth/identity/email/start-verification", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = + local_var_req_builder.json(&auth_identity_start_email_verification_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } - diff --git a/sdks/api/full/rust/src/apis/auth_tokens_api.rs b/sdks/api/full/rust/src/apis/auth_tokens_api.rs index 1890915227..e528d6d633 100644 --- a/sdks/api/full/rust/src/apis/auth_tokens_api.rs +++ b/sdks/api/full/rust/src/apis/auth_tokens_api.rs @@ -4,60 +4,69 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`auth_tokens_refresh_identity_token`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum AuthTokensRefreshIdentityTokenError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - /// Refreshes the current identity's token and sets authentication headers. -pub async fn auth_tokens_refresh_identity_token(configuration: &configuration::Configuration, auth_refresh_identity_token_request: crate::models::AuthRefreshIdentityTokenRequest) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/auth/tokens/identity", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&auth_refresh_identity_token_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} +pub async fn auth_tokens_refresh_identity_token( + configuration: &configuration::Configuration, + auth_refresh_identity_token_request: crate::models::AuthRefreshIdentityTokenRequest, +) -> Result< + crate::models::AuthRefreshIdentityTokenResponse, + Error, +> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + let local_var_uri_str = format!("{}/auth/tokens/identity", local_var_configuration.base_path); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&auth_refresh_identity_token_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } +} diff --git a/sdks/api/full/rust/src/apis/builds_api.rs b/sdks/api/full/rust/src/apis/builds_api.rs index 5627e82813..5db7b43344 100644 --- a/sdks/api/full/rust/src/apis/builds_api.rs +++ b/sdks/api/full/rust/src/apis/builds_api.rs @@ -4,269 +4,349 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`builds_complete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum BuildsCompleteError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`builds_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum BuildsGetError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`builds_list`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum BuildsListError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`builds_patch_tags`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum BuildsPatchTagsError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`builds_prepare`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum BuildsPrepareError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - /// Marks an upload as complete. -pub async fn builds_complete(configuration: &configuration::Configuration, build: &str, project: Option<&str>, environment: Option<&str>) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/builds/{build}/complete", local_var_configuration.base_path, build=crate::apis::urlencode(build)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = project { - local_var_req_builder = local_var_req_builder.query(&[("project", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = environment { - local_var_req_builder = local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn builds_complete( + configuration: &configuration::Configuration, + build: &str, + project: Option<&str>, + environment: Option<&str>, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/builds/{build}/complete", + local_var_configuration.base_path, + build = crate::apis::urlencode(build) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = project { + local_var_req_builder = + local_var_req_builder.query(&[("project", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = environment { + local_var_req_builder = + local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Get a build. -pub async fn builds_get(configuration: &configuration::Configuration, build: &str, project: Option<&str>, environment: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/builds/{build}", local_var_configuration.base_path, build=crate::apis::urlencode(build)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = project { - local_var_req_builder = local_var_req_builder.query(&[("project", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = environment { - local_var_req_builder = local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn builds_get( + configuration: &configuration::Configuration, + build: &str, + project: Option<&str>, + environment: Option<&str>, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/builds/{build}", + local_var_configuration.base_path, + build = crate::apis::urlencode(build) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = project { + local_var_req_builder = + local_var_req_builder.query(&[("project", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = environment { + local_var_req_builder = + local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Lists all builds of the project associated with the token used. Can be filtered by tags in the query string. -pub async fn builds_list(configuration: &configuration::Configuration, project: Option<&str>, environment: Option<&str>, tags_json: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/builds", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = project { - local_var_req_builder = local_var_req_builder.query(&[("project", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = environment { - local_var_req_builder = local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = tags_json { - local_var_req_builder = local_var_req_builder.query(&[("tags_json", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn builds_list( + configuration: &configuration::Configuration, + project: Option<&str>, + environment: Option<&str>, + tags_json: Option<&str>, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/builds", local_var_configuration.base_path); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = project { + local_var_req_builder = + local_var_req_builder.query(&[("project", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = environment { + local_var_req_builder = + local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = tags_json { + local_var_req_builder = + local_var_req_builder.query(&[("tags_json", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } -pub async fn builds_patch_tags(configuration: &configuration::Configuration, build: &str, builds_patch_build_tags_request: crate::models::BuildsPatchBuildTagsRequest, project: Option<&str>, environment: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/builds/{build}/tags", local_var_configuration.base_path, build=crate::apis::urlencode(build)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = project { - local_var_req_builder = local_var_req_builder.query(&[("project", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = environment { - local_var_req_builder = local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&builds_patch_build_tags_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn builds_patch_tags( + configuration: &configuration::Configuration, + build: &str, + builds_patch_build_tags_request: crate::models::BuildsPatchBuildTagsRequest, + project: Option<&str>, + environment: Option<&str>, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/builds/{build}/tags", + local_var_configuration.base_path, + build = crate::apis::urlencode(build) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = project { + local_var_req_builder = + local_var_req_builder.query(&[("project", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = environment { + local_var_req_builder = + local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&builds_patch_build_tags_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Creates a new project build for the given project. -pub async fn builds_prepare(configuration: &configuration::Configuration, builds_prepare_build_request: crate::models::BuildsPrepareBuildRequest, project: Option<&str>, environment: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/builds/prepare", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = project { - local_var_req_builder = local_var_req_builder.query(&[("project", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = environment { - local_var_req_builder = local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&builds_prepare_build_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn builds_prepare( + configuration: &configuration::Configuration, + builds_prepare_build_request: crate::models::BuildsPrepareBuildRequest, + project: Option<&str>, + environment: Option<&str>, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/builds/prepare", local_var_configuration.base_path); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = project { + local_var_req_builder = + local_var_req_builder.query(&[("project", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = environment { + local_var_req_builder = + local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&builds_prepare_build_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } - diff --git a/sdks/api/full/rust/src/apis/cloud_api.rs b/sdks/api/full/rust/src/apis/cloud_api.rs index a440747fbd..60482ad366 100644 --- a/sdks/api/full/rust/src/apis/cloud_api.rs +++ b/sdks/api/full/rust/src/apis/cloud_api.rs @@ -4,59 +4,64 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`cloud_bootstrap`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudBootstrapError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - /// Returns the basic information required to use the cloud APIs. -pub async fn cloud_bootstrap(configuration: &configuration::Configuration, ) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/bootstrap", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} +pub async fn cloud_bootstrap( + configuration: &configuration::Configuration, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + let local_var_uri_str = format!("{}/cloud/bootstrap", local_var_configuration.base_path); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } +} diff --git a/sdks/api/full/rust/src/apis/cloud_auth_api.rs b/sdks/api/full/rust/src/apis/cloud_auth_api.rs index dd9b6ace1c..e400bc46b1 100644 --- a/sdks/api/full/rust/src/apis/cloud_auth_api.rs +++ b/sdks/api/full/rust/src/apis/cloud_auth_api.rs @@ -4,59 +4,64 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`cloud_auth_inspect`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudAuthInspectError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - /// Returns information about the current authenticated agent. -pub async fn cloud_auth_inspect(configuration: &configuration::Configuration, ) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/auth/inspect", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} +pub async fn cloud_auth_inspect( + configuration: &configuration::Configuration, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + let local_var_uri_str = format!("{}/cloud/auth/inspect", local_var_configuration.base_path); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } +} diff --git a/sdks/api/full/rust/src/apis/cloud_devices_links_api.rs b/sdks/api/full/rust/src/apis/cloud_devices_links_api.rs index ded16ed7e6..2d5c04d917 100644 --- a/sdks/api/full/rust/src/apis/cloud_devices_links_api.rs +++ b/sdks/api/full/rust/src/apis/cloud_devices_links_api.rs @@ -4,140 +4,174 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`cloud_devices_links_complete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudDevicesLinksCompleteError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_devices_links_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudDevicesLinksGetError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_devices_links_prepare`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudDevicesLinksPrepareError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - -pub async fn cloud_devices_links_complete(configuration: &configuration::Configuration, cloud_devices_complete_device_link_request: crate::models::CloudDevicesCompleteDeviceLinkRequest) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/devices/links/complete", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&cloud_devices_complete_device_link_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_devices_links_complete( + configuration: &configuration::Configuration, + cloud_devices_complete_device_link_request: crate::models::CloudDevicesCompleteDeviceLinkRequest, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/devices/links/complete", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + local_var_req_builder = local_var_req_builder.json(&cloud_devices_complete_device_link_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } -pub async fn cloud_devices_links_get(configuration: &configuration::Configuration, device_link_token: &str, watch_index: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/devices/links", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - local_var_req_builder = local_var_req_builder.query(&[("device_link_token", &device_link_token.to_string())]); - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_devices_links_get( + configuration: &configuration::Configuration, + device_link_token: &str, + watch_index: Option<&str>, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/devices/links", local_var_configuration.base_path); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = + local_var_req_builder.query(&[("device_link_token", &device_link_token.to_string())]); + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = + local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } -pub async fn cloud_devices_links_prepare(configuration: &configuration::Configuration, ) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/devices/links", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_devices_links_prepare( + configuration: &configuration::Configuration, +) -> Result< + crate::models::CloudDevicesPrepareDeviceLinkResponse, + Error, +> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/devices/links", local_var_configuration.base_path); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } - diff --git a/sdks/api/full/rust/src/apis/cloud_games_api.rs b/sdks/api/full/rust/src/apis/cloud_games_api.rs index b9a0a98e2b..455760ed69 100644 --- a/sdks/api/full/rust/src/apis/cloud_games_api.rs +++ b/sdks/api/full/rust/src/apis/cloud_games_api.rs @@ -4,377 +4,490 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`cloud_games_create_game`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesCreateGameError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_game_banner_upload_complete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesGameBannerUploadCompleteError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_game_banner_upload_prepare`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesGameBannerUploadPrepareError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_game_logo_upload_complete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesGameLogoUploadCompleteError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_game_logo_upload_prepare`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesGameLogoUploadPrepareError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_get_game_by_id`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesGetGameByIdError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_get_games`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesGetGamesError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_validate_game`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesValidateGameError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - /// Creates a new game. -pub async fn cloud_games_create_game(configuration: &configuration::Configuration, cloud_games_create_game_request: crate::models::CloudGamesCreateGameRequest) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&cloud_games_create_game_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_create_game( + configuration: &configuration::Configuration, + cloud_games_create_game_request: crate::models::CloudGamesCreateGameRequest, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games", local_var_configuration.base_path); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&cloud_games_create_game_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Completes an game banner image upload. Must be called after the file upload process completes. -pub async fn cloud_games_game_banner_upload_complete(configuration: &configuration::Configuration, game_id: &str, upload_id: &str) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/banner-upload/{upload_id}/complete", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), upload_id=crate::apis::urlencode(upload_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_game_banner_upload_complete( + configuration: &configuration::Configuration, + game_id: &str, + upload_id: &str, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/banner-upload/{upload_id}/complete", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id), + upload_id = crate::apis::urlencode(upload_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Prepares a game banner image upload. -pub async fn cloud_games_game_banner_upload_prepare(configuration: &configuration::Configuration, game_id: &str, cloud_games_game_banner_upload_prepare_request: crate::models::CloudGamesGameBannerUploadPrepareRequest) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/banner-upload/prepare", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&cloud_games_game_banner_upload_prepare_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_game_banner_upload_prepare( + configuration: &configuration::Configuration, + game_id: &str, + cloud_games_game_banner_upload_prepare_request: crate::models::CloudGamesGameBannerUploadPrepareRequest, +) -> Result< + crate::models::CloudGamesGameBannerUploadPrepareResponse, + Error, +> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/banner-upload/prepare", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = + local_var_req_builder.json(&cloud_games_game_banner_upload_prepare_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Completes a game logo image upload. Must be called after the file upload process completes. -pub async fn cloud_games_game_logo_upload_complete(configuration: &configuration::Configuration, game_id: &str, upload_id: &str) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/logo-upload/{upload_id}/complete", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), upload_id=crate::apis::urlencode(upload_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_game_logo_upload_complete( + configuration: &configuration::Configuration, + game_id: &str, + upload_id: &str, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/logo-upload/{upload_id}/complete", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id), + upload_id = crate::apis::urlencode(upload_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Prepares a game logo image upload. -pub async fn cloud_games_game_logo_upload_prepare(configuration: &configuration::Configuration, game_id: &str, cloud_games_game_logo_upload_prepare_request: crate::models::CloudGamesGameLogoUploadPrepareRequest) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/logo-upload/prepare", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&cloud_games_game_logo_upload_prepare_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_game_logo_upload_prepare( + configuration: &configuration::Configuration, + game_id: &str, + cloud_games_game_logo_upload_prepare_request: crate::models::CloudGamesGameLogoUploadPrepareRequest, +) -> Result< + crate::models::CloudGamesGameLogoUploadPrepareResponse, + Error, +> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/logo-upload/prepare", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = + local_var_req_builder.json(&cloud_games_game_logo_upload_prepare_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Returns a game by its game id. -pub async fn cloud_games_get_game_by_id(configuration: &configuration::Configuration, game_id: &str, watch_index: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_get_game_by_id( + configuration: &configuration::Configuration, + game_id: &str, + watch_index: Option<&str>, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = + local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Returns a list of games in which the current identity is a group member of its development team. -pub async fn cloud_games_get_games(configuration: &configuration::Configuration, watch_index: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_get_games( + configuration: &configuration::Configuration, + watch_index: Option<&str>, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games", local_var_configuration.base_path); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = + local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Validates information used to create a new game. -pub async fn cloud_games_validate_game(configuration: &configuration::Configuration, cloud_games_validate_game_request: crate::models::CloudGamesValidateGameRequest) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/validate", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&cloud_games_validate_game_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_validate_game( + configuration: &configuration::Configuration, + cloud_games_validate_game_request: crate::models::CloudGamesValidateGameRequest, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/cloud/games/validate", local_var_configuration.base_path); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&cloud_games_validate_game_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } - diff --git a/sdks/api/full/rust/src/apis/cloud_games_avatars_api.rs b/sdks/api/full/rust/src/apis/cloud_games_avatars_api.rs index f8f658cb3b..f04e020c20 100644 --- a/sdks/api/full/rust/src/apis/cloud_games_avatars_api.rs +++ b/sdks/api/full/rust/src/apis/cloud_games_avatars_api.rs @@ -4,148 +4,196 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`cloud_games_avatars_complete_custom_avatar_upload`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesAvatarsCompleteCustomAvatarUploadError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_avatars_list_game_custom_avatars`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesAvatarsListGameCustomAvatarsError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_avatars_prepare_custom_avatar_upload`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesAvatarsPrepareCustomAvatarUploadError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - /// Completes a custom avatar image upload. Must be called after the file upload process completes. -pub async fn cloud_games_avatars_complete_custom_avatar_upload(configuration: &configuration::Configuration, game_id: &str, upload_id: &str) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/avatar-upload/{upload_id}/complete", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), upload_id=crate::apis::urlencode(upload_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_avatars_complete_custom_avatar_upload( + configuration: &configuration::Configuration, + game_id: &str, + upload_id: &str, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/avatar-upload/{upload_id}/complete", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id), + upload_id = crate::apis::urlencode(upload_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Lists custom avatars for the given game. -pub async fn cloud_games_avatars_list_game_custom_avatars(configuration: &configuration::Configuration, game_id: &str) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/avatars", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_avatars_list_game_custom_avatars( + configuration: &configuration::Configuration, + game_id: &str, +) -> Result< + crate::models::CloudGamesListGameCustomAvatarsResponse, + Error, +> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/avatars", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Prepares a custom avatar image upload. Complete upload with `rivet.api.cloud#CompleteCustomAvatarUpload`. -pub async fn cloud_games_avatars_prepare_custom_avatar_upload(configuration: &configuration::Configuration, game_id: &str, cloud_games_prepare_custom_avatar_upload_request: crate::models::CloudGamesPrepareCustomAvatarUploadRequest) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/prepare", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&cloud_games_prepare_custom_avatar_upload_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_avatars_prepare_custom_avatar_upload( + configuration: &configuration::Configuration, + game_id: &str, + cloud_games_prepare_custom_avatar_upload_request: crate::models::CloudGamesPrepareCustomAvatarUploadRequest, +) -> Result< + crate::models::CloudGamesPrepareCustomAvatarUploadResponse, + Error, +> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/prepare", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = + local_var_req_builder.json(&cloud_games_prepare_custom_avatar_upload_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } - diff --git a/sdks/api/full/rust/src/apis/cloud_games_builds_api.rs b/sdks/api/full/rust/src/apis/cloud_games_builds_api.rs index d1bc1e91f6..8dcd39fabd 100644 --- a/sdks/api/full/rust/src/apis/cloud_games_builds_api.rs +++ b/sdks/api/full/rust/src/apis/cloud_games_builds_api.rs @@ -4,104 +4,135 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`cloud_games_builds_create_game_build`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesBuildsCreateGameBuildError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_builds_list_game_builds`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesBuildsListGameBuildsError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - /// Creates a new game build for the given game. -pub async fn cloud_games_builds_create_game_build(configuration: &configuration::Configuration, game_id: &str, cloud_games_create_game_build_request: crate::models::CloudGamesCreateGameBuildRequest) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/builds", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&cloud_games_create_game_build_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_builds_create_game_build( + configuration: &configuration::Configuration, + game_id: &str, + cloud_games_create_game_build_request: crate::models::CloudGamesCreateGameBuildRequest, +) -> Result< + crate::models::CloudGamesCreateGameBuildResponse, + Error, +> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/builds", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&cloud_games_create_game_build_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Lists game builds for the given game. -pub async fn cloud_games_builds_list_game_builds(configuration: &configuration::Configuration, game_id: &str) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/builds", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_builds_list_game_builds( + configuration: &configuration::Configuration, + game_id: &str, +) -> Result< + crate::models::CloudGamesListGameBuildsResponse, + Error, +> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/builds", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } - diff --git a/sdks/api/full/rust/src/apis/cloud_games_cdn_api.rs b/sdks/api/full/rust/src/apis/cloud_games_cdn_api.rs index 7e017e7854..3c11c484c9 100644 --- a/sdks/api/full/rust/src/apis/cloud_games_cdn_api.rs +++ b/sdks/api/full/rust/src/apis/cloud_games_cdn_api.rs @@ -4,104 +4,135 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`cloud_games_cdn_create_game_cdn_site`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesCdnCreateGameCdnSiteError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_cdn_list_game_cdn_sites`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesCdnListGameCdnSitesError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - /// Creates a new CDN site for the given game. -pub async fn cloud_games_cdn_create_game_cdn_site(configuration: &configuration::Configuration, game_id: &str, cloud_games_create_game_cdn_site_request: crate::models::CloudGamesCreateGameCdnSiteRequest) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/cdn/sites", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&cloud_games_create_game_cdn_site_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_cdn_create_game_cdn_site( + configuration: &configuration::Configuration, + game_id: &str, + cloud_games_create_game_cdn_site_request: crate::models::CloudGamesCreateGameCdnSiteRequest, +) -> Result< + crate::models::CloudGamesCreateGameCdnSiteResponse, + Error, +> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/cdn/sites", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&cloud_games_create_game_cdn_site_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Lists CDN sites for a game. -pub async fn cloud_games_cdn_list_game_cdn_sites(configuration: &configuration::Configuration, game_id: &str) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/cdn/sites", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_cdn_list_game_cdn_sites( + configuration: &configuration::Configuration, + game_id: &str, +) -> Result< + crate::models::CloudGamesListGameCdnSitesResponse, + Error, +> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/cdn/sites", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } - diff --git a/sdks/api/full/rust/src/apis/cloud_games_matchmaker_api.rs b/sdks/api/full/rust/src/apis/cloud_games_matchmaker_api.rs index 81ac9a1086..dd9e9dd021 100644 --- a/sdks/api/full/rust/src/apis/cloud_games_matchmaker_api.rs +++ b/sdks/api/full/rust/src/apis/cloud_games_matchmaker_api.rs @@ -4,197 +4,273 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`cloud_games_matchmaker_delete_matchmaker_lobby`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesMatchmakerDeleteMatchmakerLobbyError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_matchmaker_export_lobby_logs`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesMatchmakerExportLobbyLogsError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_matchmaker_export_matchmaker_lobby_history`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesMatchmakerExportMatchmakerLobbyHistoryError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_matchmaker_get_lobby_logs`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesMatchmakerGetLobbyLogsError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - /// Deletes a matchmaker lobby, stopping it immediately. -pub async fn cloud_games_matchmaker_delete_matchmaker_lobby(configuration: &configuration::Configuration, game_id: &str, lobby_id: &str) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/matchmaker/lobbies/{lobby_id}", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), lobby_id=crate::apis::urlencode(lobby_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_matchmaker_delete_matchmaker_lobby( + configuration: &configuration::Configuration, + game_id: &str, + lobby_id: &str, +) -> Result< + crate::models::CloudGamesDeleteMatchmakerLobbyResponse, + Error, +> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/matchmaker/lobbies/{lobby_id}", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id), + lobby_id = crate::apis::urlencode(lobby_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Generates a download URL for logs. -pub async fn cloud_games_matchmaker_export_lobby_logs(configuration: &configuration::Configuration, game_id: &str, lobby_id: &str, cloud_games_export_lobby_logs_request: crate::models::CloudGamesExportLobbyLogsRequest) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/matchmaker/lobbies/{lobby_id}/logs/export", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), lobby_id=crate::apis::urlencode(lobby_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&cloud_games_export_lobby_logs_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_matchmaker_export_lobby_logs( + configuration: &configuration::Configuration, + game_id: &str, + lobby_id: &str, + cloud_games_export_lobby_logs_request: crate::models::CloudGamesExportLobbyLogsRequest, +) -> Result< + crate::models::CloudGamesExportLobbyLogsResponse, + Error, +> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/matchmaker/lobbies/{lobby_id}/logs/export", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id), + lobby_id = crate::apis::urlencode(lobby_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&cloud_games_export_lobby_logs_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Exports lobby history over a given query time span. -pub async fn cloud_games_matchmaker_export_matchmaker_lobby_history(configuration: &configuration::Configuration, game_id: &str, cloud_games_export_matchmaker_lobby_history_request: crate::models::CloudGamesExportMatchmakerLobbyHistoryRequest) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/matchmaker/lobbies/export-history", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&cloud_games_export_matchmaker_lobby_history_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_matchmaker_export_matchmaker_lobby_history( + configuration: &configuration::Configuration, + game_id: &str, + cloud_games_export_matchmaker_lobby_history_request: crate::models::CloudGamesExportMatchmakerLobbyHistoryRequest, +) -> Result< + crate::models::CloudGamesExportMatchmakerLobbyHistoryResponse, + Error, +> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/matchmaker/lobbies/export-history", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = + local_var_req_builder.json(&cloud_games_export_matchmaker_lobby_history_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Returns the logs for a given lobby. -pub async fn cloud_games_matchmaker_get_lobby_logs(configuration: &configuration::Configuration, game_id: &str, lobby_id: &str, stream: crate::models::CloudGamesLogStream, watch_index: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/matchmaker/lobbies/{lobby_id}/logs", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), lobby_id=crate::apis::urlencode(lobby_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - local_var_req_builder = local_var_req_builder.query(&[("stream", &stream.to_string())]); - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_matchmaker_get_lobby_logs( + configuration: &configuration::Configuration, + game_id: &str, + lobby_id: &str, + stream: crate::models::CloudGamesLogStream, + watch_index: Option<&str>, +) -> Result< + crate::models::CloudGamesGetLobbyLogsResponse, + Error, +> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/matchmaker/lobbies/{lobby_id}/logs", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id), + lobby_id = crate::apis::urlencode(lobby_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("stream", &stream.to_string())]); + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = + local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } - diff --git a/sdks/api/full/rust/src/apis/cloud_games_namespaces_analytics_api.rs b/sdks/api/full/rust/src/apis/cloud_games_namespaces_analytics_api.rs index 07ac2d5954..3ea7312a59 100644 --- a/sdks/api/full/rust/src/apis/cloud_games_namespaces_analytics_api.rs +++ b/sdks/api/full/rust/src/apis/cloud_games_namespaces_analytics_api.rs @@ -4,59 +4,74 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`cloud_games_namespaces_analytics_get_analytics_matchmaker_live`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesAnalyticsGetAnalyticsMatchmakerLiveError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - /// Returns live information about all active lobbies for a given namespace. -pub async fn cloud_games_namespaces_analytics_get_analytics_matchmaker_live(configuration: &configuration::Configuration, game_id: &str, namespace_id: &str) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces/{namespace_id}/analytics/matchmaker/live", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), namespace_id=crate::apis::urlencode(namespace_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} +pub async fn cloud_games_namespaces_analytics_get_analytics_matchmaker_live( + configuration: &configuration::Configuration, + game_id: &str, + namespace_id: &str, +) -> Result< + crate::models::CloudGamesNamespacesGetAnalyticsMatchmakerLiveResponse, + Error, +> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/namespaces/{namespace_id}/analytics/matchmaker/live", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id), + namespace_id = crate::apis::urlencode(namespace_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } +} diff --git a/sdks/api/full/rust/src/apis/cloud_games_namespaces_api.rs b/sdks/api/full/rust/src/apis/cloud_games_namespaces_api.rs index db4128e3af..89824582e0 100644 --- a/sdks/api/full/rust/src/apis/cloud_games_namespaces_api.rs +++ b/sdks/api/full/rust/src/apis/cloud_games_namespaces_api.rs @@ -4,736 +4,1040 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`cloud_games_namespaces_add_namespace_domain`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesAddNamespaceDomainError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_namespaces_create_game_namespace`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesCreateGameNamespaceError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_namespaces_create_game_namespace_token_development`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_namespaces_create_game_namespace_token_public`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesCreateGameNamespaceTokenPublicError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_namespaces_get_game_namespace_by_id`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesGetGameNamespaceByIdError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_namespaces_get_game_namespace_version_history_list`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesGetGameNamespaceVersionHistoryListError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_namespaces_remove_namespace_cdn_auth_user`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesRemoveNamespaceCdnAuthUserError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_namespaces_remove_namespace_domain`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesRemoveNamespaceDomainError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_namespaces_set_namespace_cdn_auth_type`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesSetNamespaceCdnAuthTypeError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_namespaces_toggle_namespace_domain_public_auth`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesToggleNamespaceDomainPublicAuthError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_namespaces_update_game_namespace_matchmaker_config`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesUpdateGameNamespaceMatchmakerConfigError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_namespaces_update_game_namespace_version`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesUpdateGameNamespaceVersionError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_namespaces_update_namespace_cdn_auth_user`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesUpdateNamespaceCdnAuthUserError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_namespaces_validate_game_namespace`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesValidateGameNamespaceError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_namespaces_validate_game_namespace_matchmaker_config`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_namespaces_validate_game_namespace_token_development`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - /// Adds a domain to the given game namespace. -pub async fn cloud_games_namespaces_add_namespace_domain(configuration: &configuration::Configuration, game_id: &str, namespace_id: &str, cloud_games_namespaces_add_namespace_domain_request: crate::models::CloudGamesNamespacesAddNamespaceDomainRequest) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces/{namespace_id}/domains", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), namespace_id=crate::apis::urlencode(namespace_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&cloud_games_namespaces_add_namespace_domain_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_namespaces_add_namespace_domain( + configuration: &configuration::Configuration, + game_id: &str, + namespace_id: &str, + cloud_games_namespaces_add_namespace_domain_request: crate::models::CloudGamesNamespacesAddNamespaceDomainRequest, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/namespaces/{namespace_id}/domains", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id), + namespace_id = crate::apis::urlencode(namespace_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = + local_var_req_builder.json(&cloud_games_namespaces_add_namespace_domain_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Creates a new namespace for the given game. -pub async fn cloud_games_namespaces_create_game_namespace(configuration: &configuration::Configuration, game_id: &str, cloud_games_namespaces_create_game_namespace_request: crate::models::CloudGamesNamespacesCreateGameNamespaceRequest) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&cloud_games_namespaces_create_game_namespace_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_namespaces_create_game_namespace( + configuration: &configuration::Configuration, + game_id: &str, + cloud_games_namespaces_create_game_namespace_request: crate::models::CloudGamesNamespacesCreateGameNamespaceRequest, +) -> Result< + crate::models::CloudGamesNamespacesCreateGameNamespaceResponse, + Error, +> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/namespaces", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = + local_var_req_builder.json(&cloud_games_namespaces_create_game_namespace_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Creates a development token for the given namespace. -pub async fn cloud_games_namespaces_create_game_namespace_token_development(configuration: &configuration::Configuration, game_id: &str, namespace_id: &str, cloud_games_namespaces_create_game_namespace_token_development_request: crate::models::CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentRequest) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces/{namespace_id}/tokens/development", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), namespace_id=crate::apis::urlencode(namespace_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&cloud_games_namespaces_create_game_namespace_token_development_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_namespaces_create_game_namespace_token_development( + configuration: &configuration::Configuration, + game_id: &str, + namespace_id: &str, + cloud_games_namespaces_create_game_namespace_token_development_request: crate::models::CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentRequest, +) -> Result< + crate::models::CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentResponse, + Error, +> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/namespaces/{namespace_id}/tokens/development", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id), + namespace_id = crate::apis::urlencode(namespace_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder + .json(&cloud_games_namespaces_create_game_namespace_token_development_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Creates a public token for the given namespace. -pub async fn cloud_games_namespaces_create_game_namespace_token_public(configuration: &configuration::Configuration, game_id: &str, namespace_id: &str) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces/{namespace_id}/tokens/public", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), namespace_id=crate::apis::urlencode(namespace_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_namespaces_create_game_namespace_token_public( + configuration: &configuration::Configuration, + game_id: &str, + namespace_id: &str, +) -> Result< + crate::models::CloudGamesNamespacesCreateGameNamespaceTokenPublicResponse, + Error, +> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/namespaces/{namespace_id}/tokens/public", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id), + namespace_id = crate::apis::urlencode(namespace_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Gets a game namespace by namespace ID. -pub async fn cloud_games_namespaces_get_game_namespace_by_id(configuration: &configuration::Configuration, game_id: &str, namespace_id: &str) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces/{namespace_id}", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), namespace_id=crate::apis::urlencode(namespace_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_namespaces_get_game_namespace_by_id( + configuration: &configuration::Configuration, + game_id: &str, + namespace_id: &str, +) -> Result< + crate::models::CloudGamesNamespacesGetGameNamespaceByIdResponse, + Error, +> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/namespaces/{namespace_id}", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id), + namespace_id = crate::apis::urlencode(namespace_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Gets the version history for a given namespace. -pub async fn cloud_games_namespaces_get_game_namespace_version_history_list(configuration: &configuration::Configuration, game_id: &str, namespace_id: &str, anchor: Option<&str>, limit: Option) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces/{namespace_id}/version-history", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), namespace_id=crate::apis::urlencode(namespace_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = anchor { - local_var_req_builder = local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = limit { - local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_namespaces_get_game_namespace_version_history_list( + configuration: &configuration::Configuration, + game_id: &str, + namespace_id: &str, + anchor: Option<&str>, + limit: Option, +) -> Result< + crate::models::CloudGamesNamespacesGetGameNamespaceVersionHistoryResponse, + Error, +> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/namespaces/{namespace_id}/version-history", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id), + namespace_id = crate::apis::urlencode(namespace_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = anchor { + local_var_req_builder = + local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = limit { + local_var_req_builder = + local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Removes an authenticated user from the given game namespace. -pub async fn cloud_games_namespaces_remove_namespace_cdn_auth_user(configuration: &configuration::Configuration, game_id: &str, namespace_id: &str, user: &str) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces/{namespace_id}/auth-user/{user}", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), namespace_id=crate::apis::urlencode(namespace_id), user=crate::apis::urlencode(user)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_namespaces_remove_namespace_cdn_auth_user( + configuration: &configuration::Configuration, + game_id: &str, + namespace_id: &str, + user: &str, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/namespaces/{namespace_id}/auth-user/{user}", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id), + namespace_id = crate::apis::urlencode(namespace_id), + user = crate::apis::urlencode(user) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Removes a domain from the given game namespace. -pub async fn cloud_games_namespaces_remove_namespace_domain(configuration: &configuration::Configuration, game_id: &str, namespace_id: &str, domain: &str) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces/{namespace_id}/domains/{domain}", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), namespace_id=crate::apis::urlencode(namespace_id), domain=crate::apis::urlencode(domain)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_namespaces_remove_namespace_domain( + configuration: &configuration::Configuration, + game_id: &str, + namespace_id: &str, + domain: &str, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/namespaces/{namespace_id}/domains/{domain}", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id), + namespace_id = crate::apis::urlencode(namespace_id), + domain = crate::apis::urlencode(domain) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Updates the CDN authentication type of the given game namespace. -pub async fn cloud_games_namespaces_set_namespace_cdn_auth_type(configuration: &configuration::Configuration, game_id: &str, namespace_id: &str, cloud_games_namespaces_set_namespace_cdn_auth_type_request: crate::models::CloudGamesNamespacesSetNamespaceCdnAuthTypeRequest) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces/{namespace_id}/cdn-auth", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), namespace_id=crate::apis::urlencode(namespace_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&cloud_games_namespaces_set_namespace_cdn_auth_type_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_namespaces_set_namespace_cdn_auth_type( + configuration: &configuration::Configuration, + game_id: &str, + namespace_id: &str, + cloud_games_namespaces_set_namespace_cdn_auth_type_request: crate::models::CloudGamesNamespacesSetNamespaceCdnAuthTypeRequest, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/namespaces/{namespace_id}/cdn-auth", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id), + namespace_id = crate::apis::urlencode(namespace_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = + local_var_req_builder.json(&cloud_games_namespaces_set_namespace_cdn_auth_type_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Toggles whether or not to allow authentication based on domain for the given game namespace. -pub async fn cloud_games_namespaces_toggle_namespace_domain_public_auth(configuration: &configuration::Configuration, game_id: &str, namespace_id: &str, cloud_games_namespaces_toggle_namespace_domain_public_auth_request: crate::models::CloudGamesNamespacesToggleNamespaceDomainPublicAuthRequest) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces/{namespace_id}/domain-public-auth", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), namespace_id=crate::apis::urlencode(namespace_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&cloud_games_namespaces_toggle_namespace_domain_public_auth_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_namespaces_toggle_namespace_domain_public_auth( + configuration: &configuration::Configuration, + game_id: &str, + namespace_id: &str, + cloud_games_namespaces_toggle_namespace_domain_public_auth_request: crate::models::CloudGamesNamespacesToggleNamespaceDomainPublicAuthRequest, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/namespaces/{namespace_id}/domain-public-auth", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id), + namespace_id = crate::apis::urlencode(namespace_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder + .json(&cloud_games_namespaces_toggle_namespace_domain_public_auth_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Updates matchmaker config for the given game namespace. -pub async fn cloud_games_namespaces_update_game_namespace_matchmaker_config(configuration: &configuration::Configuration, game_id: &str, namespace_id: &str, cloud_games_namespaces_update_game_namespace_matchmaker_config_request: crate::models::CloudGamesNamespacesUpdateGameNamespaceMatchmakerConfigRequest) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces/{namespace_id}/mm-config", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), namespace_id=crate::apis::urlencode(namespace_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&cloud_games_namespaces_update_game_namespace_matchmaker_config_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_namespaces_update_game_namespace_matchmaker_config( + configuration: &configuration::Configuration, + game_id: &str, + namespace_id: &str, + cloud_games_namespaces_update_game_namespace_matchmaker_config_request: crate::models::CloudGamesNamespacesUpdateGameNamespaceMatchmakerConfigRequest, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/namespaces/{namespace_id}/mm-config", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id), + namespace_id = crate::apis::urlencode(namespace_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder + .json(&cloud_games_namespaces_update_game_namespace_matchmaker_config_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Updates the version of a game namespace. -pub async fn cloud_games_namespaces_update_game_namespace_version(configuration: &configuration::Configuration, game_id: &str, namespace_id: &str, cloud_games_namespaces_update_game_namespace_version_request: crate::models::CloudGamesNamespacesUpdateGameNamespaceVersionRequest) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces/{namespace_id}/version", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), namespace_id=crate::apis::urlencode(namespace_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&cloud_games_namespaces_update_game_namespace_version_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_namespaces_update_game_namespace_version( + configuration: &configuration::Configuration, + game_id: &str, + namespace_id: &str, + cloud_games_namespaces_update_game_namespace_version_request: crate::models::CloudGamesNamespacesUpdateGameNamespaceVersionRequest, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/namespaces/{namespace_id}/version", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id), + namespace_id = crate::apis::urlencode(namespace_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = + local_var_req_builder.json(&cloud_games_namespaces_update_game_namespace_version_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Adds an authenticated user to the given game namespace. -pub async fn cloud_games_namespaces_update_namespace_cdn_auth_user(configuration: &configuration::Configuration, game_id: &str, namespace_id: &str, cloud_games_namespaces_update_namespace_cdn_auth_user_request: crate::models::CloudGamesNamespacesUpdateNamespaceCdnAuthUserRequest) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces/{namespace_id}/auth-user", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), namespace_id=crate::apis::urlencode(namespace_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&cloud_games_namespaces_update_namespace_cdn_auth_user_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_namespaces_update_namespace_cdn_auth_user( + configuration: &configuration::Configuration, + game_id: &str, + namespace_id: &str, + cloud_games_namespaces_update_namespace_cdn_auth_user_request: crate::models::CloudGamesNamespacesUpdateNamespaceCdnAuthUserRequest, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/namespaces/{namespace_id}/auth-user", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id), + namespace_id = crate::apis::urlencode(namespace_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = + local_var_req_builder.json(&cloud_games_namespaces_update_namespace_cdn_auth_user_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Validates information used to create a new game namespace. -pub async fn cloud_games_namespaces_validate_game_namespace(configuration: &configuration::Configuration, game_id: &str, cloud_games_namespaces_validate_game_namespace_request: crate::models::CloudGamesNamespacesValidateGameNamespaceRequest) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces/validate", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&cloud_games_namespaces_validate_game_namespace_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_namespaces_validate_game_namespace( + configuration: &configuration::Configuration, + game_id: &str, + cloud_games_namespaces_validate_game_namespace_request: crate::models::CloudGamesNamespacesValidateGameNamespaceRequest, +) -> Result< + crate::models::CloudGamesNamespacesValidateGameNamespaceResponse, + Error, +> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/namespaces/validate", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = + local_var_req_builder.json(&cloud_games_namespaces_validate_game_namespace_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Validates information used to update a game namespace's matchmaker config. -pub async fn cloud_games_namespaces_validate_game_namespace_matchmaker_config(configuration: &configuration::Configuration, game_id: &str, namespace_id: &str, cloud_games_namespaces_validate_game_namespace_matchmaker_config_request: crate::models::CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigRequest) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces/{namespace_id}/mm-config/validate", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), namespace_id=crate::apis::urlencode(namespace_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&cloud_games_namespaces_validate_game_namespace_matchmaker_config_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_namespaces_validate_game_namespace_matchmaker_config( + configuration: &configuration::Configuration, + game_id: &str, + namespace_id: &str, + cloud_games_namespaces_validate_game_namespace_matchmaker_config_request: crate::models::CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigRequest, +) -> Result< + crate::models::CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigResponse, + Error, +> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/namespaces/{namespace_id}/mm-config/validate", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id), + namespace_id = crate::apis::urlencode(namespace_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder + .json(&cloud_games_namespaces_validate_game_namespace_matchmaker_config_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option< + CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigError, + > = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Validates information used to create a new game namespace development token. -pub async fn cloud_games_namespaces_validate_game_namespace_token_development(configuration: &configuration::Configuration, game_id: &str, namespace_id: &str, cloud_games_namespaces_validate_game_namespace_token_development_request: crate::models::CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentRequest) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces/{namespace_id}/tokens/development/validate", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), namespace_id=crate::apis::urlencode(namespace_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&cloud_games_namespaces_validate_game_namespace_token_development_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_namespaces_validate_game_namespace_token_development( + configuration: &configuration::Configuration, + game_id: &str, + namespace_id: &str, + cloud_games_namespaces_validate_game_namespace_token_development_request: crate::models::CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentRequest, +) -> Result< + crate::models::CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentResponse, + Error, +> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/namespaces/{namespace_id}/tokens/development/validate", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id), + namespace_id = crate::apis::urlencode(namespace_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder + .json(&cloud_games_namespaces_validate_game_namespace_token_development_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option< + CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentError, + > = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } - diff --git a/sdks/api/full/rust/src/apis/cloud_games_namespaces_logs_api.rs b/sdks/api/full/rust/src/apis/cloud_games_namespaces_logs_api.rs index 43e8b17d20..2a2849f0bd 100644 --- a/sdks/api/full/rust/src/apis/cloud_games_namespaces_logs_api.rs +++ b/sdks/api/full/rust/src/apis/cloud_games_namespaces_logs_api.rs @@ -4,106 +4,144 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`cloud_games_namespaces_logs_get_namespace_lobby`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesLogsGetNamespaceLobbyError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_namespaces_logs_list_namespace_lobbies`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesNamespacesLogsListNamespaceLobbiesError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - /// Returns a lobby from the given game namespace. -pub async fn cloud_games_namespaces_logs_get_namespace_lobby(configuration: &configuration::Configuration, game_id: &str, namespace_id: &str, lobby_id: &str) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces/{namespace_id}/logs/lobbies/{lobby_id}", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), namespace_id=crate::apis::urlencode(namespace_id), lobby_id=crate::apis::urlencode(lobby_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_namespaces_logs_get_namespace_lobby( + configuration: &configuration::Configuration, + game_id: &str, + namespace_id: &str, + lobby_id: &str, +) -> Result< + crate::models::CloudGamesNamespacesGetNamespaceLobbyResponse, + Error, +> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/namespaces/{namespace_id}/logs/lobbies/{lobby_id}", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id), + namespace_id = crate::apis::urlencode(namespace_id), + lobby_id = crate::apis::urlencode(lobby_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Returns a list of lobbies for the given game namespace. -pub async fn cloud_games_namespaces_logs_list_namespace_lobbies(configuration: &configuration::Configuration, game_id: &str, namespace_id: &str, before_create_ts: Option) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/namespaces/{namespace_id}/logs/lobbies", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), namespace_id=crate::apis::urlencode(namespace_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = before_create_ts { - local_var_req_builder = local_var_req_builder.query(&[("before_create_ts", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_namespaces_logs_list_namespace_lobbies( + configuration: &configuration::Configuration, + game_id: &str, + namespace_id: &str, + before_create_ts: Option, +) -> Result< + crate::models::CloudGamesNamespacesListNamespaceLobbiesResponse, + Error, +> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/namespaces/{namespace_id}/logs/lobbies", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id), + namespace_id = crate::apis::urlencode(namespace_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = before_create_ts { + local_var_req_builder = + local_var_req_builder.query(&[("before_create_ts", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } - diff --git a/sdks/api/full/rust/src/apis/cloud_games_tokens_api.rs b/sdks/api/full/rust/src/apis/cloud_games_tokens_api.rs index 42318b5460..b37531cc9a 100644 --- a/sdks/api/full/rust/src/apis/cloud_games_tokens_api.rs +++ b/sdks/api/full/rust/src/apis/cloud_games_tokens_api.rs @@ -4,59 +4,72 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`cloud_games_tokens_create_cloud_token`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesTokensCreateCloudTokenError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - /// Creates a new game cloud token. -pub async fn cloud_games_tokens_create_cloud_token(configuration: &configuration::Configuration, game_id: &str) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/tokens/cloud", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} +pub async fn cloud_games_tokens_create_cloud_token( + configuration: &configuration::Configuration, + game_id: &str, +) -> Result< + crate::models::CloudGamesCreateCloudTokenResponse, + Error, +> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/tokens/cloud", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } +} diff --git a/sdks/api/full/rust/src/apis/cloud_games_versions_api.rs b/sdks/api/full/rust/src/apis/cloud_games_versions_api.rs index 3b57b01cc3..a8b523d19a 100644 --- a/sdks/api/full/rust/src/apis/cloud_games_versions_api.rs +++ b/sdks/api/full/rust/src/apis/cloud_games_versions_api.rs @@ -4,193 +4,261 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`cloud_games_versions_create_game_version`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesVersionsCreateGameVersionError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_versions_get_game_version_by_id`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesVersionsGetGameVersionByIdError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_versions_reserve_version_name`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesVersionsReserveVersionNameError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`cloud_games_versions_validate_game_version`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGamesVersionsValidateGameVersionError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - /// Creates a new game version. -pub async fn cloud_games_versions_create_game_version(configuration: &configuration::Configuration, game_id: &str, cloud_games_create_game_version_request: crate::models::CloudGamesCreateGameVersionRequest) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/versions", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&cloud_games_create_game_version_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_versions_create_game_version( + configuration: &configuration::Configuration, + game_id: &str, + cloud_games_create_game_version_request: crate::models::CloudGamesCreateGameVersionRequest, +) -> Result< + crate::models::CloudGamesCreateGameVersionResponse, + Error, +> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/versions", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&cloud_games_create_game_version_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Returns a game version by its version ID. -pub async fn cloud_games_versions_get_game_version_by_id(configuration: &configuration::Configuration, game_id: &str, version_id: &str) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/versions/{version_id}", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), version_id=crate::apis::urlencode(version_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_versions_get_game_version_by_id( + configuration: &configuration::Configuration, + game_id: &str, + version_id: &str, +) -> Result< + crate::models::CloudGamesGetGameVersionByIdResponse, + Error, +> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/versions/{version_id}", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id), + version_id = crate::apis::urlencode(version_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Reserves a display name for the next version. Used to generate a monotomically increasing build number without causing a race condition with multiple versions getting created at the same time. -pub async fn cloud_games_versions_reserve_version_name(configuration: &configuration::Configuration, game_id: &str) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/versions/reserve-name", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_versions_reserve_version_name( + configuration: &configuration::Configuration, + game_id: &str, +) -> Result< + crate::models::CloudGamesReserveVersionNameResponse, + Error, +> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/versions/reserve-name", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Validates information used to create a new game version. -pub async fn cloud_games_versions_validate_game_version(configuration: &configuration::Configuration, game_id: &str, cloud_games_validate_game_version_request: crate::models::CloudGamesValidateGameVersionRequest) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/games/{game_id}/versions/validate", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&cloud_games_validate_game_version_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn cloud_games_versions_validate_game_version( + configuration: &configuration::Configuration, + game_id: &str, + cloud_games_validate_game_version_request: crate::models::CloudGamesValidateGameVersionRequest, +) -> Result< + crate::models::CloudGamesValidateGameVersionResponse, + Error, +> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/cloud/games/{game_id}/versions/validate", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&cloud_games_validate_game_version_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } - diff --git a/sdks/api/full/rust/src/apis/cloud_groups_api.rs b/sdks/api/full/rust/src/apis/cloud_groups_api.rs index 74d4ad260f..9bf1053e71 100644 --- a/sdks/api/full/rust/src/apis/cloud_groups_api.rs +++ b/sdks/api/full/rust/src/apis/cloud_groups_api.rs @@ -4,60 +4,69 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`cloud_groups_validate`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudGroupsValidateError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - /// Validates information used to create a new group. -pub async fn cloud_groups_validate(configuration: &configuration::Configuration, cloud_validate_group_request: crate::models::CloudValidateGroupRequest) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/groups/validate", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&cloud_validate_group_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} +pub async fn cloud_groups_validate( + configuration: &configuration::Configuration, + cloud_validate_group_request: crate::models::CloudValidateGroupRequest, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + let local_var_uri_str = format!( + "{}/cloud/groups/validate", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&cloud_validate_group_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } +} diff --git a/sdks/api/full/rust/src/apis/cloud_logs_api.rs b/sdks/api/full/rust/src/apis/cloud_logs_api.rs index 30436fa40d..0fc44fff99 100644 --- a/sdks/api/full/rust/src/apis/cloud_logs_api.rs +++ b/sdks/api/full/rust/src/apis/cloud_logs_api.rs @@ -4,59 +4,69 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`cloud_logs_get_ray_perf_logs`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudLogsGetRayPerfLogsError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - /// Returns performance information about a Rivet Ray. -pub async fn cloud_logs_get_ray_perf_logs(configuration: &configuration::Configuration, ray_id: &str) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/rays/{ray_id}/perf", local_var_configuration.base_path, ray_id=crate::apis::urlencode(ray_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} +pub async fn cloud_logs_get_ray_perf_logs( + configuration: &configuration::Configuration, + ray_id: &str, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + let local_var_uri_str = format!( + "{}/cloud/rays/{ray_id}/perf", + local_var_configuration.base_path, + ray_id = crate::apis::urlencode(ray_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } +} diff --git a/sdks/api/full/rust/src/apis/cloud_tiers_api.rs b/sdks/api/full/rust/src/apis/cloud_tiers_api.rs index 3f8df8ee31..cdecc649c7 100644 --- a/sdks/api/full/rust/src/apis/cloud_tiers_api.rs +++ b/sdks/api/full/rust/src/apis/cloud_tiers_api.rs @@ -4,59 +4,64 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`cloud_tiers_get_region_tiers`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudTiersGetRegionTiersError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - /// Returns all available region tiers. -pub async fn cloud_tiers_get_region_tiers(configuration: &configuration::Configuration, ) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/region-tiers", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} +pub async fn cloud_tiers_get_region_tiers( + configuration: &configuration::Configuration, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + let local_var_uri_str = format!("{}/cloud/region-tiers", local_var_configuration.base_path); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } +} diff --git a/sdks/api/full/rust/src/apis/cloud_uploads_api.rs b/sdks/api/full/rust/src/apis/cloud_uploads_api.rs index 5ff4809f43..685047855a 100644 --- a/sdks/api/full/rust/src/apis/cloud_uploads_api.rs +++ b/sdks/api/full/rust/src/apis/cloud_uploads_api.rs @@ -4,59 +4,69 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`cloud_uploads_complete_upload`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CloudUploadsCompleteUploadError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - /// Marks an upload as complete. -pub async fn cloud_uploads_complete_upload(configuration: &configuration::Configuration, upload_id: &str) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/cloud/uploads/{upload_id}/complete", local_var_configuration.base_path, upload_id=crate::apis::urlencode(upload_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} +pub async fn cloud_uploads_complete_upload( + configuration: &configuration::Configuration, + upload_id: &str, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + let local_var_uri_str = format!( + "{}/cloud/uploads/{upload_id}/complete", + local_var_configuration.base_path, + upload_id = crate::apis::urlencode(upload_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } +} diff --git a/sdks/api/full/rust/src/apis/configuration.rs b/sdks/api/full/rust/src/apis/configuration.rs index 6535a51c12..15eda335ca 100644 --- a/sdks/api/full/rust/src/apis/configuration.rs +++ b/sdks/api/full/rust/src/apis/configuration.rs @@ -4,50 +4,46 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - #[derive(Debug, Clone)] pub struct Configuration { - pub base_path: String, - pub user_agent: Option, - pub client: reqwest::Client, - pub basic_auth: Option, - pub oauth_access_token: Option, - pub bearer_access_token: Option, - pub api_key: Option, - // TODO: take an oauth2 token source, similar to the go one + pub base_path: String, + pub user_agent: Option, + pub client: reqwest::Client, + pub basic_auth: Option, + pub oauth_access_token: Option, + pub bearer_access_token: Option, + pub api_key: Option, + // TODO: take an oauth2 token source, similar to the go one } pub type BasicAuth = (String, Option); #[derive(Debug, Clone)] pub struct ApiKey { - pub prefix: Option, - pub key: String, + pub prefix: Option, + pub key: String, } - impl Configuration { - pub fn new() -> Configuration { - Configuration::default() - } + pub fn new() -> Configuration { + Configuration::default() + } } impl Default for Configuration { - fn default() -> Self { - Configuration { - base_path: "https://api.rivet.gg".to_owned(), - user_agent: Some("OpenAPI-Generator/0.0.1/rust".to_owned()), - client: reqwest::Client::new(), - basic_auth: None, - oauth_access_token: None, - bearer_access_token: None, - api_key: None, - - } - } + fn default() -> Self { + Configuration { + base_path: "https://api.rivet.gg".to_owned(), + user_agent: Some("OpenAPI-Generator/0.0.1/rust".to_owned()), + client: reqwest::Client::new(), + basic_auth: None, + oauth_access_token: None, + bearer_access_token: None, + api_key: None, + } + } } diff --git a/sdks/api/full/rust/src/apis/core_intercom_pegboard_api.rs b/sdks/api/full/rust/src/apis/core_intercom_pegboard_api.rs index ef9c8863a0..98f0e3ee4b 100644 --- a/sdks/api/full/rust/src/apis/core_intercom_pegboard_api.rs +++ b/sdks/api/full/rust/src/apis/core_intercom_pegboard_api.rs @@ -4,59 +4,71 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`core_intercom_pegboard_mark_client_registered`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum CoreIntercomPegboardMarkClientRegisteredError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } +pub async fn core_intercom_pegboard_mark_client_registered( + configuration: &configuration::Configuration, + client_id: &str, + core_intercom_pegboard_mark_client_registered_request: crate::models::CoreIntercomPegboardMarkClientRegisteredRequest, +) -> Result<(), Error> { + let local_var_configuration = configuration; -pub async fn core_intercom_pegboard_mark_client_registered(configuration: &configuration::Configuration, client_id: &str, core_intercom_pegboard_mark_client_registered_request: crate::models::CoreIntercomPegboardMarkClientRegisteredRequest) -> Result<(), Error> { - let local_var_configuration = configuration; + let local_var_client = &local_var_configuration.client; - let local_var_client = &local_var_configuration.client; + let local_var_uri_str = format!( + "{}/pegboard/client/{client_id}/registered", + local_var_configuration.base_path, + client_id = crate::apis::urlencode(client_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - let local_var_uri_str = format!("{}/pegboard/client/{client_id}/registered", local_var_configuration.base_path, client_id=crate::apis::urlencode(client_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = + local_var_req_builder.json(&core_intercom_pegboard_mark_client_registered_request); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&core_intercom_pegboard_mark_client_registered_request); + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } - diff --git a/sdks/api/full/rust/src/apis/edge_intercom_pegboard_api.rs b/sdks/api/full/rust/src/apis/edge_intercom_pegboard_api.rs index 490618c7bc..8d0442fab5 100644 --- a/sdks/api/full/rust/src/apis/edge_intercom_pegboard_api.rs +++ b/sdks/api/full/rust/src/apis/edge_intercom_pegboard_api.rs @@ -4,103 +4,130 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`edge_intercom_pegboard_prewarm_image`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum EdgeIntercomPegboardPrewarmImageError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`edge_intercom_pegboard_toggle_client_drain`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum EdgeIntercomPegboardToggleClientDrainError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - -pub async fn edge_intercom_pegboard_prewarm_image(configuration: &configuration::Configuration, image_id: &str, body: serde_json::Value) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/pegboard/image/{image_id}/prewarm", local_var_configuration.base_path, image_id=crate::apis::urlencode(image_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&body); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn edge_intercom_pegboard_prewarm_image( + configuration: &configuration::Configuration, + image_id: &str, + body: serde_json::Value, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/pegboard/image/{image_id}/prewarm", + local_var_configuration.base_path, + image_id = crate::apis::urlencode(image_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&body); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } -pub async fn edge_intercom_pegboard_toggle_client_drain(configuration: &configuration::Configuration, client_id: &str, edge_intercom_pegboard_toggle_client_drain_request: crate::models::EdgeIntercomPegboardToggleClientDrainRequest) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/pegboard/client/{client_id}/toggle-drain", local_var_configuration.base_path, client_id=crate::apis::urlencode(client_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&edge_intercom_pegboard_toggle_client_drain_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn edge_intercom_pegboard_toggle_client_drain( + configuration: &configuration::Configuration, + client_id: &str, + edge_intercom_pegboard_toggle_client_drain_request: crate::models::EdgeIntercomPegboardToggleClientDrainRequest, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/pegboard/client/{client_id}/toggle-drain", + local_var_configuration.base_path, + client_id = crate::apis::urlencode(client_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = + local_var_req_builder.json(&edge_intercom_pegboard_toggle_client_drain_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } - diff --git a/sdks/api/full/rust/src/apis/games_environments_tokens_api.rs b/sdks/api/full/rust/src/apis/games_environments_tokens_api.rs index a36af51a32..a23e9aedf7 100644 --- a/sdks/api/full/rust/src/apis/games_environments_tokens_api.rs +++ b/sdks/api/full/rust/src/apis/games_environments_tokens_api.rs @@ -4,59 +4,74 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`games_environments_tokens_create_service_token`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GamesEnvironmentsTokensCreateServiceTokenError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - /// Creates a new environment service token. -pub async fn games_environments_tokens_create_service_token(configuration: &configuration::Configuration, game_id: &str, environment_id: &str) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/games/{game_id}/environments/{environment_id}/tokens/service", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), environment_id=crate::apis::urlencode(environment_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} +pub async fn games_environments_tokens_create_service_token( + configuration: &configuration::Configuration, + game_id: &str, + environment_id: &str, +) -> Result< + crate::models::GamesEnvironmentsCreateServiceTokenResponse, + Error, +> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + let local_var_uri_str = format!( + "{}/games/{game_id}/environments/{environment_id}/tokens/service", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id), + environment_id = crate::apis::urlencode(environment_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } +} diff --git a/sdks/api/full/rust/src/apis/group_api.rs b/sdks/api/full/rust/src/apis/group_api.rs index a2e46b3ada..687ea14bc8 100644 --- a/sdks/api/full/rust/src/apis/group_api.rs +++ b/sdks/api/full/rust/src/apis/group_api.rs @@ -4,755 +4,996 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`group_ban_identity`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupBanIdentityError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`group_complete_avatar_upload`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupCompleteAvatarUploadError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`group_create`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupCreateError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`group_get_bans`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupGetBansError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`group_get_join_requests`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupGetJoinRequestsError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`group_get_members`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupGetMembersError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`group_get_profile`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupGetProfileError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`group_get_summary`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupGetSummaryError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`group_kick_member`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupKickMemberError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`group_leave`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupLeaveError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`group_list_suggested`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupListSuggestedError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`group_prepare_avatar_upload`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupPrepareAvatarUploadError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`group_transfer_ownership`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupTransferOwnershipError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`group_unban_identity`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupUnbanIdentityError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`group_update_profile`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupUpdateProfileError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`group_validate_profile`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupValidateProfileError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - /// Bans an identity from a group. Must be the owner of the group to perform this action. The banned identity will no longer be able to create a join request or use a group invite. -pub async fn group_ban_identity(configuration: &configuration::Configuration, group_id: &str, identity_id: &str) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/group/groups/{group_id}/bans/{identity_id}", local_var_configuration.base_path, group_id=crate::apis::urlencode(group_id), identity_id=crate::apis::urlencode(identity_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_ban_identity( + configuration: &configuration::Configuration, + group_id: &str, + identity_id: &str, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/group/groups/{group_id}/bans/{identity_id}", + local_var_configuration.base_path, + group_id = crate::apis::urlencode(group_id), + identity_id = crate::apis::urlencode(identity_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Completes an avatar image upload. Must be called after the file upload process completes. Call `rivet.api.group#PrepareAvatarUpload` first. -pub async fn group_complete_avatar_upload(configuration: &configuration::Configuration, group_id: &str, upload_id: &str) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/group/groups/{group_id}/avatar-upload/{upload_id}/complete", local_var_configuration.base_path, group_id=crate::apis::urlencode(group_id), upload_id=crate::apis::urlencode(upload_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_complete_avatar_upload( + configuration: &configuration::Configuration, + group_id: &str, + upload_id: &str, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/group/groups/{group_id}/avatar-upload/{upload_id}/complete", + local_var_configuration.base_path, + group_id = crate::apis::urlencode(group_id), + upload_id = crate::apis::urlencode(upload_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Creates a new group. -pub async fn group_create(configuration: &configuration::Configuration, group_create_request: crate::models::GroupCreateRequest) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/group/groups", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&group_create_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_create( + configuration: &configuration::Configuration, + group_create_request: crate::models::GroupCreateRequest, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/group/groups", local_var_configuration.base_path); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&group_create_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Returns a group's bans. Must have valid permissions to view. -pub async fn group_get_bans(configuration: &configuration::Configuration, group_id: &str, anchor: Option<&str>, count: Option, watch_index: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/group/groups/{group_id}/bans", local_var_configuration.base_path, group_id=crate::apis::urlencode(group_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = anchor { - local_var_req_builder = local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = count { - local_var_req_builder = local_var_req_builder.query(&[("count", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_get_bans( + configuration: &configuration::Configuration, + group_id: &str, + anchor: Option<&str>, + count: Option, + watch_index: Option<&str>, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/group/groups/{group_id}/bans", + local_var_configuration.base_path, + group_id = crate::apis::urlencode(group_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = anchor { + local_var_req_builder = + local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = count { + local_var_req_builder = + local_var_req_builder.query(&[("count", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = + local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Returns a group's join requests. Must have valid permissions to view. -pub async fn group_get_join_requests(configuration: &configuration::Configuration, group_id: &str, anchor: Option<&str>, count: Option, watch_index: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/group/groups/{group_id}/join-requests", local_var_configuration.base_path, group_id=crate::apis::urlencode(group_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = anchor { - local_var_req_builder = local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = count { - local_var_req_builder = local_var_req_builder.query(&[("count", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_get_join_requests( + configuration: &configuration::Configuration, + group_id: &str, + anchor: Option<&str>, + count: Option, + watch_index: Option<&str>, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/group/groups/{group_id}/join-requests", + local_var_configuration.base_path, + group_id = crate::apis::urlencode(group_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = anchor { + local_var_req_builder = + local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = count { + local_var_req_builder = + local_var_req_builder.query(&[("count", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = + local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Returns a group's members. -pub async fn group_get_members(configuration: &configuration::Configuration, group_id: &str, anchor: Option<&str>, count: Option, watch_index: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/group/groups/{group_id}/members", local_var_configuration.base_path, group_id=crate::apis::urlencode(group_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = anchor { - local_var_req_builder = local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = count { - local_var_req_builder = local_var_req_builder.query(&[("count", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_get_members( + configuration: &configuration::Configuration, + group_id: &str, + anchor: Option<&str>, + count: Option, + watch_index: Option<&str>, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/group/groups/{group_id}/members", + local_var_configuration.base_path, + group_id = crate::apis::urlencode(group_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = anchor { + local_var_req_builder = + local_var_req_builder.query(&[("anchor", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = count { + local_var_req_builder = + local_var_req_builder.query(&[("count", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = + local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Returns a group profile. -pub async fn group_get_profile(configuration: &configuration::Configuration, group_id: &str, watch_index: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/group/groups/{group_id}/profile", local_var_configuration.base_path, group_id=crate::apis::urlencode(group_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn group_get_summary(configuration: &configuration::Configuration, group_id: &str) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/group/groups/{group_id}/summary", local_var_configuration.base_path, group_id=crate::apis::urlencode(group_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_get_profile( + configuration: &configuration::Configuration, + group_id: &str, + watch_index: Option<&str>, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/group/groups/{group_id}/profile", + local_var_configuration.base_path, + group_id = crate::apis::urlencode(group_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = + local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } +} + +pub async fn group_get_summary( + configuration: &configuration::Configuration, + group_id: &str, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/group/groups/{group_id}/summary", + local_var_configuration.base_path, + group_id = crate::apis::urlencode(group_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Kicks an identity from a group. Must be the owner of the group to perform this action. -pub async fn group_kick_member(configuration: &configuration::Configuration, group_id: &str, identity_id: &str) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/group/groups/{group_id}/kick/{identity_id}", local_var_configuration.base_path, group_id=crate::apis::urlencode(group_id), identity_id=crate::apis::urlencode(identity_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_kick_member( + configuration: &configuration::Configuration, + group_id: &str, + identity_id: &str, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/group/groups/{group_id}/kick/{identity_id}", + local_var_configuration.base_path, + group_id = crate::apis::urlencode(group_id), + identity_id = crate::apis::urlencode(identity_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Leaves a group. -pub async fn group_leave(configuration: &configuration::Configuration, group_id: &str) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/group/groups/{group_id}/leave", local_var_configuration.base_path, group_id=crate::apis::urlencode(group_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_leave( + configuration: &configuration::Configuration, + group_id: &str, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/group/groups/{group_id}/leave", + local_var_configuration.base_path, + group_id = crate::apis::urlencode(group_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Returns a list of suggested groups. -pub async fn group_list_suggested(configuration: &configuration::Configuration, watch_index: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/group/groups", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_list_suggested( + configuration: &configuration::Configuration, + watch_index: Option<&str>, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/group/groups", local_var_configuration.base_path); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = + local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Prepares an avatar image upload. Complete upload with `rivet.api.group#CompleteAvatarUpload`. -pub async fn group_prepare_avatar_upload(configuration: &configuration::Configuration, group_prepare_avatar_upload_request: crate::models::GroupPrepareAvatarUploadRequest) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/group/groups/avatar-upload/prepare", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&group_prepare_avatar_upload_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_prepare_avatar_upload( + configuration: &configuration::Configuration, + group_prepare_avatar_upload_request: crate::models::GroupPrepareAvatarUploadRequest, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/group/groups/avatar-upload/prepare", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&group_prepare_avatar_upload_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Transfers ownership of a group to another identity. -pub async fn group_transfer_ownership(configuration: &configuration::Configuration, group_id: &str, group_transfer_ownership_request: crate::models::GroupTransferOwnershipRequest) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/group/groups/{group_id}/transfer-owner", local_var_configuration.base_path, group_id=crate::apis::urlencode(group_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&group_transfer_ownership_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_transfer_ownership( + configuration: &configuration::Configuration, + group_id: &str, + group_transfer_ownership_request: crate::models::GroupTransferOwnershipRequest, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/group/groups/{group_id}/transfer-owner", + local_var_configuration.base_path, + group_id = crate::apis::urlencode(group_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&group_transfer_ownership_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Unbans an identity from a group. Must be the owner of the group to perform this action. -pub async fn group_unban_identity(configuration: &configuration::Configuration, group_id: &str, identity_id: &str) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/group/groups/{group_id}/bans/{identity_id}", local_var_configuration.base_path, group_id=crate::apis::urlencode(group_id), identity_id=crate::apis::urlencode(identity_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -pub async fn group_update_profile(configuration: &configuration::Configuration, group_id: &str, group_update_profile_request: crate::models::GroupUpdateProfileRequest) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/group/groups/{group_id}/profile", local_var_configuration.base_path, group_id=crate::apis::urlencode(group_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&group_update_profile_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_unban_identity( + configuration: &configuration::Configuration, + group_id: &str, + identity_id: &str, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/group/groups/{group_id}/bans/{identity_id}", + local_var_configuration.base_path, + group_id = crate::apis::urlencode(group_id), + identity_id = crate::apis::urlencode(identity_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } +} + +pub async fn group_update_profile( + configuration: &configuration::Configuration, + group_id: &str, + group_update_profile_request: crate::models::GroupUpdateProfileRequest, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/group/groups/{group_id}/profile", + local_var_configuration.base_path, + group_id = crate::apis::urlencode(group_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&group_update_profile_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Validate contents of group profile. Use to provide immediate feedback on profile changes before committing them. -pub async fn group_validate_profile(configuration: &configuration::Configuration, group_validate_profile_request: crate::models::GroupValidateProfileRequest) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/group/groups/profile/validate", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&group_validate_profile_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_validate_profile( + configuration: &configuration::Configuration, + group_validate_profile_request: crate::models::GroupValidateProfileRequest, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/group/groups/profile/validate", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&group_validate_profile_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } - diff --git a/sdks/api/full/rust/src/apis/group_invites_api.rs b/sdks/api/full/rust/src/apis/group_invites_api.rs index 2940010eeb..74791d615b 100644 --- a/sdks/api/full/rust/src/apis/group_invites_api.rs +++ b/sdks/api/full/rust/src/apis/group_invites_api.rs @@ -4,148 +4,187 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`group_invites_consume_invite`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupInvitesConsumeInviteError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`group_invites_create_invite`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupInvitesCreateInviteError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`group_invites_get_invite`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupInvitesGetInviteError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - /// Consumes a group invite to join a group. -pub async fn group_invites_consume_invite(configuration: &configuration::Configuration, group_invite_code: &str) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/group/invites/{group_invite_code}/consume", local_var_configuration.base_path, group_invite_code=crate::apis::urlencode(group_invite_code)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_invites_consume_invite( + configuration: &configuration::Configuration, + group_invite_code: &str, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/group/invites/{group_invite_code}/consume", + local_var_configuration.base_path, + group_invite_code = crate::apis::urlencode(group_invite_code) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Creates a group invite. Can be shared with other identities to let them join this group. -pub async fn group_invites_create_invite(configuration: &configuration::Configuration, group_id: &str, group_create_invite_request: crate::models::GroupCreateInviteRequest) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/group/groups/{group_id}/invites", local_var_configuration.base_path, group_id=crate::apis::urlencode(group_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&group_create_invite_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_invites_create_invite( + configuration: &configuration::Configuration, + group_id: &str, + group_create_invite_request: crate::models::GroupCreateInviteRequest, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/group/groups/{group_id}/invites", + local_var_configuration.base_path, + group_id = crate::apis::urlencode(group_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&group_create_invite_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Inspects a group invite returning information about the team that created it. -pub async fn group_invites_get_invite(configuration: &configuration::Configuration, group_invite_code: &str) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/group/invites/{group_invite_code}", local_var_configuration.base_path, group_invite_code=crate::apis::urlencode(group_invite_code)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_invites_get_invite( + configuration: &configuration::Configuration, + group_invite_code: &str, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/group/invites/{group_invite_code}", + local_var_configuration.base_path, + group_invite_code = crate::apis::urlencode(group_invite_code) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } - diff --git a/sdks/api/full/rust/src/apis/group_join_requests_api.rs b/sdks/api/full/rust/src/apis/group_join_requests_api.rs index 1b345544c5..321fe0c58b 100644 --- a/sdks/api/full/rust/src/apis/group_join_requests_api.rs +++ b/sdks/api/full/rust/src/apis/group_join_requests_api.rs @@ -4,104 +4,131 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`group_join_requests_create_join_request`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupJoinRequestsCreateJoinRequestError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`group_join_requests_resolve_join_request`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GroupJoinRequestsResolveJoinRequestError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - /// Requests to join a group. -pub async fn group_join_requests_create_join_request(configuration: &configuration::Configuration, group_id: &str) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/group/groups/{group_id}/join-request", local_var_configuration.base_path, group_id=crate::apis::urlencode(group_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_join_requests_create_join_request( + configuration: &configuration::Configuration, + group_id: &str, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/group/groups/{group_id}/join-request", + local_var_configuration.base_path, + group_id = crate::apis::urlencode(group_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Resolves a join request for a given group. -pub async fn group_join_requests_resolve_join_request(configuration: &configuration::Configuration, group_id: &str, identity_id: &str, group_resolve_join_request_request: crate::models::GroupResolveJoinRequestRequest) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/group/groups/{group_id}/join-request/{identity_id}", local_var_configuration.base_path, group_id=crate::apis::urlencode(group_id), identity_id=crate::apis::urlencode(identity_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&group_resolve_join_request_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn group_join_requests_resolve_join_request( + configuration: &configuration::Configuration, + group_id: &str, + identity_id: &str, + group_resolve_join_request_request: crate::models::GroupResolveJoinRequestRequest, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/group/groups/{group_id}/join-request/{identity_id}", + local_var_configuration.base_path, + group_id = crate::apis::urlencode(group_id), + identity_id = crate::apis::urlencode(identity_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&group_resolve_join_request_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } - diff --git a/sdks/api/full/rust/src/apis/identity_activities_api.rs b/sdks/api/full/rust/src/apis/identity_activities_api.rs index b50c773b28..e559a90ab1 100644 --- a/sdks/api/full/rust/src/apis/identity_activities_api.rs +++ b/sdks/api/full/rust/src/apis/identity_activities_api.rs @@ -4,62 +4,69 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`identity_activities_list`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityActivitiesListError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - /// Returns an overview of all players currently online or in game. -pub async fn identity_activities_list(configuration: &configuration::Configuration, watch_index: Option<&str>) -> Result> { - let local_var_configuration = configuration; +pub async fn identity_activities_list( + configuration: &configuration::Configuration, + watch_index: Option<&str>, +) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &local_var_configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/identity/activities", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!("{}/identity/activities", local_var_configuration.base_path); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = + local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } - diff --git a/sdks/api/full/rust/src/apis/identity_api.rs b/sdks/api/full/rust/src/apis/identity_api.rs index fc7ff309f7..f0a656e0f0 100644 --- a/sdks/api/full/rust/src/apis/identity_api.rs +++ b/sdks/api/full/rust/src/apis/identity_api.rs @@ -4,688 +4,883 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`identity_complete_avatar_upload`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityCompleteAvatarUploadError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_get_handles`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityGetHandlesError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_get_profile`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityGetProfileError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_get_self_profile`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityGetSelfProfileError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_get_summaries`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityGetSummariesError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_mark_deletion`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityMarkDeletionError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_prepare_avatar_upload`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityPrepareAvatarUploadError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_remove_game_activity`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityRemoveGameActivityError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_set_game_activity`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentitySetGameActivityError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_setup`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentitySetupError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_signup_for_beta`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentitySignupForBetaError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_unmark_deletion`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityUnmarkDeletionError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_update_profile`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityUpdateProfileError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_update_status`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityUpdateStatusError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`identity_validate_profile`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityValidateProfileError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - /// Completes an avatar image upload. Must be called after the file upload process completes. -pub async fn identity_complete_avatar_upload(configuration: &configuration::Configuration, upload_id: &str) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/identities/avatar-upload/{upload_id}/complete", local_var_configuration.base_path, upload_id=crate::apis::urlencode(upload_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_complete_avatar_upload( + configuration: &configuration::Configuration, + upload_id: &str, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/identity/identities/avatar-upload/{upload_id}/complete", + local_var_configuration.base_path, + upload_id = crate::apis::urlencode(upload_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Fetches a list of identity handles. -pub async fn identity_get_handles(configuration: &configuration::Configuration, identity_ids: &str) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/identities/batch/handle", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - local_var_req_builder = local_var_req_builder.query(&[("identity_ids", &identity_ids.to_string())]); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_get_handles( + configuration: &configuration::Configuration, + identity_ids: &str, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/identity/identities/batch/handle", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = + local_var_req_builder.query(&[("identity_ids", &identity_ids.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Fetches an identity profile. -pub async fn identity_get_profile(configuration: &configuration::Configuration, identity_id: &str, watch_index: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/identities/{identity_id}/profile", local_var_configuration.base_path, identity_id=crate::apis::urlencode(identity_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_get_profile( + configuration: &configuration::Configuration, + identity_id: &str, + watch_index: Option<&str>, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/identity/identities/{identity_id}/profile", + local_var_configuration.base_path, + identity_id = crate::apis::urlencode(identity_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = + local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Fetches the current identity's profile. -pub async fn identity_get_self_profile(configuration: &configuration::Configuration, watch_index: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/identities/self/profile", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_get_self_profile( + configuration: &configuration::Configuration, + watch_index: Option<&str>, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/identity/identities/self/profile", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = + local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Fetches a list of identity summaries. -pub async fn identity_get_summaries(configuration: &configuration::Configuration, identity_ids: &str) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/identities/batch/summary", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - local_var_req_builder = local_var_req_builder.query(&[("identity_ids", &identity_ids.to_string())]); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_get_summaries( + configuration: &configuration::Configuration, + identity_ids: &str, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/identity/identities/batch/summary", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = + local_var_req_builder.query(&[("identity_ids", &identity_ids.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } -pub async fn identity_mark_deletion(configuration: &configuration::Configuration, ) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/identities/self/delete-request", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_mark_deletion( + configuration: &configuration::Configuration, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/identity/identities/self/delete-request", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Prepares an avatar image upload. Complete upload with `CompleteIdentityAvatarUpload`. -pub async fn identity_prepare_avatar_upload(configuration: &configuration::Configuration, identity_prepare_avatar_upload_request: crate::models::IdentityPrepareAvatarUploadRequest) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/identities/avatar-upload/prepare", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&identity_prepare_avatar_upload_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_prepare_avatar_upload( + configuration: &configuration::Configuration, + identity_prepare_avatar_upload_request: crate::models::IdentityPrepareAvatarUploadRequest, +) -> Result< + crate::models::IdentityPrepareAvatarUploadResponse, + Error, +> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/identity/identities/avatar-upload/prepare", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&identity_prepare_avatar_upload_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Removes the current identity's game activity. -pub async fn identity_remove_game_activity(configuration: &configuration::Configuration, ) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/identities/self/activity", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_remove_game_activity( + configuration: &configuration::Configuration, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/identity/identities/self/activity", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Sets the current identity's game activity. This activity will automatically be removed when the identity goes offline. -pub async fn identity_set_game_activity(configuration: &configuration::Configuration, identity_set_game_activity_request: crate::models::IdentitySetGameActivityRequest) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/identities/self/activity", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&identity_set_game_activity_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_set_game_activity( + configuration: &configuration::Configuration, + identity_set_game_activity_request: crate::models::IdentitySetGameActivityRequest, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/identity/identities/self/activity", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&identity_set_game_activity_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Gets or creates an identity. Passing an existing identity token in the body refreshes the token. Temporary Accounts Until the identity is linked with the Rivet Hub (see `PrepareGameLink`), this identity will be temporary but still behave like all other identities. This is intended to allow users to play the game without signing up while still having the benefits of having an account. When they are ready to save their account, they should be instructed to link their account (see `PrepareGameLink`). Storing Token `identity_token` should be stored in some form of persistent storage. The token should be read from storage and passed to `Setup` every time the client starts. -pub async fn identity_setup(configuration: &configuration::Configuration, identity_setup_request: crate::models::IdentitySetupRequest) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/identities", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&identity_setup_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_setup( + configuration: &configuration::Configuration, + identity_setup_request: crate::models::IdentitySetupRequest, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/identity/identities", local_var_configuration.base_path); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&identity_setup_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Completes an avatar image upload. Must be called after the file upload process completes. -pub async fn identity_signup_for_beta(configuration: &configuration::Configuration, identity_signup_for_beta_request: crate::models::IdentitySignupForBetaRequest) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/identities/self/beta-signup", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&identity_signup_for_beta_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_signup_for_beta( + configuration: &configuration::Configuration, + identity_signup_for_beta_request: crate::models::IdentitySignupForBetaRequest, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/identity/identities/self/beta-signup", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&identity_signup_for_beta_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } -pub async fn identity_unmark_deletion(configuration: &configuration::Configuration, ) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/identities/self/delete-request", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_unmark_deletion( + configuration: &configuration::Configuration, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/identity/identities/self/delete-request", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Updates profile of the current identity. -pub async fn identity_update_profile(configuration: &configuration::Configuration, identity_update_profile_request: crate::models::IdentityUpdateProfileRequest) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/identities/self/profile", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&identity_update_profile_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_update_profile( + configuration: &configuration::Configuration, + identity_update_profile_request: crate::models::IdentityUpdateProfileRequest, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/identity/identities/self/profile", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&identity_update_profile_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Updates the current identity's status. -pub async fn identity_update_status(configuration: &configuration::Configuration, identity_update_status_request: crate::models::IdentityUpdateStatusRequest) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/identities/identities/self/status", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&identity_update_status_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_update_status( + configuration: &configuration::Configuration, + identity_update_status_request: crate::models::IdentityUpdateStatusRequest, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/identity/identities/identities/self/status", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&identity_update_status_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Validate contents of identity profile. Use to provide immediate feedback on profile changes before committing them. -pub async fn identity_validate_profile(configuration: &configuration::Configuration, identity_update_profile_request: crate::models::IdentityUpdateProfileRequest) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/identity/identities/self/profile/validate", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&identity_update_profile_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn identity_validate_profile( + configuration: &configuration::Configuration, + identity_update_profile_request: crate::models::IdentityUpdateProfileRequest, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/identity/identities/self/profile/validate", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&identity_update_profile_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } - diff --git a/sdks/api/full/rust/src/apis/identity_events_api.rs b/sdks/api/full/rust/src/apis/identity_events_api.rs index db247b63fe..f31335222c 100644 --- a/sdks/api/full/rust/src/apis/identity_events_api.rs +++ b/sdks/api/full/rust/src/apis/identity_events_api.rs @@ -4,62 +4,69 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`identity_events_watch`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum IdentityEventsWatchError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - /// Returns all events relative to the current identity. -pub async fn identity_events_watch(configuration: &configuration::Configuration, watch_index: Option<&str>) -> Result> { - let local_var_configuration = configuration; +pub async fn identity_events_watch( + configuration: &configuration::Configuration, + watch_index: Option<&str>, +) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &local_var_configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/identity/events/live", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!("{}/identity/events/live", local_var_configuration.base_path); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = + local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } - diff --git a/sdks/api/full/rust/src/apis/job_run_api.rs b/sdks/api/full/rust/src/apis/job_run_api.rs index a67c3ad575..de8bad1fd2 100644 --- a/sdks/api/full/rust/src/apis/job_run_api.rs +++ b/sdks/api/full/rust/src/apis/job_run_api.rs @@ -4,58 +4,63 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`job_run_cleanup`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum JobRunCleanupError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } +pub async fn job_run_cleanup( + configuration: &configuration::Configuration, +) -> Result<(), Error> { + let local_var_configuration = configuration; -pub async fn job_run_cleanup(configuration: &configuration::Configuration, ) -> Result<(), Error> { - let local_var_configuration = configuration; + let local_var_client = &local_var_configuration.client; - let local_var_client = &local_var_configuration.client; + let local_var_uri_str = format!("{}/job/runs/cleanup", local_var_configuration.base_path); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - let local_var_uri_str = format!("{}/job/runs/cleanup", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } - diff --git a/sdks/api/full/rust/src/apis/matchmaker_lobbies_api.rs b/sdks/api/full/rust/src/apis/matchmaker_lobbies_api.rs index 50c2f0f0c6..44a4ce10e5 100644 --- a/sdks/api/full/rust/src/apis/matchmaker_lobbies_api.rs +++ b/sdks/api/full/rust/src/apis/matchmaker_lobbies_api.rs @@ -4,378 +4,481 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`matchmaker_lobbies_create`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum MatchmakerLobbiesCreateError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`matchmaker_lobbies_find`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum MatchmakerLobbiesFindError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`matchmaker_lobbies_get_state`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum MatchmakerLobbiesGetStateError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`matchmaker_lobbies_join`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum MatchmakerLobbiesJoinError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`matchmaker_lobbies_list`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum MatchmakerLobbiesListError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`matchmaker_lobbies_ready`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum MatchmakerLobbiesReadyError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`matchmaker_lobbies_set_closed`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum MatchmakerLobbiesSetClosedError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`matchmaker_lobbies_set_state`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum MatchmakerLobbiesSetStateError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - /// Creates a custom lobby. When [tokenless authentication](/docs/general/concepts/tokenless-authentication/web) is enabled in your game namespace, this endpoint does not require a token to authenticate. Otherwise, a [development namespace token](/docs/general/concepts/token-types#namespace-development) can be used for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) can be used for general authentication. -pub async fn matchmaker_lobbies_create(configuration: &configuration::Configuration, matchmaker_lobbies_create_request: crate::models::MatchmakerLobbiesCreateRequest) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/matchmaker/lobbies/create", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&matchmaker_lobbies_create_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn matchmaker_lobbies_create( + configuration: &configuration::Configuration, + matchmaker_lobbies_create_request: crate::models::MatchmakerLobbiesCreateRequest, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/matchmaker/lobbies/create", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&matchmaker_lobbies_create_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Finds a lobby based on the given criteria. If a lobby is not found and `prevent_auto_create_lobby` is `false`, a new lobby will be created. When [tokenless authentication](/docs/general/concepts/tokenless-authentication/web) is enabled in your game namespace, this endpoint does not require a token to authenticate. Otherwise, a [development namespace token](/docs/general/concepts/token-types#namespace-development) can be used for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) can be used for general authentication. -pub async fn matchmaker_lobbies_find(configuration: &configuration::Configuration, matchmaker_lobbies_find_request: crate::models::MatchmakerLobbiesFindRequest, origin: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/matchmaker/lobbies/find", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(local_var_param_value) = origin { - local_var_req_builder = local_var_req_builder.header("origin", local_var_param_value.to_string()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&matchmaker_lobbies_find_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn matchmaker_lobbies_find( + configuration: &configuration::Configuration, + matchmaker_lobbies_find_request: crate::models::MatchmakerLobbiesFindRequest, + origin: Option<&str>, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/matchmaker/lobbies/find", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(local_var_param_value) = origin { + local_var_req_builder = + local_var_req_builder.header("origin", local_var_param_value.to_string()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&matchmaker_lobbies_find_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Get the state of any lobby. This endpoint requires a [lobby token](/docs/general/concepts/token-types#matchmaker-lobby) for authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) for mock responses. When running on Rivet servers, you can access the given lobby token from the [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable. -pub async fn matchmaker_lobbies_get_state(configuration: &configuration::Configuration, lobby_id: &str) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/matchmaker/lobbies/{lobby_id}/state", local_var_configuration.base_path, lobby_id=crate::apis::urlencode(lobby_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn matchmaker_lobbies_get_state( + configuration: &configuration::Configuration, + lobby_id: &str, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/matchmaker/lobbies/{lobby_id}/state", + local_var_configuration.base_path, + lobby_id = crate::apis::urlencode(lobby_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Joins a specific lobby. This request will use the direct player count configured for the lobby group. When [tokenless authentication](/docs/general/concepts/tokenless-authentication/web) is enabled in your game namespace, this endpoint does not require a token to authenticate. Otherwise, a [development namespace token](/docs/general/concepts/token-types#namespace-development) can be used for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) can be used for general authentication. -pub async fn matchmaker_lobbies_join(configuration: &configuration::Configuration, matchmaker_lobbies_join_request: crate::models::MatchmakerLobbiesJoinRequest) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/matchmaker/lobbies/join", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&matchmaker_lobbies_join_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn matchmaker_lobbies_join( + configuration: &configuration::Configuration, + matchmaker_lobbies_join_request: crate::models::MatchmakerLobbiesJoinRequest, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/matchmaker/lobbies/join", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&matchmaker_lobbies_join_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Lists all open lobbies. When [tokenless authentication](/docs/general/concepts/tokenless-authentication/web) is enabled in your game namespace, this endpoint does not require a token to authenticate. Otherwise, a [development namespace token](/docs/general/concepts/token-types#namespace-development) can be used for mock responses and a [public namespace token](/docs/general/concepts/token-types#namespace-public) can be used for general authentication. -pub async fn matchmaker_lobbies_list(configuration: &configuration::Configuration, include_state: Option) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/matchmaker/lobbies/list", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = include_state { - local_var_req_builder = local_var_req_builder.query(&[("include_state", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn matchmaker_lobbies_list( + configuration: &configuration::Configuration, + include_state: Option, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/matchmaker/lobbies/list", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = include_state { + local_var_req_builder = + local_var_req_builder.query(&[("include_state", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Marks the current lobby as ready to accept connections. Players will not be able to connect to this lobby until the lobby is flagged as ready. This endpoint requires a [lobby token](/docs/general/concepts/token-types#matchmaker-lobby) for authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) for mock responses. When running on Rivet servers, you can access the given lobby token from the [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable. -pub async fn matchmaker_lobbies_ready(configuration: &configuration::Configuration, ) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/matchmaker/lobbies/ready", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn matchmaker_lobbies_ready( + configuration: &configuration::Configuration, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/matchmaker/lobbies/ready", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// If `is_closed` is `true`, the matchmaker will no longer route players to the lobby. Players can still join using the /join endpoint (this can be disabled by the developer by rejecting all new connections after setting the lobby to closed). Does not shutdown the lobby. This endpoint requires a [lobby token](/docs/general/concepts/token-types#matchmaker-lobby) for authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) for mock responses. When running on Rivet servers, you can access the given lobby token from the [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable. -pub async fn matchmaker_lobbies_set_closed(configuration: &configuration::Configuration, matchmaker_lobbies_set_closed_request: crate::models::MatchmakerLobbiesSetClosedRequest) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/matchmaker/lobbies/closed", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&matchmaker_lobbies_set_closed_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn matchmaker_lobbies_set_closed( + configuration: &configuration::Configuration, + matchmaker_lobbies_set_closed_request: crate::models::MatchmakerLobbiesSetClosedRequest, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/matchmaker/lobbies/closed", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&matchmaker_lobbies_set_closed_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Sets the state JSON of the current lobby. This endpoint requires a [lobby token](/docs/general/concepts/token-types#matchmaker-lobby) for authentication, or a [development namespace token](/docs/general/concepts/token-types#namespace-development) for mock responses. When running on Rivet servers, you can access the given lobby token from the [`RIVET_TOKEN`](/docs/matchmaker/concepts/lobby-env) environment variable. -pub async fn matchmaker_lobbies_set_state(configuration: &configuration::Configuration, body: Option) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/matchmaker/lobbies/state", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&body); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn matchmaker_lobbies_set_state( + configuration: &configuration::Configuration, + body: Option, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/matchmaker/lobbies/state", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&body); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } - diff --git a/sdks/api/full/rust/src/apis/matchmaker_players_api.rs b/sdks/api/full/rust/src/apis/matchmaker_players_api.rs index e0cb52729e..7121a0a8f8 100644 --- a/sdks/api/full/rust/src/apis/matchmaker_players_api.rs +++ b/sdks/api/full/rust/src/apis/matchmaker_players_api.rs @@ -4,149 +4,186 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`matchmaker_players_connected`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum MatchmakerPlayersConnectedError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`matchmaker_players_disconnected`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum MatchmakerPlayersDisconnectedError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`matchmaker_players_get_statistics`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum MatchmakerPlayersGetStatisticsError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - /// Validates the player token is valid and has not already been consumed then marks the player as connected. # Player Tokens and Reserved Slots Player tokens reserve a spot in the lobby until they expire. This allows for precise matchmaking up to exactly the lobby's player limit, which is important for games with small lobbies and a high influx of players. By calling this endpoint with the player token, the player's spot is marked as connected and will not expire. If this endpoint is never called, the player's token will expire and this spot will be filled by another player. # Anti-Botting Player tokens are only issued by caling `lobbies.join`, calling `lobbies.find`, or from the `GlobalEventMatchmakerLobbyJoin` event. These endpoints have anti-botting measures (i.e. enforcing max player limits, captchas, and detecting bots), so valid player tokens provide some confidence that the player is not a bot. Therefore, it's important to make sure the token is valid by waiting for this endpoint to return OK before allowing the connected socket to do anything else. If this endpoint returns an error, the socket should be disconnected immediately. # How to Transmit the Player Token The client is responsible for acquiring the player token by caling `lobbies.join`, calling `lobbies.find`, or from the `GlobalEventMatchmakerLobbyJoin` event. Beyond that, it's up to the developer how the player token is transmitted to the lobby. If using WebSockets, the player token can be transmitted as a query parameter. Otherwise, the player token will likely be automatically sent by the client once the socket opens. As mentioned above, nothing else should happen until the player token is validated. -pub async fn matchmaker_players_connected(configuration: &configuration::Configuration, matchmaker_players_connected_request: crate::models::MatchmakerPlayersConnectedRequest) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/matchmaker/players/connected", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&matchmaker_players_connected_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn matchmaker_players_connected( + configuration: &configuration::Configuration, + matchmaker_players_connected_request: crate::models::MatchmakerPlayersConnectedRequest, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/matchmaker/players/connected", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&matchmaker_players_connected_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Marks a player as disconnected. # Ghost Players If players are not marked as disconnected, lobbies will result with \"ghost players\" that the matchmaker thinks exist but are no longer connected to the lobby. -pub async fn matchmaker_players_disconnected(configuration: &configuration::Configuration, matchmaker_players_connected_request: crate::models::MatchmakerPlayersConnectedRequest) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/matchmaker/players/disconnected", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&matchmaker_players_connected_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn matchmaker_players_disconnected( + configuration: &configuration::Configuration, + matchmaker_players_connected_request: crate::models::MatchmakerPlayersConnectedRequest, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/matchmaker/players/disconnected", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&matchmaker_players_connected_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Gives matchmaker statistics about the players in game. -pub async fn matchmaker_players_get_statistics(configuration: &configuration::Configuration, ) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/matchmaker/players/statistics", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn matchmaker_players_get_statistics( + configuration: &configuration::Configuration, +) -> Result< + crate::models::MatchmakerGetStatisticsResponse, + Error, +> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/matchmaker/players/statistics", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } - diff --git a/sdks/api/full/rust/src/apis/matchmaker_regions_api.rs b/sdks/api/full/rust/src/apis/matchmaker_regions_api.rs index f70241924f..b7b1b4172c 100644 --- a/sdks/api/full/rust/src/apis/matchmaker_regions_api.rs +++ b/sdks/api/full/rust/src/apis/matchmaker_regions_api.rs @@ -4,59 +4,64 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`matchmaker_regions_list`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum MatchmakerRegionsListError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - /// Returns a list of regions available to this namespace. Regions are sorted by most optimal to least optimal. The player's IP address is used to calculate the regions' optimality. -pub async fn matchmaker_regions_list(configuration: &configuration::Configuration, ) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/matchmaker/regions", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} +pub async fn matchmaker_regions_list( + configuration: &configuration::Configuration, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + let local_var_uri_str = format!("{}/matchmaker/regions", local_var_configuration.base_path); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } +} diff --git a/sdks/api/full/rust/src/apis/mod.rs b/sdks/api/full/rust/src/apis/mod.rs index 70b0b42e92..c326b5a161 100644 --- a/sdks/api/full/rust/src/apis/mod.rs +++ b/sdks/api/full/rust/src/apis/mod.rs @@ -3,91 +3,113 @@ use std::fmt; #[derive(Debug, Clone)] pub struct ResponseContent { - pub status: reqwest::StatusCode, - pub content: String, - pub entity: Option, + pub status: reqwest::StatusCode, + pub content: String, + pub entity: Option, } #[derive(Debug)] pub enum Error { - Reqwest(reqwest::Error), - Serde(serde_json::Error), - Io(std::io::Error), - ResponseError(ResponseContent), + Reqwest(reqwest::Error), + Serde(serde_json::Error), + Io(std::io::Error), + ResponseError(ResponseContent), } -impl fmt::Display for Error { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let (module, e) = match self { - Error::Reqwest(e) => ("reqwest", e.to_string()), - Error::Serde(e) => ("serde", e.to_string()), - Error::Io(e) => ("IO", e.to_string()), - Error::ResponseError(e) => ("response", format!("status code {}", e.status)), - }; - write!(f, "error in {}: {}", module, e) - } +#[derive(serde::Deserialize)] +pub struct RivetErrorBody { + pub code: String, + pub message: String, + pub documentation: Option, } -impl error::Error for Error { - fn source(&self) -> Option<&(dyn error::Error + 'static)> { - Some(match self { - Error::Reqwest(e) => e, - Error::Serde(e) => e, - Error::Io(e) => e, - Error::ResponseError(_) => return None, - }) - } +impl fmt::Display for Error { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let (module, e) = match self { + Error::Reqwest(e) => ("reqwest", e.to_string()), + Error::Serde(e) => ("serde", e.to_string()), + Error::Io(e) => ("IO", e.to_string()), + Error::ResponseError(e) => { + if let Ok(body) = serde_json::from_str::(&e.content) { + write!(f, "{}", body.message)?; + if let Some(docs) = &body.documentation { + write!(f, "\n{docs}")?; + } + return Ok(()); + } + + ( + "response", + format!("status code {}\n{}", e.status, e.content), + ) + } + }; + write!(f, "error in {}: {}", module, e) + } +} + +impl error::Error for Error { + fn source(&self) -> Option<&(dyn error::Error + 'static)> { + Some(match self { + Error::Reqwest(e) => e, + Error::Serde(e) => e, + Error::Io(e) => e, + Error::ResponseError(_) => return None, + }) + } } -impl From for Error { - fn from(e: reqwest::Error) -> Self { - Error::Reqwest(e) - } +impl From for Error { + fn from(e: reqwest::Error) -> Self { + Error::Reqwest(e) + } } -impl From for Error { - fn from(e: serde_json::Error) -> Self { - Error::Serde(e) - } +impl From for Error { + fn from(e: serde_json::Error) -> Self { + Error::Serde(e) + } } -impl From for Error { - fn from(e: std::io::Error) -> Self { - Error::Io(e) - } +impl From for Error { + fn from(e: std::io::Error) -> Self { + Error::Io(e) + } } pub fn urlencode>(s: T) -> String { - ::url::form_urlencoded::byte_serialize(s.as_ref().as_bytes()).collect() + ::url::form_urlencoded::byte_serialize(s.as_ref().as_bytes()).collect() } pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String, String)> { - if let serde_json::Value::Object(object) = value { - let mut params = vec![]; - - for (key, value) in object { - match value { - serde_json::Value::Object(_) => params.append(&mut parse_deep_object( - &format!("{}[{}]", prefix, key), - value, - )), - serde_json::Value::Array(array) => { - for (i, value) in array.iter().enumerate() { - params.append(&mut parse_deep_object( - &format!("{}[{}][{}]", prefix, key, i), - value, - )); - } - }, - serde_json::Value::String(s) => params.push((format!("{}[{}]", prefix, key), s.clone())), - _ => params.push((format!("{}[{}]", prefix, key), value.to_string())), - } - } - - return params; - } - - unimplemented!("Only objects are supported with style=deepObject") + if let serde_json::Value::Object(object) = value { + let mut params = vec![]; + + for (key, value) in object { + match value { + serde_json::Value::Object(_) => params.append(&mut parse_deep_object( + &format!("{}[{}]", prefix, key), + value, + )), + serde_json::Value::Array(array) => { + for (i, value) in array.iter().enumerate() { + params.append(&mut parse_deep_object( + &format!("{}[{}][{}]", prefix, key, i), + value, + )); + } + } + serde_json::Value::String(s) => { + params.push((format!("{}[{}]", prefix, key), s.clone())) + } + _ => params.push((format!("{}[{}]", prefix, key), value.to_string())), + } + } + + return params; + } + + unimplemented!("Only objects are supported with style=deepObject") } pub mod actors_api; @@ -104,8 +126,8 @@ pub mod cloud_games_avatars_api; pub mod cloud_games_builds_api; pub mod cloud_games_cdn_api; pub mod cloud_games_matchmaker_api; -pub mod cloud_games_namespaces_api; pub mod cloud_games_namespaces_analytics_api; +pub mod cloud_games_namespaces_api; pub mod cloud_games_namespaces_logs_api; pub mod cloud_games_tokens_api; pub mod cloud_games_versions_api; @@ -119,8 +141,8 @@ pub mod games_environments_tokens_api; pub mod group_api; pub mod group_invites_api; pub mod group_join_requests_api; -pub mod identity_api; pub mod identity_activities_api; +pub mod identity_api; pub mod identity_events_api; pub mod job_run_api; pub mod matchmaker_lobbies_api; diff --git a/sdks/api/full/rust/src/apis/portal_games_api.rs b/sdks/api/full/rust/src/apis/portal_games_api.rs index 731e627d6b..c7d12c164d 100644 --- a/sdks/api/full/rust/src/apis/portal_games_api.rs +++ b/sdks/api/full/rust/src/apis/portal_games_api.rs @@ -4,62 +4,74 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`portal_games_get_game_profile`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum PortalGamesGetGameProfileError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - /// Returns a game profile. -pub async fn portal_games_get_game_profile(configuration: &configuration::Configuration, game_name_id: &str, watch_index: Option<&str>) -> Result> { - let local_var_configuration = configuration; +pub async fn portal_games_get_game_profile( + configuration: &configuration::Configuration, + game_name_id: &str, + watch_index: Option<&str>, +) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &local_var_configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/portal/games/{game_name_id}/profile", local_var_configuration.base_path, game_name_id=crate::apis::urlencode(game_name_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/portal/games/{game_name_id}/profile", + local_var_configuration.base_path, + game_name_id = crate::apis::urlencode(game_name_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = + local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } - diff --git a/sdks/api/full/rust/src/apis/provision_datacenters_api.rs b/sdks/api/full/rust/src/apis/provision_datacenters_api.rs index 8b1708d3c7..cdf691e6df 100644 --- a/sdks/api/full/rust/src/apis/provision_datacenters_api.rs +++ b/sdks/api/full/rust/src/apis/provision_datacenters_api.rs @@ -4,101 +4,129 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`provision_datacenters_get_servers`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ProvisionDatacentersGetServersError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`provision_datacenters_get_tls`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ProvisionDatacentersGetTlsError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - -pub async fn provision_datacenters_get_servers(configuration: &configuration::Configuration, datacenter_id: &str) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/datacenters/{datacenter_id}/servers", local_var_configuration.base_path, datacenter_id=crate::apis::urlencode(datacenter_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn provision_datacenters_get_servers( + configuration: &configuration::Configuration, + datacenter_id: &str, +) -> Result< + crate::models::ProvisionDatacentersGetServersResponse, + Error, +> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/datacenters/{datacenter_id}/servers", + local_var_configuration.base_path, + datacenter_id = crate::apis::urlencode(datacenter_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } -pub async fn provision_datacenters_get_tls(configuration: &configuration::Configuration, datacenter_id: &str) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/datacenters/{datacenter_id}/tls", local_var_configuration.base_path, datacenter_id=crate::apis::urlencode(datacenter_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn provision_datacenters_get_tls( + configuration: &configuration::Configuration, + datacenter_id: &str, +) -> Result> +{ + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/datacenters/{datacenter_id}/tls", + local_var_configuration.base_path, + datacenter_id = crate::apis::urlencode(datacenter_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } - diff --git a/sdks/api/full/rust/src/apis/provision_servers_api.rs b/sdks/api/full/rust/src/apis/provision_servers_api.rs index c2aab2852d..7ef19287a8 100644 --- a/sdks/api/full/rust/src/apis/provision_servers_api.rs +++ b/sdks/api/full/rust/src/apis/provision_servers_api.rs @@ -4,58 +4,68 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`provision_servers_get_info`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ProvisionServersGetInfoError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } +pub async fn provision_servers_get_info( + configuration: &configuration::Configuration, + ip: &str, +) -> Result> { + let local_var_configuration = configuration; -pub async fn provision_servers_get_info(configuration: &configuration::Configuration, ip: &str) -> Result> { - let local_var_configuration = configuration; + let local_var_client = &local_var_configuration.client; - let local_var_client = &local_var_configuration.client; + let local_var_uri_str = format!( + "{}/servers/{ip}", + local_var_configuration.base_path, + ip = crate::apis::urlencode(ip) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - let local_var_uri_str = format!("{}/servers/{ip}", local_var_configuration.base_path, ip=crate::apis::urlencode(ip)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } - diff --git a/sdks/api/full/rust/src/apis/provision_tunnel_api.rs b/sdks/api/full/rust/src/apis/provision_tunnel_api.rs index 90e038fdaa..6dde5f27fc 100644 --- a/sdks/api/full/rust/src/apis/provision_tunnel_api.rs +++ b/sdks/api/full/rust/src/apis/provision_tunnel_api.rs @@ -4,58 +4,63 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`provision_tunnel_get_tls`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ProvisionTunnelGetTlsError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } +pub async fn provision_tunnel_get_tls( + configuration: &configuration::Configuration, +) -> Result> { + let local_var_configuration = configuration; -pub async fn provision_tunnel_get_tls(configuration: &configuration::Configuration, ) -> Result> { - let local_var_configuration = configuration; + let local_var_client = &local_var_configuration.client; - let local_var_client = &local_var_configuration.client; + let local_var_uri_str = format!("{}/tunnel/tls", local_var_configuration.base_path); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - let local_var_uri_str = format!("{}/tunnel/tls", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } - diff --git a/sdks/api/full/rust/src/apis/regions_api.rs b/sdks/api/full/rust/src/apis/regions_api.rs index d8e7ea9c10..666c9b1443 100644 --- a/sdks/api/full/rust/src/apis/regions_api.rs +++ b/sdks/api/full/rust/src/apis/regions_api.rs @@ -4,113 +4,138 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`regions_list`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum RegionsListError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`regions_recommend`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum RegionsRecommendError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - -pub async fn regions_list(configuration: &configuration::Configuration, project: Option<&str>, environment: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/regions", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = project { - local_var_req_builder = local_var_req_builder.query(&[("project", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = environment { - local_var_req_builder = local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn regions_list( + configuration: &configuration::Configuration, + project: Option<&str>, + environment: Option<&str>, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/regions", local_var_configuration.base_path); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = project { + local_var_req_builder = + local_var_req_builder.query(&[("project", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = environment { + local_var_req_builder = + local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } -pub async fn regions_recommend(configuration: &configuration::Configuration, project: Option<&str>, environment: Option<&str>, lat: Option, long: Option) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/regions/recommend", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = project { - local_var_req_builder = local_var_req_builder.query(&[("project", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = environment { - local_var_req_builder = local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = lat { - local_var_req_builder = local_var_req_builder.query(&[("lat", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = long { - local_var_req_builder = local_var_req_builder.query(&[("long", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn regions_recommend( + configuration: &configuration::Configuration, + project: Option<&str>, + environment: Option<&str>, + lat: Option, + long: Option, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/regions/recommend", local_var_configuration.base_path); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = project { + local_var_req_builder = + local_var_req_builder.query(&[("project", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = environment { + local_var_req_builder = + local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = lat { + local_var_req_builder = local_var_req_builder.query(&[("lat", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = long { + local_var_req_builder = + local_var_req_builder.query(&[("long", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } - diff --git a/sdks/api/full/rust/src/apis/routes_api.rs b/sdks/api/full/rust/src/apis/routes_api.rs index 6118253996..0d962f8269 100644 --- a/sdks/api/full/rust/src/apis/routes_api.rs +++ b/sdks/api/full/rust/src/apis/routes_api.rs @@ -4,166 +4,291 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`routes_delete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum RoutesDeleteError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`routes_history`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RoutesHistoryError { + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`routes_list`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum RoutesListError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`routes_update`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum RoutesUpdateError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - /// Deletes a route. -pub async fn routes_delete(configuration: &configuration::Configuration, id: &str, project: Option<&str>, environment: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/routes/{id}", local_var_configuration.base_path, id=crate::apis::urlencode(id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = project { - local_var_req_builder = local_var_req_builder.query(&[("project", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = environment { - local_var_req_builder = local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn routes_delete( + configuration: &configuration::Configuration, + id: &str, + project: Option<&str>, + environment: Option<&str>, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/routes/{id}", + local_var_configuration.base_path, + id = crate::apis::urlencode(id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = project { + local_var_req_builder = + local_var_req_builder.query(&[("project", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = environment { + local_var_req_builder = + local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Returns time series data for HTTP requests routed to actors. Allows filtering and grouping by various request properties. +pub async fn routes_history( + configuration: &configuration::Configuration, + start: i32, + end: i32, + interval: i32, + project: Option<&str>, + environment: Option<&str>, + query_json: Option<&str>, + group_by: Option<&str>, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/routes/history", local_var_configuration.base_path); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = project { + local_var_req_builder = + local_var_req_builder.query(&[("project", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = environment { + local_var_req_builder = + local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("start", &start.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("end", &end.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("interval", &interval.to_string())]); + if let Some(ref local_var_str) = query_json { + local_var_req_builder = + local_var_req_builder.query(&[("query_json", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = group_by { + local_var_req_builder = + local_var_req_builder.query(&[("group_by", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Lists all routes of the given environment. -pub async fn routes_list(configuration: &configuration::Configuration, project: Option<&str>, environment: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/routes", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = project { - local_var_req_builder = local_var_req_builder.query(&[("project", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = environment { - local_var_req_builder = local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn routes_list( + configuration: &configuration::Configuration, + project: Option<&str>, + environment: Option<&str>, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/routes", local_var_configuration.base_path); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = project { + local_var_req_builder = + local_var_req_builder.query(&[("project", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = environment { + local_var_req_builder = + local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Creates or updates a route. -pub async fn routes_update(configuration: &configuration::Configuration, id: &str, routes_update_route_body: crate::models::RoutesUpdateRouteBody, project: Option<&str>, environment: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/routes/{id}", local_var_configuration.base_path, id=crate::apis::urlencode(id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = project { - local_var_req_builder = local_var_req_builder.query(&[("project", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = environment { - local_var_req_builder = local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&routes_update_route_body); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} +pub async fn routes_update( + configuration: &configuration::Configuration, + id: &str, + routes_update_route_body: crate::models::RoutesUpdateRouteBody, + project: Option<&str>, + environment: Option<&str>, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/routes/{id}", + local_var_configuration.base_path, + id = crate::apis::urlencode(id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); + if let Some(ref local_var_str) = project { + local_var_req_builder = + local_var_req_builder.query(&[("project", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = environment { + local_var_req_builder = + local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&routes_update_route_body); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } +} diff --git a/sdks/api/full/rust/src/apis/servers_api.rs b/sdks/api/full/rust/src/apis/servers_api.rs index 3ae454a3c5..a9703b6b99 100644 --- a/sdks/api/full/rust/src/apis/servers_api.rs +++ b/sdks/api/full/rust/src/apis/servers_api.rs @@ -4,204 +4,277 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`servers_create`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ServersCreateError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`servers_destroy`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ServersDestroyError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`servers_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ServersGetError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`servers_list`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ServersListError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - /// Create a new dynamic server. -pub async fn servers_create(configuration: &configuration::Configuration, game_id: &str, environment_id: &str, servers_create_server_request: crate::models::ServersCreateServerRequest) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/games/{game_id}/environments/{environment_id}/servers", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), environment_id=crate::apis::urlencode(environment_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&servers_create_server_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn servers_create( + configuration: &configuration::Configuration, + game_id: &str, + environment_id: &str, + servers_create_server_request: crate::models::ServersCreateServerRequest, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/games/{game_id}/environments/{environment_id}/servers", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id), + environment_id = crate::apis::urlencode(environment_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&servers_create_server_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Destroy a dynamic server. -pub async fn servers_destroy(configuration: &configuration::Configuration, game_id: &str, environment_id: &str, server_id: &str, override_kill_timeout: Option) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/games/{game_id}/environments/{environment_id}/servers/{server_id}", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), environment_id=crate::apis::urlencode(environment_id), server_id=crate::apis::urlencode(server_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = override_kill_timeout { - local_var_req_builder = local_var_req_builder.query(&[("override_kill_timeout", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn servers_destroy( + configuration: &configuration::Configuration, + game_id: &str, + environment_id: &str, + server_id: &str, + override_kill_timeout: Option, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/games/{game_id}/environments/{environment_id}/servers/{server_id}", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id), + environment_id = crate::apis::urlencode(environment_id), + server_id = crate::apis::urlencode(server_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = override_kill_timeout { + local_var_req_builder = + local_var_req_builder.query(&[("override_kill_timeout", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Gets a dynamic server. -pub async fn servers_get(configuration: &configuration::Configuration, game_id: &str, environment_id: &str, server_id: &str) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/games/{game_id}/environments/{environment_id}/servers/{server_id}", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), environment_id=crate::apis::urlencode(environment_id), server_id=crate::apis::urlencode(server_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn servers_get( + configuration: &configuration::Configuration, + game_id: &str, + environment_id: &str, + server_id: &str, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/games/{game_id}/environments/{environment_id}/servers/{server_id}", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id), + environment_id = crate::apis::urlencode(environment_id), + server_id = crate::apis::urlencode(server_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Lists all servers associated with the token used. Can be filtered by tags in the query string. -pub async fn servers_list(configuration: &configuration::Configuration, game_id: &str, environment_id: &str, tags_json: Option<&str>, include_destroyed: Option, cursor: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/games/{game_id}/environments/{environment_id}/servers", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), environment_id=crate::apis::urlencode(environment_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = tags_json { - local_var_req_builder = local_var_req_builder.query(&[("tags_json", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = include_destroyed { - local_var_req_builder = local_var_req_builder.query(&[("include_destroyed", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = cursor { - local_var_req_builder = local_var_req_builder.query(&[("cursor", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn servers_list( + configuration: &configuration::Configuration, + game_id: &str, + environment_id: &str, + tags_json: Option<&str>, + include_destroyed: Option, + cursor: Option<&str>, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/games/{game_id}/environments/{environment_id}/servers", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id), + environment_id = crate::apis::urlencode(environment_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = tags_json { + local_var_req_builder = + local_var_req_builder.query(&[("tags_json", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = include_destroyed { + local_var_req_builder = + local_var_req_builder.query(&[("include_destroyed", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = cursor { + local_var_req_builder = + local_var_req_builder.query(&[("cursor", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } - diff --git a/sdks/api/full/rust/src/apis/servers_builds_api.rs b/sdks/api/full/rust/src/apis/servers_builds_api.rs index 1dcd704434..97ec771029 100644 --- a/sdks/api/full/rust/src/apis/servers_builds_api.rs +++ b/sdks/api/full/rust/src/apis/servers_builds_api.rs @@ -4,242 +4,330 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`servers_builds_complete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ServersBuildsCompleteError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`servers_builds_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ServersBuildsGetError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`servers_builds_list`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ServersBuildsListError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`servers_builds_patch_tags`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ServersBuildsPatchTagsError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } /// struct for typed errors of method [`servers_builds_prepare`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ServersBuildsPrepareError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - /// Marks an upload as complete. -pub async fn servers_builds_complete(configuration: &configuration::Configuration, game_id: &str, environment_id: &str, build_id: &str) -> Result<(), Error> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/games/{game_id}/environments/{environment_id}/builds/{build_id}/complete", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), environment_id=crate::apis::urlencode(environment_id), build_id=crate::apis::urlencode(build_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn servers_builds_complete( + configuration: &configuration::Configuration, + game_id: &str, + environment_id: &str, + build_id: &str, +) -> Result<(), Error> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/games/{game_id}/environments/{environment_id}/builds/{build_id}/complete", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id), + environment_id = crate::apis::urlencode(environment_id), + build_id = crate::apis::urlencode(build_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Lists all builds of the game associated with the token used. Can be filtered by tags in the query string. -pub async fn servers_builds_get(configuration: &configuration::Configuration, game_id: &str, environment_id: &str, build_id: &str, tags_json: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/games/{game_id}/environments/{environment_id}/builds/{build_id}", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), environment_id=crate::apis::urlencode(environment_id), build_id=crate::apis::urlencode(build_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = tags_json { - local_var_req_builder = local_var_req_builder.query(&[("tags_json", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn servers_builds_get( + configuration: &configuration::Configuration, + game_id: &str, + environment_id: &str, + build_id: &str, + tags_json: Option<&str>, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/games/{game_id}/environments/{environment_id}/builds/{build_id}", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id), + environment_id = crate::apis::urlencode(environment_id), + build_id = crate::apis::urlencode(build_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = tags_json { + local_var_req_builder = + local_var_req_builder.query(&[("tags_json", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Lists all builds of the game associated with the token used. Can be filtered by tags in the query string. -pub async fn servers_builds_list(configuration: &configuration::Configuration, game_id: &str, environment_id: &str, tags_json: Option<&str>) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/games/{game_id}/environments/{environment_id}/builds", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), environment_id=crate::apis::urlencode(environment_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_str) = tags_json { - local_var_req_builder = local_var_req_builder.query(&[("tags_json", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn servers_builds_list( + configuration: &configuration::Configuration, + game_id: &str, + environment_id: &str, + tags_json: Option<&str>, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/games/{game_id}/environments/{environment_id}/builds", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id), + environment_id = crate::apis::urlencode(environment_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = tags_json { + local_var_req_builder = + local_var_req_builder.query(&[("tags_json", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } -pub async fn servers_builds_patch_tags(configuration: &configuration::Configuration, game_id: &str, environment_id: &str, build_id: &str, servers_patch_build_tags_request: crate::models::ServersPatchBuildTagsRequest) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/games/{game_id}/environments/{environment_id}/builds/{build_id}/tags", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), environment_id=crate::apis::urlencode(environment_id), build_id=crate::apis::urlencode(build_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&servers_patch_build_tags_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn servers_builds_patch_tags( + configuration: &configuration::Configuration, + game_id: &str, + environment_id: &str, + build_id: &str, + servers_patch_build_tags_request: crate::models::ServersPatchBuildTagsRequest, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/games/{game_id}/environments/{environment_id}/builds/{build_id}/tags", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id), + environment_id = crate::apis::urlencode(environment_id), + build_id = crate::apis::urlencode(build_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&servers_patch_build_tags_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } /// Creates a new game build for the given game. -pub async fn servers_builds_prepare(configuration: &configuration::Configuration, game_id: &str, environment_id: &str, servers_create_build_request: crate::models::ServersCreateBuildRequest) -> Result> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/games/{game_id}/environments/{environment_id}/builds/prepare", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), environment_id=crate::apis::urlencode(environment_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - local_var_req_builder = local_var_req_builder.json(&servers_create_build_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } +pub async fn servers_builds_prepare( + configuration: &configuration::Configuration, + game_id: &str, + environment_id: &str, + servers_create_build_request: crate::models::ServersCreateBuildRequest, +) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!( + "{}/games/{game_id}/environments/{environment_id}/builds/prepare", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id), + environment_id = crate::apis::urlencode(environment_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&servers_create_build_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } - diff --git a/sdks/api/full/rust/src/apis/servers_datacenters_api.rs b/sdks/api/full/rust/src/apis/servers_datacenters_api.rs index 5bb388081f..11e8490029 100644 --- a/sdks/api/full/rust/src/apis/servers_datacenters_api.rs +++ b/sdks/api/full/rust/src/apis/servers_datacenters_api.rs @@ -4,58 +4,70 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`servers_datacenters_list`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ServersDatacentersListError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } +pub async fn servers_datacenters_list( + configuration: &configuration::Configuration, + game_id: &str, + environment_id: &str, +) -> Result> { + let local_var_configuration = configuration; -pub async fn servers_datacenters_list(configuration: &configuration::Configuration, game_id: &str, environment_id: &str) -> Result> { - let local_var_configuration = configuration; + let local_var_client = &local_var_configuration.client; - let local_var_client = &local_var_configuration.client; + let local_var_uri_str = format!( + "{}/games/{game_id}/environments/{environment_id}/datacenters", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id), + environment_id = crate::apis::urlencode(environment_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - let local_var_uri_str = format!("{}/games/{game_id}/environments/{environment_id}/datacenters", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), environment_id=crate::apis::urlencode(environment_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } - diff --git a/sdks/api/full/rust/src/apis/servers_logs_api.rs b/sdks/api/full/rust/src/apis/servers_logs_api.rs index d0233ea3a7..5d1eb5f386 100644 --- a/sdks/api/full/rust/src/apis/servers_logs_api.rs +++ b/sdks/api/full/rust/src/apis/servers_logs_api.rs @@ -4,63 +4,80 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::apis::ResponseContent; -use super::{Error, configuration}; - /// struct for typed errors of method [`servers_logs_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ServersLogsGetError { - Status400(crate::models::ErrorBody), - Status403(crate::models::ErrorBody), - Status404(crate::models::ErrorBody), - Status408(crate::models::ErrorBody), - Status429(crate::models::ErrorBody), - Status500(crate::models::ErrorBody), - UnknownValue(serde_json::Value), + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), } - /// Returns the logs for a given server. -pub async fn servers_logs_get(configuration: &configuration::Configuration, game_id: &str, environment_id: &str, server_id: &str, stream: crate::models::ServersLogStream, watch_index: Option<&str>) -> Result> { - let local_var_configuration = configuration; +pub async fn servers_logs_get( + configuration: &configuration::Configuration, + game_id: &str, + environment_id: &str, + server_id: &str, + stream: crate::models::ServersLogStream, + watch_index: Option<&str>, +) -> Result> { + let local_var_configuration = configuration; - let local_var_client = &local_var_configuration.client; + let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/games/{game_id}/environments/{environment_id}/servers/{server_id}/logs", local_var_configuration.base_path, game_id=crate::apis::urlencode(game_id), environment_id=crate::apis::urlencode(environment_id), server_id=crate::apis::urlencode(server_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/games/{game_id}/environments/{environment_id}/servers/{server_id}/logs", + local_var_configuration.base_path, + game_id = crate::apis::urlencode(game_id), + environment_id = crate::apis::urlencode(environment_id), + server_id = crate::apis::urlencode(server_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - local_var_req_builder = local_var_req_builder.query(&[("stream", &stream.to_string())]); - if let Some(ref local_var_str) = watch_index { - local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; + local_var_req_builder = local_var_req_builder.query(&[("stream", &stream.to_string())]); + if let Some(ref local_var_str) = watch_index { + local_var_req_builder = + local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; + Err(Error::ResponseError(local_var_error)) + } } - diff --git a/sdks/api/full/rust/src/lib.rs b/sdks/api/full/rust/src/lib.rs index c1dd666f79..fc22e4e4b9 100644 --- a/sdks/api/full/rust/src/lib.rs +++ b/sdks/api/full/rust/src/lib.rs @@ -1,10 +1,10 @@ #[macro_use] extern crate serde_derive; +extern crate reqwest; extern crate serde; extern crate serde_json; extern crate url; -extern crate reqwest; pub mod apis; pub mod models; diff --git a/sdks/api/full/rust/src/models/actors_actor.rs b/sdks/api/full/rust/src/models/actors_actor.rs index e54dd2d4f9..e2a01f1853 100644 --- a/sdks/api/full/rust/src/models/actors_actor.rs +++ b/sdks/api/full/rust/src/models/actors_actor.rs @@ -4,55 +4,59 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ActorsActor { - #[serde(rename = "id")] - pub id: uuid::Uuid, - #[serde(rename = "region")] - 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 = "resources")] - pub resources: Box, - #[serde(rename = "lifecycle")] - pub lifecycle: Box, - /// RFC3339 timestamp - #[serde(rename = "created_at")] - pub created_at: String, - /// RFC3339 timestamp - #[serde(rename = "started_at", skip_serializing_if = "Option::is_none")] - pub started_at: Option, - /// RFC3339 timestamp - #[serde(rename = "destroyed_at", skip_serializing_if = "Option::is_none")] - pub destroyed_at: Option, + #[serde(rename = "id")] + pub id: uuid::Uuid, + #[serde(rename = "region")] + 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 = "resources")] + pub resources: Box, + #[serde(rename = "lifecycle")] + pub lifecycle: Box, + /// RFC3339 timestamp + #[serde(rename = "created_at")] + pub created_at: String, + /// RFC3339 timestamp + #[serde(rename = "started_at", skip_serializing_if = "Option::is_none")] + pub started_at: Option, + /// RFC3339 timestamp + #[serde(rename = "destroyed_at", skip_serializing_if = "Option::is_none")] + pub destroyed_at: Option, } impl ActorsActor { - pub fn new(id: uuid::Uuid, region: String, tags: Option, runtime: crate::models::ActorsRuntime, network: crate::models::ActorsNetwork, resources: crate::models::ActorsResources, lifecycle: crate::models::ActorsLifecycle, created_at: String) -> ActorsActor { - ActorsActor { - id, - region, - tags, - runtime: Box::new(runtime), - network: Box::new(network), - resources: Box::new(resources), - lifecycle: Box::new(lifecycle), - created_at, - started_at: None, - destroyed_at: None, - } - } + pub fn new( + id: uuid::Uuid, + region: String, + tags: Option, + runtime: crate::models::ActorsRuntime, + network: crate::models::ActorsNetwork, + resources: crate::models::ActorsResources, + lifecycle: crate::models::ActorsLifecycle, + created_at: String, + ) -> ActorsActor { + ActorsActor { + id, + region, + tags, + runtime: Box::new(runtime), + network: Box::new(network), + resources: Box::new(resources), + lifecycle: Box::new(lifecycle), + 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 index 7904cb2267..493558b0c8 100644 --- 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 @@ -4,31 +4,27 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[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, + #[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, - } - } + pub fn new() -> ActorsCreateActorNetworkRequest { + ActorsCreateActorNetworkRequest { + mode: None, + ports: None, + wait_ready: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/actors_create_actor_port_request.rs b/sdks/api/full/rust/src/models/actors_create_actor_port_request.rs index f1aa42cc06..9f8508e5d4 100644 --- a/sdks/api/full/rust/src/models/actors_create_actor_port_request.rs +++ b/sdks/api/full/rust/src/models/actors_create_actor_port_request.rs @@ -4,31 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ActorsCreateActorPortRequest { - #[serde(rename = "protocol")] - pub protocol: crate::models::ActorsPortProtocol, - #[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>, + #[serde(rename = "protocol")] + pub protocol: crate::models::ActorsPortProtocol, + #[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 ActorsCreateActorPortRequest { - pub fn new(protocol: crate::models::ActorsPortProtocol) -> ActorsCreateActorPortRequest { - ActorsCreateActorPortRequest { - protocol, - internal_port: None, - routing: None, - } - } + pub fn new(protocol: crate::models::ActorsPortProtocol) -> ActorsCreateActorPortRequest { + ActorsCreateActorPortRequest { + protocol, + internal_port: None, + routing: 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 94b4d56609..affb605c0c 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 @@ -4,46 +4,46 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ActorsCreateActorRequest { - #[serde(rename = "region", skip_serializing_if = "Option::is_none")] - pub region: Option, - #[serde(rename = "tags", deserialize_with = "Option::deserialize")] - pub tags: Option, - #[serde(rename = "build", skip_serializing_if = "Option::is_none")] - 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 = "resources", skip_serializing_if = "Option::is_none")] - pub resources: Option>, - #[serde(rename = "lifecycle", skip_serializing_if = "Option::is_none")] - pub lifecycle: Option>, + #[serde(rename = "region", skip_serializing_if = "Option::is_none")] + pub region: Option, + #[serde(rename = "tags", deserialize_with = "Option::deserialize")] + pub tags: Option, + #[serde(rename = "build", skip_serializing_if = "Option::is_none")] + 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 = "resources", skip_serializing_if = "Option::is_none")] + pub resources: Option>, + #[serde(rename = "lifecycle", skip_serializing_if = "Option::is_none")] + pub lifecycle: Option>, } impl ActorsCreateActorRequest { - pub fn new(tags: Option) -> ActorsCreateActorRequest { - ActorsCreateActorRequest { - region: None, - tags, - build: None, - build_tags: None, - runtime: None, - network: None, - resources: None, - lifecycle: None, - } - } + pub fn new(tags: Option) -> ActorsCreateActorRequest { + ActorsCreateActorRequest { + region: None, + tags, + build: None, + build_tags: None, + runtime: None, + network: None, + resources: None, + lifecycle: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/actors_create_actor_response.rs b/sdks/api/full/rust/src/models/actors_create_actor_response.rs index 038fb65cb0..bc0e9827a5 100644 --- a/sdks/api/full/rust/src/models/actors_create_actor_response.rs +++ b/sdks/api/full/rust/src/models/actors_create_actor_response.rs @@ -4,25 +4,20 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ActorsCreateActorResponse { - #[serde(rename = "actor")] - pub actor: Box, + #[serde(rename = "actor")] + pub actor: Box, } impl ActorsCreateActorResponse { - pub fn new(actor: crate::models::ActorsActor) -> ActorsCreateActorResponse { - ActorsCreateActorResponse { - actor: Box::new(actor), - } - } + pub fn new(actor: crate::models::ActorsActor) -> ActorsCreateActorResponse { + ActorsCreateActorResponse { + actor: Box::new(actor), + } + } } - - 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 index e2baa914ec..15cd6bf825 100644 --- 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 @@ -4,25 +4,20 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * 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, + #[serde(rename = "endpoint_type")] + pub endpoint_type: crate::models::ActorsEndpointType, } impl ActorsCreateActorRuntimeNetworkRequest { - pub fn new(endpoint_type: crate::models::ActorsEndpointType) -> ActorsCreateActorRuntimeNetworkRequest { - ActorsCreateActorRuntimeNetworkRequest { - endpoint_type, - } - } + 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 index 93d670c19c..17eb6bf0cd 100644 --- 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 @@ -4,28 +4,23 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * 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>, + #[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, - } - } + pub fn new() -> ActorsCreateActorRuntimeRequest { + ActorsCreateActorRuntimeRequest { + environment: None, + network: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/actors_endpoint_type.rs b/sdks/api/full/rust/src/models/actors_endpoint_type.rs index eb266b6dde..7ec66f4939 100644 --- a/sdks/api/full/rust/src/models/actors_endpoint_type.rs +++ b/sdks/api/full/rust/src/models/actors_endpoint_type.rs @@ -4,36 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum ActorsEndpointType { - #[serde(rename = "hostname")] - Hostname, - #[serde(rename = "path")] - Path, - + #[serde(rename = "hostname")] + Hostname, + #[serde(rename = "path")] + Path, } impl ToString for ActorsEndpointType { - fn to_string(&self) -> String { - match self { - Self::Hostname => String::from("hostname"), - Self::Path => String::from("path"), - } - } + fn to_string(&self) -> String { + match self { + Self::Hostname => String::from("hostname"), + Self::Path => String::from("path"), + } + } } impl Default for ActorsEndpointType { - fn default() -> ActorsEndpointType { - Self::Hostname - } + fn default() -> ActorsEndpointType { + Self::Hostname + } } - - - - diff --git a/sdks/api/full/rust/src/models/actors_export_actor_logs_response.rs b/sdks/api/full/rust/src/models/actors_export_actor_logs_response.rs new file mode 100644 index 0000000000..6d7f08daec --- /dev/null +++ b/sdks/api/full/rust/src/models/actors_export_actor_logs_response.rs @@ -0,0 +1,22 @@ +/* + * 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 ActorsExportActorLogsResponse { + /// Presigned URL to download the exported logs + #[serde(rename = "url")] + pub url: String, +} + +impl ActorsExportActorLogsResponse { + pub fn new(url: String) -> ActorsExportActorLogsResponse { + ActorsExportActorLogsResponse { url } + } +} diff --git a/sdks/api/full/rust/src/models/actors_get_actor_logs_response.rs b/sdks/api/full/rust/src/models/actors_get_actor_logs_response.rs index e4ace83b0f..4ef76c365e 100644 --- a/sdks/api/full/rust/src/models/actors_get_actor_logs_response.rs +++ b/sdks/api/full/rust/src/models/actors_get_actor_logs_response.rs @@ -4,45 +4,47 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ActorsGetActorLogsResponse { - /// List of actor IDs in these logs. The order of these correspond to the index in the log entry. - #[serde(rename = "actor_ids")] - pub actor_ids: Vec, - /// Sorted old to new. - #[serde(rename = "lines")] - pub lines: Vec, - /// Sorted old to new. - #[serde(rename = "timestamps")] - pub timestamps: Vec, - /// Streams the logs came from. 0 = stdout 1 = stderr - #[serde(rename = "streams")] - pub streams: Vec, - /// Index of the actor that this log was for. Use this index to look the full ID in `actor_ids`. - #[serde(rename = "actor_indices")] - pub actor_indices: Vec, - #[serde(rename = "watch")] - pub watch: Box, + /// List of actor IDs in these logs. The order of these correspond to the index in the log entry. + #[serde(rename = "actor_ids")] + pub actor_ids: Vec, + /// Sorted old to new. + #[serde(rename = "lines")] + pub lines: Vec, + /// Sorted old to new. + #[serde(rename = "timestamps")] + pub timestamps: Vec, + /// Streams the logs came from. 0 = stdout 1 = stderr + #[serde(rename = "streams")] + pub streams: Vec, + /// Index of the actor that this log was for. Use this index to look the full ID in `actor_ids`. + #[serde(rename = "actor_indices")] + pub actor_indices: Vec, + #[serde(rename = "watch")] + pub watch: Box, } impl ActorsGetActorLogsResponse { - pub fn new(actor_ids: Vec, lines: Vec, timestamps: Vec, streams: Vec, actor_indices: Vec, watch: crate::models::WatchResponse) -> ActorsGetActorLogsResponse { - ActorsGetActorLogsResponse { - actor_ids, - lines, - timestamps, - streams, - actor_indices, - watch: Box::new(watch), - } - } + pub fn new( + actor_ids: Vec, + lines: Vec, + timestamps: Vec, + streams: Vec, + actor_indices: Vec, + watch: crate::models::WatchResponse, + ) -> ActorsGetActorLogsResponse { + ActorsGetActorLogsResponse { + actor_ids, + lines, + timestamps, + streams, + actor_indices, + watch: Box::new(watch), + } + } } - - diff --git a/sdks/api/full/rust/src/models/actors_get_actor_metrics_response.rs b/sdks/api/full/rust/src/models/actors_get_actor_metrics_response.rs index 4178642fde..5674d0cab2 100644 --- a/sdks/api/full/rust/src/models/actors_get_actor_metrics_response.rs +++ b/sdks/api/full/rust/src/models/actors_get_actor_metrics_response.rs @@ -4,37 +4,38 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ActorsGetActorMetricsResponse { - #[serde(rename = "actor_ids")] - pub actor_ids: Vec, - #[serde(rename = "metric_names")] - pub metric_names: Vec, - #[serde(rename = "metric_attributes")] - pub metric_attributes: Vec<::std::collections::HashMap>, - #[serde(rename = "metric_types")] - pub metric_types: Vec, - #[serde(rename = "metric_values")] - pub metric_values: Vec>, + #[serde(rename = "actor_ids")] + pub actor_ids: Vec, + #[serde(rename = "metric_names")] + pub metric_names: Vec, + #[serde(rename = "metric_attributes")] + pub metric_attributes: Vec<::std::collections::HashMap>, + #[serde(rename = "metric_types")] + pub metric_types: Vec, + #[serde(rename = "metric_values")] + pub metric_values: Vec>, } impl ActorsGetActorMetricsResponse { - pub fn new(actor_ids: Vec, metric_names: Vec, metric_attributes: Vec<::std::collections::HashMap>, metric_types: Vec, metric_values: Vec>) -> ActorsGetActorMetricsResponse { - ActorsGetActorMetricsResponse { - actor_ids, - metric_names, - metric_attributes, - metric_types, - metric_values, - } - } + pub fn new( + actor_ids: Vec, + metric_names: Vec, + metric_attributes: Vec<::std::collections::HashMap>, + metric_types: Vec, + metric_values: Vec>, + ) -> ActorsGetActorMetricsResponse { + ActorsGetActorMetricsResponse { + actor_ids, + metric_names, + metric_attributes, + metric_types, + metric_values, + } + } } - - diff --git a/sdks/api/full/rust/src/models/actors_get_actor_response.rs b/sdks/api/full/rust/src/models/actors_get_actor_response.rs index 189aed2586..749fe0dc19 100644 --- a/sdks/api/full/rust/src/models/actors_get_actor_response.rs +++ b/sdks/api/full/rust/src/models/actors_get_actor_response.rs @@ -4,25 +4,20 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ActorsGetActorResponse { - #[serde(rename = "actor")] - pub actor: Box, + #[serde(rename = "actor")] + pub actor: Box, } impl ActorsGetActorResponse { - pub fn new(actor: crate::models::ActorsActor) -> ActorsGetActorResponse { - ActorsGetActorResponse { - actor: Box::new(actor), - } - } + pub fn new(actor: crate::models::ActorsActor) -> ActorsGetActorResponse { + ActorsGetActorResponse { + actor: Box::new(actor), + } + } } - - diff --git a/sdks/api/full/rust/src/models/actors_get_actor_usage_response.rs b/sdks/api/full/rust/src/models/actors_get_actor_usage_response.rs new file mode 100644 index 0000000000..c690cc79c5 --- /dev/null +++ b/sdks/api/full/rust/src/models/actors_get_actor_usage_response.rs @@ -0,0 +1,37 @@ +/* + * 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 ActorsGetActorUsageResponse { + #[serde(rename = "metric_names")] + pub metric_names: Vec, + #[serde(rename = "metric_attributes")] + pub metric_attributes: Vec<::std::collections::HashMap>, + #[serde(rename = "metric_types")] + pub metric_types: Vec, + #[serde(rename = "metric_values")] + pub metric_values: Vec>, +} + +impl ActorsGetActorUsageResponse { + pub fn new( + metric_names: Vec, + metric_attributes: Vec<::std::collections::HashMap>, + metric_types: Vec, + metric_values: Vec>, + ) -> ActorsGetActorUsageResponse { + ActorsGetActorUsageResponse { + metric_names, + metric_attributes, + metric_types, + metric_values, + } + } +} diff --git a/sdks/api/full/rust/src/models/actors_lifecycle.rs b/sdks/api/full/rust/src/models/actors_lifecycle.rs index a43e2b85ad..c966944556 100644 --- a/sdks/api/full/rust/src/models/actors_lifecycle.rs +++ b/sdks/api/full/rust/src/models/actors_lifecycle.rs @@ -4,30 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct 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, + /// 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, - } - } + pub fn new() -> ActorsLifecycle { + ActorsLifecycle { + kill_timeout: None, + durable: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/actors_list_actors_response.rs b/sdks/api/full/rust/src/models/actors_list_actors_response.rs index 239139d63d..1262e4d943 100644 --- a/sdks/api/full/rust/src/models/actors_list_actors_response.rs +++ b/sdks/api/full/rust/src/models/actors_list_actors_response.rs @@ -4,29 +4,27 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ActorsListActorsResponse { - /// A list of actors for the project associated with the token. - #[serde(rename = "actors")] - pub actors: Vec, - #[serde(rename = "pagination")] - pub pagination: Box, + /// A list of actors for the project associated with the token. + #[serde(rename = "actors")] + pub actors: Vec, + #[serde(rename = "pagination")] + pub pagination: Box, } impl ActorsListActorsResponse { - pub fn new(actors: Vec, pagination: crate::models::Pagination) -> ActorsListActorsResponse { - ActorsListActorsResponse { - actors, - pagination: Box::new(pagination), - } - } + pub fn new( + actors: Vec, + pagination: crate::models::Pagination, + ) -> ActorsListActorsResponse { + ActorsListActorsResponse { + actors, + pagination: Box::new(pagination), + } + } } - - diff --git a/sdks/api/full/rust/src/models/actors_logs_export_request.rs b/sdks/api/full/rust/src/models/actors_logs_export_request.rs new file mode 100644 index 0000000000..3018755f95 --- /dev/null +++ b/sdks/api/full/rust/src/models/actors_logs_export_request.rs @@ -0,0 +1,30 @@ +/* + * 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 ActorsLogsExportRequest { + #[serde(rename = "project", skip_serializing_if = "Option::is_none")] + pub project: Option, + #[serde(rename = "environment", skip_serializing_if = "Option::is_none")] + pub environment: Option, + /// JSON-encoded query expression for filtering logs + #[serde(rename = "query_json")] + pub query_json: String, +} + +impl ActorsLogsExportRequest { + pub fn new(query_json: String) -> ActorsLogsExportRequest { + ActorsLogsExportRequest { + project: None, + environment: None, + query_json, + } + } +} diff --git a/sdks/api/full/rust/src/models/actors_network.rs b/sdks/api/full/rust/src/models/actors_network.rs index da9b3c770a..cc84ddb576 100644 --- a/sdks/api/full/rust/src/models/actors_network.rs +++ b/sdks/api/full/rust/src/models/actors_network.rs @@ -4,28 +4,23 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * 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, + #[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, - } - } + 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_network_mode.rs b/sdks/api/full/rust/src/models/actors_network_mode.rs index 8c8fe255ff..32dfda5dcb 100644 --- a/sdks/api/full/rust/src/models/actors_network_mode.rs +++ b/sdks/api/full/rust/src/models/actors_network_mode.rs @@ -4,36 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum ActorsNetworkMode { - #[serde(rename = "bridge")] - Bridge, - #[serde(rename = "host")] - Host, - + #[serde(rename = "bridge")] + Bridge, + #[serde(rename = "host")] + Host, } impl ToString for ActorsNetworkMode { - fn to_string(&self) -> String { - match self { - Self::Bridge => String::from("bridge"), - Self::Host => String::from("host"), - } - } + fn to_string(&self) -> String { + match self { + Self::Bridge => String::from("bridge"), + Self::Host => String::from("host"), + } + } } impl Default for ActorsNetworkMode { - fn default() -> ActorsNetworkMode { - Self::Bridge - } + fn default() -> ActorsNetworkMode { + Self::Bridge + } } - - - - diff --git a/sdks/api/full/rust/src/models/actors_port.rs b/sdks/api/full/rust/src/models/actors_port.rs index fe4d88daa0..5ad177a9c9 100644 --- a/sdks/api/full/rust/src/models/actors_port.rs +++ b/sdks/api/full/rust/src/models/actors_port.rs @@ -4,44 +4,42 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ActorsPort { - #[serde(rename = "protocol")] - pub protocol: crate::models::ActorsPortProtocol, - #[serde(rename = "internal_port", skip_serializing_if = "Option::is_none")] - pub internal_port: Option, - #[serde(rename = "hostname", skip_serializing_if = "Option::is_none")] - pub hostname: Option, - #[serde(rename = "port", skip_serializing_if = "Option::is_none")] - pub port: Option, - #[serde(rename = "path", skip_serializing_if = "Option::is_none")] - pub path: Option, - /// Fully formed connection URL including protocol, hostname, port, and path, if applicable. - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, - #[serde(rename = "routing")] - pub routing: Box, + #[serde(rename = "protocol")] + pub protocol: crate::models::ActorsPortProtocol, + #[serde(rename = "internal_port", skip_serializing_if = "Option::is_none")] + pub internal_port: Option, + #[serde(rename = "hostname", skip_serializing_if = "Option::is_none")] + pub hostname: Option, + #[serde(rename = "port", skip_serializing_if = "Option::is_none")] + pub port: Option, + #[serde(rename = "path", skip_serializing_if = "Option::is_none")] + pub path: Option, + /// Fully formed connection URL including protocol, hostname, port, and path, if applicable. + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, + #[serde(rename = "routing")] + pub routing: Box, } impl ActorsPort { - pub fn new(protocol: crate::models::ActorsPortProtocol, routing: crate::models::ActorsPortRouting) -> ActorsPort { - ActorsPort { - protocol, - internal_port: None, - hostname: None, - port: None, - path: None, - url: None, - routing: Box::new(routing), - } - } + pub fn new( + protocol: crate::models::ActorsPortProtocol, + routing: crate::models::ActorsPortRouting, + ) -> ActorsPort { + ActorsPort { + protocol, + internal_port: None, + hostname: None, + port: None, + path: None, + url: None, + routing: Box::new(routing), + } + } } - - diff --git a/sdks/api/full/rust/src/models/actors_port_protocol.rs b/sdks/api/full/rust/src/models/actors_port_protocol.rs index 5a42f4ff9d..be5e29840b 100644 --- a/sdks/api/full/rust/src/models/actors_port_protocol.rs +++ b/sdks/api/full/rust/src/models/actors_port_protocol.rs @@ -4,45 +4,39 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum ActorsPortProtocol { - #[serde(rename = "http")] - Http, - #[serde(rename = "https")] - Https, - #[serde(rename = "tcp")] - Tcp, - #[serde(rename = "tcp_tls")] - TcpTls, - #[serde(rename = "udp")] - Udp, - + #[serde(rename = "http")] + Http, + #[serde(rename = "https")] + Https, + #[serde(rename = "tcp")] + Tcp, + #[serde(rename = "tcp_tls")] + TcpTls, + #[serde(rename = "udp")] + Udp, } impl ToString for ActorsPortProtocol { - fn to_string(&self) -> String { - match self { - Self::Http => String::from("http"), - Self::Https => String::from("https"), - Self::Tcp => String::from("tcp"), - Self::TcpTls => String::from("tcp_tls"), - Self::Udp => String::from("udp"), - } - } + fn to_string(&self) -> String { + match self { + Self::Http => String::from("http"), + Self::Https => String::from("https"), + Self::Tcp => String::from("tcp"), + Self::TcpTls => String::from("tcp_tls"), + Self::Udp => String::from("udp"), + } + } } impl Default for ActorsPortProtocol { - fn default() -> ActorsPortProtocol { - Self::Http - } + fn default() -> ActorsPortProtocol { + Self::Http + } } - - - - diff --git a/sdks/api/full/rust/src/models/actors_port_routing.rs b/sdks/api/full/rust/src/models/actors_port_routing.rs index 71ac26e24a..3261dd8a22 100644 --- a/sdks/api/full/rust/src/models/actors_port_routing.rs +++ b/sdks/api/full/rust/src/models/actors_port_routing.rs @@ -4,28 +4,23 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ActorsPortRouting { - #[serde(rename = "guard", skip_serializing_if = "Option::is_none")] - pub guard: Option, - #[serde(rename = "host", skip_serializing_if = "Option::is_none")] - pub host: Option, + #[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 { - guard: None, - host: None, - } - } + pub fn new() -> ActorsPortRouting { + ActorsPortRouting { + guard: None, + host: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/actors_query_actors_response.rs b/sdks/api/full/rust/src/models/actors_query_actors_response.rs new file mode 100644 index 0000000000..221cf17459 --- /dev/null +++ b/sdks/api/full/rust/src/models/actors_query_actors_response.rs @@ -0,0 +1,30 @@ +/* + * 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 ActorsQueryActorsResponse { + /// A list of actors matching the query + #[serde(rename = "actors")] + pub actors: Vec, + #[serde(rename = "pagination")] + pub pagination: Box, +} + +impl ActorsQueryActorsResponse { + pub fn new( + actors: Vec, + pagination: crate::models::Pagination, + ) -> ActorsQueryActorsResponse { + ActorsQueryActorsResponse { + actors, + pagination: Box::new(pagination), + } + } +} diff --git a/sdks/api/full/rust/src/models/actors_query_log_stream.rs b/sdks/api/full/rust/src/models/actors_query_log_stream.rs deleted file mode 100644 index d718d59f58..0000000000 --- a/sdks/api/full/rust/src/models/actors_query_log_stream.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 ActorsQueryLogStream { - #[serde(rename = "std_out")] - StdOut, - #[serde(rename = "std_err")] - StdErr, - #[serde(rename = "all")] - All, - -} - -impl ToString for ActorsQueryLogStream { - fn to_string(&self) -> String { - match self { - Self::StdOut => String::from("std_out"), - Self::StdErr => String::from("std_err"), - Self::All => String::from("all"), - } - } -} - -impl Default for ActorsQueryLogStream { - fn default() -> ActorsQueryLogStream { - Self::StdOut - } -} - - - - diff --git a/sdks/api/full/rust/src/models/actors_resources.rs b/sdks/api/full/rust/src/models/actors_resources.rs index 743c6394c5..5d0f916adc 100644 --- a/sdks/api/full/rust/src/models/actors_resources.rs +++ b/sdks/api/full/rust/src/models/actors_resources.rs @@ -4,30 +4,22 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ActorsResources { - /// 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, + /// 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 ActorsResources { - pub fn new(cpu: i32, memory: i32) -> ActorsResources { - ActorsResources { - cpu, - memory, - } - } + pub fn new(cpu: i32, memory: i32) -> ActorsResources { + ActorsResources { cpu, memory } + } } - - diff --git a/sdks/api/full/rust/src/models/actors_runtime.rs b/sdks/api/full/rust/src/models/actors_runtime.rs index f8e092c6e0..649f1f6267 100644 --- a/sdks/api/full/rust/src/models/actors_runtime.rs +++ b/sdks/api/full/rust/src/models/actors_runtime.rs @@ -4,31 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct 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>, + #[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, - } - } + pub fn new(build: uuid::Uuid) -> ActorsRuntime { + ActorsRuntime { + build, + arguments: None, + environment: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/actors_upgrade_actor_request.rs b/sdks/api/full/rust/src/models/actors_upgrade_actor_request.rs index 8baa35e3da..5d34008dac 100644 --- a/sdks/api/full/rust/src/models/actors_upgrade_actor_request.rs +++ b/sdks/api/full/rust/src/models/actors_upgrade_actor_request.rs @@ -4,28 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ActorsUpgradeActorRequest { - #[serde(rename = "build", skip_serializing_if = "Option::is_none")] - 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 = "build", skip_serializing_if = "Option::is_none")] + pub build: Option, + #[serde( + rename = "build_tags", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub build_tags: Option>, } impl ActorsUpgradeActorRequest { - pub fn new() -> ActorsUpgradeActorRequest { - ActorsUpgradeActorRequest { - build: None, - build_tags: None, - } - } + pub fn new() -> ActorsUpgradeActorRequest { + ActorsUpgradeActorRequest { + build: None, + build_tags: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/actors_upgrade_all_actors_request.rs b/sdks/api/full/rust/src/models/actors_upgrade_all_actors_request.rs index 5f2a91a02f..e9f1677bcf 100644 --- a/sdks/api/full/rust/src/models/actors_upgrade_all_actors_request.rs +++ b/sdks/api/full/rust/src/models/actors_upgrade_all_actors_request.rs @@ -4,31 +4,31 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ActorsUpgradeAllActorsRequest { - #[serde(rename = "tags", deserialize_with = "Option::deserialize")] - pub tags: Option, - #[serde(rename = "build", skip_serializing_if = "Option::is_none")] - 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 = "tags", deserialize_with = "Option::deserialize")] + pub tags: Option, + #[serde(rename = "build", skip_serializing_if = "Option::is_none")] + pub build: Option, + #[serde( + rename = "build_tags", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub build_tags: Option>, } impl ActorsUpgradeAllActorsRequest { - pub fn new(tags: Option) -> ActorsUpgradeAllActorsRequest { - ActorsUpgradeAllActorsRequest { - tags, - build: None, - build_tags: None, - } - } + pub fn new(tags: Option) -> ActorsUpgradeAllActorsRequest { + ActorsUpgradeAllActorsRequest { + tags, + build: None, + build_tags: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/actors_upgrade_all_actors_response.rs b/sdks/api/full/rust/src/models/actors_upgrade_all_actors_response.rs index 34da50de91..60a2bf4ad0 100644 --- a/sdks/api/full/rust/src/models/actors_upgrade_all_actors_response.rs +++ b/sdks/api/full/rust/src/models/actors_upgrade_all_actors_response.rs @@ -4,25 +4,18 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ActorsUpgradeAllActorsResponse { - #[serde(rename = "count")] - pub count: i64, + #[serde(rename = "count")] + pub count: i64, } impl ActorsUpgradeAllActorsResponse { - pub fn new(count: i64) -> ActorsUpgradeAllActorsResponse { - ActorsUpgradeAllActorsResponse { - count, - } - } + pub fn new(count: i64) -> ActorsUpgradeAllActorsResponse { + ActorsUpgradeAllActorsResponse { count } + } } - - diff --git a/sdks/api/full/rust/src/models/auth_complete_status.rs b/sdks/api/full/rust/src/models/auth_complete_status.rs index f2d9876170..a7fca96169 100644 --- a/sdks/api/full/rust/src/models/auth_complete_status.rs +++ b/sdks/api/full/rust/src/models/auth_complete_status.rs @@ -4,7 +4,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -13,40 +13,35 @@ /// Represents the state of an external account linking process. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum AuthCompleteStatus { - #[serde(rename = "switch_identity")] - SwitchIdentity, - #[serde(rename = "linked_account_added")] - LinkedAccountAdded, - #[serde(rename = "already_complete")] - AlreadyComplete, - #[serde(rename = "expired")] - Expired, - #[serde(rename = "too_many_attempts")] - TooManyAttempts, - #[serde(rename = "incorrect")] - Incorrect, - + #[serde(rename = "switch_identity")] + SwitchIdentity, + #[serde(rename = "linked_account_added")] + LinkedAccountAdded, + #[serde(rename = "already_complete")] + AlreadyComplete, + #[serde(rename = "expired")] + Expired, + #[serde(rename = "too_many_attempts")] + TooManyAttempts, + #[serde(rename = "incorrect")] + Incorrect, } impl ToString for AuthCompleteStatus { - fn to_string(&self) -> String { - match self { - Self::SwitchIdentity => String::from("switch_identity"), - Self::LinkedAccountAdded => String::from("linked_account_added"), - Self::AlreadyComplete => String::from("already_complete"), - Self::Expired => String::from("expired"), - Self::TooManyAttempts => String::from("too_many_attempts"), - Self::Incorrect => String::from("incorrect"), - } - } + fn to_string(&self) -> String { + match self { + Self::SwitchIdentity => String::from("switch_identity"), + Self::LinkedAccountAdded => String::from("linked_account_added"), + Self::AlreadyComplete => String::from("already_complete"), + Self::Expired => String::from("expired"), + Self::TooManyAttempts => String::from("too_many_attempts"), + Self::Incorrect => String::from("incorrect"), + } + } } impl Default for AuthCompleteStatus { - fn default() -> AuthCompleteStatus { - Self::SwitchIdentity - } + fn default() -> AuthCompleteStatus { + Self::SwitchIdentity + } } - - - - diff --git a/sdks/api/full/rust/src/models/auth_identity_complete_email_verification_request.rs b/sdks/api/full/rust/src/models/auth_identity_complete_email_verification_request.rs index 929cd49245..25f64675be 100644 --- a/sdks/api/full/rust/src/models/auth_identity_complete_email_verification_request.rs +++ b/sdks/api/full/rust/src/models/auth_identity_complete_email_verification_request.rs @@ -4,29 +4,27 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct AuthIdentityCompleteEmailVerificationRequest { - #[serde(rename = "verification_id")] - pub verification_id: uuid::Uuid, - /// The code sent to the requestee's email. - #[serde(rename = "code")] - pub code: String, + #[serde(rename = "verification_id")] + pub verification_id: uuid::Uuid, + /// The code sent to the requestee's email. + #[serde(rename = "code")] + pub code: String, } impl AuthIdentityCompleteEmailVerificationRequest { - pub fn new(verification_id: uuid::Uuid, code: String) -> AuthIdentityCompleteEmailVerificationRequest { - AuthIdentityCompleteEmailVerificationRequest { - verification_id, - code, - } - } + pub fn new( + verification_id: uuid::Uuid, + code: String, + ) -> AuthIdentityCompleteEmailVerificationRequest { + AuthIdentityCompleteEmailVerificationRequest { + verification_id, + code, + } + } } - - diff --git a/sdks/api/full/rust/src/models/auth_identity_complete_email_verification_response.rs b/sdks/api/full/rust/src/models/auth_identity_complete_email_verification_response.rs index 557811bb75..0a7176f4b0 100644 --- a/sdks/api/full/rust/src/models/auth_identity_complete_email_verification_response.rs +++ b/sdks/api/full/rust/src/models/auth_identity_complete_email_verification_response.rs @@ -4,25 +4,20 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct AuthIdentityCompleteEmailVerificationResponse { - #[serde(rename = "status")] - pub status: crate::models::AuthCompleteStatus, + #[serde(rename = "status")] + pub status: crate::models::AuthCompleteStatus, } impl AuthIdentityCompleteEmailVerificationResponse { - pub fn new(status: crate::models::AuthCompleteStatus) -> AuthIdentityCompleteEmailVerificationResponse { - AuthIdentityCompleteEmailVerificationResponse { - status, - } - } + pub fn new( + status: crate::models::AuthCompleteStatus, + ) -> AuthIdentityCompleteEmailVerificationResponse { + AuthIdentityCompleteEmailVerificationResponse { status } + } } - - diff --git a/sdks/api/full/rust/src/models/auth_identity_start_email_verification_request.rs b/sdks/api/full/rust/src/models/auth_identity_start_email_verification_request.rs index 6a41bb836a..991823fadb 100644 --- a/sdks/api/full/rust/src/models/auth_identity_start_email_verification_request.rs +++ b/sdks/api/full/rust/src/models/auth_identity_start_email_verification_request.rs @@ -4,31 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct AuthIdentityStartEmailVerificationRequest { - #[serde(rename = "email")] - pub email: String, - #[serde(rename = "captcha", skip_serializing_if = "Option::is_none")] - pub captcha: Option>, - #[serde(rename = "game_id", skip_serializing_if = "Option::is_none")] - pub game_id: Option, + #[serde(rename = "email")] + pub email: String, + #[serde(rename = "captcha", skip_serializing_if = "Option::is_none")] + pub captcha: Option>, + #[serde(rename = "game_id", skip_serializing_if = "Option::is_none")] + pub game_id: Option, } impl AuthIdentityStartEmailVerificationRequest { - pub fn new(email: String) -> AuthIdentityStartEmailVerificationRequest { - AuthIdentityStartEmailVerificationRequest { - email, - captcha: None, - game_id: None, - } - } + pub fn new(email: String) -> AuthIdentityStartEmailVerificationRequest { + AuthIdentityStartEmailVerificationRequest { + email, + captcha: None, + game_id: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/auth_identity_start_email_verification_response.rs b/sdks/api/full/rust/src/models/auth_identity_start_email_verification_response.rs index 78533e77b2..a071908725 100644 --- a/sdks/api/full/rust/src/models/auth_identity_start_email_verification_response.rs +++ b/sdks/api/full/rust/src/models/auth_identity_start_email_verification_response.rs @@ -4,25 +4,18 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct AuthIdentityStartEmailVerificationResponse { - #[serde(rename = "verification_id")] - pub verification_id: uuid::Uuid, + #[serde(rename = "verification_id")] + pub verification_id: uuid::Uuid, } impl AuthIdentityStartEmailVerificationResponse { - pub fn new(verification_id: uuid::Uuid) -> AuthIdentityStartEmailVerificationResponse { - AuthIdentityStartEmailVerificationResponse { - verification_id, - } - } + pub fn new(verification_id: uuid::Uuid) -> AuthIdentityStartEmailVerificationResponse { + AuthIdentityStartEmailVerificationResponse { verification_id } + } } - - diff --git a/sdks/api/full/rust/src/models/auth_refresh_identity_token_request.rs b/sdks/api/full/rust/src/models/auth_refresh_identity_token_request.rs index bfaf83a1f3..3312ac7ea8 100644 --- a/sdks/api/full/rust/src/models/auth_refresh_identity_token_request.rs +++ b/sdks/api/full/rust/src/models/auth_refresh_identity_token_request.rs @@ -4,26 +4,19 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct AuthRefreshIdentityTokenRequest { - /// When `true`, the current identity for the provided cookie will be logged out and a new identity will be returned. - #[serde(rename = "logout", skip_serializing_if = "Option::is_none")] - pub logout: Option, + /// When `true`, the current identity for the provided cookie will be logged out and a new identity will be returned. + #[serde(rename = "logout", skip_serializing_if = "Option::is_none")] + pub logout: Option, } impl AuthRefreshIdentityTokenRequest { - pub fn new() -> AuthRefreshIdentityTokenRequest { - AuthRefreshIdentityTokenRequest { - logout: None, - } - } + pub fn new() -> AuthRefreshIdentityTokenRequest { + AuthRefreshIdentityTokenRequest { logout: None } + } } - - diff --git a/sdks/api/full/rust/src/models/auth_refresh_identity_token_response.rs b/sdks/api/full/rust/src/models/auth_refresh_identity_token_response.rs index de0a15b124..d0e24cd799 100644 --- a/sdks/api/full/rust/src/models/auth_refresh_identity_token_response.rs +++ b/sdks/api/full/rust/src/models/auth_refresh_identity_token_response.rs @@ -4,33 +4,32 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct AuthRefreshIdentityTokenResponse { - /// A JSON Web Token. Slightly modified to include a description prefix and use Protobufs of JSON. - #[serde(rename = "token")] - pub token: String, - /// Token expiration time (in milliseconds). - #[serde(rename = "exp")] - pub exp: String, - #[serde(rename = "identity_id")] - pub identity_id: uuid::Uuid, + /// A JSON Web Token. Slightly modified to include a description prefix and use Protobufs of JSON. + #[serde(rename = "token")] + pub token: String, + /// Token expiration time (in milliseconds). + #[serde(rename = "exp")] + pub exp: String, + #[serde(rename = "identity_id")] + pub identity_id: uuid::Uuid, } impl AuthRefreshIdentityTokenResponse { - pub fn new(token: String, exp: String, identity_id: uuid::Uuid) -> AuthRefreshIdentityTokenResponse { - AuthRefreshIdentityTokenResponse { - token, - exp, - identity_id, - } - } + pub fn new( + token: String, + exp: String, + identity_id: uuid::Uuid, + ) -> AuthRefreshIdentityTokenResponse { + AuthRefreshIdentityTokenResponse { + token, + exp, + identity_id, + } + } } - - diff --git a/sdks/api/full/rust/src/models/builds_build.rs b/sdks/api/full/rust/src/models/builds_build.rs index 789d796a09..b5661b303e 100644 --- a/sdks/api/full/rust/src/models/builds_build.rs +++ b/sdks/api/full/rust/src/models/builds_build.rs @@ -4,40 +4,41 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct BuildsBuild { - #[serde(rename = "id")] - pub id: uuid::Uuid, - #[serde(rename = "name")] - pub name: String, - /// RFC3339 timestamp - #[serde(rename = "created_at")] - pub created_at: String, - /// Unsigned 64 bit integer. - #[serde(rename = "content_length")] - pub content_length: i64, - /// Tags of this build - #[serde(rename = "tags")] - pub tags: ::std::collections::HashMap, + #[serde(rename = "id")] + pub id: uuid::Uuid, + #[serde(rename = "name")] + pub name: String, + /// RFC3339 timestamp + #[serde(rename = "created_at")] + pub created_at: String, + /// Unsigned 64 bit integer. + #[serde(rename = "content_length")] + pub content_length: i64, + /// Tags of this build + #[serde(rename = "tags")] + pub tags: ::std::collections::HashMap, } impl BuildsBuild { - pub fn new(id: uuid::Uuid, name: String, created_at: String, content_length: i64, tags: ::std::collections::HashMap) -> BuildsBuild { - BuildsBuild { - id, - name, - created_at, - content_length, - tags, - } - } + pub fn new( + id: uuid::Uuid, + name: String, + created_at: String, + content_length: i64, + tags: ::std::collections::HashMap, + ) -> BuildsBuild { + BuildsBuild { + id, + name, + created_at, + content_length, + tags, + } + } } - - diff --git a/sdks/api/full/rust/src/models/builds_build_compression.rs b/sdks/api/full/rust/src/models/builds_build_compression.rs index c82c03a44b..5ff4017f13 100644 --- a/sdks/api/full/rust/src/models/builds_build_compression.rs +++ b/sdks/api/full/rust/src/models/builds_build_compression.rs @@ -4,36 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum BuildsBuildCompression { - #[serde(rename = "none")] - None, - #[serde(rename = "lz4")] - Lz4, - + #[serde(rename = "none")] + None, + #[serde(rename = "lz4")] + Lz4, } impl ToString for BuildsBuildCompression { - fn to_string(&self) -> String { - match self { - Self::None => String::from("none"), - Self::Lz4 => String::from("lz4"), - } - } + fn to_string(&self) -> String { + match self { + Self::None => String::from("none"), + Self::Lz4 => String::from("lz4"), + } + } } impl Default for BuildsBuildCompression { - fn default() -> BuildsBuildCompression { - Self::None - } + fn default() -> BuildsBuildCompression { + Self::None + } } - - - - diff --git a/sdks/api/full/rust/src/models/builds_build_kind.rs b/sdks/api/full/rust/src/models/builds_build_kind.rs index 91bdd228d7..f4ec365256 100644 --- a/sdks/api/full/rust/src/models/builds_build_kind.rs +++ b/sdks/api/full/rust/src/models/builds_build_kind.rs @@ -4,39 +4,33 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum BuildsBuildKind { - #[serde(rename = "docker_image")] - DockerImage, - #[serde(rename = "oci_bundle")] - OciBundle, - #[serde(rename = "javascript")] - Javascript, - + #[serde(rename = "docker_image")] + DockerImage, + #[serde(rename = "oci_bundle")] + OciBundle, + #[serde(rename = "javascript")] + Javascript, } impl ToString for BuildsBuildKind { - fn to_string(&self) -> String { - match self { - Self::DockerImage => String::from("docker_image"), - Self::OciBundle => String::from("oci_bundle"), - Self::Javascript => String::from("javascript"), - } - } + fn to_string(&self) -> String { + match self { + Self::DockerImage => String::from("docker_image"), + Self::OciBundle => String::from("oci_bundle"), + Self::Javascript => String::from("javascript"), + } + } } impl Default for BuildsBuildKind { - fn default() -> BuildsBuildKind { - Self::DockerImage - } + fn default() -> BuildsBuildKind { + Self::DockerImage + } } - - - - diff --git a/sdks/api/full/rust/src/models/builds_get_build_response.rs b/sdks/api/full/rust/src/models/builds_get_build_response.rs index 7e509ab2cb..8b398aa46e 100644 --- a/sdks/api/full/rust/src/models/builds_get_build_response.rs +++ b/sdks/api/full/rust/src/models/builds_get_build_response.rs @@ -4,25 +4,20 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct BuildsGetBuildResponse { - #[serde(rename = "build")] - pub build: Box, + #[serde(rename = "build")] + pub build: Box, } impl BuildsGetBuildResponse { - pub fn new(build: crate::models::BuildsBuild) -> BuildsGetBuildResponse { - BuildsGetBuildResponse { - build: Box::new(build), - } - } + pub fn new(build: crate::models::BuildsBuild) -> BuildsGetBuildResponse { + BuildsGetBuildResponse { + build: Box::new(build), + } + } } - - diff --git a/sdks/api/full/rust/src/models/builds_list_builds_response.rs b/sdks/api/full/rust/src/models/builds_list_builds_response.rs index d3e3cd2f4b..2cd37a78a4 100644 --- a/sdks/api/full/rust/src/models/builds_list_builds_response.rs +++ b/sdks/api/full/rust/src/models/builds_list_builds_response.rs @@ -4,26 +4,19 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct BuildsListBuildsResponse { - /// A list of builds for the project associated with the token. - #[serde(rename = "builds")] - pub builds: Vec, + /// A list of builds for the project associated with the token. + #[serde(rename = "builds")] + pub builds: Vec, } impl BuildsListBuildsResponse { - pub fn new(builds: Vec) -> BuildsListBuildsResponse { - BuildsListBuildsResponse { - builds, - } - } + pub fn new(builds: Vec) -> BuildsListBuildsResponse { + BuildsListBuildsResponse { builds } + } } - - diff --git a/sdks/api/full/rust/src/models/builds_patch_build_tags_request.rs b/sdks/api/full/rust/src/models/builds_patch_build_tags_request.rs index 4158c55234..96882460e8 100644 --- a/sdks/api/full/rust/src/models/builds_patch_build_tags_request.rs +++ b/sdks/api/full/rust/src/models/builds_patch_build_tags_request.rs @@ -4,29 +4,24 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct BuildsPatchBuildTagsRequest { - #[serde(rename = "tags", deserialize_with = "Option::deserialize")] - pub tags: Option, - /// **Deprecated** Removes the given tag keys from all other builds. - #[serde(rename = "exclusive_tags", skip_serializing_if = "Option::is_none")] - pub exclusive_tags: Option>, + #[serde(rename = "tags", deserialize_with = "Option::deserialize")] + pub tags: Option, + /// **Deprecated** Removes the given tag keys from all other builds. + #[serde(rename = "exclusive_tags", skip_serializing_if = "Option::is_none")] + pub exclusive_tags: Option>, } impl BuildsPatchBuildTagsRequest { - pub fn new(tags: Option) -> BuildsPatchBuildTagsRequest { - BuildsPatchBuildTagsRequest { - tags, - exclusive_tags: None, - } - } + pub fn new(tags: Option) -> BuildsPatchBuildTagsRequest { + BuildsPatchBuildTagsRequest { + tags, + exclusive_tags: 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 329c52d22b..6f70ddf5db 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 @@ -4,35 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct BuildsPrepareBuildRequest { - /// A tag given to the project build. - #[serde(rename = "image_tag", skip_serializing_if = "Option::is_none")] - pub image_tag: Option, - #[serde(rename = "image_file")] - pub image_file: Box, - #[serde(rename = "kind", skip_serializing_if = "Option::is_none")] - pub kind: Option, - #[serde(rename = "compression", skip_serializing_if = "Option::is_none")] - pub compression: Option, + /// A tag given to the project build. + #[serde(rename = "image_tag", skip_serializing_if = "Option::is_none")] + pub image_tag: Option, + #[serde(rename = "image_file")] + pub image_file: Box, + #[serde(rename = "kind", skip_serializing_if = "Option::is_none")] + pub kind: Option, + #[serde(rename = "compression", skip_serializing_if = "Option::is_none")] + pub compression: Option, } impl BuildsPrepareBuildRequest { - pub fn new(image_file: crate::models::UploadPrepareFile) -> BuildsPrepareBuildRequest { - BuildsPrepareBuildRequest { - image_tag: None, - image_file: Box::new(image_file), - kind: None, - compression: None, - } - } + pub fn new(image_file: crate::models::UploadPrepareFile) -> BuildsPrepareBuildRequest { + BuildsPrepareBuildRequest { + image_tag: None, + image_file: Box::new(image_file), + kind: None, + compression: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/builds_prepare_build_response.rs b/sdks/api/full/rust/src/models/builds_prepare_build_response.rs index 5395dbf7cd..deed9283dd 100644 --- a/sdks/api/full/rust/src/models/builds_prepare_build_response.rs +++ b/sdks/api/full/rust/src/models/builds_prepare_build_response.rs @@ -4,28 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct BuildsPrepareBuildResponse { - #[serde(rename = "build")] - pub build: uuid::Uuid, - #[serde(rename = "presigned_requests")] - pub presigned_requests: Vec, + #[serde(rename = "build")] + pub build: uuid::Uuid, + #[serde(rename = "presigned_requests")] + pub presigned_requests: Vec, } impl BuildsPrepareBuildResponse { - pub fn new(build: uuid::Uuid, presigned_requests: Vec) -> BuildsPrepareBuildResponse { - BuildsPrepareBuildResponse { - build, - presigned_requests, - } - } + pub fn new( + build: uuid::Uuid, + presigned_requests: Vec, + ) -> BuildsPrepareBuildResponse { + BuildsPrepareBuildResponse { + build, + presigned_requests, + } + } } - - diff --git a/sdks/api/full/rust/src/models/captcha_config.rs b/sdks/api/full/rust/src/models/captcha_config.rs index d285073ecd..edbb05f410 100644 --- a/sdks/api/full/rust/src/models/captcha_config.rs +++ b/sdks/api/full/rust/src/models/captcha_config.rs @@ -4,30 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CaptchaConfig : Methods to verify a captcha - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CaptchaConfig { - #[serde(rename = "hcaptcha", skip_serializing_if = "Option::is_none")] - pub hcaptcha: Option>, - #[serde(rename = "turnstile", skip_serializing_if = "Option::is_none")] - pub turnstile: Option>, + #[serde(rename = "hcaptcha", skip_serializing_if = "Option::is_none")] + pub hcaptcha: Option>, + #[serde(rename = "turnstile", skip_serializing_if = "Option::is_none")] + pub turnstile: Option>, } impl CaptchaConfig { - /// Methods to verify a captcha - pub fn new() -> CaptchaConfig { - CaptchaConfig { - hcaptcha: None, - turnstile: None, - } - } + /// Methods to verify a captcha + pub fn new() -> CaptchaConfig { + CaptchaConfig { + hcaptcha: None, + turnstile: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/captcha_config_hcaptcha.rs b/sdks/api/full/rust/src/models/captcha_config_hcaptcha.rs index a342255d1d..f229d0e40f 100644 --- a/sdks/api/full/rust/src/models/captcha_config_hcaptcha.rs +++ b/sdks/api/full/rust/src/models/captcha_config_hcaptcha.rs @@ -4,27 +4,21 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CaptchaConfigHcaptcha : Captcha configuration. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CaptchaConfigHcaptcha { - #[serde(rename = "client_response")] - pub client_response: String, + #[serde(rename = "client_response")] + pub client_response: String, } impl CaptchaConfigHcaptcha { - /// Captcha configuration. - pub fn new(client_response: String) -> CaptchaConfigHcaptcha { - CaptchaConfigHcaptcha { - client_response, - } - } + /// Captcha configuration. + pub fn new(client_response: String) -> CaptchaConfigHcaptcha { + CaptchaConfigHcaptcha { client_response } + } } - - diff --git a/sdks/api/full/rust/src/models/captcha_config_turnstile.rs b/sdks/api/full/rust/src/models/captcha_config_turnstile.rs index ca74d127c0..2c464d4433 100644 --- a/sdks/api/full/rust/src/models/captcha_config_turnstile.rs +++ b/sdks/api/full/rust/src/models/captcha_config_turnstile.rs @@ -4,27 +4,21 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CaptchaConfigTurnstile : Captcha configuration. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CaptchaConfigTurnstile { - #[serde(rename = "client_response")] - pub client_response: String, + #[serde(rename = "client_response")] + pub client_response: String, } impl CaptchaConfigTurnstile { - /// Captcha configuration. - pub fn new(client_response: String) -> CaptchaConfigTurnstile { - CaptchaConfigTurnstile { - client_response, - } - } + /// Captcha configuration. + pub fn new(client_response: String) -> CaptchaConfigTurnstile { + CaptchaConfigTurnstile { client_response } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_auth_agent.rs b/sdks/api/full/rust/src/models/cloud_auth_agent.rs index 927fa16239..7c89c7c553 100644 --- a/sdks/api/full/rust/src/models/cloud_auth_agent.rs +++ b/sdks/api/full/rust/src/models/cloud_auth_agent.rs @@ -4,30 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudAuthAgent : The current authenticated agent. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudAuthAgent { - #[serde(rename = "identity", skip_serializing_if = "Option::is_none")] - pub identity: Option>, - #[serde(rename = "game_cloud", skip_serializing_if = "Option::is_none")] - pub game_cloud: Option>, + #[serde(rename = "identity", skip_serializing_if = "Option::is_none")] + pub identity: Option>, + #[serde(rename = "game_cloud", skip_serializing_if = "Option::is_none")] + pub game_cloud: Option>, } impl CloudAuthAgent { - /// The current authenticated agent. - pub fn new() -> CloudAuthAgent { - CloudAuthAgent { - identity: None, - game_cloud: None, - } - } + /// The current authenticated agent. + pub fn new() -> CloudAuthAgent { + CloudAuthAgent { + identity: None, + game_cloud: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_auth_agent_game_cloud.rs b/sdks/api/full/rust/src/models/cloud_auth_agent_game_cloud.rs index 4698420b34..29859b7b3f 100644 --- a/sdks/api/full/rust/src/models/cloud_auth_agent_game_cloud.rs +++ b/sdks/api/full/rust/src/models/cloud_auth_agent_game_cloud.rs @@ -4,27 +4,21 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudAuthAgentGameCloud : The current authenticated game cloud. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudAuthAgentGameCloud { - #[serde(rename = "game_id")] - pub game_id: uuid::Uuid, + #[serde(rename = "game_id")] + pub game_id: uuid::Uuid, } impl CloudAuthAgentGameCloud { - /// The current authenticated game cloud. - pub fn new(game_id: uuid::Uuid) -> CloudAuthAgentGameCloud { - CloudAuthAgentGameCloud { - game_id, - } - } + /// The current authenticated game cloud. + pub fn new(game_id: uuid::Uuid) -> CloudAuthAgentGameCloud { + CloudAuthAgentGameCloud { game_id } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_auth_agent_identity.rs b/sdks/api/full/rust/src/models/cloud_auth_agent_identity.rs index 38dff8d0ec..799fe9ea84 100644 --- a/sdks/api/full/rust/src/models/cloud_auth_agent_identity.rs +++ b/sdks/api/full/rust/src/models/cloud_auth_agent_identity.rs @@ -4,27 +4,21 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudAuthAgentIdentity : The current authenticated identity. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudAuthAgentIdentity { - #[serde(rename = "identity_id")] - pub identity_id: uuid::Uuid, + #[serde(rename = "identity_id")] + pub identity_id: uuid::Uuid, } impl CloudAuthAgentIdentity { - /// The current authenticated identity. - pub fn new(identity_id: uuid::Uuid) -> CloudAuthAgentIdentity { - CloudAuthAgentIdentity { - identity_id, - } - } + /// The current authenticated identity. + pub fn new(identity_id: uuid::Uuid) -> CloudAuthAgentIdentity { + CloudAuthAgentIdentity { identity_id } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_bootstrap_access.rs b/sdks/api/full/rust/src/models/cloud_bootstrap_access.rs index 30ad6842f2..6d5441c30e 100644 --- a/sdks/api/full/rust/src/models/cloud_bootstrap_access.rs +++ b/sdks/api/full/rust/src/models/cloud_bootstrap_access.rs @@ -4,39 +4,33 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum CloudBootstrapAccess { - #[serde(rename = "public")] - Public, - #[serde(rename = "private")] - Private, - #[serde(rename = "development")] - Development, - + #[serde(rename = "public")] + Public, + #[serde(rename = "private")] + Private, + #[serde(rename = "development")] + Development, } impl ToString for CloudBootstrapAccess { - fn to_string(&self) -> String { - match self { - Self::Public => String::from("public"), - Self::Private => String::from("private"), - Self::Development => String::from("development"), - } - } + fn to_string(&self) -> String { + match self { + Self::Public => String::from("public"), + Self::Private => String::from("private"), + Self::Development => String::from("development"), + } + } } impl Default for CloudBootstrapAccess { - fn default() -> CloudBootstrapAccess { - Self::Public - } + fn default() -> CloudBootstrapAccess { + Self::Public + } } - - - - diff --git a/sdks/api/full/rust/src/models/cloud_bootstrap_captcha.rs b/sdks/api/full/rust/src/models/cloud_bootstrap_captcha.rs index 9f83ccbc73..af623c7661 100644 --- a/sdks/api/full/rust/src/models/cloud_bootstrap_captcha.rs +++ b/sdks/api/full/rust/src/models/cloud_bootstrap_captcha.rs @@ -4,25 +4,18 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudBootstrapCaptcha { - #[serde(rename = "turnstile", skip_serializing_if = "Option::is_none")] - pub turnstile: Option>, + #[serde(rename = "turnstile", skip_serializing_if = "Option::is_none")] + pub turnstile: Option>, } impl CloudBootstrapCaptcha { - pub fn new() -> CloudBootstrapCaptcha { - CloudBootstrapCaptcha { - turnstile: None, - } - } + pub fn new() -> CloudBootstrapCaptcha { + CloudBootstrapCaptcha { turnstile: None } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_bootstrap_captcha_turnstile.rs b/sdks/api/full/rust/src/models/cloud_bootstrap_captcha_turnstile.rs index 4e326bb691..04daf43ea0 100644 --- a/sdks/api/full/rust/src/models/cloud_bootstrap_captcha_turnstile.rs +++ b/sdks/api/full/rust/src/models/cloud_bootstrap_captcha_turnstile.rs @@ -4,25 +4,18 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudBootstrapCaptchaTurnstile { - #[serde(rename = "site_key")] - pub site_key: String, + #[serde(rename = "site_key")] + pub site_key: String, } impl CloudBootstrapCaptchaTurnstile { - pub fn new(site_key: String) -> CloudBootstrapCaptchaTurnstile { - CloudBootstrapCaptchaTurnstile { - site_key, - } - } + pub fn new(site_key: String) -> CloudBootstrapCaptchaTurnstile { + CloudBootstrapCaptchaTurnstile { site_key } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_bootstrap_cluster.rs b/sdks/api/full/rust/src/models/cloud_bootstrap_cluster.rs index 3152f22de5..103fbe8182 100644 --- a/sdks/api/full/rust/src/models/cloud_bootstrap_cluster.rs +++ b/sdks/api/full/rust/src/models/cloud_bootstrap_cluster.rs @@ -4,7 +4,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -13,28 +13,23 @@ /// The type of cluster that the backend is currently running. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum CloudBootstrapCluster { - #[serde(rename = "enterprise")] - Enterprise, - #[serde(rename = "oss")] - Oss, - + #[serde(rename = "enterprise")] + Enterprise, + #[serde(rename = "oss")] + Oss, } impl ToString for CloudBootstrapCluster { - fn to_string(&self) -> String { - match self { - Self::Enterprise => String::from("enterprise"), - Self::Oss => String::from("oss"), - } - } + fn to_string(&self) -> String { + match self { + Self::Enterprise => String::from("enterprise"), + Self::Oss => String::from("oss"), + } + } } impl Default for CloudBootstrapCluster { - fn default() -> CloudBootstrapCluster { - Self::Enterprise - } + fn default() -> CloudBootstrapCluster { + Self::Enterprise + } } - - - - diff --git a/sdks/api/full/rust/src/models/cloud_bootstrap_domains.rs b/sdks/api/full/rust/src/models/cloud_bootstrap_domains.rs index 72227ce0a7..fc5a783049 100644 --- a/sdks/api/full/rust/src/models/cloud_bootstrap_domains.rs +++ b/sdks/api/full/rust/src/models/cloud_bootstrap_domains.rs @@ -4,36 +4,32 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudBootstrapDomains : Domains that host parts of Rivet - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudBootstrapDomains { - #[serde(rename = "cdn", skip_serializing_if = "Option::is_none")] - pub cdn: Option, - #[serde(rename = "job", skip_serializing_if = "Option::is_none")] - pub job: Option, - #[serde(rename = "main", skip_serializing_if = "Option::is_none")] - pub main: Option, - #[serde(rename = "opengb", skip_serializing_if = "Option::is_none")] - pub opengb: Option, + #[serde(rename = "cdn", skip_serializing_if = "Option::is_none")] + pub cdn: Option, + #[serde(rename = "job", skip_serializing_if = "Option::is_none")] + pub job: Option, + #[serde(rename = "main", skip_serializing_if = "Option::is_none")] + pub main: Option, + #[serde(rename = "opengb", skip_serializing_if = "Option::is_none")] + pub opengb: Option, } impl CloudBootstrapDomains { - /// Domains that host parts of Rivet - pub fn new() -> CloudBootstrapDomains { - CloudBootstrapDomains { - cdn: None, - job: None, - main: None, - opengb: None, - } - } + /// Domains that host parts of Rivet + pub fn new() -> CloudBootstrapDomains { + CloudBootstrapDomains { + cdn: None, + job: None, + main: None, + opengb: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_bootstrap_login_methods.rs b/sdks/api/full/rust/src/models/cloud_bootstrap_login_methods.rs index a89426036a..960484e611 100644 --- a/sdks/api/full/rust/src/models/cloud_bootstrap_login_methods.rs +++ b/sdks/api/full/rust/src/models/cloud_bootstrap_login_methods.rs @@ -4,28 +4,23 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudBootstrapLoginMethods { - #[serde(rename = "email")] - pub email: bool, - #[serde(rename = "access_token", skip_serializing_if = "Option::is_none")] - pub access_token: Option, + #[serde(rename = "email")] + pub email: bool, + #[serde(rename = "access_token", skip_serializing_if = "Option::is_none")] + pub access_token: Option, } impl CloudBootstrapLoginMethods { - pub fn new(email: bool) -> CloudBootstrapLoginMethods { - CloudBootstrapLoginMethods { - email, - access_token: None, - } - } + pub fn new(email: bool) -> CloudBootstrapLoginMethods { + CloudBootstrapLoginMethods { + email, + access_token: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_bootstrap_origins.rs b/sdks/api/full/rust/src/models/cloud_bootstrap_origins.rs index 4a26422571..f50a31c39c 100644 --- a/sdks/api/full/rust/src/models/cloud_bootstrap_origins.rs +++ b/sdks/api/full/rust/src/models/cloud_bootstrap_origins.rs @@ -4,27 +4,21 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudBootstrapOrigins : Origins used to build URLs from - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudBootstrapOrigins { - #[serde(rename = "hub")] - pub hub: String, + #[serde(rename = "hub")] + pub hub: String, } impl CloudBootstrapOrigins { - /// Origins used to build URLs from - pub fn new(hub: String) -> CloudBootstrapOrigins { - CloudBootstrapOrigins { - hub, - } - } + /// Origins used to build URLs from + pub fn new(hub: String) -> CloudBootstrapOrigins { + CloudBootstrapOrigins { hub } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_bootstrap_response.rs b/sdks/api/full/rust/src/models/cloud_bootstrap_response.rs index 4785cb98ac..06150549a8 100644 --- a/sdks/api/full/rust/src/models/cloud_bootstrap_response.rs +++ b/sdks/api/full/rust/src/models/cloud_bootstrap_response.rs @@ -4,43 +4,46 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudBootstrapResponse { - #[serde(rename = "cluster")] - pub cluster: crate::models::CloudBootstrapCluster, - #[serde(rename = "access")] - pub access: crate::models::CloudBootstrapAccess, - #[serde(rename = "domains")] - pub domains: Box, - #[serde(rename = "origins")] - pub origins: Box, - #[serde(rename = "captcha")] - pub captcha: Box, - #[serde(rename = "login_methods")] - pub login_methods: Box, - #[serde(rename = "deploy_hash")] - pub deploy_hash: String, + #[serde(rename = "cluster")] + pub cluster: crate::models::CloudBootstrapCluster, + #[serde(rename = "access")] + pub access: crate::models::CloudBootstrapAccess, + #[serde(rename = "domains")] + pub domains: Box, + #[serde(rename = "origins")] + pub origins: Box, + #[serde(rename = "captcha")] + pub captcha: Box, + #[serde(rename = "login_methods")] + pub login_methods: Box, + #[serde(rename = "deploy_hash")] + pub deploy_hash: String, } impl CloudBootstrapResponse { - pub fn new(cluster: crate::models::CloudBootstrapCluster, access: crate::models::CloudBootstrapAccess, domains: crate::models::CloudBootstrapDomains, origins: crate::models::CloudBootstrapOrigins, captcha: crate::models::CloudBootstrapCaptcha, login_methods: crate::models::CloudBootstrapLoginMethods, deploy_hash: String) -> CloudBootstrapResponse { - CloudBootstrapResponse { - cluster, - access, - domains: Box::new(domains), - origins: Box::new(origins), - captcha: Box::new(captcha), - login_methods: Box::new(login_methods), - deploy_hash, - } - } + pub fn new( + cluster: crate::models::CloudBootstrapCluster, + access: crate::models::CloudBootstrapAccess, + domains: crate::models::CloudBootstrapDomains, + origins: crate::models::CloudBootstrapOrigins, + captcha: crate::models::CloudBootstrapCaptcha, + login_methods: crate::models::CloudBootstrapLoginMethods, + deploy_hash: String, + ) -> CloudBootstrapResponse { + CloudBootstrapResponse { + cluster, + access, + domains: Box::new(domains), + origins: Box::new(origins), + captcha: Box::new(captcha), + login_methods: Box::new(login_methods), + deploy_hash, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_build_summary.rs b/sdks/api/full/rust/src/models/cloud_build_summary.rs index 9688a701dc..9153741719 100644 --- a/sdks/api/full/rust/src/models/cloud_build_summary.rs +++ b/sdks/api/full/rust/src/models/cloud_build_summary.rs @@ -4,50 +4,54 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudBuildSummary : A build summary. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudBuildSummary { - #[serde(rename = "build_id")] - pub build_id: uuid::Uuid, - #[serde(rename = "upload_id")] - pub upload_id: uuid::Uuid, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - /// RFC3339 timestamp - #[serde(rename = "create_ts")] - pub create_ts: String, - /// Unsigned 64 bit integer. - #[serde(rename = "content_length")] - pub content_length: i64, - /// Whether or not this build has completely been uploaded. - #[serde(rename = "complete")] - pub complete: bool, - /// Tags of this build - #[serde(rename = "tags")] - pub tags: ::std::collections::HashMap, + #[serde(rename = "build_id")] + pub build_id: uuid::Uuid, + #[serde(rename = "upload_id")] + pub upload_id: uuid::Uuid, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + /// RFC3339 timestamp + #[serde(rename = "create_ts")] + pub create_ts: String, + /// Unsigned 64 bit integer. + #[serde(rename = "content_length")] + pub content_length: i64, + /// Whether or not this build has completely been uploaded. + #[serde(rename = "complete")] + pub complete: bool, + /// Tags of this build + #[serde(rename = "tags")] + pub tags: ::std::collections::HashMap, } impl CloudBuildSummary { - /// A build summary. - pub fn new(build_id: uuid::Uuid, upload_id: uuid::Uuid, display_name: String, create_ts: String, content_length: i64, complete: bool, tags: ::std::collections::HashMap) -> CloudBuildSummary { - CloudBuildSummary { - build_id, - upload_id, - display_name, - create_ts, - content_length, - complete, - tags, - } - } + /// A build summary. + pub fn new( + build_id: uuid::Uuid, + upload_id: uuid::Uuid, + display_name: String, + create_ts: String, + content_length: i64, + complete: bool, + tags: ::std::collections::HashMap, + ) -> CloudBuildSummary { + CloudBuildSummary { + build_id, + upload_id, + display_name, + create_ts, + content_length, + complete, + tags, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_cdn_auth_type.rs b/sdks/api/full/rust/src/models/cloud_cdn_auth_type.rs index bd9b926551..8175735bf6 100644 --- a/sdks/api/full/rust/src/models/cloud_cdn_auth_type.rs +++ b/sdks/api/full/rust/src/models/cloud_cdn_auth_type.rs @@ -4,7 +4,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -13,28 +13,23 @@ /// A value denoting what type of authentication to use for a game namespace's CDN. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum CloudCdnAuthType { - #[serde(rename = "none")] - None, - #[serde(rename = "basic")] - Basic, - + #[serde(rename = "none")] + None, + #[serde(rename = "basic")] + Basic, } impl ToString for CloudCdnAuthType { - fn to_string(&self) -> String { - match self { - Self::None => String::from("none"), - Self::Basic => String::from("basic"), - } - } + fn to_string(&self) -> String { + match self { + Self::None => String::from("none"), + Self::Basic => String::from("basic"), + } + } } impl Default for CloudCdnAuthType { - fn default() -> CloudCdnAuthType { - Self::None - } + fn default() -> CloudCdnAuthType { + Self::None + } } - - - - diff --git a/sdks/api/full/rust/src/models/cloud_cdn_namespace_auth_user.rs b/sdks/api/full/rust/src/models/cloud_cdn_namespace_auth_user.rs index 21b67ffac2..a39ab114b4 100644 --- a/sdks/api/full/rust/src/models/cloud_cdn_namespace_auth_user.rs +++ b/sdks/api/full/rust/src/models/cloud_cdn_namespace_auth_user.rs @@ -4,28 +4,22 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudCdnNamespaceAuthUser : An authenticated CDN user for a given namespace. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudCdnNamespaceAuthUser { - /// A user name. - #[serde(rename = "user")] - pub user: String, + /// A user name. + #[serde(rename = "user")] + pub user: String, } impl CloudCdnNamespaceAuthUser { - /// An authenticated CDN user for a given namespace. - pub fn new(user: String) -> CloudCdnNamespaceAuthUser { - CloudCdnNamespaceAuthUser { - user, - } - } + /// An authenticated CDN user for a given namespace. + pub fn new(user: String) -> CloudCdnNamespaceAuthUser { + CloudCdnNamespaceAuthUser { user } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_cdn_namespace_config.rs b/sdks/api/full/rust/src/models/cloud_cdn_namespace_config.rs index 1ca78682f9..6cd407d4b4 100644 --- a/sdks/api/full/rust/src/models/cloud_cdn_namespace_config.rs +++ b/sdks/api/full/rust/src/models/cloud_cdn_namespace_config.rs @@ -4,39 +4,40 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudCdnNamespaceConfig : CDN configuration for a given namespace. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudCdnNamespaceConfig { - /// Whether or not to allow users to connect to the given namespace via domain name. - #[serde(rename = "enable_domain_public_auth")] - pub enable_domain_public_auth: bool, - /// A list of CDN domains for a given namespace. - #[serde(rename = "domains")] - pub domains: Vec, - #[serde(rename = "auth_type")] - pub auth_type: crate::models::CloudCdnAuthType, - /// A list of CDN authenticated users for a given namespace. - #[serde(rename = "auth_user_list")] - pub auth_user_list: Vec, + /// Whether or not to allow users to connect to the given namespace via domain name. + #[serde(rename = "enable_domain_public_auth")] + pub enable_domain_public_auth: bool, + /// A list of CDN domains for a given namespace. + #[serde(rename = "domains")] + pub domains: Vec, + #[serde(rename = "auth_type")] + pub auth_type: crate::models::CloudCdnAuthType, + /// A list of CDN authenticated users for a given namespace. + #[serde(rename = "auth_user_list")] + pub auth_user_list: Vec, } impl CloudCdnNamespaceConfig { - /// CDN configuration for a given namespace. - pub fn new(enable_domain_public_auth: bool, domains: Vec, auth_type: crate::models::CloudCdnAuthType, auth_user_list: Vec) -> CloudCdnNamespaceConfig { - CloudCdnNamespaceConfig { - enable_domain_public_auth, - domains, - auth_type, - auth_user_list, - } - } + /// CDN configuration for a given namespace. + pub fn new( + enable_domain_public_auth: bool, + domains: Vec, + auth_type: crate::models::CloudCdnAuthType, + auth_user_list: Vec, + ) -> CloudCdnNamespaceConfig { + CloudCdnNamespaceConfig { + enable_domain_public_auth, + domains, + auth_type, + auth_user_list, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_cdn_namespace_domain.rs b/sdks/api/full/rust/src/models/cloud_cdn_namespace_domain.rs index de39d950d1..a4a79396fa 100644 --- a/sdks/api/full/rust/src/models/cloud_cdn_namespace_domain.rs +++ b/sdks/api/full/rust/src/models/cloud_cdn_namespace_domain.rs @@ -4,41 +4,43 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudCdnNamespaceDomain : A CDN domain for a given namespace. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudCdnNamespaceDomain { - /// A valid domain name (no protocol). - #[serde(rename = "domain")] - pub domain: String, - /// RFC3339 timestamp - #[serde(rename = "create_ts")] - pub create_ts: String, - #[serde(rename = "verification_status")] - pub verification_status: crate::models::CloudCdnNamespaceDomainVerificationStatus, - #[serde(rename = "verification_method")] - pub verification_method: Box, - #[serde(rename = "verification_errors")] - pub verification_errors: Vec, + /// A valid domain name (no protocol). + #[serde(rename = "domain")] + pub domain: String, + /// RFC3339 timestamp + #[serde(rename = "create_ts")] + pub create_ts: String, + #[serde(rename = "verification_status")] + pub verification_status: crate::models::CloudCdnNamespaceDomainVerificationStatus, + #[serde(rename = "verification_method")] + pub verification_method: Box, + #[serde(rename = "verification_errors")] + pub verification_errors: Vec, } impl CloudCdnNamespaceDomain { - /// A CDN domain for a given namespace. - pub fn new(domain: String, create_ts: String, verification_status: crate::models::CloudCdnNamespaceDomainVerificationStatus, verification_method: crate::models::CloudCdnNamespaceDomainVerificationMethod, verification_errors: Vec) -> CloudCdnNamespaceDomain { - CloudCdnNamespaceDomain { - domain, - create_ts, - verification_status, - verification_method: Box::new(verification_method), - verification_errors, - } - } + /// A CDN domain for a given namespace. + pub fn new( + domain: String, + create_ts: String, + verification_status: crate::models::CloudCdnNamespaceDomainVerificationStatus, + verification_method: crate::models::CloudCdnNamespaceDomainVerificationMethod, + verification_errors: Vec, + ) -> CloudCdnNamespaceDomain { + CloudCdnNamespaceDomain { + domain, + create_ts, + verification_status, + verification_method: Box::new(verification_method), + verification_errors, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_cdn_namespace_domain_verification_method.rs b/sdks/api/full/rust/src/models/cloud_cdn_namespace_domain_verification_method.rs index b6ec863217..6ee4ccb010 100644 --- a/sdks/api/full/rust/src/models/cloud_cdn_namespace_domain_verification_method.rs +++ b/sdks/api/full/rust/src/models/cloud_cdn_namespace_domain_verification_method.rs @@ -4,30 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudCdnNamespaceDomainVerificationMethod : A union representing the verification method used for this CDN domain. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudCdnNamespaceDomainVerificationMethod { - #[serde(rename = "invalid", skip_serializing_if = "Option::is_none")] - pub invalid: Option, - #[serde(rename = "http", skip_serializing_if = "Option::is_none")] - pub http: Option>, + #[serde(rename = "invalid", skip_serializing_if = "Option::is_none")] + pub invalid: Option, + #[serde(rename = "http", skip_serializing_if = "Option::is_none")] + pub http: Option>, } impl CloudCdnNamespaceDomainVerificationMethod { - /// A union representing the verification method used for this CDN domain. - pub fn new() -> CloudCdnNamespaceDomainVerificationMethod { - CloudCdnNamespaceDomainVerificationMethod { - invalid: None, - http: None, - } - } + /// A union representing the verification method used for this CDN domain. + pub fn new() -> CloudCdnNamespaceDomainVerificationMethod { + CloudCdnNamespaceDomainVerificationMethod { + invalid: None, + http: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_cdn_namespace_domain_verification_method_http.rs b/sdks/api/full/rust/src/models/cloud_cdn_namespace_domain_verification_method_http.rs index 2e382e2dea..748a818f3d 100644 --- a/sdks/api/full/rust/src/models/cloud_cdn_namespace_domain_verification_method_http.rs +++ b/sdks/api/full/rust/src/models/cloud_cdn_namespace_domain_verification_method_http.rs @@ -4,25 +4,18 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudCdnNamespaceDomainVerificationMethodHttp { - #[serde(rename = "cname_record")] - pub cname_record: String, + #[serde(rename = "cname_record")] + pub cname_record: String, } impl CloudCdnNamespaceDomainVerificationMethodHttp { - pub fn new(cname_record: String) -> CloudCdnNamespaceDomainVerificationMethodHttp { - CloudCdnNamespaceDomainVerificationMethodHttp { - cname_record, - } - } + pub fn new(cname_record: String) -> CloudCdnNamespaceDomainVerificationMethodHttp { + CloudCdnNamespaceDomainVerificationMethodHttp { cname_record } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_cdn_namespace_domain_verification_status.rs b/sdks/api/full/rust/src/models/cloud_cdn_namespace_domain_verification_status.rs index c76e43bf9a..e99b8fec85 100644 --- a/sdks/api/full/rust/src/models/cloud_cdn_namespace_domain_verification_status.rs +++ b/sdks/api/full/rust/src/models/cloud_cdn_namespace_domain_verification_status.rs @@ -4,7 +4,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -13,31 +13,26 @@ /// A value denoting the status of a CDN domain's verification status. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum CloudCdnNamespaceDomainVerificationStatus { - #[serde(rename = "active")] - Active, - #[serde(rename = "pending")] - Pending, - #[serde(rename = "failed")] - Failed, - + #[serde(rename = "active")] + Active, + #[serde(rename = "pending")] + Pending, + #[serde(rename = "failed")] + Failed, } impl ToString for CloudCdnNamespaceDomainVerificationStatus { - fn to_string(&self) -> String { - match self { - Self::Active => String::from("active"), - Self::Pending => String::from("pending"), - Self::Failed => String::from("failed"), - } - } + fn to_string(&self) -> String { + match self { + Self::Active => String::from("active"), + Self::Pending => String::from("pending"), + Self::Failed => String::from("failed"), + } + } } impl Default for CloudCdnNamespaceDomainVerificationStatus { - fn default() -> CloudCdnNamespaceDomainVerificationStatus { - Self::Active - } + fn default() -> CloudCdnNamespaceDomainVerificationStatus { + Self::Active + } } - - - - diff --git a/sdks/api/full/rust/src/models/cloud_cdn_site_summary.rs b/sdks/api/full/rust/src/models/cloud_cdn_site_summary.rs index e39c0d3d1b..b1b2d0ef71 100644 --- a/sdks/api/full/rust/src/models/cloud_cdn_site_summary.rs +++ b/sdks/api/full/rust/src/models/cloud_cdn_site_summary.rs @@ -4,46 +4,49 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudCdnSiteSummary : A CDN site summary. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudCdnSiteSummary { - #[serde(rename = "site_id")] - pub site_id: uuid::Uuid, - #[serde(rename = "upload_id")] - pub upload_id: uuid::Uuid, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - /// RFC3339 timestamp - #[serde(rename = "create_ts")] - pub create_ts: String, - /// Unsigned 64 bit integer. - #[serde(rename = "content_length")] - pub content_length: i64, - /// Whether or not this site has completely been uploaded. - #[serde(rename = "complete")] - pub complete: bool, + #[serde(rename = "site_id")] + pub site_id: uuid::Uuid, + #[serde(rename = "upload_id")] + pub upload_id: uuid::Uuid, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + /// RFC3339 timestamp + #[serde(rename = "create_ts")] + pub create_ts: String, + /// Unsigned 64 bit integer. + #[serde(rename = "content_length")] + pub content_length: i64, + /// Whether or not this site has completely been uploaded. + #[serde(rename = "complete")] + pub complete: bool, } impl CloudCdnSiteSummary { - /// A CDN site summary. - pub fn new(site_id: uuid::Uuid, upload_id: uuid::Uuid, display_name: String, create_ts: String, content_length: i64, complete: bool) -> CloudCdnSiteSummary { - CloudCdnSiteSummary { - site_id, - upload_id, - display_name, - create_ts, - content_length, - complete, - } - } + /// A CDN site summary. + pub fn new( + site_id: uuid::Uuid, + upload_id: uuid::Uuid, + display_name: String, + create_ts: String, + content_length: i64, + complete: bool, + ) -> CloudCdnSiteSummary { + CloudCdnSiteSummary { + site_id, + upload_id, + display_name, + create_ts, + content_length, + complete, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_custom_avatar_summary.rs b/sdks/api/full/rust/src/models/cloud_custom_avatar_summary.rs index deb9bcaeab..f0c33870f0 100644 --- a/sdks/api/full/rust/src/models/cloud_custom_avatar_summary.rs +++ b/sdks/api/full/rust/src/models/cloud_custom_avatar_summary.rs @@ -4,47 +4,49 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudCustomAvatarSummary : A custom avatar summary. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudCustomAvatarSummary { - #[serde(rename = "upload_id")] - pub upload_id: uuid::Uuid, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - /// RFC3339 timestamp - #[serde(rename = "create_ts")] - pub create_ts: String, - /// The URL of this custom avatar image. Only present if upload is complete. - #[serde(rename = "url", skip_serializing_if = "Option::is_none")] - pub url: Option, - /// Unsigned 64 bit integer. - #[serde(rename = "content_length")] - pub content_length: i64, - /// Whether or not this custom avatar has completely been uploaded. - #[serde(rename = "complete")] - pub complete: bool, + #[serde(rename = "upload_id")] + pub upload_id: uuid::Uuid, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + /// RFC3339 timestamp + #[serde(rename = "create_ts")] + pub create_ts: String, + /// The URL of this custom avatar image. Only present if upload is complete. + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, + /// Unsigned 64 bit integer. + #[serde(rename = "content_length")] + pub content_length: i64, + /// Whether or not this custom avatar has completely been uploaded. + #[serde(rename = "complete")] + pub complete: bool, } impl CloudCustomAvatarSummary { - /// A custom avatar summary. - pub fn new(upload_id: uuid::Uuid, display_name: String, create_ts: String, content_length: i64, complete: bool) -> CloudCustomAvatarSummary { - CloudCustomAvatarSummary { - upload_id, - display_name, - create_ts, - url: None, - content_length, - complete, - } - } + /// A custom avatar summary. + pub fn new( + upload_id: uuid::Uuid, + display_name: String, + create_ts: String, + content_length: i64, + complete: bool, + ) -> CloudCustomAvatarSummary { + CloudCustomAvatarSummary { + upload_id, + display_name, + create_ts, + url: None, + content_length, + complete, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_devices_complete_device_link_request.rs b/sdks/api/full/rust/src/models/cloud_devices_complete_device_link_request.rs index be88fe67ec..9d9567e981 100644 --- a/sdks/api/full/rust/src/models/cloud_devices_complete_device_link_request.rs +++ b/sdks/api/full/rust/src/models/cloud_devices_complete_device_link_request.rs @@ -4,29 +4,27 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudDevicesCompleteDeviceLinkRequest { - /// Documentation at https://jwt.io/ - #[serde(rename = "device_link_token")] - pub device_link_token: String, - #[serde(rename = "game_id")] - pub game_id: uuid::Uuid, + /// Documentation at https://jwt.io/ + #[serde(rename = "device_link_token")] + pub device_link_token: String, + #[serde(rename = "game_id")] + pub game_id: uuid::Uuid, } impl CloudDevicesCompleteDeviceLinkRequest { - pub fn new(device_link_token: String, game_id: uuid::Uuid) -> CloudDevicesCompleteDeviceLinkRequest { - CloudDevicesCompleteDeviceLinkRequest { - device_link_token, - game_id, - } - } + pub fn new( + device_link_token: String, + game_id: uuid::Uuid, + ) -> CloudDevicesCompleteDeviceLinkRequest { + CloudDevicesCompleteDeviceLinkRequest { + device_link_token, + game_id, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_devices_get_device_link_response.rs b/sdks/api/full/rust/src/models/cloud_devices_get_device_link_response.rs index 38a1f79d55..ed0dd748b0 100644 --- a/sdks/api/full/rust/src/models/cloud_devices_get_device_link_response.rs +++ b/sdks/api/full/rust/src/models/cloud_devices_get_device_link_response.rs @@ -4,28 +4,23 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudDevicesGetDeviceLinkResponse { - #[serde(rename = "cloud_token", skip_serializing_if = "Option::is_none")] - pub cloud_token: Option, - #[serde(rename = "watch")] - pub watch: Box, + #[serde(rename = "cloud_token", skip_serializing_if = "Option::is_none")] + pub cloud_token: Option, + #[serde(rename = "watch")] + pub watch: Box, } impl CloudDevicesGetDeviceLinkResponse { - pub fn new(watch: crate::models::WatchResponse) -> CloudDevicesGetDeviceLinkResponse { - CloudDevicesGetDeviceLinkResponse { - cloud_token: None, - watch: Box::new(watch), - } - } + pub fn new(watch: crate::models::WatchResponse) -> CloudDevicesGetDeviceLinkResponse { + CloudDevicesGetDeviceLinkResponse { + cloud_token: None, + watch: Box::new(watch), + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_devices_prepare_device_link_response.rs b/sdks/api/full/rust/src/models/cloud_devices_prepare_device_link_response.rs index 3e33ef2133..3615140d36 100644 --- a/sdks/api/full/rust/src/models/cloud_devices_prepare_device_link_response.rs +++ b/sdks/api/full/rust/src/models/cloud_devices_prepare_device_link_response.rs @@ -4,31 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudDevicesPrepareDeviceLinkResponse { - #[serde(rename = "device_link_id")] - pub device_link_id: uuid::Uuid, - #[serde(rename = "device_link_token")] - pub device_link_token: String, - #[serde(rename = "device_link_url")] - pub device_link_url: String, + #[serde(rename = "device_link_id")] + pub device_link_id: uuid::Uuid, + #[serde(rename = "device_link_token")] + pub device_link_token: String, + #[serde(rename = "device_link_url")] + pub device_link_url: String, } impl CloudDevicesPrepareDeviceLinkResponse { - pub fn new(device_link_id: uuid::Uuid, device_link_token: String, device_link_url: String) -> CloudDevicesPrepareDeviceLinkResponse { - CloudDevicesPrepareDeviceLinkResponse { - device_link_id, - device_link_token, - device_link_url, - } - } + pub fn new( + device_link_id: uuid::Uuid, + device_link_token: String, + device_link_url: String, + ) -> CloudDevicesPrepareDeviceLinkResponse { + CloudDevicesPrepareDeviceLinkResponse { + device_link_id, + device_link_token, + device_link_url, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_game_full.rs b/sdks/api/full/rust/src/models/cloud_game_full.rs index 62989b942c..87e60f9cac 100644 --- a/sdks/api/full/rust/src/models/cloud_game_full.rs +++ b/sdks/api/full/rust/src/models/cloud_game_full.rs @@ -4,66 +4,72 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudGameFull : A full game. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGameFull { - #[serde(rename = "game_id")] - pub game_id: uuid::Uuid, - /// RFC3339 timestamp - #[serde(rename = "create_ts")] - pub create_ts: String, - /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. - #[serde(rename = "name_id")] - pub name_id: String, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "developer_group_id")] - pub developer_group_id: uuid::Uuid, - /// Unsigned 32 bit integer. - #[serde(rename = "total_player_count")] - pub total_player_count: i32, - /// The URL of this game's logo image. - #[serde(rename = "logo_url", skip_serializing_if = "Option::is_none")] - pub logo_url: Option, - /// The URL of this game's banner image. - #[serde(rename = "banner_url", skip_serializing_if = "Option::is_none")] - pub banner_url: Option, - /// A list of namespace summaries. - #[serde(rename = "namespaces")] - pub namespaces: Vec, - /// A list of version summaries. - #[serde(rename = "versions")] - pub versions: Vec, - /// A list of region summaries. - #[serde(rename = "available_regions")] - pub available_regions: Vec, + #[serde(rename = "game_id")] + pub game_id: uuid::Uuid, + /// RFC3339 timestamp + #[serde(rename = "create_ts")] + pub create_ts: String, + /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. + #[serde(rename = "name_id")] + pub name_id: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "developer_group_id")] + pub developer_group_id: uuid::Uuid, + /// Unsigned 32 bit integer. + #[serde(rename = "total_player_count")] + pub total_player_count: i32, + /// The URL of this game's logo image. + #[serde(rename = "logo_url", skip_serializing_if = "Option::is_none")] + pub logo_url: Option, + /// The URL of this game's banner image. + #[serde(rename = "banner_url", skip_serializing_if = "Option::is_none")] + pub banner_url: Option, + /// A list of namespace summaries. + #[serde(rename = "namespaces")] + pub namespaces: Vec, + /// A list of version summaries. + #[serde(rename = "versions")] + pub versions: Vec, + /// A list of region summaries. + #[serde(rename = "available_regions")] + pub available_regions: Vec, } impl CloudGameFull { - /// A full game. - pub fn new(game_id: uuid::Uuid, create_ts: String, name_id: String, display_name: String, developer_group_id: uuid::Uuid, total_player_count: i32, namespaces: Vec, versions: Vec, available_regions: Vec) -> CloudGameFull { - CloudGameFull { - game_id, - create_ts, - name_id, - display_name, - developer_group_id, - total_player_count, - logo_url: None, - banner_url: None, - namespaces, - versions, - available_regions, - } - } + /// A full game. + pub fn new( + game_id: uuid::Uuid, + create_ts: String, + name_id: String, + display_name: String, + developer_group_id: uuid::Uuid, + total_player_count: i32, + namespaces: Vec, + versions: Vec, + available_regions: Vec, + ) -> CloudGameFull { + CloudGameFull { + game_id, + create_ts, + name_id, + display_name, + developer_group_id, + total_player_count, + logo_url: None, + banner_url: None, + namespaces, + versions, + available_regions, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_game_lobby_expenses.rs b/sdks/api/full/rust/src/models/cloud_game_lobby_expenses.rs index bdfc52349a..c0f9f4598c 100644 --- a/sdks/api/full/rust/src/models/cloud_game_lobby_expenses.rs +++ b/sdks/api/full/rust/src/models/cloud_game_lobby_expenses.rs @@ -4,35 +4,35 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudGameLobbyExpenses : Game lobby expenses. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGameLobbyExpenses { - #[serde(rename = "game")] - pub game: Box, - /// A list of namespace summaries. - #[serde(rename = "namespaces")] - pub namespaces: Vec, - /// A list of multiple region tier expenses. - #[serde(rename = "expenses")] - pub expenses: Vec, + #[serde(rename = "game")] + pub game: Box, + /// A list of namespace summaries. + #[serde(rename = "namespaces")] + pub namespaces: Vec, + /// A list of multiple region tier expenses. + #[serde(rename = "expenses")] + pub expenses: Vec, } impl CloudGameLobbyExpenses { - /// Game lobby expenses. - pub fn new(game: crate::models::GameHandle, namespaces: Vec, expenses: Vec) -> CloudGameLobbyExpenses { - CloudGameLobbyExpenses { - game: Box::new(game), - namespaces, - expenses, - } - } + /// Game lobby expenses. + pub fn new( + game: crate::models::GameHandle, + namespaces: Vec, + expenses: Vec, + ) -> CloudGameLobbyExpenses { + CloudGameLobbyExpenses { + game: Box::new(game), + namespaces, + expenses, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_build_compression.rs b/sdks/api/full/rust/src/models/cloud_games_build_compression.rs index 9980cc9cb9..9cf09b955b 100644 --- a/sdks/api/full/rust/src/models/cloud_games_build_compression.rs +++ b/sdks/api/full/rust/src/models/cloud_games_build_compression.rs @@ -4,36 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum CloudGamesBuildCompression { - #[serde(rename = "none")] - None, - #[serde(rename = "lz4")] - Lz4, - + #[serde(rename = "none")] + None, + #[serde(rename = "lz4")] + Lz4, } impl ToString for CloudGamesBuildCompression { - fn to_string(&self) -> String { - match self { - Self::None => String::from("none"), - Self::Lz4 => String::from("lz4"), - } - } + fn to_string(&self) -> String { + match self { + Self::None => String::from("none"), + Self::Lz4 => String::from("lz4"), + } + } } impl Default for CloudGamesBuildCompression { - fn default() -> CloudGamesBuildCompression { - Self::None - } + fn default() -> CloudGamesBuildCompression { + Self::None + } } - - - - diff --git a/sdks/api/full/rust/src/models/cloud_games_build_kind.rs b/sdks/api/full/rust/src/models/cloud_games_build_kind.rs index 892db37414..4afc78adae 100644 --- a/sdks/api/full/rust/src/models/cloud_games_build_kind.rs +++ b/sdks/api/full/rust/src/models/cloud_games_build_kind.rs @@ -4,36 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum CloudGamesBuildKind { - #[serde(rename = "docker_image")] - DockerImage, - #[serde(rename = "oci_bundle")] - OciBundle, - + #[serde(rename = "docker_image")] + DockerImage, + #[serde(rename = "oci_bundle")] + OciBundle, } impl ToString for CloudGamesBuildKind { - fn to_string(&self) -> String { - match self { - Self::DockerImage => String::from("docker_image"), - Self::OciBundle => String::from("oci_bundle"), - } - } + fn to_string(&self) -> String { + match self { + Self::DockerImage => String::from("docker_image"), + Self::OciBundle => String::from("oci_bundle"), + } + } } impl Default for CloudGamesBuildKind { - fn default() -> CloudGamesBuildKind { - Self::DockerImage - } + fn default() -> CloudGamesBuildKind { + Self::DockerImage + } } - - - - diff --git a/sdks/api/full/rust/src/models/cloud_games_create_cloud_token_response.rs b/sdks/api/full/rust/src/models/cloud_games_create_cloud_token_response.rs index d6264302b4..c9cebaab4e 100644 --- a/sdks/api/full/rust/src/models/cloud_games_create_cloud_token_response.rs +++ b/sdks/api/full/rust/src/models/cloud_games_create_cloud_token_response.rs @@ -4,26 +4,19 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesCreateCloudTokenResponse { - /// A JSON Web Token. Slightly modified to include a description prefix and use Protobufs of JSON. - #[serde(rename = "token")] - pub token: String, + /// A JSON Web Token. Slightly modified to include a description prefix and use Protobufs of JSON. + #[serde(rename = "token")] + pub token: String, } impl CloudGamesCreateCloudTokenResponse { - pub fn new(token: String) -> CloudGamesCreateCloudTokenResponse { - CloudGamesCreateCloudTokenResponse { - token, - } - } + pub fn new(token: String) -> CloudGamesCreateCloudTokenResponse { + CloudGamesCreateCloudTokenResponse { token } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_create_game_build_request.rs b/sdks/api/full/rust/src/models/cloud_games_create_game_build_request.rs index dcf44f01fe..34899b9877 100644 --- a/sdks/api/full/rust/src/models/cloud_games_create_game_build_request.rs +++ b/sdks/api/full/rust/src/models/cloud_games_create_game_build_request.rs @@ -4,42 +4,41 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesCreateGameBuildRequest { - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - /// A tag given to the game build. - #[serde(rename = "image_tag")] - pub image_tag: String, - #[serde(rename = "image_file")] - pub image_file: Box, - #[serde(rename = "multipart_upload", skip_serializing_if = "Option::is_none")] - pub multipart_upload: Option, - #[serde(rename = "kind", skip_serializing_if = "Option::is_none")] - pub kind: Option, - #[serde(rename = "compression", skip_serializing_if = "Option::is_none")] - pub compression: Option, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + /// A tag given to the game build. + #[serde(rename = "image_tag")] + pub image_tag: String, + #[serde(rename = "image_file")] + pub image_file: Box, + #[serde(rename = "multipart_upload", skip_serializing_if = "Option::is_none")] + pub multipart_upload: Option, + #[serde(rename = "kind", skip_serializing_if = "Option::is_none")] + pub kind: Option, + #[serde(rename = "compression", skip_serializing_if = "Option::is_none")] + pub compression: Option, } impl CloudGamesCreateGameBuildRequest { - pub fn new(display_name: String, image_tag: String, image_file: crate::models::UploadPrepareFile) -> CloudGamesCreateGameBuildRequest { - CloudGamesCreateGameBuildRequest { - display_name, - image_tag, - image_file: Box::new(image_file), - multipart_upload: None, - kind: None, - compression: None, - } - } + pub fn new( + display_name: String, + image_tag: String, + image_file: crate::models::UploadPrepareFile, + ) -> CloudGamesCreateGameBuildRequest { + CloudGamesCreateGameBuildRequest { + display_name, + image_tag, + image_file: Box::new(image_file), + multipart_upload: None, + kind: None, + compression: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_create_game_build_response.rs b/sdks/api/full/rust/src/models/cloud_games_create_game_build_response.rs index d1ea239568..feacce4ccf 100644 --- a/sdks/api/full/rust/src/models/cloud_games_create_game_build_response.rs +++ b/sdks/api/full/rust/src/models/cloud_games_create_game_build_response.rs @@ -4,34 +4,35 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesCreateGameBuildResponse { - #[serde(rename = "build_id")] - pub build_id: uuid::Uuid, - #[serde(rename = "upload_id")] - pub upload_id: uuid::Uuid, - #[serde(rename = "image_presigned_request", skip_serializing_if = "Option::is_none")] - pub image_presigned_request: Option>, - #[serde(rename = "image_presigned_requests", skip_serializing_if = "Option::is_none")] - pub image_presigned_requests: Option>, + #[serde(rename = "build_id")] + pub build_id: uuid::Uuid, + #[serde(rename = "upload_id")] + pub upload_id: uuid::Uuid, + #[serde( + rename = "image_presigned_request", + skip_serializing_if = "Option::is_none" + )] + pub image_presigned_request: Option>, + #[serde( + rename = "image_presigned_requests", + skip_serializing_if = "Option::is_none" + )] + pub image_presigned_requests: Option>, } impl CloudGamesCreateGameBuildResponse { - pub fn new(build_id: uuid::Uuid, upload_id: uuid::Uuid) -> CloudGamesCreateGameBuildResponse { - CloudGamesCreateGameBuildResponse { - build_id, - upload_id, - image_presigned_request: None, - image_presigned_requests: None, - } - } + pub fn new(build_id: uuid::Uuid, upload_id: uuid::Uuid) -> CloudGamesCreateGameBuildResponse { + CloudGamesCreateGameBuildResponse { + build_id, + upload_id, + image_presigned_request: None, + image_presigned_requests: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_create_game_cdn_site_request.rs b/sdks/api/full/rust/src/models/cloud_games_create_game_cdn_site_request.rs index 57d52bb0a7..313aee8065 100644 --- a/sdks/api/full/rust/src/models/cloud_games_create_game_cdn_site_request.rs +++ b/sdks/api/full/rust/src/models/cloud_games_create_game_cdn_site_request.rs @@ -4,30 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesCreateGameCdnSiteRequest { - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - /// A list of files preparing to upload. - #[serde(rename = "files")] - pub files: Vec, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + /// A list of files preparing to upload. + #[serde(rename = "files")] + pub files: Vec, } impl CloudGamesCreateGameCdnSiteRequest { - pub fn new(display_name: String, files: Vec) -> CloudGamesCreateGameCdnSiteRequest { - CloudGamesCreateGameCdnSiteRequest { - display_name, - files, - } - } + pub fn new( + display_name: String, + files: Vec, + ) -> CloudGamesCreateGameCdnSiteRequest { + CloudGamesCreateGameCdnSiteRequest { + display_name, + files, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_create_game_cdn_site_response.rs b/sdks/api/full/rust/src/models/cloud_games_create_game_cdn_site_response.rs index 08adbe87ba..2831512464 100644 --- a/sdks/api/full/rust/src/models/cloud_games_create_game_cdn_site_response.rs +++ b/sdks/api/full/rust/src/models/cloud_games_create_game_cdn_site_response.rs @@ -4,31 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesCreateGameCdnSiteResponse { - #[serde(rename = "site_id")] - pub site_id: uuid::Uuid, - #[serde(rename = "upload_id")] - pub upload_id: uuid::Uuid, - #[serde(rename = "presigned_requests")] - pub presigned_requests: Vec, + #[serde(rename = "site_id")] + pub site_id: uuid::Uuid, + #[serde(rename = "upload_id")] + pub upload_id: uuid::Uuid, + #[serde(rename = "presigned_requests")] + pub presigned_requests: Vec, } impl CloudGamesCreateGameCdnSiteResponse { - pub fn new(site_id: uuid::Uuid, upload_id: uuid::Uuid, presigned_requests: Vec) -> CloudGamesCreateGameCdnSiteResponse { - CloudGamesCreateGameCdnSiteResponse { - site_id, - upload_id, - presigned_requests, - } - } + pub fn new( + site_id: uuid::Uuid, + upload_id: uuid::Uuid, + presigned_requests: Vec, + ) -> CloudGamesCreateGameCdnSiteResponse { + CloudGamesCreateGameCdnSiteResponse { + site_id, + upload_id, + presigned_requests, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_create_game_request.rs b/sdks/api/full/rust/src/models/cloud_games_create_game_request.rs index 50569daac5..cd0cc7ffd3 100644 --- a/sdks/api/full/rust/src/models/cloud_games_create_game_request.rs +++ b/sdks/api/full/rust/src/models/cloud_games_create_game_request.rs @@ -4,33 +4,31 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesCreateGameRequest { - /// A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short. - #[serde(rename = "name_id", skip_serializing_if = "Option::is_none")] - pub name_id: Option, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "developer_group_id")] - pub developer_group_id: uuid::Uuid, + /// A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short. + #[serde(rename = "name_id", skip_serializing_if = "Option::is_none")] + pub name_id: Option, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "developer_group_id")] + pub developer_group_id: uuid::Uuid, } impl CloudGamesCreateGameRequest { - pub fn new(display_name: String, developer_group_id: uuid::Uuid) -> CloudGamesCreateGameRequest { - CloudGamesCreateGameRequest { - name_id: None, - display_name, - developer_group_id, - } - } + pub fn new( + display_name: String, + developer_group_id: uuid::Uuid, + ) -> CloudGamesCreateGameRequest { + CloudGamesCreateGameRequest { + name_id: None, + display_name, + developer_group_id, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_create_game_response.rs b/sdks/api/full/rust/src/models/cloud_games_create_game_response.rs index 9cb95bbc78..55865a7004 100644 --- a/sdks/api/full/rust/src/models/cloud_games_create_game_response.rs +++ b/sdks/api/full/rust/src/models/cloud_games_create_game_response.rs @@ -4,25 +4,18 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesCreateGameResponse { - #[serde(rename = "game_id")] - pub game_id: uuid::Uuid, + #[serde(rename = "game_id")] + pub game_id: uuid::Uuid, } impl CloudGamesCreateGameResponse { - pub fn new(game_id: uuid::Uuid) -> CloudGamesCreateGameResponse { - CloudGamesCreateGameResponse { - game_id, - } - } + pub fn new(game_id: uuid::Uuid) -> CloudGamesCreateGameResponse { + CloudGamesCreateGameResponse { game_id } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_create_game_version_request.rs b/sdks/api/full/rust/src/models/cloud_games_create_game_version_request.rs index d49bcf042d..159aa8f920 100644 --- a/sdks/api/full/rust/src/models/cloud_games_create_game_version_request.rs +++ b/sdks/api/full/rust/src/models/cloud_games_create_game_version_request.rs @@ -4,29 +4,27 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesCreateGameVersionRequest { - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "config")] - pub config: Box, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "config")] + pub config: Box, } impl CloudGamesCreateGameVersionRequest { - pub fn new(display_name: String, config: crate::models::CloudVersionConfig) -> CloudGamesCreateGameVersionRequest { - CloudGamesCreateGameVersionRequest { - display_name, - config: Box::new(config), - } - } + pub fn new( + display_name: String, + config: crate::models::CloudVersionConfig, + ) -> CloudGamesCreateGameVersionRequest { + CloudGamesCreateGameVersionRequest { + display_name, + config: Box::new(config), + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_create_game_version_response.rs b/sdks/api/full/rust/src/models/cloud_games_create_game_version_response.rs index fdda808ad3..6faea83e92 100644 --- a/sdks/api/full/rust/src/models/cloud_games_create_game_version_response.rs +++ b/sdks/api/full/rust/src/models/cloud_games_create_game_version_response.rs @@ -4,25 +4,18 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesCreateGameVersionResponse { - #[serde(rename = "version_id")] - pub version_id: uuid::Uuid, + #[serde(rename = "version_id")] + pub version_id: uuid::Uuid, } impl CloudGamesCreateGameVersionResponse { - pub fn new(version_id: uuid::Uuid) -> CloudGamesCreateGameVersionResponse { - CloudGamesCreateGameVersionResponse { - version_id, - } - } + pub fn new(version_id: uuid::Uuid) -> CloudGamesCreateGameVersionResponse { + CloudGamesCreateGameVersionResponse { version_id } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_delete_matchmaker_lobby_response.rs b/sdks/api/full/rust/src/models/cloud_games_delete_matchmaker_lobby_response.rs index d7fa01f123..2a9a1aa711 100644 --- a/sdks/api/full/rust/src/models/cloud_games_delete_matchmaker_lobby_response.rs +++ b/sdks/api/full/rust/src/models/cloud_games_delete_matchmaker_lobby_response.rs @@ -4,26 +4,19 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesDeleteMatchmakerLobbyResponse { - /// Whether or not the lobby was successfully stopped. - #[serde(rename = "did_remove")] - pub did_remove: bool, + /// Whether or not the lobby was successfully stopped. + #[serde(rename = "did_remove")] + pub did_remove: bool, } impl CloudGamesDeleteMatchmakerLobbyResponse { - pub fn new(did_remove: bool) -> CloudGamesDeleteMatchmakerLobbyResponse { - CloudGamesDeleteMatchmakerLobbyResponse { - did_remove, - } - } + pub fn new(did_remove: bool) -> CloudGamesDeleteMatchmakerLobbyResponse { + CloudGamesDeleteMatchmakerLobbyResponse { did_remove } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_export_lobby_logs_request.rs b/sdks/api/full/rust/src/models/cloud_games_export_lobby_logs_request.rs index 6f095bf46c..1bcbea9fe2 100644 --- a/sdks/api/full/rust/src/models/cloud_games_export_lobby_logs_request.rs +++ b/sdks/api/full/rust/src/models/cloud_games_export_lobby_logs_request.rs @@ -4,25 +4,18 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesExportLobbyLogsRequest { - #[serde(rename = "stream")] - pub stream: crate::models::CloudGamesLogStream, + #[serde(rename = "stream")] + pub stream: crate::models::CloudGamesLogStream, } impl CloudGamesExportLobbyLogsRequest { - pub fn new(stream: crate::models::CloudGamesLogStream) -> CloudGamesExportLobbyLogsRequest { - CloudGamesExportLobbyLogsRequest { - stream, - } - } + pub fn new(stream: crate::models::CloudGamesLogStream) -> CloudGamesExportLobbyLogsRequest { + CloudGamesExportLobbyLogsRequest { stream } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_export_lobby_logs_response.rs b/sdks/api/full/rust/src/models/cloud_games_export_lobby_logs_response.rs index 3d37548c73..537962e6a1 100644 --- a/sdks/api/full/rust/src/models/cloud_games_export_lobby_logs_response.rs +++ b/sdks/api/full/rust/src/models/cloud_games_export_lobby_logs_response.rs @@ -4,26 +4,19 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesExportLobbyLogsResponse { - /// The URL to a CSV file for the given lobby history. - #[serde(rename = "url")] - pub url: String, + /// The URL to a CSV file for the given lobby history. + #[serde(rename = "url")] + pub url: String, } impl CloudGamesExportLobbyLogsResponse { - pub fn new(url: String) -> CloudGamesExportLobbyLogsResponse { - CloudGamesExportLobbyLogsResponse { - url, - } - } + pub fn new(url: String) -> CloudGamesExportLobbyLogsResponse { + CloudGamesExportLobbyLogsResponse { url } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_export_matchmaker_lobby_history_request.rs b/sdks/api/full/rust/src/models/cloud_games_export_matchmaker_lobby_history_request.rs index 49012ec700..e8ca4f4cda 100644 --- a/sdks/api/full/rust/src/models/cloud_games_export_matchmaker_lobby_history_request.rs +++ b/sdks/api/full/rust/src/models/cloud_games_export_matchmaker_lobby_history_request.rs @@ -4,30 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesExportMatchmakerLobbyHistoryRequest { - /// Unsigned 64 bit integer. - #[serde(rename = "query_start")] - pub query_start: i64, - /// Unsigned 64 bit integer. - #[serde(rename = "query_end")] - pub query_end: i64, + /// Unsigned 64 bit integer. + #[serde(rename = "query_start")] + pub query_start: i64, + /// Unsigned 64 bit integer. + #[serde(rename = "query_end")] + pub query_end: i64, } impl CloudGamesExportMatchmakerLobbyHistoryRequest { - pub fn new(query_start: i64, query_end: i64) -> CloudGamesExportMatchmakerLobbyHistoryRequest { - CloudGamesExportMatchmakerLobbyHistoryRequest { - query_start, - query_end, - } - } + pub fn new(query_start: i64, query_end: i64) -> CloudGamesExportMatchmakerLobbyHistoryRequest { + CloudGamesExportMatchmakerLobbyHistoryRequest { + query_start, + query_end, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_export_matchmaker_lobby_history_response.rs b/sdks/api/full/rust/src/models/cloud_games_export_matchmaker_lobby_history_response.rs index a526adcc88..b6f7026b4e 100644 --- a/sdks/api/full/rust/src/models/cloud_games_export_matchmaker_lobby_history_response.rs +++ b/sdks/api/full/rust/src/models/cloud_games_export_matchmaker_lobby_history_response.rs @@ -4,26 +4,19 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesExportMatchmakerLobbyHistoryResponse { - /// The URL to a CSV file for the given lobby history. - #[serde(rename = "url")] - pub url: String, + /// The URL to a CSV file for the given lobby history. + #[serde(rename = "url")] + pub url: String, } impl CloudGamesExportMatchmakerLobbyHistoryResponse { - pub fn new(url: String) -> CloudGamesExportMatchmakerLobbyHistoryResponse { - CloudGamesExportMatchmakerLobbyHistoryResponse { - url, - } - } + pub fn new(url: String) -> CloudGamesExportMatchmakerLobbyHistoryResponse { + CloudGamesExportMatchmakerLobbyHistoryResponse { url } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_game_banner_upload_prepare_request.rs b/sdks/api/full/rust/src/models/cloud_games_game_banner_upload_prepare_request.rs index c1af305a79..ce2c26794b 100644 --- a/sdks/api/full/rust/src/models/cloud_games_game_banner_upload_prepare_request.rs +++ b/sdks/api/full/rust/src/models/cloud_games_game_banner_upload_prepare_request.rs @@ -4,34 +4,29 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesGameBannerUploadPrepareRequest { - /// The path/filename of the game banner. - #[serde(rename = "path")] - pub path: String, - /// The MIME type of the game banner. - #[serde(rename = "mime", skip_serializing_if = "Option::is_none")] - pub mime: Option, - /// Unsigned 64 bit integer. - #[serde(rename = "content_length")] - pub content_length: i64, + /// The path/filename of the game banner. + #[serde(rename = "path")] + pub path: String, + /// The MIME type of the game banner. + #[serde(rename = "mime", skip_serializing_if = "Option::is_none")] + pub mime: Option, + /// Unsigned 64 bit integer. + #[serde(rename = "content_length")] + pub content_length: i64, } impl CloudGamesGameBannerUploadPrepareRequest { - pub fn new(path: String, content_length: i64) -> CloudGamesGameBannerUploadPrepareRequest { - CloudGamesGameBannerUploadPrepareRequest { - path, - mime: None, - content_length, - } - } + pub fn new(path: String, content_length: i64) -> CloudGamesGameBannerUploadPrepareRequest { + CloudGamesGameBannerUploadPrepareRequest { + path, + mime: None, + content_length, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_game_banner_upload_prepare_response.rs b/sdks/api/full/rust/src/models/cloud_games_game_banner_upload_prepare_response.rs index e264738bfe..409199cdb5 100644 --- a/sdks/api/full/rust/src/models/cloud_games_game_banner_upload_prepare_response.rs +++ b/sdks/api/full/rust/src/models/cloud_games_game_banner_upload_prepare_response.rs @@ -4,28 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesGameBannerUploadPrepareResponse { - #[serde(rename = "upload_id")] - pub upload_id: uuid::Uuid, - #[serde(rename = "presigned_request")] - pub presigned_request: Box, + #[serde(rename = "upload_id")] + pub upload_id: uuid::Uuid, + #[serde(rename = "presigned_request")] + pub presigned_request: Box, } impl CloudGamesGameBannerUploadPrepareResponse { - pub fn new(upload_id: uuid::Uuid, presigned_request: crate::models::UploadPresignedRequest) -> CloudGamesGameBannerUploadPrepareResponse { - CloudGamesGameBannerUploadPrepareResponse { - upload_id, - presigned_request: Box::new(presigned_request), - } - } + pub fn new( + upload_id: uuid::Uuid, + presigned_request: crate::models::UploadPresignedRequest, + ) -> CloudGamesGameBannerUploadPrepareResponse { + CloudGamesGameBannerUploadPrepareResponse { + upload_id, + presigned_request: Box::new(presigned_request), + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_game_logo_upload_prepare_request.rs b/sdks/api/full/rust/src/models/cloud_games_game_logo_upload_prepare_request.rs index bfb327f303..0b33914159 100644 --- a/sdks/api/full/rust/src/models/cloud_games_game_logo_upload_prepare_request.rs +++ b/sdks/api/full/rust/src/models/cloud_games_game_logo_upload_prepare_request.rs @@ -4,34 +4,29 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesGameLogoUploadPrepareRequest { - /// The path/filename of the game logo. - #[serde(rename = "path")] - pub path: String, - /// The MIME type of the game logo. - #[serde(rename = "mime", skip_serializing_if = "Option::is_none")] - pub mime: Option, - /// Unsigned 64 bit integer. - #[serde(rename = "content_length")] - pub content_length: i64, + /// The path/filename of the game logo. + #[serde(rename = "path")] + pub path: String, + /// The MIME type of the game logo. + #[serde(rename = "mime", skip_serializing_if = "Option::is_none")] + pub mime: Option, + /// Unsigned 64 bit integer. + #[serde(rename = "content_length")] + pub content_length: i64, } impl CloudGamesGameLogoUploadPrepareRequest { - pub fn new(path: String, content_length: i64) -> CloudGamesGameLogoUploadPrepareRequest { - CloudGamesGameLogoUploadPrepareRequest { - path, - mime: None, - content_length, - } - } + pub fn new(path: String, content_length: i64) -> CloudGamesGameLogoUploadPrepareRequest { + CloudGamesGameLogoUploadPrepareRequest { + path, + mime: None, + content_length, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_game_logo_upload_prepare_response.rs b/sdks/api/full/rust/src/models/cloud_games_game_logo_upload_prepare_response.rs index 07e6240a91..145e8abf0a 100644 --- a/sdks/api/full/rust/src/models/cloud_games_game_logo_upload_prepare_response.rs +++ b/sdks/api/full/rust/src/models/cloud_games_game_logo_upload_prepare_response.rs @@ -4,28 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesGameLogoUploadPrepareResponse { - #[serde(rename = "upload_id")] - pub upload_id: uuid::Uuid, - #[serde(rename = "presigned_request")] - pub presigned_request: Box, + #[serde(rename = "upload_id")] + pub upload_id: uuid::Uuid, + #[serde(rename = "presigned_request")] + pub presigned_request: Box, } impl CloudGamesGameLogoUploadPrepareResponse { - pub fn new(upload_id: uuid::Uuid, presigned_request: crate::models::UploadPresignedRequest) -> CloudGamesGameLogoUploadPrepareResponse { - CloudGamesGameLogoUploadPrepareResponse { - upload_id, - presigned_request: Box::new(presigned_request), - } - } + pub fn new( + upload_id: uuid::Uuid, + presigned_request: crate::models::UploadPresignedRequest, + ) -> CloudGamesGameLogoUploadPrepareResponse { + CloudGamesGameLogoUploadPrepareResponse { + upload_id, + presigned_request: Box::new(presigned_request), + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_get_game_by_id_response.rs b/sdks/api/full/rust/src/models/cloud_games_get_game_by_id_response.rs index 7b34a45026..02eb27ff5d 100644 --- a/sdks/api/full/rust/src/models/cloud_games_get_game_by_id_response.rs +++ b/sdks/api/full/rust/src/models/cloud_games_get_game_by_id_response.rs @@ -4,28 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesGetGameByIdResponse { - #[serde(rename = "game")] - pub game: Box, - #[serde(rename = "watch")] - pub watch: Box, + #[serde(rename = "game")] + pub game: Box, + #[serde(rename = "watch")] + pub watch: Box, } impl CloudGamesGetGameByIdResponse { - pub fn new(game: crate::models::CloudGameFull, watch: crate::models::WatchResponse) -> CloudGamesGetGameByIdResponse { - CloudGamesGetGameByIdResponse { - game: Box::new(game), - watch: Box::new(watch), - } - } + pub fn new( + game: crate::models::CloudGameFull, + watch: crate::models::WatchResponse, + ) -> CloudGamesGetGameByIdResponse { + CloudGamesGetGameByIdResponse { + game: Box::new(game), + watch: Box::new(watch), + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_get_game_version_by_id_response.rs b/sdks/api/full/rust/src/models/cloud_games_get_game_version_by_id_response.rs index 17d85fdb62..b95750a2cb 100644 --- a/sdks/api/full/rust/src/models/cloud_games_get_game_version_by_id_response.rs +++ b/sdks/api/full/rust/src/models/cloud_games_get_game_version_by_id_response.rs @@ -4,25 +4,20 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesGetGameVersionByIdResponse { - #[serde(rename = "version")] - pub version: Box, + #[serde(rename = "version")] + pub version: Box, } impl CloudGamesGetGameVersionByIdResponse { - pub fn new(version: crate::models::CloudVersionFull) -> CloudGamesGetGameVersionByIdResponse { - CloudGamesGetGameVersionByIdResponse { - version: Box::new(version), - } - } + pub fn new(version: crate::models::CloudVersionFull) -> CloudGamesGetGameVersionByIdResponse { + CloudGamesGetGameVersionByIdResponse { + version: Box::new(version), + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_get_games_response.rs b/sdks/api/full/rust/src/models/cloud_games_get_games_response.rs index 45280457f5..1ed5f34875 100644 --- a/sdks/api/full/rust/src/models/cloud_games_get_games_response.rs +++ b/sdks/api/full/rust/src/models/cloud_games_get_games_response.rs @@ -4,33 +4,32 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesGetGamesResponse { - /// A list of game summaries. - #[serde(rename = "games")] - pub games: Vec, - /// A list of group summaries. - #[serde(rename = "groups")] - pub groups: Vec, - #[serde(rename = "watch")] - pub watch: Box, + /// A list of game summaries. + #[serde(rename = "games")] + pub games: Vec, + /// A list of group summaries. + #[serde(rename = "groups")] + pub groups: Vec, + #[serde(rename = "watch")] + pub watch: Box, } impl CloudGamesGetGamesResponse { - pub fn new(games: Vec, groups: Vec, watch: crate::models::WatchResponse) -> CloudGamesGetGamesResponse { - CloudGamesGetGamesResponse { - games, - groups, - watch: Box::new(watch), - } - } + pub fn new( + games: Vec, + groups: Vec, + watch: crate::models::WatchResponse, + ) -> CloudGamesGetGamesResponse { + CloudGamesGetGamesResponse { + games, + groups, + watch: Box::new(watch), + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_get_lobby_logs_response.rs b/sdks/api/full/rust/src/models/cloud_games_get_lobby_logs_response.rs index 58f54377ac..d9afa54e1e 100644 --- a/sdks/api/full/rust/src/models/cloud_games_get_lobby_logs_response.rs +++ b/sdks/api/full/rust/src/models/cloud_games_get_lobby_logs_response.rs @@ -4,33 +4,32 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesGetLobbyLogsResponse { - /// Sorted old to new. - #[serde(rename = "lines")] - pub lines: Vec, - /// Sorted old to new. - #[serde(rename = "timestamps")] - pub timestamps: Vec, - #[serde(rename = "watch")] - pub watch: Box, + /// Sorted old to new. + #[serde(rename = "lines")] + pub lines: Vec, + /// Sorted old to new. + #[serde(rename = "timestamps")] + pub timestamps: Vec, + #[serde(rename = "watch")] + pub watch: Box, } impl CloudGamesGetLobbyLogsResponse { - pub fn new(lines: Vec, timestamps: Vec, watch: crate::models::WatchResponse) -> CloudGamesGetLobbyLogsResponse { - CloudGamesGetLobbyLogsResponse { - lines, - timestamps, - watch: Box::new(watch), - } - } + pub fn new( + lines: Vec, + timestamps: Vec, + watch: crate::models::WatchResponse, + ) -> CloudGamesGetLobbyLogsResponse { + CloudGamesGetLobbyLogsResponse { + lines, + timestamps, + watch: Box::new(watch), + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_list_game_builds_response.rs b/sdks/api/full/rust/src/models/cloud_games_list_game_builds_response.rs index b1acc359db..f2bd888b0b 100644 --- a/sdks/api/full/rust/src/models/cloud_games_list_game_builds_response.rs +++ b/sdks/api/full/rust/src/models/cloud_games_list_game_builds_response.rs @@ -4,26 +4,19 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesListGameBuildsResponse { - /// A list of build summaries. - #[serde(rename = "builds")] - pub builds: Vec, + /// A list of build summaries. + #[serde(rename = "builds")] + pub builds: Vec, } impl CloudGamesListGameBuildsResponse { - pub fn new(builds: Vec) -> CloudGamesListGameBuildsResponse { - CloudGamesListGameBuildsResponse { - builds, - } - } + pub fn new(builds: Vec) -> CloudGamesListGameBuildsResponse { + CloudGamesListGameBuildsResponse { builds } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_list_game_cdn_sites_response.rs b/sdks/api/full/rust/src/models/cloud_games_list_game_cdn_sites_response.rs index 6c6d5a0dc1..b3d42de100 100644 --- a/sdks/api/full/rust/src/models/cloud_games_list_game_cdn_sites_response.rs +++ b/sdks/api/full/rust/src/models/cloud_games_list_game_cdn_sites_response.rs @@ -4,26 +4,21 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesListGameCdnSitesResponse { - /// A list of CDN site summaries. - #[serde(rename = "sites")] - pub sites: Vec, + /// A list of CDN site summaries. + #[serde(rename = "sites")] + pub sites: Vec, } impl CloudGamesListGameCdnSitesResponse { - pub fn new(sites: Vec) -> CloudGamesListGameCdnSitesResponse { - CloudGamesListGameCdnSitesResponse { - sites, - } - } + pub fn new( + sites: Vec, + ) -> CloudGamesListGameCdnSitesResponse { + CloudGamesListGameCdnSitesResponse { sites } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_list_game_custom_avatars_response.rs b/sdks/api/full/rust/src/models/cloud_games_list_game_custom_avatars_response.rs index 12d3443345..569fef54b4 100644 --- a/sdks/api/full/rust/src/models/cloud_games_list_game_custom_avatars_response.rs +++ b/sdks/api/full/rust/src/models/cloud_games_list_game_custom_avatars_response.rs @@ -4,26 +4,21 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesListGameCustomAvatarsResponse { - /// A list of custom avatar summaries. - #[serde(rename = "custom_avatars")] - pub custom_avatars: Vec, + /// A list of custom avatar summaries. + #[serde(rename = "custom_avatars")] + pub custom_avatars: Vec, } impl CloudGamesListGameCustomAvatarsResponse { - pub fn new(custom_avatars: Vec) -> CloudGamesListGameCustomAvatarsResponse { - CloudGamesListGameCustomAvatarsResponse { - custom_avatars, - } - } + pub fn new( + custom_avatars: Vec, + ) -> CloudGamesListGameCustomAvatarsResponse { + CloudGamesListGameCustomAvatarsResponse { custom_avatars } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_log_stream.rs b/sdks/api/full/rust/src/models/cloud_games_log_stream.rs index 64bc9afaf3..7baa7ce2e1 100644 --- a/sdks/api/full/rust/src/models/cloud_games_log_stream.rs +++ b/sdks/api/full/rust/src/models/cloud_games_log_stream.rs @@ -4,36 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum CloudGamesLogStream { - #[serde(rename = "std_out")] - StdOut, - #[serde(rename = "std_err")] - StdErr, - + #[serde(rename = "std_out")] + StdOut, + #[serde(rename = "std_err")] + StdErr, } impl ToString for CloudGamesLogStream { - fn to_string(&self) -> String { - match self { - Self::StdOut => String::from("std_out"), - Self::StdErr => String::from("std_err"), - } - } + fn to_string(&self) -> String { + match self { + Self::StdOut => String::from("std_out"), + Self::StdErr => String::from("std_err"), + } + } } impl Default for CloudGamesLogStream { - fn default() -> CloudGamesLogStream { - Self::StdOut - } + fn default() -> CloudGamesLogStream { + Self::StdOut + } } - - - - diff --git a/sdks/api/full/rust/src/models/cloud_games_namespaces_add_namespace_domain_request.rs b/sdks/api/full/rust/src/models/cloud_games_namespaces_add_namespace_domain_request.rs index 444ef1c6a1..2d1a3bbee5 100644 --- a/sdks/api/full/rust/src/models/cloud_games_namespaces_add_namespace_domain_request.rs +++ b/sdks/api/full/rust/src/models/cloud_games_namespaces_add_namespace_domain_request.rs @@ -4,26 +4,19 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesAddNamespaceDomainRequest { - /// A valid domain name (no protocol). - #[serde(rename = "domain")] - pub domain: String, + /// A valid domain name (no protocol). + #[serde(rename = "domain")] + pub domain: String, } impl CloudGamesNamespacesAddNamespaceDomainRequest { - pub fn new(domain: String) -> CloudGamesNamespacesAddNamespaceDomainRequest { - CloudGamesNamespacesAddNamespaceDomainRequest { - domain, - } - } + pub fn new(domain: String) -> CloudGamesNamespacesAddNamespaceDomainRequest { + CloudGamesNamespacesAddNamespaceDomainRequest { domain } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_namespaces_create_game_namespace_request.rs b/sdks/api/full/rust/src/models/cloud_games_namespaces_create_game_namespace_request.rs index 91ced02c48..1399f0ac75 100644 --- a/sdks/api/full/rust/src/models/cloud_games_namespaces_create_game_namespace_request.rs +++ b/sdks/api/full/rust/src/models/cloud_games_namespaces_create_game_namespace_request.rs @@ -4,33 +4,32 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesCreateGameNamespaceRequest { - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "version_id")] - pub version_id: uuid::Uuid, - /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. - #[serde(rename = "name_id")] - pub name_id: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "version_id")] + pub version_id: uuid::Uuid, + /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. + #[serde(rename = "name_id")] + pub name_id: String, } impl CloudGamesNamespacesCreateGameNamespaceRequest { - pub fn new(display_name: String, version_id: uuid::Uuid, name_id: String) -> CloudGamesNamespacesCreateGameNamespaceRequest { - CloudGamesNamespacesCreateGameNamespaceRequest { - display_name, - version_id, - name_id, - } - } + pub fn new( + display_name: String, + version_id: uuid::Uuid, + name_id: String, + ) -> CloudGamesNamespacesCreateGameNamespaceRequest { + CloudGamesNamespacesCreateGameNamespaceRequest { + display_name, + version_id, + name_id, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_namespaces_create_game_namespace_response.rs b/sdks/api/full/rust/src/models/cloud_games_namespaces_create_game_namespace_response.rs index 816d4796b3..a1351cfb99 100644 --- a/sdks/api/full/rust/src/models/cloud_games_namespaces_create_game_namespace_response.rs +++ b/sdks/api/full/rust/src/models/cloud_games_namespaces_create_game_namespace_response.rs @@ -4,25 +4,18 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesCreateGameNamespaceResponse { - #[serde(rename = "namespace_id")] - pub namespace_id: uuid::Uuid, + #[serde(rename = "namespace_id")] + pub namespace_id: uuid::Uuid, } impl CloudGamesNamespacesCreateGameNamespaceResponse { - pub fn new(namespace_id: uuid::Uuid) -> CloudGamesNamespacesCreateGameNamespaceResponse { - CloudGamesNamespacesCreateGameNamespaceResponse { - namespace_id, - } - } + pub fn new(namespace_id: uuid::Uuid) -> CloudGamesNamespacesCreateGameNamespaceResponse { + CloudGamesNamespacesCreateGameNamespaceResponse { namespace_id } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_namespaces_create_game_namespace_token_development_request.rs b/sdks/api/full/rust/src/models/cloud_games_namespaces_create_game_namespace_token_development_request.rs index 856f09577f..1577eaa3e1 100644 --- a/sdks/api/full/rust/src/models/cloud_games_namespaces_create_game_namespace_token_development_request.rs +++ b/sdks/api/full/rust/src/models/cloud_games_namespaces_create_game_namespace_token_development_request.rs @@ -4,33 +4,29 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentRequest { - /// The hostname used for the token. - #[serde(rename = "hostname")] - pub hostname: String, - #[serde(rename = "ports", skip_serializing_if = "Option::is_none")] - pub ports: Option<::std::collections::HashMap>, - /// **Deprecated** A list of docker ports. - #[serde(rename = "lobby_ports", skip_serializing_if = "Option::is_none")] - pub lobby_ports: Option>, + /// The hostname used for the token. + #[serde(rename = "hostname")] + pub hostname: String, + #[serde(rename = "ports", skip_serializing_if = "Option::is_none")] + pub ports: + Option<::std::collections::HashMap>, + /// **Deprecated** A list of docker ports. + #[serde(rename = "lobby_ports", skip_serializing_if = "Option::is_none")] + pub lobby_ports: Option>, } impl CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentRequest { - pub fn new(hostname: String) -> CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentRequest { - CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentRequest { - hostname, - ports: None, - lobby_ports: None, - } - } + pub fn new(hostname: String) -> CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentRequest { + CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentRequest { + hostname, + ports: None, + lobby_ports: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_namespaces_create_game_namespace_token_development_response.rs b/sdks/api/full/rust/src/models/cloud_games_namespaces_create_game_namespace_token_development_response.rs index 1e607255f1..c4f1e06b9f 100644 --- a/sdks/api/full/rust/src/models/cloud_games_namespaces_create_game_namespace_token_development_response.rs +++ b/sdks/api/full/rust/src/models/cloud_games_namespaces_create_game_namespace_token_development_response.rs @@ -4,26 +4,19 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentResponse { - /// A JSON Web Token. Slightly modified to include a description prefix and use Protobufs of JSON. - #[serde(rename = "token")] - pub token: String, + /// A JSON Web Token. Slightly modified to include a description prefix and use Protobufs of JSON. + #[serde(rename = "token")] + pub token: String, } impl CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentResponse { - pub fn new(token: String) -> CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentResponse { - CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentResponse { - token, - } - } + pub fn new(token: String) -> CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentResponse { + CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentResponse { token } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_namespaces_create_game_namespace_token_public_response.rs b/sdks/api/full/rust/src/models/cloud_games_namespaces_create_game_namespace_token_public_response.rs index 9d6dd8b1ed..629019dc8c 100644 --- a/sdks/api/full/rust/src/models/cloud_games_namespaces_create_game_namespace_token_public_response.rs +++ b/sdks/api/full/rust/src/models/cloud_games_namespaces_create_game_namespace_token_public_response.rs @@ -4,26 +4,19 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesCreateGameNamespaceTokenPublicResponse { - /// A JSON Web Token. Slightly modified to include a description prefix and use Protobufs of JSON. - #[serde(rename = "token")] - pub token: String, + /// A JSON Web Token. Slightly modified to include a description prefix and use Protobufs of JSON. + #[serde(rename = "token")] + pub token: String, } impl CloudGamesNamespacesCreateGameNamespaceTokenPublicResponse { - pub fn new(token: String) -> CloudGamesNamespacesCreateGameNamespaceTokenPublicResponse { - CloudGamesNamespacesCreateGameNamespaceTokenPublicResponse { - token, - } - } + pub fn new(token: String) -> CloudGamesNamespacesCreateGameNamespaceTokenPublicResponse { + CloudGamesNamespacesCreateGameNamespaceTokenPublicResponse { token } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_namespaces_get_analytics_matchmaker_live_response.rs b/sdks/api/full/rust/src/models/cloud_games_namespaces_get_analytics_matchmaker_live_response.rs index 09a134856e..3fc3a7304f 100644 --- a/sdks/api/full/rust/src/models/cloud_games_namespaces_get_analytics_matchmaker_live_response.rs +++ b/sdks/api/full/rust/src/models/cloud_games_namespaces_get_analytics_matchmaker_live_response.rs @@ -4,26 +4,21 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesGetAnalyticsMatchmakerLiveResponse { - /// A list of analytics lobby summaries. - #[serde(rename = "lobbies")] - pub lobbies: Vec, + /// A list of analytics lobby summaries. + #[serde(rename = "lobbies")] + pub lobbies: Vec, } impl CloudGamesNamespacesGetAnalyticsMatchmakerLiveResponse { - pub fn new(lobbies: Vec) -> CloudGamesNamespacesGetAnalyticsMatchmakerLiveResponse { - CloudGamesNamespacesGetAnalyticsMatchmakerLiveResponse { - lobbies, - } - } + pub fn new( + lobbies: Vec, + ) -> CloudGamesNamespacesGetAnalyticsMatchmakerLiveResponse { + CloudGamesNamespacesGetAnalyticsMatchmakerLiveResponse { lobbies } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_namespaces_get_game_namespace_by_id_response.rs b/sdks/api/full/rust/src/models/cloud_games_namespaces_get_game_namespace_by_id_response.rs index 5aa1f56dc4..7e0d67f7d6 100644 --- a/sdks/api/full/rust/src/models/cloud_games_namespaces_get_game_namespace_by_id_response.rs +++ b/sdks/api/full/rust/src/models/cloud_games_namespaces_get_game_namespace_by_id_response.rs @@ -4,25 +4,22 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesGetGameNamespaceByIdResponse { - #[serde(rename = "namespace")] - pub namespace: Box, + #[serde(rename = "namespace")] + pub namespace: Box, } impl CloudGamesNamespacesGetGameNamespaceByIdResponse { - pub fn new(namespace: crate::models::CloudNamespaceFull) -> CloudGamesNamespacesGetGameNamespaceByIdResponse { - CloudGamesNamespacesGetGameNamespaceByIdResponse { - namespace: Box::new(namespace), - } - } + pub fn new( + namespace: crate::models::CloudNamespaceFull, + ) -> CloudGamesNamespacesGetGameNamespaceByIdResponse { + CloudGamesNamespacesGetGameNamespaceByIdResponse { + namespace: Box::new(namespace), + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_namespaces_get_game_namespace_version_history_response.rs b/sdks/api/full/rust/src/models/cloud_games_namespaces_get_game_namespace_version_history_response.rs index 0e28f0773e..beae4bcaf9 100644 --- a/sdks/api/full/rust/src/models/cloud_games_namespaces_get_game_namespace_version_history_response.rs +++ b/sdks/api/full/rust/src/models/cloud_games_namespaces_get_game_namespace_version_history_response.rs @@ -4,26 +4,21 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesGetGameNamespaceVersionHistoryResponse { - /// A list of previously deployed namespace versions. - #[serde(rename = "versions")] - pub versions: Vec, + /// A list of previously deployed namespace versions. + #[serde(rename = "versions")] + pub versions: Vec, } impl CloudGamesNamespacesGetGameNamespaceVersionHistoryResponse { - pub fn new(versions: Vec) -> CloudGamesNamespacesGetGameNamespaceVersionHistoryResponse { - CloudGamesNamespacesGetGameNamespaceVersionHistoryResponse { - versions, - } - } + pub fn new( + versions: Vec, + ) -> CloudGamesNamespacesGetGameNamespaceVersionHistoryResponse { + CloudGamesNamespacesGetGameNamespaceVersionHistoryResponse { versions } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_namespaces_get_namespace_lobby_response.rs b/sdks/api/full/rust/src/models/cloud_games_namespaces_get_namespace_lobby_response.rs index 148decf907..e8c97d6150 100644 --- a/sdks/api/full/rust/src/models/cloud_games_namespaces_get_namespace_lobby_response.rs +++ b/sdks/api/full/rust/src/models/cloud_games_namespaces_get_namespace_lobby_response.rs @@ -4,40 +4,40 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesGetNamespaceLobbyResponse { - #[serde(rename = "lobby")] - pub lobby: Box, - #[serde(rename = "metrics", skip_serializing_if = "Option::is_none")] - pub metrics: Option>, - /// **Deprecated** A list of URLs. - #[serde(rename = "stdout_presigned_urls")] - pub stdout_presigned_urls: Vec, - /// **Deprecated** A list of URLs. - #[serde(rename = "stderr_presigned_urls")] - pub stderr_presigned_urls: Vec, - /// **Deprecated** A list of service performance summaries. - #[serde(rename = "perf_lists")] - pub perf_lists: Vec, + #[serde(rename = "lobby")] + pub lobby: Box, + #[serde(rename = "metrics", skip_serializing_if = "Option::is_none")] + pub metrics: Option>, + /// **Deprecated** A list of URLs. + #[serde(rename = "stdout_presigned_urls")] + pub stdout_presigned_urls: Vec, + /// **Deprecated** A list of URLs. + #[serde(rename = "stderr_presigned_urls")] + pub stderr_presigned_urls: Vec, + /// **Deprecated** A list of service performance summaries. + #[serde(rename = "perf_lists")] + pub perf_lists: Vec, } impl CloudGamesNamespacesGetNamespaceLobbyResponse { - pub fn new(lobby: crate::models::CloudLogsLobbySummary, stdout_presigned_urls: Vec, stderr_presigned_urls: Vec, perf_lists: Vec) -> CloudGamesNamespacesGetNamespaceLobbyResponse { - CloudGamesNamespacesGetNamespaceLobbyResponse { - lobby: Box::new(lobby), - metrics: None, - stdout_presigned_urls, - stderr_presigned_urls, - perf_lists, - } - } + pub fn new( + lobby: crate::models::CloudLogsLobbySummary, + stdout_presigned_urls: Vec, + stderr_presigned_urls: Vec, + perf_lists: Vec, + ) -> CloudGamesNamespacesGetNamespaceLobbyResponse { + CloudGamesNamespacesGetNamespaceLobbyResponse { + lobby: Box::new(lobby), + metrics: None, + stdout_presigned_urls, + stderr_presigned_urls, + perf_lists, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_namespaces_inspect_response.rs b/sdks/api/full/rust/src/models/cloud_games_namespaces_inspect_response.rs index 90fc0df81b..04d48f490b 100644 --- a/sdks/api/full/rust/src/models/cloud_games_namespaces_inspect_response.rs +++ b/sdks/api/full/rust/src/models/cloud_games_namespaces_inspect_response.rs @@ -4,25 +4,20 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesInspectResponse { - #[serde(rename = "agent")] - pub agent: Box, + #[serde(rename = "agent")] + pub agent: Box, } impl CloudGamesNamespacesInspectResponse { - pub fn new(agent: crate::models::CloudAuthAgent) -> CloudGamesNamespacesInspectResponse { - CloudGamesNamespacesInspectResponse { - agent: Box::new(agent), - } - } + pub fn new(agent: crate::models::CloudAuthAgent) -> CloudGamesNamespacesInspectResponse { + CloudGamesNamespacesInspectResponse { + agent: Box::new(agent), + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_namespaces_list_namespace_lobbies_response.rs b/sdks/api/full/rust/src/models/cloud_games_namespaces_list_namespace_lobbies_response.rs index 42e804d011..dc24c28505 100644 --- a/sdks/api/full/rust/src/models/cloud_games_namespaces_list_namespace_lobbies_response.rs +++ b/sdks/api/full/rust/src/models/cloud_games_namespaces_list_namespace_lobbies_response.rs @@ -4,26 +4,21 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesListNamespaceLobbiesResponse { - /// A list of lobby log summaries. - #[serde(rename = "lobbies")] - pub lobbies: Vec, + /// A list of lobby log summaries. + #[serde(rename = "lobbies")] + pub lobbies: Vec, } impl CloudGamesNamespacesListNamespaceLobbiesResponse { - pub fn new(lobbies: Vec) -> CloudGamesNamespacesListNamespaceLobbiesResponse { - CloudGamesNamespacesListNamespaceLobbiesResponse { - lobbies, - } - } + pub fn new( + lobbies: Vec, + ) -> CloudGamesNamespacesListNamespaceLobbiesResponse { + CloudGamesNamespacesListNamespaceLobbiesResponse { lobbies } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_namespaces_set_namespace_cdn_auth_type_request.rs b/sdks/api/full/rust/src/models/cloud_games_namespaces_set_namespace_cdn_auth_type_request.rs index d6f98905b4..dce840ab4e 100644 --- a/sdks/api/full/rust/src/models/cloud_games_namespaces_set_namespace_cdn_auth_type_request.rs +++ b/sdks/api/full/rust/src/models/cloud_games_namespaces_set_namespace_cdn_auth_type_request.rs @@ -4,25 +4,20 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesSetNamespaceCdnAuthTypeRequest { - #[serde(rename = "auth_type")] - pub auth_type: crate::models::CloudCdnAuthType, + #[serde(rename = "auth_type")] + pub auth_type: crate::models::CloudCdnAuthType, } impl CloudGamesNamespacesSetNamespaceCdnAuthTypeRequest { - pub fn new(auth_type: crate::models::CloudCdnAuthType) -> CloudGamesNamespacesSetNamespaceCdnAuthTypeRequest { - CloudGamesNamespacesSetNamespaceCdnAuthTypeRequest { - auth_type, - } - } + pub fn new( + auth_type: crate::models::CloudCdnAuthType, + ) -> CloudGamesNamespacesSetNamespaceCdnAuthTypeRequest { + CloudGamesNamespacesSetNamespaceCdnAuthTypeRequest { auth_type } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_namespaces_toggle_namespace_domain_public_auth_request.rs b/sdks/api/full/rust/src/models/cloud_games_namespaces_toggle_namespace_domain_public_auth_request.rs index 8f756de255..fbe7dc86f5 100644 --- a/sdks/api/full/rust/src/models/cloud_games_namespaces_toggle_namespace_domain_public_auth_request.rs +++ b/sdks/api/full/rust/src/models/cloud_games_namespaces_toggle_namespace_domain_public_auth_request.rs @@ -4,26 +4,19 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesToggleNamespaceDomainPublicAuthRequest { - /// Whether or not to enable authentication based on domain. - #[serde(rename = "enabled")] - pub enabled: bool, + /// Whether or not to enable authentication based on domain. + #[serde(rename = "enabled")] + pub enabled: bool, } impl CloudGamesNamespacesToggleNamespaceDomainPublicAuthRequest { - pub fn new(enabled: bool) -> CloudGamesNamespacesToggleNamespaceDomainPublicAuthRequest { - CloudGamesNamespacesToggleNamespaceDomainPublicAuthRequest { - enabled, - } - } + pub fn new(enabled: bool) -> CloudGamesNamespacesToggleNamespaceDomainPublicAuthRequest { + CloudGamesNamespacesToggleNamespaceDomainPublicAuthRequest { enabled } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_namespaces_update_game_namespace_matchmaker_config_request.rs b/sdks/api/full/rust/src/models/cloud_games_namespaces_update_game_namespace_matchmaker_config_request.rs index 1e10a667a3..fcbeabf8e3 100644 --- a/sdks/api/full/rust/src/models/cloud_games_namespaces_update_game_namespace_matchmaker_config_request.rs +++ b/sdks/api/full/rust/src/models/cloud_games_namespaces_update_game_namespace_matchmaker_config_request.rs @@ -4,30 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesUpdateGameNamespaceMatchmakerConfigRequest { - /// Unsigned 32 bit integer. - #[serde(rename = "lobby_count_max")] - pub lobby_count_max: i32, - /// Unsigned 32 bit integer. - #[serde(rename = "max_players")] - pub max_players: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "lobby_count_max")] + pub lobby_count_max: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "max_players")] + pub max_players: i32, } impl CloudGamesNamespacesUpdateGameNamespaceMatchmakerConfigRequest { - pub fn new(lobby_count_max: i32, max_players: i32) -> CloudGamesNamespacesUpdateGameNamespaceMatchmakerConfigRequest { - CloudGamesNamespacesUpdateGameNamespaceMatchmakerConfigRequest { - lobby_count_max, - max_players, - } - } + pub fn new( + lobby_count_max: i32, + max_players: i32, + ) -> CloudGamesNamespacesUpdateGameNamespaceMatchmakerConfigRequest { + CloudGamesNamespacesUpdateGameNamespaceMatchmakerConfigRequest { + lobby_count_max, + max_players, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_namespaces_update_game_namespace_version_request.rs b/sdks/api/full/rust/src/models/cloud_games_namespaces_update_game_namespace_version_request.rs index 7bc24f72d1..449d2f84f5 100644 --- a/sdks/api/full/rust/src/models/cloud_games_namespaces_update_game_namespace_version_request.rs +++ b/sdks/api/full/rust/src/models/cloud_games_namespaces_update_game_namespace_version_request.rs @@ -4,25 +4,18 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesUpdateGameNamespaceVersionRequest { - #[serde(rename = "version_id")] - pub version_id: uuid::Uuid, + #[serde(rename = "version_id")] + pub version_id: uuid::Uuid, } impl CloudGamesNamespacesUpdateGameNamespaceVersionRequest { - pub fn new(version_id: uuid::Uuid) -> CloudGamesNamespacesUpdateGameNamespaceVersionRequest { - CloudGamesNamespacesUpdateGameNamespaceVersionRequest { - version_id, - } - } + pub fn new(version_id: uuid::Uuid) -> CloudGamesNamespacesUpdateGameNamespaceVersionRequest { + CloudGamesNamespacesUpdateGameNamespaceVersionRequest { version_id } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_namespaces_update_namespace_cdn_auth_user_request.rs b/sdks/api/full/rust/src/models/cloud_games_namespaces_update_namespace_cdn_auth_user_request.rs index 88c02abff5..662bdc33fe 100644 --- a/sdks/api/full/rust/src/models/cloud_games_namespaces_update_namespace_cdn_auth_user_request.rs +++ b/sdks/api/full/rust/src/models/cloud_games_namespaces_update_namespace_cdn_auth_user_request.rs @@ -4,30 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesUpdateNamespaceCdnAuthUserRequest { - /// A user name. - #[serde(rename = "user")] - pub user: String, - /// A bcrypt encrypted password. An error is returned if the given string is not properly encrypted. - #[serde(rename = "password")] - pub password: String, + /// A user name. + #[serde(rename = "user")] + pub user: String, + /// A bcrypt encrypted password. An error is returned if the given string is not properly encrypted. + #[serde(rename = "password")] + pub password: String, } impl CloudGamesNamespacesUpdateNamespaceCdnAuthUserRequest { - pub fn new(user: String, password: String) -> CloudGamesNamespacesUpdateNamespaceCdnAuthUserRequest { - CloudGamesNamespacesUpdateNamespaceCdnAuthUserRequest { - user, - password, - } - } + pub fn new( + user: String, + password: String, + ) -> CloudGamesNamespacesUpdateNamespaceCdnAuthUserRequest { + CloudGamesNamespacesUpdateNamespaceCdnAuthUserRequest { user, password } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_matchmaker_config_request.rs b/sdks/api/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_matchmaker_config_request.rs index b144620c51..4bd2f73d7c 100644 --- a/sdks/api/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_matchmaker_config_request.rs +++ b/sdks/api/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_matchmaker_config_request.rs @@ -4,30 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigRequest { - /// Unsigned 32 bit integer. - #[serde(rename = "lobby_count_max")] - pub lobby_count_max: i32, - /// Unsigned 32 bit integer. - #[serde(rename = "max_players")] - pub max_players: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "lobby_count_max")] + pub lobby_count_max: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "max_players")] + pub max_players: i32, } impl CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigRequest { - pub fn new(lobby_count_max: i32, max_players: i32) -> CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigRequest { - CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigRequest { - lobby_count_max, - max_players, - } - } + pub fn new( + lobby_count_max: i32, + max_players: i32, + ) -> CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigRequest { + CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigRequest { + lobby_count_max, + max_players, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_matchmaker_config_response.rs b/sdks/api/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_matchmaker_config_response.rs index 5b0d3eee10..cecc971e97 100644 --- a/sdks/api/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_matchmaker_config_response.rs +++ b/sdks/api/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_matchmaker_config_response.rs @@ -4,26 +4,21 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigResponse { - /// A list of validation errors. - #[serde(rename = "errors")] - pub errors: Vec, + /// A list of validation errors. + #[serde(rename = "errors")] + pub errors: Vec, } impl CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigResponse { - pub fn new(errors: Vec) -> CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigResponse { - CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigResponse { - errors, - } - } + pub fn new( + errors: Vec, + ) -> CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigResponse { + CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigResponse { errors } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_request.rs b/sdks/api/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_request.rs index 3b49b7bcab..ad37b02940 100644 --- a/sdks/api/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_request.rs +++ b/sdks/api/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_request.rs @@ -4,30 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesValidateGameNamespaceRequest { - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. - #[serde(rename = "name_id")] - pub name_id: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. + #[serde(rename = "name_id")] + pub name_id: String, } impl CloudGamesNamespacesValidateGameNamespaceRequest { - pub fn new(display_name: String, name_id: String) -> CloudGamesNamespacesValidateGameNamespaceRequest { - CloudGamesNamespacesValidateGameNamespaceRequest { - display_name, - name_id, - } - } + pub fn new( + display_name: String, + name_id: String, + ) -> CloudGamesNamespacesValidateGameNamespaceRequest { + CloudGamesNamespacesValidateGameNamespaceRequest { + display_name, + name_id, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_response.rs b/sdks/api/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_response.rs index 65be900bea..fd9e4ecf65 100644 --- a/sdks/api/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_response.rs +++ b/sdks/api/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_response.rs @@ -4,26 +4,21 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesValidateGameNamespaceResponse { - /// A list of validation errors. - #[serde(rename = "errors")] - pub errors: Vec, + /// A list of validation errors. + #[serde(rename = "errors")] + pub errors: Vec, } impl CloudGamesNamespacesValidateGameNamespaceResponse { - pub fn new(errors: Vec) -> CloudGamesNamespacesValidateGameNamespaceResponse { - CloudGamesNamespacesValidateGameNamespaceResponse { - errors, - } - } + pub fn new( + errors: Vec, + ) -> CloudGamesNamespacesValidateGameNamespaceResponse { + CloudGamesNamespacesValidateGameNamespaceResponse { errors } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_token_development_request.rs b/sdks/api/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_token_development_request.rs index c3c7db4f09..dc2251e01a 100644 --- a/sdks/api/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_token_development_request.rs +++ b/sdks/api/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_token_development_request.rs @@ -4,29 +4,27 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentRequest { - #[serde(rename = "hostname")] - pub hostname: String, - /// A list of docker ports. - #[serde(rename = "lobby_ports")] - pub lobby_ports: Vec, + #[serde(rename = "hostname")] + pub hostname: String, + /// A list of docker ports. + #[serde(rename = "lobby_ports")] + pub lobby_ports: Vec, } impl CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentRequest { - pub fn new(hostname: String, lobby_ports: Vec) -> CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentRequest { - CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentRequest { - hostname, - lobby_ports, - } - } + pub fn new( + hostname: String, + lobby_ports: Vec, + ) -> CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentRequest { + CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentRequest { + hostname, + lobby_ports, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_token_development_response.rs b/sdks/api/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_token_development_response.rs index b647adf24a..1c1bf23657 100644 --- a/sdks/api/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_token_development_response.rs +++ b/sdks/api/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_token_development_response.rs @@ -4,26 +4,21 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentResponse { - /// A list of validation errors. - #[serde(rename = "errors")] - pub errors: Vec, + /// A list of validation errors. + #[serde(rename = "errors")] + pub errors: Vec, } impl CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentResponse { - pub fn new(errors: Vec) -> CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentResponse { - CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentResponse { - errors, - } - } + pub fn new( + errors: Vec, + ) -> CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentResponse { + CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentResponse { errors } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_prepare_custom_avatar_upload_request.rs b/sdks/api/full/rust/src/models/cloud_games_prepare_custom_avatar_upload_request.rs index 0bcb0ce5ac..42df78bef5 100644 --- a/sdks/api/full/rust/src/models/cloud_games_prepare_custom_avatar_upload_request.rs +++ b/sdks/api/full/rust/src/models/cloud_games_prepare_custom_avatar_upload_request.rs @@ -4,34 +4,29 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesPrepareCustomAvatarUploadRequest { - /// The path/filename of the custom avatar. - #[serde(rename = "path")] - pub path: String, - /// The MIME type of the custom avatar. - #[serde(rename = "mime", skip_serializing_if = "Option::is_none")] - pub mime: Option, - /// Unsigned 64 bit integer. - #[serde(rename = "content_length")] - pub content_length: i64, + /// The path/filename of the custom avatar. + #[serde(rename = "path")] + pub path: String, + /// The MIME type of the custom avatar. + #[serde(rename = "mime", skip_serializing_if = "Option::is_none")] + pub mime: Option, + /// Unsigned 64 bit integer. + #[serde(rename = "content_length")] + pub content_length: i64, } impl CloudGamesPrepareCustomAvatarUploadRequest { - pub fn new(path: String, content_length: i64) -> CloudGamesPrepareCustomAvatarUploadRequest { - CloudGamesPrepareCustomAvatarUploadRequest { - path, - mime: None, - content_length, - } - } + pub fn new(path: String, content_length: i64) -> CloudGamesPrepareCustomAvatarUploadRequest { + CloudGamesPrepareCustomAvatarUploadRequest { + path, + mime: None, + content_length, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_prepare_custom_avatar_upload_response.rs b/sdks/api/full/rust/src/models/cloud_games_prepare_custom_avatar_upload_response.rs index dd6454590e..149fbee2cb 100644 --- a/sdks/api/full/rust/src/models/cloud_games_prepare_custom_avatar_upload_response.rs +++ b/sdks/api/full/rust/src/models/cloud_games_prepare_custom_avatar_upload_response.rs @@ -4,28 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesPrepareCustomAvatarUploadResponse { - #[serde(rename = "upload_id")] - pub upload_id: uuid::Uuid, - #[serde(rename = "presigned_request")] - pub presigned_request: Box, + #[serde(rename = "upload_id")] + pub upload_id: uuid::Uuid, + #[serde(rename = "presigned_request")] + pub presigned_request: Box, } impl CloudGamesPrepareCustomAvatarUploadResponse { - pub fn new(upload_id: uuid::Uuid, presigned_request: crate::models::UploadPresignedRequest) -> CloudGamesPrepareCustomAvatarUploadResponse { - CloudGamesPrepareCustomAvatarUploadResponse { - upload_id, - presigned_request: Box::new(presigned_request), - } - } + pub fn new( + upload_id: uuid::Uuid, + presigned_request: crate::models::UploadPresignedRequest, + ) -> CloudGamesPrepareCustomAvatarUploadResponse { + CloudGamesPrepareCustomAvatarUploadResponse { + upload_id, + presigned_request: Box::new(presigned_request), + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_reserve_version_name_response.rs b/sdks/api/full/rust/src/models/cloud_games_reserve_version_name_response.rs index 1ca6b9fd43..f4db92c3dc 100644 --- a/sdks/api/full/rust/src/models/cloud_games_reserve_version_name_response.rs +++ b/sdks/api/full/rust/src/models/cloud_games_reserve_version_name_response.rs @@ -4,26 +4,21 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesReserveVersionNameResponse { - /// Represent a resource's readable display name. - #[serde(rename = "version_display_name")] - pub version_display_name: String, + /// Represent a resource's readable display name. + #[serde(rename = "version_display_name")] + pub version_display_name: String, } impl CloudGamesReserveVersionNameResponse { - pub fn new(version_display_name: String) -> CloudGamesReserveVersionNameResponse { - CloudGamesReserveVersionNameResponse { - version_display_name, - } - } + pub fn new(version_display_name: String) -> CloudGamesReserveVersionNameResponse { + CloudGamesReserveVersionNameResponse { + version_display_name, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_validate_game_request.rs b/sdks/api/full/rust/src/models/cloud_games_validate_game_request.rs index 30f7fb8d7b..1583276b99 100644 --- a/sdks/api/full/rust/src/models/cloud_games_validate_game_request.rs +++ b/sdks/api/full/rust/src/models/cloud_games_validate_game_request.rs @@ -4,30 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesValidateGameRequest { - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - /// A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short. - #[serde(rename = "name_id", skip_serializing_if = "Option::is_none")] - pub name_id: Option, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + /// A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short. + #[serde(rename = "name_id", skip_serializing_if = "Option::is_none")] + pub name_id: Option, } impl CloudGamesValidateGameRequest { - pub fn new(display_name: String) -> CloudGamesValidateGameRequest { - CloudGamesValidateGameRequest { - display_name, - name_id: None, - } - } + pub fn new(display_name: String) -> CloudGamesValidateGameRequest { + CloudGamesValidateGameRequest { + display_name, + name_id: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_validate_game_response.rs b/sdks/api/full/rust/src/models/cloud_games_validate_game_response.rs index d5b3f32d81..05215a883f 100644 --- a/sdks/api/full/rust/src/models/cloud_games_validate_game_response.rs +++ b/sdks/api/full/rust/src/models/cloud_games_validate_game_response.rs @@ -4,26 +4,19 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesValidateGameResponse { - /// A list of validation errors. - #[serde(rename = "errors")] - pub errors: Vec, + /// A list of validation errors. + #[serde(rename = "errors")] + pub errors: Vec, } impl CloudGamesValidateGameResponse { - pub fn new(errors: Vec) -> CloudGamesValidateGameResponse { - CloudGamesValidateGameResponse { - errors, - } - } + pub fn new(errors: Vec) -> CloudGamesValidateGameResponse { + CloudGamesValidateGameResponse { errors } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_validate_game_version_request.rs b/sdks/api/full/rust/src/models/cloud_games_validate_game_version_request.rs index 57ea1f6320..0bd7ae6cc4 100644 --- a/sdks/api/full/rust/src/models/cloud_games_validate_game_version_request.rs +++ b/sdks/api/full/rust/src/models/cloud_games_validate_game_version_request.rs @@ -4,29 +4,27 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesValidateGameVersionRequest { - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "config")] - pub config: Box, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "config")] + pub config: Box, } impl CloudGamesValidateGameVersionRequest { - pub fn new(display_name: String, config: crate::models::CloudVersionConfig) -> CloudGamesValidateGameVersionRequest { - CloudGamesValidateGameVersionRequest { - display_name, - config: Box::new(config), - } - } + pub fn new( + display_name: String, + config: crate::models::CloudVersionConfig, + ) -> CloudGamesValidateGameVersionRequest { + CloudGamesValidateGameVersionRequest { + display_name, + config: Box::new(config), + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_games_validate_game_version_response.rs b/sdks/api/full/rust/src/models/cloud_games_validate_game_version_response.rs index 8d55feaec9..c9d0d60710 100644 --- a/sdks/api/full/rust/src/models/cloud_games_validate_game_version_response.rs +++ b/sdks/api/full/rust/src/models/cloud_games_validate_game_version_response.rs @@ -4,26 +4,21 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGamesValidateGameVersionResponse { - /// A list of validation errors. - #[serde(rename = "errors")] - pub errors: Vec, + /// A list of validation errors. + #[serde(rename = "errors")] + pub errors: Vec, } impl CloudGamesValidateGameVersionResponse { - pub fn new(errors: Vec) -> CloudGamesValidateGameVersionResponse { - CloudGamesValidateGameVersionResponse { - errors, - } - } + pub fn new( + errors: Vec, + ) -> CloudGamesValidateGameVersionResponse { + CloudGamesValidateGameVersionResponse { errors } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_get_ray_perf_logs_response.rs b/sdks/api/full/rust/src/models/cloud_get_ray_perf_logs_response.rs index ec13db31b5..1f64ed13d8 100644 --- a/sdks/api/full/rust/src/models/cloud_get_ray_perf_logs_response.rs +++ b/sdks/api/full/rust/src/models/cloud_get_ray_perf_logs_response.rs @@ -4,26 +4,19 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGetRayPerfLogsResponse { - /// A list of service performance summaries. - #[serde(rename = "perf_lists")] - pub perf_lists: Vec, + /// A list of service performance summaries. + #[serde(rename = "perf_lists")] + pub perf_lists: Vec, } impl CloudGetRayPerfLogsResponse { - pub fn new(perf_lists: Vec) -> CloudGetRayPerfLogsResponse { - CloudGetRayPerfLogsResponse { - perf_lists, - } - } + pub fn new(perf_lists: Vec) -> CloudGetRayPerfLogsResponse { + CloudGetRayPerfLogsResponse { perf_lists } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_get_region_tiers_response.rs b/sdks/api/full/rust/src/models/cloud_get_region_tiers_response.rs index e49ac514bf..4c2f4b22de 100644 --- a/sdks/api/full/rust/src/models/cloud_get_region_tiers_response.rs +++ b/sdks/api/full/rust/src/models/cloud_get_region_tiers_response.rs @@ -4,26 +4,19 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGetRegionTiersResponse { - /// A list of region server tiers. - #[serde(rename = "tiers")] - pub tiers: Vec, + /// A list of region server tiers. + #[serde(rename = "tiers")] + pub tiers: Vec, } impl CloudGetRegionTiersResponse { - pub fn new(tiers: Vec) -> CloudGetRegionTiersResponse { - CloudGetRegionTiersResponse { - tiers, - } - } + pub fn new(tiers: Vec) -> CloudGetRegionTiersResponse { + CloudGetRegionTiersResponse { tiers } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_group_bank_source.rs b/sdks/api/full/rust/src/models/cloud_group_bank_source.rs index 78e864f8c4..34e49405bb 100644 --- a/sdks/api/full/rust/src/models/cloud_group_bank_source.rs +++ b/sdks/api/full/rust/src/models/cloud_group_bank_source.rs @@ -4,30 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudGroupBankSource { - /// The bank account number of this group's bank source. - #[serde(rename = "account_number")] - pub account_number: String, - /// The bank routing number of this group's bank source. - #[serde(rename = "routing_number")] - pub routing_number: String, + /// The bank account number of this group's bank source. + #[serde(rename = "account_number")] + pub account_number: String, + /// The bank routing number of this group's bank source. + #[serde(rename = "routing_number")] + pub routing_number: String, } impl CloudGroupBankSource { - pub fn new(account_number: String, routing_number: String) -> CloudGroupBankSource { - CloudGroupBankSource { - account_number, - routing_number, - } - } + pub fn new(account_number: String, routing_number: String) -> CloudGroupBankSource { + CloudGroupBankSource { + account_number, + routing_number, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_inspect_response.rs b/sdks/api/full/rust/src/models/cloud_inspect_response.rs index 21bfa6f475..721bc953dd 100644 --- a/sdks/api/full/rust/src/models/cloud_inspect_response.rs +++ b/sdks/api/full/rust/src/models/cloud_inspect_response.rs @@ -4,25 +4,20 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudInspectResponse { - #[serde(rename = "agent")] - pub agent: Box, + #[serde(rename = "agent")] + pub agent: Box, } impl CloudInspectResponse { - pub fn new(agent: crate::models::CloudAuthAgent) -> CloudInspectResponse { - CloudInspectResponse { - agent: Box::new(agent), - } - } + pub fn new(agent: crate::models::CloudAuthAgent) -> CloudInspectResponse { + CloudInspectResponse { + agent: Box::new(agent), + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_lobby_summary_analytics.rs b/sdks/api/full/rust/src/models/cloud_lobby_summary_analytics.rs index ac95bd99bb..9e72fce96c 100644 --- a/sdks/api/full/rust/src/models/cloud_lobby_summary_analytics.rs +++ b/sdks/api/full/rust/src/models/cloud_lobby_summary_analytics.rs @@ -4,77 +4,88 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudLobbySummaryAnalytics : Analytical information about a lobby. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudLobbySummaryAnalytics { - #[serde(rename = "lobby_id")] - pub lobby_id: uuid::Uuid, - #[serde(rename = "lobby_group_id")] - pub lobby_group_id: uuid::Uuid, - /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. - #[serde(rename = "lobby_group_name_id")] - pub lobby_group_name_id: String, - #[serde(rename = "region_id")] - pub region_id: uuid::Uuid, - /// RFC3339 timestamp - #[serde(rename = "create_ts")] - pub create_ts: String, - /// Whether or not this lobby is ready. - #[serde(rename = "is_ready")] - pub is_ready: bool, - /// Whether or not this lobby is idle. - #[serde(rename = "is_idle")] - pub is_idle: bool, - /// Whether or not this lobby is in a closed state. - #[serde(rename = "is_closed")] - pub is_closed: bool, - /// Whether or not this lobby is outdated. - #[serde(rename = "is_outdated")] - pub is_outdated: bool, - /// Unsigned 32 bit integer. - #[serde(rename = "max_players_normal")] - pub max_players_normal: i32, - /// Unsigned 32 bit integer. - #[serde(rename = "max_players_direct")] - pub max_players_direct: i32, - /// Unsigned 32 bit integer. - #[serde(rename = "max_players_party")] - pub max_players_party: i32, - /// Unsigned 32 bit integer. - #[serde(rename = "total_player_count")] - pub total_player_count: i32, - /// Unsigned 32 bit integer. - #[serde(rename = "registered_player_count")] - pub registered_player_count: i32, + #[serde(rename = "lobby_id")] + pub lobby_id: uuid::Uuid, + #[serde(rename = "lobby_group_id")] + pub lobby_group_id: uuid::Uuid, + /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. + #[serde(rename = "lobby_group_name_id")] + pub lobby_group_name_id: String, + #[serde(rename = "region_id")] + pub region_id: uuid::Uuid, + /// RFC3339 timestamp + #[serde(rename = "create_ts")] + pub create_ts: String, + /// Whether or not this lobby is ready. + #[serde(rename = "is_ready")] + pub is_ready: bool, + /// Whether or not this lobby is idle. + #[serde(rename = "is_idle")] + pub is_idle: bool, + /// Whether or not this lobby is in a closed state. + #[serde(rename = "is_closed")] + pub is_closed: bool, + /// Whether or not this lobby is outdated. + #[serde(rename = "is_outdated")] + pub is_outdated: bool, + /// Unsigned 32 bit integer. + #[serde(rename = "max_players_normal")] + pub max_players_normal: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "max_players_direct")] + pub max_players_direct: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "max_players_party")] + pub max_players_party: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "total_player_count")] + pub total_player_count: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "registered_player_count")] + pub registered_player_count: i32, } impl CloudLobbySummaryAnalytics { - /// Analytical information about a lobby. - pub fn new(lobby_id: uuid::Uuid, lobby_group_id: uuid::Uuid, lobby_group_name_id: String, region_id: uuid::Uuid, create_ts: String, is_ready: bool, is_idle: bool, is_closed: bool, is_outdated: bool, max_players_normal: i32, max_players_direct: i32, max_players_party: i32, total_player_count: i32, registered_player_count: i32) -> CloudLobbySummaryAnalytics { - CloudLobbySummaryAnalytics { - lobby_id, - lobby_group_id, - lobby_group_name_id, - region_id, - create_ts, - is_ready, - is_idle, - is_closed, - is_outdated, - max_players_normal, - max_players_direct, - max_players_party, - total_player_count, - registered_player_count, - } - } + /// Analytical information about a lobby. + pub fn new( + lobby_id: uuid::Uuid, + lobby_group_id: uuid::Uuid, + lobby_group_name_id: String, + region_id: uuid::Uuid, + create_ts: String, + is_ready: bool, + is_idle: bool, + is_closed: bool, + is_outdated: bool, + max_players_normal: i32, + max_players_direct: i32, + max_players_party: i32, + total_player_count: i32, + registered_player_count: i32, + ) -> CloudLobbySummaryAnalytics { + CloudLobbySummaryAnalytics { + lobby_id, + lobby_group_id, + lobby_group_name_id, + region_id, + create_ts, + is_ready, + is_idle, + is_closed, + is_outdated, + max_players_normal, + max_players_direct, + max_players_party, + total_player_count, + registered_player_count, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_logs_lobby_status.rs b/sdks/api/full/rust/src/models/cloud_logs_lobby_status.rs index 6ce2a4709b..6ba2e567db 100644 --- a/sdks/api/full/rust/src/models/cloud_logs_lobby_status.rs +++ b/sdks/api/full/rust/src/models/cloud_logs_lobby_status.rs @@ -4,30 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudLogsLobbyStatus : A union representing the state of a lobby. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudLogsLobbyStatus { - #[serde(rename = "running")] - pub running: serde_json::Value, - #[serde(rename = "stopped", skip_serializing_if = "Option::is_none")] - pub stopped: Option>, + #[serde(rename = "running")] + pub running: serde_json::Value, + #[serde(rename = "stopped", skip_serializing_if = "Option::is_none")] + pub stopped: Option>, } impl CloudLogsLobbyStatus { - /// A union representing the state of a lobby. - pub fn new(running: serde_json::Value) -> CloudLogsLobbyStatus { - CloudLogsLobbyStatus { - running, - stopped: None, - } - } + /// A union representing the state of a lobby. + pub fn new(running: serde_json::Value) -> CloudLogsLobbyStatus { + CloudLogsLobbyStatus { + running, + stopped: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_logs_lobby_status_stopped.rs b/sdks/api/full/rust/src/models/cloud_logs_lobby_status_stopped.rs index f5a277c399..2800f504a8 100644 --- a/sdks/api/full/rust/src/models/cloud_logs_lobby_status_stopped.rs +++ b/sdks/api/full/rust/src/models/cloud_logs_lobby_status_stopped.rs @@ -4,36 +4,32 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudLogsLobbyStatusStopped : The status of a stopped lobby. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudLogsLobbyStatusStopped { - /// RFC3339 timestamp - #[serde(rename = "stop_ts")] - pub stop_ts: String, - /// Whether or not the lobby failed or stopped successfully. - #[serde(rename = "failed")] - pub failed: bool, - /// The exit code returned by the lobby's main process when stopped. - #[serde(rename = "exit_code")] - pub exit_code: i32, + /// RFC3339 timestamp + #[serde(rename = "stop_ts")] + pub stop_ts: String, + /// Whether or not the lobby failed or stopped successfully. + #[serde(rename = "failed")] + pub failed: bool, + /// The exit code returned by the lobby's main process when stopped. + #[serde(rename = "exit_code")] + pub exit_code: i32, } impl CloudLogsLobbyStatusStopped { - /// The status of a stopped lobby. - pub fn new(stop_ts: String, failed: bool, exit_code: i32) -> CloudLogsLobbyStatusStopped { - CloudLogsLobbyStatusStopped { - stop_ts, - failed, - exit_code, - } - } + /// The status of a stopped lobby. + pub fn new(stop_ts: String, failed: bool, exit_code: i32) -> CloudLogsLobbyStatusStopped { + CloudLogsLobbyStatusStopped { + stop_ts, + failed, + exit_code, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_logs_lobby_summary.rs b/sdks/api/full/rust/src/models/cloud_logs_lobby_summary.rs index 6a8d83062d..c57d13038c 100644 --- a/sdks/api/full/rust/src/models/cloud_logs_lobby_summary.rs +++ b/sdks/api/full/rust/src/models/cloud_logs_lobby_summary.rs @@ -4,52 +4,55 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudLogsLobbySummary : A logs summary for a lobby. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudLogsLobbySummary { - #[serde(rename = "lobby_id")] - pub lobby_id: uuid::Uuid, - #[serde(rename = "namespace_id")] - pub namespace_id: uuid::Uuid, - /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. - #[serde(rename = "lobby_group_name_id")] - pub lobby_group_name_id: String, - #[serde(rename = "region_id")] - pub region_id: uuid::Uuid, - /// RFC3339 timestamp - #[serde(rename = "create_ts")] - pub create_ts: String, - /// RFC3339 timestamp - #[serde(rename = "start_ts", skip_serializing_if = "Option::is_none")] - pub start_ts: Option, - /// RFC3339 timestamp - #[serde(rename = "ready_ts", skip_serializing_if = "Option::is_none")] - pub ready_ts: Option, - #[serde(rename = "status")] - pub status: Box, + #[serde(rename = "lobby_id")] + pub lobby_id: uuid::Uuid, + #[serde(rename = "namespace_id")] + pub namespace_id: uuid::Uuid, + /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. + #[serde(rename = "lobby_group_name_id")] + pub lobby_group_name_id: String, + #[serde(rename = "region_id")] + pub region_id: uuid::Uuid, + /// RFC3339 timestamp + #[serde(rename = "create_ts")] + pub create_ts: String, + /// RFC3339 timestamp + #[serde(rename = "start_ts", skip_serializing_if = "Option::is_none")] + pub start_ts: Option, + /// RFC3339 timestamp + #[serde(rename = "ready_ts", skip_serializing_if = "Option::is_none")] + pub ready_ts: Option, + #[serde(rename = "status")] + pub status: Box, } impl CloudLogsLobbySummary { - /// A logs summary for a lobby. - pub fn new(lobby_id: uuid::Uuid, namespace_id: uuid::Uuid, lobby_group_name_id: String, region_id: uuid::Uuid, create_ts: String, status: crate::models::CloudLogsLobbyStatus) -> CloudLogsLobbySummary { - CloudLogsLobbySummary { - lobby_id, - namespace_id, - lobby_group_name_id, - region_id, - create_ts, - start_ts: None, - ready_ts: None, - status: Box::new(status), - } - } + /// A logs summary for a lobby. + pub fn new( + lobby_id: uuid::Uuid, + namespace_id: uuid::Uuid, + lobby_group_name_id: String, + region_id: uuid::Uuid, + create_ts: String, + status: crate::models::CloudLogsLobbyStatus, + ) -> CloudLogsLobbySummary { + CloudLogsLobbySummary { + lobby_id, + namespace_id, + lobby_group_name_id, + region_id, + create_ts, + start_ts: None, + ready_ts: None, + status: Box::new(status), + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_logs_perf_mark.rs b/sdks/api/full/rust/src/models/cloud_logs_perf_mark.rs index 01885f45e8..7a6d558e54 100644 --- a/sdks/api/full/rust/src/models/cloud_logs_perf_mark.rs +++ b/sdks/api/full/rust/src/models/cloud_logs_perf_mark.rs @@ -4,38 +4,34 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudLogsPerfMark : A performance mark. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudLogsPerfMark { - /// The label given to this performance mark. - #[serde(rename = "label")] - pub label: String, - /// RFC3339 timestamp - #[serde(rename = "ts")] - pub ts: String, - #[serde(rename = "ray_id", skip_serializing_if = "Option::is_none")] - pub ray_id: Option, - #[serde(rename = "req_id", skip_serializing_if = "Option::is_none")] - pub req_id: Option, + /// The label given to this performance mark. + #[serde(rename = "label")] + pub label: String, + /// RFC3339 timestamp + #[serde(rename = "ts")] + pub ts: String, + #[serde(rename = "ray_id", skip_serializing_if = "Option::is_none")] + pub ray_id: Option, + #[serde(rename = "req_id", skip_serializing_if = "Option::is_none")] + pub req_id: Option, } impl CloudLogsPerfMark { - /// A performance mark. - pub fn new(label: String, ts: String) -> CloudLogsPerfMark { - CloudLogsPerfMark { - label, - ts, - ray_id: None, - req_id: None, - } - } + /// A performance mark. + pub fn new(label: String, ts: String) -> CloudLogsPerfMark { + CloudLogsPerfMark { + label, + ts, + ray_id: None, + req_id: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_logs_perf_span.rs b/sdks/api/full/rust/src/models/cloud_logs_perf_span.rs index e7847885ef..85828927c6 100644 --- a/sdks/api/full/rust/src/models/cloud_logs_perf_span.rs +++ b/sdks/api/full/rust/src/models/cloud_logs_perf_span.rs @@ -4,39 +4,35 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudLogsPerfSpan : A performance span. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudLogsPerfSpan { - /// The label given to this performance span. - #[serde(rename = "label")] - pub label: String, - /// RFC3339 timestamp - #[serde(rename = "start_ts")] - pub start_ts: String, - /// RFC3339 timestamp - #[serde(rename = "finish_ts", skip_serializing_if = "Option::is_none")] - pub finish_ts: Option, - #[serde(rename = "req_id", skip_serializing_if = "Option::is_none")] - pub req_id: Option, + /// The label given to this performance span. + #[serde(rename = "label")] + pub label: String, + /// RFC3339 timestamp + #[serde(rename = "start_ts")] + pub start_ts: String, + /// RFC3339 timestamp + #[serde(rename = "finish_ts", skip_serializing_if = "Option::is_none")] + pub finish_ts: Option, + #[serde(rename = "req_id", skip_serializing_if = "Option::is_none")] + pub req_id: Option, } impl CloudLogsPerfSpan { - /// A performance span. - pub fn new(label: String, start_ts: String) -> CloudLogsPerfSpan { - CloudLogsPerfSpan { - label, - start_ts, - finish_ts: None, - req_id: None, - } - } + /// A performance span. + pub fn new(label: String, start_ts: String) -> CloudLogsPerfSpan { + CloudLogsPerfSpan { + label, + start_ts, + finish_ts: None, + req_id: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_matchmaker_development_port.rs b/sdks/api/full/rust/src/models/cloud_matchmaker_development_port.rs index b901399953..a4be2575ae 100644 --- a/sdks/api/full/rust/src/models/cloud_matchmaker_development_port.rs +++ b/sdks/api/full/rust/src/models/cloud_matchmaker_development_port.rs @@ -4,33 +4,31 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudMatchmakerDevelopmentPort : A port configuration used to create development tokens. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudMatchmakerDevelopmentPort { - #[serde(rename = "port", skip_serializing_if = "Option::is_none")] - pub port: Option, - #[serde(rename = "port_range", skip_serializing_if = "Option::is_none")] - pub port_range: Option>, - #[serde(rename = "protocol")] - pub protocol: crate::models::CloudVersionMatchmakerPortProtocol, + #[serde(rename = "port", skip_serializing_if = "Option::is_none")] + pub port: Option, + #[serde(rename = "port_range", skip_serializing_if = "Option::is_none")] + pub port_range: Option>, + #[serde(rename = "protocol")] + pub protocol: crate::models::CloudVersionMatchmakerPortProtocol, } impl CloudMatchmakerDevelopmentPort { - /// A port configuration used to create development tokens. - pub fn new(protocol: crate::models::CloudVersionMatchmakerPortProtocol) -> CloudMatchmakerDevelopmentPort { - CloudMatchmakerDevelopmentPort { - port: None, - port_range: None, - protocol, - } - } + /// A port configuration used to create development tokens. + pub fn new( + protocol: crate::models::CloudVersionMatchmakerPortProtocol, + ) -> CloudMatchmakerDevelopmentPort { + CloudMatchmakerDevelopmentPort { + port: None, + port_range: None, + protocol, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_matchmaker_namespace_config.rs b/sdks/api/full/rust/src/models/cloud_matchmaker_namespace_config.rs index 4723846dfd..27d07a8e91 100644 --- a/sdks/api/full/rust/src/models/cloud_matchmaker_namespace_config.rs +++ b/sdks/api/full/rust/src/models/cloud_matchmaker_namespace_config.rs @@ -4,48 +4,51 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudMatchmakerNamespaceConfig : Matchmaker configuration for a given namespace. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudMatchmakerNamespaceConfig { - /// Unsigned 32 bit integer. - #[serde(rename = "lobby_count_max")] - pub lobby_count_max: i32, - /// Unsigned 32 bit integer. - #[serde(rename = "max_players_per_client")] - pub max_players_per_client: i32, - /// Unsigned 32 bit integer. - #[serde(rename = "max_players_per_client_vpn")] - pub max_players_per_client_vpn: i32, - /// Unsigned 32 bit integer. - #[serde(rename = "max_players_per_client_proxy")] - pub max_players_per_client_proxy: i32, - /// Unsigned 32 bit integer. - #[serde(rename = "max_players_per_client_tor")] - pub max_players_per_client_tor: i32, - /// Unsigned 32 bit integer. - #[serde(rename = "max_players_per_client_hosting")] - pub max_players_per_client_hosting: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "lobby_count_max")] + pub lobby_count_max: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "max_players_per_client")] + pub max_players_per_client: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "max_players_per_client_vpn")] + pub max_players_per_client_vpn: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "max_players_per_client_proxy")] + pub max_players_per_client_proxy: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "max_players_per_client_tor")] + pub max_players_per_client_tor: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "max_players_per_client_hosting")] + pub max_players_per_client_hosting: i32, } impl CloudMatchmakerNamespaceConfig { - /// Matchmaker configuration for a given namespace. - pub fn new(lobby_count_max: i32, max_players_per_client: i32, max_players_per_client_vpn: i32, max_players_per_client_proxy: i32, max_players_per_client_tor: i32, max_players_per_client_hosting: i32) -> CloudMatchmakerNamespaceConfig { - CloudMatchmakerNamespaceConfig { - lobby_count_max, - max_players_per_client, - max_players_per_client_vpn, - max_players_per_client_proxy, - max_players_per_client_tor, - max_players_per_client_hosting, - } - } + /// Matchmaker configuration for a given namespace. + pub fn new( + lobby_count_max: i32, + max_players_per_client: i32, + max_players_per_client_vpn: i32, + max_players_per_client_proxy: i32, + max_players_per_client_tor: i32, + max_players_per_client_hosting: i32, + ) -> CloudMatchmakerNamespaceConfig { + CloudMatchmakerNamespaceConfig { + lobby_count_max, + max_players_per_client, + max_players_per_client_vpn, + max_players_per_client_proxy, + max_players_per_client_tor, + max_players_per_client_hosting, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_namespace_config.rs b/sdks/api/full/rust/src/models/cloud_namespace_config.rs index 33795ba328..0f0baf7da2 100644 --- a/sdks/api/full/rust/src/models/cloud_namespace_config.rs +++ b/sdks/api/full/rust/src/models/cloud_namespace_config.rs @@ -4,38 +4,39 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudNamespaceConfig : Cloud configuration for a given namespace. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudNamespaceConfig { - #[serde(rename = "cdn")] - pub cdn: Box, - #[serde(rename = "matchmaker")] - pub matchmaker: Box, - /// KV configuration for a given namespace. - #[serde(rename = "kv")] - pub kv: serde_json::Value, - /// Identity configuration for a given namespace. - #[serde(rename = "identity")] - pub identity: serde_json::Value, + #[serde(rename = "cdn")] + pub cdn: Box, + #[serde(rename = "matchmaker")] + pub matchmaker: Box, + /// KV configuration for a given namespace. + #[serde(rename = "kv")] + pub kv: serde_json::Value, + /// Identity configuration for a given namespace. + #[serde(rename = "identity")] + pub identity: serde_json::Value, } impl CloudNamespaceConfig { - /// Cloud configuration for a given namespace. - pub fn new(cdn: crate::models::CloudCdnNamespaceConfig, matchmaker: crate::models::CloudMatchmakerNamespaceConfig, kv: serde_json::Value, identity: serde_json::Value) -> CloudNamespaceConfig { - CloudNamespaceConfig { - cdn: Box::new(cdn), - matchmaker: Box::new(matchmaker), - kv, - identity, - } - } + /// Cloud configuration for a given namespace. + pub fn new( + cdn: crate::models::CloudCdnNamespaceConfig, + matchmaker: crate::models::CloudMatchmakerNamespaceConfig, + kv: serde_json::Value, + identity: serde_json::Value, + ) -> CloudNamespaceConfig { + CloudNamespaceConfig { + cdn: Box::new(cdn), + matchmaker: Box::new(matchmaker), + kv, + identity, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_namespace_full.rs b/sdks/api/full/rust/src/models/cloud_namespace_full.rs index 2ff7cc982d..07eb5e243a 100644 --- a/sdks/api/full/rust/src/models/cloud_namespace_full.rs +++ b/sdks/api/full/rust/src/models/cloud_namespace_full.rs @@ -4,45 +4,48 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudNamespaceFull : A full namespace. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudNamespaceFull { - #[serde(rename = "namespace_id")] - pub namespace_id: uuid::Uuid, - /// RFC3339 timestamp - #[serde(rename = "create_ts")] - pub create_ts: String, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "version_id")] - pub version_id: uuid::Uuid, - /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. - #[serde(rename = "name_id")] - pub name_id: String, - #[serde(rename = "config")] - pub config: Box, + #[serde(rename = "namespace_id")] + pub namespace_id: uuid::Uuid, + /// RFC3339 timestamp + #[serde(rename = "create_ts")] + pub create_ts: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "version_id")] + pub version_id: uuid::Uuid, + /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. + #[serde(rename = "name_id")] + pub name_id: String, + #[serde(rename = "config")] + pub config: Box, } impl CloudNamespaceFull { - /// A full namespace. - pub fn new(namespace_id: uuid::Uuid, create_ts: String, display_name: String, version_id: uuid::Uuid, name_id: String, config: crate::models::CloudNamespaceConfig) -> CloudNamespaceFull { - CloudNamespaceFull { - namespace_id, - create_ts, - display_name, - version_id, - name_id, - config: Box::new(config), - } - } + /// A full namespace. + pub fn new( + namespace_id: uuid::Uuid, + create_ts: String, + display_name: String, + version_id: uuid::Uuid, + name_id: String, + config: crate::models::CloudNamespaceConfig, + ) -> CloudNamespaceFull { + CloudNamespaceFull { + namespace_id, + create_ts, + display_name, + version_id, + name_id, + config: Box::new(config), + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_namespace_summary.rs b/sdks/api/full/rust/src/models/cloud_namespace_summary.rs index b8678837ba..d126fae0a6 100644 --- a/sdks/api/full/rust/src/models/cloud_namespace_summary.rs +++ b/sdks/api/full/rust/src/models/cloud_namespace_summary.rs @@ -4,42 +4,44 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudNamespaceSummary : A namespace summary. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudNamespaceSummary { - #[serde(rename = "namespace_id")] - pub namespace_id: uuid::Uuid, - /// RFC3339 timestamp - #[serde(rename = "create_ts")] - pub create_ts: String, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "version_id")] - pub version_id: uuid::Uuid, - /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. - #[serde(rename = "name_id")] - pub name_id: String, + #[serde(rename = "namespace_id")] + pub namespace_id: uuid::Uuid, + /// RFC3339 timestamp + #[serde(rename = "create_ts")] + pub create_ts: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "version_id")] + pub version_id: uuid::Uuid, + /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. + #[serde(rename = "name_id")] + pub name_id: String, } impl CloudNamespaceSummary { - /// A namespace summary. - pub fn new(namespace_id: uuid::Uuid, create_ts: String, display_name: String, version_id: uuid::Uuid, name_id: String) -> CloudNamespaceSummary { - CloudNamespaceSummary { - namespace_id, - create_ts, - display_name, - version_id, - name_id, - } - } + /// A namespace summary. + pub fn new( + namespace_id: uuid::Uuid, + create_ts: String, + display_name: String, + version_id: uuid::Uuid, + name_id: String, + ) -> CloudNamespaceSummary { + CloudNamespaceSummary { + namespace_id, + create_ts, + display_name, + version_id, + name_id, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_namespace_version.rs b/sdks/api/full/rust/src/models/cloud_namespace_version.rs index 94383355fc..f0f289a554 100644 --- a/sdks/api/full/rust/src/models/cloud_namespace_version.rs +++ b/sdks/api/full/rust/src/models/cloud_namespace_version.rs @@ -4,36 +4,36 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudNamespaceVersion : A previously deployed namespace version. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudNamespaceVersion { - /// A universally unique identifier. - #[serde(rename = "namespace_id")] - pub namespace_id: String, - /// A universally unique identifier. - #[serde(rename = "version_id")] - pub version_id: String, - /// RFC3339 timestamp - #[serde(rename = "deploy_ts")] - pub deploy_ts: String, + /// A universally unique identifier. + #[serde(rename = "namespace_id")] + pub namespace_id: String, + /// A universally unique identifier. + #[serde(rename = "version_id")] + pub version_id: String, + /// RFC3339 timestamp + #[serde(rename = "deploy_ts")] + pub deploy_ts: String, } impl CloudNamespaceVersion { - /// A previously deployed namespace version. - pub fn new(namespace_id: String, version_id: String, deploy_ts: String) -> CloudNamespaceVersion { - CloudNamespaceVersion { - namespace_id, - version_id, - deploy_ts, - } - } + /// A previously deployed namespace version. + pub fn new( + namespace_id: String, + version_id: String, + deploy_ts: String, + ) -> CloudNamespaceVersion { + CloudNamespaceVersion { + namespace_id, + version_id, + deploy_ts, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_region_summary.rs b/sdks/api/full/rust/src/models/cloud_region_summary.rs index b539cac636..9ba4c88ade 100644 --- a/sdks/api/full/rust/src/models/cloud_region_summary.rs +++ b/sdks/api/full/rust/src/models/cloud_region_summary.rs @@ -4,46 +4,49 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudRegionSummary : A region summary. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudRegionSummary { - #[serde(rename = "region_id")] - pub region_id: uuid::Uuid, - /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. - #[serde(rename = "region_name_id")] - pub region_name_id: String, - /// The server provider of this region. - #[serde(rename = "provider")] - pub provider: String, - #[serde(rename = "universal_region")] - pub universal_region: crate::models::CloudUniversalRegion, - /// Represent a resource's readable display name. - #[serde(rename = "provider_display_name")] - pub provider_display_name: String, - /// Represent a resource's readable display name. - #[serde(rename = "region_display_name")] - pub region_display_name: String, + #[serde(rename = "region_id")] + pub region_id: uuid::Uuid, + /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. + #[serde(rename = "region_name_id")] + pub region_name_id: String, + /// The server provider of this region. + #[serde(rename = "provider")] + pub provider: String, + #[serde(rename = "universal_region")] + pub universal_region: crate::models::CloudUniversalRegion, + /// Represent a resource's readable display name. + #[serde(rename = "provider_display_name")] + pub provider_display_name: String, + /// Represent a resource's readable display name. + #[serde(rename = "region_display_name")] + pub region_display_name: String, } impl CloudRegionSummary { - /// A region summary. - pub fn new(region_id: uuid::Uuid, region_name_id: String, provider: String, universal_region: crate::models::CloudUniversalRegion, provider_display_name: String, region_display_name: String) -> CloudRegionSummary { - CloudRegionSummary { - region_id, - region_name_id, - provider, - universal_region, - provider_display_name, - region_display_name, - } - } + /// A region summary. + pub fn new( + region_id: uuid::Uuid, + region_name_id: String, + provider: String, + universal_region: crate::models::CloudUniversalRegion, + provider_display_name: String, + region_display_name: String, + ) -> CloudRegionSummary { + CloudRegionSummary { + region_id, + region_name_id, + provider, + universal_region, + provider_display_name, + region_display_name, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_region_tier.rs b/sdks/api/full/rust/src/models/cloud_region_tier.rs index 141ddc1300..a4a5f23fca 100644 --- a/sdks/api/full/rust/src/models/cloud_region_tier.rs +++ b/sdks/api/full/rust/src/models/cloud_region_tier.rs @@ -4,56 +4,61 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudRegionTier : A region server tier. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudRegionTier { - /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. - #[serde(rename = "tier_name_id")] - pub tier_name_id: String, - /// Together with the denominator, denotes the portion of the CPU a given server uses. - #[serde(rename = "rivet_cores_numerator")] - pub rivet_cores_numerator: i32, - /// Together with the numerator, denotes the portion of the CPU a given server uses. - #[serde(rename = "rivet_cores_denominator")] - pub rivet_cores_denominator: i32, - /// CPU frequency (MHz). - #[serde(rename = "cpu")] - pub cpu: i32, - /// Allocated memory (MB). - #[serde(rename = "memory")] - pub memory: i32, - /// Allocated disk space (MB). - #[serde(rename = "disk")] - pub disk: i32, - /// Internet bandwidth (MB). - #[serde(rename = "bandwidth")] - pub bandwidth: i32, - /// **Deprecated** Price billed for every second this server is running (in quadrillionth USD, 1,000,000,000,000 = $1.00). - #[serde(rename = "price_per_second")] - pub price_per_second: i32, + /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. + #[serde(rename = "tier_name_id")] + pub tier_name_id: String, + /// Together with the denominator, denotes the portion of the CPU a given server uses. + #[serde(rename = "rivet_cores_numerator")] + pub rivet_cores_numerator: i32, + /// Together with the numerator, denotes the portion of the CPU a given server uses. + #[serde(rename = "rivet_cores_denominator")] + pub rivet_cores_denominator: i32, + /// CPU frequency (MHz). + #[serde(rename = "cpu")] + pub cpu: i32, + /// Allocated memory (MB). + #[serde(rename = "memory")] + pub memory: i32, + /// Allocated disk space (MB). + #[serde(rename = "disk")] + pub disk: i32, + /// Internet bandwidth (MB). + #[serde(rename = "bandwidth")] + pub bandwidth: i32, + /// **Deprecated** Price billed for every second this server is running (in quadrillionth USD, 1,000,000,000,000 = $1.00). + #[serde(rename = "price_per_second")] + pub price_per_second: i32, } impl CloudRegionTier { - /// A region server tier. - pub fn new(tier_name_id: String, rivet_cores_numerator: i32, rivet_cores_denominator: i32, cpu: i32, memory: i32, disk: i32, bandwidth: i32, price_per_second: i32) -> CloudRegionTier { - CloudRegionTier { - tier_name_id, - rivet_cores_numerator, - rivet_cores_denominator, - cpu, - memory, - disk, - bandwidth, - price_per_second, - } - } + /// A region server tier. + pub fn new( + tier_name_id: String, + rivet_cores_numerator: i32, + rivet_cores_denominator: i32, + cpu: i32, + memory: i32, + disk: i32, + bandwidth: i32, + price_per_second: i32, + ) -> CloudRegionTier { + CloudRegionTier { + tier_name_id, + rivet_cores_numerator, + rivet_cores_denominator, + cpu, + memory, + disk, + bandwidth, + price_per_second, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_region_tier_expenses.rs b/sdks/api/full/rust/src/models/cloud_region_tier_expenses.rs index 23ee432614..3b147a020b 100644 --- a/sdks/api/full/rust/src/models/cloud_region_tier_expenses.rs +++ b/sdks/api/full/rust/src/models/cloud_region_tier_expenses.rs @@ -4,46 +4,49 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudRegionTierExpenses : Region tier expenses. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudRegionTierExpenses { - #[serde(rename = "namespace_id")] - pub namespace_id: uuid::Uuid, - #[serde(rename = "region_id")] - pub region_id: uuid::Uuid, - /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. - #[serde(rename = "tier_name_id")] - pub tier_name_id: String, - /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. - #[serde(rename = "lobby_group_name_id")] - pub lobby_group_name_id: String, - /// How long a region tier has been active (in milliseconds). - #[serde(rename = "uptime")] - pub uptime: f64, - /// Amount of expenses for this region tier (in hundred-thousandths USD, 100,000 = $1.00). - #[serde(rename = "expenses")] - pub expenses: f64, + #[serde(rename = "namespace_id")] + pub namespace_id: uuid::Uuid, + #[serde(rename = "region_id")] + pub region_id: uuid::Uuid, + /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. + #[serde(rename = "tier_name_id")] + pub tier_name_id: String, + /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. + #[serde(rename = "lobby_group_name_id")] + pub lobby_group_name_id: String, + /// How long a region tier has been active (in milliseconds). + #[serde(rename = "uptime")] + pub uptime: f64, + /// Amount of expenses for this region tier (in hundred-thousandths USD, 100,000 = $1.00). + #[serde(rename = "expenses")] + pub expenses: f64, } impl CloudRegionTierExpenses { - /// Region tier expenses. - pub fn new(namespace_id: uuid::Uuid, region_id: uuid::Uuid, tier_name_id: String, lobby_group_name_id: String, uptime: f64, expenses: f64) -> CloudRegionTierExpenses { - CloudRegionTierExpenses { - namespace_id, - region_id, - tier_name_id, - lobby_group_name_id, - uptime, - expenses, - } - } + /// Region tier expenses. + pub fn new( + namespace_id: uuid::Uuid, + region_id: uuid::Uuid, + tier_name_id: String, + lobby_group_name_id: String, + uptime: f64, + expenses: f64, + ) -> CloudRegionTierExpenses { + CloudRegionTierExpenses { + namespace_id, + region_id, + tier_name_id, + lobby_group_name_id, + uptime, + expenses, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_svc_metrics.rs b/sdks/api/full/rust/src/models/cloud_svc_metrics.rs index a14c7d134f..3bf395bbb5 100644 --- a/sdks/api/full/rust/src/models/cloud_svc_metrics.rs +++ b/sdks/api/full/rust/src/models/cloud_svc_metrics.rs @@ -4,40 +4,36 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudSvcMetrics : Metrics relating to a job service. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudSvcMetrics { - /// The job name. - #[serde(rename = "job")] - pub job: String, - /// CPU metrics. - #[serde(rename = "cpu")] - pub cpu: Vec, - /// Memory metrics. - #[serde(rename = "memory")] - pub memory: Vec, - /// Total allocated memory (MB). - #[serde(rename = "allocated_memory", skip_serializing_if = "Option::is_none")] - pub allocated_memory: Option, + /// The job name. + #[serde(rename = "job")] + pub job: String, + /// CPU metrics. + #[serde(rename = "cpu")] + pub cpu: Vec, + /// Memory metrics. + #[serde(rename = "memory")] + pub memory: Vec, + /// Total allocated memory (MB). + #[serde(rename = "allocated_memory", skip_serializing_if = "Option::is_none")] + pub allocated_memory: Option, } impl CloudSvcMetrics { - /// Metrics relating to a job service. - pub fn new(job: String, cpu: Vec, memory: Vec) -> CloudSvcMetrics { - CloudSvcMetrics { - job, - cpu, - memory, - allocated_memory: None, - } - } + /// Metrics relating to a job service. + pub fn new(job: String, cpu: Vec, memory: Vec) -> CloudSvcMetrics { + CloudSvcMetrics { + job, + cpu, + memory, + allocated_memory: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_svc_perf.rs b/sdks/api/full/rust/src/models/cloud_svc_perf.rs index 74a6100e7e..eb3b72d02e 100644 --- a/sdks/api/full/rust/src/models/cloud_svc_perf.rs +++ b/sdks/api/full/rust/src/models/cloud_svc_perf.rs @@ -4,47 +4,49 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudSvcPerf : A service performance summary. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudSvcPerf { - /// The name of the service. - #[serde(rename = "svc_name")] - pub svc_name: String, - /// RFC3339 timestamp - #[serde(rename = "ts")] - pub ts: String, - /// Unsigned 64 bit integer. - #[serde(rename = "duration")] - pub duration: i64, - #[serde(rename = "req_id", skip_serializing_if = "Option::is_none")] - pub req_id: Option, - /// A list of performance spans. - #[serde(rename = "spans")] - pub spans: Vec, - /// A list of performance marks. - #[serde(rename = "marks")] - pub marks: Vec, + /// The name of the service. + #[serde(rename = "svc_name")] + pub svc_name: String, + /// RFC3339 timestamp + #[serde(rename = "ts")] + pub ts: String, + /// Unsigned 64 bit integer. + #[serde(rename = "duration")] + pub duration: i64, + #[serde(rename = "req_id", skip_serializing_if = "Option::is_none")] + pub req_id: Option, + /// A list of performance spans. + #[serde(rename = "spans")] + pub spans: Vec, + /// A list of performance marks. + #[serde(rename = "marks")] + pub marks: Vec, } impl CloudSvcPerf { - /// A service performance summary. - pub fn new(svc_name: String, ts: String, duration: i64, spans: Vec, marks: Vec) -> CloudSvcPerf { - CloudSvcPerf { - svc_name, - ts, - duration, - req_id: None, - spans, - marks, - } - } + /// A service performance summary. + pub fn new( + svc_name: String, + ts: String, + duration: i64, + spans: Vec, + marks: Vec, + ) -> CloudSvcPerf { + CloudSvcPerf { + svc_name, + ts, + duration, + req_id: None, + spans, + marks, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_universal_region.rs b/sdks/api/full/rust/src/models/cloud_universal_region.rs index 33d71d0238..eadba68d59 100644 --- a/sdks/api/full/rust/src/models/cloud_universal_region.rs +++ b/sdks/api/full/rust/src/models/cloud_universal_region.rs @@ -4,7 +4,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -13,106 +13,101 @@ /// **Deprecated** #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum CloudUniversalRegion { - #[serde(rename = "unknown")] - Unknown, - #[serde(rename = "local")] - Local, - #[serde(rename = "amsterdam")] - Amsterdam, - #[serde(rename = "atlanta")] - Atlanta, - #[serde(rename = "bangalore")] - Bangalore, - #[serde(rename = "dallas")] - Dallas, - #[serde(rename = "frankfurt")] - Frankfurt, - #[serde(rename = "london")] - London, - #[serde(rename = "mumbai")] - Mumbai, - #[serde(rename = "newark")] - Newark, - #[serde(rename = "new_york_city")] - NewYorkCity, - #[serde(rename = "san_francisco")] - SanFrancisco, - #[serde(rename = "singapore")] - Singapore, - #[serde(rename = "sydney")] - Sydney, - #[serde(rename = "tokyo")] - Tokyo, - #[serde(rename = "toronto")] - Toronto, - #[serde(rename = "washington_dc")] - WashingtonDc, - #[serde(rename = "chicago")] - Chicago, - #[serde(rename = "paris")] - Paris, - #[serde(rename = "seattle")] - Seattle, - #[serde(rename = "sao_paulo")] - SaoPaulo, - #[serde(rename = "stockholm")] - Stockholm, - #[serde(rename = "chennai")] - Chennai, - #[serde(rename = "osaka")] - Osaka, - #[serde(rename = "milan")] - Milan, - #[serde(rename = "miami")] - Miami, - #[serde(rename = "jakarta")] - Jakarta, - #[serde(rename = "los_angeles")] - LosAngeles, - + #[serde(rename = "unknown")] + Unknown, + #[serde(rename = "local")] + Local, + #[serde(rename = "amsterdam")] + Amsterdam, + #[serde(rename = "atlanta")] + Atlanta, + #[serde(rename = "bangalore")] + Bangalore, + #[serde(rename = "dallas")] + Dallas, + #[serde(rename = "frankfurt")] + Frankfurt, + #[serde(rename = "london")] + London, + #[serde(rename = "mumbai")] + Mumbai, + #[serde(rename = "newark")] + Newark, + #[serde(rename = "new_york_city")] + NewYorkCity, + #[serde(rename = "san_francisco")] + SanFrancisco, + #[serde(rename = "singapore")] + Singapore, + #[serde(rename = "sydney")] + Sydney, + #[serde(rename = "tokyo")] + Tokyo, + #[serde(rename = "toronto")] + Toronto, + #[serde(rename = "washington_dc")] + WashingtonDc, + #[serde(rename = "chicago")] + Chicago, + #[serde(rename = "paris")] + Paris, + #[serde(rename = "seattle")] + Seattle, + #[serde(rename = "sao_paulo")] + SaoPaulo, + #[serde(rename = "stockholm")] + Stockholm, + #[serde(rename = "chennai")] + Chennai, + #[serde(rename = "osaka")] + Osaka, + #[serde(rename = "milan")] + Milan, + #[serde(rename = "miami")] + Miami, + #[serde(rename = "jakarta")] + Jakarta, + #[serde(rename = "los_angeles")] + LosAngeles, } impl ToString for CloudUniversalRegion { - fn to_string(&self) -> String { - match self { - Self::Unknown => String::from("unknown"), - Self::Local => String::from("local"), - Self::Amsterdam => String::from("amsterdam"), - Self::Atlanta => String::from("atlanta"), - Self::Bangalore => String::from("bangalore"), - Self::Dallas => String::from("dallas"), - Self::Frankfurt => String::from("frankfurt"), - Self::London => String::from("london"), - Self::Mumbai => String::from("mumbai"), - Self::Newark => String::from("newark"), - Self::NewYorkCity => String::from("new_york_city"), - Self::SanFrancisco => String::from("san_francisco"), - Self::Singapore => String::from("singapore"), - Self::Sydney => String::from("sydney"), - Self::Tokyo => String::from("tokyo"), - Self::Toronto => String::from("toronto"), - Self::WashingtonDc => String::from("washington_dc"), - Self::Chicago => String::from("chicago"), - Self::Paris => String::from("paris"), - Self::Seattle => String::from("seattle"), - Self::SaoPaulo => String::from("sao_paulo"), - Self::Stockholm => String::from("stockholm"), - Self::Chennai => String::from("chennai"), - Self::Osaka => String::from("osaka"), - Self::Milan => String::from("milan"), - Self::Miami => String::from("miami"), - Self::Jakarta => String::from("jakarta"), - Self::LosAngeles => String::from("los_angeles"), - } - } + fn to_string(&self) -> String { + match self { + Self::Unknown => String::from("unknown"), + Self::Local => String::from("local"), + Self::Amsterdam => String::from("amsterdam"), + Self::Atlanta => String::from("atlanta"), + Self::Bangalore => String::from("bangalore"), + Self::Dallas => String::from("dallas"), + Self::Frankfurt => String::from("frankfurt"), + Self::London => String::from("london"), + Self::Mumbai => String::from("mumbai"), + Self::Newark => String::from("newark"), + Self::NewYorkCity => String::from("new_york_city"), + Self::SanFrancisco => String::from("san_francisco"), + Self::Singapore => String::from("singapore"), + Self::Sydney => String::from("sydney"), + Self::Tokyo => String::from("tokyo"), + Self::Toronto => String::from("toronto"), + Self::WashingtonDc => String::from("washington_dc"), + Self::Chicago => String::from("chicago"), + Self::Paris => String::from("paris"), + Self::Seattle => String::from("seattle"), + Self::SaoPaulo => String::from("sao_paulo"), + Self::Stockholm => String::from("stockholm"), + Self::Chennai => String::from("chennai"), + Self::Osaka => String::from("osaka"), + Self::Milan => String::from("milan"), + Self::Miami => String::from("miami"), + Self::Jakarta => String::from("jakarta"), + Self::LosAngeles => String::from("los_angeles"), + } + } } impl Default for CloudUniversalRegion { - fn default() -> CloudUniversalRegion { - Self::Unknown - } + fn default() -> CloudUniversalRegion { + Self::Unknown + } } - - - - diff --git a/sdks/api/full/rust/src/models/cloud_validate_group_request.rs b/sdks/api/full/rust/src/models/cloud_validate_group_request.rs index 998146bdce..394c6fea71 100644 --- a/sdks/api/full/rust/src/models/cloud_validate_group_request.rs +++ b/sdks/api/full/rust/src/models/cloud_validate_group_request.rs @@ -4,26 +4,19 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudValidateGroupRequest { - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, } impl CloudValidateGroupRequest { - pub fn new(display_name: String) -> CloudValidateGroupRequest { - CloudValidateGroupRequest { - display_name, - } - } + pub fn new(display_name: String) -> CloudValidateGroupRequest { + CloudValidateGroupRequest { display_name } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_validate_group_response.rs b/sdks/api/full/rust/src/models/cloud_validate_group_response.rs index 285d7b19c9..a36a8f15c4 100644 --- a/sdks/api/full/rust/src/models/cloud_validate_group_response.rs +++ b/sdks/api/full/rust/src/models/cloud_validate_group_response.rs @@ -4,26 +4,19 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudValidateGroupResponse { - /// A list of validation errors. - #[serde(rename = "errors")] - pub errors: Vec, + /// A list of validation errors. + #[serde(rename = "errors")] + pub errors: Vec, } impl CloudValidateGroupResponse { - pub fn new(errors: Vec) -> CloudValidateGroupResponse { - CloudValidateGroupResponse { - errors, - } - } + pub fn new(errors: Vec) -> CloudValidateGroupResponse { + CloudValidateGroupResponse { errors } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_version_cdn_cdn_config.rs b/sdks/api/full/rust/src/models/cloud_version_cdn_cdn_config.rs index f514817f09..f246158975 100644 --- a/sdks/api/full/rust/src/models/cloud_version_cdn_cdn_config.rs +++ b/sdks/api/full/rust/src/models/cloud_version_cdn_cdn_config.rs @@ -4,43 +4,39 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionCdnCdnConfig : CDN configuration for a given version. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionCdnCdnConfig { - /// _Configures Rivet CLI behavior. Has no effect on server behavior._ - #[serde(rename = "build_command", skip_serializing_if = "Option::is_none")] - pub build_command: Option, - /// _Configures Rivet CLI behavior. Has no effect on server behavior._ - #[serde(rename = "build_output", skip_serializing_if = "Option::is_none")] - pub build_output: Option, - /// _Configures Rivet CLI behavior. Has no effect on server behavior._ - #[serde(rename = "build_env", skip_serializing_if = "Option::is_none")] - pub build_env: Option<::std::collections::HashMap>, - #[serde(rename = "site_id", skip_serializing_if = "Option::is_none")] - pub site_id: Option, - /// Multiple CDN version routes. - #[serde(rename = "routes", skip_serializing_if = "Option::is_none")] - pub routes: Option>, + /// _Configures Rivet CLI behavior. Has no effect on server behavior._ + #[serde(rename = "build_command", skip_serializing_if = "Option::is_none")] + pub build_command: Option, + /// _Configures Rivet CLI behavior. Has no effect on server behavior._ + #[serde(rename = "build_output", skip_serializing_if = "Option::is_none")] + pub build_output: Option, + /// _Configures Rivet CLI behavior. Has no effect on server behavior._ + #[serde(rename = "build_env", skip_serializing_if = "Option::is_none")] + pub build_env: Option<::std::collections::HashMap>, + #[serde(rename = "site_id", skip_serializing_if = "Option::is_none")] + pub site_id: Option, + /// Multiple CDN version routes. + #[serde(rename = "routes", skip_serializing_if = "Option::is_none")] + pub routes: Option>, } impl CloudVersionCdnCdnConfig { - /// CDN configuration for a given version. - pub fn new() -> CloudVersionCdnCdnConfig { - CloudVersionCdnCdnConfig { - build_command: None, - build_output: None, - build_env: None, - site_id: None, - routes: None, - } - } + /// CDN configuration for a given version. + pub fn new() -> CloudVersionCdnCdnConfig { + CloudVersionCdnCdnConfig { + build_command: None, + build_output: None, + build_env: None, + site_id: None, + routes: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_version_cdn_custom_headers_middleware.rs b/sdks/api/full/rust/src/models/cloud_version_cdn_custom_headers_middleware.rs index edcab304b2..7c6210fdfc 100644 --- a/sdks/api/full/rust/src/models/cloud_version_cdn_custom_headers_middleware.rs +++ b/sdks/api/full/rust/src/models/cloud_version_cdn_custom_headers_middleware.rs @@ -4,25 +4,20 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionCdnCustomHeadersMiddleware { - #[serde(rename = "headers")] - pub headers: Vec, + #[serde(rename = "headers")] + pub headers: Vec, } impl CloudVersionCdnCustomHeadersMiddleware { - pub fn new(headers: Vec) -> CloudVersionCdnCustomHeadersMiddleware { - CloudVersionCdnCustomHeadersMiddleware { - headers, - } - } + pub fn new( + headers: Vec, + ) -> CloudVersionCdnCustomHeadersMiddleware { + CloudVersionCdnCustomHeadersMiddleware { headers } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_version_cdn_header.rs b/sdks/api/full/rust/src/models/cloud_version_cdn_header.rs index c588c07e13..6dd05a9aa5 100644 --- a/sdks/api/full/rust/src/models/cloud_version_cdn_header.rs +++ b/sdks/api/full/rust/src/models/cloud_version_cdn_header.rs @@ -4,28 +4,20 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionCdnHeader { - #[serde(rename = "name")] - pub name: String, - #[serde(rename = "value")] - pub value: String, + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "value")] + pub value: String, } impl CloudVersionCdnHeader { - pub fn new(name: String, value: String) -> CloudVersionCdnHeader { - CloudVersionCdnHeader { - name, - value, - } - } + pub fn new(name: String, value: String) -> CloudVersionCdnHeader { + CloudVersionCdnHeader { name, value } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_version_cdn_middleware.rs b/sdks/api/full/rust/src/models/cloud_version_cdn_middleware.rs index 3a4f78a4b7..f7e81e7509 100644 --- a/sdks/api/full/rust/src/models/cloud_version_cdn_middleware.rs +++ b/sdks/api/full/rust/src/models/cloud_version_cdn_middleware.rs @@ -4,25 +4,20 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionCdnMiddleware { - #[serde(rename = "kind")] - pub kind: Box, + #[serde(rename = "kind")] + pub kind: Box, } impl CloudVersionCdnMiddleware { - pub fn new(kind: crate::models::CloudVersionCdnMiddlewareKind) -> CloudVersionCdnMiddleware { - CloudVersionCdnMiddleware { - kind: Box::new(kind), - } - } + pub fn new(kind: crate::models::CloudVersionCdnMiddlewareKind) -> CloudVersionCdnMiddleware { + CloudVersionCdnMiddleware { + kind: Box::new(kind), + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_version_cdn_middleware_kind.rs b/sdks/api/full/rust/src/models/cloud_version_cdn_middleware_kind.rs index ef872cbb4d..cc2c743870 100644 --- a/sdks/api/full/rust/src/models/cloud_version_cdn_middleware_kind.rs +++ b/sdks/api/full/rust/src/models/cloud_version_cdn_middleware_kind.rs @@ -4,25 +4,20 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionCdnMiddlewareKind { - #[serde(rename = "custom_headers", skip_serializing_if = "Option::is_none")] - pub custom_headers: Option>, + #[serde(rename = "custom_headers", skip_serializing_if = "Option::is_none")] + pub custom_headers: Option>, } impl CloudVersionCdnMiddlewareKind { - pub fn new() -> CloudVersionCdnMiddlewareKind { - CloudVersionCdnMiddlewareKind { - custom_headers: None, - } - } + pub fn new() -> CloudVersionCdnMiddlewareKind { + CloudVersionCdnMiddlewareKind { + custom_headers: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_version_cdn_route.rs b/sdks/api/full/rust/src/models/cloud_version_cdn_route.rs index a6d8dc7315..53d90eb3f7 100644 --- a/sdks/api/full/rust/src/models/cloud_version_cdn_route.rs +++ b/sdks/api/full/rust/src/models/cloud_version_cdn_route.rs @@ -4,33 +4,32 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionCdnRoute { - #[serde(rename = "glob")] - pub glob: String, - /// Unsigned 32 bit integer. - #[serde(rename = "priority")] - pub priority: i32, - /// Multiple CDN version middleware. - #[serde(rename = "middlewares")] - pub middlewares: Vec, + #[serde(rename = "glob")] + pub glob: String, + /// Unsigned 32 bit integer. + #[serde(rename = "priority")] + pub priority: i32, + /// Multiple CDN version middleware. + #[serde(rename = "middlewares")] + pub middlewares: Vec, } impl CloudVersionCdnRoute { - pub fn new(glob: String, priority: i32, middlewares: Vec) -> CloudVersionCdnRoute { - CloudVersionCdnRoute { - glob, - priority, - middlewares, - } - } + pub fn new( + glob: String, + priority: i32, + middlewares: Vec, + ) -> CloudVersionCdnRoute { + CloudVersionCdnRoute { + glob, + priority, + middlewares, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_version_config.rs b/sdks/api/full/rust/src/models/cloud_version_config.rs index 42ca41ac72..731d7480eb 100644 --- a/sdks/api/full/rust/src/models/cloud_version_config.rs +++ b/sdks/api/full/rust/src/models/cloud_version_config.rs @@ -4,43 +4,39 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionConfig : Cloud configuration for a given version. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionConfig { - #[serde(rename = "scripts", skip_serializing_if = "Option::is_none")] - pub scripts: Option<::std::collections::HashMap>, - #[serde(rename = "engine", skip_serializing_if = "Option::is_none")] - pub engine: Option>, - #[serde(rename = "cdn", skip_serializing_if = "Option::is_none")] - pub cdn: Option>, - #[serde(rename = "matchmaker", skip_serializing_if = "Option::is_none")] - pub matchmaker: Option>, - /// KV configuration for a given version. - #[serde(rename = "kv", skip_serializing_if = "Option::is_none")] - pub kv: Option, - #[serde(rename = "identity", skip_serializing_if = "Option::is_none")] - pub identity: Option>, + #[serde(rename = "scripts", skip_serializing_if = "Option::is_none")] + pub scripts: Option<::std::collections::HashMap>, + #[serde(rename = "engine", skip_serializing_if = "Option::is_none")] + pub engine: Option>, + #[serde(rename = "cdn", skip_serializing_if = "Option::is_none")] + pub cdn: Option>, + #[serde(rename = "matchmaker", skip_serializing_if = "Option::is_none")] + pub matchmaker: Option>, + /// KV configuration for a given version. + #[serde(rename = "kv", skip_serializing_if = "Option::is_none")] + pub kv: Option, + #[serde(rename = "identity", skip_serializing_if = "Option::is_none")] + pub identity: Option>, } impl CloudVersionConfig { - /// Cloud configuration for a given version. - pub fn new() -> CloudVersionConfig { - CloudVersionConfig { - scripts: None, - engine: None, - cdn: None, - matchmaker: None, - kv: None, - identity: None, - } - } + /// Cloud configuration for a given version. + pub fn new() -> CloudVersionConfig { + CloudVersionConfig { + scripts: None, + engine: None, + cdn: None, + matchmaker: None, + kv: None, + identity: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_version_engine_engine_config.rs b/sdks/api/full/rust/src/models/cloud_version_engine_engine_config.rs index fedd2a23b0..cb646d524b 100644 --- a/sdks/api/full/rust/src/models/cloud_version_engine_engine_config.rs +++ b/sdks/api/full/rust/src/models/cloud_version_engine_engine_config.rs @@ -4,37 +4,32 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionEngineEngineConfig { - #[serde(rename = "unity", skip_serializing_if = "Option::is_none")] - pub unity: Option, - #[serde(rename = "unreal", skip_serializing_if = "Option::is_none")] - pub unreal: Option>, - #[serde(rename = "godot", skip_serializing_if = "Option::is_none")] - pub godot: Option, - #[serde(rename = "html5", skip_serializing_if = "Option::is_none")] - pub html5: Option, - #[serde(rename = "custom", skip_serializing_if = "Option::is_none")] - pub custom: Option, + #[serde(rename = "unity", skip_serializing_if = "Option::is_none")] + pub unity: Option, + #[serde(rename = "unreal", skip_serializing_if = "Option::is_none")] + pub unreal: Option>, + #[serde(rename = "godot", skip_serializing_if = "Option::is_none")] + pub godot: Option, + #[serde(rename = "html5", skip_serializing_if = "Option::is_none")] + pub html5: Option, + #[serde(rename = "custom", skip_serializing_if = "Option::is_none")] + pub custom: Option, } impl CloudVersionEngineEngineConfig { - pub fn new() -> CloudVersionEngineEngineConfig { - CloudVersionEngineEngineConfig { - unity: None, - unreal: None, - godot: None, - html5: None, - custom: None, - } - } + pub fn new() -> CloudVersionEngineEngineConfig { + CloudVersionEngineEngineConfig { + unity: None, + unreal: None, + godot: None, + html5: None, + custom: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_version_engine_unreal_config.rs b/sdks/api/full/rust/src/models/cloud_version_engine_unreal_config.rs index 82c3f11211..c3305e692d 100644 --- a/sdks/api/full/rust/src/models/cloud_version_engine_unreal_config.rs +++ b/sdks/api/full/rust/src/models/cloud_version_engine_unreal_config.rs @@ -4,26 +4,19 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionEngineUnrealConfig { - /// Name of the Unreal module that holds the game code. This is usually the value of `$.Modules[0].Name` in the file `MyProject.unproject`. _Configures Rivet CLI behavior. Has no effect on server behavior._ - #[serde(rename = "game_module")] - pub game_module: String, + /// Name of the Unreal module that holds the game code. This is usually the value of `$.Modules[0].Name` in the file `MyProject.unproject`. _Configures Rivet CLI behavior. Has no effect on server behavior._ + #[serde(rename = "game_module")] + pub game_module: String, } impl CloudVersionEngineUnrealConfig { - pub fn new(game_module: String) -> CloudVersionEngineUnrealConfig { - CloudVersionEngineUnrealConfig { - game_module, - } - } + pub fn new(game_module: String) -> CloudVersionEngineUnrealConfig { + CloudVersionEngineUnrealConfig { game_module } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_version_full.rs b/sdks/api/full/rust/src/models/cloud_version_full.rs index c1c70cec88..864289a6cd 100644 --- a/sdks/api/full/rust/src/models/cloud_version_full.rs +++ b/sdks/api/full/rust/src/models/cloud_version_full.rs @@ -4,38 +4,39 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionFull : A full version. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionFull { - #[serde(rename = "version_id")] - pub version_id: uuid::Uuid, - /// RFC3339 timestamp - #[serde(rename = "create_ts")] - pub create_ts: String, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "config")] - pub config: Box, + #[serde(rename = "version_id")] + pub version_id: uuid::Uuid, + /// RFC3339 timestamp + #[serde(rename = "create_ts")] + pub create_ts: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "config")] + pub config: Box, } impl CloudVersionFull { - /// A full version. - pub fn new(version_id: uuid::Uuid, create_ts: String, display_name: String, config: crate::models::CloudVersionConfig) -> CloudVersionFull { - CloudVersionFull { - version_id, - create_ts, - display_name, - config: Box::new(config), - } - } + /// A full version. + pub fn new( + version_id: uuid::Uuid, + create_ts: String, + display_name: String, + config: crate::models::CloudVersionConfig, + ) -> CloudVersionFull { + CloudVersionFull { + version_id, + create_ts, + display_name, + config: Box::new(config), + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_version_identity_custom_avatar.rs b/sdks/api/full/rust/src/models/cloud_version_identity_custom_avatar.rs index f096ebc61c..c6a502ad7d 100644 --- a/sdks/api/full/rust/src/models/cloud_version_identity_custom_avatar.rs +++ b/sdks/api/full/rust/src/models/cloud_version_identity_custom_avatar.rs @@ -4,25 +4,18 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionIdentityCustomAvatar { - #[serde(rename = "upload_id")] - pub upload_id: uuid::Uuid, + #[serde(rename = "upload_id")] + pub upload_id: uuid::Uuid, } impl CloudVersionIdentityCustomAvatar { - pub fn new(upload_id: uuid::Uuid) -> CloudVersionIdentityCustomAvatar { - CloudVersionIdentityCustomAvatar { - upload_id, - } - } + pub fn new(upload_id: uuid::Uuid) -> CloudVersionIdentityCustomAvatar { + CloudVersionIdentityCustomAvatar { upload_id } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_version_identity_custom_display_name.rs b/sdks/api/full/rust/src/models/cloud_version_identity_custom_display_name.rs index 8c4087fc33..9f0a4efd38 100644 --- a/sdks/api/full/rust/src/models/cloud_version_identity_custom_display_name.rs +++ b/sdks/api/full/rust/src/models/cloud_version_identity_custom_display_name.rs @@ -4,26 +4,19 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionIdentityCustomDisplayName { - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, } impl CloudVersionIdentityCustomDisplayName { - pub fn new(display_name: String) -> CloudVersionIdentityCustomDisplayName { - CloudVersionIdentityCustomDisplayName { - display_name, - } - } + pub fn new(display_name: String) -> CloudVersionIdentityCustomDisplayName { + CloudVersionIdentityCustomDisplayName { display_name } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_version_identity_identity_config.rs b/sdks/api/full/rust/src/models/cloud_version_identity_identity_config.rs index 059efb6ba1..1e6809629e 100644 --- a/sdks/api/full/rust/src/models/cloud_version_identity_identity_config.rs +++ b/sdks/api/full/rust/src/models/cloud_version_identity_identity_config.rs @@ -4,40 +4,39 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionIdentityIdentityConfig : **Deprecated** Identity configuration for a given version. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionIdentityIdentityConfig { - /// **Deprecated** - #[serde(rename = "display_names", skip_serializing_if = "Option::is_none")] - pub display_names: Option>, - /// **Deprecated** - #[serde(rename = "avatars", skip_serializing_if = "Option::is_none")] - pub avatars: Option>, - /// **Deprecated** - #[serde(rename = "custom_display_names", skip_serializing_if = "Option::is_none")] - pub custom_display_names: Option>, - /// **Deprecated** - #[serde(rename = "custom_avatars", skip_serializing_if = "Option::is_none")] - pub custom_avatars: Option>, + /// **Deprecated** + #[serde(rename = "display_names", skip_serializing_if = "Option::is_none")] + pub display_names: Option>, + /// **Deprecated** + #[serde(rename = "avatars", skip_serializing_if = "Option::is_none")] + pub avatars: Option>, + /// **Deprecated** + #[serde( + rename = "custom_display_names", + skip_serializing_if = "Option::is_none" + )] + pub custom_display_names: Option>, + /// **Deprecated** + #[serde(rename = "custom_avatars", skip_serializing_if = "Option::is_none")] + pub custom_avatars: Option>, } impl CloudVersionIdentityIdentityConfig { - /// **Deprecated** Identity configuration for a given version. - pub fn new() -> CloudVersionIdentityIdentityConfig { - CloudVersionIdentityIdentityConfig { - display_names: None, - avatars: None, - custom_display_names: None, - custom_avatars: None, - } - } + /// **Deprecated** Identity configuration for a given version. + pub fn new() -> CloudVersionIdentityIdentityConfig { + CloudVersionIdentityIdentityConfig { + display_names: None, + avatars: None, + custom_display_names: None, + custom_avatars: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_version_matchmaker_captcha.rs b/sdks/api/full/rust/src/models/cloud_version_matchmaker_captcha.rs index a3c791b9a4..fc0b3a4240 100644 --- a/sdks/api/full/rust/src/models/cloud_version_matchmaker_captcha.rs +++ b/sdks/api/full/rust/src/models/cloud_version_matchmaker_captcha.rs @@ -4,38 +4,37 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerCaptcha : Matchmaker captcha configuration. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerCaptcha { - /// Denotes how many requests a connection can make before it is required to reverify a captcha. - #[serde(rename = "requests_before_reverify")] - pub requests_before_reverify: i32, - /// Denotes how long a connection can continue to reconnect without having to reverify a captcha (in milliseconds). - #[serde(rename = "verification_ttl")] - pub verification_ttl: i64, - #[serde(rename = "hcaptcha", skip_serializing_if = "Option::is_none")] - pub hcaptcha: Option>, - #[serde(rename = "turnstile", skip_serializing_if = "Option::is_none")] - pub turnstile: Option>, + /// Denotes how many requests a connection can make before it is required to reverify a captcha. + #[serde(rename = "requests_before_reverify")] + pub requests_before_reverify: i32, + /// Denotes how long a connection can continue to reconnect without having to reverify a captcha (in milliseconds). + #[serde(rename = "verification_ttl")] + pub verification_ttl: i64, + #[serde(rename = "hcaptcha", skip_serializing_if = "Option::is_none")] + pub hcaptcha: Option>, + #[serde(rename = "turnstile", skip_serializing_if = "Option::is_none")] + pub turnstile: Option>, } impl CloudVersionMatchmakerCaptcha { - /// Matchmaker captcha configuration. - pub fn new(requests_before_reverify: i32, verification_ttl: i64) -> CloudVersionMatchmakerCaptcha { - CloudVersionMatchmakerCaptcha { - requests_before_reverify, - verification_ttl, - hcaptcha: None, - turnstile: None, - } - } + /// Matchmaker captcha configuration. + pub fn new( + requests_before_reverify: i32, + verification_ttl: i64, + ) -> CloudVersionMatchmakerCaptcha { + CloudVersionMatchmakerCaptcha { + requests_before_reverify, + verification_ttl, + hcaptcha: None, + turnstile: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_version_matchmaker_captcha_hcaptcha.rs b/sdks/api/full/rust/src/models/cloud_version_matchmaker_captcha_hcaptcha.rs index a48d4585ab..72e9ef6895 100644 --- a/sdks/api/full/rust/src/models/cloud_version_matchmaker_captcha_hcaptcha.rs +++ b/sdks/api/full/rust/src/models/cloud_version_matchmaker_captcha_hcaptcha.rs @@ -4,35 +4,31 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerCaptchaHcaptcha : hCpatcha configuration. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerCaptchaHcaptcha { - #[serde(rename = "level", skip_serializing_if = "Option::is_none")] - pub level: Option, - /// Site key for your hCaptcha application. Must be set. - #[serde(rename = "site_key", skip_serializing_if = "Option::is_none")] - pub site_key: Option, - /// Secret key for your hCaptcha application. Must be set. - #[serde(rename = "secret_key", skip_serializing_if = "Option::is_none")] - pub secret_key: Option, + #[serde(rename = "level", skip_serializing_if = "Option::is_none")] + pub level: Option, + /// Site key for your hCaptcha application. Must be set. + #[serde(rename = "site_key", skip_serializing_if = "Option::is_none")] + pub site_key: Option, + /// Secret key for your hCaptcha application. Must be set. + #[serde(rename = "secret_key", skip_serializing_if = "Option::is_none")] + pub secret_key: Option, } impl CloudVersionMatchmakerCaptchaHcaptcha { - /// hCpatcha configuration. - pub fn new() -> CloudVersionMatchmakerCaptchaHcaptcha { - CloudVersionMatchmakerCaptchaHcaptcha { - level: None, - site_key: None, - secret_key: None, - } - } + /// hCpatcha configuration. + pub fn new() -> CloudVersionMatchmakerCaptchaHcaptcha { + CloudVersionMatchmakerCaptchaHcaptcha { + level: None, + site_key: None, + secret_key: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_version_matchmaker_captcha_hcaptcha_level.rs b/sdks/api/full/rust/src/models/cloud_version_matchmaker_captcha_hcaptcha_level.rs index 8eb4d54577..42679b8cd0 100644 --- a/sdks/api/full/rust/src/models/cloud_version_matchmaker_captcha_hcaptcha_level.rs +++ b/sdks/api/full/rust/src/models/cloud_version_matchmaker_captcha_hcaptcha_level.rs @@ -4,7 +4,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -13,34 +13,29 @@ /// **Deprecated** How hard a captcha should be. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum CloudVersionMatchmakerCaptchaHcaptchaLevel { - #[serde(rename = "easy")] - Easy, - #[serde(rename = "moderate")] - Moderate, - #[serde(rename = "difficult")] - Difficult, - #[serde(rename = "always_on")] - AlwaysOn, - + #[serde(rename = "easy")] + Easy, + #[serde(rename = "moderate")] + Moderate, + #[serde(rename = "difficult")] + Difficult, + #[serde(rename = "always_on")] + AlwaysOn, } impl ToString for CloudVersionMatchmakerCaptchaHcaptchaLevel { - fn to_string(&self) -> String { - match self { - Self::Easy => String::from("easy"), - Self::Moderate => String::from("moderate"), - Self::Difficult => String::from("difficult"), - Self::AlwaysOn => String::from("always_on"), - } - } + fn to_string(&self) -> String { + match self { + Self::Easy => String::from("easy"), + Self::Moderate => String::from("moderate"), + Self::Difficult => String::from("difficult"), + Self::AlwaysOn => String::from("always_on"), + } + } } impl Default for CloudVersionMatchmakerCaptchaHcaptchaLevel { - fn default() -> CloudVersionMatchmakerCaptchaHcaptchaLevel { - Self::Easy - } + fn default() -> CloudVersionMatchmakerCaptchaHcaptchaLevel { + Self::Easy + } } - - - - diff --git a/sdks/api/full/rust/src/models/cloud_version_matchmaker_captcha_turnstile.rs b/sdks/api/full/rust/src/models/cloud_version_matchmaker_captcha_turnstile.rs index 6c4ff1a0ef..0b46b38fdd 100644 --- a/sdks/api/full/rust/src/models/cloud_version_matchmaker_captcha_turnstile.rs +++ b/sdks/api/full/rust/src/models/cloud_version_matchmaker_captcha_turnstile.rs @@ -4,30 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerCaptchaTurnstile : Turnstile captcha configuration. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerCaptchaTurnstile { - #[serde(rename = "site_key")] - pub site_key: String, - #[serde(rename = "secret_key")] - pub secret_key: String, + #[serde(rename = "site_key")] + pub site_key: String, + #[serde(rename = "secret_key")] + pub secret_key: String, } impl CloudVersionMatchmakerCaptchaTurnstile { - /// Turnstile captcha configuration. - pub fn new(site_key: String, secret_key: String) -> CloudVersionMatchmakerCaptchaTurnstile { - CloudVersionMatchmakerCaptchaTurnstile { - site_key, - secret_key, - } - } + /// Turnstile captcha configuration. + pub fn new(site_key: String, secret_key: String) -> CloudVersionMatchmakerCaptchaTurnstile { + CloudVersionMatchmakerCaptchaTurnstile { + site_key, + secret_key, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode.rs b/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode.rs index 364af82c61..d0dd9d72be 100644 --- a/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode.rs +++ b/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode.rs @@ -4,57 +4,58 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerGameMode : A game mode. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerGameMode { - #[serde(rename = "regions", skip_serializing_if = "Option::is_none")] - pub regions: Option<::std::collections::HashMap>, - #[serde(rename = "max_players", skip_serializing_if = "Option::is_none")] - pub max_players: Option, - #[serde(rename = "max_players_direct", skip_serializing_if = "Option::is_none")] - pub max_players_direct: Option, - #[serde(rename = "max_players_party", skip_serializing_if = "Option::is_none")] - pub max_players_party: Option, - #[serde(rename = "docker", skip_serializing_if = "Option::is_none")] - pub docker: Option>, - #[serde(rename = "listable", skip_serializing_if = "Option::is_none")] - pub listable: Option, - #[serde(rename = "taggable", skip_serializing_if = "Option::is_none")] - pub taggable: Option, - #[serde(rename = "allow_dynamic_max_players", skip_serializing_if = "Option::is_none")] - pub allow_dynamic_max_players: Option, - #[serde(rename = "actions", skip_serializing_if = "Option::is_none")] - pub actions: Option>, - #[serde(rename = "tier", skip_serializing_if = "Option::is_none")] - pub tier: Option, - #[serde(rename = "idle_lobbies", skip_serializing_if = "Option::is_none")] - pub idle_lobbies: Option>, + #[serde(rename = "regions", skip_serializing_if = "Option::is_none")] + pub regions: Option< + ::std::collections::HashMap, + >, + #[serde(rename = "max_players", skip_serializing_if = "Option::is_none")] + pub max_players: Option, + #[serde(rename = "max_players_direct", skip_serializing_if = "Option::is_none")] + pub max_players_direct: Option, + #[serde(rename = "max_players_party", skip_serializing_if = "Option::is_none")] + pub max_players_party: Option, + #[serde(rename = "docker", skip_serializing_if = "Option::is_none")] + pub docker: Option>, + #[serde(rename = "listable", skip_serializing_if = "Option::is_none")] + pub listable: Option, + #[serde(rename = "taggable", skip_serializing_if = "Option::is_none")] + pub taggable: Option, + #[serde( + rename = "allow_dynamic_max_players", + skip_serializing_if = "Option::is_none" + )] + pub allow_dynamic_max_players: Option, + #[serde(rename = "actions", skip_serializing_if = "Option::is_none")] + pub actions: Option>, + #[serde(rename = "tier", skip_serializing_if = "Option::is_none")] + pub tier: Option, + #[serde(rename = "idle_lobbies", skip_serializing_if = "Option::is_none")] + pub idle_lobbies: Option>, } impl CloudVersionMatchmakerGameMode { - /// A game mode. - pub fn new() -> CloudVersionMatchmakerGameMode { - CloudVersionMatchmakerGameMode { - regions: None, - max_players: None, - max_players_direct: None, - max_players_party: None, - docker: None, - listable: None, - taggable: None, - allow_dynamic_max_players: None, - actions: None, - tier: None, - idle_lobbies: None, - } - } + /// A game mode. + pub fn new() -> CloudVersionMatchmakerGameMode { + CloudVersionMatchmakerGameMode { + regions: None, + max_players: None, + max_players_direct: None, + max_players_party: None, + docker: None, + listable: None, + taggable: None, + allow_dynamic_max_players: None, + actions: None, + tier: None, + idle_lobbies: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_actions.rs b/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_actions.rs index cc90980d22..a34b17d1f6 100644 --- a/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_actions.rs +++ b/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_actions.rs @@ -4,33 +4,29 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerGameModeActions : Configuration for the connection types allowed for a game mode. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerGameModeActions { - #[serde(rename = "find", skip_serializing_if = "Option::is_none")] - pub find: Option>, - #[serde(rename = "join", skip_serializing_if = "Option::is_none")] - pub join: Option>, - #[serde(rename = "create", skip_serializing_if = "Option::is_none")] - pub create: Option>, + #[serde(rename = "find", skip_serializing_if = "Option::is_none")] + pub find: Option>, + #[serde(rename = "join", skip_serializing_if = "Option::is_none")] + pub join: Option>, + #[serde(rename = "create", skip_serializing_if = "Option::is_none")] + pub create: Option>, } impl CloudVersionMatchmakerGameModeActions { - /// Configuration for the connection types allowed for a game mode. - pub fn new() -> CloudVersionMatchmakerGameModeActions { - CloudVersionMatchmakerGameModeActions { - find: None, - join: None, - create: None, - } - } + /// Configuration for the connection types allowed for a game mode. + pub fn new() -> CloudVersionMatchmakerGameModeActions { + CloudVersionMatchmakerGameModeActions { + find: None, + join: None, + create: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_create_config.rs b/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_create_config.rs index 0b558c7812..d7c4a14172 100644 --- a/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_create_config.rs +++ b/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_create_config.rs @@ -4,46 +4,49 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerGameModeCreateConfig : Configures the requirements and authentication for the /create endpoint. If this value is not set in the config, the /create endpoint is NOT enabled. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerGameModeCreateConfig { - /// Sets whether or not the /create endpoint is enabled. - #[serde(rename = "enabled")] - pub enabled: bool, - #[serde(rename = "identity_requirement", skip_serializing_if = "Option::is_none")] - pub identity_requirement: Option, - #[serde(rename = "verification", skip_serializing_if = "Option::is_none")] - pub verification: Option>, - /// Defaults to false when unset. - #[serde(rename = "enable_public", skip_serializing_if = "Option::is_none")] - pub enable_public: Option, - /// Defaults to true when unset. - #[serde(rename = "enable_private", skip_serializing_if = "Option::is_none")] - pub enable_private: Option, - /// **Deprecated** - #[serde(rename = "max_lobbies_per_identity", skip_serializing_if = "Option::is_none")] - pub max_lobbies_per_identity: Option, + /// Sets whether or not the /create endpoint is enabled. + #[serde(rename = "enabled")] + pub enabled: bool, + #[serde( + rename = "identity_requirement", + skip_serializing_if = "Option::is_none" + )] + pub identity_requirement: + Option, + #[serde(rename = "verification", skip_serializing_if = "Option::is_none")] + pub verification: Option>, + /// Defaults to false when unset. + #[serde(rename = "enable_public", skip_serializing_if = "Option::is_none")] + pub enable_public: Option, + /// Defaults to true when unset. + #[serde(rename = "enable_private", skip_serializing_if = "Option::is_none")] + pub enable_private: Option, + /// **Deprecated** + #[serde( + rename = "max_lobbies_per_identity", + skip_serializing_if = "Option::is_none" + )] + pub max_lobbies_per_identity: Option, } impl CloudVersionMatchmakerGameModeCreateConfig { - /// Configures the requirements and authentication for the /create endpoint. If this value is not set in the config, the /create endpoint is NOT enabled. - pub fn new(enabled: bool) -> CloudVersionMatchmakerGameModeCreateConfig { - CloudVersionMatchmakerGameModeCreateConfig { - enabled, - identity_requirement: None, - verification: None, - enable_public: None, - enable_private: None, - max_lobbies_per_identity: None, - } - } + /// Configures the requirements and authentication for the /create endpoint. If this value is not set in the config, the /create endpoint is NOT enabled. + pub fn new(enabled: bool) -> CloudVersionMatchmakerGameModeCreateConfig { + CloudVersionMatchmakerGameModeCreateConfig { + enabled, + identity_requirement: None, + verification: None, + enable_public: None, + enable_private: None, + max_lobbies_per_identity: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_find_config.rs b/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_find_config.rs index 93bbfc3fcf..983711b3e0 100644 --- a/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_find_config.rs +++ b/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_find_config.rs @@ -4,34 +4,34 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerGameModeFindConfig : Configures the requirements and authentication for the /find endpoint. If this value is not set in the config, the /find endpoint is still enabled. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerGameModeFindConfig { - /// Sets whether or not the /find endpoint is enabled. - #[serde(rename = "enabled")] - pub enabled: bool, - #[serde(rename = "identity_requirement", skip_serializing_if = "Option::is_none")] - pub identity_requirement: Option, - #[serde(rename = "verification", skip_serializing_if = "Option::is_none")] - pub verification: Option>, + /// Sets whether or not the /find endpoint is enabled. + #[serde(rename = "enabled")] + pub enabled: bool, + #[serde( + rename = "identity_requirement", + skip_serializing_if = "Option::is_none" + )] + pub identity_requirement: + Option, + #[serde(rename = "verification", skip_serializing_if = "Option::is_none")] + pub verification: Option>, } impl CloudVersionMatchmakerGameModeFindConfig { - /// Configures the requirements and authentication for the /find endpoint. If this value is not set in the config, the /find endpoint is still enabled. - pub fn new(enabled: bool) -> CloudVersionMatchmakerGameModeFindConfig { - CloudVersionMatchmakerGameModeFindConfig { - enabled, - identity_requirement: None, - verification: None, - } - } + /// Configures the requirements and authentication for the /find endpoint. If this value is not set in the config, the /find endpoint is still enabled. + pub fn new(enabled: bool) -> CloudVersionMatchmakerGameModeFindConfig { + CloudVersionMatchmakerGameModeFindConfig { + enabled, + identity_requirement: None, + verification: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_identity_requirement.rs b/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_identity_requirement.rs index e72e5b25a9..230ae04efa 100644 --- a/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_identity_requirement.rs +++ b/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_identity_requirement.rs @@ -4,7 +4,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -13,31 +13,26 @@ /// **Deprecated** The registration requirement for a user when joining/finding/creating a lobby. \"None\" allows for connections without an identity. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum CloudVersionMatchmakerGameModeIdentityRequirement { - #[serde(rename = "none")] - None, - #[serde(rename = "guest")] - Guest, - #[serde(rename = "registered")] - Registered, - + #[serde(rename = "none")] + None, + #[serde(rename = "guest")] + Guest, + #[serde(rename = "registered")] + Registered, } impl ToString for CloudVersionMatchmakerGameModeIdentityRequirement { - fn to_string(&self) -> String { - match self { - Self::None => String::from("none"), - Self::Guest => String::from("guest"), - Self::Registered => String::from("registered"), - } - } + fn to_string(&self) -> String { + match self { + Self::None => String::from("none"), + Self::Guest => String::from("guest"), + Self::Registered => String::from("registered"), + } + } } impl Default for CloudVersionMatchmakerGameModeIdentityRequirement { - fn default() -> CloudVersionMatchmakerGameModeIdentityRequirement { - Self::None - } + fn default() -> CloudVersionMatchmakerGameModeIdentityRequirement { + Self::None + } } - - - - diff --git a/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_idle_lobbies_config.rs b/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_idle_lobbies_config.rs index 1ffe4c3628..b3f7ba1f6e 100644 --- a/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_idle_lobbies_config.rs +++ b/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_idle_lobbies_config.rs @@ -4,30 +4,23 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerGameModeIdleLobbiesConfig : Configuration for how many idle lobbies a game version should have. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerGameModeIdleLobbiesConfig { - #[serde(rename = "min")] - pub min: i32, - #[serde(rename = "max")] - pub max: i32, + #[serde(rename = "min")] + pub min: i32, + #[serde(rename = "max")] + pub max: i32, } impl CloudVersionMatchmakerGameModeIdleLobbiesConfig { - /// Configuration for how many idle lobbies a game version should have. - pub fn new(min: i32, max: i32) -> CloudVersionMatchmakerGameModeIdleLobbiesConfig { - CloudVersionMatchmakerGameModeIdleLobbiesConfig { - min, - max, - } - } + /// Configuration for how many idle lobbies a game version should have. + pub fn new(min: i32, max: i32) -> CloudVersionMatchmakerGameModeIdleLobbiesConfig { + CloudVersionMatchmakerGameModeIdleLobbiesConfig { min, max } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_join_config.rs b/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_join_config.rs index 471835d937..59c3612561 100644 --- a/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_join_config.rs +++ b/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_join_config.rs @@ -4,34 +4,34 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerGameModeJoinConfig : Configures the requirements and authentication for the /join endpoint. If this value is not set in the config, the /join endpoint is still enabled. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerGameModeJoinConfig { - /// Sets whether or not the /join endpoint is enabled. - #[serde(rename = "enabled")] - pub enabled: bool, - #[serde(rename = "identity_requirement", skip_serializing_if = "Option::is_none")] - pub identity_requirement: Option, - #[serde(rename = "verification", skip_serializing_if = "Option::is_none")] - pub verification: Option>, + /// Sets whether or not the /join endpoint is enabled. + #[serde(rename = "enabled")] + pub enabled: bool, + #[serde( + rename = "identity_requirement", + skip_serializing_if = "Option::is_none" + )] + pub identity_requirement: + Option, + #[serde(rename = "verification", skip_serializing_if = "Option::is_none")] + pub verification: Option>, } impl CloudVersionMatchmakerGameModeJoinConfig { - /// Configures the requirements and authentication for the /join endpoint. If this value is not set in the config, the /join endpoint is still enabled. - pub fn new(enabled: bool) -> CloudVersionMatchmakerGameModeJoinConfig { - CloudVersionMatchmakerGameModeJoinConfig { - enabled, - identity_requirement: None, - verification: None, - } - } + /// Configures the requirements and authentication for the /join endpoint. If this value is not set in the config, the /join endpoint is still enabled. + pub fn new(enabled: bool) -> CloudVersionMatchmakerGameModeJoinConfig { + CloudVersionMatchmakerGameModeJoinConfig { + enabled, + identity_requirement: None, + verification: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_region.rs b/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_region.rs index 322d4055b9..5332c34c28 100644 --- a/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_region.rs +++ b/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_region.rs @@ -4,30 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerGameModeRegion : A game mode region. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerGameModeRegion { - #[serde(rename = "tier", skip_serializing_if = "Option::is_none")] - pub tier: Option, - #[serde(rename = "idle_lobbies", skip_serializing_if = "Option::is_none")] - pub idle_lobbies: Option>, + #[serde(rename = "tier", skip_serializing_if = "Option::is_none")] + pub tier: Option, + #[serde(rename = "idle_lobbies", skip_serializing_if = "Option::is_none")] + pub idle_lobbies: Option>, } impl CloudVersionMatchmakerGameModeRegion { - /// A game mode region. - pub fn new() -> CloudVersionMatchmakerGameModeRegion { - CloudVersionMatchmakerGameModeRegion { - tier: None, - idle_lobbies: None, - } - } + /// A game mode region. + pub fn new() -> CloudVersionMatchmakerGameModeRegion { + CloudVersionMatchmakerGameModeRegion { + tier: None, + idle_lobbies: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_runtime_docker.rs b/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_runtime_docker.rs index 8fd8ae844c..0bcd9592dd 100644 --- a/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_runtime_docker.rs +++ b/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_runtime_docker.rs @@ -4,51 +4,52 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerGameModeRuntimeDocker : A game mode runtime running through Docker. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerGameModeRuntimeDocker { - /// _Configures Rivet CLI behavior. Has no effect on server behavior._ - #[serde(rename = "dockerfile", skip_serializing_if = "Option::is_none")] - pub dockerfile: Option, - /// _Configures Rivet CLI behavior. Has no effect on server behavior._ - #[serde(rename = "build_args", skip_serializing_if = "Option::is_none")] - pub build_args: Option<::std::collections::HashMap>, - /// _Configures Rivet CLI behavior. Has no effect on server behavior._ - #[serde(rename = "image", skip_serializing_if = "Option::is_none")] - pub image: Option, - #[serde(rename = "image_id", skip_serializing_if = "Option::is_none")] - pub image_id: Option, - #[serde(rename = "args", skip_serializing_if = "Option::is_none")] - pub args: Option>, - #[serde(rename = "env", skip_serializing_if = "Option::is_none")] - pub env: 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>, + /// _Configures Rivet CLI behavior. Has no effect on server behavior._ + #[serde(rename = "dockerfile", skip_serializing_if = "Option::is_none")] + pub dockerfile: Option, + /// _Configures Rivet CLI behavior. Has no effect on server behavior._ + #[serde(rename = "build_args", skip_serializing_if = "Option::is_none")] + pub build_args: Option<::std::collections::HashMap>, + /// _Configures Rivet CLI behavior. Has no effect on server behavior._ + #[serde(rename = "image", skip_serializing_if = "Option::is_none")] + pub image: Option, + #[serde(rename = "image_id", skip_serializing_if = "Option::is_none")] + pub image_id: Option, + #[serde(rename = "args", skip_serializing_if = "Option::is_none")] + pub args: Option>, + #[serde(rename = "env", skip_serializing_if = "Option::is_none")] + pub env: 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< + String, + crate::models::CloudVersionMatchmakerGameModeRuntimeDockerPort, + >, + >, } impl CloudVersionMatchmakerGameModeRuntimeDocker { - /// A game mode runtime running through Docker. - pub fn new() -> CloudVersionMatchmakerGameModeRuntimeDocker { - CloudVersionMatchmakerGameModeRuntimeDocker { - dockerfile: None, - build_args: None, - image: None, - image_id: None, - args: None, - env: None, - network_mode: None, - ports: None, - } - } + /// A game mode runtime running through Docker. + pub fn new() -> CloudVersionMatchmakerGameModeRuntimeDocker { + CloudVersionMatchmakerGameModeRuntimeDocker { + dockerfile: None, + build_args: None, + image: None, + image_id: None, + args: None, + env: None, + network_mode: None, + ports: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_runtime_docker_port.rs b/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_runtime_docker_port.rs index 4931a0e5a0..675922befa 100644 --- a/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_runtime_docker_port.rs +++ b/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_runtime_docker_port.rs @@ -4,47 +4,43 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerGameModeRuntimeDockerPort : Port config for a docker build. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerGameModeRuntimeDockerPort { - /// The port number to connect to. ### Related - cloud.version.matchmaker.PortProtocol - cloud.version.matchmaker.ProxyKind - #[serde(rename = "port", skip_serializing_if = "Option::is_none")] - pub port: Option, - #[serde(rename = "port_range", skip_serializing_if = "Option::is_none")] - pub port_range: Option>, - #[serde(rename = "protocol", skip_serializing_if = "Option::is_none")] - pub protocol: Option, - #[serde(rename = "proxy", skip_serializing_if = "Option::is_none")] - pub proxy: Option, - /// _Configures Rivet CLI behavior. Has no effect on server behavior._ - #[serde(rename = "dev_port", skip_serializing_if = "Option::is_none")] - pub dev_port: Option, - #[serde(rename = "dev_port_range", skip_serializing_if = "Option::is_none")] - pub dev_port_range: Option>, - #[serde(rename = "dev_protocol", skip_serializing_if = "Option::is_none")] - pub dev_protocol: Option, + /// The port number to connect to. ### Related - cloud.version.matchmaker.PortProtocol - cloud.version.matchmaker.ProxyKind + #[serde(rename = "port", skip_serializing_if = "Option::is_none")] + pub port: Option, + #[serde(rename = "port_range", skip_serializing_if = "Option::is_none")] + pub port_range: Option>, + #[serde(rename = "protocol", skip_serializing_if = "Option::is_none")] + pub protocol: Option, + #[serde(rename = "proxy", skip_serializing_if = "Option::is_none")] + pub proxy: Option, + /// _Configures Rivet CLI behavior. Has no effect on server behavior._ + #[serde(rename = "dev_port", skip_serializing_if = "Option::is_none")] + pub dev_port: Option, + #[serde(rename = "dev_port_range", skip_serializing_if = "Option::is_none")] + pub dev_port_range: Option>, + #[serde(rename = "dev_protocol", skip_serializing_if = "Option::is_none")] + pub dev_protocol: Option, } impl CloudVersionMatchmakerGameModeRuntimeDockerPort { - /// Port config for a docker build. - pub fn new() -> CloudVersionMatchmakerGameModeRuntimeDockerPort { - CloudVersionMatchmakerGameModeRuntimeDockerPort { - port: None, - port_range: None, - protocol: None, - proxy: None, - dev_port: None, - dev_port_range: None, - dev_protocol: None, - } - } + /// Port config for a docker build. + pub fn new() -> CloudVersionMatchmakerGameModeRuntimeDockerPort { + CloudVersionMatchmakerGameModeRuntimeDockerPort { + port: None, + port_range: None, + protocol: None, + proxy: None, + dev_port: None, + dev_port_range: None, + dev_protocol: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_verification_config.rs b/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_verification_config.rs index 8c83f15430..df407cf4d6 100644 --- a/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_verification_config.rs +++ b/sdks/api/full/rust/src/models/cloud_version_matchmaker_game_mode_verification_config.rs @@ -4,30 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerGameModeVerificationConfig : Configuration that tells Rivet where to send validation requests and with what headers. When set, Rivet will send the `verification_data` property (given by the user in the find/join/create endpoint) to the given url along with the headers provided and some information about the requested lobby. The response of this request will determine if the user can join that lobby or not. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerGameModeVerificationConfig { - #[serde(rename = "url")] - pub url: String, - #[serde(rename = "headers")] - pub headers: ::std::collections::HashMap, + #[serde(rename = "url")] + pub url: String, + #[serde(rename = "headers")] + pub headers: ::std::collections::HashMap, } impl CloudVersionMatchmakerGameModeVerificationConfig { - /// Configuration that tells Rivet where to send validation requests and with what headers. When set, Rivet will send the `verification_data` property (given by the user in the find/join/create endpoint) to the given url along with the headers provided and some information about the requested lobby. The response of this request will determine if the user can join that lobby or not. - pub fn new(url: String, headers: ::std::collections::HashMap) -> CloudVersionMatchmakerGameModeVerificationConfig { - CloudVersionMatchmakerGameModeVerificationConfig { - url, - headers, - } - } + /// Configuration that tells Rivet where to send validation requests and with what headers. When set, Rivet will send the `verification_data` property (given by the user in the find/join/create endpoint) to the given url along with the headers provided and some information about the requested lobby. The response of this request will determine if the user can join that lobby or not. + pub fn new( + url: String, + headers: ::std::collections::HashMap, + ) -> CloudVersionMatchmakerGameModeVerificationConfig { + CloudVersionMatchmakerGameModeVerificationConfig { url, headers } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_version_matchmaker_lobby_group.rs b/sdks/api/full/rust/src/models/cloud_version_matchmaker_lobby_group.rs index 12a7311557..652e4092bc 100644 --- a/sdks/api/full/rust/src/models/cloud_version_matchmaker_lobby_group.rs +++ b/sdks/api/full/rust/src/models/cloud_version_matchmaker_lobby_group.rs @@ -4,47 +4,50 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerLobbyGroup : A game mode. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerLobbyGroup { - /// **Deprecated: use GameMode instead** A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. - #[serde(rename = "name_id")] - pub name_id: String, - /// A list of game mode regions. - #[serde(rename = "regions")] - pub regions: Vec, - /// Unsigned 32 bit integer. - #[serde(rename = "max_players_normal")] - pub max_players_normal: i32, - /// Unsigned 32 bit integer. - #[serde(rename = "max_players_direct")] - pub max_players_direct: i32, - /// Unsigned 32 bit integer. - #[serde(rename = "max_players_party")] - pub max_players_party: i32, - #[serde(rename = "runtime")] - pub runtime: Box, + /// **Deprecated: use GameMode instead** A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. + #[serde(rename = "name_id")] + pub name_id: String, + /// A list of game mode regions. + #[serde(rename = "regions")] + pub regions: Vec, + /// Unsigned 32 bit integer. + #[serde(rename = "max_players_normal")] + pub max_players_normal: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "max_players_direct")] + pub max_players_direct: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "max_players_party")] + pub max_players_party: i32, + #[serde(rename = "runtime")] + pub runtime: Box, } impl CloudVersionMatchmakerLobbyGroup { - /// A game mode. - pub fn new(name_id: String, regions: Vec, max_players_normal: i32, max_players_direct: i32, max_players_party: i32, runtime: crate::models::CloudVersionMatchmakerLobbyGroupRuntime) -> CloudVersionMatchmakerLobbyGroup { - CloudVersionMatchmakerLobbyGroup { - name_id, - regions, - max_players_normal, - max_players_direct, - max_players_party, - runtime: Box::new(runtime), - } - } + /// A game mode. + pub fn new( + name_id: String, + regions: Vec, + max_players_normal: i32, + max_players_direct: i32, + max_players_party: i32, + runtime: crate::models::CloudVersionMatchmakerLobbyGroupRuntime, + ) -> CloudVersionMatchmakerLobbyGroup { + CloudVersionMatchmakerLobbyGroup { + name_id, + regions, + max_players_normal, + max_players_direct, + max_players_party, + runtime: Box::new(runtime), + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_version_matchmaker_lobby_group_idle_lobbies_config.rs b/sdks/api/full/rust/src/models/cloud_version_matchmaker_lobby_group_idle_lobbies_config.rs index d9fc5bfe74..6bf28b8da7 100644 --- a/sdks/api/full/rust/src/models/cloud_version_matchmaker_lobby_group_idle_lobbies_config.rs +++ b/sdks/api/full/rust/src/models/cloud_version_matchmaker_lobby_group_idle_lobbies_config.rs @@ -4,32 +4,31 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerLobbyGroupIdleLobbiesConfig : **Deprecated: use GameMode instead** Configuration for how many idle lobbies a game version should have. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerLobbyGroupIdleLobbiesConfig { - /// Unsigned 32 bit integer. - #[serde(rename = "min_idle_lobbies")] - pub min_idle_lobbies: i32, - /// Unsigned 32 bit integer. - #[serde(rename = "max_idle_lobbies")] - pub max_idle_lobbies: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "min_idle_lobbies")] + pub min_idle_lobbies: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "max_idle_lobbies")] + pub max_idle_lobbies: i32, } impl CloudVersionMatchmakerLobbyGroupIdleLobbiesConfig { - /// **Deprecated: use GameMode instead** Configuration for how many idle lobbies a game version should have. - pub fn new(min_idle_lobbies: i32, max_idle_lobbies: i32) -> CloudVersionMatchmakerLobbyGroupIdleLobbiesConfig { - CloudVersionMatchmakerLobbyGroupIdleLobbiesConfig { - min_idle_lobbies, - max_idle_lobbies, - } - } + /// **Deprecated: use GameMode instead** Configuration for how many idle lobbies a game version should have. + pub fn new( + min_idle_lobbies: i32, + max_idle_lobbies: i32, + ) -> CloudVersionMatchmakerLobbyGroupIdleLobbiesConfig { + CloudVersionMatchmakerLobbyGroupIdleLobbiesConfig { + min_idle_lobbies, + max_idle_lobbies, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_version_matchmaker_lobby_group_region.rs b/sdks/api/full/rust/src/models/cloud_version_matchmaker_lobby_group_region.rs index e364dcd095..153896744b 100644 --- a/sdks/api/full/rust/src/models/cloud_version_matchmaker_lobby_group_region.rs +++ b/sdks/api/full/rust/src/models/cloud_version_matchmaker_lobby_group_region.rs @@ -4,34 +4,33 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerLobbyGroupRegion : **Deprecated: use GameMode instead** A game mode region. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerLobbyGroupRegion { - #[serde(rename = "region_id")] - pub region_id: uuid::Uuid, - /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. - #[serde(rename = "tier_name_id")] - pub tier_name_id: String, - #[serde(rename = "idle_lobbies", skip_serializing_if = "Option::is_none")] - pub idle_lobbies: Option>, + #[serde(rename = "region_id")] + pub region_id: uuid::Uuid, + /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. + #[serde(rename = "tier_name_id")] + pub tier_name_id: String, + #[serde(rename = "idle_lobbies", skip_serializing_if = "Option::is_none")] + pub idle_lobbies: Option>, } impl CloudVersionMatchmakerLobbyGroupRegion { - /// **Deprecated: use GameMode instead** A game mode region. - pub fn new(region_id: uuid::Uuid, tier_name_id: String) -> CloudVersionMatchmakerLobbyGroupRegion { - CloudVersionMatchmakerLobbyGroupRegion { - region_id, - tier_name_id, - idle_lobbies: None, - } - } + /// **Deprecated: use GameMode instead** A game mode region. + pub fn new( + region_id: uuid::Uuid, + tier_name_id: String, + ) -> CloudVersionMatchmakerLobbyGroupRegion { + CloudVersionMatchmakerLobbyGroupRegion { + region_id, + tier_name_id, + idle_lobbies: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_version_matchmaker_lobby_group_runtime.rs b/sdks/api/full/rust/src/models/cloud_version_matchmaker_lobby_group_runtime.rs index 1c6df44b6c..c8c5d51a73 100644 --- a/sdks/api/full/rust/src/models/cloud_version_matchmaker_lobby_group_runtime.rs +++ b/sdks/api/full/rust/src/models/cloud_version_matchmaker_lobby_group_runtime.rs @@ -4,27 +4,21 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerLobbyGroupRuntime : **Deprecated: use GameMode instead** A union representing the runtime a game mode runs on. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerLobbyGroupRuntime { - #[serde(rename = "docker", skip_serializing_if = "Option::is_none")] - pub docker: Option>, + #[serde(rename = "docker", skip_serializing_if = "Option::is_none")] + pub docker: Option>, } impl CloudVersionMatchmakerLobbyGroupRuntime { - /// **Deprecated: use GameMode instead** A union representing the runtime a game mode runs on. - pub fn new() -> CloudVersionMatchmakerLobbyGroupRuntime { - CloudVersionMatchmakerLobbyGroupRuntime { - docker: None, - } - } + /// **Deprecated: use GameMode instead** A union representing the runtime a game mode runs on. + pub fn new() -> CloudVersionMatchmakerLobbyGroupRuntime { + CloudVersionMatchmakerLobbyGroupRuntime { docker: None } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_version_matchmaker_lobby_group_runtime_docker.rs b/sdks/api/full/rust/src/models/cloud_version_matchmaker_lobby_group_runtime_docker.rs index 43ce4a204a..4f3c4b8e5a 100644 --- a/sdks/api/full/rust/src/models/cloud_version_matchmaker_lobby_group_runtime_docker.rs +++ b/sdks/api/full/rust/src/models/cloud_version_matchmaker_lobby_group_runtime_docker.rs @@ -4,39 +4,39 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerLobbyGroupRuntimeDocker : **Deprecated: use GameMode instead** A game mode runtime running through Docker. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerLobbyGroupRuntimeDocker { - #[serde(rename = "build_id", skip_serializing_if = "Option::is_none")] - pub build_id: Option, - #[serde(rename = "args")] - pub args: Vec, - #[serde(rename = "env_vars")] - pub env_vars: Vec, - #[serde(rename = "network_mode", skip_serializing_if = "Option::is_none")] - pub network_mode: Option, - #[serde(rename = "ports")] - pub ports: Vec, + #[serde(rename = "build_id", skip_serializing_if = "Option::is_none")] + pub build_id: Option, + #[serde(rename = "args")] + pub args: Vec, + #[serde(rename = "env_vars")] + pub env_vars: Vec, + #[serde(rename = "network_mode", skip_serializing_if = "Option::is_none")] + pub network_mode: Option, + #[serde(rename = "ports")] + pub ports: Vec, } impl CloudVersionMatchmakerLobbyGroupRuntimeDocker { - /// **Deprecated: use GameMode instead** A game mode runtime running through Docker. - pub fn new(args: Vec, env_vars: Vec, ports: Vec) -> CloudVersionMatchmakerLobbyGroupRuntimeDocker { - CloudVersionMatchmakerLobbyGroupRuntimeDocker { - build_id: None, - args, - env_vars, - network_mode: None, - ports, - } - } + /// **Deprecated: use GameMode instead** A game mode runtime running through Docker. + pub fn new( + args: Vec, + env_vars: Vec, + ports: Vec, + ) -> CloudVersionMatchmakerLobbyGroupRuntimeDocker { + CloudVersionMatchmakerLobbyGroupRuntimeDocker { + build_id: None, + args, + env_vars, + network_mode: None, + ports, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_version_matchmaker_lobby_group_runtime_docker_env_var.rs b/sdks/api/full/rust/src/models/cloud_version_matchmaker_lobby_group_runtime_docker_env_var.rs index 7deb9e1a6e..3c7c8a6d0e 100644 --- a/sdks/api/full/rust/src/models/cloud_version_matchmaker_lobby_group_runtime_docker_env_var.rs +++ b/sdks/api/full/rust/src/models/cloud_version_matchmaker_lobby_group_runtime_docker_env_var.rs @@ -4,30 +4,23 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerLobbyGroupRuntimeDockerEnvVar : **Deprecated: use GameMode instead** A docker environment variable. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerLobbyGroupRuntimeDockerEnvVar { - #[serde(rename = "key")] - pub key: String, - #[serde(rename = "value")] - pub value: String, + #[serde(rename = "key")] + pub key: String, + #[serde(rename = "value")] + pub value: String, } impl CloudVersionMatchmakerLobbyGroupRuntimeDockerEnvVar { - /// **Deprecated: use GameMode instead** A docker environment variable. - pub fn new(key: String, value: String) -> CloudVersionMatchmakerLobbyGroupRuntimeDockerEnvVar { - CloudVersionMatchmakerLobbyGroupRuntimeDockerEnvVar { - key, - value, - } - } + /// **Deprecated: use GameMode instead** A docker environment variable. + pub fn new(key: String, value: String) -> CloudVersionMatchmakerLobbyGroupRuntimeDockerEnvVar { + CloudVersionMatchmakerLobbyGroupRuntimeDockerEnvVar { key, value } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_version_matchmaker_lobby_group_runtime_docker_port.rs b/sdks/api/full/rust/src/models/cloud_version_matchmaker_lobby_group_runtime_docker_port.rs index 603ec67700..83f9b46210 100644 --- a/sdks/api/full/rust/src/models/cloud_version_matchmaker_lobby_group_runtime_docker_port.rs +++ b/sdks/api/full/rust/src/models/cloud_version_matchmaker_lobby_group_runtime_docker_port.rs @@ -4,38 +4,37 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerLobbyGroupRuntimeDockerPort : **Deprecated: use GameMode instead** A docker port. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerLobbyGroupRuntimeDockerPort { - /// The label of this docker port. - #[serde(rename = "label")] - pub label: String, - /// The port number to connect to. - #[serde(rename = "target_port", skip_serializing_if = "Option::is_none")] - pub target_port: Option, - #[serde(rename = "port_range", skip_serializing_if = "Option::is_none")] - pub port_range: Option>, - #[serde(rename = "proxy_protocol")] - pub proxy_protocol: crate::models::CloudVersionMatchmakerPortProtocol, + /// The label of this docker port. + #[serde(rename = "label")] + pub label: String, + /// The port number to connect to. + #[serde(rename = "target_port", skip_serializing_if = "Option::is_none")] + pub target_port: Option, + #[serde(rename = "port_range", skip_serializing_if = "Option::is_none")] + pub port_range: Option>, + #[serde(rename = "proxy_protocol")] + pub proxy_protocol: crate::models::CloudVersionMatchmakerPortProtocol, } impl CloudVersionMatchmakerLobbyGroupRuntimeDockerPort { - /// **Deprecated: use GameMode instead** A docker port. - pub fn new(label: String, proxy_protocol: crate::models::CloudVersionMatchmakerPortProtocol) -> CloudVersionMatchmakerLobbyGroupRuntimeDockerPort { - CloudVersionMatchmakerLobbyGroupRuntimeDockerPort { - label, - target_port: None, - port_range: None, - proxy_protocol, - } - } + /// **Deprecated: use GameMode instead** A docker port. + pub fn new( + label: String, + proxy_protocol: crate::models::CloudVersionMatchmakerPortProtocol, + ) -> CloudVersionMatchmakerLobbyGroupRuntimeDockerPort { + CloudVersionMatchmakerLobbyGroupRuntimeDockerPort { + label, + target_port: None, + port_range: None, + proxy_protocol, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_version_matchmaker_matchmaker_config.rs b/sdks/api/full/rust/src/models/cloud_version_matchmaker_matchmaker_config.rs index 45a853fe0d..09dc01b099 100644 --- a/sdks/api/full/rust/src/models/cloud_version_matchmaker_matchmaker_config.rs +++ b/sdks/api/full/rust/src/models/cloud_version_matchmaker_matchmaker_config.rs @@ -4,60 +4,59 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerMatchmakerConfig : Matchmaker configuration for a given version. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerMatchmakerConfig { - /// A list of game modes. - #[serde(rename = "game_modes", skip_serializing_if = "Option::is_none")] - pub game_modes: Option<::std::collections::HashMap>, - #[serde(rename = "captcha", skip_serializing_if = "Option::is_none")] - pub captcha: Option>, - /// _Configures Rivet CLI behavior. Has no effect on server behavior._ - #[serde(rename = "dev_hostname", skip_serializing_if = "Option::is_none")] - pub dev_hostname: Option, - #[serde(rename = "regions", skip_serializing_if = "Option::is_none")] - pub regions: Option<::std::collections::HashMap>, - #[serde(rename = "max_players", skip_serializing_if = "Option::is_none")] - pub max_players: Option, - #[serde(rename = "max_players_direct", skip_serializing_if = "Option::is_none")] - pub max_players_direct: Option, - #[serde(rename = "max_players_party", skip_serializing_if = "Option::is_none")] - pub max_players_party: Option, - #[serde(rename = "docker", skip_serializing_if = "Option::is_none")] - pub docker: Option>, - #[serde(rename = "tier", skip_serializing_if = "Option::is_none")] - pub tier: Option, - #[serde(rename = "idle_lobbies", skip_serializing_if = "Option::is_none")] - pub idle_lobbies: Option>, - /// **Deprecated: use `game_modes` instead** A list of game modes. - #[serde(rename = "lobby_groups", skip_serializing_if = "Option::is_none")] - pub lobby_groups: Option>, + /// A list of game modes. + #[serde(rename = "game_modes", skip_serializing_if = "Option::is_none")] + pub game_modes: + Option<::std::collections::HashMap>, + #[serde(rename = "captcha", skip_serializing_if = "Option::is_none")] + pub captcha: Option>, + /// _Configures Rivet CLI behavior. Has no effect on server behavior._ + #[serde(rename = "dev_hostname", skip_serializing_if = "Option::is_none")] + pub dev_hostname: Option, + #[serde(rename = "regions", skip_serializing_if = "Option::is_none")] + pub regions: Option< + ::std::collections::HashMap, + >, + #[serde(rename = "max_players", skip_serializing_if = "Option::is_none")] + pub max_players: Option, + #[serde(rename = "max_players_direct", skip_serializing_if = "Option::is_none")] + pub max_players_direct: Option, + #[serde(rename = "max_players_party", skip_serializing_if = "Option::is_none")] + pub max_players_party: Option, + #[serde(rename = "docker", skip_serializing_if = "Option::is_none")] + pub docker: Option>, + #[serde(rename = "tier", skip_serializing_if = "Option::is_none")] + pub tier: Option, + #[serde(rename = "idle_lobbies", skip_serializing_if = "Option::is_none")] + pub idle_lobbies: Option>, + /// **Deprecated: use `game_modes` instead** A list of game modes. + #[serde(rename = "lobby_groups", skip_serializing_if = "Option::is_none")] + pub lobby_groups: Option>, } impl CloudVersionMatchmakerMatchmakerConfig { - /// Matchmaker configuration for a given version. - pub fn new() -> CloudVersionMatchmakerMatchmakerConfig { - CloudVersionMatchmakerMatchmakerConfig { - game_modes: None, - captcha: None, - dev_hostname: None, - regions: None, - max_players: None, - max_players_direct: None, - max_players_party: None, - docker: None, - tier: None, - idle_lobbies: None, - lobby_groups: None, - } - } + /// Matchmaker configuration for a given version. + pub fn new() -> CloudVersionMatchmakerMatchmakerConfig { + CloudVersionMatchmakerMatchmakerConfig { + game_modes: None, + captcha: None, + dev_hostname: None, + regions: None, + max_players: None, + max_players_direct: None, + max_players_party: None, + docker: None, + tier: None, + idle_lobbies: None, + lobby_groups: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_version_matchmaker_network_mode.rs b/sdks/api/full/rust/src/models/cloud_version_matchmaker_network_mode.rs index 01ac9c3c9e..9622bea2bd 100644 --- a/sdks/api/full/rust/src/models/cloud_version_matchmaker_network_mode.rs +++ b/sdks/api/full/rust/src/models/cloud_version_matchmaker_network_mode.rs @@ -4,7 +4,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -13,28 +13,23 @@ /// Configures how the container's network is isolated from the host. `bridge` (default) networking isolates the container's network from the host & other containers. `host` networking removes isolation between the container and the host. Only available in Rivet Open Source & Enterprise. Read more about bridge vs host networking [here](https://rivet.gg/docs/dynamic-servers/concepts/host-bridge-networking). #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum CloudVersionMatchmakerNetworkMode { - #[serde(rename = "bridge")] - Bridge, - #[serde(rename = "host")] - Host, - + #[serde(rename = "bridge")] + Bridge, + #[serde(rename = "host")] + Host, } impl ToString for CloudVersionMatchmakerNetworkMode { - fn to_string(&self) -> String { - match self { - Self::Bridge => String::from("bridge"), - Self::Host => String::from("host"), - } - } + fn to_string(&self) -> String { + match self { + Self::Bridge => String::from("bridge"), + Self::Host => String::from("host"), + } + } } impl Default for CloudVersionMatchmakerNetworkMode { - fn default() -> CloudVersionMatchmakerNetworkMode { - Self::Bridge - } + fn default() -> CloudVersionMatchmakerNetworkMode { + Self::Bridge + } } - - - - diff --git a/sdks/api/full/rust/src/models/cloud_version_matchmaker_port_protocol.rs b/sdks/api/full/rust/src/models/cloud_version_matchmaker_port_protocol.rs index 50d9809f63..c051284dec 100644 --- a/sdks/api/full/rust/src/models/cloud_version_matchmaker_port_protocol.rs +++ b/sdks/api/full/rust/src/models/cloud_version_matchmaker_port_protocol.rs @@ -4,7 +4,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -13,37 +13,32 @@ /// Signifies the protocol of the port. Note that when proxying through GameGuard (via `ProxyKind`), the port number returned by `/find`, `/join`, and `/create` will not be the same as the port number configured in the config: - With HTTP, the port will always be 80. The hostname of the port correctly routes the incoming connection to the correct port being used by the game server. - With HTTPS, the port will always be 443. The hostname of the port correctly routes the incoming connection to the correct port being used by the game server. - Using TCP/UDP, the port will be a random number between 26000 and 31999. This gets automatically routed to the correct port being used by the game server. ### Related - cloud.version.matchmaker.GameModeRuntimeDockerPort - cloud.version.matchmaker.ProxyKind - /docs/dynamic-servers/concepts/game-guard - matchmaker.lobbies.find #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum CloudVersionMatchmakerPortProtocol { - #[serde(rename = "http")] - Http, - #[serde(rename = "https")] - Https, - #[serde(rename = "tcp")] - Tcp, - #[serde(rename = "tcp_tls")] - TcpTls, - #[serde(rename = "udp")] - Udp, - + #[serde(rename = "http")] + Http, + #[serde(rename = "https")] + Https, + #[serde(rename = "tcp")] + Tcp, + #[serde(rename = "tcp_tls")] + TcpTls, + #[serde(rename = "udp")] + Udp, } impl ToString for CloudVersionMatchmakerPortProtocol { - fn to_string(&self) -> String { - match self { - Self::Http => String::from("http"), - Self::Https => String::from("https"), - Self::Tcp => String::from("tcp"), - Self::TcpTls => String::from("tcp_tls"), - Self::Udp => String::from("udp"), - } - } + fn to_string(&self) -> String { + match self { + Self::Http => String::from("http"), + Self::Https => String::from("https"), + Self::Tcp => String::from("tcp"), + Self::TcpTls => String::from("tcp_tls"), + Self::Udp => String::from("udp"), + } + } } impl Default for CloudVersionMatchmakerPortProtocol { - fn default() -> CloudVersionMatchmakerPortProtocol { - Self::Http - } + fn default() -> CloudVersionMatchmakerPortProtocol { + Self::Http + } } - - - - diff --git a/sdks/api/full/rust/src/models/cloud_version_matchmaker_port_range.rs b/sdks/api/full/rust/src/models/cloud_version_matchmaker_port_range.rs index f50915a79f..22b70c2f00 100644 --- a/sdks/api/full/rust/src/models/cloud_version_matchmaker_port_range.rs +++ b/sdks/api/full/rust/src/models/cloud_version_matchmaker_port_range.rs @@ -4,32 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionMatchmakerPortRange : Range of ports that can be connected to. If configured, `network_mode` must equal `host`. Port ranges may overlap between containers, it is the responsibility of the developer to ensure ports are available before using. Read more about host networking [here](https://rivet.gg/docs/dynamic-servers/concepts/host-bridge-networking). Only available on Rivet Open Source & Enterprise. ### Related - cloud.version.matchmaker.PortProtocol - cloud.version.matchmaker.ProxyKind - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerPortRange { - /// Unsigned 32 bit integer. - #[serde(rename = "min")] - pub min: i32, - /// Unsigned 32 bit integer. - #[serde(rename = "max")] - pub max: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "min")] + pub min: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "max")] + pub max: i32, } impl CloudVersionMatchmakerPortRange { - /// Range of ports that can be connected to. If configured, `network_mode` must equal `host`. Port ranges may overlap between containers, it is the responsibility of the developer to ensure ports are available before using. Read more about host networking [here](https://rivet.gg/docs/dynamic-servers/concepts/host-bridge-networking). Only available on Rivet Open Source & Enterprise. ### Related - cloud.version.matchmaker.PortProtocol - cloud.version.matchmaker.ProxyKind - pub fn new(min: i32, max: i32) -> CloudVersionMatchmakerPortRange { - CloudVersionMatchmakerPortRange { - min, - max, - } - } + /// Range of ports that can be connected to. If configured, `network_mode` must equal `host`. Port ranges may overlap between containers, it is the responsibility of the developer to ensure ports are available before using. Read more about host networking [here](https://rivet.gg/docs/dynamic-servers/concepts/host-bridge-networking). Only available on Rivet Open Source & Enterprise. ### Related - cloud.version.matchmaker.PortProtocol - cloud.version.matchmaker.ProxyKind + pub fn new(min: i32, max: i32) -> CloudVersionMatchmakerPortRange { + CloudVersionMatchmakerPortRange { min, max } + } } - - diff --git a/sdks/api/full/rust/src/models/cloud_version_matchmaker_proxy_kind.rs b/sdks/api/full/rust/src/models/cloud_version_matchmaker_proxy_kind.rs index f2d1f0de49..f102ccd44e 100644 --- a/sdks/api/full/rust/src/models/cloud_version_matchmaker_proxy_kind.rs +++ b/sdks/api/full/rust/src/models/cloud_version_matchmaker_proxy_kind.rs @@ -4,7 +4,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -13,28 +13,23 @@ /// Range of ports that can be connected to. `game_guard` (default) proxies all traffic through [Game Guard](https://rivet.gg/docs/dynamic-servers/concepts/game-guard) to mitigate DDoS attacks and provide TLS termination. `none` sends traffic directly to the game server. If configured, `network_mode` must equal `host`. Read more about host networking [here](https://rivet.gg/docs/dynamic-servers/concepts/host-bridge-networking). Only available on Rivet Open Source & Enterprise. ### Related - /docs/dynamic-servers/concepts/game-guard - cloud.version.matchmaker.PortProtocol #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum CloudVersionMatchmakerProxyKind { - #[serde(rename = "none")] - None, - #[serde(rename = "game_guard")] - GameGuard, - + #[serde(rename = "none")] + None, + #[serde(rename = "game_guard")] + GameGuard, } impl ToString for CloudVersionMatchmakerProxyKind { - fn to_string(&self) -> String { - match self { - Self::None => String::from("none"), - Self::GameGuard => String::from("game_guard"), - } - } + fn to_string(&self) -> String { + match self { + Self::None => String::from("none"), + Self::GameGuard => String::from("game_guard"), + } + } } impl Default for CloudVersionMatchmakerProxyKind { - fn default() -> CloudVersionMatchmakerProxyKind { - Self::None - } + fn default() -> CloudVersionMatchmakerProxyKind { + Self::None + } } - - - - diff --git a/sdks/api/full/rust/src/models/cloud_version_summary.rs b/sdks/api/full/rust/src/models/cloud_version_summary.rs index cb0e0b4ca0..8a014e3eae 100644 --- a/sdks/api/full/rust/src/models/cloud_version_summary.rs +++ b/sdks/api/full/rust/src/models/cloud_version_summary.rs @@ -4,35 +4,35 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CloudVersionSummary : A version summary. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionSummary { - #[serde(rename = "version_id")] - pub version_id: uuid::Uuid, - /// RFC3339 timestamp - #[serde(rename = "create_ts")] - pub create_ts: String, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, + #[serde(rename = "version_id")] + pub version_id: uuid::Uuid, + /// RFC3339 timestamp + #[serde(rename = "create_ts")] + pub create_ts: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, } impl CloudVersionSummary { - /// A version summary. - pub fn new(version_id: uuid::Uuid, create_ts: String, display_name: String) -> CloudVersionSummary { - CloudVersionSummary { - version_id, - create_ts, - display_name, - } - } + /// A version summary. + pub fn new( + version_id: uuid::Uuid, + create_ts: String, + display_name: String, + ) -> CloudVersionSummary { + CloudVersionSummary { + version_id, + create_ts, + display_name, + } + } } - - diff --git a/sdks/api/full/rust/src/models/core_intercom_pegboard_mark_client_registered_request.rs b/sdks/api/full/rust/src/models/core_intercom_pegboard_mark_client_registered_request.rs index 7db4566fdb..89e9a5fa67 100644 --- a/sdks/api/full/rust/src/models/core_intercom_pegboard_mark_client_registered_request.rs +++ b/sdks/api/full/rust/src/models/core_intercom_pegboard_mark_client_registered_request.rs @@ -4,25 +4,18 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CoreIntercomPegboardMarkClientRegisteredRequest { - #[serde(rename = "server_id")] - pub server_id: uuid::Uuid, + #[serde(rename = "server_id")] + pub server_id: uuid::Uuid, } impl CoreIntercomPegboardMarkClientRegisteredRequest { - pub fn new(server_id: uuid::Uuid) -> CoreIntercomPegboardMarkClientRegisteredRequest { - CoreIntercomPegboardMarkClientRegisteredRequest { - server_id, - } - } + pub fn new(server_id: uuid::Uuid) -> CoreIntercomPegboardMarkClientRegisteredRequest { + CoreIntercomPegboardMarkClientRegisteredRequest { server_id } + } } - - diff --git a/sdks/api/full/rust/src/models/edge_intercom_pegboard_toggle_client_drain_request.rs b/sdks/api/full/rust/src/models/edge_intercom_pegboard_toggle_client_drain_request.rs index 6548f5aa1b..ec719826be 100644 --- a/sdks/api/full/rust/src/models/edge_intercom_pegboard_toggle_client_drain_request.rs +++ b/sdks/api/full/rust/src/models/edge_intercom_pegboard_toggle_client_drain_request.rs @@ -4,29 +4,24 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EdgeIntercomPegboardToggleClientDrainRequest { - #[serde(rename = "draining")] - pub draining: bool, - /// RFC3339 timestamp - #[serde(rename = "drain_complete_ts", skip_serializing_if = "Option::is_none")] - pub drain_complete_ts: Option, + #[serde(rename = "draining")] + pub draining: bool, + /// RFC3339 timestamp + #[serde(rename = "drain_complete_ts", skip_serializing_if = "Option::is_none")] + pub drain_complete_ts: Option, } impl EdgeIntercomPegboardToggleClientDrainRequest { - pub fn new(draining: bool) -> EdgeIntercomPegboardToggleClientDrainRequest { - EdgeIntercomPegboardToggleClientDrainRequest { - draining, - drain_complete_ts: None, - } - } + pub fn new(draining: bool) -> EdgeIntercomPegboardToggleClientDrainRequest { + EdgeIntercomPegboardToggleClientDrainRequest { + draining, + drain_complete_ts: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/error_body.rs b/sdks/api/full/rust/src/models/error_body.rs index 8ad86463e1..598c359fdd 100644 --- a/sdks/api/full/rust/src/models/error_body.rs +++ b/sdks/api/full/rust/src/models/error_body.rs @@ -4,38 +4,38 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ErrorBody { - #[serde(rename = "code")] - pub code: String, - #[serde(rename = "message")] - pub message: String, - #[serde(rename = "ray_id")] - pub ray_id: String, - #[serde(rename = "documentation", skip_serializing_if = "Option::is_none")] - pub documentation: Option, - /// Unstructured metadata relating to an error. Must be manually parsed. - #[serde(rename = "metadata", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub metadata: Option>, + #[serde(rename = "code")] + pub code: String, + #[serde(rename = "message")] + pub message: String, + #[serde(rename = "ray_id")] + pub ray_id: String, + #[serde(rename = "documentation", skip_serializing_if = "Option::is_none")] + pub documentation: Option, + /// Unstructured metadata relating to an error. Must be manually parsed. + #[serde( + rename = "metadata", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub metadata: Option>, } impl ErrorBody { - pub fn new(code: String, message: String, ray_id: String) -> ErrorBody { - ErrorBody { - code, - message, - ray_id, - documentation: None, - metadata: None, - } - } + pub fn new(code: String, message: String, ray_id: String) -> ErrorBody { + ErrorBody { + code, + message, + ray_id, + documentation: None, + metadata: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/game_game_summary.rs b/sdks/api/full/rust/src/models/game_game_summary.rs index ad223f6565..b1fe8a6583 100644 --- a/sdks/api/full/rust/src/models/game_game_summary.rs +++ b/sdks/api/full/rust/src/models/game_game_summary.rs @@ -4,51 +4,53 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GameGameSummary { - #[serde(rename = "game_id")] - pub game_id: uuid::Uuid, - /// A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short. - #[serde(rename = "name_id")] - pub name_id: String, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - /// The URL of this game's logo image. - #[serde(rename = "logo_url", skip_serializing_if = "Option::is_none")] - pub logo_url: Option, - /// The URL of this game's banner image. - #[serde(rename = "banner_url", skip_serializing_if = "Option::is_none")] - pub banner_url: Option, - #[serde(rename = "url")] - pub url: String, - #[serde(rename = "developer")] - pub developer: Box, - /// Unsigned 32 bit integer. - #[serde(rename = "total_player_count")] - pub total_player_count: i32, + #[serde(rename = "game_id")] + pub game_id: uuid::Uuid, + /// A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short. + #[serde(rename = "name_id")] + pub name_id: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + /// The URL of this game's logo image. + #[serde(rename = "logo_url", skip_serializing_if = "Option::is_none")] + pub logo_url: Option, + /// The URL of this game's banner image. + #[serde(rename = "banner_url", skip_serializing_if = "Option::is_none")] + pub banner_url: Option, + #[serde(rename = "url")] + pub url: String, + #[serde(rename = "developer")] + pub developer: Box, + /// Unsigned 32 bit integer. + #[serde(rename = "total_player_count")] + pub total_player_count: i32, } impl GameGameSummary { - pub fn new(game_id: uuid::Uuid, name_id: String, display_name: String, url: String, developer: crate::models::GroupHandle, total_player_count: i32) -> GameGameSummary { - GameGameSummary { - game_id, - name_id, - display_name, - logo_url: None, - banner_url: None, - url, - developer: Box::new(developer), - total_player_count, - } - } + pub fn new( + game_id: uuid::Uuid, + name_id: String, + display_name: String, + url: String, + developer: crate::models::GroupHandle, + total_player_count: i32, + ) -> GameGameSummary { + GameGameSummary { + game_id, + name_id, + display_name, + logo_url: None, + banner_url: None, + url, + developer: Box::new(developer), + total_player_count, + } + } } - - diff --git a/sdks/api/full/rust/src/models/game_handle.rs b/sdks/api/full/rust/src/models/game_handle.rs index 0a2dd88b1c..21c37480ab 100644 --- a/sdks/api/full/rust/src/models/game_handle.rs +++ b/sdks/api/full/rust/src/models/game_handle.rs @@ -4,41 +4,36 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GameHandle { - #[serde(rename = "game_id")] - pub game_id: uuid::Uuid, - /// A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short. - #[serde(rename = "name_id")] - pub name_id: String, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - /// The URL of this game's logo image. - #[serde(rename = "logo_url", skip_serializing_if = "Option::is_none")] - pub logo_url: Option, - /// The URL of this game's banner image. - #[serde(rename = "banner_url", skip_serializing_if = "Option::is_none")] - pub banner_url: Option, + #[serde(rename = "game_id")] + pub game_id: uuid::Uuid, + /// A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short. + #[serde(rename = "name_id")] + pub name_id: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + /// The URL of this game's logo image. + #[serde(rename = "logo_url", skip_serializing_if = "Option::is_none")] + pub logo_url: Option, + /// The URL of this game's banner image. + #[serde(rename = "banner_url", skip_serializing_if = "Option::is_none")] + pub banner_url: Option, } impl GameHandle { - pub fn new(game_id: uuid::Uuid, name_id: String, display_name: String) -> GameHandle { - GameHandle { - game_id, - name_id, - display_name, - logo_url: None, - banner_url: None, - } - } + pub fn new(game_id: uuid::Uuid, name_id: String, display_name: String) -> GameHandle { + GameHandle { + game_id, + name_id, + display_name, + logo_url: None, + banner_url: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/game_leaderboard_category.rs b/sdks/api/full/rust/src/models/game_leaderboard_category.rs index 29cb86fe4e..187d93ebe0 100644 --- a/sdks/api/full/rust/src/models/game_leaderboard_category.rs +++ b/sdks/api/full/rust/src/models/game_leaderboard_category.rs @@ -4,28 +4,22 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GameLeaderboardCategory : A game leaderboard category. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GameLeaderboardCategory { - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, } impl GameLeaderboardCategory { - /// A game leaderboard category. - pub fn new(display_name: String) -> GameLeaderboardCategory { - GameLeaderboardCategory { - display_name, - } - } + /// A game leaderboard category. + pub fn new(display_name: String) -> GameLeaderboardCategory { + GameLeaderboardCategory { display_name } + } } - - diff --git a/sdks/api/full/rust/src/models/game_platform_link.rs b/sdks/api/full/rust/src/models/game_platform_link.rs index f8a8591e22..7b117be70c 100644 --- a/sdks/api/full/rust/src/models/game_platform_link.rs +++ b/sdks/api/full/rust/src/models/game_platform_link.rs @@ -4,32 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GamePlatformLink : A platform link denoting a supported platform. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GamePlatformLink { - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - /// The URL to the given game's method of distribution on this platform. - #[serde(rename = "url")] - pub url: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + /// The URL to the given game's method of distribution on this platform. + #[serde(rename = "url")] + pub url: String, } impl GamePlatformLink { - /// A platform link denoting a supported platform. - pub fn new(display_name: String, url: String) -> GamePlatformLink { - GamePlatformLink { - display_name, - url, - } - } + /// A platform link denoting a supported platform. + pub fn new(display_name: String, url: String) -> GamePlatformLink { + GamePlatformLink { display_name, url } + } } - - diff --git a/sdks/api/full/rust/src/models/game_profile.rs b/sdks/api/full/rust/src/models/game_profile.rs index c1861b7ebe..077d8b9459 100644 --- a/sdks/api/full/rust/src/models/game_profile.rs +++ b/sdks/api/full/rust/src/models/game_profile.rs @@ -4,74 +4,82 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GameProfile : A game profile. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GameProfile { - #[serde(rename = "game_id")] - pub game_id: uuid::Uuid, - /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. - #[serde(rename = "name_id")] - pub name_id: String, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - /// The URL of this game's logo image. - #[serde(rename = "logo_url", skip_serializing_if = "Option::is_none")] - pub logo_url: Option, - /// The URL of this game's banner image. - #[serde(rename = "banner_url", skip_serializing_if = "Option::is_none")] - pub banner_url: Option, - /// The URL to this game's website. - #[serde(rename = "url")] - pub url: String, - #[serde(rename = "developer")] - pub developer: Box, - /// A list of game tags. - #[serde(rename = "tags")] - pub tags: Vec, - /// A description of the given game. - #[serde(rename = "description")] - pub description: String, - /// A list of platform links. - #[serde(rename = "platforms")] - pub platforms: Vec, - /// A list of group summaries. - #[serde(rename = "recommended_groups")] - pub recommended_groups: Vec, - /// A list of game leaderboard categories. - #[serde(rename = "identity_leaderboard_categories")] - pub identity_leaderboard_categories: Vec, - /// A list of game leaderboard categories. - #[serde(rename = "group_leaderboard_categories")] - pub group_leaderboard_categories: Vec, + #[serde(rename = "game_id")] + pub game_id: uuid::Uuid, + /// A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short. + #[serde(rename = "name_id")] + pub name_id: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + /// The URL of this game's logo image. + #[serde(rename = "logo_url", skip_serializing_if = "Option::is_none")] + pub logo_url: Option, + /// The URL of this game's banner image. + #[serde(rename = "banner_url", skip_serializing_if = "Option::is_none")] + pub banner_url: Option, + /// The URL to this game's website. + #[serde(rename = "url")] + pub url: String, + #[serde(rename = "developer")] + pub developer: Box, + /// A list of game tags. + #[serde(rename = "tags")] + pub tags: Vec, + /// A description of the given game. + #[serde(rename = "description")] + pub description: String, + /// A list of platform links. + #[serde(rename = "platforms")] + pub platforms: Vec, + /// A list of group summaries. + #[serde(rename = "recommended_groups")] + pub recommended_groups: Vec, + /// A list of game leaderboard categories. + #[serde(rename = "identity_leaderboard_categories")] + pub identity_leaderboard_categories: Vec, + /// A list of game leaderboard categories. + #[serde(rename = "group_leaderboard_categories")] + pub group_leaderboard_categories: Vec, } impl GameProfile { - /// A game profile. - pub fn new(game_id: uuid::Uuid, name_id: String, display_name: String, url: String, developer: crate::models::GroupGroupSummary, tags: Vec, description: String, platforms: Vec, recommended_groups: Vec, identity_leaderboard_categories: Vec, group_leaderboard_categories: Vec) -> GameProfile { - GameProfile { - game_id, - name_id, - display_name, - logo_url: None, - banner_url: None, - url, - developer: Box::new(developer), - tags, - description, - platforms, - recommended_groups, - identity_leaderboard_categories, - group_leaderboard_categories, - } - } + /// A game profile. + pub fn new( + game_id: uuid::Uuid, + name_id: String, + display_name: String, + url: String, + developer: crate::models::GroupGroupSummary, + tags: Vec, + description: String, + platforms: Vec, + recommended_groups: Vec, + identity_leaderboard_categories: Vec, + group_leaderboard_categories: Vec, + ) -> GameProfile { + GameProfile { + game_id, + name_id, + display_name, + logo_url: None, + banner_url: None, + url, + developer: Box::new(developer), + tags, + description, + platforms, + recommended_groups, + identity_leaderboard_categories, + group_leaderboard_categories, + } + } } - - diff --git a/sdks/api/full/rust/src/models/game_stat.rs b/sdks/api/full/rust/src/models/game_stat.rs index d9fbbfe2d1..ddc881a2fb 100644 --- a/sdks/api/full/rust/src/models/game_stat.rs +++ b/sdks/api/full/rust/src/models/game_stat.rs @@ -4,31 +4,27 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GameStat : A game statistic. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GameStat { - #[serde(rename = "config")] - pub config: Box, - /// A single overall value of the given statistic. - #[serde(rename = "overall_value")] - pub overall_value: f64, + #[serde(rename = "config")] + pub config: Box, + /// A single overall value of the given statistic. + #[serde(rename = "overall_value")] + pub overall_value: f64, } impl GameStat { - /// A game statistic. - pub fn new(config: crate::models::GameStatConfig, overall_value: f64) -> GameStat { - GameStat { - config: Box::new(config), - overall_value, - } - } + /// A game statistic. + pub fn new(config: crate::models::GameStatConfig, overall_value: f64) -> GameStat { + GameStat { + config: Box::new(config), + overall_value, + } + } } - - diff --git a/sdks/api/full/rust/src/models/game_stat_aggregation_method.rs b/sdks/api/full/rust/src/models/game_stat_aggregation_method.rs index 7f11571aa2..6f39077c88 100644 --- a/sdks/api/full/rust/src/models/game_stat_aggregation_method.rs +++ b/sdks/api/full/rust/src/models/game_stat_aggregation_method.rs @@ -4,7 +4,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -13,34 +13,29 @@ /// A value denoting the aggregation method of a game statistic. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum GameStatAggregationMethod { - #[serde(rename = "sum")] - Sum, - #[serde(rename = "average")] - Average, - #[serde(rename = "min")] - Min, - #[serde(rename = "max")] - Max, - + #[serde(rename = "sum")] + Sum, + #[serde(rename = "average")] + Average, + #[serde(rename = "min")] + Min, + #[serde(rename = "max")] + Max, } impl ToString for GameStatAggregationMethod { - fn to_string(&self) -> String { - match self { - Self::Sum => String::from("sum"), - Self::Average => String::from("average"), - Self::Min => String::from("min"), - Self::Max => String::from("max"), - } - } + fn to_string(&self) -> String { + match self { + Self::Sum => String::from("sum"), + Self::Average => String::from("average"), + Self::Min => String::from("min"), + Self::Max => String::from("max"), + } + } } impl Default for GameStatAggregationMethod { - fn default() -> GameStatAggregationMethod { - Self::Sum - } + fn default() -> GameStatAggregationMethod { + Self::Sum + } } - - - - diff --git a/sdks/api/full/rust/src/models/game_stat_config.rs b/sdks/api/full/rust/src/models/game_stat_config.rs index 0d3e4c5d5e..e866e43d46 100644 --- a/sdks/api/full/rust/src/models/game_stat_config.rs +++ b/sdks/api/full/rust/src/models/game_stat_config.rs @@ -4,62 +4,66 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GameStatConfig : A game statistic config. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GameStatConfig { - #[serde(rename = "record_id")] - pub record_id: uuid::Uuid, - #[serde(rename = "icon_id")] - pub icon_id: uuid::Uuid, - #[serde(rename = "format")] - pub format: crate::models::GameStatFormatMethod, - #[serde(rename = "aggregation")] - pub aggregation: crate::models::GameStatAggregationMethod, - #[serde(rename = "sorting")] - pub sorting: crate::models::GameStatSortingMethod, - #[serde(rename = "priority")] - pub priority: i32, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - /// A string appended to the end of a singular game statistic's value. Example: 1 **dollar**. - #[serde(rename = "postfix_singular", skip_serializing_if = "Option::is_none")] - pub postfix_singular: Option, - /// A string appended to the end of a game statistic's value that is not exactly 1. Example: 45 **dollars**. - #[serde(rename = "postfix_plural", skip_serializing_if = "Option::is_none")] - pub postfix_plural: Option, - /// A string appended to the beginning of a singular game statistic's value. Example: **value** 1. - #[serde(rename = "prefix_singular", skip_serializing_if = "Option::is_none")] - pub prefix_singular: Option, - /// A string prepended to the beginning of a game statistic's value that is not exactly 1. Example: **values** 45. - #[serde(rename = "prefix_plural", skip_serializing_if = "Option::is_none")] - pub prefix_plural: Option, + #[serde(rename = "record_id")] + pub record_id: uuid::Uuid, + #[serde(rename = "icon_id")] + pub icon_id: uuid::Uuid, + #[serde(rename = "format")] + pub format: crate::models::GameStatFormatMethod, + #[serde(rename = "aggregation")] + pub aggregation: crate::models::GameStatAggregationMethod, + #[serde(rename = "sorting")] + pub sorting: crate::models::GameStatSortingMethod, + #[serde(rename = "priority")] + pub priority: i32, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + /// A string appended to the end of a singular game statistic's value. Example: 1 **dollar**. + #[serde(rename = "postfix_singular", skip_serializing_if = "Option::is_none")] + pub postfix_singular: Option, + /// A string appended to the end of a game statistic's value that is not exactly 1. Example: 45 **dollars**. + #[serde(rename = "postfix_plural", skip_serializing_if = "Option::is_none")] + pub postfix_plural: Option, + /// A string appended to the beginning of a singular game statistic's value. Example: **value** 1. + #[serde(rename = "prefix_singular", skip_serializing_if = "Option::is_none")] + pub prefix_singular: Option, + /// A string prepended to the beginning of a game statistic's value that is not exactly 1. Example: **values** 45. + #[serde(rename = "prefix_plural", skip_serializing_if = "Option::is_none")] + pub prefix_plural: Option, } impl GameStatConfig { - /// A game statistic config. - pub fn new(record_id: uuid::Uuid, icon_id: uuid::Uuid, format: crate::models::GameStatFormatMethod, aggregation: crate::models::GameStatAggregationMethod, sorting: crate::models::GameStatSortingMethod, priority: i32, display_name: String) -> GameStatConfig { - GameStatConfig { - record_id, - icon_id, - format, - aggregation, - sorting, - priority, - display_name, - postfix_singular: None, - postfix_plural: None, - prefix_singular: None, - prefix_plural: None, - } - } + /// A game statistic config. + pub fn new( + record_id: uuid::Uuid, + icon_id: uuid::Uuid, + format: crate::models::GameStatFormatMethod, + aggregation: crate::models::GameStatAggregationMethod, + sorting: crate::models::GameStatSortingMethod, + priority: i32, + display_name: String, + ) -> GameStatConfig { + GameStatConfig { + record_id, + icon_id, + format, + aggregation, + sorting, + priority, + display_name, + postfix_singular: None, + postfix_plural: None, + prefix_singular: None, + prefix_plural: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/game_stat_format_method.rs b/sdks/api/full/rust/src/models/game_stat_format_method.rs index 7340afdf6e..bbeb74d568 100644 --- a/sdks/api/full/rust/src/models/game_stat_format_method.rs +++ b/sdks/api/full/rust/src/models/game_stat_format_method.rs @@ -4,7 +4,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -13,43 +13,38 @@ /// A value denoting the format method of a game statistic. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum GameStatFormatMethod { - #[serde(rename = "integer")] - Integer, - #[serde(rename = "float_1")] - Float1, - #[serde(rename = "float_2")] - Float2, - #[serde(rename = "float_3")] - Float3, - #[serde(rename = "duration_minute")] - DurationMinute, - #[serde(rename = "duration_second")] - DurationSecond, - #[serde(rename = "duration_hundredth_second")] - DurationHundredthSecond, - + #[serde(rename = "integer")] + Integer, + #[serde(rename = "float_1")] + Float1, + #[serde(rename = "float_2")] + Float2, + #[serde(rename = "float_3")] + Float3, + #[serde(rename = "duration_minute")] + DurationMinute, + #[serde(rename = "duration_second")] + DurationSecond, + #[serde(rename = "duration_hundredth_second")] + DurationHundredthSecond, } impl ToString for GameStatFormatMethod { - fn to_string(&self) -> String { - match self { - Self::Integer => String::from("integer"), - Self::Float1 => String::from("float_1"), - Self::Float2 => String::from("float_2"), - Self::Float3 => String::from("float_3"), - Self::DurationMinute => String::from("duration_minute"), - Self::DurationSecond => String::from("duration_second"), - Self::DurationHundredthSecond => String::from("duration_hundredth_second"), - } - } + fn to_string(&self) -> String { + match self { + Self::Integer => String::from("integer"), + Self::Float1 => String::from("float_1"), + Self::Float2 => String::from("float_2"), + Self::Float3 => String::from("float_3"), + Self::DurationMinute => String::from("duration_minute"), + Self::DurationSecond => String::from("duration_second"), + Self::DurationHundredthSecond => String::from("duration_hundredth_second"), + } + } } impl Default for GameStatFormatMethod { - fn default() -> GameStatFormatMethod { - Self::Integer - } + fn default() -> GameStatFormatMethod { + Self::Integer + } } - - - - diff --git a/sdks/api/full/rust/src/models/game_stat_sorting_method.rs b/sdks/api/full/rust/src/models/game_stat_sorting_method.rs index 695fcf70a6..88fdf54b02 100644 --- a/sdks/api/full/rust/src/models/game_stat_sorting_method.rs +++ b/sdks/api/full/rust/src/models/game_stat_sorting_method.rs @@ -4,7 +4,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -13,28 +13,23 @@ /// A value denoting the sorting method of a game statistic. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum GameStatSortingMethod { - #[serde(rename = "desc")] - Desc, - #[serde(rename = "asc")] - Asc, - + #[serde(rename = "desc")] + Desc, + #[serde(rename = "asc")] + Asc, } impl ToString for GameStatSortingMethod { - fn to_string(&self) -> String { - match self { - Self::Desc => String::from("desc"), - Self::Asc => String::from("asc"), - } - } + fn to_string(&self) -> String { + match self { + Self::Desc => String::from("desc"), + Self::Asc => String::from("asc"), + } + } } impl Default for GameStatSortingMethod { - fn default() -> GameStatSortingMethod { - Self::Desc - } + fn default() -> GameStatSortingMethod { + Self::Desc + } } - - - - diff --git a/sdks/api/full/rust/src/models/game_stat_summary.rs b/sdks/api/full/rust/src/models/game_stat_summary.rs index 1d1a267675..443355d4ce 100644 --- a/sdks/api/full/rust/src/models/game_stat_summary.rs +++ b/sdks/api/full/rust/src/models/game_stat_summary.rs @@ -4,30 +4,29 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GameStatSummary : A game statistic summary. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GameStatSummary { - #[serde(rename = "game")] - pub game: Box, - #[serde(rename = "stats")] - pub stats: Vec, + #[serde(rename = "game")] + pub game: Box, + #[serde(rename = "stats")] + pub stats: Vec, } impl GameStatSummary { - /// A game statistic summary. - pub fn new(game: crate::models::GameHandle, stats: Vec) -> GameStatSummary { - GameStatSummary { - game: Box::new(game), - stats, - } - } + /// A game statistic summary. + pub fn new( + game: crate::models::GameHandle, + stats: Vec, + ) -> GameStatSummary { + GameStatSummary { + game: Box::new(game), + stats, + } + } } - - diff --git a/sdks/api/full/rust/src/models/games_environments_create_service_token_response.rs b/sdks/api/full/rust/src/models/games_environments_create_service_token_response.rs index fb7f482fce..f139fee460 100644 --- a/sdks/api/full/rust/src/models/games_environments_create_service_token_response.rs +++ b/sdks/api/full/rust/src/models/games_environments_create_service_token_response.rs @@ -4,26 +4,19 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GamesEnvironmentsCreateServiceTokenResponse { - /// A JSON Web Token. - #[serde(rename = "token")] - pub token: String, + /// A JSON Web Token. + #[serde(rename = "token")] + pub token: String, } impl GamesEnvironmentsCreateServiceTokenResponse { - pub fn new(token: String) -> GamesEnvironmentsCreateServiceTokenResponse { - GamesEnvironmentsCreateServiceTokenResponse { - token, - } - } + pub fn new(token: String) -> GamesEnvironmentsCreateServiceTokenResponse { + GamesEnvironmentsCreateServiceTokenResponse { token } + } } - - diff --git a/sdks/api/full/rust/src/models/geo_coord.rs b/sdks/api/full/rust/src/models/geo_coord.rs index 6ebb7e3346..54c01a7bfb 100644 --- a/sdks/api/full/rust/src/models/geo_coord.rs +++ b/sdks/api/full/rust/src/models/geo_coord.rs @@ -4,30 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GeoCoord : Geographical coordinates for a location on Planet Earth. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GeoCoord { - #[serde(rename = "latitude")] - pub latitude: f64, - #[serde(rename = "longitude")] - pub longitude: f64, + #[serde(rename = "latitude")] + pub latitude: f64, + #[serde(rename = "longitude")] + pub longitude: f64, } impl GeoCoord { - /// Geographical coordinates for a location on Planet Earth. - pub fn new(latitude: f64, longitude: f64) -> GeoCoord { - GeoCoord { - latitude, - longitude, - } - } + /// Geographical coordinates for a location on Planet Earth. + pub fn new(latitude: f64, longitude: f64) -> GeoCoord { + GeoCoord { + latitude, + longitude, + } + } } - - diff --git a/sdks/api/full/rust/src/models/geo_distance.rs b/sdks/api/full/rust/src/models/geo_distance.rs index 19b1f82bf0..d4373b1057 100644 --- a/sdks/api/full/rust/src/models/geo_distance.rs +++ b/sdks/api/full/rust/src/models/geo_distance.rs @@ -4,30 +4,23 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GeoDistance : Distance available in multiple units. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GeoDistance { - #[serde(rename = "kilometers")] - pub kilometers: f64, - #[serde(rename = "miles")] - pub miles: f64, + #[serde(rename = "kilometers")] + pub kilometers: f64, + #[serde(rename = "miles")] + pub miles: f64, } impl GeoDistance { - /// Distance available in multiple units. - pub fn new(kilometers: f64, miles: f64) -> GeoDistance { - GeoDistance { - kilometers, - miles, - } - } + /// Distance available in multiple units. + pub fn new(kilometers: f64, miles: f64) -> GeoDistance { + GeoDistance { kilometers, miles } + } } - - diff --git a/sdks/api/full/rust/src/models/global_event_notification.rs b/sdks/api/full/rust/src/models/global_event_notification.rs index 17e2b209e5..5c998e68b3 100644 --- a/sdks/api/full/rust/src/models/global_event_notification.rs +++ b/sdks/api/full/rust/src/models/global_event_notification.rs @@ -4,34 +4,34 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GlobalEventNotification { - #[serde(rename = "title")] - pub title: String, - #[serde(rename = "description")] - pub description: String, - #[serde(rename = "thumbnail_url")] - pub thumbnail_url: String, - #[serde(rename = "url")] - pub url: String, + #[serde(rename = "title")] + pub title: String, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "thumbnail_url")] + pub thumbnail_url: String, + #[serde(rename = "url")] + pub url: String, } impl GlobalEventNotification { - pub fn new(title: String, description: String, thumbnail_url: String, url: String) -> GlobalEventNotification { - GlobalEventNotification { - title, - description, - thumbnail_url, - url, - } - } + pub fn new( + title: String, + description: String, + thumbnail_url: String, + url: String, + ) -> GlobalEventNotification { + GlobalEventNotification { + title, + description, + thumbnail_url, + url, + } + } } - - diff --git a/sdks/api/full/rust/src/models/group_banned_identity.rs b/sdks/api/full/rust/src/models/group_banned_identity.rs index 18a917e540..e21631259a 100644 --- a/sdks/api/full/rust/src/models/group_banned_identity.rs +++ b/sdks/api/full/rust/src/models/group_banned_identity.rs @@ -4,31 +4,27 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GroupBannedIdentity : A banned identity. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupBannedIdentity { - #[serde(rename = "identity")] - pub identity: Box, - /// RFC3339 timestamp - #[serde(rename = "ban_ts")] - pub ban_ts: String, + #[serde(rename = "identity")] + pub identity: Box, + /// RFC3339 timestamp + #[serde(rename = "ban_ts")] + pub ban_ts: String, } impl GroupBannedIdentity { - /// A banned identity. - pub fn new(identity: crate::models::IdentityHandle, ban_ts: String) -> GroupBannedIdentity { - GroupBannedIdentity { - identity: Box::new(identity), - ban_ts, - } - } + /// A banned identity. + pub fn new(identity: crate::models::IdentityHandle, ban_ts: String) -> GroupBannedIdentity { + GroupBannedIdentity { + identity: Box::new(identity), + ban_ts, + } + } } - - diff --git a/sdks/api/full/rust/src/models/group_consume_invite_response.rs b/sdks/api/full/rust/src/models/group_consume_invite_response.rs index fe68dce2b4..ac423b29e5 100644 --- a/sdks/api/full/rust/src/models/group_consume_invite_response.rs +++ b/sdks/api/full/rust/src/models/group_consume_invite_response.rs @@ -4,25 +4,18 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupConsumeInviteResponse { - #[serde(rename = "group_id", skip_serializing_if = "Option::is_none")] - pub group_id: Option, + #[serde(rename = "group_id", skip_serializing_if = "Option::is_none")] + pub group_id: Option, } impl GroupConsumeInviteResponse { - pub fn new() -> GroupConsumeInviteResponse { - GroupConsumeInviteResponse { - group_id: None, - } - } + pub fn new() -> GroupConsumeInviteResponse { + GroupConsumeInviteResponse { group_id: None } + } } - - diff --git a/sdks/api/full/rust/src/models/group_create_invite_request.rs b/sdks/api/full/rust/src/models/group_create_invite_request.rs index c4a59e94e5..2c19fd9fd0 100644 --- a/sdks/api/full/rust/src/models/group_create_invite_request.rs +++ b/sdks/api/full/rust/src/models/group_create_invite_request.rs @@ -4,30 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupCreateInviteRequest { - /// How long until the group invite expires (in milliseconds). - #[serde(rename = "ttl", skip_serializing_if = "Option::is_none")] - pub ttl: Option, - /// How many times the group invite can be used. - #[serde(rename = "use_count", skip_serializing_if = "Option::is_none")] - pub use_count: Option, + /// How long until the group invite expires (in milliseconds). + #[serde(rename = "ttl", skip_serializing_if = "Option::is_none")] + pub ttl: Option, + /// How many times the group invite can be used. + #[serde(rename = "use_count", skip_serializing_if = "Option::is_none")] + pub use_count: Option, } impl GroupCreateInviteRequest { - pub fn new() -> GroupCreateInviteRequest { - GroupCreateInviteRequest { - ttl: None, - use_count: None, - } - } + pub fn new() -> GroupCreateInviteRequest { + GroupCreateInviteRequest { + ttl: None, + use_count: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/group_create_invite_response.rs b/sdks/api/full/rust/src/models/group_create_invite_response.rs index 47edeb56b1..adf04e61e5 100644 --- a/sdks/api/full/rust/src/models/group_create_invite_response.rs +++ b/sdks/api/full/rust/src/models/group_create_invite_response.rs @@ -4,26 +4,19 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupCreateInviteResponse { - /// The code that will be passed to `rivet.api.group#ConsumeInvite` to join a group. - #[serde(rename = "code")] - pub code: String, + /// The code that will be passed to `rivet.api.group#ConsumeInvite` to join a group. + #[serde(rename = "code")] + pub code: String, } impl GroupCreateInviteResponse { - pub fn new(code: String) -> GroupCreateInviteResponse { - GroupCreateInviteResponse { - code, - } - } + pub fn new(code: String) -> GroupCreateInviteResponse { + GroupCreateInviteResponse { code } + } } - - diff --git a/sdks/api/full/rust/src/models/group_create_request.rs b/sdks/api/full/rust/src/models/group_create_request.rs index 503c9ce897..1ee55bb191 100644 --- a/sdks/api/full/rust/src/models/group_create_request.rs +++ b/sdks/api/full/rust/src/models/group_create_request.rs @@ -4,26 +4,19 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupCreateRequest { - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, } impl GroupCreateRequest { - pub fn new(display_name: String) -> GroupCreateRequest { - GroupCreateRequest { - display_name, - } - } + pub fn new(display_name: String) -> GroupCreateRequest { + GroupCreateRequest { display_name } + } } - - diff --git a/sdks/api/full/rust/src/models/group_create_response.rs b/sdks/api/full/rust/src/models/group_create_response.rs index f31960ece8..ea200e8016 100644 --- a/sdks/api/full/rust/src/models/group_create_response.rs +++ b/sdks/api/full/rust/src/models/group_create_response.rs @@ -4,25 +4,18 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupCreateResponse { - #[serde(rename = "group_id")] - pub group_id: uuid::Uuid, + #[serde(rename = "group_id")] + pub group_id: uuid::Uuid, } impl GroupCreateResponse { - pub fn new(group_id: uuid::Uuid) -> GroupCreateResponse { - GroupCreateResponse { - group_id, - } - } + pub fn new(group_id: uuid::Uuid) -> GroupCreateResponse { + GroupCreateResponse { group_id } + } } - - diff --git a/sdks/api/full/rust/src/models/group_external_links.rs b/sdks/api/full/rust/src/models/group_external_links.rs index b9e0f15885..6ae7c869c8 100644 --- a/sdks/api/full/rust/src/models/group_external_links.rs +++ b/sdks/api/full/rust/src/models/group_external_links.rs @@ -4,28 +4,22 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GroupExternalLinks : External links for this group. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupExternalLinks { - /// A link to this group's profile page. - #[serde(rename = "profile")] - pub profile: String, + /// A link to this group's profile page. + #[serde(rename = "profile")] + pub profile: String, } impl GroupExternalLinks { - /// External links for this group. - pub fn new(profile: String) -> GroupExternalLinks { - GroupExternalLinks { - profile, - } - } + /// External links for this group. + pub fn new(profile: String) -> GroupExternalLinks { + GroupExternalLinks { profile } + } } - - diff --git a/sdks/api/full/rust/src/models/group_get_bans_response.rs b/sdks/api/full/rust/src/models/group_get_bans_response.rs index 3a8e97fc4e..79b78d947b 100644 --- a/sdks/api/full/rust/src/models/group_get_bans_response.rs +++ b/sdks/api/full/rust/src/models/group_get_bans_response.rs @@ -4,33 +4,31 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupGetBansResponse { - /// A list of banned group members. - #[serde(rename = "banned_identities")] - pub banned_identities: Vec, - /// The pagination anchor. - #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] - pub anchor: Option, - #[serde(rename = "watch")] - pub watch: Box, + /// A list of banned group members. + #[serde(rename = "banned_identities")] + pub banned_identities: Vec, + /// The pagination anchor. + #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] + pub anchor: Option, + #[serde(rename = "watch")] + pub watch: Box, } impl GroupGetBansResponse { - pub fn new(banned_identities: Vec, watch: crate::models::WatchResponse) -> GroupGetBansResponse { - GroupGetBansResponse { - banned_identities, - anchor: None, - watch: Box::new(watch), - } - } + pub fn new( + banned_identities: Vec, + watch: crate::models::WatchResponse, + ) -> GroupGetBansResponse { + GroupGetBansResponse { + banned_identities, + anchor: None, + watch: Box::new(watch), + } + } } - - diff --git a/sdks/api/full/rust/src/models/group_get_invite_response.rs b/sdks/api/full/rust/src/models/group_get_invite_response.rs index caead9d125..eb18e86d3c 100644 --- a/sdks/api/full/rust/src/models/group_get_invite_response.rs +++ b/sdks/api/full/rust/src/models/group_get_invite_response.rs @@ -4,25 +4,20 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupGetInviteResponse { - #[serde(rename = "group")] - pub group: Box, + #[serde(rename = "group")] + pub group: Box, } impl GroupGetInviteResponse { - pub fn new(group: crate::models::GroupHandle) -> GroupGetInviteResponse { - GroupGetInviteResponse { - group: Box::new(group), - } - } + pub fn new(group: crate::models::GroupHandle) -> GroupGetInviteResponse { + GroupGetInviteResponse { + group: Box::new(group), + } + } } - - diff --git a/sdks/api/full/rust/src/models/group_get_join_requests_response.rs b/sdks/api/full/rust/src/models/group_get_join_requests_response.rs index eaadfcefd6..040913c96c 100644 --- a/sdks/api/full/rust/src/models/group_get_join_requests_response.rs +++ b/sdks/api/full/rust/src/models/group_get_join_requests_response.rs @@ -4,33 +4,31 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupGetJoinRequestsResponse { - /// A list of group join requests. - #[serde(rename = "join_requests")] - pub join_requests: Vec, - /// The pagination anchor. - #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] - pub anchor: Option, - #[serde(rename = "watch")] - pub watch: Box, + /// A list of group join requests. + #[serde(rename = "join_requests")] + pub join_requests: Vec, + /// The pagination anchor. + #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] + pub anchor: Option, + #[serde(rename = "watch")] + pub watch: Box, } impl GroupGetJoinRequestsResponse { - pub fn new(join_requests: Vec, watch: crate::models::WatchResponse) -> GroupGetJoinRequestsResponse { - GroupGetJoinRequestsResponse { - join_requests, - anchor: None, - watch: Box::new(watch), - } - } + pub fn new( + join_requests: Vec, + watch: crate::models::WatchResponse, + ) -> GroupGetJoinRequestsResponse { + GroupGetJoinRequestsResponse { + join_requests, + anchor: None, + watch: Box::new(watch), + } + } } - - diff --git a/sdks/api/full/rust/src/models/group_get_members_response.rs b/sdks/api/full/rust/src/models/group_get_members_response.rs index bbae470741..de5d00fac8 100644 --- a/sdks/api/full/rust/src/models/group_get_members_response.rs +++ b/sdks/api/full/rust/src/models/group_get_members_response.rs @@ -4,33 +4,31 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupGetMembersResponse { - /// A list of group members. - #[serde(rename = "members")] - pub members: Vec, - /// The pagination anchor. - #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] - pub anchor: Option, - #[serde(rename = "watch")] - pub watch: Box, + /// A list of group members. + #[serde(rename = "members")] + pub members: Vec, + /// The pagination anchor. + #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] + pub anchor: Option, + #[serde(rename = "watch")] + pub watch: Box, } impl GroupGetMembersResponse { - pub fn new(members: Vec, watch: crate::models::WatchResponse) -> GroupGetMembersResponse { - GroupGetMembersResponse { - members, - anchor: None, - watch: Box::new(watch), - } - } + pub fn new( + members: Vec, + watch: crate::models::WatchResponse, + ) -> GroupGetMembersResponse { + GroupGetMembersResponse { + members, + anchor: None, + watch: Box::new(watch), + } + } } - - diff --git a/sdks/api/full/rust/src/models/group_get_profile_response.rs b/sdks/api/full/rust/src/models/group_get_profile_response.rs index d89ac68b35..9aba3fa350 100644 --- a/sdks/api/full/rust/src/models/group_get_profile_response.rs +++ b/sdks/api/full/rust/src/models/group_get_profile_response.rs @@ -4,28 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupGetProfileResponse { - #[serde(rename = "group")] - pub group: Box, - #[serde(rename = "watch")] - pub watch: Box, + #[serde(rename = "group")] + pub group: Box, + #[serde(rename = "watch")] + pub watch: Box, } impl GroupGetProfileResponse { - pub fn new(group: crate::models::GroupProfile, watch: crate::models::WatchResponse) -> GroupGetProfileResponse { - GroupGetProfileResponse { - group: Box::new(group), - watch: Box::new(watch), - } - } + pub fn new( + group: crate::models::GroupProfile, + watch: crate::models::WatchResponse, + ) -> GroupGetProfileResponse { + GroupGetProfileResponse { + group: Box::new(group), + watch: Box::new(watch), + } + } } - - diff --git a/sdks/api/full/rust/src/models/group_get_summary_response.rs b/sdks/api/full/rust/src/models/group_get_summary_response.rs index 9ea9fdd7bc..35b76255b8 100644 --- a/sdks/api/full/rust/src/models/group_get_summary_response.rs +++ b/sdks/api/full/rust/src/models/group_get_summary_response.rs @@ -4,25 +4,20 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupGetSummaryResponse { - #[serde(rename = "group")] - pub group: Box, + #[serde(rename = "group")] + pub group: Box, } impl GroupGetSummaryResponse { - pub fn new(group: crate::models::GroupGroupSummary) -> GroupGetSummaryResponse { - GroupGetSummaryResponse { - group: Box::new(group), - } - } + pub fn new(group: crate::models::GroupGroupSummary) -> GroupGetSummaryResponse { + GroupGetSummaryResponse { + group: Box::new(group), + } + } } - - diff --git a/sdks/api/full/rust/src/models/group_group_summary.rs b/sdks/api/full/rust/src/models/group_group_summary.rs index 5a4261ceae..ec405595da 100644 --- a/sdks/api/full/rust/src/models/group_group_summary.rs +++ b/sdks/api/full/rust/src/models/group_group_summary.rs @@ -4,57 +4,62 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupGroupSummary { - #[serde(rename = "group_id")] - pub group_id: uuid::Uuid, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - /// The URL of this group's avatar image. - #[serde(rename = "avatar_url", skip_serializing_if = "Option::is_none")] - pub avatar_url: Option, - #[serde(rename = "external")] - pub external: Box, - /// **Deprecated** Whether or not this group is a developer. - #[serde(rename = "is_developer")] - pub is_developer: bool, - /// Follows regex ^(?:[^\\n\\r]+\\n?|\\n){1,5}$ - #[serde(rename = "bio")] - pub bio: String, - /// Whether or not the current identity is a member of this group. - #[serde(rename = "is_current_identity_member")] - pub is_current_identity_member: bool, - #[serde(rename = "publicity")] - pub publicity: crate::models::GroupPublicity, - #[serde(rename = "member_count")] - pub member_count: i32, - #[serde(rename = "owner_identity_id")] - pub owner_identity_id: uuid::Uuid, + #[serde(rename = "group_id")] + pub group_id: uuid::Uuid, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + /// The URL of this group's avatar image. + #[serde(rename = "avatar_url", skip_serializing_if = "Option::is_none")] + pub avatar_url: Option, + #[serde(rename = "external")] + pub external: Box, + /// **Deprecated** Whether or not this group is a developer. + #[serde(rename = "is_developer")] + pub is_developer: bool, + /// Follows regex ^(?:[^\\n\\r]+\\n?|\\n){1,5}$ + #[serde(rename = "bio")] + pub bio: String, + /// Whether or not the current identity is a member of this group. + #[serde(rename = "is_current_identity_member")] + pub is_current_identity_member: bool, + #[serde(rename = "publicity")] + pub publicity: crate::models::GroupPublicity, + #[serde(rename = "member_count")] + pub member_count: i32, + #[serde(rename = "owner_identity_id")] + pub owner_identity_id: uuid::Uuid, } impl GroupGroupSummary { - pub fn new(group_id: uuid::Uuid, display_name: String, external: crate::models::GroupExternalLinks, is_developer: bool, bio: String, is_current_identity_member: bool, publicity: crate::models::GroupPublicity, member_count: i32, owner_identity_id: uuid::Uuid) -> GroupGroupSummary { - GroupGroupSummary { - group_id, - display_name, - avatar_url: None, - external: Box::new(external), - is_developer, - bio, - is_current_identity_member, - publicity, - member_count, - owner_identity_id, - } - } + pub fn new( + group_id: uuid::Uuid, + display_name: String, + external: crate::models::GroupExternalLinks, + is_developer: bool, + bio: String, + is_current_identity_member: bool, + publicity: crate::models::GroupPublicity, + member_count: i32, + owner_identity_id: uuid::Uuid, + ) -> GroupGroupSummary { + GroupGroupSummary { + group_id, + display_name, + avatar_url: None, + external: Box::new(external), + is_developer, + bio, + is_current_identity_member, + publicity, + member_count, + owner_identity_id, + } + } } - - diff --git a/sdks/api/full/rust/src/models/group_handle.rs b/sdks/api/full/rust/src/models/group_handle.rs index d32ca7f6fe..8a1487667b 100644 --- a/sdks/api/full/rust/src/models/group_handle.rs +++ b/sdks/api/full/rust/src/models/group_handle.rs @@ -4,42 +4,42 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GroupHandle : A group handle. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupHandle { - #[serde(rename = "group_id")] - pub group_id: uuid::Uuid, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - /// The URL of this group's avatar image - #[serde(rename = "avatar_url", skip_serializing_if = "Option::is_none")] - pub avatar_url: Option, - #[serde(rename = "external")] - pub external: Box, - /// Whether or not this group is a developer group. - #[serde(rename = "is_developer", skip_serializing_if = "Option::is_none")] - pub is_developer: Option, + #[serde(rename = "group_id")] + pub group_id: uuid::Uuid, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + /// The URL of this group's avatar image + #[serde(rename = "avatar_url", skip_serializing_if = "Option::is_none")] + pub avatar_url: Option, + #[serde(rename = "external")] + pub external: Box, + /// Whether or not this group is a developer group. + #[serde(rename = "is_developer", skip_serializing_if = "Option::is_none")] + pub is_developer: Option, } impl GroupHandle { - /// A group handle. - pub fn new(group_id: uuid::Uuid, display_name: String, external: crate::models::GroupExternalLinks) -> GroupHandle { - GroupHandle { - group_id, - display_name, - avatar_url: None, - external: Box::new(external), - is_developer: None, - } - } + /// A group handle. + pub fn new( + group_id: uuid::Uuid, + display_name: String, + external: crate::models::GroupExternalLinks, + ) -> GroupHandle { + GroupHandle { + group_id, + display_name, + avatar_url: None, + external: Box::new(external), + is_developer: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/group_join_request.rs b/sdks/api/full/rust/src/models/group_join_request.rs index 64edb19238..b75c57750f 100644 --- a/sdks/api/full/rust/src/models/group_join_request.rs +++ b/sdks/api/full/rust/src/models/group_join_request.rs @@ -4,31 +4,27 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GroupJoinRequest : A group join request. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupJoinRequest { - #[serde(rename = "identity")] - pub identity: Box, - /// RFC3339 timestamp - #[serde(rename = "ts")] - pub ts: String, + #[serde(rename = "identity")] + pub identity: Box, + /// RFC3339 timestamp + #[serde(rename = "ts")] + pub ts: String, } impl GroupJoinRequest { - /// A group join request. - pub fn new(identity: crate::models::IdentityHandle, ts: String) -> GroupJoinRequest { - GroupJoinRequest { - identity: Box::new(identity), - ts, - } - } + /// A group join request. + pub fn new(identity: crate::models::IdentityHandle, ts: String) -> GroupJoinRequest { + GroupJoinRequest { + identity: Box::new(identity), + ts, + } + } } - - diff --git a/sdks/api/full/rust/src/models/group_list_suggested_response.rs b/sdks/api/full/rust/src/models/group_list_suggested_response.rs index 44be6c996d..70066809a6 100644 --- a/sdks/api/full/rust/src/models/group_list_suggested_response.rs +++ b/sdks/api/full/rust/src/models/group_list_suggested_response.rs @@ -4,29 +4,27 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupListSuggestedResponse { - /// A list of group summaries. - #[serde(rename = "groups")] - pub groups: Vec, - #[serde(rename = "watch")] - pub watch: Box, + /// A list of group summaries. + #[serde(rename = "groups")] + pub groups: Vec, + #[serde(rename = "watch")] + pub watch: Box, } impl GroupListSuggestedResponse { - pub fn new(groups: Vec, watch: crate::models::WatchResponse) -> GroupListSuggestedResponse { - GroupListSuggestedResponse { - groups, - watch: Box::new(watch), - } - } + pub fn new( + groups: Vec, + watch: crate::models::WatchResponse, + ) -> GroupListSuggestedResponse { + GroupListSuggestedResponse { + groups, + watch: Box::new(watch), + } + } } - - diff --git a/sdks/api/full/rust/src/models/group_member.rs b/sdks/api/full/rust/src/models/group_member.rs index aecd0ba064..99ae2414ef 100644 --- a/sdks/api/full/rust/src/models/group_member.rs +++ b/sdks/api/full/rust/src/models/group_member.rs @@ -4,27 +4,23 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GroupMember : A group member. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupMember { - #[serde(rename = "identity")] - pub identity: Box, + #[serde(rename = "identity")] + pub identity: Box, } impl GroupMember { - /// A group member. - pub fn new(identity: crate::models::IdentityHandle) -> GroupMember { - GroupMember { - identity: Box::new(identity), - } - } + /// A group member. + pub fn new(identity: crate::models::IdentityHandle) -> GroupMember { + GroupMember { + identity: Box::new(identity), + } + } } - - diff --git a/sdks/api/full/rust/src/models/group_prepare_avatar_upload_request.rs b/sdks/api/full/rust/src/models/group_prepare_avatar_upload_request.rs index 282865687d..39cf538f33 100644 --- a/sdks/api/full/rust/src/models/group_prepare_avatar_upload_request.rs +++ b/sdks/api/full/rust/src/models/group_prepare_avatar_upload_request.rs @@ -4,34 +4,29 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupPrepareAvatarUploadRequest { - /// The path/filename of the group avatar. - #[serde(rename = "path")] - pub path: String, - /// The MIME type of the group avatar. - #[serde(rename = "mime", skip_serializing_if = "Option::is_none")] - pub mime: Option, - /// Unsigned 64 bit integer. - #[serde(rename = "content_length")] - pub content_length: i64, + /// The path/filename of the group avatar. + #[serde(rename = "path")] + pub path: String, + /// The MIME type of the group avatar. + #[serde(rename = "mime", skip_serializing_if = "Option::is_none")] + pub mime: Option, + /// Unsigned 64 bit integer. + #[serde(rename = "content_length")] + pub content_length: i64, } impl GroupPrepareAvatarUploadRequest { - pub fn new(path: String, content_length: i64) -> GroupPrepareAvatarUploadRequest { - GroupPrepareAvatarUploadRequest { - path, - mime: None, - content_length, - } - } + pub fn new(path: String, content_length: i64) -> GroupPrepareAvatarUploadRequest { + GroupPrepareAvatarUploadRequest { + path, + mime: None, + content_length, + } + } } - - diff --git a/sdks/api/full/rust/src/models/group_prepare_avatar_upload_response.rs b/sdks/api/full/rust/src/models/group_prepare_avatar_upload_response.rs index 6a33db23b5..65599b10ea 100644 --- a/sdks/api/full/rust/src/models/group_prepare_avatar_upload_response.rs +++ b/sdks/api/full/rust/src/models/group_prepare_avatar_upload_response.rs @@ -4,28 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupPrepareAvatarUploadResponse { - #[serde(rename = "upload_id")] - pub upload_id: uuid::Uuid, - #[serde(rename = "presigned_request")] - pub presigned_request: Box, + #[serde(rename = "upload_id")] + pub upload_id: uuid::Uuid, + #[serde(rename = "presigned_request")] + pub presigned_request: Box, } impl GroupPrepareAvatarUploadResponse { - pub fn new(upload_id: uuid::Uuid, presigned_request: crate::models::UploadPresignedRequest) -> GroupPrepareAvatarUploadResponse { - GroupPrepareAvatarUploadResponse { - upload_id, - presigned_request: Box::new(presigned_request), - } - } + pub fn new( + upload_id: uuid::Uuid, + presigned_request: crate::models::UploadPresignedRequest, + ) -> GroupPrepareAvatarUploadResponse { + GroupPrepareAvatarUploadResponse { + upload_id, + presigned_request: Box::new(presigned_request), + } + } } - - diff --git a/sdks/api/full/rust/src/models/group_profile.rs b/sdks/api/full/rust/src/models/group_profile.rs index d4f4f8dbd4..d67fead02b 100644 --- a/sdks/api/full/rust/src/models/group_profile.rs +++ b/sdks/api/full/rust/src/models/group_profile.rs @@ -4,72 +4,83 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GroupProfile : A list of group profiles. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupProfile { - #[serde(rename = "group_id")] - pub group_id: uuid::Uuid, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - /// The URL of this group's avatar image. - #[serde(rename = "avatar_url", skip_serializing_if = "Option::is_none")] - pub avatar_url: Option, - #[serde(rename = "external")] - pub external: Box, - /// Whether or not this group is a developer. - #[serde(rename = "is_developer", skip_serializing_if = "Option::is_none")] - pub is_developer: Option, - /// Detailed information about a profile. - #[serde(rename = "bio")] - pub bio: String, - /// Whether or not the current identity is a member of this group. - #[serde(rename = "is_current_identity_member", skip_serializing_if = "Option::is_none")] - pub is_current_identity_member: Option, - #[serde(rename = "publicity")] - pub publicity: crate::models::GroupPublicity, - /// Unsigned 32 bit integer. - #[serde(rename = "member_count", skip_serializing_if = "Option::is_none")] - pub member_count: Option, - /// A list of group members. - #[serde(rename = "members")] - pub members: Vec, - /// A list of group join requests. - #[serde(rename = "join_requests")] - pub join_requests: Vec, - /// Whether or not the current identity is currently requesting to join this group. - #[serde(rename = "is_current_identity_requesting_join", skip_serializing_if = "Option::is_none")] - pub is_current_identity_requesting_join: Option, - #[serde(rename = "owner_identity_id")] - pub owner_identity_id: uuid::Uuid, + #[serde(rename = "group_id")] + pub group_id: uuid::Uuid, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + /// The URL of this group's avatar image. + #[serde(rename = "avatar_url", skip_serializing_if = "Option::is_none")] + pub avatar_url: Option, + #[serde(rename = "external")] + pub external: Box, + /// Whether or not this group is a developer. + #[serde(rename = "is_developer", skip_serializing_if = "Option::is_none")] + pub is_developer: Option, + /// Detailed information about a profile. + #[serde(rename = "bio")] + pub bio: String, + /// Whether or not the current identity is a member of this group. + #[serde( + rename = "is_current_identity_member", + skip_serializing_if = "Option::is_none" + )] + pub is_current_identity_member: Option, + #[serde(rename = "publicity")] + pub publicity: crate::models::GroupPublicity, + /// Unsigned 32 bit integer. + #[serde(rename = "member_count", skip_serializing_if = "Option::is_none")] + pub member_count: Option, + /// A list of group members. + #[serde(rename = "members")] + pub members: Vec, + /// A list of group join requests. + #[serde(rename = "join_requests")] + pub join_requests: Vec, + /// Whether or not the current identity is currently requesting to join this group. + #[serde( + rename = "is_current_identity_requesting_join", + skip_serializing_if = "Option::is_none" + )] + pub is_current_identity_requesting_join: Option, + #[serde(rename = "owner_identity_id")] + pub owner_identity_id: uuid::Uuid, } impl GroupProfile { - /// A list of group profiles. - pub fn new(group_id: uuid::Uuid, display_name: String, external: crate::models::GroupExternalLinks, bio: String, publicity: crate::models::GroupPublicity, members: Vec, join_requests: Vec, owner_identity_id: uuid::Uuid) -> GroupProfile { - GroupProfile { - group_id, - display_name, - avatar_url: None, - external: Box::new(external), - is_developer: None, - bio, - is_current_identity_member: None, - publicity, - member_count: None, - members, - join_requests, - is_current_identity_requesting_join: None, - owner_identity_id, - } - } + /// A list of group profiles. + pub fn new( + group_id: uuid::Uuid, + display_name: String, + external: crate::models::GroupExternalLinks, + bio: String, + publicity: crate::models::GroupPublicity, + members: Vec, + join_requests: Vec, + owner_identity_id: uuid::Uuid, + ) -> GroupProfile { + GroupProfile { + group_id, + display_name, + avatar_url: None, + external: Box::new(external), + is_developer: None, + bio, + is_current_identity_member: None, + publicity, + member_count: None, + members, + join_requests, + is_current_identity_requesting_join: None, + owner_identity_id, + } + } } - - diff --git a/sdks/api/full/rust/src/models/group_publicity.rs b/sdks/api/full/rust/src/models/group_publicity.rs index e8d758d80b..1e540fd925 100644 --- a/sdks/api/full/rust/src/models/group_publicity.rs +++ b/sdks/api/full/rust/src/models/group_publicity.rs @@ -4,7 +4,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -13,28 +13,23 @@ /// The current publicity value for the given group. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum GroupPublicity { - #[serde(rename = "open")] - Open, - #[serde(rename = "closed")] - Closed, - + #[serde(rename = "open")] + Open, + #[serde(rename = "closed")] + Closed, } impl ToString for GroupPublicity { - fn to_string(&self) -> String { - match self { - Self::Open => String::from("open"), - Self::Closed => String::from("closed"), - } - } + fn to_string(&self) -> String { + match self { + Self::Open => String::from("open"), + Self::Closed => String::from("closed"), + } + } } impl Default for GroupPublicity { - fn default() -> GroupPublicity { - Self::Open - } + fn default() -> GroupPublicity { + Self::Open + } } - - - - diff --git a/sdks/api/full/rust/src/models/group_resolve_join_request_request.rs b/sdks/api/full/rust/src/models/group_resolve_join_request_request.rs index 32c1e7fef7..79f4861803 100644 --- a/sdks/api/full/rust/src/models/group_resolve_join_request_request.rs +++ b/sdks/api/full/rust/src/models/group_resolve_join_request_request.rs @@ -4,25 +4,18 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupResolveJoinRequestRequest { - #[serde(rename = "resolution", skip_serializing_if = "Option::is_none")] - pub resolution: Option, + #[serde(rename = "resolution", skip_serializing_if = "Option::is_none")] + pub resolution: Option, } impl GroupResolveJoinRequestRequest { - pub fn new() -> GroupResolveJoinRequestRequest { - GroupResolveJoinRequestRequest { - resolution: None, - } - } + pub fn new() -> GroupResolveJoinRequestRequest { + GroupResolveJoinRequestRequest { resolution: None } + } } - - diff --git a/sdks/api/full/rust/src/models/group_transfer_ownership_request.rs b/sdks/api/full/rust/src/models/group_transfer_ownership_request.rs index 39cbd20782..00711905d3 100644 --- a/sdks/api/full/rust/src/models/group_transfer_ownership_request.rs +++ b/sdks/api/full/rust/src/models/group_transfer_ownership_request.rs @@ -4,26 +4,21 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupTransferOwnershipRequest { - /// Identity to transfer the group to. Must be a member of the group. - #[serde(rename = "new_owner_identity_id")] - pub new_owner_identity_id: String, + /// Identity to transfer the group to. Must be a member of the group. + #[serde(rename = "new_owner_identity_id")] + pub new_owner_identity_id: String, } impl GroupTransferOwnershipRequest { - pub fn new(new_owner_identity_id: String) -> GroupTransferOwnershipRequest { - GroupTransferOwnershipRequest { - new_owner_identity_id, - } - } + pub fn new(new_owner_identity_id: String) -> GroupTransferOwnershipRequest { + GroupTransferOwnershipRequest { + new_owner_identity_id, + } + } } - - diff --git a/sdks/api/full/rust/src/models/group_update_profile_request.rs b/sdks/api/full/rust/src/models/group_update_profile_request.rs index 82d4ae2cac..8eba9069b3 100644 --- a/sdks/api/full/rust/src/models/group_update_profile_request.rs +++ b/sdks/api/full/rust/src/models/group_update_profile_request.rs @@ -4,33 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupUpdateProfileRequest { - /// Represent a resource's readable display name. - #[serde(rename = "display_name", skip_serializing_if = "Option::is_none")] - pub display_name: Option, - /// Detailed information about a profile. - #[serde(rename = "bio", skip_serializing_if = "Option::is_none")] - pub bio: Option, - #[serde(rename = "publicity", skip_serializing_if = "Option::is_none")] - pub publicity: Option, + /// Represent a resource's readable display name. + #[serde(rename = "display_name", skip_serializing_if = "Option::is_none")] + pub display_name: Option, + /// Detailed information about a profile. + #[serde(rename = "bio", skip_serializing_if = "Option::is_none")] + pub bio: Option, + #[serde(rename = "publicity", skip_serializing_if = "Option::is_none")] + pub publicity: Option, } impl GroupUpdateProfileRequest { - pub fn new() -> GroupUpdateProfileRequest { - GroupUpdateProfileRequest { - display_name: None, - bio: None, - publicity: None, - } - } + pub fn new() -> GroupUpdateProfileRequest { + GroupUpdateProfileRequest { + display_name: None, + bio: None, + publicity: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/group_validate_profile_request.rs b/sdks/api/full/rust/src/models/group_validate_profile_request.rs index cd35cc6220..2d19354a5d 100644 --- a/sdks/api/full/rust/src/models/group_validate_profile_request.rs +++ b/sdks/api/full/rust/src/models/group_validate_profile_request.rs @@ -4,33 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupValidateProfileRequest { - /// Represent a resource's readable display name. - #[serde(rename = "display_name", skip_serializing_if = "Option::is_none")] - pub display_name: Option, - /// Represent a resource's readable display name. - #[serde(rename = "bio", skip_serializing_if = "Option::is_none")] - pub bio: Option, - #[serde(rename = "publicity", skip_serializing_if = "Option::is_none")] - pub publicity: Option, + /// Represent a resource's readable display name. + #[serde(rename = "display_name", skip_serializing_if = "Option::is_none")] + pub display_name: Option, + /// Represent a resource's readable display name. + #[serde(rename = "bio", skip_serializing_if = "Option::is_none")] + pub bio: Option, + #[serde(rename = "publicity", skip_serializing_if = "Option::is_none")] + pub publicity: Option, } impl GroupValidateProfileRequest { - pub fn new() -> GroupValidateProfileRequest { - GroupValidateProfileRequest { - display_name: None, - bio: None, - publicity: None, - } - } + pub fn new() -> GroupValidateProfileRequest { + GroupValidateProfileRequest { + display_name: None, + bio: None, + publicity: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/group_validate_profile_response.rs b/sdks/api/full/rust/src/models/group_validate_profile_response.rs index decad7e290..794edc06d0 100644 --- a/sdks/api/full/rust/src/models/group_validate_profile_response.rs +++ b/sdks/api/full/rust/src/models/group_validate_profile_response.rs @@ -4,26 +4,19 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct GroupValidateProfileResponse { - /// A list of validation errors. - #[serde(rename = "errors")] - pub errors: Vec, + /// A list of validation errors. + #[serde(rename = "errors")] + pub errors: Vec, } impl GroupValidateProfileResponse { - pub fn new(errors: Vec) -> GroupValidateProfileResponse { - GroupValidateProfileResponse { - errors, - } - } + pub fn new(errors: Vec) -> GroupValidateProfileResponse { + GroupValidateProfileResponse { errors } + } } - - diff --git a/sdks/api/full/rust/src/models/identity_dev_state.rs b/sdks/api/full/rust/src/models/identity_dev_state.rs index bfe9d673a4..b36d78c727 100644 --- a/sdks/api/full/rust/src/models/identity_dev_state.rs +++ b/sdks/api/full/rust/src/models/identity_dev_state.rs @@ -4,7 +4,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -13,31 +13,26 @@ /// The state of the given identity's developer status. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum IdentityDevState { - #[serde(rename = "inactive")] - Inactive, - #[serde(rename = "pending")] - Pending, - #[serde(rename = "accepted")] - Accepted, - + #[serde(rename = "inactive")] + Inactive, + #[serde(rename = "pending")] + Pending, + #[serde(rename = "accepted")] + Accepted, } impl ToString for IdentityDevState { - fn to_string(&self) -> String { - match self { - Self::Inactive => String::from("inactive"), - Self::Pending => String::from("pending"), - Self::Accepted => String::from("accepted"), - } - } + fn to_string(&self) -> String { + match self { + Self::Inactive => String::from("inactive"), + Self::Pending => String::from("pending"), + Self::Accepted => String::from("accepted"), + } + } } impl Default for IdentityDevState { - fn default() -> IdentityDevState { - Self::Inactive - } + fn default() -> IdentityDevState { + Self::Inactive + } } - - - - diff --git a/sdks/api/full/rust/src/models/identity_email_linked_account.rs b/sdks/api/full/rust/src/models/identity_email_linked_account.rs index 6c458bb42f..a86d5eca1f 100644 --- a/sdks/api/full/rust/src/models/identity_email_linked_account.rs +++ b/sdks/api/full/rust/src/models/identity_email_linked_account.rs @@ -4,28 +4,22 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// IdentityEmailLinkedAccount : An identity's linked email. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityEmailLinkedAccount { - /// A valid email address - #[serde(rename = "email")] - pub email: String, + /// A valid email address + #[serde(rename = "email")] + pub email: String, } impl IdentityEmailLinkedAccount { - /// An identity's linked email. - pub fn new(email: String) -> IdentityEmailLinkedAccount { - IdentityEmailLinkedAccount { - email, - } - } + /// An identity's linked email. + pub fn new(email: String) -> IdentityEmailLinkedAccount { + IdentityEmailLinkedAccount { email } + } } - - diff --git a/sdks/api/full/rust/src/models/identity_external_links.rs b/sdks/api/full/rust/src/models/identity_external_links.rs index dddc3a0917..35a1d52d88 100644 --- a/sdks/api/full/rust/src/models/identity_external_links.rs +++ b/sdks/api/full/rust/src/models/identity_external_links.rs @@ -4,32 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// IdentityExternalLinks : External links for an identity. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityExternalLinks { - /// A link to this identity's profile page. - #[serde(rename = "profile")] - pub profile: String, - /// A link to the Rivet settings page. - #[serde(rename = "settings", skip_serializing_if = "Option::is_none")] - pub settings: Option, + /// A link to this identity's profile page. + #[serde(rename = "profile")] + pub profile: String, + /// A link to the Rivet settings page. + #[serde(rename = "settings", skip_serializing_if = "Option::is_none")] + pub settings: Option, } impl IdentityExternalLinks { - /// External links for an identity. - pub fn new(profile: String) -> IdentityExternalLinks { - IdentityExternalLinks { - profile, - settings: None, - } - } + /// External links for an identity. + pub fn new(profile: String) -> IdentityExternalLinks { + IdentityExternalLinks { + profile, + settings: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/identity_game_activity.rs b/sdks/api/full/rust/src/models/identity_game_activity.rs index 594ee11182..f34c70d347 100644 --- a/sdks/api/full/rust/src/models/identity_game_activity.rs +++ b/sdks/api/full/rust/src/models/identity_game_activity.rs @@ -4,39 +4,45 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// IdentityGameActivity : The game an identity is currently participating in. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityGameActivity { - #[serde(rename = "game")] - pub game: Box, - /// A short activity message about the current game activity. - #[serde(rename = "message")] - pub message: String, - /// JSON data seen by anyone. - #[serde(rename = "public_metadata", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub public_metadata: Option>, - /// JSON data seen only by the given identity and their mutual followers. - #[serde(rename = "mutual_metadata", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub mutual_metadata: Option>, + #[serde(rename = "game")] + pub game: Box, + /// A short activity message about the current game activity. + #[serde(rename = "message")] + pub message: String, + /// JSON data seen by anyone. + #[serde( + rename = "public_metadata", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub public_metadata: Option>, + /// JSON data seen only by the given identity and their mutual followers. + #[serde( + rename = "mutual_metadata", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub mutual_metadata: Option>, } impl IdentityGameActivity { - /// The game an identity is currently participating in. - pub fn new(game: crate::models::GameHandle, message: String) -> IdentityGameActivity { - IdentityGameActivity { - game: Box::new(game), - message, - public_metadata: None, - mutual_metadata: None, - } - } + /// The game an identity is currently participating in. + pub fn new(game: crate::models::GameHandle, message: String) -> IdentityGameActivity { + IdentityGameActivity { + game: Box::new(game), + message, + public_metadata: None, + mutual_metadata: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/identity_game_link_status.rs b/sdks/api/full/rust/src/models/identity_game_link_status.rs index 8fc24f518e..b9c9934697 100644 --- a/sdks/api/full/rust/src/models/identity_game_link_status.rs +++ b/sdks/api/full/rust/src/models/identity_game_link_status.rs @@ -4,39 +4,33 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum IdentityGameLinkStatus { - #[serde(rename = "incomplete")] - Incomplete, - #[serde(rename = "complete")] - Complete, - #[serde(rename = "cancelled")] - Cancelled, - + #[serde(rename = "incomplete")] + Incomplete, + #[serde(rename = "complete")] + Complete, + #[serde(rename = "cancelled")] + Cancelled, } impl ToString for IdentityGameLinkStatus { - fn to_string(&self) -> String { - match self { - Self::Incomplete => String::from("incomplete"), - Self::Complete => String::from("complete"), - Self::Cancelled => String::from("cancelled"), - } - } + fn to_string(&self) -> String { + match self { + Self::Incomplete => String::from("incomplete"), + Self::Complete => String::from("complete"), + Self::Cancelled => String::from("cancelled"), + } + } } impl Default for IdentityGameLinkStatus { - fn default() -> IdentityGameLinkStatus { - Self::Incomplete - } + fn default() -> IdentityGameLinkStatus { + Self::Incomplete + } } - - - - diff --git a/sdks/api/full/rust/src/models/identity_get_handles_response.rs b/sdks/api/full/rust/src/models/identity_get_handles_response.rs index ddbb9f7a0a..ac8508481f 100644 --- a/sdks/api/full/rust/src/models/identity_get_handles_response.rs +++ b/sdks/api/full/rust/src/models/identity_get_handles_response.rs @@ -4,28 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityGetHandlesResponse { - #[serde(rename = "identities")] - pub identities: Vec, - #[serde(rename = "watch")] - pub watch: Box, + #[serde(rename = "identities")] + pub identities: Vec, + #[serde(rename = "watch")] + pub watch: Box, } impl IdentityGetHandlesResponse { - pub fn new(identities: Vec, watch: crate::models::WatchResponse) -> IdentityGetHandlesResponse { - IdentityGetHandlesResponse { - identities, - watch: Box::new(watch), - } - } + pub fn new( + identities: Vec, + watch: crate::models::WatchResponse, + ) -> IdentityGetHandlesResponse { + IdentityGetHandlesResponse { + identities, + watch: Box::new(watch), + } + } } - - diff --git a/sdks/api/full/rust/src/models/identity_get_profile_response.rs b/sdks/api/full/rust/src/models/identity_get_profile_response.rs index a1e34af613..77765e009b 100644 --- a/sdks/api/full/rust/src/models/identity_get_profile_response.rs +++ b/sdks/api/full/rust/src/models/identity_get_profile_response.rs @@ -4,28 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityGetProfileResponse { - #[serde(rename = "identity")] - pub identity: Box, - #[serde(rename = "watch")] - pub watch: Box, + #[serde(rename = "identity")] + pub identity: Box, + #[serde(rename = "watch")] + pub watch: Box, } impl IdentityGetProfileResponse { - pub fn new(identity: crate::models::IdentityProfile, watch: crate::models::WatchResponse) -> IdentityGetProfileResponse { - IdentityGetProfileResponse { - identity: Box::new(identity), - watch: Box::new(watch), - } - } + pub fn new( + identity: crate::models::IdentityProfile, + watch: crate::models::WatchResponse, + ) -> IdentityGetProfileResponse { + IdentityGetProfileResponse { + identity: Box::new(identity), + watch: Box::new(watch), + } + } } - - diff --git a/sdks/api/full/rust/src/models/identity_get_summaries_response.rs b/sdks/api/full/rust/src/models/identity_get_summaries_response.rs index bf83a8b651..42b328cd1f 100644 --- a/sdks/api/full/rust/src/models/identity_get_summaries_response.rs +++ b/sdks/api/full/rust/src/models/identity_get_summaries_response.rs @@ -4,28 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityGetSummariesResponse { - #[serde(rename = "identities")] - pub identities: Vec, - #[serde(rename = "watch")] - pub watch: Box, + #[serde(rename = "identities")] + pub identities: Vec, + #[serde(rename = "watch")] + pub watch: Box, } impl IdentityGetSummariesResponse { - pub fn new(identities: Vec, watch: crate::models::WatchResponse) -> IdentityGetSummariesResponse { - IdentityGetSummariesResponse { - identities, - watch: Box::new(watch), - } - } + pub fn new( + identities: Vec, + watch: crate::models::WatchResponse, + ) -> IdentityGetSummariesResponse { + IdentityGetSummariesResponse { + identities, + watch: Box::new(watch), + } + } } - - diff --git a/sdks/api/full/rust/src/models/identity_global_event.rs b/sdks/api/full/rust/src/models/identity_global_event.rs index 9108b0340c..db41531cb6 100644 --- a/sdks/api/full/rust/src/models/identity_global_event.rs +++ b/sdks/api/full/rust/src/models/identity_global_event.rs @@ -4,34 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// IdentityGlobalEvent : An event relevant to the current identity. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityGlobalEvent { - /// RFC3339 timestamp - #[serde(rename = "ts")] - pub ts: String, - #[serde(rename = "kind")] - pub kind: Box, - #[serde(rename = "notification", skip_serializing_if = "Option::is_none")] - pub notification: Option>, + /// RFC3339 timestamp + #[serde(rename = "ts")] + pub ts: String, + #[serde(rename = "kind")] + pub kind: Box, + #[serde(rename = "notification", skip_serializing_if = "Option::is_none")] + pub notification: Option>, } impl IdentityGlobalEvent { - /// An event relevant to the current identity. - pub fn new(ts: String, kind: crate::models::IdentityGlobalEventKind) -> IdentityGlobalEvent { - IdentityGlobalEvent { - ts, - kind: Box::new(kind), - notification: None, - } - } + /// An event relevant to the current identity. + pub fn new(ts: String, kind: crate::models::IdentityGlobalEventKind) -> IdentityGlobalEvent { + IdentityGlobalEvent { + ts, + kind: Box::new(kind), + notification: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/identity_global_event_identity_update.rs b/sdks/api/full/rust/src/models/identity_global_event_identity_update.rs index 5ccdc16e9f..0af36942a3 100644 --- a/sdks/api/full/rust/src/models/identity_global_event_identity_update.rs +++ b/sdks/api/full/rust/src/models/identity_global_event_identity_update.rs @@ -4,25 +4,20 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityGlobalEventIdentityUpdate { - #[serde(rename = "identity")] - pub identity: Box, + #[serde(rename = "identity")] + pub identity: Box, } impl IdentityGlobalEventIdentityUpdate { - pub fn new(identity: crate::models::IdentityProfile) -> IdentityGlobalEventIdentityUpdate { - IdentityGlobalEventIdentityUpdate { - identity: Box::new(identity), - } - } + pub fn new(identity: crate::models::IdentityProfile) -> IdentityGlobalEventIdentityUpdate { + IdentityGlobalEventIdentityUpdate { + identity: Box::new(identity), + } + } } - - diff --git a/sdks/api/full/rust/src/models/identity_global_event_kind.rs b/sdks/api/full/rust/src/models/identity_global_event_kind.rs index fab257077b..23f8447a1a 100644 --- a/sdks/api/full/rust/src/models/identity_global_event_kind.rs +++ b/sdks/api/full/rust/src/models/identity_global_event_kind.rs @@ -4,25 +4,20 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityGlobalEventKind { - #[serde(rename = "identity_update", skip_serializing_if = "Option::is_none")] - pub identity_update: Option>, + #[serde(rename = "identity_update", skip_serializing_if = "Option::is_none")] + pub identity_update: Option>, } impl IdentityGlobalEventKind { - pub fn new() -> IdentityGlobalEventKind { - IdentityGlobalEventKind { - identity_update: None, - } - } + pub fn new() -> IdentityGlobalEventKind { + IdentityGlobalEventKind { + identity_update: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/identity_global_event_notification.rs b/sdks/api/full/rust/src/models/identity_global_event_notification.rs index cc09acd840..711b8a406a 100644 --- a/sdks/api/full/rust/src/models/identity_global_event_notification.rs +++ b/sdks/api/full/rust/src/models/identity_global_event_notification.rs @@ -4,38 +4,39 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// IdentityGlobalEventNotification : Notifications represent information that should be presented to the user immediately. At the moment, only chat message events have associated notifications. # Display Notifications should be displayed in an unobtrusive manner throughout the entire game. Notifications should disappear after a few seconds if not interacted with. # Interactions If your platform supports it, notifications should be able to be clicked or tapped in order to open the relevant context for the event. For a simple implementation of notification interactions, open `url` in a web browser to present the relevant context. For example, a chat message notification will open the thread the chat message was sent in. For advanced implementations that implement a custom chat UI, use `GlobalEvent.kind` to determine what action to take when the notification is interacted with. For example, if the global event kind is `GlobalEventChatMessage`, then open the chat UI for the given thread. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityGlobalEventNotification { - #[serde(rename = "title")] - pub title: String, - #[serde(rename = "description")] - pub description: String, - /// URL to an image thumbnail that should be shown for this notification. - #[serde(rename = "thumbnail_url")] - pub thumbnail_url: String, - /// Rivet Hub URL that holds the relevant context for this notification. - #[serde(rename = "url")] - pub url: String, + #[serde(rename = "title")] + pub title: String, + #[serde(rename = "description")] + pub description: String, + /// URL to an image thumbnail that should be shown for this notification. + #[serde(rename = "thumbnail_url")] + pub thumbnail_url: String, + /// Rivet Hub URL that holds the relevant context for this notification. + #[serde(rename = "url")] + pub url: String, } impl IdentityGlobalEventNotification { - /// Notifications represent information that should be presented to the user immediately. At the moment, only chat message events have associated notifications. # Display Notifications should be displayed in an unobtrusive manner throughout the entire game. Notifications should disappear after a few seconds if not interacted with. # Interactions If your platform supports it, notifications should be able to be clicked or tapped in order to open the relevant context for the event. For a simple implementation of notification interactions, open `url` in a web browser to present the relevant context. For example, a chat message notification will open the thread the chat message was sent in. For advanced implementations that implement a custom chat UI, use `GlobalEvent.kind` to determine what action to take when the notification is interacted with. For example, if the global event kind is `GlobalEventChatMessage`, then open the chat UI for the given thread. - pub fn new(title: String, description: String, thumbnail_url: String, url: String) -> IdentityGlobalEventNotification { - IdentityGlobalEventNotification { - title, - description, - thumbnail_url, - url, - } - } + /// Notifications represent information that should be presented to the user immediately. At the moment, only chat message events have associated notifications. # Display Notifications should be displayed in an unobtrusive manner throughout the entire game. Notifications should disappear after a few seconds if not interacted with. # Interactions If your platform supports it, notifications should be able to be clicked or tapped in order to open the relevant context for the event. For a simple implementation of notification interactions, open `url` in a web browser to present the relevant context. For example, a chat message notification will open the thread the chat message was sent in. For advanced implementations that implement a custom chat UI, use `GlobalEvent.kind` to determine what action to take when the notification is interacted with. For example, if the global event kind is `GlobalEventChatMessage`, then open the chat UI for the given thread. + pub fn new( + title: String, + description: String, + thumbnail_url: String, + url: String, + ) -> IdentityGlobalEventNotification { + IdentityGlobalEventNotification { + title, + description, + thumbnail_url, + url, + } + } } - - diff --git a/sdks/api/full/rust/src/models/identity_group.rs b/sdks/api/full/rust/src/models/identity_group.rs index a280ad6ad2..2767ddae91 100644 --- a/sdks/api/full/rust/src/models/identity_group.rs +++ b/sdks/api/full/rust/src/models/identity_group.rs @@ -4,27 +4,23 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// IdentityGroup : A group that the given identity. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityGroup { - #[serde(rename = "group")] - pub group: Box, + #[serde(rename = "group")] + pub group: Box, } impl IdentityGroup { - /// A group that the given identity. - pub fn new(group: crate::models::GroupHandle) -> IdentityGroup { - IdentityGroup { - group: Box::new(group), - } - } + /// A group that the given identity. + pub fn new(group: crate::models::GroupHandle) -> IdentityGroup { + IdentityGroup { + group: Box::new(group), + } + } } - - diff --git a/sdks/api/full/rust/src/models/identity_handle.rs b/sdks/api/full/rust/src/models/identity_handle.rs index 8b87a208d2..884b748c2e 100644 --- a/sdks/api/full/rust/src/models/identity_handle.rs +++ b/sdks/api/full/rust/src/models/identity_handle.rs @@ -4,45 +4,48 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// IdentityHandle : An identity handle. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityHandle { - #[serde(rename = "identity_id")] - pub identity_id: uuid::Uuid, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "account_number")] - pub account_number: i32, - /// The URL of this identity's avatar image. - #[serde(rename = "avatar_url")] - pub avatar_url: String, - /// Whether or not this identity is registered with a linked account. - #[serde(rename = "is_registered")] - pub is_registered: bool, - #[serde(rename = "external")] - pub external: Box, + #[serde(rename = "identity_id")] + pub identity_id: uuid::Uuid, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "account_number")] + pub account_number: i32, + /// The URL of this identity's avatar image. + #[serde(rename = "avatar_url")] + pub avatar_url: String, + /// Whether or not this identity is registered with a linked account. + #[serde(rename = "is_registered")] + pub is_registered: bool, + #[serde(rename = "external")] + pub external: Box, } impl IdentityHandle { - /// An identity handle. - pub fn new(identity_id: uuid::Uuid, display_name: String, account_number: i32, avatar_url: String, is_registered: bool, external: crate::models::IdentityExternalLinks) -> IdentityHandle { - IdentityHandle { - identity_id, - display_name, - account_number, - avatar_url, - is_registered, - external: Box::new(external), - } - } + /// An identity handle. + pub fn new( + identity_id: uuid::Uuid, + display_name: String, + account_number: i32, + avatar_url: String, + is_registered: bool, + external: crate::models::IdentityExternalLinks, + ) -> IdentityHandle { + IdentityHandle { + identity_id, + display_name, + account_number, + avatar_url, + is_registered, + external: Box::new(external), + } + } } - - diff --git a/sdks/api/full/rust/src/models/identity_linked_account.rs b/sdks/api/full/rust/src/models/identity_linked_account.rs index 11a5dc2e2a..9bd45da3e5 100644 --- a/sdks/api/full/rust/src/models/identity_linked_account.rs +++ b/sdks/api/full/rust/src/models/identity_linked_account.rs @@ -4,30 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// IdentityLinkedAccount : A union representing an identity's linked accounts. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityLinkedAccount { - #[serde(rename = "email", skip_serializing_if = "Option::is_none")] - pub email: Option>, - #[serde(rename = "default_user", skip_serializing_if = "Option::is_none")] - pub default_user: Option, + #[serde(rename = "email", skip_serializing_if = "Option::is_none")] + pub email: Option>, + #[serde(rename = "default_user", skip_serializing_if = "Option::is_none")] + pub default_user: Option, } impl IdentityLinkedAccount { - /// A union representing an identity's linked accounts. - pub fn new() -> IdentityLinkedAccount { - IdentityLinkedAccount { - email: None, - default_user: None, - } - } + /// A union representing an identity's linked accounts. + pub fn new() -> IdentityLinkedAccount { + IdentityLinkedAccount { + email: None, + default_user: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/identity_list_activities_response.rs b/sdks/api/full/rust/src/models/identity_list_activities_response.rs index 93a62ac2ea..7e99021285 100644 --- a/sdks/api/full/rust/src/models/identity_list_activities_response.rs +++ b/sdks/api/full/rust/src/models/identity_list_activities_response.rs @@ -4,37 +4,38 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityListActivitiesResponse { - #[serde(rename = "identities")] - pub identities: Vec, - #[serde(rename = "games")] - pub games: Vec, - #[serde(rename = "suggested_groups")] - pub suggested_groups: Vec, - #[serde(rename = "suggested_players")] - pub suggested_players: Vec, - #[serde(rename = "watch")] - pub watch: Box, + #[serde(rename = "identities")] + pub identities: Vec, + #[serde(rename = "games")] + pub games: Vec, + #[serde(rename = "suggested_groups")] + pub suggested_groups: Vec, + #[serde(rename = "suggested_players")] + pub suggested_players: Vec, + #[serde(rename = "watch")] + pub watch: Box, } impl IdentityListActivitiesResponse { - pub fn new(identities: Vec, games: Vec, suggested_groups: Vec, suggested_players: Vec, watch: crate::models::WatchResponse) -> IdentityListActivitiesResponse { - IdentityListActivitiesResponse { - identities, - games, - suggested_groups, - suggested_players, - watch: Box::new(watch), - } - } + pub fn new( + identities: Vec, + games: Vec, + suggested_groups: Vec, + suggested_players: Vec, + watch: crate::models::WatchResponse, + ) -> IdentityListActivitiesResponse { + IdentityListActivitiesResponse { + identities, + games, + suggested_groups, + suggested_players, + watch: Box::new(watch), + } + } } - - diff --git a/sdks/api/full/rust/src/models/identity_prepare_avatar_upload_request.rs b/sdks/api/full/rust/src/models/identity_prepare_avatar_upload_request.rs index b892cf5fac..e3b798ce58 100644 --- a/sdks/api/full/rust/src/models/identity_prepare_avatar_upload_request.rs +++ b/sdks/api/full/rust/src/models/identity_prepare_avatar_upload_request.rs @@ -4,32 +4,31 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityPrepareAvatarUploadRequest { - #[serde(rename = "path")] - pub path: String, - /// See https://www.iana.org/assignments/media-types/media-types.xhtml - #[serde(rename = "mime")] - pub mime: String, - #[serde(rename = "content_length")] - pub content_length: i64, + #[serde(rename = "path")] + pub path: String, + /// See https://www.iana.org/assignments/media-types/media-types.xhtml + #[serde(rename = "mime")] + pub mime: String, + #[serde(rename = "content_length")] + pub content_length: i64, } impl IdentityPrepareAvatarUploadRequest { - pub fn new(path: String, mime: String, content_length: i64) -> IdentityPrepareAvatarUploadRequest { - IdentityPrepareAvatarUploadRequest { - path, - mime, - content_length, - } - } + pub fn new( + path: String, + mime: String, + content_length: i64, + ) -> IdentityPrepareAvatarUploadRequest { + IdentityPrepareAvatarUploadRequest { + path, + mime, + content_length, + } + } } - - diff --git a/sdks/api/full/rust/src/models/identity_prepare_avatar_upload_response.rs b/sdks/api/full/rust/src/models/identity_prepare_avatar_upload_response.rs index b1e92da3e3..9c5fcbab50 100644 --- a/sdks/api/full/rust/src/models/identity_prepare_avatar_upload_response.rs +++ b/sdks/api/full/rust/src/models/identity_prepare_avatar_upload_response.rs @@ -4,28 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityPrepareAvatarUploadResponse { - #[serde(rename = "upload_id")] - pub upload_id: uuid::Uuid, - #[serde(rename = "presigned_request")] - pub presigned_request: Box, + #[serde(rename = "upload_id")] + pub upload_id: uuid::Uuid, + #[serde(rename = "presigned_request")] + pub presigned_request: Box, } impl IdentityPrepareAvatarUploadResponse { - pub fn new(upload_id: uuid::Uuid, presigned_request: crate::models::UploadPresignedRequest) -> IdentityPrepareAvatarUploadResponse { - IdentityPrepareAvatarUploadResponse { - upload_id, - presigned_request: Box::new(presigned_request), - } - } + pub fn new( + upload_id: uuid::Uuid, + presigned_request: crate::models::UploadPresignedRequest, + ) -> IdentityPrepareAvatarUploadResponse { + IdentityPrepareAvatarUploadResponse { + upload_id, + presigned_request: Box::new(presigned_request), + } + } } - - diff --git a/sdks/api/full/rust/src/models/identity_profile.rs b/sdks/api/full/rust/src/models/identity_profile.rs index 512fa1c058..017b82d909 100644 --- a/sdks/api/full/rust/src/models/identity_profile.rs +++ b/sdks/api/full/rust/src/models/identity_profile.rs @@ -4,94 +4,108 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// IdentityProfile : An identity profile. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityProfile { - #[serde(rename = "identity_id")] - pub identity_id: uuid::Uuid, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "account_number")] - pub account_number: i32, - /// The URL of this identity's avatar image. - #[serde(rename = "avatar_url")] - pub avatar_url: String, - /// Whether or not this identity is registered with a linked account. - #[serde(rename = "is_registered")] - pub is_registered: bool, - #[serde(rename = "external")] - pub external: Box, - /// Whether or not this identity is an admin. - #[serde(rename = "is_admin")] - pub is_admin: bool, - /// Whether or not this game user has been linked through the Rivet dashboard. - #[serde(rename = "is_game_linked", skip_serializing_if = "Option::is_none")] - pub is_game_linked: Option, - #[serde(rename = "dev_state", skip_serializing_if = "Option::is_none")] - pub dev_state: Option, - #[serde(rename = "follower_count")] - pub follower_count: i64, - #[serde(rename = "following_count")] - pub following_count: i64, - /// Whether or not the requestee's identity is following this identity. - #[serde(rename = "following")] - pub following: bool, - /// Whether or not this identity is both following and is followed by the requestee's identity. - #[serde(rename = "is_following_me")] - pub is_following_me: bool, - #[serde(rename = "is_mutual_following")] - pub is_mutual_following: bool, - /// RFC3339 timestamp - #[serde(rename = "join_ts")] - pub join_ts: String, - /// Follows regex ^(?:[^\\n\\r]+\\n?|\\n){1,5}$ - #[serde(rename = "bio")] - pub bio: String, - #[serde(rename = "linked_accounts")] - pub linked_accounts: Vec, - #[serde(rename = "groups")] - pub groups: Vec, - #[serde(rename = "games")] - pub games: Vec, - /// Whether or not this identity is awaiting account deletion. Only visible to when the requestee is this identity. - #[serde(rename = "awaiting_deletion", skip_serializing_if = "Option::is_none")] - pub awaiting_deletion: Option, + #[serde(rename = "identity_id")] + pub identity_id: uuid::Uuid, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "account_number")] + pub account_number: i32, + /// The URL of this identity's avatar image. + #[serde(rename = "avatar_url")] + pub avatar_url: String, + /// Whether or not this identity is registered with a linked account. + #[serde(rename = "is_registered")] + pub is_registered: bool, + #[serde(rename = "external")] + pub external: Box, + /// Whether or not this identity is an admin. + #[serde(rename = "is_admin")] + pub is_admin: bool, + /// Whether or not this game user has been linked through the Rivet dashboard. + #[serde(rename = "is_game_linked", skip_serializing_if = "Option::is_none")] + pub is_game_linked: Option, + #[serde(rename = "dev_state", skip_serializing_if = "Option::is_none")] + pub dev_state: Option, + #[serde(rename = "follower_count")] + pub follower_count: i64, + #[serde(rename = "following_count")] + pub following_count: i64, + /// Whether or not the requestee's identity is following this identity. + #[serde(rename = "following")] + pub following: bool, + /// Whether or not this identity is both following and is followed by the requestee's identity. + #[serde(rename = "is_following_me")] + pub is_following_me: bool, + #[serde(rename = "is_mutual_following")] + pub is_mutual_following: bool, + /// RFC3339 timestamp + #[serde(rename = "join_ts")] + pub join_ts: String, + /// Follows regex ^(?:[^\\n\\r]+\\n?|\\n){1,5}$ + #[serde(rename = "bio")] + pub bio: String, + #[serde(rename = "linked_accounts")] + pub linked_accounts: Vec, + #[serde(rename = "groups")] + pub groups: Vec, + #[serde(rename = "games")] + pub games: Vec, + /// Whether or not this identity is awaiting account deletion. Only visible to when the requestee is this identity. + #[serde(rename = "awaiting_deletion", skip_serializing_if = "Option::is_none")] + pub awaiting_deletion: Option, } impl IdentityProfile { - /// An identity profile. - pub fn new(identity_id: uuid::Uuid, display_name: String, account_number: i32, avatar_url: String, is_registered: bool, external: crate::models::IdentityExternalLinks, is_admin: bool, follower_count: i64, following_count: i64, following: bool, is_following_me: bool, is_mutual_following: bool, join_ts: String, bio: String, linked_accounts: Vec, groups: Vec, games: Vec) -> IdentityProfile { - IdentityProfile { - identity_id, - display_name, - account_number, - avatar_url, - is_registered, - external: Box::new(external), - is_admin, - is_game_linked: None, - dev_state: None, - follower_count, - following_count, - following, - is_following_me, - is_mutual_following, - join_ts, - bio, - linked_accounts, - groups, - games, - awaiting_deletion: None, - } - } + /// An identity profile. + pub fn new( + identity_id: uuid::Uuid, + display_name: String, + account_number: i32, + avatar_url: String, + is_registered: bool, + external: crate::models::IdentityExternalLinks, + is_admin: bool, + follower_count: i64, + following_count: i64, + following: bool, + is_following_me: bool, + is_mutual_following: bool, + join_ts: String, + bio: String, + linked_accounts: Vec, + groups: Vec, + games: Vec, + ) -> IdentityProfile { + IdentityProfile { + identity_id, + display_name, + account_number, + avatar_url, + is_registered, + external: Box::new(external), + is_admin, + is_game_linked: None, + dev_state: None, + follower_count, + following_count, + following, + is_following_me, + is_mutual_following, + join_ts, + bio, + linked_accounts, + groups, + games, + awaiting_deletion: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/identity_set_game_activity_request.rs b/sdks/api/full/rust/src/models/identity_set_game_activity_request.rs index cb53bb90bb..1de50baf6e 100644 --- a/sdks/api/full/rust/src/models/identity_set_game_activity_request.rs +++ b/sdks/api/full/rust/src/models/identity_set_game_activity_request.rs @@ -4,25 +4,22 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentitySetGameActivityRequest { - #[serde(rename = "game_activity")] - pub game_activity: Box, + #[serde(rename = "game_activity")] + pub game_activity: Box, } impl IdentitySetGameActivityRequest { - pub fn new(game_activity: crate::models::IdentityUpdateGameActivity) -> IdentitySetGameActivityRequest { - IdentitySetGameActivityRequest { - game_activity: Box::new(game_activity), - } - } + pub fn new( + game_activity: crate::models::IdentityUpdateGameActivity, + ) -> IdentitySetGameActivityRequest { + IdentitySetGameActivityRequest { + game_activity: Box::new(game_activity), + } + } } - - diff --git a/sdks/api/full/rust/src/models/identity_setup_request.rs b/sdks/api/full/rust/src/models/identity_setup_request.rs index dba1402ee0..89389dd45c 100644 --- a/sdks/api/full/rust/src/models/identity_setup_request.rs +++ b/sdks/api/full/rust/src/models/identity_setup_request.rs @@ -4,26 +4,24 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentitySetupRequest { - /// Documentation at https://jwt.io/ - #[serde(rename = "existing_identity_token", skip_serializing_if = "Option::is_none")] - pub existing_identity_token: Option, + /// Documentation at https://jwt.io/ + #[serde( + rename = "existing_identity_token", + skip_serializing_if = "Option::is_none" + )] + pub existing_identity_token: Option, } impl IdentitySetupRequest { - pub fn new() -> IdentitySetupRequest { - IdentitySetupRequest { - existing_identity_token: None, - } - } + pub fn new() -> IdentitySetupRequest { + IdentitySetupRequest { + existing_identity_token: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/identity_setup_response.rs b/sdks/api/full/rust/src/models/identity_setup_response.rs index b989f31e91..b874aea332 100644 --- a/sdks/api/full/rust/src/models/identity_setup_response.rs +++ b/sdks/api/full/rust/src/models/identity_setup_response.rs @@ -4,36 +4,36 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentitySetupResponse { - /// Documentation at https://jwt.io/ - #[serde(rename = "identity_token")] - pub identity_token: String, - /// RFC3339 timestamp - #[serde(rename = "identity_token_expire_ts")] - pub identity_token_expire_ts: String, - #[serde(rename = "identity")] - pub identity: Box, - #[serde(rename = "game_id")] - pub game_id: uuid::Uuid, + /// Documentation at https://jwt.io/ + #[serde(rename = "identity_token")] + pub identity_token: String, + /// RFC3339 timestamp + #[serde(rename = "identity_token_expire_ts")] + pub identity_token_expire_ts: String, + #[serde(rename = "identity")] + pub identity: Box, + #[serde(rename = "game_id")] + pub game_id: uuid::Uuid, } impl IdentitySetupResponse { - pub fn new(identity_token: String, identity_token_expire_ts: String, identity: crate::models::IdentityProfile, game_id: uuid::Uuid) -> IdentitySetupResponse { - IdentitySetupResponse { - identity_token, - identity_token_expire_ts, - identity: Box::new(identity), - game_id, - } - } + pub fn new( + identity_token: String, + identity_token_expire_ts: String, + identity: crate::models::IdentityProfile, + game_id: uuid::Uuid, + ) -> IdentitySetupResponse { + IdentitySetupResponse { + identity_token, + identity_token_expire_ts, + identity: Box::new(identity), + game_id, + } + } } - - diff --git a/sdks/api/full/rust/src/models/identity_signup_for_beta_request.rs b/sdks/api/full/rust/src/models/identity_signup_for_beta_request.rs index db8fe64ea1..f7d93a0113 100644 --- a/sdks/api/full/rust/src/models/identity_signup_for_beta_request.rs +++ b/sdks/api/full/rust/src/models/identity_signup_for_beta_request.rs @@ -4,37 +4,37 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentitySignupForBetaRequest { - #[serde(rename = "name")] - pub name: String, - #[serde(rename = "company_name", skip_serializing_if = "Option::is_none")] - pub company_name: Option, - #[serde(rename = "company_size")] - pub company_size: String, - #[serde(rename = "preferred_tools")] - pub preferred_tools: String, - #[serde(rename = "goals")] - pub goals: String, + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "company_name", skip_serializing_if = "Option::is_none")] + pub company_name: Option, + #[serde(rename = "company_size")] + pub company_size: String, + #[serde(rename = "preferred_tools")] + pub preferred_tools: String, + #[serde(rename = "goals")] + pub goals: String, } impl IdentitySignupForBetaRequest { - pub fn new(name: String, company_size: String, preferred_tools: String, goals: String) -> IdentitySignupForBetaRequest { - IdentitySignupForBetaRequest { - name, - company_name: None, - company_size, - preferred_tools, - goals, - } - } + pub fn new( + name: String, + company_size: String, + preferred_tools: String, + goals: String, + ) -> IdentitySignupForBetaRequest { + IdentitySignupForBetaRequest { + name, + company_name: None, + company_size, + preferred_tools, + goals, + } + } } - - diff --git a/sdks/api/full/rust/src/models/identity_status.rs b/sdks/api/full/rust/src/models/identity_status.rs index 992b7897ac..ef1bdb6832 100644 --- a/sdks/api/full/rust/src/models/identity_status.rs +++ b/sdks/api/full/rust/src/models/identity_status.rs @@ -4,7 +4,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -13,31 +13,26 @@ /// The current status of an identity. This helps players understand if another player is currently playing or has their game in the background. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum IdentityStatus { - #[serde(rename = "online")] - Online, - #[serde(rename = "away")] - Away, - #[serde(rename = "offline")] - Offline, - + #[serde(rename = "online")] + Online, + #[serde(rename = "away")] + Away, + #[serde(rename = "offline")] + Offline, } impl ToString for IdentityStatus { - fn to_string(&self) -> String { - match self { - Self::Online => String::from("online"), - Self::Away => String::from("away"), - Self::Offline => String::from("offline"), - } - } + fn to_string(&self) -> String { + match self { + Self::Online => String::from("online"), + Self::Away => String::from("away"), + Self::Offline => String::from("offline"), + } + } } impl Default for IdentityStatus { - fn default() -> IdentityStatus { - Self::Online - } + fn default() -> IdentityStatus { + Self::Online + } } - - - - diff --git a/sdks/api/full/rust/src/models/identity_summary.rs b/sdks/api/full/rust/src/models/identity_summary.rs index 48740a6e75..d74feedd46 100644 --- a/sdks/api/full/rust/src/models/identity_summary.rs +++ b/sdks/api/full/rust/src/models/identity_summary.rs @@ -4,56 +4,62 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// IdentitySummary : An identity summary. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentitySummary { - #[serde(rename = "identity_id")] - pub identity_id: uuid::Uuid, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "account_number")] - pub account_number: i32, - /// The URL of this identity's avatar image. - #[serde(rename = "avatar_url")] - pub avatar_url: String, - /// Whether or not this identity is registered with a linked account. - #[serde(rename = "is_registered")] - pub is_registered: bool, - #[serde(rename = "external")] - pub external: Box, - /// Whether or not the requestee's identity is following this identity. - #[serde(rename = "following")] - pub following: bool, - /// Whether or not this identity is both following and is followed by the requestee's identity. - #[serde(rename = "is_following_me")] - pub is_following_me: bool, - #[serde(rename = "is_mutual_following")] - pub is_mutual_following: bool, + #[serde(rename = "identity_id")] + pub identity_id: uuid::Uuid, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "account_number")] + pub account_number: i32, + /// The URL of this identity's avatar image. + #[serde(rename = "avatar_url")] + pub avatar_url: String, + /// Whether or not this identity is registered with a linked account. + #[serde(rename = "is_registered")] + pub is_registered: bool, + #[serde(rename = "external")] + pub external: Box, + /// Whether or not the requestee's identity is following this identity. + #[serde(rename = "following")] + pub following: bool, + /// Whether or not this identity is both following and is followed by the requestee's identity. + #[serde(rename = "is_following_me")] + pub is_following_me: bool, + #[serde(rename = "is_mutual_following")] + pub is_mutual_following: bool, } impl IdentitySummary { - /// An identity summary. - pub fn new(identity_id: uuid::Uuid, display_name: String, account_number: i32, avatar_url: String, is_registered: bool, external: crate::models::IdentityExternalLinks, following: bool, is_following_me: bool, is_mutual_following: bool) -> IdentitySummary { - IdentitySummary { - identity_id, - display_name, - account_number, - avatar_url, - is_registered, - external: Box::new(external), - following, - is_following_me, - is_mutual_following, - } - } + /// An identity summary. + pub fn new( + identity_id: uuid::Uuid, + display_name: String, + account_number: i32, + avatar_url: String, + is_registered: bool, + external: crate::models::IdentityExternalLinks, + following: bool, + is_following_me: bool, + is_mutual_following: bool, + ) -> IdentitySummary { + IdentitySummary { + identity_id, + display_name, + account_number, + avatar_url, + is_registered, + external: Box::new(external), + following, + is_following_me, + is_mutual_following, + } + } } - - diff --git a/sdks/api/full/rust/src/models/identity_update_game_activity.rs b/sdks/api/full/rust/src/models/identity_update_game_activity.rs index f2c59eded1..95985da0fc 100644 --- a/sdks/api/full/rust/src/models/identity_update_game_activity.rs +++ b/sdks/api/full/rust/src/models/identity_update_game_activity.rs @@ -4,36 +4,42 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// IdentityUpdateGameActivity : Information about the identity's current game. This is information that all other identities can see about what the current identity is doing. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityUpdateGameActivity { - /// A short message about the current game activity. - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, - /// JSON data seen by anyone. - #[serde(rename = "public_metadata", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub public_metadata: Option>, - /// JSON data seen only by the given identity and their mutual followers. - #[serde(rename = "mutual_metadata", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub mutual_metadata: Option>, + /// A short message about the current game activity. + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, + /// JSON data seen by anyone. + #[serde( + rename = "public_metadata", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub public_metadata: Option>, + /// JSON data seen only by the given identity and their mutual followers. + #[serde( + rename = "mutual_metadata", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub mutual_metadata: Option>, } impl IdentityUpdateGameActivity { - /// Information about the identity's current game. This is information that all other identities can see about what the current identity is doing. - pub fn new() -> IdentityUpdateGameActivity { - IdentityUpdateGameActivity { - message: None, - public_metadata: None, - mutual_metadata: None, - } - } + /// Information about the identity's current game. This is information that all other identities can see about what the current identity is doing. + pub fn new() -> IdentityUpdateGameActivity { + IdentityUpdateGameActivity { + message: None, + public_metadata: None, + mutual_metadata: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/identity_update_profile_request.rs b/sdks/api/full/rust/src/models/identity_update_profile_request.rs index 590fdd9218..e482d872f1 100644 --- a/sdks/api/full/rust/src/models/identity_update_profile_request.rs +++ b/sdks/api/full/rust/src/models/identity_update_profile_request.rs @@ -4,33 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityUpdateProfileRequest { - /// Represent a resource's readable display name. - #[serde(rename = "display_name", skip_serializing_if = "Option::is_none")] - pub display_name: Option, - #[serde(rename = "account_number", skip_serializing_if = "Option::is_none")] - pub account_number: Option, - /// Follows regex ^(?:[^\\n\\r]+\\n?|\\n){1,5}$ - #[serde(rename = "bio", skip_serializing_if = "Option::is_none")] - pub bio: Option, + /// Represent a resource's readable display name. + #[serde(rename = "display_name", skip_serializing_if = "Option::is_none")] + pub display_name: Option, + #[serde(rename = "account_number", skip_serializing_if = "Option::is_none")] + pub account_number: Option, + /// Follows regex ^(?:[^\\n\\r]+\\n?|\\n){1,5}$ + #[serde(rename = "bio", skip_serializing_if = "Option::is_none")] + pub bio: Option, } impl IdentityUpdateProfileRequest { - pub fn new() -> IdentityUpdateProfileRequest { - IdentityUpdateProfileRequest { - display_name: None, - account_number: None, - bio: None, - } - } + pub fn new() -> IdentityUpdateProfileRequest { + IdentityUpdateProfileRequest { + display_name: None, + account_number: None, + bio: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/identity_update_status_request.rs b/sdks/api/full/rust/src/models/identity_update_status_request.rs index c6c79c6881..8c41927f5c 100644 --- a/sdks/api/full/rust/src/models/identity_update_status_request.rs +++ b/sdks/api/full/rust/src/models/identity_update_status_request.rs @@ -4,25 +4,18 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityUpdateStatusRequest { - #[serde(rename = "status")] - pub status: crate::models::IdentityStatus, + #[serde(rename = "status")] + pub status: crate::models::IdentityStatus, } impl IdentityUpdateStatusRequest { - pub fn new(status: crate::models::IdentityStatus) -> IdentityUpdateStatusRequest { - IdentityUpdateStatusRequest { - status, - } - } + pub fn new(status: crate::models::IdentityStatus) -> IdentityUpdateStatusRequest { + IdentityUpdateStatusRequest { status } + } } - - diff --git a/sdks/api/full/rust/src/models/identity_validate_profile_response.rs b/sdks/api/full/rust/src/models/identity_validate_profile_response.rs index f08e3f02b1..36054e28d4 100644 --- a/sdks/api/full/rust/src/models/identity_validate_profile_response.rs +++ b/sdks/api/full/rust/src/models/identity_validate_profile_response.rs @@ -4,25 +4,18 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityValidateProfileResponse { - #[serde(rename = "errors")] - pub errors: Vec, + #[serde(rename = "errors")] + pub errors: Vec, } impl IdentityValidateProfileResponse { - pub fn new(errors: Vec) -> IdentityValidateProfileResponse { - IdentityValidateProfileResponse { - errors, - } - } + pub fn new(errors: Vec) -> IdentityValidateProfileResponse { + IdentityValidateProfileResponse { errors } + } } - - diff --git a/sdks/api/full/rust/src/models/identity_watch_events_response.rs b/sdks/api/full/rust/src/models/identity_watch_events_response.rs index e04fd721dc..268c6dd650 100644 --- a/sdks/api/full/rust/src/models/identity_watch_events_response.rs +++ b/sdks/api/full/rust/src/models/identity_watch_events_response.rs @@ -4,28 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct IdentityWatchEventsResponse { - #[serde(rename = "events")] - pub events: Vec, - #[serde(rename = "watch")] - pub watch: Box, + #[serde(rename = "events")] + pub events: Vec, + #[serde(rename = "watch")] + pub watch: Box, } impl IdentityWatchEventsResponse { - pub fn new(events: Vec, watch: crate::models::WatchResponse) -> IdentityWatchEventsResponse { - IdentityWatchEventsResponse { - events, - watch: Box::new(watch), - } - } + pub fn new( + events: Vec, + watch: crate::models::WatchResponse, + ) -> IdentityWatchEventsResponse { + IdentityWatchEventsResponse { + events, + watch: Box::new(watch), + } + } } - - diff --git a/sdks/api/full/rust/src/models/matchmaker_create_lobby_response.rs b/sdks/api/full/rust/src/models/matchmaker_create_lobby_response.rs index d36a2742df..144e6ff1f4 100644 --- a/sdks/api/full/rust/src/models/matchmaker_create_lobby_response.rs +++ b/sdks/api/full/rust/src/models/matchmaker_create_lobby_response.rs @@ -4,31 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerCreateLobbyResponse { - #[serde(rename = "lobby")] - pub lobby: Box, - #[serde(rename = "ports")] - pub ports: ::std::collections::HashMap, - #[serde(rename = "player")] - pub player: Box, + #[serde(rename = "lobby")] + pub lobby: Box, + #[serde(rename = "ports")] + pub ports: ::std::collections::HashMap, + #[serde(rename = "player")] + pub player: Box, } impl MatchmakerCreateLobbyResponse { - pub fn new(lobby: crate::models::MatchmakerJoinLobby, ports: ::std::collections::HashMap, player: crate::models::MatchmakerJoinPlayer) -> MatchmakerCreateLobbyResponse { - MatchmakerCreateLobbyResponse { - lobby: Box::new(lobby), - ports, - player: Box::new(player), - } - } + pub fn new( + lobby: crate::models::MatchmakerJoinLobby, + ports: ::std::collections::HashMap, + player: crate::models::MatchmakerJoinPlayer, + ) -> MatchmakerCreateLobbyResponse { + MatchmakerCreateLobbyResponse { + lobby: Box::new(lobby), + ports, + player: Box::new(player), + } + } } - - diff --git a/sdks/api/full/rust/src/models/matchmaker_custom_lobby_publicity.rs b/sdks/api/full/rust/src/models/matchmaker_custom_lobby_publicity.rs index e3dcead796..8bdb09d8f0 100644 --- a/sdks/api/full/rust/src/models/matchmaker_custom_lobby_publicity.rs +++ b/sdks/api/full/rust/src/models/matchmaker_custom_lobby_publicity.rs @@ -4,36 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum MatchmakerCustomLobbyPublicity { - #[serde(rename = "public")] - Public, - #[serde(rename = "private")] - Private, - + #[serde(rename = "public")] + Public, + #[serde(rename = "private")] + Private, } impl ToString for MatchmakerCustomLobbyPublicity { - fn to_string(&self) -> String { - match self { - Self::Public => String::from("public"), - Self::Private => String::from("private"), - } - } + fn to_string(&self) -> String { + match self { + Self::Public => String::from("public"), + Self::Private => String::from("private"), + } + } } impl Default for MatchmakerCustomLobbyPublicity { - fn default() -> MatchmakerCustomLobbyPublicity { - Self::Public - } + fn default() -> MatchmakerCustomLobbyPublicity { + Self::Public + } } - - - - diff --git a/sdks/api/full/rust/src/models/matchmaker_find_lobby_response.rs b/sdks/api/full/rust/src/models/matchmaker_find_lobby_response.rs index e25ae78ee2..a614ce3b0a 100644 --- a/sdks/api/full/rust/src/models/matchmaker_find_lobby_response.rs +++ b/sdks/api/full/rust/src/models/matchmaker_find_lobby_response.rs @@ -4,31 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerFindLobbyResponse { - #[serde(rename = "lobby")] - pub lobby: Box, - #[serde(rename = "ports")] - pub ports: ::std::collections::HashMap, - #[serde(rename = "player")] - pub player: Box, + #[serde(rename = "lobby")] + pub lobby: Box, + #[serde(rename = "ports")] + pub ports: ::std::collections::HashMap, + #[serde(rename = "player")] + pub player: Box, } impl MatchmakerFindLobbyResponse { - pub fn new(lobby: crate::models::MatchmakerJoinLobby, ports: ::std::collections::HashMap, player: crate::models::MatchmakerJoinPlayer) -> MatchmakerFindLobbyResponse { - MatchmakerFindLobbyResponse { - lobby: Box::new(lobby), - ports, - player: Box::new(player), - } - } + pub fn new( + lobby: crate::models::MatchmakerJoinLobby, + ports: ::std::collections::HashMap, + player: crate::models::MatchmakerJoinPlayer, + ) -> MatchmakerFindLobbyResponse { + MatchmakerFindLobbyResponse { + lobby: Box::new(lobby), + ports, + player: Box::new(player), + } + } } - - diff --git a/sdks/api/full/rust/src/models/matchmaker_game_mode_info.rs b/sdks/api/full/rust/src/models/matchmaker_game_mode_info.rs index d3d921a688..a45e9f3615 100644 --- a/sdks/api/full/rust/src/models/matchmaker_game_mode_info.rs +++ b/sdks/api/full/rust/src/models/matchmaker_game_mode_info.rs @@ -4,28 +4,22 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// MatchmakerGameModeInfo : A game mode that the player can join. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerGameModeInfo { - /// A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short. - #[serde(rename = "game_mode_id")] - pub game_mode_id: String, + /// A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short. + #[serde(rename = "game_mode_id")] + pub game_mode_id: String, } impl MatchmakerGameModeInfo { - /// A game mode that the player can join. - pub fn new(game_mode_id: String) -> MatchmakerGameModeInfo { - MatchmakerGameModeInfo { - game_mode_id, - } - } + /// A game mode that the player can join. + pub fn new(game_mode_id: String) -> MatchmakerGameModeInfo { + MatchmakerGameModeInfo { game_mode_id } + } } - - diff --git a/sdks/api/full/rust/src/models/matchmaker_game_mode_statistics.rs b/sdks/api/full/rust/src/models/matchmaker_game_mode_statistics.rs index d2da15d2d9..e12272fc15 100644 --- a/sdks/api/full/rust/src/models/matchmaker_game_mode_statistics.rs +++ b/sdks/api/full/rust/src/models/matchmaker_game_mode_statistics.rs @@ -4,28 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerGameModeStatistics { - #[serde(rename = "player_count")] - pub player_count: i64, - #[serde(rename = "regions")] - pub regions: ::std::collections::HashMap, + #[serde(rename = "player_count")] + pub player_count: i64, + #[serde(rename = "regions")] + pub regions: ::std::collections::HashMap, } impl MatchmakerGameModeStatistics { - pub fn new(player_count: i64, regions: ::std::collections::HashMap) -> MatchmakerGameModeStatistics { - MatchmakerGameModeStatistics { - player_count, - regions, - } - } + pub fn new( + player_count: i64, + regions: ::std::collections::HashMap, + ) -> MatchmakerGameModeStatistics { + MatchmakerGameModeStatistics { + player_count, + regions, + } + } } - - diff --git a/sdks/api/full/rust/src/models/matchmaker_get_statistics_response.rs b/sdks/api/full/rust/src/models/matchmaker_get_statistics_response.rs index cb81460c14..d985bd2b57 100644 --- a/sdks/api/full/rust/src/models/matchmaker_get_statistics_response.rs +++ b/sdks/api/full/rust/src/models/matchmaker_get_statistics_response.rs @@ -4,28 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerGetStatisticsResponse { - #[serde(rename = "player_count")] - pub player_count: i64, - #[serde(rename = "game_modes")] - pub game_modes: ::std::collections::HashMap, + #[serde(rename = "player_count")] + pub player_count: i64, + #[serde(rename = "game_modes")] + pub game_modes: + ::std::collections::HashMap, } impl MatchmakerGetStatisticsResponse { - pub fn new(player_count: i64, game_modes: ::std::collections::HashMap) -> MatchmakerGetStatisticsResponse { - MatchmakerGetStatisticsResponse { - player_count, - game_modes, - } - } + pub fn new( + player_count: i64, + game_modes: ::std::collections::HashMap< + String, + crate::models::MatchmakerGameModeStatistics, + >, + ) -> MatchmakerGetStatisticsResponse { + MatchmakerGetStatisticsResponse { + player_count, + game_modes, + } + } } - - diff --git a/sdks/api/full/rust/src/models/matchmaker_join_lobby.rs b/sdks/api/full/rust/src/models/matchmaker_join_lobby.rs index abc12a820a..dd951713c3 100644 --- a/sdks/api/full/rust/src/models/matchmaker_join_lobby.rs +++ b/sdks/api/full/rust/src/models/matchmaker_join_lobby.rs @@ -4,37 +4,38 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// MatchmakerJoinLobby : A matchmaker lobby. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerJoinLobby { - #[serde(rename = "lobby_id")] - pub lobby_id: uuid::Uuid, - #[serde(rename = "region")] - pub region: Box, - /// **Deprecated** - #[serde(rename = "ports")] - pub ports: ::std::collections::HashMap, - #[serde(rename = "player")] - pub player: Box, + #[serde(rename = "lobby_id")] + pub lobby_id: uuid::Uuid, + #[serde(rename = "region")] + pub region: Box, + /// **Deprecated** + #[serde(rename = "ports")] + pub ports: ::std::collections::HashMap, + #[serde(rename = "player")] + pub player: Box, } impl MatchmakerJoinLobby { - /// A matchmaker lobby. - pub fn new(lobby_id: uuid::Uuid, region: crate::models::MatchmakerJoinRegion, ports: ::std::collections::HashMap, player: crate::models::MatchmakerJoinPlayer) -> MatchmakerJoinLobby { - MatchmakerJoinLobby { - lobby_id, - region: Box::new(region), - ports, - player: Box::new(player), - } - } + /// A matchmaker lobby. + pub fn new( + lobby_id: uuid::Uuid, + region: crate::models::MatchmakerJoinRegion, + ports: ::std::collections::HashMap, + player: crate::models::MatchmakerJoinPlayer, + ) -> MatchmakerJoinLobby { + MatchmakerJoinLobby { + lobby_id, + region: Box::new(region), + ports, + player: Box::new(player), + } + } } - - diff --git a/sdks/api/full/rust/src/models/matchmaker_join_lobby_response.rs b/sdks/api/full/rust/src/models/matchmaker_join_lobby_response.rs index 8772c7a21a..eccc463418 100644 --- a/sdks/api/full/rust/src/models/matchmaker_join_lobby_response.rs +++ b/sdks/api/full/rust/src/models/matchmaker_join_lobby_response.rs @@ -4,31 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerJoinLobbyResponse { - #[serde(rename = "lobby")] - pub lobby: Box, - #[serde(rename = "ports")] - pub ports: ::std::collections::HashMap, - #[serde(rename = "player")] - pub player: Box, + #[serde(rename = "lobby")] + pub lobby: Box, + #[serde(rename = "ports")] + pub ports: ::std::collections::HashMap, + #[serde(rename = "player")] + pub player: Box, } impl MatchmakerJoinLobbyResponse { - pub fn new(lobby: crate::models::MatchmakerJoinLobby, ports: ::std::collections::HashMap, player: crate::models::MatchmakerJoinPlayer) -> MatchmakerJoinLobbyResponse { - MatchmakerJoinLobbyResponse { - lobby: Box::new(lobby), - ports, - player: Box::new(player), - } - } + pub fn new( + lobby: crate::models::MatchmakerJoinLobby, + ports: ::std::collections::HashMap, + player: crate::models::MatchmakerJoinPlayer, + ) -> MatchmakerJoinLobbyResponse { + MatchmakerJoinLobbyResponse { + lobby: Box::new(lobby), + ports, + player: Box::new(player), + } + } } - - diff --git a/sdks/api/full/rust/src/models/matchmaker_join_player.rs b/sdks/api/full/rust/src/models/matchmaker_join_player.rs index 198434b8ac..3645390464 100644 --- a/sdks/api/full/rust/src/models/matchmaker_join_player.rs +++ b/sdks/api/full/rust/src/models/matchmaker_join_player.rs @@ -4,28 +4,22 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// MatchmakerJoinPlayer : A matchmaker lobby player. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerJoinPlayer { - /// Documentation at https://jwt.io/ - #[serde(rename = "token")] - pub token: String, + /// Documentation at https://jwt.io/ + #[serde(rename = "token")] + pub token: String, } impl MatchmakerJoinPlayer { - /// A matchmaker lobby player. - pub fn new(token: String) -> MatchmakerJoinPlayer { - MatchmakerJoinPlayer { - token, - } - } + /// A matchmaker lobby player. + pub fn new(token: String) -> MatchmakerJoinPlayer { + MatchmakerJoinPlayer { token } + } } - - diff --git a/sdks/api/full/rust/src/models/matchmaker_join_port.rs b/sdks/api/full/rust/src/models/matchmaker_join_port.rs index f7b2bbe386..a60852b5ad 100644 --- a/sdks/api/full/rust/src/models/matchmaker_join_port.rs +++ b/sdks/api/full/rust/src/models/matchmaker_join_port.rs @@ -4,40 +4,35 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerJoinPort { - /// The host for the given port. Will be null if using a port range. - #[serde(rename = "host", skip_serializing_if = "Option::is_none")] - pub host: Option, - #[serde(rename = "hostname")] - pub hostname: String, - /// The port number for this lobby. Will be null if using a port range. - #[serde(rename = "port", skip_serializing_if = "Option::is_none")] - pub port: Option, - #[serde(rename = "port_range", skip_serializing_if = "Option::is_none")] - pub port_range: Option>, - /// Whether or not this lobby port uses TLS. You cannot mix a non-TLS and TLS ports. - #[serde(rename = "is_tls")] - pub is_tls: bool, + /// The host for the given port. Will be null if using a port range. + #[serde(rename = "host", skip_serializing_if = "Option::is_none")] + pub host: Option, + #[serde(rename = "hostname")] + pub hostname: String, + /// The port number for this lobby. Will be null if using a port range. + #[serde(rename = "port", skip_serializing_if = "Option::is_none")] + pub port: Option, + #[serde(rename = "port_range", skip_serializing_if = "Option::is_none")] + pub port_range: Option>, + /// Whether or not this lobby port uses TLS. You cannot mix a non-TLS and TLS ports. + #[serde(rename = "is_tls")] + pub is_tls: bool, } impl MatchmakerJoinPort { - pub fn new(hostname: String, is_tls: bool) -> MatchmakerJoinPort { - MatchmakerJoinPort { - host: None, - hostname, - port: None, - port_range: None, - is_tls, - } - } + pub fn new(hostname: String, is_tls: bool) -> MatchmakerJoinPort { + MatchmakerJoinPort { + host: None, + hostname, + port: None, + port_range: None, + is_tls, + } + } } - - diff --git a/sdks/api/full/rust/src/models/matchmaker_join_port_range.rs b/sdks/api/full/rust/src/models/matchmaker_join_port_range.rs index ff4c05b494..b7c1941095 100644 --- a/sdks/api/full/rust/src/models/matchmaker_join_port_range.rs +++ b/sdks/api/full/rust/src/models/matchmaker_join_port_range.rs @@ -4,32 +4,25 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// MatchmakerJoinPortRange : Inclusive range of ports that can be connected to. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerJoinPortRange { - /// Minimum port that can be connected to. Inclusive range. - #[serde(rename = "min")] - pub min: i32, - /// Maximum port that can be connected to. Inclusive range. - #[serde(rename = "max")] - pub max: i32, + /// Minimum port that can be connected to. Inclusive range. + #[serde(rename = "min")] + pub min: i32, + /// Maximum port that can be connected to. Inclusive range. + #[serde(rename = "max")] + pub max: i32, } impl MatchmakerJoinPortRange { - /// Inclusive range of ports that can be connected to. - pub fn new(min: i32, max: i32) -> MatchmakerJoinPortRange { - MatchmakerJoinPortRange { - min, - max, - } - } + /// Inclusive range of ports that can be connected to. + pub fn new(min: i32, max: i32) -> MatchmakerJoinPortRange { + MatchmakerJoinPortRange { min, max } + } } - - diff --git a/sdks/api/full/rust/src/models/matchmaker_join_region.rs b/sdks/api/full/rust/src/models/matchmaker_join_region.rs index 7546fde471..105b44b395 100644 --- a/sdks/api/full/rust/src/models/matchmaker_join_region.rs +++ b/sdks/api/full/rust/src/models/matchmaker_join_region.rs @@ -4,32 +4,28 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// MatchmakerJoinRegion : A matchmaker lobby region. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerJoinRegion { - /// A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short. - #[serde(rename = "region_id")] - pub region_id: String, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, + /// A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short. + #[serde(rename = "region_id")] + pub region_id: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, } impl MatchmakerJoinRegion { - /// A matchmaker lobby region. - pub fn new(region_id: String, display_name: String) -> MatchmakerJoinRegion { - MatchmakerJoinRegion { - region_id, - display_name, - } - } + /// A matchmaker lobby region. + pub fn new(region_id: String, display_name: String) -> MatchmakerJoinRegion { + MatchmakerJoinRegion { + region_id, + display_name, + } + } } - - diff --git a/sdks/api/full/rust/src/models/matchmaker_list_lobbies_response.rs b/sdks/api/full/rust/src/models/matchmaker_list_lobbies_response.rs index ae2a0fd09f..63eb83c39f 100644 --- a/sdks/api/full/rust/src/models/matchmaker_list_lobbies_response.rs +++ b/sdks/api/full/rust/src/models/matchmaker_list_lobbies_response.rs @@ -4,31 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerListLobbiesResponse { - #[serde(rename = "game_modes")] - pub game_modes: Vec, - #[serde(rename = "regions")] - pub regions: Vec, - #[serde(rename = "lobbies")] - pub lobbies: Vec, + #[serde(rename = "game_modes")] + pub game_modes: Vec, + #[serde(rename = "regions")] + pub regions: Vec, + #[serde(rename = "lobbies")] + pub lobbies: Vec, } impl MatchmakerListLobbiesResponse { - pub fn new(game_modes: Vec, regions: Vec, lobbies: Vec) -> MatchmakerListLobbiesResponse { - MatchmakerListLobbiesResponse { - game_modes, - regions, - lobbies, - } - } + pub fn new( + game_modes: Vec, + regions: Vec, + lobbies: Vec, + ) -> MatchmakerListLobbiesResponse { + MatchmakerListLobbiesResponse { + game_modes, + regions, + lobbies, + } + } } - - diff --git a/sdks/api/full/rust/src/models/matchmaker_list_regions_response.rs b/sdks/api/full/rust/src/models/matchmaker_list_regions_response.rs index 07eae13752..c418c2237a 100644 --- a/sdks/api/full/rust/src/models/matchmaker_list_regions_response.rs +++ b/sdks/api/full/rust/src/models/matchmaker_list_regions_response.rs @@ -4,25 +4,18 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerListRegionsResponse { - #[serde(rename = "regions")] - pub regions: Vec, + #[serde(rename = "regions")] + pub regions: Vec, } impl MatchmakerListRegionsResponse { - pub fn new(regions: Vec) -> MatchmakerListRegionsResponse { - MatchmakerListRegionsResponse { - regions, - } - } + pub fn new(regions: Vec) -> MatchmakerListRegionsResponse { + MatchmakerListRegionsResponse { regions } + } } - - diff --git a/sdks/api/full/rust/src/models/matchmaker_lobbies_create_request.rs b/sdks/api/full/rust/src/models/matchmaker_lobbies_create_request.rs index c016fbfd6f..dcc6a319f8 100644 --- a/sdks/api/full/rust/src/models/matchmaker_lobbies_create_request.rs +++ b/sdks/api/full/rust/src/models/matchmaker_lobbies_create_request.rs @@ -4,46 +4,51 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerLobbiesCreateRequest { - #[serde(rename = "game_mode")] - pub game_mode: String, - #[serde(rename = "region", skip_serializing_if = "Option::is_none")] - pub region: Option, - #[serde(rename = "publicity", skip_serializing_if = "Option::is_none")] - pub publicity: Option, - #[serde(rename = "tags", skip_serializing_if = "Option::is_none")] - pub tags: Option<::std::collections::HashMap>, - #[serde(rename = "max_players", skip_serializing_if = "Option::is_none")] - pub max_players: Option, - #[serde(rename = "lobby_config", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub lobby_config: Option>, - #[serde(rename = "captcha", skip_serializing_if = "Option::is_none")] - pub captcha: Option>, - #[serde(rename = "verification_data", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub verification_data: Option>, + #[serde(rename = "game_mode")] + pub game_mode: String, + #[serde(rename = "region", skip_serializing_if = "Option::is_none")] + pub region: Option, + #[serde(rename = "publicity", skip_serializing_if = "Option::is_none")] + pub publicity: Option, + #[serde(rename = "tags", skip_serializing_if = "Option::is_none")] + pub tags: Option<::std::collections::HashMap>, + #[serde(rename = "max_players", skip_serializing_if = "Option::is_none")] + pub max_players: Option, + #[serde( + rename = "lobby_config", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub lobby_config: Option>, + #[serde(rename = "captcha", skip_serializing_if = "Option::is_none")] + pub captcha: Option>, + #[serde( + rename = "verification_data", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub verification_data: Option>, } impl MatchmakerLobbiesCreateRequest { - pub fn new(game_mode: String) -> MatchmakerLobbiesCreateRequest { - MatchmakerLobbiesCreateRequest { - game_mode, - region: None, - publicity: None, - tags: None, - max_players: None, - lobby_config: None, - captcha: None, - verification_data: None, - } - } + pub fn new(game_mode: String) -> MatchmakerLobbiesCreateRequest { + MatchmakerLobbiesCreateRequest { + game_mode, + region: None, + publicity: None, + tags: None, + max_players: None, + lobby_config: None, + captcha: None, + verification_data: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/matchmaker_lobbies_find_request.rs b/sdks/api/full/rust/src/models/matchmaker_lobbies_find_request.rs index f01cdec5bf..c1a82f5209 100644 --- a/sdks/api/full/rust/src/models/matchmaker_lobbies_find_request.rs +++ b/sdks/api/full/rust/src/models/matchmaker_lobbies_find_request.rs @@ -4,43 +4,46 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerLobbiesFindRequest { - #[serde(rename = "game_modes")] - pub game_modes: Vec, - #[serde(rename = "regions", skip_serializing_if = "Option::is_none")] - pub regions: Option>, - #[serde(rename = "prevent_auto_create_lobby", skip_serializing_if = "Option::is_none")] - pub prevent_auto_create_lobby: Option, - #[serde(rename = "tags", skip_serializing_if = "Option::is_none")] - pub tags: Option<::std::collections::HashMap>, - #[serde(rename = "max_players", skip_serializing_if = "Option::is_none")] - pub max_players: Option, - #[serde(rename = "captcha", skip_serializing_if = "Option::is_none")] - pub captcha: Option>, - #[serde(rename = "verification_data", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub verification_data: Option>, + #[serde(rename = "game_modes")] + pub game_modes: Vec, + #[serde(rename = "regions", skip_serializing_if = "Option::is_none")] + pub regions: Option>, + #[serde( + rename = "prevent_auto_create_lobby", + skip_serializing_if = "Option::is_none" + )] + pub prevent_auto_create_lobby: Option, + #[serde(rename = "tags", skip_serializing_if = "Option::is_none")] + pub tags: Option<::std::collections::HashMap>, + #[serde(rename = "max_players", skip_serializing_if = "Option::is_none")] + pub max_players: Option, + #[serde(rename = "captcha", skip_serializing_if = "Option::is_none")] + pub captcha: Option>, + #[serde( + rename = "verification_data", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub verification_data: Option>, } impl MatchmakerLobbiesFindRequest { - pub fn new(game_modes: Vec) -> MatchmakerLobbiesFindRequest { - MatchmakerLobbiesFindRequest { - game_modes, - regions: None, - prevent_auto_create_lobby: None, - tags: None, - max_players: None, - captcha: None, - verification_data: None, - } - } + pub fn new(game_modes: Vec) -> MatchmakerLobbiesFindRequest { + MatchmakerLobbiesFindRequest { + game_modes, + regions: None, + prevent_auto_create_lobby: None, + tags: None, + max_players: None, + captcha: None, + verification_data: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/matchmaker_lobbies_join_request.rs b/sdks/api/full/rust/src/models/matchmaker_lobbies_join_request.rs index 2e1c4f9b91..a5301c7ec6 100644 --- a/sdks/api/full/rust/src/models/matchmaker_lobbies_join_request.rs +++ b/sdks/api/full/rust/src/models/matchmaker_lobbies_join_request.rs @@ -4,31 +4,31 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerLobbiesJoinRequest { - #[serde(rename = "lobby_id")] - pub lobby_id: String, - #[serde(rename = "captcha", skip_serializing_if = "Option::is_none")] - pub captcha: Option>, - #[serde(rename = "verification_data", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub verification_data: Option>, + #[serde(rename = "lobby_id")] + pub lobby_id: String, + #[serde(rename = "captcha", skip_serializing_if = "Option::is_none")] + pub captcha: Option>, + #[serde( + rename = "verification_data", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub verification_data: Option>, } impl MatchmakerLobbiesJoinRequest { - pub fn new(lobby_id: String) -> MatchmakerLobbiesJoinRequest { - MatchmakerLobbiesJoinRequest { - lobby_id, - captcha: None, - verification_data: None, - } - } + pub fn new(lobby_id: String) -> MatchmakerLobbiesJoinRequest { + MatchmakerLobbiesJoinRequest { + lobby_id, + captcha: None, + verification_data: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/matchmaker_lobbies_set_closed_request.rs b/sdks/api/full/rust/src/models/matchmaker_lobbies_set_closed_request.rs index 32b2a4cfe2..196665e468 100644 --- a/sdks/api/full/rust/src/models/matchmaker_lobbies_set_closed_request.rs +++ b/sdks/api/full/rust/src/models/matchmaker_lobbies_set_closed_request.rs @@ -4,25 +4,18 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerLobbiesSetClosedRequest { - #[serde(rename = "is_closed")] - pub is_closed: bool, + #[serde(rename = "is_closed")] + pub is_closed: bool, } impl MatchmakerLobbiesSetClosedRequest { - pub fn new(is_closed: bool) -> MatchmakerLobbiesSetClosedRequest { - MatchmakerLobbiesSetClosedRequest { - is_closed, - } - } + pub fn new(is_closed: bool) -> MatchmakerLobbiesSetClosedRequest { + MatchmakerLobbiesSetClosedRequest { is_closed } + } } - - diff --git a/sdks/api/full/rust/src/models/matchmaker_lobby_info.rs b/sdks/api/full/rust/src/models/matchmaker_lobby_info.rs index dadc59a626..cbe37b818e 100644 --- a/sdks/api/full/rust/src/models/matchmaker_lobby_info.rs +++ b/sdks/api/full/rust/src/models/matchmaker_lobby_info.rs @@ -4,48 +4,57 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// MatchmakerLobbyInfo : A public lobby in the lobby list. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerLobbyInfo { - #[serde(rename = "region_id")] - pub region_id: String, - #[serde(rename = "game_mode_id")] - pub game_mode_id: String, - #[serde(rename = "lobby_id")] - pub lobby_id: uuid::Uuid, - #[serde(rename = "max_players_normal")] - pub max_players_normal: i32, - #[serde(rename = "max_players_direct")] - pub max_players_direct: i32, - #[serde(rename = "max_players_party")] - pub max_players_party: i32, - #[serde(rename = "total_player_count")] - pub total_player_count: i32, - #[serde(rename = "state", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub state: Option>, + #[serde(rename = "region_id")] + pub region_id: String, + #[serde(rename = "game_mode_id")] + pub game_mode_id: String, + #[serde(rename = "lobby_id")] + pub lobby_id: uuid::Uuid, + #[serde(rename = "max_players_normal")] + pub max_players_normal: i32, + #[serde(rename = "max_players_direct")] + pub max_players_direct: i32, + #[serde(rename = "max_players_party")] + pub max_players_party: i32, + #[serde(rename = "total_player_count")] + pub total_player_count: i32, + #[serde( + rename = "state", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub state: Option>, } impl MatchmakerLobbyInfo { - /// A public lobby in the lobby list. - pub fn new(region_id: String, game_mode_id: String, lobby_id: uuid::Uuid, max_players_normal: i32, max_players_direct: i32, max_players_party: i32, total_player_count: i32) -> MatchmakerLobbyInfo { - MatchmakerLobbyInfo { - region_id, - game_mode_id, - lobby_id, - max_players_normal, - max_players_direct, - max_players_party, - total_player_count, - state: None, - } - } + /// A public lobby in the lobby list. + pub fn new( + region_id: String, + game_mode_id: String, + lobby_id: uuid::Uuid, + max_players_normal: i32, + max_players_direct: i32, + max_players_party: i32, + total_player_count: i32, + ) -> MatchmakerLobbyInfo { + MatchmakerLobbyInfo { + region_id, + game_mode_id, + lobby_id, + max_players_normal, + max_players_direct, + max_players_party, + total_player_count, + state: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/matchmaker_players_connected_request.rs b/sdks/api/full/rust/src/models/matchmaker_players_connected_request.rs index c5de54c33c..00930513c4 100644 --- a/sdks/api/full/rust/src/models/matchmaker_players_connected_request.rs +++ b/sdks/api/full/rust/src/models/matchmaker_players_connected_request.rs @@ -4,25 +4,18 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerPlayersConnectedRequest { - #[serde(rename = "player_token")] - pub player_token: String, + #[serde(rename = "player_token")] + pub player_token: String, } impl MatchmakerPlayersConnectedRequest { - pub fn new(player_token: String) -> MatchmakerPlayersConnectedRequest { - MatchmakerPlayersConnectedRequest { - player_token, - } - } + pub fn new(player_token: String) -> MatchmakerPlayersConnectedRequest { + MatchmakerPlayersConnectedRequest { player_token } + } } - - diff --git a/sdks/api/full/rust/src/models/matchmaker_region_info.rs b/sdks/api/full/rust/src/models/matchmaker_region_info.rs index 62b190cff3..a4a6f00fd4 100644 --- a/sdks/api/full/rust/src/models/matchmaker_region_info.rs +++ b/sdks/api/full/rust/src/models/matchmaker_region_info.rs @@ -4,42 +4,44 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// MatchmakerRegionInfo : A region that the player can connect to. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerRegionInfo { - /// A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short. - #[serde(rename = "region_id")] - pub region_id: String, - /// Represent a resource's readable display name. - #[serde(rename = "provider_display_name")] - pub provider_display_name: String, - /// Represent a resource's readable display name. - #[serde(rename = "region_display_name")] - pub region_display_name: String, - #[serde(rename = "datacenter_coord")] - pub datacenter_coord: Box, - #[serde(rename = "datacenter_distance_from_client")] - pub datacenter_distance_from_client: Box, + /// A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short. + #[serde(rename = "region_id")] + pub region_id: String, + /// Represent a resource's readable display name. + #[serde(rename = "provider_display_name")] + pub provider_display_name: String, + /// Represent a resource's readable display name. + #[serde(rename = "region_display_name")] + pub region_display_name: String, + #[serde(rename = "datacenter_coord")] + pub datacenter_coord: Box, + #[serde(rename = "datacenter_distance_from_client")] + pub datacenter_distance_from_client: Box, } impl MatchmakerRegionInfo { - /// A region that the player can connect to. - pub fn new(region_id: String, provider_display_name: String, region_display_name: String, datacenter_coord: crate::models::GeoCoord, datacenter_distance_from_client: crate::models::GeoDistance) -> MatchmakerRegionInfo { - MatchmakerRegionInfo { - region_id, - provider_display_name, - region_display_name, - datacenter_coord: Box::new(datacenter_coord), - datacenter_distance_from_client: Box::new(datacenter_distance_from_client), - } - } + /// A region that the player can connect to. + pub fn new( + region_id: String, + provider_display_name: String, + region_display_name: String, + datacenter_coord: crate::models::GeoCoord, + datacenter_distance_from_client: crate::models::GeoDistance, + ) -> MatchmakerRegionInfo { + MatchmakerRegionInfo { + region_id, + provider_display_name, + region_display_name, + datacenter_coord: Box::new(datacenter_coord), + datacenter_distance_from_client: Box::new(datacenter_distance_from_client), + } + } } - - diff --git a/sdks/api/full/rust/src/models/matchmaker_region_statistics.rs b/sdks/api/full/rust/src/models/matchmaker_region_statistics.rs index 1f213d2419..b98695d5c1 100644 --- a/sdks/api/full/rust/src/models/matchmaker_region_statistics.rs +++ b/sdks/api/full/rust/src/models/matchmaker_region_statistics.rs @@ -4,25 +4,18 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct MatchmakerRegionStatistics { - #[serde(rename = "player_count")] - pub player_count: i64, + #[serde(rename = "player_count")] + pub player_count: i64, } impl MatchmakerRegionStatistics { - pub fn new(player_count: i64) -> MatchmakerRegionStatistics { - MatchmakerRegionStatistics { - player_count, - } - } + pub fn new(player_count: i64) -> MatchmakerRegionStatistics { + MatchmakerRegionStatistics { player_count } + } } - - diff --git a/sdks/api/full/rust/src/models/mod.rs b/sdks/api/full/rust/src/models/mod.rs index 2b5319bfd9..427d8a2596 100644 --- a/sdks/api/full/rust/src/models/mod.rs +++ b/sdks/api/full/rust/src/models/mod.rs @@ -14,16 +14,22 @@ 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; +pub use self::actors_export_actor_logs_response::ActorsExportActorLogsResponse; pub mod actors_get_actor_logs_response; pub use self::actors_get_actor_logs_response::ActorsGetActorLogsResponse; 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; +pub mod actors_get_actor_usage_response; +pub use self::actors_get_actor_usage_response::ActorsGetActorUsageResponse; pub mod actors_lifecycle; pub use self::actors_lifecycle::ActorsLifecycle; pub mod actors_list_actors_response; pub use self::actors_list_actors_response::ActorsListActorsResponse; +pub mod actors_logs_export_request; +pub use self::actors_logs_export_request::ActorsLogsExportRequest; pub mod actors_network; pub use self::actors_network::ActorsNetwork; pub mod actors_network_mode; @@ -34,8 +40,8 @@ pub mod actors_port_protocol; pub use self::actors_port_protocol::ActorsPortProtocol; pub mod actors_port_routing; pub use self::actors_port_routing::ActorsPortRouting; -pub mod actors_query_log_stream; -pub use self::actors_query_log_stream::ActorsQueryLogStream; +pub mod actors_query_actors_response; +pub use self::actors_query_actors_response::ActorsQueryActorsResponse; pub mod actors_resources; pub use self::actors_resources::ActorsResources; pub mod actors_runtime; @@ -604,6 +610,8 @@ pub mod regions_recommend_region_response; pub use self::regions_recommend_region_response::RegionsRecommendRegionResponse; pub mod regions_region; pub use self::regions_region::RegionsRegion; +pub mod routes_history_response; +pub use self::routes_history_response::RoutesHistoryResponse; pub mod routes_list_routes_response; pub use self::routes_list_routes_response::RoutesListRoutesResponse; pub mod routes_route; diff --git a/sdks/api/full/rust/src/models/pagination.rs b/sdks/api/full/rust/src/models/pagination.rs index 84491d3ff0..bbfdf82c3e 100644 --- a/sdks/api/full/rust/src/models/pagination.rs +++ b/sdks/api/full/rust/src/models/pagination.rs @@ -4,25 +4,18 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct Pagination { - #[serde(rename = "cursor", skip_serializing_if = "Option::is_none")] - pub cursor: Option, + #[serde(rename = "cursor", skip_serializing_if = "Option::is_none")] + pub cursor: Option, } impl Pagination { - pub fn new() -> Pagination { - Pagination { - cursor: None, - } - } + pub fn new() -> Pagination { + Pagination { cursor: None } + } } - - diff --git a/sdks/api/full/rust/src/models/portal_get_game_profile_response.rs b/sdks/api/full/rust/src/models/portal_get_game_profile_response.rs index 956b0da212..8e42244a81 100644 --- a/sdks/api/full/rust/src/models/portal_get_game_profile_response.rs +++ b/sdks/api/full/rust/src/models/portal_get_game_profile_response.rs @@ -4,28 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct PortalGetGameProfileResponse { - #[serde(rename = "game")] - pub game: Box, - #[serde(rename = "watch")] - pub watch: Box, + #[serde(rename = "game")] + pub game: Box, + #[serde(rename = "watch")] + pub watch: Box, } impl PortalGetGameProfileResponse { - pub fn new(game: crate::models::GameProfile, watch: crate::models::WatchResponse) -> PortalGetGameProfileResponse { - PortalGetGameProfileResponse { - game: Box::new(game), - watch: Box::new(watch), - } - } + pub fn new( + game: crate::models::GameProfile, + watch: crate::models::WatchResponse, + ) -> PortalGetGameProfileResponse { + PortalGetGameProfileResponse { + game: Box::new(game), + watch: Box::new(watch), + } + } } - - diff --git a/sdks/api/full/rust/src/models/portal_get_suggested_games_response.rs b/sdks/api/full/rust/src/models/portal_get_suggested_games_response.rs index c51f589ef1..38968ec3e8 100644 --- a/sdks/api/full/rust/src/models/portal_get_suggested_games_response.rs +++ b/sdks/api/full/rust/src/models/portal_get_suggested_games_response.rs @@ -4,29 +4,27 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct PortalGetSuggestedGamesResponse { - /// A list of game summaries. - #[serde(rename = "games")] - pub games: Vec, - #[serde(rename = "watch")] - pub watch: Box, + /// A list of game summaries. + #[serde(rename = "games")] + pub games: Vec, + #[serde(rename = "watch")] + pub watch: Box, } impl PortalGetSuggestedGamesResponse { - pub fn new(games: Vec, watch: crate::models::WatchResponse) -> PortalGetSuggestedGamesResponse { - PortalGetSuggestedGamesResponse { - games, - watch: Box::new(watch), - } - } + pub fn new( + games: Vec, + watch: crate::models::WatchResponse, + ) -> PortalGetSuggestedGamesResponse { + PortalGetSuggestedGamesResponse { + games, + watch: Box::new(watch), + } + } } - - diff --git a/sdks/api/full/rust/src/models/portal_notification_register_firebase_service.rs b/sdks/api/full/rust/src/models/portal_notification_register_firebase_service.rs index 213357992e..89005a210b 100644 --- a/sdks/api/full/rust/src/models/portal_notification_register_firebase_service.rs +++ b/sdks/api/full/rust/src/models/portal_notification_register_firebase_service.rs @@ -4,25 +4,18 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct PortalNotificationRegisterFirebaseService { - #[serde(rename = "access_key")] - pub access_key: String, + #[serde(rename = "access_key")] + pub access_key: String, } impl PortalNotificationRegisterFirebaseService { - pub fn new(access_key: String) -> PortalNotificationRegisterFirebaseService { - PortalNotificationRegisterFirebaseService { - access_key, - } - } + pub fn new(access_key: String) -> PortalNotificationRegisterFirebaseService { + PortalNotificationRegisterFirebaseService { access_key } + } } - - diff --git a/sdks/api/full/rust/src/models/portal_notification_register_service.rs b/sdks/api/full/rust/src/models/portal_notification_register_service.rs index 1058fd743b..e9232ea5ec 100644 --- a/sdks/api/full/rust/src/models/portal_notification_register_service.rs +++ b/sdks/api/full/rust/src/models/portal_notification_register_service.rs @@ -4,25 +4,18 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct PortalNotificationRegisterService { - #[serde(rename = "firebase", skip_serializing_if = "Option::is_none")] - pub firebase: Option>, + #[serde(rename = "firebase", skip_serializing_if = "Option::is_none")] + pub firebase: Option>, } impl PortalNotificationRegisterService { - pub fn new() -> PortalNotificationRegisterService { - PortalNotificationRegisterService { - firebase: None, - } - } + pub fn new() -> PortalNotificationRegisterService { + PortalNotificationRegisterService { firebase: None } + } } - - diff --git a/sdks/api/full/rust/src/models/portal_notification_unregister_service.rs b/sdks/api/full/rust/src/models/portal_notification_unregister_service.rs index d4bda04c73..f7d60722c9 100644 --- a/sdks/api/full/rust/src/models/portal_notification_unregister_service.rs +++ b/sdks/api/full/rust/src/models/portal_notification_unregister_service.rs @@ -4,33 +4,27 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum PortalNotificationUnregisterService { - #[serde(rename = "firebase")] - Firebase, - + #[serde(rename = "firebase")] + Firebase, } impl ToString for PortalNotificationUnregisterService { - fn to_string(&self) -> String { - match self { - Self::Firebase => String::from("firebase"), - } - } + fn to_string(&self) -> String { + match self { + Self::Firebase => String::from("firebase"), + } + } } impl Default for PortalNotificationUnregisterService { - fn default() -> PortalNotificationUnregisterService { - Self::Firebase - } + fn default() -> PortalNotificationUnregisterService { + Self::Firebase + } } - - - - diff --git a/sdks/api/full/rust/src/models/provision_datacenters_get_servers_response.rs b/sdks/api/full/rust/src/models/provision_datacenters_get_servers_response.rs index cef831a654..31427c0f65 100644 --- a/sdks/api/full/rust/src/models/provision_datacenters_get_servers_response.rs +++ b/sdks/api/full/rust/src/models/provision_datacenters_get_servers_response.rs @@ -4,25 +4,20 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ProvisionDatacentersGetServersResponse { - #[serde(rename = "servers")] - pub servers: Vec, + #[serde(rename = "servers")] + pub servers: Vec, } impl ProvisionDatacentersGetServersResponse { - pub fn new(servers: Vec) -> ProvisionDatacentersGetServersResponse { - ProvisionDatacentersGetServersResponse { - servers, - } - } + pub fn new( + servers: Vec, + ) -> ProvisionDatacentersGetServersResponse { + ProvisionDatacentersGetServersResponse { servers } + } } - - diff --git a/sdks/api/full/rust/src/models/provision_datacenters_get_tls_response.rs b/sdks/api/full/rust/src/models/provision_datacenters_get_tls_response.rs index eac8fdc7f8..9af570ce79 100644 --- a/sdks/api/full/rust/src/models/provision_datacenters_get_tls_response.rs +++ b/sdks/api/full/rust/src/models/provision_datacenters_get_tls_response.rs @@ -4,34 +4,34 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ProvisionDatacentersGetTlsResponse { - #[serde(rename = "job_cert_pem")] - pub job_cert_pem: String, - #[serde(rename = "job_private_key_pem")] - pub job_private_key_pem: String, - #[serde(rename = "api_cert_pem")] - pub api_cert_pem: String, - #[serde(rename = "api_private_key_pem")] - pub api_private_key_pem: String, + #[serde(rename = "job_cert_pem")] + pub job_cert_pem: String, + #[serde(rename = "job_private_key_pem")] + pub job_private_key_pem: String, + #[serde(rename = "api_cert_pem")] + pub api_cert_pem: String, + #[serde(rename = "api_private_key_pem")] + pub api_private_key_pem: String, } impl ProvisionDatacentersGetTlsResponse { - pub fn new(job_cert_pem: String, job_private_key_pem: String, api_cert_pem: String, api_private_key_pem: String) -> ProvisionDatacentersGetTlsResponse { - ProvisionDatacentersGetTlsResponse { - job_cert_pem, - job_private_key_pem, - api_cert_pem, - api_private_key_pem, - } - } + pub fn new( + job_cert_pem: String, + job_private_key_pem: String, + api_cert_pem: String, + api_private_key_pem: String, + ) -> ProvisionDatacentersGetTlsResponse { + ProvisionDatacentersGetTlsResponse { + job_cert_pem, + job_private_key_pem, + api_cert_pem, + api_private_key_pem, + } + } } - - diff --git a/sdks/api/full/rust/src/models/provision_pool_type.rs b/sdks/api/full/rust/src/models/provision_pool_type.rs index 105ac14a2e..db975db3ce 100644 --- a/sdks/api/full/rust/src/models/provision_pool_type.rs +++ b/sdks/api/full/rust/src/models/provision_pool_type.rs @@ -4,57 +4,51 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum ProvisionPoolType { - #[serde(rename = "job")] - Job, - #[serde(rename = "gg")] - Gg, - #[serde(rename = "ats")] - Ats, - #[serde(rename = "pegboard")] - Pegboard, - #[serde(rename = "pegboard_isolate")] - PegboardIsolate, - #[serde(rename = "fdb")] - Fdb, - #[serde(rename = "worker")] - Worker, - #[serde(rename = "nats")] - Nats, - #[serde(rename = "guard")] - Guard, - + #[serde(rename = "job")] + Job, + #[serde(rename = "gg")] + Gg, + #[serde(rename = "ats")] + Ats, + #[serde(rename = "pegboard")] + Pegboard, + #[serde(rename = "pegboard_isolate")] + PegboardIsolate, + #[serde(rename = "fdb")] + Fdb, + #[serde(rename = "worker")] + Worker, + #[serde(rename = "nats")] + Nats, + #[serde(rename = "guard")] + Guard, } impl ToString for ProvisionPoolType { - fn to_string(&self) -> String { - match self { - Self::Job => String::from("job"), - Self::Gg => String::from("gg"), - Self::Ats => String::from("ats"), - Self::Pegboard => String::from("pegboard"), - Self::PegboardIsolate => String::from("pegboard_isolate"), - Self::Fdb => String::from("fdb"), - Self::Worker => String::from("worker"), - Self::Nats => String::from("nats"), - Self::Guard => String::from("guard"), - } - } + fn to_string(&self) -> String { + match self { + Self::Job => String::from("job"), + Self::Gg => String::from("gg"), + Self::Ats => String::from("ats"), + Self::Pegboard => String::from("pegboard"), + Self::PegboardIsolate => String::from("pegboard_isolate"), + Self::Fdb => String::from("fdb"), + Self::Worker => String::from("worker"), + Self::Nats => String::from("nats"), + Self::Guard => String::from("guard"), + } + } } impl Default for ProvisionPoolType { - fn default() -> ProvisionPoolType { - Self::Job - } + fn default() -> ProvisionPoolType { + Self::Job + } } - - - - diff --git a/sdks/api/full/rust/src/models/provision_server.rs b/sdks/api/full/rust/src/models/provision_server.rs index dc333a2ad3..2fbdaaaa72 100644 --- a/sdks/api/full/rust/src/models/provision_server.rs +++ b/sdks/api/full/rust/src/models/provision_server.rs @@ -4,37 +4,36 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ProvisionServer { - #[serde(rename = "server_id")] - pub server_id: uuid::Uuid, - #[serde(rename = "datacenter_id")] - pub datacenter_id: uuid::Uuid, - #[serde(rename = "pool_type")] - pub pool_type: crate::models::ProvisionPoolType, - #[serde(rename = "lan_ip", skip_serializing_if = "Option::is_none")] - pub lan_ip: Option, - #[serde(rename = "wan_ip", skip_serializing_if = "Option::is_none")] - pub wan_ip: Option, + #[serde(rename = "server_id")] + pub server_id: uuid::Uuid, + #[serde(rename = "datacenter_id")] + pub datacenter_id: uuid::Uuid, + #[serde(rename = "pool_type")] + pub pool_type: crate::models::ProvisionPoolType, + #[serde(rename = "lan_ip", skip_serializing_if = "Option::is_none")] + pub lan_ip: Option, + #[serde(rename = "wan_ip", skip_serializing_if = "Option::is_none")] + pub wan_ip: Option, } impl ProvisionServer { - pub fn new(server_id: uuid::Uuid, datacenter_id: uuid::Uuid, pool_type: crate::models::ProvisionPoolType) -> ProvisionServer { - ProvisionServer { - server_id, - datacenter_id, - pool_type, - lan_ip: None, - wan_ip: None, - } - } + pub fn new( + server_id: uuid::Uuid, + datacenter_id: uuid::Uuid, + pool_type: crate::models::ProvisionPoolType, + ) -> ProvisionServer { + ProvisionServer { + server_id, + datacenter_id, + pool_type, + lan_ip: None, + wan_ip: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/provision_servers_get_info_response.rs b/sdks/api/full/rust/src/models/provision_servers_get_info_response.rs index 3e714c756e..c5c0d1e65a 100644 --- a/sdks/api/full/rust/src/models/provision_servers_get_info_response.rs +++ b/sdks/api/full/rust/src/models/provision_servers_get_info_response.rs @@ -4,51 +4,56 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ProvisionServersGetInfoResponse { - #[serde(rename = "name")] - pub name: String, - #[serde(rename = "server_id")] - pub server_id: uuid::Uuid, - #[serde(rename = "datacenter_id")] - pub datacenter_id: uuid::Uuid, - #[serde(rename = "datacenter_name_id")] - pub datacenter_name_id: String, - #[serde(rename = "cluster_id")] - pub cluster_id: uuid::Uuid, - #[serde(rename = "lan_ip")] - pub lan_ip: String, - #[serde(rename = "wan_ip")] - pub wan_ip: String, - /// **Deprecated**: Use lan_ip - #[serde(rename = "vlan_ip")] - pub vlan_ip: String, - /// **Deprecated**: Use wan_ip - #[serde(rename = "public_ip")] - pub public_ip: String, + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "server_id")] + pub server_id: uuid::Uuid, + #[serde(rename = "datacenter_id")] + pub datacenter_id: uuid::Uuid, + #[serde(rename = "datacenter_name_id")] + pub datacenter_name_id: String, + #[serde(rename = "cluster_id")] + pub cluster_id: uuid::Uuid, + #[serde(rename = "lan_ip")] + pub lan_ip: String, + #[serde(rename = "wan_ip")] + pub wan_ip: String, + /// **Deprecated**: Use lan_ip + #[serde(rename = "vlan_ip")] + pub vlan_ip: String, + /// **Deprecated**: Use wan_ip + #[serde(rename = "public_ip")] + pub public_ip: String, } impl ProvisionServersGetInfoResponse { - pub fn new(name: String, server_id: uuid::Uuid, datacenter_id: uuid::Uuid, datacenter_name_id: String, cluster_id: uuid::Uuid, lan_ip: String, wan_ip: String, vlan_ip: String, public_ip: String) -> ProvisionServersGetInfoResponse { - ProvisionServersGetInfoResponse { - name, - server_id, - datacenter_id, - datacenter_name_id, - cluster_id, - lan_ip, - wan_ip, - vlan_ip, - public_ip, - } - } + pub fn new( + name: String, + server_id: uuid::Uuid, + datacenter_id: uuid::Uuid, + datacenter_name_id: String, + cluster_id: uuid::Uuid, + lan_ip: String, + wan_ip: String, + vlan_ip: String, + public_ip: String, + ) -> ProvisionServersGetInfoResponse { + ProvisionServersGetInfoResponse { + name, + server_id, + datacenter_id, + datacenter_name_id, + cluster_id, + lan_ip, + wan_ip, + vlan_ip, + public_ip, + } + } } - - diff --git a/sdks/api/full/rust/src/models/provision_tunnel_get_tls_response.rs b/sdks/api/full/rust/src/models/provision_tunnel_get_tls_response.rs index b06fa6d168..ec3d3f1661 100644 --- a/sdks/api/full/rust/src/models/provision_tunnel_get_tls_response.rs +++ b/sdks/api/full/rust/src/models/provision_tunnel_get_tls_response.rs @@ -4,31 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ProvisionTunnelGetTlsResponse { - #[serde(rename = "cert_pem")] - pub cert_pem: String, - #[serde(rename = "root_ca_cert_pem")] - pub root_ca_cert_pem: String, - #[serde(rename = "private_key_pem")] - pub private_key_pem: String, + #[serde(rename = "cert_pem")] + pub cert_pem: String, + #[serde(rename = "root_ca_cert_pem")] + pub root_ca_cert_pem: String, + #[serde(rename = "private_key_pem")] + pub private_key_pem: String, } impl ProvisionTunnelGetTlsResponse { - pub fn new(cert_pem: String, root_ca_cert_pem: String, private_key_pem: String) -> ProvisionTunnelGetTlsResponse { - ProvisionTunnelGetTlsResponse { - cert_pem, - root_ca_cert_pem, - private_key_pem, - } - } + pub fn new( + cert_pem: String, + root_ca_cert_pem: String, + private_key_pem: String, + ) -> ProvisionTunnelGetTlsResponse { + ProvisionTunnelGetTlsResponse { + cert_pem, + root_ca_cert_pem, + private_key_pem, + } + } } - - diff --git a/sdks/api/full/rust/src/models/regions_list_regions_response.rs b/sdks/api/full/rust/src/models/regions_list_regions_response.rs index 42fe9c1016..5f972f8b22 100644 --- a/sdks/api/full/rust/src/models/regions_list_regions_response.rs +++ b/sdks/api/full/rust/src/models/regions_list_regions_response.rs @@ -4,25 +4,18 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct RegionsListRegionsResponse { - #[serde(rename = "regions")] - pub regions: Vec, + #[serde(rename = "regions")] + pub regions: Vec, } impl RegionsListRegionsResponse { - pub fn new(regions: Vec) -> RegionsListRegionsResponse { - RegionsListRegionsResponse { - regions, - } - } + pub fn new(regions: Vec) -> RegionsListRegionsResponse { + RegionsListRegionsResponse { regions } + } } - - diff --git a/sdks/api/full/rust/src/models/regions_recommend_region_response.rs b/sdks/api/full/rust/src/models/regions_recommend_region_response.rs index 73ce2cf3f7..92fb510264 100644 --- a/sdks/api/full/rust/src/models/regions_recommend_region_response.rs +++ b/sdks/api/full/rust/src/models/regions_recommend_region_response.rs @@ -4,25 +4,20 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct RegionsRecommendRegionResponse { - #[serde(rename = "region")] - pub region: Box, + #[serde(rename = "region")] + pub region: Box, } impl RegionsRecommendRegionResponse { - pub fn new(region: crate::models::RegionsRegion) -> RegionsRecommendRegionResponse { - RegionsRecommendRegionResponse { - region: Box::new(region), - } - } + pub fn new(region: crate::models::RegionsRegion) -> RegionsRecommendRegionResponse { + RegionsRecommendRegionResponse { + region: Box::new(region), + } + } } - - diff --git a/sdks/api/full/rust/src/models/regions_region.rs b/sdks/api/full/rust/src/models/regions_region.rs index 87464064cc..54caabd62a 100644 --- a/sdks/api/full/rust/src/models/regions_region.rs +++ b/sdks/api/full/rust/src/models/regions_region.rs @@ -4,28 +4,20 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct RegionsRegion { - #[serde(rename = "id")] - pub id: String, - #[serde(rename = "name")] - pub name: String, + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "name")] + pub name: String, } impl RegionsRegion { - pub fn new(id: String, name: String) -> RegionsRegion { - RegionsRegion { - id, - name, - } - } + pub fn new(id: String, name: String) -> RegionsRegion { + RegionsRegion { id, name } + } } - - diff --git a/sdks/api/full/rust/src/models/routes_history_response.rs b/sdks/api/full/rust/src/models/routes_history_response.rs new file mode 100644 index 0000000000..3c3a43add4 --- /dev/null +++ b/sdks/api/full/rust/src/models/routes_history_response.rs @@ -0,0 +1,37 @@ +/* + * 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 RoutesHistoryResponse { + #[serde(rename = "metric_names")] + pub metric_names: Vec, + #[serde(rename = "metric_attributes")] + pub metric_attributes: Vec<::std::collections::HashMap>, + #[serde(rename = "metric_types")] + pub metric_types: Vec, + #[serde(rename = "metric_values")] + pub metric_values: Vec>, +} + +impl RoutesHistoryResponse { + pub fn new( + metric_names: Vec, + metric_attributes: Vec<::std::collections::HashMap>, + metric_types: Vec, + metric_values: Vec>, + ) -> RoutesHistoryResponse { + RoutesHistoryResponse { + metric_names, + metric_attributes, + metric_types, + metric_values, + } + } +} diff --git a/sdks/api/full/rust/src/models/routes_list_routes_response.rs b/sdks/api/full/rust/src/models/routes_list_routes_response.rs index 15440edadc..37e84c57ca 100644 --- a/sdks/api/full/rust/src/models/routes_list_routes_response.rs +++ b/sdks/api/full/rust/src/models/routes_list_routes_response.rs @@ -4,25 +4,18 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct RoutesListRoutesResponse { - #[serde(rename = "routes")] - pub routes: Vec, + #[serde(rename = "routes")] + pub routes: Vec, } impl RoutesListRoutesResponse { - pub fn new(routes: Vec) -> RoutesListRoutesResponse { - RoutesListRoutesResponse { - routes, - } - } + pub fn new(routes: Vec) -> RoutesListRoutesResponse { + RoutesListRoutesResponse { routes } + } } - - diff --git a/sdks/api/full/rust/src/models/routes_route.rs b/sdks/api/full/rust/src/models/routes_route.rs index 9ecab10acd..f585f760e4 100644 --- a/sdks/api/full/rust/src/models/routes_route.rs +++ b/sdks/api/full/rust/src/models/routes_route.rs @@ -4,50 +4,54 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct RoutesRoute { - #[serde(rename = "id")] - pub id: String, - /// RFC3339 timestamp - #[serde(rename = "created_at")] - pub created_at: String, - /// RFC3339 timestamp - #[serde(rename = "updated_at")] - pub updated_at: String, - #[serde(rename = "hostname")] - pub hostname: String, - #[serde(rename = "path")] - pub path: String, - /// Whether to route all subpaths of this path - #[serde(rename = "route_subpaths")] - pub route_subpaths: bool, - /// Whether to remove the path prefix before sending the request to the target. - #[serde(rename = "strip_prefix")] - pub strip_prefix: bool, - #[serde(rename = "target")] - pub target: Box, + #[serde(rename = "id")] + pub id: String, + /// RFC3339 timestamp + #[serde(rename = "created_at")] + pub created_at: String, + /// RFC3339 timestamp + #[serde(rename = "updated_at")] + pub updated_at: String, + #[serde(rename = "hostname")] + pub hostname: String, + #[serde(rename = "path")] + pub path: String, + /// Whether to route all subpaths of this path + #[serde(rename = "route_subpaths")] + pub route_subpaths: bool, + /// Whether to remove the path prefix before sending the request to the target. + #[serde(rename = "strip_prefix")] + pub strip_prefix: bool, + #[serde(rename = "target")] + pub target: Box, } impl RoutesRoute { - pub fn new(id: String, created_at: String, updated_at: String, hostname: String, path: String, route_subpaths: bool, strip_prefix: bool, target: crate::models::RoutesRouteTarget) -> RoutesRoute { - RoutesRoute { - id, - created_at, - updated_at, - hostname, - path, - route_subpaths, - strip_prefix, - target: Box::new(target), - } - } + pub fn new( + id: String, + created_at: String, + updated_at: String, + hostname: String, + path: String, + route_subpaths: bool, + strip_prefix: bool, + target: crate::models::RoutesRouteTarget, + ) -> RoutesRoute { + RoutesRoute { + id, + created_at, + updated_at, + hostname, + path, + route_subpaths, + strip_prefix, + target: Box::new(target), + } + } } - - diff --git a/sdks/api/full/rust/src/models/routes_route_target.rs b/sdks/api/full/rust/src/models/routes_route_target.rs index e1c3892e07..a9c7adea85 100644 --- a/sdks/api/full/rust/src/models/routes_route_target.rs +++ b/sdks/api/full/rust/src/models/routes_route_target.rs @@ -4,25 +4,18 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct RoutesRouteTarget { - #[serde(rename = "actors", skip_serializing_if = "Option::is_none")] - pub actors: Option>, + #[serde(rename = "actors", skip_serializing_if = "Option::is_none")] + pub actors: Option>, } impl RoutesRouteTarget { - pub fn new() -> RoutesRouteTarget { - RoutesRouteTarget { - actors: None, - } - } + pub fn new() -> RoutesRouteTarget { + RoutesRouteTarget { actors: None } + } } - - diff --git a/sdks/api/full/rust/src/models/routes_route_target_actors.rs b/sdks/api/full/rust/src/models/routes_route_target_actors.rs index c2e2a1a5dd..d3736a9ff4 100644 --- a/sdks/api/full/rust/src/models/routes_route_target_actors.rs +++ b/sdks/api/full/rust/src/models/routes_route_target_actors.rs @@ -4,28 +4,24 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// RoutesRouteTargetActors : Configuration for targeting actors. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct RoutesRouteTargetActors { - /// Tags of actors to route requests to. - #[serde(rename = "selector_tags")] - pub selector_tags: ::std::collections::HashMap, + /// Tags of actors to route requests to. + #[serde(rename = "selector_tags")] + pub selector_tags: ::std::collections::HashMap, } impl RoutesRouteTargetActors { - /// Configuration for targeting actors. - pub fn new(selector_tags: ::std::collections::HashMap) -> RoutesRouteTargetActors { - RoutesRouteTargetActors { - selector_tags, - } - } + /// Configuration for targeting actors. + pub fn new( + selector_tags: ::std::collections::HashMap, + ) -> RoutesRouteTargetActors { + RoutesRouteTargetActors { selector_tags } + } } - - diff --git a/sdks/api/full/rust/src/models/routes_update_route_body.rs b/sdks/api/full/rust/src/models/routes_update_route_body.rs index 78467e901c..9faf2d82b2 100644 --- a/sdks/api/full/rust/src/models/routes_update_route_body.rs +++ b/sdks/api/full/rust/src/models/routes_update_route_body.rs @@ -4,39 +4,40 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct RoutesUpdateRouteBody { - #[serde(rename = "hostname")] - pub hostname: String, - #[serde(rename = "path")] - pub path: String, - /// Whether to remove the path prefix before sending the request to the actor. - #[serde(rename = "strip_prefix")] - pub strip_prefix: bool, - /// Whether to route all subpaths of this path - #[serde(rename = "route_subpaths")] - pub route_subpaths: bool, - #[serde(rename = "target")] - pub target: Box, + #[serde(rename = "hostname")] + pub hostname: String, + #[serde(rename = "path")] + pub path: String, + /// Whether to remove the path prefix before sending the request to the actor. + #[serde(rename = "strip_prefix")] + pub strip_prefix: bool, + /// Whether to route all subpaths of this path + #[serde(rename = "route_subpaths")] + pub route_subpaths: bool, + #[serde(rename = "target")] + pub target: Box, } impl RoutesUpdateRouteBody { - pub fn new(hostname: String, path: String, strip_prefix: bool, route_subpaths: bool, target: crate::models::RoutesRouteTarget) -> RoutesUpdateRouteBody { - RoutesUpdateRouteBody { - hostname, - path, - strip_prefix, - route_subpaths, - target: Box::new(target), - } - } + pub fn new( + hostname: String, + path: String, + strip_prefix: bool, + route_subpaths: bool, + target: crate::models::RoutesRouteTarget, + ) -> RoutesUpdateRouteBody { + RoutesUpdateRouteBody { + hostname, + path, + strip_prefix, + route_subpaths, + target: Box::new(target), + } + } } - - diff --git a/sdks/api/full/rust/src/models/servers_build.rs b/sdks/api/full/rust/src/models/servers_build.rs index 11a07bc072..987b804116 100644 --- a/sdks/api/full/rust/src/models/servers_build.rs +++ b/sdks/api/full/rust/src/models/servers_build.rs @@ -4,40 +4,41 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ServersBuild { - #[serde(rename = "id")] - pub id: uuid::Uuid, - #[serde(rename = "name")] - pub name: String, - /// RFC3339 timestamp - #[serde(rename = "created_at")] - pub created_at: String, - /// Unsigned 64 bit integer. - #[serde(rename = "content_length")] - pub content_length: i64, - /// Tags of this build - #[serde(rename = "tags")] - pub tags: ::std::collections::HashMap, + #[serde(rename = "id")] + pub id: uuid::Uuid, + #[serde(rename = "name")] + pub name: String, + /// RFC3339 timestamp + #[serde(rename = "created_at")] + pub created_at: String, + /// Unsigned 64 bit integer. + #[serde(rename = "content_length")] + pub content_length: i64, + /// Tags of this build + #[serde(rename = "tags")] + pub tags: ::std::collections::HashMap, } impl ServersBuild { - pub fn new(id: uuid::Uuid, name: String, created_at: String, content_length: i64, tags: ::std::collections::HashMap) -> ServersBuild { - ServersBuild { - id, - name, - created_at, - content_length, - tags, - } - } + pub fn new( + id: uuid::Uuid, + name: String, + created_at: String, + content_length: i64, + tags: ::std::collections::HashMap, + ) -> ServersBuild { + ServersBuild { + id, + name, + created_at, + content_length, + tags, + } + } } - - diff --git a/sdks/api/full/rust/src/models/servers_build_compression.rs b/sdks/api/full/rust/src/models/servers_build_compression.rs index fd549d6279..ab301d44e2 100644 --- a/sdks/api/full/rust/src/models/servers_build_compression.rs +++ b/sdks/api/full/rust/src/models/servers_build_compression.rs @@ -4,36 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum ServersBuildCompression { - #[serde(rename = "none")] - None, - #[serde(rename = "lz4")] - Lz4, - + #[serde(rename = "none")] + None, + #[serde(rename = "lz4")] + Lz4, } impl ToString for ServersBuildCompression { - fn to_string(&self) -> String { - match self { - Self::None => String::from("none"), - Self::Lz4 => String::from("lz4"), - } - } + fn to_string(&self) -> String { + match self { + Self::None => String::from("none"), + Self::Lz4 => String::from("lz4"), + } + } } impl Default for ServersBuildCompression { - fn default() -> ServersBuildCompression { - Self::None - } + fn default() -> ServersBuildCompression { + Self::None + } } - - - - diff --git a/sdks/api/full/rust/src/models/servers_build_kind.rs b/sdks/api/full/rust/src/models/servers_build_kind.rs index 853abbb0e7..e79562ffe6 100644 --- a/sdks/api/full/rust/src/models/servers_build_kind.rs +++ b/sdks/api/full/rust/src/models/servers_build_kind.rs @@ -4,36 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum ServersBuildKind { - #[serde(rename = "docker_image")] - DockerImage, - #[serde(rename = "oci_bundle")] - OciBundle, - + #[serde(rename = "docker_image")] + DockerImage, + #[serde(rename = "oci_bundle")] + OciBundle, } impl ToString for ServersBuildKind { - fn to_string(&self) -> String { - match self { - Self::DockerImage => String::from("docker_image"), - Self::OciBundle => String::from("oci_bundle"), - } - } + fn to_string(&self) -> String { + match self { + Self::DockerImage => String::from("docker_image"), + Self::OciBundle => String::from("oci_bundle"), + } + } } impl Default for ServersBuildKind { - fn default() -> ServersBuildKind { - Self::DockerImage - } + fn default() -> ServersBuildKind { + Self::DockerImage + } } - - - - diff --git a/sdks/api/full/rust/src/models/servers_create_build_request.rs b/sdks/api/full/rust/src/models/servers_create_build_request.rs index 0b6eed0b14..d2680d65c0 100644 --- a/sdks/api/full/rust/src/models/servers_create_build_request.rs +++ b/sdks/api/full/rust/src/models/servers_create_build_request.rs @@ -4,44 +4,46 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ServersCreateBuildRequest { - #[serde(rename = "name")] - pub name: String, - /// A tag given to the game build. - #[serde(rename = "image_tag")] - pub image_tag: String, - #[serde(rename = "image_file")] - pub image_file: Box, - #[serde(rename = "multipart_upload", skip_serializing_if = "Option::is_none")] - pub multipart_upload: Option, - #[serde(rename = "kind", skip_serializing_if = "Option::is_none")] - pub kind: Option, - #[serde(rename = "compression", skip_serializing_if = "Option::is_none")] - pub compression: Option, - #[serde(rename = "prewarm_datacenters", skip_serializing_if = "Option::is_none")] - pub prewarm_datacenters: Option>, + #[serde(rename = "name")] + pub name: String, + /// A tag given to the game build. + #[serde(rename = "image_tag")] + pub image_tag: String, + #[serde(rename = "image_file")] + pub image_file: Box, + #[serde(rename = "multipart_upload", skip_serializing_if = "Option::is_none")] + pub multipart_upload: Option, + #[serde(rename = "kind", skip_serializing_if = "Option::is_none")] + pub kind: Option, + #[serde(rename = "compression", skip_serializing_if = "Option::is_none")] + pub compression: Option, + #[serde( + rename = "prewarm_datacenters", + skip_serializing_if = "Option::is_none" + )] + pub prewarm_datacenters: Option>, } impl ServersCreateBuildRequest { - pub fn new(name: String, image_tag: String, image_file: crate::models::UploadPrepareFile) -> ServersCreateBuildRequest { - ServersCreateBuildRequest { - name, - image_tag, - image_file: Box::new(image_file), - multipart_upload: None, - kind: None, - compression: None, - prewarm_datacenters: None, - } - } + pub fn new( + name: String, + image_tag: String, + image_file: crate::models::UploadPrepareFile, + ) -> ServersCreateBuildRequest { + ServersCreateBuildRequest { + name, + image_tag, + image_file: Box::new(image_file), + multipart_upload: None, + kind: None, + compression: None, + prewarm_datacenters: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/servers_create_build_response.rs b/sdks/api/full/rust/src/models/servers_create_build_response.rs index c277171564..ef947a0bd9 100644 --- a/sdks/api/full/rust/src/models/servers_create_build_response.rs +++ b/sdks/api/full/rust/src/models/servers_create_build_response.rs @@ -4,31 +4,32 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ServersCreateBuildResponse { - #[serde(rename = "build")] - pub build: uuid::Uuid, - #[serde(rename = "image_presigned_request", skip_serializing_if = "Option::is_none")] - pub image_presigned_request: Option>, - #[serde(rename = "image_presigned_requests", skip_serializing_if = "Option::is_none")] - pub image_presigned_requests: Option>, + #[serde(rename = "build")] + pub build: uuid::Uuid, + #[serde( + rename = "image_presigned_request", + skip_serializing_if = "Option::is_none" + )] + pub image_presigned_request: Option>, + #[serde( + rename = "image_presigned_requests", + skip_serializing_if = "Option::is_none" + )] + pub image_presigned_requests: Option>, } impl ServersCreateBuildResponse { - pub fn new(build: uuid::Uuid) -> ServersCreateBuildResponse { - ServersCreateBuildResponse { - build, - image_presigned_request: None, - image_presigned_requests: None, - } - } + pub fn new(build: uuid::Uuid) -> ServersCreateBuildResponse { + ServersCreateBuildResponse { + build, + image_presigned_request: None, + image_presigned_requests: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/servers_create_server_network_request.rs b/sdks/api/full/rust/src/models/servers_create_server_network_request.rs index d469cc181d..78756844c5 100644 --- a/sdks/api/full/rust/src/models/servers_create_server_network_request.rs +++ b/sdks/api/full/rust/src/models/servers_create_server_network_request.rs @@ -4,28 +4,22 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ServersCreateServerNetworkRequest { - #[serde(rename = "mode", skip_serializing_if = "Option::is_none")] - pub mode: Option, - #[serde(rename = "ports")] - pub ports: ::std::collections::HashMap, + #[serde(rename = "mode", skip_serializing_if = "Option::is_none")] + pub mode: Option, + #[serde(rename = "ports")] + pub ports: ::std::collections::HashMap, } impl ServersCreateServerNetworkRequest { - pub fn new(ports: ::std::collections::HashMap) -> ServersCreateServerNetworkRequest { - ServersCreateServerNetworkRequest { - mode: None, - ports, - } - } + pub fn new( + ports: ::std::collections::HashMap, + ) -> ServersCreateServerNetworkRequest { + ServersCreateServerNetworkRequest { mode: None, ports } + } } - - diff --git a/sdks/api/full/rust/src/models/servers_create_server_port_request.rs b/sdks/api/full/rust/src/models/servers_create_server_port_request.rs index ea999ac791..3225f27cd2 100644 --- a/sdks/api/full/rust/src/models/servers_create_server_port_request.rs +++ b/sdks/api/full/rust/src/models/servers_create_server_port_request.rs @@ -4,31 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ServersCreateServerPortRequest { - #[serde(rename = "protocol")] - pub protocol: crate::models::ServersPortProtocol, - #[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>, + #[serde(rename = "protocol")] + pub protocol: crate::models::ServersPortProtocol, + #[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 ServersCreateServerPortRequest { - pub fn new(protocol: crate::models::ServersPortProtocol) -> ServersCreateServerPortRequest { - ServersCreateServerPortRequest { - protocol, - internal_port: None, - routing: None, - } - } + pub fn new(protocol: crate::models::ServersPortProtocol) -> ServersCreateServerPortRequest { + ServersCreateServerPortRequest { + protocol, + internal_port: None, + routing: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/servers_create_server_request.rs b/sdks/api/full/rust/src/models/servers_create_server_request.rs index 9f741649d6..ef8b316d80 100644 --- a/sdks/api/full/rust/src/models/servers_create_server_request.rs +++ b/sdks/api/full/rust/src/models/servers_create_server_request.rs @@ -4,40 +4,41 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ServersCreateServerRequest { - #[serde(rename = "datacenter")] - pub datacenter: uuid::Uuid, - #[serde(rename = "tags", deserialize_with = "Option::deserialize")] - pub tags: Option, - #[serde(rename = "runtime")] - pub runtime: Box, - #[serde(rename = "network")] - pub network: Box, - #[serde(rename = "resources")] - pub resources: Box, - #[serde(rename = "lifecycle", skip_serializing_if = "Option::is_none")] - pub lifecycle: Option>, + #[serde(rename = "datacenter")] + pub datacenter: uuid::Uuid, + #[serde(rename = "tags", deserialize_with = "Option::deserialize")] + pub tags: Option, + #[serde(rename = "runtime")] + pub runtime: Box, + #[serde(rename = "network")] + pub network: Box, + #[serde(rename = "resources")] + pub resources: Box, + #[serde(rename = "lifecycle", skip_serializing_if = "Option::is_none")] + pub lifecycle: Option>, } impl ServersCreateServerRequest { - pub fn new(datacenter: uuid::Uuid, tags: Option, runtime: crate::models::ServersCreateServerRuntimeRequest, network: crate::models::ServersCreateServerNetworkRequest, resources: crate::models::ServersResources) -> ServersCreateServerRequest { - ServersCreateServerRequest { - datacenter, - tags, - runtime: Box::new(runtime), - network: Box::new(network), - resources: Box::new(resources), - lifecycle: None, - } - } + pub fn new( + datacenter: uuid::Uuid, + tags: Option, + runtime: crate::models::ServersCreateServerRuntimeRequest, + network: crate::models::ServersCreateServerNetworkRequest, + resources: crate::models::ServersResources, + ) -> ServersCreateServerRequest { + ServersCreateServerRequest { + datacenter, + tags, + runtime: Box::new(runtime), + network: Box::new(network), + resources: Box::new(resources), + lifecycle: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/servers_create_server_response.rs b/sdks/api/full/rust/src/models/servers_create_server_response.rs index 3c32cbd896..b26f499470 100644 --- a/sdks/api/full/rust/src/models/servers_create_server_response.rs +++ b/sdks/api/full/rust/src/models/servers_create_server_response.rs @@ -4,25 +4,20 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ServersCreateServerResponse { - #[serde(rename = "server")] - pub server: Box, + #[serde(rename = "server")] + pub server: Box, } impl ServersCreateServerResponse { - pub fn new(server: crate::models::ServersServer) -> ServersCreateServerResponse { - ServersCreateServerResponse { - server: Box::new(server), - } - } + pub fn new(server: crate::models::ServersServer) -> ServersCreateServerResponse { + ServersCreateServerResponse { + server: Box::new(server), + } + } } - - diff --git a/sdks/api/full/rust/src/models/servers_create_server_runtime_request.rs b/sdks/api/full/rust/src/models/servers_create_server_runtime_request.rs index 061084a709..e03f59e7dc 100644 --- a/sdks/api/full/rust/src/models/servers_create_server_runtime_request.rs +++ b/sdks/api/full/rust/src/models/servers_create_server_runtime_request.rs @@ -4,31 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ServersCreateServerRuntimeRequest { - #[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 = "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 ServersCreateServerRuntimeRequest { - pub fn new(build: uuid::Uuid) -> ServersCreateServerRuntimeRequest { - ServersCreateServerRuntimeRequest { - build, - arguments: None, - environment: None, - } - } + pub fn new(build: uuid::Uuid) -> ServersCreateServerRuntimeRequest { + ServersCreateServerRuntimeRequest { + build, + arguments: None, + environment: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/servers_datacenter.rs b/sdks/api/full/rust/src/models/servers_datacenter.rs index eef607a2a3..d4b2c26ade 100644 --- a/sdks/api/full/rust/src/models/servers_datacenter.rs +++ b/sdks/api/full/rust/src/models/servers_datacenter.rs @@ -4,31 +4,22 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ServersDatacenter { - #[serde(rename = "id")] - pub id: uuid::Uuid, - #[serde(rename = "slug")] - pub slug: String, - #[serde(rename = "name")] - pub name: String, + #[serde(rename = "id")] + pub id: uuid::Uuid, + #[serde(rename = "slug")] + pub slug: String, + #[serde(rename = "name")] + pub name: String, } impl ServersDatacenter { - pub fn new(id: uuid::Uuid, slug: String, name: String) -> ServersDatacenter { - ServersDatacenter { - id, - slug, - name, - } - } + pub fn new(id: uuid::Uuid, slug: String, name: String) -> ServersDatacenter { + ServersDatacenter { id, slug, name } + } } - - diff --git a/sdks/api/full/rust/src/models/servers_get_build_response.rs b/sdks/api/full/rust/src/models/servers_get_build_response.rs index 25515b9332..65ac964d73 100644 --- a/sdks/api/full/rust/src/models/servers_get_build_response.rs +++ b/sdks/api/full/rust/src/models/servers_get_build_response.rs @@ -4,25 +4,20 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ServersGetBuildResponse { - #[serde(rename = "build")] - pub build: Box, + #[serde(rename = "build")] + pub build: Box, } impl ServersGetBuildResponse { - pub fn new(build: crate::models::ServersBuild) -> ServersGetBuildResponse { - ServersGetBuildResponse { - build: Box::new(build), - } - } + pub fn new(build: crate::models::ServersBuild) -> ServersGetBuildResponse { + ServersGetBuildResponse { + build: Box::new(build), + } + } } - - diff --git a/sdks/api/full/rust/src/models/servers_get_server_logs_response.rs b/sdks/api/full/rust/src/models/servers_get_server_logs_response.rs index dd6df5a770..df3bc16c0c 100644 --- a/sdks/api/full/rust/src/models/servers_get_server_logs_response.rs +++ b/sdks/api/full/rust/src/models/servers_get_server_logs_response.rs @@ -4,33 +4,32 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ServersGetServerLogsResponse { - /// Sorted old to new. - #[serde(rename = "lines")] - pub lines: Vec, - /// Sorted old to new. - #[serde(rename = "timestamps")] - pub timestamps: Vec, - #[serde(rename = "watch")] - pub watch: Box, + /// Sorted old to new. + #[serde(rename = "lines")] + pub lines: Vec, + /// Sorted old to new. + #[serde(rename = "timestamps")] + pub timestamps: Vec, + #[serde(rename = "watch")] + pub watch: Box, } impl ServersGetServerLogsResponse { - pub fn new(lines: Vec, timestamps: Vec, watch: crate::models::WatchResponse) -> ServersGetServerLogsResponse { - ServersGetServerLogsResponse { - lines, - timestamps, - watch: Box::new(watch), - } - } + pub fn new( + lines: Vec, + timestamps: Vec, + watch: crate::models::WatchResponse, + ) -> ServersGetServerLogsResponse { + ServersGetServerLogsResponse { + lines, + timestamps, + watch: Box::new(watch), + } + } } - - diff --git a/sdks/api/full/rust/src/models/servers_get_server_response.rs b/sdks/api/full/rust/src/models/servers_get_server_response.rs index 2f017da813..a6a739546b 100644 --- a/sdks/api/full/rust/src/models/servers_get_server_response.rs +++ b/sdks/api/full/rust/src/models/servers_get_server_response.rs @@ -4,25 +4,20 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ServersGetServerResponse { - #[serde(rename = "server")] - pub server: Box, + #[serde(rename = "server")] + pub server: Box, } impl ServersGetServerResponse { - pub fn new(server: crate::models::ServersServer) -> ServersGetServerResponse { - ServersGetServerResponse { - server: Box::new(server), - } - } + pub fn new(server: crate::models::ServersServer) -> ServersGetServerResponse { + ServersGetServerResponse { + server: Box::new(server), + } + } } - - diff --git a/sdks/api/full/rust/src/models/servers_lifecycle.rs b/sdks/api/full/rust/src/models/servers_lifecycle.rs index 47b2074f46..6268eb01b8 100644 --- a/sdks/api/full/rust/src/models/servers_lifecycle.rs +++ b/sdks/api/full/rust/src/models/servers_lifecycle.rs @@ -4,26 +4,19 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ServersLifecycle { - /// The duration to wait for in milliseconds before killing the server. This should be set to a safe default, and can be overridden during a DELETE request if needed. - #[serde(rename = "kill_timeout", skip_serializing_if = "Option::is_none")] - pub kill_timeout: Option, + /// The duration to wait for in milliseconds before killing the server. This should be set to a safe default, and can be overridden during a DELETE request if needed. + #[serde(rename = "kill_timeout", skip_serializing_if = "Option::is_none")] + pub kill_timeout: Option, } impl ServersLifecycle { - pub fn new() -> ServersLifecycle { - ServersLifecycle { - kill_timeout: None, - } - } + pub fn new() -> ServersLifecycle { + ServersLifecycle { kill_timeout: None } + } } - - diff --git a/sdks/api/full/rust/src/models/servers_list_builds_response.rs b/sdks/api/full/rust/src/models/servers_list_builds_response.rs index c3e1d63e80..e9bc64a4ce 100644 --- a/sdks/api/full/rust/src/models/servers_list_builds_response.rs +++ b/sdks/api/full/rust/src/models/servers_list_builds_response.rs @@ -4,26 +4,19 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ServersListBuildsResponse { - /// A list of builds for the game associated with the token. - #[serde(rename = "builds")] - pub builds: Vec, + /// A list of builds for the game associated with the token. + #[serde(rename = "builds")] + pub builds: Vec, } impl ServersListBuildsResponse { - pub fn new(builds: Vec) -> ServersListBuildsResponse { - ServersListBuildsResponse { - builds, - } - } + pub fn new(builds: Vec) -> ServersListBuildsResponse { + ServersListBuildsResponse { builds } + } } - - diff --git a/sdks/api/full/rust/src/models/servers_list_datacenters_response.rs b/sdks/api/full/rust/src/models/servers_list_datacenters_response.rs index ac3a02b52d..3e228c8d52 100644 --- a/sdks/api/full/rust/src/models/servers_list_datacenters_response.rs +++ b/sdks/api/full/rust/src/models/servers_list_datacenters_response.rs @@ -4,25 +4,20 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ServersListDatacentersResponse { - #[serde(rename = "datacenters")] - pub datacenters: Vec, + #[serde(rename = "datacenters")] + pub datacenters: Vec, } impl ServersListDatacentersResponse { - pub fn new(datacenters: Vec) -> ServersListDatacentersResponse { - ServersListDatacentersResponse { - datacenters, - } - } + pub fn new( + datacenters: Vec, + ) -> ServersListDatacentersResponse { + ServersListDatacentersResponse { datacenters } + } } - - diff --git a/sdks/api/full/rust/src/models/servers_list_servers_response.rs b/sdks/api/full/rust/src/models/servers_list_servers_response.rs index 202010aa26..75d728f86f 100644 --- a/sdks/api/full/rust/src/models/servers_list_servers_response.rs +++ b/sdks/api/full/rust/src/models/servers_list_servers_response.rs @@ -4,26 +4,19 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ServersListServersResponse { - /// A list of servers for the game associated with the token. - #[serde(rename = "servers")] - pub servers: Vec, + /// A list of servers for the game associated with the token. + #[serde(rename = "servers")] + pub servers: Vec, } impl ServersListServersResponse { - pub fn new(servers: Vec) -> ServersListServersResponse { - ServersListServersResponse { - servers, - } - } + pub fn new(servers: Vec) -> ServersListServersResponse { + ServersListServersResponse { servers } + } } - - diff --git a/sdks/api/full/rust/src/models/servers_log_stream.rs b/sdks/api/full/rust/src/models/servers_log_stream.rs index b96bdda215..22c8742c30 100644 --- a/sdks/api/full/rust/src/models/servers_log_stream.rs +++ b/sdks/api/full/rust/src/models/servers_log_stream.rs @@ -4,36 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum ServersLogStream { - #[serde(rename = "std_out")] - StdOut, - #[serde(rename = "std_err")] - StdErr, - + #[serde(rename = "std_out")] + StdOut, + #[serde(rename = "std_err")] + StdErr, } impl ToString for ServersLogStream { - fn to_string(&self) -> String { - match self { - Self::StdOut => String::from("std_out"), - Self::StdErr => String::from("std_err"), - } - } + fn to_string(&self) -> String { + match self { + Self::StdOut => String::from("std_out"), + Self::StdErr => String::from("std_err"), + } + } } impl Default for ServersLogStream { - fn default() -> ServersLogStream { - Self::StdOut - } + fn default() -> ServersLogStream { + Self::StdOut + } } - - - - diff --git a/sdks/api/full/rust/src/models/servers_network.rs b/sdks/api/full/rust/src/models/servers_network.rs index 97bade5673..5a0b97d95b 100644 --- a/sdks/api/full/rust/src/models/servers_network.rs +++ b/sdks/api/full/rust/src/models/servers_network.rs @@ -4,28 +4,22 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ServersNetwork { - #[serde(rename = "mode", skip_serializing_if = "Option::is_none")] - pub mode: Option, - #[serde(rename = "ports")] - pub ports: ::std::collections::HashMap, + #[serde(rename = "mode", skip_serializing_if = "Option::is_none")] + pub mode: Option, + #[serde(rename = "ports")] + pub ports: ::std::collections::HashMap, } impl ServersNetwork { - pub fn new(ports: ::std::collections::HashMap) -> ServersNetwork { - ServersNetwork { - mode: None, - ports, - } - } + pub fn new( + ports: ::std::collections::HashMap, + ) -> ServersNetwork { + ServersNetwork { mode: None, ports } + } } - - diff --git a/sdks/api/full/rust/src/models/servers_network_mode.rs b/sdks/api/full/rust/src/models/servers_network_mode.rs index bbb9bd9a5b..d18f6caea8 100644 --- a/sdks/api/full/rust/src/models/servers_network_mode.rs +++ b/sdks/api/full/rust/src/models/servers_network_mode.rs @@ -4,36 +4,30 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum ServersNetworkMode { - #[serde(rename = "bridge")] - Bridge, - #[serde(rename = "host")] - Host, - + #[serde(rename = "bridge")] + Bridge, + #[serde(rename = "host")] + Host, } impl ToString for ServersNetworkMode { - fn to_string(&self) -> String { - match self { - Self::Bridge => String::from("bridge"), - Self::Host => String::from("host"), - } - } + fn to_string(&self) -> String { + match self { + Self::Bridge => String::from("bridge"), + Self::Host => String::from("host"), + } + } } impl Default for ServersNetworkMode { - fn default() -> ServersNetworkMode { - Self::Bridge - } + fn default() -> ServersNetworkMode { + Self::Bridge + } } - - - - diff --git a/sdks/api/full/rust/src/models/servers_patch_build_tags_request.rs b/sdks/api/full/rust/src/models/servers_patch_build_tags_request.rs index 1228a6c914..7043c961de 100644 --- a/sdks/api/full/rust/src/models/servers_patch_build_tags_request.rs +++ b/sdks/api/full/rust/src/models/servers_patch_build_tags_request.rs @@ -4,29 +4,24 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ServersPatchBuildTagsRequest { - #[serde(rename = "tags", deserialize_with = "Option::deserialize")] - pub tags: Option, - /// Removes the given tag keys from all other builds. - #[serde(rename = "exclusive_tags", skip_serializing_if = "Option::is_none")] - pub exclusive_tags: Option>, + #[serde(rename = "tags", deserialize_with = "Option::deserialize")] + pub tags: Option, + /// Removes the given tag keys from all other builds. + #[serde(rename = "exclusive_tags", skip_serializing_if = "Option::is_none")] + pub exclusive_tags: Option>, } impl ServersPatchBuildTagsRequest { - pub fn new(tags: Option) -> ServersPatchBuildTagsRequest { - ServersPatchBuildTagsRequest { - tags, - exclusive_tags: None, - } - } + pub fn new(tags: Option) -> ServersPatchBuildTagsRequest { + ServersPatchBuildTagsRequest { + tags, + exclusive_tags: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/servers_port.rs b/sdks/api/full/rust/src/models/servers_port.rs index 3856902f56..abbdadc8d7 100644 --- a/sdks/api/full/rust/src/models/servers_port.rs +++ b/sdks/api/full/rust/src/models/servers_port.rs @@ -4,37 +4,35 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ServersPort { - #[serde(rename = "protocol")] - pub protocol: crate::models::ServersPortProtocol, - #[serde(rename = "internal_port", skip_serializing_if = "Option::is_none")] - pub internal_port: Option, - #[serde(rename = "public_hostname", skip_serializing_if = "Option::is_none")] - pub public_hostname: Option, - #[serde(rename = "public_port", skip_serializing_if = "Option::is_none")] - pub public_port: Option, - #[serde(rename = "routing")] - pub routing: Box, + #[serde(rename = "protocol")] + pub protocol: crate::models::ServersPortProtocol, + #[serde(rename = "internal_port", skip_serializing_if = "Option::is_none")] + pub internal_port: Option, + #[serde(rename = "public_hostname", skip_serializing_if = "Option::is_none")] + pub public_hostname: Option, + #[serde(rename = "public_port", skip_serializing_if = "Option::is_none")] + pub public_port: Option, + #[serde(rename = "routing")] + pub routing: Box, } impl ServersPort { - pub fn new(protocol: crate::models::ServersPortProtocol, routing: crate::models::ServersPortRouting) -> ServersPort { - ServersPort { - protocol, - internal_port: None, - public_hostname: None, - public_port: None, - routing: Box::new(routing), - } - } + pub fn new( + protocol: crate::models::ServersPortProtocol, + routing: crate::models::ServersPortRouting, + ) -> ServersPort { + ServersPort { + protocol, + internal_port: None, + public_hostname: None, + public_port: None, + routing: Box::new(routing), + } + } } - - diff --git a/sdks/api/full/rust/src/models/servers_port_protocol.rs b/sdks/api/full/rust/src/models/servers_port_protocol.rs index e2e8c326c9..b5b0e4ca64 100644 --- a/sdks/api/full/rust/src/models/servers_port_protocol.rs +++ b/sdks/api/full/rust/src/models/servers_port_protocol.rs @@ -4,45 +4,39 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum ServersPortProtocol { - #[serde(rename = "http")] - Http, - #[serde(rename = "https")] - Https, - #[serde(rename = "tcp")] - Tcp, - #[serde(rename = "tcp_tls")] - TcpTls, - #[serde(rename = "udp")] - Udp, - + #[serde(rename = "http")] + Http, + #[serde(rename = "https")] + Https, + #[serde(rename = "tcp")] + Tcp, + #[serde(rename = "tcp_tls")] + TcpTls, + #[serde(rename = "udp")] + Udp, } impl ToString for ServersPortProtocol { - fn to_string(&self) -> String { - match self { - Self::Http => String::from("http"), - Self::Https => String::from("https"), - Self::Tcp => String::from("tcp"), - Self::TcpTls => String::from("tcp_tls"), - Self::Udp => String::from("udp"), - } - } + fn to_string(&self) -> String { + match self { + Self::Http => String::from("http"), + Self::Https => String::from("https"), + Self::Tcp => String::from("tcp"), + Self::TcpTls => String::from("tcp_tls"), + Self::Udp => String::from("udp"), + } + } } impl Default for ServersPortProtocol { - fn default() -> ServersPortProtocol { - Self::Http - } + fn default() -> ServersPortProtocol { + Self::Http + } } - - - - diff --git a/sdks/api/full/rust/src/models/servers_port_routing.rs b/sdks/api/full/rust/src/models/servers_port_routing.rs index 83f0846fc4..5ba748b474 100644 --- a/sdks/api/full/rust/src/models/servers_port_routing.rs +++ b/sdks/api/full/rust/src/models/servers_port_routing.rs @@ -4,28 +4,23 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ServersPortRouting { - #[serde(rename = "game_guard", skip_serializing_if = "Option::is_none")] - pub game_guard: Option, - #[serde(rename = "host", skip_serializing_if = "Option::is_none")] - pub host: Option, + #[serde(rename = "game_guard", skip_serializing_if = "Option::is_none")] + pub game_guard: Option, + #[serde(rename = "host", skip_serializing_if = "Option::is_none")] + pub host: Option, } impl ServersPortRouting { - pub fn new() -> ServersPortRouting { - ServersPortRouting { - game_guard: None, - host: None, - } - } + pub fn new() -> ServersPortRouting { + ServersPortRouting { + game_guard: None, + host: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/servers_resources.rs b/sdks/api/full/rust/src/models/servers_resources.rs index d29a3cb0ac..34addff66f 100644 --- a/sdks/api/full/rust/src/models/servers_resources.rs +++ b/sdks/api/full/rust/src/models/servers_resources.rs @@ -4,30 +4,22 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ServersResources { - /// The number of CPU cores in millicores, or 1/1000 of a core. For example, 1/8 of a core would be 125 millicores, and 1 core would be 1000 millicores. - #[serde(rename = "cpu")] - pub cpu: i32, - /// The amount of memory in megabytes - #[serde(rename = "memory")] - pub memory: i32, + /// The number of CPU cores in millicores, or 1/1000 of a core. For example, 1/8 of a core would be 125 millicores, and 1 core would be 1000 millicores. + #[serde(rename = "cpu")] + pub cpu: i32, + /// The amount of memory in megabytes + #[serde(rename = "memory")] + pub memory: i32, } impl ServersResources { - pub fn new(cpu: i32, memory: i32) -> ServersResources { - ServersResources { - cpu, - memory, - } - } + pub fn new(cpu: i32, memory: i32) -> ServersResources { + ServersResources { cpu, memory } + } } - - diff --git a/sdks/api/full/rust/src/models/servers_runtime.rs b/sdks/api/full/rust/src/models/servers_runtime.rs index 38d9aac79d..36c94ea192 100644 --- a/sdks/api/full/rust/src/models/servers_runtime.rs +++ b/sdks/api/full/rust/src/models/servers_runtime.rs @@ -4,31 +4,26 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ServersRuntime { - #[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 = "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 ServersRuntime { - pub fn new(build: uuid::Uuid) -> ServersRuntime { - ServersRuntime { - build, - arguments: None, - environment: None, - } - } + pub fn new(build: uuid::Uuid) -> ServersRuntime { + ServersRuntime { + build, + arguments: None, + environment: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/servers_server.rs b/sdks/api/full/rust/src/models/servers_server.rs index f9e84cf5b3..57fa3c80fd 100644 --- a/sdks/api/full/rust/src/models/servers_server.rs +++ b/sdks/api/full/rust/src/models/servers_server.rs @@ -4,55 +4,60 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ServersServer { - #[serde(rename = "id")] - pub id: uuid::Uuid, - #[serde(rename = "environment")] - pub environment: uuid::Uuid, - #[serde(rename = "datacenter")] - pub datacenter: uuid::Uuid, - #[serde(rename = "tags", deserialize_with = "Option::deserialize")] - pub tags: Option, - #[serde(rename = "runtime")] - pub runtime: Box, - #[serde(rename = "network")] - pub network: Box, - #[serde(rename = "resources")] - pub resources: Box, - #[serde(rename = "lifecycle")] - pub lifecycle: Box, - #[serde(rename = "created_at")] - pub created_at: i64, - #[serde(rename = "started_at", skip_serializing_if = "Option::is_none")] - pub started_at: Option, - #[serde(rename = "destroyed_at", skip_serializing_if = "Option::is_none")] - pub destroyed_at: Option, + #[serde(rename = "id")] + pub id: uuid::Uuid, + #[serde(rename = "environment")] + pub environment: uuid::Uuid, + #[serde(rename = "datacenter")] + pub datacenter: uuid::Uuid, + #[serde(rename = "tags", deserialize_with = "Option::deserialize")] + pub tags: Option, + #[serde(rename = "runtime")] + pub runtime: Box, + #[serde(rename = "network")] + pub network: Box, + #[serde(rename = "resources")] + pub resources: Box, + #[serde(rename = "lifecycle")] + pub lifecycle: Box, + #[serde(rename = "created_at")] + pub created_at: i64, + #[serde(rename = "started_at", skip_serializing_if = "Option::is_none")] + pub started_at: Option, + #[serde(rename = "destroyed_at", skip_serializing_if = "Option::is_none")] + pub destroyed_at: Option, } impl ServersServer { - pub fn new(id: uuid::Uuid, environment: uuid::Uuid, datacenter: uuid::Uuid, tags: Option, runtime: crate::models::ServersRuntime, network: crate::models::ServersNetwork, resources: crate::models::ServersResources, lifecycle: crate::models::ServersLifecycle, created_at: i64) -> ServersServer { - ServersServer { - id, - environment, - datacenter, - tags, - runtime: Box::new(runtime), - network: Box::new(network), - resources: Box::new(resources), - lifecycle: Box::new(lifecycle), - created_at, - started_at: None, - destroyed_at: None, - } - } + pub fn new( + id: uuid::Uuid, + environment: uuid::Uuid, + datacenter: uuid::Uuid, + tags: Option, + runtime: crate::models::ServersRuntime, + network: crate::models::ServersNetwork, + resources: crate::models::ServersResources, + lifecycle: crate::models::ServersLifecycle, + created_at: i64, + ) -> ServersServer { + ServersServer { + id, + environment, + datacenter, + tags, + runtime: Box::new(runtime), + network: Box::new(network), + resources: Box::new(resources), + lifecycle: Box::new(lifecycle), + created_at, + started_at: None, + destroyed_at: None, + } + } } - - diff --git a/sdks/api/full/rust/src/models/upload_prepare_file.rs b/sdks/api/full/rust/src/models/upload_prepare_file.rs index e247cdf54d..4013f7dc1f 100644 --- a/sdks/api/full/rust/src/models/upload_prepare_file.rs +++ b/sdks/api/full/rust/src/models/upload_prepare_file.rs @@ -4,36 +4,32 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// UploadPrepareFile : A file being prepared to upload. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct UploadPrepareFile { - /// The path/filename of the file. - #[serde(rename = "path")] - pub path: String, - /// The MIME type of the file. - #[serde(rename = "content_type", skip_serializing_if = "Option::is_none")] - pub content_type: Option, - /// Unsigned 64 bit integer. - #[serde(rename = "content_length")] - pub content_length: i64, + /// The path/filename of the file. + #[serde(rename = "path")] + pub path: String, + /// The MIME type of the file. + #[serde(rename = "content_type", skip_serializing_if = "Option::is_none")] + pub content_type: Option, + /// Unsigned 64 bit integer. + #[serde(rename = "content_length")] + pub content_length: i64, } impl UploadPrepareFile { - /// A file being prepared to upload. - pub fn new(path: String, content_length: i64) -> UploadPrepareFile { - UploadPrepareFile { - path, - content_type: None, - content_length, - } - } + /// A file being prepared to upload. + pub fn new(path: String, content_length: i64) -> UploadPrepareFile { + UploadPrepareFile { + path, + content_type: None, + content_length, + } + } } - - diff --git a/sdks/api/full/rust/src/models/upload_presigned_request.rs b/sdks/api/full/rust/src/models/upload_presigned_request.rs index c20d4d48ca..0c1e757e0a 100644 --- a/sdks/api/full/rust/src/models/upload_presigned_request.rs +++ b/sdks/api/full/rust/src/models/upload_presigned_request.rs @@ -4,40 +4,41 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// UploadPresignedRequest : A presigned request used to upload files. Upload your file to the given URL via a PUT request. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct UploadPresignedRequest { - /// The name of the file to upload. This is the same as the one given in the upload prepare file. - #[serde(rename = "path")] - pub path: String, - /// The URL of the presigned request for which to upload your file to. - #[serde(rename = "url")] - pub url: String, - /// The byte offset for this multipart chunk. Always 0 if not a multipart upload. - #[serde(rename = "byte_offset")] - pub byte_offset: i64, - /// Expected size of this upload. - #[serde(rename = "content_length")] - pub content_length: i64, + /// The name of the file to upload. This is the same as the one given in the upload prepare file. + #[serde(rename = "path")] + pub path: String, + /// The URL of the presigned request for which to upload your file to. + #[serde(rename = "url")] + pub url: String, + /// The byte offset for this multipart chunk. Always 0 if not a multipart upload. + #[serde(rename = "byte_offset")] + pub byte_offset: i64, + /// Expected size of this upload. + #[serde(rename = "content_length")] + pub content_length: i64, } impl UploadPresignedRequest { - /// A presigned request used to upload files. Upload your file to the given URL via a PUT request. - pub fn new(path: String, url: String, byte_offset: i64, content_length: i64) -> UploadPresignedRequest { - UploadPresignedRequest { - path, - url, - byte_offset, - content_length, - } - } + /// A presigned request used to upload files. Upload your file to the given URL via a PUT request. + pub fn new( + path: String, + url: String, + byte_offset: i64, + content_length: i64, + ) -> UploadPresignedRequest { + UploadPresignedRequest { + path, + url, + byte_offset, + content_length, + } + } } - - diff --git a/sdks/api/full/rust/src/models/validation_error.rs b/sdks/api/full/rust/src/models/validation_error.rs index d4b2471cb7..df6f1ad56d 100644 --- a/sdks/api/full/rust/src/models/validation_error.rs +++ b/sdks/api/full/rust/src/models/validation_error.rs @@ -4,28 +4,22 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// ValidationError : An error given by failed content validation. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ValidationError { - /// A list of strings denoting the origin of a validation error. - #[serde(rename = "path")] - pub path: Vec, + /// A list of strings denoting the origin of a validation error. + #[serde(rename = "path")] + pub path: Vec, } impl ValidationError { - /// An error given by failed content validation. - pub fn new(path: Vec) -> ValidationError { - ValidationError { - path, - } - } + /// An error given by failed content validation. + pub fn new(path: Vec) -> ValidationError { + ValidationError { path } + } } - - diff --git a/sdks/api/full/rust/src/models/watch_response.rs b/sdks/api/full/rust/src/models/watch_response.rs index d1ca872c6c..f30fc24b53 100644 --- a/sdks/api/full/rust/src/models/watch_response.rs +++ b/sdks/api/full/rust/src/models/watch_response.rs @@ -4,28 +4,22 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// WatchResponse : Provided by watchable endpoints used in blocking loops. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct WatchResponse { - /// Index indicating the version of the data responded. Pass this to `WatchQuery` to block and wait for the next response. - #[serde(rename = "index")] - pub index: String, + /// Index indicating the version of the data responded. Pass this to `WatchQuery` to block and wait for the next response. + #[serde(rename = "index")] + pub index: String, } impl WatchResponse { - /// Provided by watchable endpoints used in blocking loops. - pub fn new(index: String) -> WatchResponse { - WatchResponse { - index, - } - } + /// Provided by watchable endpoints used in blocking loops. + pub fn new(index: String) -> WatchResponse { + WatchResponse { index } + } } - - 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 f1d627e7e1..6bc8fb633d 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 @@ -1050,6 +1050,331 @@ export class Actors { } } + /** + * Returns time series data for actor usage metrics. Allows filtering and grouping by various actor properties. + * + * @param {Rivet.actors.GetActorUsageRequestQuery} request + * @param {Actors.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Rivet.InternalError} + * @throws {@link Rivet.RateLimitError} + * @throws {@link Rivet.ForbiddenError} + * @throws {@link Rivet.UnauthorizedError} + * @throws {@link Rivet.NotFoundError} + * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.actors.usage({ + * project: "string", + * environment: "string", + * start: 1, + * end: 1, + * interval: 1, + * groupBy: "string", + * queryJson: "string" + * }) + */ + public async usage( + request: Rivet.actors.GetActorUsageRequestQuery, + requestOptions?: Actors.RequestOptions, + ): Promise { + const { project, environment, start, end, interval, groupBy, queryJson } = request; + const _queryParams: Record = {}; + if (project != null) { + _queryParams["project"] = project; + } + + if (environment != null) { + _queryParams["environment"] = environment; + } + + _queryParams["start"] = start.toString(); + _queryParams["end"] = end.toString(); + _queryParams["interval"] = interval.toString(); + if (groupBy != null) { + _queryParams["group_by"] = groupBy; + } + + if (queryJson != null) { + _queryParams["query_json"] = queryJson; + } + + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.RivetEnvironment.Production, + "/actors/usage", + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.actors.GetActorUsageResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 500: + throw new Rivet.InternalError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 429: + throw new Rivet.RateLimitError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 403: + throw new Rivet.ForbiddenError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 408: + throw new Rivet.UnauthorizedError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 404: + throw new Rivet.NotFoundError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 400: + throw new Rivet.BadRequestError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + default: + throw new errors.RivetError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.RivetError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.RivetTimeoutError("Timeout exceeded when calling GET /actors/usage."); + case "unknown": + throw new errors.RivetError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Queries actors using a JSON-encoded query expression. Supports pagination with cursor-based navigation. + * + * @param {Rivet.actors.QueryActorsRequestQuery} request + * @param {Actors.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Rivet.InternalError} + * @throws {@link Rivet.RateLimitError} + * @throws {@link Rivet.ForbiddenError} + * @throws {@link Rivet.UnauthorizedError} + * @throws {@link Rivet.NotFoundError} + * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.actors.query({ + * project: "string", + * environment: "string", + * queryJson: "string", + * cursor: "string" + * }) + */ + public async query( + request: Rivet.actors.QueryActorsRequestQuery, + requestOptions?: Actors.RequestOptions, + ): Promise { + const { project, environment, queryJson, cursor } = request; + const _queryParams: Record = {}; + if (project != null) { + _queryParams["project"] = project; + } + + if (environment != null) { + _queryParams["environment"] = environment; + } + + _queryParams["query_json"] = queryJson; + if (cursor != null) { + _queryParams["cursor"] = cursor; + } + + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.RivetEnvironment.Production, + "/actors/query", + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.actors.QueryActorsResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 500: + throw new Rivet.InternalError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 429: + throw new Rivet.RateLimitError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 403: + throw new Rivet.ForbiddenError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 408: + throw new Rivet.UnauthorizedError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 404: + throw new Rivet.NotFoundError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 400: + throw new Rivet.BadRequestError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + default: + throw new errors.RivetError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.RivetError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.RivetTimeoutError("Timeout exceeded when calling GET /actors/query."); + case "unknown": + throw new errors.RivetError({ + message: _response.error.errorMessage, + }); + } + } + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { diff --git a/sdks/api/full/typescript/src/api/resources/actors/client/requests/GetActorUsageRequestQuery.ts b/sdks/api/full/typescript/src/api/resources/actors/client/requests/GetActorUsageRequestQuery.ts new file mode 100644 index 0000000000..b9b058df4f --- /dev/null +++ b/sdks/api/full/typescript/src/api/resources/actors/client/requests/GetActorUsageRequestQuery.ts @@ -0,0 +1,40 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * project: "string", + * environment: "string", + * start: 1, + * end: 1, + * interval: 1, + * groupBy: "string", + * queryJson: "string" + * } + */ +export interface GetActorUsageRequestQuery { + project?: string; + environment?: string; + /** + * Start timestamp in milliseconds + */ + start: number; + /** + * End timestamp in milliseconds + */ + end: number; + /** + * Time bucket interval in milliseconds + */ + interval: number; + /** + * JSON-encoded KeyPath for grouping results (e.g. {"property":"datacenter_id"} or {"property":"tags","map_key":"region"}) + */ + groupBy?: string; + /** + * JSON-encoded query expression for filtering actors + */ + queryJson?: string; +} diff --git a/sdks/api/full/typescript/src/api/resources/actors/client/requests/QueryActorsRequestQuery.ts b/sdks/api/full/typescript/src/api/resources/actors/client/requests/QueryActorsRequestQuery.ts new file mode 100644 index 0000000000..16707a4e81 --- /dev/null +++ b/sdks/api/full/typescript/src/api/resources/actors/client/requests/QueryActorsRequestQuery.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * project: "string", + * environment: "string", + * queryJson: "string", + * cursor: "string" + * } + */ +export interface QueryActorsRequestQuery { + project?: string; + environment?: string; + /** + * JSON-encoded query expression for filtering actors + */ + queryJson: string; + /** + * Cursor for pagination + */ + cursor?: string; +} diff --git a/sdks/api/full/typescript/src/api/resources/actors/client/requests/index.ts b/sdks/api/full/typescript/src/api/resources/actors/client/requests/index.ts index 8953e26e0c..bb635b00e7 100644 --- a/sdks/api/full/typescript/src/api/resources/actors/client/requests/index.ts +++ b/sdks/api/full/typescript/src/api/resources/actors/client/requests/index.ts @@ -4,3 +4,5 @@ export { type CreateActorRequestQuery } from "./CreateActorRequestQuery"; export { type DestroyActorRequestQuery } from "./DestroyActorRequestQuery"; export { type UpgradeActorRequestQuery } from "./UpgradeActorRequestQuery"; export { type UpgradeAllActorsRequestQuery } from "./UpgradeAllActorsRequestQuery"; +export { type GetActorUsageRequestQuery } from "./GetActorUsageRequestQuery"; +export { type QueryActorsRequestQuery } from "./QueryActorsRequestQuery"; diff --git a/sdks/api/full/typescript/src/api/resources/actors/resources/logs/client/Client.ts b/sdks/api/full/typescript/src/api/resources/actors/resources/logs/client/Client.ts index e6b2ff63df..14a90f2b44 100644 --- a/sdks/api/full/typescript/src/api/resources/actors/resources/logs/client/Client.ts +++ b/sdks/api/full/typescript/src/api/resources/actors/resources/logs/client/Client.ts @@ -5,8 +5,8 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Rivet from "../../../../../index"; -import * as serializers from "../../../../../../serialization/index"; import urlJoin from "url-join"; +import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace Logs { @@ -54,11 +54,7 @@ export class Logs { * await client.actors.logs.get({ * project: "string", * environment: "string", - * stream: "std_out", - * actorIdsJson: "string", - * searchText: "string", - * searchCaseSensitive: true, - * searchEnableRegex: true, + * queryJson: "string", * watchIndex: "string" * }) */ @@ -66,16 +62,7 @@ export class Logs { request: Rivet.actors.GetActorLogsRequestQuery, requestOptions?: Logs.RequestOptions, ): Promise { - const { - project, - environment, - stream, - actorIdsJson, - searchText, - searchCaseSensitive, - searchEnableRegex, - watchIndex, - } = request; + const { project, environment, queryJson, watchIndex } = request; const _queryParams: Record = {}; if (project != null) { _queryParams["project"] = project; @@ -85,22 +72,7 @@ export class Logs { _queryParams["environment"] = environment; } - _queryParams["stream"] = serializers.actors.QueryLogStream.jsonOrThrow(stream, { - unrecognizedObjectKeys: "strip", - }); - _queryParams["actor_ids_json"] = actorIdsJson; - if (searchText != null) { - _queryParams["search_text"] = searchText; - } - - if (searchCaseSensitive != null) { - _queryParams["search_case_sensitive"] = searchCaseSensitive.toString(); - } - - if (searchEnableRegex != null) { - _queryParams["search_enable_regex"] = searchEnableRegex.toString(); - } - + _queryParams["query_json"] = queryJson; if (watchIndex != null) { _queryParams["watch_index"] = watchIndex; } @@ -223,6 +195,148 @@ export class Logs { } } + /** + * Exports logs for the given actors to an S3 bucket and returns a presigned URL to download. + * + * @param {Rivet.actors.ExportActorLogsRequest} request + * @param {Logs.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Rivet.InternalError} + * @throws {@link Rivet.RateLimitError} + * @throws {@link Rivet.ForbiddenError} + * @throws {@link Rivet.UnauthorizedError} + * @throws {@link Rivet.NotFoundError} + * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.actors.logs.export({ + * project: "string", + * environment: "string", + * queryJson: "string" + * }) + */ + public async export( + request: Rivet.actors.ExportActorLogsRequest, + requestOptions?: Logs.RequestOptions, + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.RivetEnvironment.Production, + "/actors/logs/export", + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + body: serializers.actors.ExportActorLogsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.actors.ExportActorLogsResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 500: + throw new Rivet.InternalError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 429: + throw new Rivet.RateLimitError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 403: + throw new Rivet.ForbiddenError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 408: + throw new Rivet.UnauthorizedError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 404: + throw new Rivet.NotFoundError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 400: + throw new Rivet.BadRequestError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + default: + throw new errors.RivetError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.RivetError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.RivetTimeoutError("Timeout exceeded when calling POST /actors/logs/export."); + case "unknown": + throw new errors.RivetError({ + message: _response.error.errorMessage, + }); + } + } + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { diff --git a/sdks/api/full/typescript/src/api/resources/actors/resources/logs/client/requests/ExportActorLogsRequest.ts b/sdks/api/full/typescript/src/api/resources/actors/resources/logs/client/requests/ExportActorLogsRequest.ts new file mode 100644 index 0000000000..fa308a4fd9 --- /dev/null +++ b/sdks/api/full/typescript/src/api/resources/actors/resources/logs/client/requests/ExportActorLogsRequest.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * project: "string", + * environment: "string", + * queryJson: "string" + * } + */ +export interface ExportActorLogsRequest { + project?: string; + environment?: string; + /** JSON-encoded query expression for filtering logs */ + queryJson: string; +} diff --git a/sdks/api/full/typescript/src/api/resources/actors/resources/logs/client/requests/GetActorLogsRequestQuery.ts b/sdks/api/full/typescript/src/api/resources/actors/resources/logs/client/requests/GetActorLogsRequestQuery.ts index 0b87f5db8b..a10aa16f10 100644 --- a/sdks/api/full/typescript/src/api/resources/actors/resources/logs/client/requests/GetActorLogsRequestQuery.ts +++ b/sdks/api/full/typescript/src/api/resources/actors/resources/logs/client/requests/GetActorLogsRequestQuery.ts @@ -2,29 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../index"; - /** * @example * { * project: "string", * environment: "string", - * stream: "std_out", - * actorIdsJson: "string", - * searchText: "string", - * searchCaseSensitive: true, - * searchEnableRegex: true, + * queryJson: "string", * watchIndex: "string" * } */ export interface GetActorLogsRequestQuery { project?: string; environment?: string; - stream: Rivet.actors.QueryLogStream; - actorIdsJson: string; - searchText?: string; - searchCaseSensitive?: boolean; - searchEnableRegex?: boolean; + /** + * JSON-encoded query expression for filtering logs + */ + queryJson: string; /** * A query parameter denoting the requests watch index. */ diff --git a/sdks/api/full/typescript/src/api/resources/actors/resources/logs/client/requests/index.ts b/sdks/api/full/typescript/src/api/resources/actors/resources/logs/client/requests/index.ts index 599c89b601..9fe04449c9 100644 --- a/sdks/api/full/typescript/src/api/resources/actors/resources/logs/client/requests/index.ts +++ b/sdks/api/full/typescript/src/api/resources/actors/resources/logs/client/requests/index.ts @@ -1 +1,2 @@ export { type GetActorLogsRequestQuery } from "./GetActorLogsRequestQuery"; +export { type ExportActorLogsRequest } from "./ExportActorLogsRequest"; diff --git a/sdks/api/full/typescript/src/api/resources/actors/resources/logs/types/ExportActorLogsResponse.ts b/sdks/api/full/typescript/src/api/resources/actors/resources/logs/types/ExportActorLogsResponse.ts new file mode 100644 index 0000000000..d800431bf0 --- /dev/null +++ b/sdks/api/full/typescript/src/api/resources/actors/resources/logs/types/ExportActorLogsResponse.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface ExportActorLogsResponse { + /** Presigned URL to download the exported logs */ + url: string; +} diff --git a/sdks/api/full/typescript/src/api/resources/actors/resources/logs/types/QueryLogStream.ts b/sdks/api/full/typescript/src/api/resources/actors/resources/logs/types/QueryLogStream.ts deleted file mode 100644 index 556646c57e..0000000000 --- a/sdks/api/full/typescript/src/api/resources/actors/resources/logs/types/QueryLogStream.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export type QueryLogStream = "std_out" | "std_err" | "all"; -export const QueryLogStream = { - StdOut: "std_out", - StdErr: "std_err", - All: "all", -} as const; diff --git a/sdks/api/full/typescript/src/api/resources/actors/resources/logs/types/index.ts b/sdks/api/full/typescript/src/api/resources/actors/resources/logs/types/index.ts index a7db7fd2b2..a36d7aa9d6 100644 --- a/sdks/api/full/typescript/src/api/resources/actors/resources/logs/types/index.ts +++ b/sdks/api/full/typescript/src/api/resources/actors/resources/logs/types/index.ts @@ -1,2 +1,2 @@ export * from "./GetActorLogsResponse"; -export * from "./QueryLogStream"; +export * from "./ExportActorLogsResponse"; diff --git a/sdks/api/full/typescript/src/api/resources/actors/types/GetActorUsageResponse.ts b/sdks/api/full/typescript/src/api/resources/actors/types/GetActorUsageResponse.ts new file mode 100644 index 0000000000..e1a1d7cc48 --- /dev/null +++ b/sdks/api/full/typescript/src/api/resources/actors/types/GetActorUsageResponse.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface GetActorUsageResponse { + metricNames: string[]; + metricAttributes: Record[]; + metricTypes: string[]; + metricValues: number[][]; +} diff --git a/sdks/api/full/typescript/src/api/resources/actors/types/QueryActorsResponse.ts b/sdks/api/full/typescript/src/api/resources/actors/types/QueryActorsResponse.ts new file mode 100644 index 0000000000..a05b320571 --- /dev/null +++ b/sdks/api/full/typescript/src/api/resources/actors/types/QueryActorsResponse.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Rivet from "../../../index"; + +export interface QueryActorsResponse { + /** A list of actors matching the query */ + actors: Rivet.actors.Actor[]; + pagination: Rivet.Pagination; +} 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 9aab9504b0..785b43b9fd 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 @@ -11,3 +11,5 @@ export * from "./UpgradeActorResponse"; export * from "./UpgradeAllActorsRequest"; export * from "./UpgradeAllActorsResponse"; export * from "./ListActorsResponse"; +export * from "./GetActorUsageResponse"; +export * from "./QueryActorsResponse"; diff --git a/sdks/api/full/typescript/src/api/resources/routes/client/Client.ts b/sdks/api/full/typescript/src/api/resources/routes/client/Client.ts index 94df00589d..4332d0d51c 100644 --- a/sdks/api/full/typescript/src/api/resources/routes/client/Client.ts +++ b/sdks/api/full/typescript/src/api/resources/routes/client/Client.ts @@ -506,6 +506,173 @@ export class Routes { } } + /** + * Returns time series data for HTTP requests routed to actors. Allows filtering and grouping by various request properties. + * + * @param {Rivet.routes.HistoryQuery} request + * @param {Routes.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Rivet.InternalError} + * @throws {@link Rivet.RateLimitError} + * @throws {@link Rivet.ForbiddenError} + * @throws {@link Rivet.UnauthorizedError} + * @throws {@link Rivet.NotFoundError} + * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.routes.history({ + * project: "string", + * environment: "string", + * start: 1, + * end: 1, + * interval: 1, + * queryJson: "string", + * groupBy: "string" + * }) + */ + public async history( + request: Rivet.routes.HistoryQuery, + requestOptions?: Routes.RequestOptions, + ): Promise { + const { project, environment, start, end, interval, queryJson, groupBy } = request; + const _queryParams: Record = {}; + if (project != null) { + _queryParams["project"] = project; + } + + if (environment != null) { + _queryParams["environment"] = environment; + } + + _queryParams["start"] = start.toString(); + _queryParams["end"] = end.toString(); + _queryParams["interval"] = interval.toString(); + if (queryJson != null) { + _queryParams["query_json"] = queryJson; + } + + if (groupBy != null) { + _queryParams["group_by"] = groupBy; + } + + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.RivetEnvironment.Production, + "/routes/history", + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.routes.HistoryResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 500: + throw new Rivet.InternalError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 429: + throw new Rivet.RateLimitError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 403: + throw new Rivet.ForbiddenError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 408: + throw new Rivet.UnauthorizedError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 404: + throw new Rivet.NotFoundError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 400: + throw new Rivet.BadRequestError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + default: + throw new errors.RivetError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.RivetError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.RivetTimeoutError("Timeout exceeded when calling GET /routes/history."); + case "unknown": + throw new errors.RivetError({ + message: _response.error.errorMessage, + }); + } + } + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { diff --git a/sdks/api/full/typescript/src/api/resources/routes/client/requests/HistoryQuery.ts b/sdks/api/full/typescript/src/api/resources/routes/client/requests/HistoryQuery.ts new file mode 100644 index 0000000000..cc4171b55a --- /dev/null +++ b/sdks/api/full/typescript/src/api/resources/routes/client/requests/HistoryQuery.ts @@ -0,0 +1,40 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * project: "string", + * environment: "string", + * start: 1, + * end: 1, + * interval: 1, + * queryJson: "string", + * groupBy: "string" + * } + */ +export interface HistoryQuery { + project?: string; + environment?: string; + /** + * Start timestamp in milliseconds + */ + start: number; + /** + * End timestamp in milliseconds + */ + end: number; + /** + * Time bucket interval in milliseconds + */ + interval: number; + /** + * JSON-encoded query expression for filtering requests + */ + queryJson?: string; + /** + * JSON-encoded KeyPath for grouping results (e.g. {"property":"client_request_host"} or {"property":"tags","map_key":"version"}) + */ + groupBy?: string; +} diff --git a/sdks/api/full/typescript/src/api/resources/routes/client/requests/index.ts b/sdks/api/full/typescript/src/api/resources/routes/client/requests/index.ts index e7f76515fd..349dbb9381 100644 --- a/sdks/api/full/typescript/src/api/resources/routes/client/requests/index.ts +++ b/sdks/api/full/typescript/src/api/resources/routes/client/requests/index.ts @@ -1,3 +1,4 @@ export { type ListRoutesQuery } from "./ListRoutesQuery"; export { type UpdateRouteQuery } from "./UpdateRouteQuery"; export { type DeleteRouteQuery } from "./DeleteRouteQuery"; +export { type HistoryQuery } from "./HistoryQuery"; diff --git a/sdks/api/full/typescript/src/api/resources/routes/types/HistoryResponse.ts b/sdks/api/full/typescript/src/api/resources/routes/types/HistoryResponse.ts new file mode 100644 index 0000000000..185f83aa11 --- /dev/null +++ b/sdks/api/full/typescript/src/api/resources/routes/types/HistoryResponse.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface HistoryResponse { + metricNames: string[]; + metricAttributes: Record[]; + metricTypes: string[]; + metricValues: number[][]; +} diff --git a/sdks/api/full/typescript/src/api/resources/routes/types/index.ts b/sdks/api/full/typescript/src/api/resources/routes/types/index.ts index 0b92bfd8f1..d0b71111ad 100644 --- a/sdks/api/full/typescript/src/api/resources/routes/types/index.ts +++ b/sdks/api/full/typescript/src/api/resources/routes/types/index.ts @@ -2,3 +2,4 @@ export * from "./ListRoutesResponse"; export * from "./UpdateRouteBody"; export * from "./UpdateRouteResponse"; export * from "./DeleteRouteResponse"; +export * from "./HistoryResponse"; diff --git a/sdks/api/full/typescript/src/serialization/resources/actors/resources/index.ts b/sdks/api/full/typescript/src/serialization/resources/actors/resources/index.ts index 3bb7903aa2..d5fa4ad2e6 100644 --- a/sdks/api/full/typescript/src/serialization/resources/actors/resources/index.ts +++ b/sdks/api/full/typescript/src/serialization/resources/actors/resources/index.ts @@ -4,3 +4,4 @@ export * as logs from "./logs"; export * from "./logs/types"; export * as metrics from "./metrics"; export * from "./metrics/types"; +export * from "./logs/client/requests"; diff --git a/sdks/api/full/typescript/src/serialization/resources/actors/resources/logs/client/index.ts b/sdks/api/full/typescript/src/serialization/resources/actors/resources/logs/client/index.ts new file mode 100644 index 0000000000..415726b7fe --- /dev/null +++ b/sdks/api/full/typescript/src/serialization/resources/actors/resources/logs/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/sdks/api/full/typescript/src/serialization/resources/actors/resources/logs/client/requests/ExportActorLogsRequest.ts b/sdks/api/full/typescript/src/serialization/resources/actors/resources/logs/client/requests/ExportActorLogsRequest.ts new file mode 100644 index 0000000000..d6de8a63dc --- /dev/null +++ b/sdks/api/full/typescript/src/serialization/resources/actors/resources/logs/client/requests/ExportActorLogsRequest.ts @@ -0,0 +1,24 @@ +/** + * 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 ExportActorLogsRequest: core.serialization.Schema< + serializers.actors.ExportActorLogsRequest.Raw, + Rivet.actors.ExportActorLogsRequest +> = core.serialization.object({ + project: core.serialization.string().optional(), + environment: core.serialization.string().optional(), + queryJson: core.serialization.property("query_json", core.serialization.string()), +}); + +export declare namespace ExportActorLogsRequest { + export interface Raw { + project?: string | null; + environment?: string | null; + query_json: string; + } +} diff --git a/sdks/api/full/typescript/src/serialization/resources/actors/resources/logs/client/requests/index.ts b/sdks/api/full/typescript/src/serialization/resources/actors/resources/logs/client/requests/index.ts new file mode 100644 index 0000000000..fe5e71e618 --- /dev/null +++ b/sdks/api/full/typescript/src/serialization/resources/actors/resources/logs/client/requests/index.ts @@ -0,0 +1 @@ +export { ExportActorLogsRequest } from "./ExportActorLogsRequest"; diff --git a/sdks/api/full/typescript/src/serialization/resources/actors/resources/logs/index.ts b/sdks/api/full/typescript/src/serialization/resources/actors/resources/logs/index.ts index eea524d655..c9240f83b4 100644 --- a/sdks/api/full/typescript/src/serialization/resources/actors/resources/logs/index.ts +++ b/sdks/api/full/typescript/src/serialization/resources/actors/resources/logs/index.ts @@ -1 +1,2 @@ export * from "./types"; +export * from "./client"; diff --git a/sdks/api/full/typescript/src/serialization/resources/actors/resources/logs/types/ExportActorLogsResponse.ts b/sdks/api/full/typescript/src/serialization/resources/actors/resources/logs/types/ExportActorLogsResponse.ts new file mode 100644 index 0000000000..1f9d58c0bf --- /dev/null +++ b/sdks/api/full/typescript/src/serialization/resources/actors/resources/logs/types/ExportActorLogsResponse.ts @@ -0,0 +1,20 @@ +/** + * 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 ExportActorLogsResponse: core.serialization.ObjectSchema< + serializers.actors.ExportActorLogsResponse.Raw, + Rivet.actors.ExportActorLogsResponse +> = core.serialization.object({ + url: core.serialization.string(), +}); + +export declare namespace ExportActorLogsResponse { + export interface Raw { + url: string; + } +} diff --git a/sdks/api/full/typescript/src/serialization/resources/actors/resources/logs/types/QueryLogStream.ts b/sdks/api/full/typescript/src/serialization/resources/actors/resources/logs/types/QueryLogStream.ts deleted file mode 100644 index ec7baffeb2..0000000000 --- a/sdks/api/full/typescript/src/serialization/resources/actors/resources/logs/types/QueryLogStream.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 QueryLogStream: core.serialization.Schema< - serializers.actors.QueryLogStream.Raw, - Rivet.actors.QueryLogStream -> = core.serialization.enum_(["std_out", "std_err", "all"]); - -export declare namespace QueryLogStream { - export type Raw = "std_out" | "std_err" | "all"; -} diff --git a/sdks/api/full/typescript/src/serialization/resources/actors/resources/logs/types/index.ts b/sdks/api/full/typescript/src/serialization/resources/actors/resources/logs/types/index.ts index a7db7fd2b2..a36d7aa9d6 100644 --- a/sdks/api/full/typescript/src/serialization/resources/actors/resources/logs/types/index.ts +++ b/sdks/api/full/typescript/src/serialization/resources/actors/resources/logs/types/index.ts @@ -1,2 +1,2 @@ export * from "./GetActorLogsResponse"; -export * from "./QueryLogStream"; +export * from "./ExportActorLogsResponse"; diff --git a/sdks/api/full/typescript/src/serialization/resources/actors/types/GetActorUsageResponse.ts b/sdks/api/full/typescript/src/serialization/resources/actors/types/GetActorUsageResponse.ts new file mode 100644 index 0000000000..cad1720b26 --- /dev/null +++ b/sdks/api/full/typescript/src/serialization/resources/actors/types/GetActorUsageResponse.ts @@ -0,0 +1,32 @@ +/** + * 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 GetActorUsageResponse: core.serialization.ObjectSchema< + serializers.actors.GetActorUsageResponse.Raw, + Rivet.actors.GetActorUsageResponse +> = core.serialization.object({ + metricNames: core.serialization.property("metric_names", core.serialization.list(core.serialization.string())), + metricAttributes: core.serialization.property( + "metric_attributes", + core.serialization.list(core.serialization.record(core.serialization.string(), core.serialization.string())), + ), + metricTypes: core.serialization.property("metric_types", core.serialization.list(core.serialization.string())), + metricValues: core.serialization.property( + "metric_values", + core.serialization.list(core.serialization.list(core.serialization.number())), + ), +}); + +export declare namespace GetActorUsageResponse { + export interface Raw { + metric_names: string[]; + metric_attributes: Record[]; + metric_types: string[]; + metric_values: number[][]; + } +} diff --git a/sdks/api/full/typescript/src/serialization/resources/actors/types/QueryActorsResponse.ts b/sdks/api/full/typescript/src/serialization/resources/actors/types/QueryActorsResponse.ts new file mode 100644 index 0000000000..1951b2edca --- /dev/null +++ b/sdks/api/full/typescript/src/serialization/resources/actors/types/QueryActorsResponse.ts @@ -0,0 +1,24 @@ +/** + * 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 { Actor } from "../resources/common/types/Actor"; +import { Pagination } from "../../common/types/Pagination"; + +export const QueryActorsResponse: core.serialization.ObjectSchema< + serializers.actors.QueryActorsResponse.Raw, + Rivet.actors.QueryActorsResponse +> = core.serialization.object({ + actors: core.serialization.list(Actor), + pagination: Pagination, +}); + +export declare namespace QueryActorsResponse { + export interface Raw { + actors: Actor.Raw[]; + pagination: Pagination.Raw; + } +} 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 9aab9504b0..785b43b9fd 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 @@ -11,3 +11,5 @@ export * from "./UpgradeActorResponse"; export * from "./UpgradeAllActorsRequest"; export * from "./UpgradeAllActorsResponse"; export * from "./ListActorsResponse"; +export * from "./GetActorUsageResponse"; +export * from "./QueryActorsResponse"; diff --git a/sdks/api/full/typescript/src/serialization/resources/routes/types/HistoryResponse.ts b/sdks/api/full/typescript/src/serialization/resources/routes/types/HistoryResponse.ts new file mode 100644 index 0000000000..3ce928d922 --- /dev/null +++ b/sdks/api/full/typescript/src/serialization/resources/routes/types/HistoryResponse.ts @@ -0,0 +1,32 @@ +/** + * 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 HistoryResponse: core.serialization.ObjectSchema< + serializers.routes.HistoryResponse.Raw, + Rivet.routes.HistoryResponse +> = core.serialization.object({ + metricNames: core.serialization.property("metric_names", core.serialization.list(core.serialization.string())), + metricAttributes: core.serialization.property( + "metric_attributes", + core.serialization.list(core.serialization.record(core.serialization.string(), core.serialization.string())), + ), + metricTypes: core.serialization.property("metric_types", core.serialization.list(core.serialization.string())), + metricValues: core.serialization.property( + "metric_values", + core.serialization.list(core.serialization.list(core.serialization.number())), + ), +}); + +export declare namespace HistoryResponse { + export interface Raw { + metric_names: string[]; + metric_attributes: Record[]; + metric_types: string[]; + metric_values: number[][]; + } +} diff --git a/sdks/api/full/typescript/src/serialization/resources/routes/types/index.ts b/sdks/api/full/typescript/src/serialization/resources/routes/types/index.ts index 0b92bfd8f1..d0b71111ad 100644 --- a/sdks/api/full/typescript/src/serialization/resources/routes/types/index.ts +++ b/sdks/api/full/typescript/src/serialization/resources/routes/types/index.ts @@ -2,3 +2,4 @@ export * from "./ListRoutesResponse"; export * from "./UpdateRouteBody"; export * from "./UpdateRouteResponse"; export * from "./DeleteRouteResponse"; +export * from "./HistoryResponse"; diff --git a/sdks/api/runtime/go/actors/actors.go b/sdks/api/runtime/go/actors/actors.go index afc7f28bf2..353a82855a 100644 --- a/sdks/api/runtime/go/actors/actors.go +++ b/sdks/api/runtime/go/actors/actors.go @@ -132,6 +132,38 @@ func (g *GetActorResponse) String() string { return fmt.Sprintf("%#v", g) } +type GetActorUsageResponse struct { + MetricNames []string `json:"metric_names,omitempty"` + MetricAttributes []map[string]string `json:"metric_attributes,omitempty"` + MetricTypes []string `json:"metric_types,omitempty"` + MetricValues [][]float64 `json:"metric_values,omitempty"` + + _rawJSON json.RawMessage +} + +func (g *GetActorUsageResponse) UnmarshalJSON(data []byte) error { + type unmarshaler GetActorUsageResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *g = GetActorUsageResponse(value) + g._rawJSON = json.RawMessage(data) + return nil +} + +func (g *GetActorUsageResponse) 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 ListActorsResponse struct { // A list of actors for the project associated with the token. Actors []*Actor `json:"actors,omitempty"` @@ -163,6 +195,37 @@ func (l *ListActorsResponse) String() string { return fmt.Sprintf("%#v", l) } +type QueryActorsResponse struct { + // A list of actors matching the query + Actors []*Actor `json:"actors,omitempty"` + Pagination *sdk.Pagination `json:"pagination,omitempty"` + + _rawJSON json.RawMessage +} + +func (q *QueryActorsResponse) UnmarshalJSON(data []byte) error { + type unmarshaler QueryActorsResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *q = QueryActorsResponse(value) + q._rawJSON = json.RawMessage(data) + return nil +} + +func (q *QueryActorsResponse) String() string { + if len(q._rawJSON) > 0 { + if value, err := core.StringifyJSON(q._rawJSON); err == nil { + return value + } + } + if value, err := core.StringifyJSON(q); err == nil { + return value + } + return fmt.Sprintf("%#v", q) +} + type UpgradeActorRequest struct { Build *uuid.UUID `json:"build,omitempty"` BuildTags interface{} `json:"build_tags,omitempty"` diff --git a/sdks/api/runtime/go/actors/client/client.go b/sdks/api/runtime/go/actors/client/client.go index 122522fa3e..dbf5cdda72 100644 --- a/sdks/api/runtime/go/actors/client/client.go +++ b/sdks/api/runtime/go/actors/client/client.go @@ -602,3 +602,194 @@ func (c *Client) UpgradeAll(ctx context.Context, request *actors.UpgradeAllActor } return response, nil } + +// Returns time series data for actor usage metrics. Allows filtering and grouping by various actor properties. +func (c *Client) Usage(ctx context.Context, request *actors.GetActorUsageRequestQuery) (*actors.GetActorUsageResponse, error) { + baseURL := "https://api.rivet.gg" + if c.baseURL != "" { + baseURL = c.baseURL + } + endpointURL := baseURL + "/" + "actors/usage" + + queryParams := make(url.Values) + if request.Project != nil { + queryParams.Add("project", fmt.Sprintf("%v", *request.Project)) + } + if request.Environment != nil { + queryParams.Add("environment", fmt.Sprintf("%v", *request.Environment)) + } + queryParams.Add("start", fmt.Sprintf("%v", request.Start)) + queryParams.Add("end", fmt.Sprintf("%v", request.End)) + queryParams.Add("interval", fmt.Sprintf("%v", request.Interval)) + if request.GroupBy != nil { + queryParams.Add("group_by", fmt.Sprintf("%v", *request.GroupBy)) + } + if request.QueryJson != nil { + queryParams.Add("query_json", fmt.Sprintf("%v", *request.QueryJson)) + } + if len(queryParams) > 0 { + endpointURL += "?" + queryParams.Encode() + } + + errorDecoder := func(statusCode int, body io.Reader) error { + raw, err := io.ReadAll(body) + if err != nil { + return err + } + apiError := core.NewAPIError(statusCode, errors.New(string(raw))) + decoder := json.NewDecoder(bytes.NewReader(raw)) + switch statusCode { + case 500: + value := new(sdk.InternalError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 429: + value := new(sdk.RateLimitError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 403: + value := new(sdk.ForbiddenError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 408: + value := new(sdk.UnauthorizedError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 404: + value := new(sdk.NotFoundError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 400: + value := new(sdk.BadRequestError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + } + return apiError + } + + var response *actors.GetActorUsageResponse + if err := c.caller.Call( + ctx, + &core.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: c.header, + Response: &response, + ErrorDecoder: errorDecoder, + }, + ); err != nil { + return nil, err + } + return response, nil +} + +// Queries actors using a JSON-encoded query expression. Supports pagination with cursor-based navigation. +func (c *Client) Query(ctx context.Context, request *actors.QueryActorsRequestQuery) (*actors.QueryActorsResponse, error) { + baseURL := "https://api.rivet.gg" + if c.baseURL != "" { + baseURL = c.baseURL + } + endpointURL := baseURL + "/" + "actors/query" + + queryParams := make(url.Values) + if request.Project != nil { + queryParams.Add("project", fmt.Sprintf("%v", *request.Project)) + } + if request.Environment != nil { + queryParams.Add("environment", fmt.Sprintf("%v", *request.Environment)) + } + queryParams.Add("query_json", fmt.Sprintf("%v", request.QueryJson)) + if request.Cursor != nil { + queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) + } + if len(queryParams) > 0 { + endpointURL += "?" + queryParams.Encode() + } + + errorDecoder := func(statusCode int, body io.Reader) error { + raw, err := io.ReadAll(body) + if err != nil { + return err + } + apiError := core.NewAPIError(statusCode, errors.New(string(raw))) + decoder := json.NewDecoder(bytes.NewReader(raw)) + switch statusCode { + case 500: + value := new(sdk.InternalError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 429: + value := new(sdk.RateLimitError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 403: + value := new(sdk.ForbiddenError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 408: + value := new(sdk.UnauthorizedError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 404: + value := new(sdk.NotFoundError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 400: + value := new(sdk.BadRequestError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + } + return apiError + } + + var response *actors.QueryActorsResponse + if err := c.caller.Call( + ctx, + &core.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: c.header, + Response: &response, + ErrorDecoder: errorDecoder, + }, + ); err != nil { + return nil, err + } + return response, nil +} diff --git a/sdks/api/runtime/go/actors/logs.go b/sdks/api/runtime/go/actors/logs.go index 789018e6b9..a482f4b37e 100644 --- a/sdks/api/runtime/go/actors/logs.go +++ b/sdks/api/runtime/go/actors/logs.go @@ -9,18 +9,52 @@ import ( core "sdk/core" ) +type ExportActorLogsRequest struct { + Project *string `json:"project,omitempty"` + Environment *string `json:"environment,omitempty"` + // JSON-encoded query expression for filtering logs + QueryJson string `json:"query_json"` +} + type GetActorLogsRequestQuery struct { - Project *string `json:"-"` - Environment *string `json:"-"` - Stream QueryLogStream `json:"-"` - ActorIdsJson string `json:"-"` - SearchText *string `json:"-"` - SearchCaseSensitive *bool `json:"-"` - SearchEnableRegex *bool `json:"-"` + Project *string `json:"-"` + Environment *string `json:"-"` + // JSON-encoded query expression for filtering logs + QueryJson string `json:"-"` // A query parameter denoting the requests watch index. WatchIndex *string `json:"-"` } +type ExportActorLogsResponse struct { + // Presigned URL to download the exported logs + Url string `json:"url"` + + _rawJSON json.RawMessage +} + +func (e *ExportActorLogsResponse) UnmarshalJSON(data []byte) error { + type unmarshaler ExportActorLogsResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *e = ExportActorLogsResponse(value) + e._rawJSON = json.RawMessage(data) + return nil +} + +func (e *ExportActorLogsResponse) String() string { + if len(e._rawJSON) > 0 { + if value, err := core.StringifyJSON(e._rawJSON); err == nil { + return value + } + } + if value, err := core.StringifyJSON(e); err == nil { + return value + } + return fmt.Sprintf("%#v", e) +} + type GetActorLogsResponse struct { // List of actor IDs in these logs. The order of these correspond to the index in the log entry. ActorIds []string `json:"actor_ids,omitempty"` @@ -62,28 +96,3 @@ func (g *GetActorLogsResponse) String() string { } return fmt.Sprintf("%#v", g) } - -type QueryLogStream string - -const ( - QueryLogStreamStdOut QueryLogStream = "std_out" - QueryLogStreamStdErr QueryLogStream = "std_err" - QueryLogStreamAll QueryLogStream = "all" -) - -func NewQueryLogStreamFromString(s string) (QueryLogStream, error) { - switch s { - case "std_out": - return QueryLogStreamStdOut, nil - case "std_err": - return QueryLogStreamStdErr, nil - case "all": - return QueryLogStreamAll, nil - } - var t QueryLogStream - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (q QueryLogStream) Ptr() *QueryLogStream { - return &q -} diff --git a/sdks/api/runtime/go/actors/logs/client.go b/sdks/api/runtime/go/actors/logs/client.go index 51c0b3886f..c750b36004 100644 --- a/sdks/api/runtime/go/actors/logs/client.go +++ b/sdks/api/runtime/go/actors/logs/client.go @@ -49,17 +49,7 @@ func (c *Client) Get(ctx context.Context, request *actors.GetActorLogsRequestQue if request.Environment != nil { queryParams.Add("environment", fmt.Sprintf("%v", *request.Environment)) } - queryParams.Add("stream", fmt.Sprintf("%v", request.Stream)) - queryParams.Add("actor_ids_json", fmt.Sprintf("%v", request.ActorIdsJson)) - if request.SearchText != nil { - queryParams.Add("search_text", fmt.Sprintf("%v", *request.SearchText)) - } - if request.SearchCaseSensitive != nil { - queryParams.Add("search_case_sensitive", fmt.Sprintf("%v", *request.SearchCaseSensitive)) - } - if request.SearchEnableRegex != nil { - queryParams.Add("search_enable_regex", fmt.Sprintf("%v", *request.SearchEnableRegex)) - } + queryParams.Add("query_json", fmt.Sprintf("%v", request.QueryJson)) if request.WatchIndex != nil { queryParams.Add("watch_index", fmt.Sprintf("%v", *request.WatchIndex)) } @@ -136,3 +126,82 @@ func (c *Client) Get(ctx context.Context, request *actors.GetActorLogsRequestQue } return response, nil } + +// Exports logs for the given actors to an S3 bucket and returns a presigned URL to download. +func (c *Client) Export(ctx context.Context, request *actors.ExportActorLogsRequest) (*actors.ExportActorLogsResponse, error) { + baseURL := "https://api.rivet.gg" + if c.baseURL != "" { + baseURL = c.baseURL + } + endpointURL := baseURL + "/" + "actors/logs/export" + + errorDecoder := func(statusCode int, body io.Reader) error { + raw, err := io.ReadAll(body) + if err != nil { + return err + } + apiError := core.NewAPIError(statusCode, errors.New(string(raw))) + decoder := json.NewDecoder(bytes.NewReader(raw)) + switch statusCode { + case 500: + value := new(sdk.InternalError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 429: + value := new(sdk.RateLimitError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 403: + value := new(sdk.ForbiddenError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 408: + value := new(sdk.UnauthorizedError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 404: + value := new(sdk.NotFoundError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 400: + value := new(sdk.BadRequestError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + } + return apiError + } + + var response *actors.ExportActorLogsResponse + if err := c.caller.Call( + ctx, + &core.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: c.header, + Request: request, + Response: &response, + ErrorDecoder: errorDecoder, + }, + ); err != nil { + return nil, err + } + return response, nil +} diff --git a/sdks/api/runtime/go/actors/types.go b/sdks/api/runtime/go/actors/types.go index b5ee0636b4..d26de1529b 100644 --- a/sdks/api/runtime/go/actors/types.go +++ b/sdks/api/runtime/go/actors/types.go @@ -52,6 +52,15 @@ type GetActorsRequestQuery struct { Cursor *string `json:"-"` } +type QueryActorsRequestQuery struct { + Project *string `json:"-"` + Environment *string `json:"-"` + // JSON-encoded query expression for filtering actors + QueryJson string `json:"-"` + // Cursor for pagination + Cursor *string `json:"-"` +} + type Actor struct { Id uuid.UUID `json:"id"` Region string `json:"region"` @@ -570,3 +579,18 @@ func (u *UpgradeAllActorsRequestQuery) UnmarshalJSON(data []byte) error { func (u *UpgradeAllActorsRequestQuery) MarshalJSON() ([]byte, error) { return json.Marshal(u.Body) } + +type GetActorUsageRequestQuery struct { + Project *string `json:"-"` + Environment *string `json:"-"` + // Start timestamp in milliseconds + Start int `json:"-"` + // End timestamp in milliseconds + End int `json:"-"` + // Time bucket interval in milliseconds + Interval int `json:"-"` + // JSON-encoded KeyPath for grouping results (e.g. {"property":"datacenter_id"} or {"property":"tags","map_key":"region"}) + GroupBy *string `json:"-"` + // JSON-encoded query expression for filtering actors + QueryJson *string `json:"-"` +} diff --git a/sdks/api/runtime/go/routes/client/client.go b/sdks/api/runtime/go/routes/client/client.go index 85bfb548bb..ff0188075e 100644 --- a/sdks/api/runtime/go/routes/client/client.go +++ b/sdks/api/runtime/go/routes/client/client.go @@ -301,3 +301,101 @@ func (c *Client) Delete(ctx context.Context, id string, request *routes.DeleteRo } return response, nil } + +// Returns time series data for HTTP requests routed to actors. Allows filtering and grouping by various request properties. +func (c *Client) History(ctx context.Context, request *routes.HistoryQuery) (*routes.HistoryResponse, error) { + baseURL := "https://api.rivet.gg" + if c.baseURL != "" { + baseURL = c.baseURL + } + endpointURL := baseURL + "/" + "routes/history" + + queryParams := make(url.Values) + if request.Project != nil { + queryParams.Add("project", fmt.Sprintf("%v", *request.Project)) + } + if request.Environment != nil { + queryParams.Add("environment", fmt.Sprintf("%v", *request.Environment)) + } + queryParams.Add("start", fmt.Sprintf("%v", request.Start)) + queryParams.Add("end", fmt.Sprintf("%v", request.End)) + queryParams.Add("interval", fmt.Sprintf("%v", request.Interval)) + if request.QueryJson != nil { + queryParams.Add("query_json", fmt.Sprintf("%v", *request.QueryJson)) + } + if request.GroupBy != nil { + queryParams.Add("group_by", fmt.Sprintf("%v", *request.GroupBy)) + } + if len(queryParams) > 0 { + endpointURL += "?" + queryParams.Encode() + } + + errorDecoder := func(statusCode int, body io.Reader) error { + raw, err := io.ReadAll(body) + if err != nil { + return err + } + apiError := core.NewAPIError(statusCode, errors.New(string(raw))) + decoder := json.NewDecoder(bytes.NewReader(raw)) + switch statusCode { + case 500: + value := new(sdk.InternalError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 429: + value := new(sdk.RateLimitError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 403: + value := new(sdk.ForbiddenError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 408: + value := new(sdk.UnauthorizedError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 404: + value := new(sdk.NotFoundError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + case 400: + value := new(sdk.BadRequestError) + value.APIError = apiError + if err := decoder.Decode(value); err != nil { + return apiError + } + return value + } + return apiError + } + + var response *routes.HistoryResponse + if err := c.caller.Call( + ctx, + &core.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: c.header, + Response: &response, + ErrorDecoder: errorDecoder, + }, + ); err != nil { + return nil, err + } + return response, nil +} diff --git a/sdks/api/runtime/go/routes/routes.go b/sdks/api/runtime/go/routes/routes.go index f8a56f46fe..3a22051535 100644 --- a/sdks/api/runtime/go/routes/routes.go +++ b/sdks/api/runtime/go/routes/routes.go @@ -35,6 +35,38 @@ func (d *DeleteRouteResponse) String() string { return fmt.Sprintf("%#v", d) } +type HistoryResponse struct { + MetricNames []string `json:"metric_names,omitempty"` + MetricAttributes []map[string]string `json:"metric_attributes,omitempty"` + MetricTypes []string `json:"metric_types,omitempty"` + MetricValues [][]float64 `json:"metric_values,omitempty"` + + _rawJSON json.RawMessage +} + +func (h *HistoryResponse) UnmarshalJSON(data []byte) error { + type unmarshaler HistoryResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *h = HistoryResponse(value) + h._rawJSON = json.RawMessage(data) + return nil +} + +func (h *HistoryResponse) 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 ListRoutesResponse struct { Routes []*Route `json:"routes,omitempty"` diff --git a/sdks/api/runtime/go/routes/types.go b/sdks/api/runtime/go/routes/types.go index 03aea79ac4..535fabae99 100644 --- a/sdks/api/runtime/go/routes/types.go +++ b/sdks/api/runtime/go/routes/types.go @@ -14,6 +14,21 @@ type DeleteRouteQuery struct { Environment *string `json:"-"` } +type HistoryQuery struct { + Project *string `json:"-"` + Environment *string `json:"-"` + // Start timestamp in milliseconds + Start int `json:"-"` + // End timestamp in milliseconds + End int `json:"-"` + // Time bucket interval in milliseconds + Interval int `json:"-"` + // JSON-encoded query expression for filtering requests + QueryJson *string `json:"-"` + // JSON-encoded KeyPath for grouping results (e.g. {"property":"client_request_host"} or {"property":"tags","map_key":"version"}) + GroupBy *string `json:"-"` +} + type ListRoutesQuery struct { Project *string `json:"-"` Environment *string `json:"-"` diff --git a/sdks/api/runtime/openapi/openapi.yml b/sdks/api/runtime/openapi/openapi.yml index 43045adb1c..1d5ad7326e 100644 --- a/sdks/api/runtime/openapi/openapi.yml +++ b/sdks/api/runtime/openapi/openapi.yml @@ -449,6 +449,177 @@ paths: application/json: schema: $ref: '#/components/schemas/ActorsUpgradeAllActorsRequest' + /actors/usage: + get: + description: >- + Returns time series data for actor usage metrics. Allows filtering and + grouping by various actor properties. + operationId: actors_usage + tags: + - Actors + parameters: + - name: project + in: query + required: false + schema: + type: string + - name: environment + in: query + required: false + schema: + type: string + - name: start + in: query + description: Start timestamp in milliseconds + required: true + schema: + type: integer + - name: end + in: query + description: End timestamp in milliseconds + required: true + schema: + type: integer + - name: interval + in: query + description: Time bucket interval in milliseconds + required: true + schema: + type: integer + - name: group_by + in: query + description: >- + JSON-encoded KeyPath for grouping results (e.g. + {"property":"datacenter_id"} or + {"property":"tags","map_key":"region"}) + required: false + schema: + type: string + - name: query_json + in: query + description: JSON-encoded query expression for filtering actors + required: false + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ActorsGetActorUsageResponse' + '400': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '403': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '404': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '408': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '429': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '500': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + security: *ref_0 + /actors/query: + get: + description: >- + Queries actors using a JSON-encoded query expression. Supports + pagination with cursor-based navigation. + operationId: actors_query + tags: + - Actors + parameters: + - name: project + in: query + required: false + schema: + type: string + - name: environment + in: query + required: false + schema: + type: string + - name: query_json + in: query + description: JSON-encoded query expression for filtering actors + required: true + schema: + type: string + - name: cursor + in: query + description: Cursor for pagination + required: false + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ActorsQueryActorsResponse' + '400': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '403': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '404': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '408': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '429': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '500': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + security: *ref_0 /builds/{build}: get: description: Get a build. @@ -1114,12 +1285,14 @@ paths: schema: $ref: '#/components/schemas/ErrorBody' security: *ref_0 - /actors/logs: + /routes/history: get: - description: Returns the logs for a given actor. - operationId: actors_logs_get + description: >- + Returns time series data for HTTP requests routed to actors. Allows + filtering and grouping by various request properties. + operationId: routes_history tags: - - ActorsLogs + - Routes parameters: - name: project in: query @@ -1131,31 +1304,106 @@ paths: required: false schema: type: string - - name: stream + - name: start + in: query + description: Start timestamp in milliseconds + required: true + schema: + type: integer + - name: end in: query + description: End timestamp in milliseconds required: true schema: - $ref: '#/components/schemas/ActorsQueryLogStream' - - name: actor_ids_json + type: integer + - name: interval in: query + description: Time bucket interval in milliseconds required: true + schema: + type: integer + - name: query_json + in: query + description: JSON-encoded query expression for filtering requests + required: false schema: type: string - - name: search_text + - name: group_by in: query + description: >- + JSON-encoded KeyPath for grouping results (e.g. + {"property":"client_request_host"} or + {"property":"tags","map_key":"version"}) required: false schema: type: string - - name: search_case_sensitive + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/RoutesHistoryResponse' + '400': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '403': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '404': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '408': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '429': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '500': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + security: *ref_0 + /actors/logs: + get: + description: Returns the logs for a given actor. + operationId: actors_logs_get + tags: + - ActorsLogs + parameters: + - name: project in: query required: false schema: - type: boolean - - name: search_enable_regex + type: string + - name: environment in: query required: false schema: - type: boolean + type: string + - name: query_json + in: query + description: JSON-encoded query expression for filtering logs + required: true + schema: + type: string - name: watch_index in: query description: A query parameter denoting the requests watch index. @@ -1206,6 +1454,75 @@ paths: schema: $ref: '#/components/schemas/ErrorBody' security: *ref_0 + /actors/logs/export: + post: + description: >- + Exports logs for the given actors to an S3 bucket and returns a + presigned URL to download. + operationId: actors_logs_export + tags: + - ActorsLogs + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ActorsExportActorLogsResponse' + '400': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '403': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '404': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '408': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '429': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '500': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + security: *ref_0 + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + project: + type: string + environment: + type: string + query_json: + type: string + description: JSON-encoded query expression for filtering logs + required: + - query_json components: schemas: ActorsGetActorResponse: @@ -1325,6 +1642,48 @@ components: required: - actors - pagination + ActorsGetActorUsageResponse: + type: object + properties: + metric_names: + type: array + items: + type: string + metric_attributes: + type: array + items: + type: object + additionalProperties: + type: string + metric_types: + type: array + items: + type: string + metric_values: + type: array + items: + type: array + items: + type: number + format: double + required: + - metric_names + - metric_attributes + - metric_types + - metric_values + ActorsQueryActorsResponse: + type: object + properties: + actors: + type: array + items: + $ref: '#/components/schemas/ActorsActor' + description: A list of actors matching the query + pagination: + $ref: '#/components/schemas/Pagination' + required: + - actors + - pagination BuildsGetBuildResponse: type: object properties: @@ -1450,6 +1809,35 @@ components: RoutesDeleteRouteResponse: type: object properties: {} + RoutesHistoryResponse: + type: object + properties: + metric_names: + type: array + items: + type: string + metric_attributes: + type: array + items: + type: object + additionalProperties: + type: string + metric_types: + type: array + items: + type: string + metric_values: + type: array + items: + type: array + items: + type: number + format: double + required: + - metric_names + - metric_attributes + - metric_types + - metric_values ActorsActor: type: object properties: @@ -1643,12 +2031,14 @@ components: - streams - actor_indices - watch - ActorsQueryLogStream: - type: string - enum: - - std_out - - std_err - - all + ActorsExportActorLogsResponse: + type: object + properties: + url: + type: string + description: Presigned URL to download the exported logs + required: + - url BuildsBuild: type: object properties: diff --git a/sdks/api/runtime/openapi_compat/openapi.yml b/sdks/api/runtime/openapi_compat/openapi.yml index e2b2b36636..4a68501bd1 100644 --- a/sdks/api/runtime/openapi_compat/openapi.yml +++ b/sdks/api/runtime/openapi_compat/openapi.yml @@ -449,6 +449,177 @@ paths: application/json: schema: $ref: '#/components/schemas/ActorsUpgradeAllActorsRequest' + /actors/usage: + get: + description: >- + Returns time series data for actor usage metrics. Allows filtering and + grouping by various actor properties. + operationId: actors_usage + tags: + - Actors + parameters: + - name: project + in: query + required: false + schema: + type: string + - name: environment + in: query + required: false + schema: + type: string + - name: start + in: query + description: Start timestamp in milliseconds + required: true + schema: + type: integer + - name: end + in: query + description: End timestamp in milliseconds + required: true + schema: + type: integer + - name: interval + in: query + description: Time bucket interval in milliseconds + required: true + schema: + type: integer + - name: group_by + in: query + description: >- + JSON-encoded KeyPath for grouping results (e.g. + {"property":"datacenter_id"} or + {"property":"tags","map_key":"region"}) + required: false + schema: + type: string + - name: query_json + in: query + description: JSON-encoded query expression for filtering actors + required: false + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ActorsGetActorUsageResponse' + '400': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '403': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '404': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '408': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '429': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '500': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + security: *ref_0 + /actors/query: + get: + description: >- + Queries actors using a JSON-encoded query expression. Supports + pagination with cursor-based navigation. + operationId: actors_query + tags: + - Actors + parameters: + - name: project + in: query + required: false + schema: + type: string + - name: environment + in: query + required: false + schema: + type: string + - name: query_json + in: query + description: JSON-encoded query expression for filtering actors + required: true + schema: + type: string + - name: cursor + in: query + description: Cursor for pagination + required: false + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ActorsQueryActorsResponse' + '400': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '403': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '404': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '408': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '429': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '500': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + security: *ref_0 '/builds/{build}': get: description: Get a build. @@ -1114,12 +1285,14 @@ paths: schema: $ref: '#/components/schemas/ErrorBody' security: *ref_0 - /actors/logs: + /routes/history: get: - description: Returns the logs for a given actor. - operationId: actors_logs_get + description: >- + Returns time series data for HTTP requests routed to actors. Allows + filtering and grouping by various request properties. + operationId: routes_history tags: - - ActorsLogs + - Routes parameters: - name: project in: query @@ -1131,31 +1304,106 @@ paths: required: false schema: type: string - - name: stream + - name: start + in: query + description: Start timestamp in milliseconds + required: true + schema: + type: integer + - name: end in: query + description: End timestamp in milliseconds required: true schema: - $ref: '#/components/schemas/ActorsQueryLogStream' - - name: actor_ids_json + type: integer + - name: interval in: query + description: Time bucket interval in milliseconds required: true + schema: + type: integer + - name: query_json + in: query + description: JSON-encoded query expression for filtering requests + required: false schema: type: string - - name: search_text + - name: group_by in: query + description: >- + JSON-encoded KeyPath for grouping results (e.g. + {"property":"client_request_host"} or + {"property":"tags","map_key":"version"}) required: false schema: type: string - - name: search_case_sensitive + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/RoutesHistoryResponse' + '400': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '403': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '404': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '408': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '429': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '500': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + security: *ref_0 + /actors/logs: + get: + description: Returns the logs for a given actor. + operationId: actors_logs_get + tags: + - ActorsLogs + parameters: + - name: project in: query required: false schema: - type: boolean - - name: search_enable_regex + type: string + - name: environment in: query required: false schema: - type: boolean + type: string + - name: query_json + in: query + description: JSON-encoded query expression for filtering logs + required: true + schema: + type: string - name: watch_index in: query description: A query parameter denoting the requests watch index. @@ -1206,6 +1454,75 @@ paths: schema: $ref: '#/components/schemas/ErrorBody' security: *ref_0 + /actors/logs/export: + post: + description: >- + Exports logs for the given actors to an S3 bucket and returns a + presigned URL to download. + operationId: actors_logs_export + tags: + - ActorsLogs + parameters: [] + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ActorsExportActorLogsResponse' + '400': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '403': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '404': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '408': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '429': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + '500': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorBody' + security: *ref_0 + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + project: + type: string + environment: + type: string + query_json: + type: string + description: JSON-encoded query expression for filtering logs + required: + - query_json components: schemas: ActorsGetActorResponse: @@ -1325,6 +1642,48 @@ components: required: - actors - pagination + ActorsGetActorUsageResponse: + type: object + properties: + metric_names: + type: array + items: + type: string + metric_attributes: + type: array + items: + type: object + additionalProperties: + type: string + metric_types: + type: array + items: + type: string + metric_values: + type: array + items: + type: array + items: + type: number + format: double + required: + - metric_names + - metric_attributes + - metric_types + - metric_values + ActorsQueryActorsResponse: + type: object + properties: + actors: + type: array + items: + $ref: '#/components/schemas/ActorsActor' + description: A list of actors matching the query + pagination: + $ref: '#/components/schemas/Pagination' + required: + - actors + - pagination BuildsGetBuildResponse: type: object properties: @@ -1450,6 +1809,35 @@ components: RoutesDeleteRouteResponse: type: object properties: {} + RoutesHistoryResponse: + type: object + properties: + metric_names: + type: array + items: + type: string + metric_attributes: + type: array + items: + type: object + additionalProperties: + type: string + metric_types: + type: array + items: + type: string + metric_values: + type: array + items: + type: array + items: + type: number + format: double + required: + - metric_names + - metric_attributes + - metric_types + - metric_values ActorsActor: type: object properties: @@ -1643,12 +2031,14 @@ components: - streams - actor_indices - watch - ActorsQueryLogStream: - type: string - enum: - - std_out - - std_err - - all + ActorsExportActorLogsResponse: + type: object + properties: + url: + type: string + description: Presigned URL to download the exported logs + required: + - url BuildsBuild: type: object properties: diff --git a/sdks/api/runtime/rust/.openapi-generator/FILES b/sdks/api/runtime/rust/.openapi-generator/FILES index 9ed2649752..42d8d19141 100644 --- a/sdks/api/runtime/rust/.openapi-generator/FILES +++ b/sdks/api/runtime/rust/.openapi-generator/FILES @@ -12,17 +12,20 @@ docs/ActorsCreateActorResponse.md docs/ActorsCreateActorRuntimeNetworkRequest.md docs/ActorsCreateActorRuntimeRequest.md docs/ActorsEndpointType.md +docs/ActorsExportActorLogsResponse.md docs/ActorsGetActorLogsResponse.md docs/ActorsGetActorResponse.md +docs/ActorsGetActorUsageResponse.md docs/ActorsLifecycle.md docs/ActorsListActorsResponse.md docs/ActorsLogsApi.md +docs/ActorsLogsExportRequest.md docs/ActorsNetwork.md docs/ActorsNetworkMode.md docs/ActorsPort.md docs/ActorsPortProtocol.md docs/ActorsPortRouting.md -docs/ActorsQueryLogStream.md +docs/ActorsQueryActorsResponse.md docs/ActorsResources.md docs/ActorsRuntime.md docs/ActorsUpgradeActorRequest.md @@ -44,6 +47,7 @@ docs/RegionsListRegionsResponse.md docs/RegionsRecommendRegionResponse.md docs/RegionsRegion.md docs/RoutesApi.md +docs/RoutesHistoryResponse.md docs/RoutesListRoutesResponse.md docs/RoutesRoute.md docs/RoutesRouteTarget.md @@ -69,16 +73,19 @@ 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_response.rs +src/models/actors_get_actor_usage_response.rs src/models/actors_lifecycle.rs src/models/actors_list_actors_response.rs +src/models/actors_logs_export_request.rs src/models/actors_network.rs src/models/actors_network_mode.rs src/models/actors_port.rs src/models/actors_port_protocol.rs src/models/actors_port_routing.rs -src/models/actors_query_log_stream.rs +src/models/actors_query_actors_response.rs src/models/actors_resources.rs src/models/actors_runtime.rs src/models/actors_upgrade_actor_request.rs @@ -98,6 +105,7 @@ src/models/pagination.rs src/models/regions_list_regions_response.rs src/models/regions_recommend_region_response.rs src/models/regions_region.rs +src/models/routes_history_response.rs src/models/routes_list_routes_response.rs src/models/routes_route.rs src/models/routes_route_target.rs diff --git a/sdks/api/runtime/rust/README.md b/sdks/api/runtime/rust/README.md index 106c5b36d8..fc50385595 100644 --- a/sdks/api/runtime/rust/README.md +++ b/sdks/api/runtime/rust/README.md @@ -29,8 +29,11 @@ Class | Method | HTTP request | Description *ActorsApi* | [**actors_destroy**](docs/ActorsApi.md#actors_destroy) | **DELETE** /actors/{actor} | *ActorsApi* | [**actors_get**](docs/ActorsApi.md#actors_get) | **GET** /actors/{actor} | *ActorsApi* | [**actors_list**](docs/ActorsApi.md#actors_list) | **GET** /actors | +*ActorsApi* | [**actors_query**](docs/ActorsApi.md#actors_query) | **GET** /actors/query | *ActorsApi* | [**actors_upgrade**](docs/ActorsApi.md#actors_upgrade) | **POST** /actors/{actor}/upgrade | *ActorsApi* | [**actors_upgrade_all**](docs/ActorsApi.md#actors_upgrade_all) | **POST** /actors/upgrade | +*ActorsApi* | [**actors_usage**](docs/ActorsApi.md#actors_usage) | **GET** /actors/usage | +*ActorsLogsApi* | [**actors_logs_export**](docs/ActorsLogsApi.md#actors_logs_export) | **POST** /actors/logs/export | *ActorsLogsApi* | [**actors_logs_get**](docs/ActorsLogsApi.md#actors_logs_get) | **GET** /actors/logs | *BuildsApi* | [**builds_complete**](docs/BuildsApi.md#builds_complete) | **POST** /builds/{build}/complete | *BuildsApi* | [**builds_get**](docs/BuildsApi.md#builds_get) | **GET** /builds/{build} | @@ -40,6 +43,7 @@ Class | Method | HTTP request | Description *RegionsApi* | [**regions_list**](docs/RegionsApi.md#regions_list) | **GET** /regions | *RegionsApi* | [**regions_recommend**](docs/RegionsApi.md#regions_recommend) | **GET** /regions/recommend | *RoutesApi* | [**routes_delete**](docs/RoutesApi.md#routes_delete) | **DELETE** /routes/{id} | +*RoutesApi* | [**routes_history**](docs/RoutesApi.md#routes_history) | **GET** /routes/history | *RoutesApi* | [**routes_list**](docs/RoutesApi.md#routes_list) | **GET** /routes | *RoutesApi* | [**routes_update**](docs/RoutesApi.md#routes_update) | **PUT** /routes/{id} | @@ -54,16 +58,19 @@ Class | Method | HTTP request | Description - [ActorsCreateActorRuntimeNetworkRequest](docs/ActorsCreateActorRuntimeNetworkRequest.md) - [ActorsCreateActorRuntimeRequest](docs/ActorsCreateActorRuntimeRequest.md) - [ActorsEndpointType](docs/ActorsEndpointType.md) + - [ActorsExportActorLogsResponse](docs/ActorsExportActorLogsResponse.md) - [ActorsGetActorLogsResponse](docs/ActorsGetActorLogsResponse.md) - [ActorsGetActorResponse](docs/ActorsGetActorResponse.md) + - [ActorsGetActorUsageResponse](docs/ActorsGetActorUsageResponse.md) - [ActorsLifecycle](docs/ActorsLifecycle.md) - [ActorsListActorsResponse](docs/ActorsListActorsResponse.md) + - [ActorsLogsExportRequest](docs/ActorsLogsExportRequest.md) - [ActorsNetwork](docs/ActorsNetwork.md) - [ActorsNetworkMode](docs/ActorsNetworkMode.md) - [ActorsPort](docs/ActorsPort.md) - [ActorsPortProtocol](docs/ActorsPortProtocol.md) - [ActorsPortRouting](docs/ActorsPortRouting.md) - - [ActorsQueryLogStream](docs/ActorsQueryLogStream.md) + - [ActorsQueryActorsResponse](docs/ActorsQueryActorsResponse.md) - [ActorsResources](docs/ActorsResources.md) - [ActorsRuntime](docs/ActorsRuntime.md) - [ActorsUpgradeActorRequest](docs/ActorsUpgradeActorRequest.md) @@ -82,6 +89,7 @@ Class | Method | HTTP request | Description - [RegionsListRegionsResponse](docs/RegionsListRegionsResponse.md) - [RegionsRecommendRegionResponse](docs/RegionsRecommendRegionResponse.md) - [RegionsRegion](docs/RegionsRegion.md) + - [RoutesHistoryResponse](docs/RoutesHistoryResponse.md) - [RoutesListRoutesResponse](docs/RoutesListRoutesResponse.md) - [RoutesRoute](docs/RoutesRoute.md) - [RoutesRouteTarget](docs/RoutesRouteTarget.md) diff --git a/sdks/api/runtime/rust/docs/ActorsApi.md b/sdks/api/runtime/rust/docs/ActorsApi.md index ffe577ac35..5313cebbf5 100644 --- a/sdks/api/runtime/rust/docs/ActorsApi.md +++ b/sdks/api/runtime/rust/docs/ActorsApi.md @@ -8,8 +8,10 @@ Method | HTTP request | Description [**actors_destroy**](ActorsApi.md#actors_destroy) | **DELETE** /actors/{actor} | [**actors_get**](ActorsApi.md#actors_get) | **GET** /actors/{actor} | [**actors_list**](ActorsApi.md#actors_list) | **GET** /actors | +[**actors_query**](ActorsApi.md#actors_query) | **GET** /actors/query | [**actors_upgrade**](ActorsApi.md#actors_upgrade) | **POST** /actors/{actor}/upgrade | [**actors_upgrade_all**](ActorsApi.md#actors_upgrade_all) | **POST** /actors/upgrade | +[**actors_usage**](ActorsApi.md#actors_usage) | **GET** /actors/usage | @@ -147,6 +149,39 @@ Name | Type | Description | Required | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +## actors_query + +> crate::models::ActorsQueryActorsResponse actors_query(query_json, project, environment, cursor) + + +Queries actors using a JSON-encoded query expression. Supports pagination with cursor-based navigation. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**query_json** | **String** | JSON-encoded query expression for filtering actors | [required] | +**project** | Option<**String**> | | | +**environment** | Option<**String**> | | | +**cursor** | Option<**String**> | Cursor for pagination | | + +### Return type + +[**crate::models::ActorsQueryActorsResponse**](ActorsQueryActorsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + ## actors_upgrade > serde_json::Value actors_upgrade(actor, actors_upgrade_actor_request, project, environment) @@ -211,3 +246,39 @@ Name | Type | Description | Required | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +## actors_usage + +> crate::models::ActorsGetActorUsageResponse actors_usage(start, end, interval, project, environment, group_by, query_json) + + +Returns time series data for actor usage metrics. Allows filtering and grouping by various actor properties. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**start** | **i32** | Start timestamp in milliseconds | [required] | +**end** | **i32** | End timestamp in milliseconds | [required] | +**interval** | **i32** | Time bucket interval in milliseconds | [required] | +**project** | Option<**String**> | | | +**environment** | Option<**String**> | | | +**group_by** | Option<**String**> | JSON-encoded KeyPath for grouping results (e.g. {\"property\":\"datacenter_id\"} or {\"property\":\"tags\",\"map_key\":\"region\"}) | | +**query_json** | Option<**String**> | JSON-encoded query expression for filtering actors | | + +### Return type + +[**crate::models::ActorsGetActorUsageResponse**](ActorsGetActorUsageResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/sdks/api/runtime/rust/docs/ActorsQueryLogStream.md b/sdks/api/runtime/rust/docs/ActorsExportActorLogsResponse.md similarity index 73% rename from sdks/api/runtime/rust/docs/ActorsQueryLogStream.md rename to sdks/api/runtime/rust/docs/ActorsExportActorLogsResponse.md index c3c590b3ff..d510522bd3 100644 --- a/sdks/api/runtime/rust/docs/ActorsQueryLogStream.md +++ b/sdks/api/runtime/rust/docs/ActorsExportActorLogsResponse.md @@ -1,9 +1,10 @@ -# ActorsQueryLogStream +# ActorsExportActorLogsResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**url** | **String** | Presigned URL to download the exported logs | [[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/ActorsGetActorUsageResponse.md b/sdks/api/runtime/rust/docs/ActorsGetActorUsageResponse.md new file mode 100644 index 0000000000..f34240e363 --- /dev/null +++ b/sdks/api/runtime/rust/docs/ActorsGetActorUsageResponse.md @@ -0,0 +1,14 @@ +# ActorsGetActorUsageResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metric_names** | **Vec** | | +**metric_attributes** | [**Vec<::std::collections::HashMap>**](map.md) | | +**metric_types** | **Vec** | | +**metric_values** | [**Vec>**](array.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/ActorsLogsApi.md b/sdks/api/runtime/rust/docs/ActorsLogsApi.md index 75b5c0f048..52d6ec66dd 100644 --- a/sdks/api/runtime/rust/docs/ActorsLogsApi.md +++ b/sdks/api/runtime/rust/docs/ActorsLogsApi.md @@ -4,13 +4,44 @@ All URIs are relative to *https://api.rivet.gg* Method | HTTP request | Description ------------- | ------------- | ------------- +[**actors_logs_export**](ActorsLogsApi.md#actors_logs_export) | **POST** /actors/logs/export | [**actors_logs_get**](ActorsLogsApi.md#actors_logs_get) | **GET** /actors/logs | +## actors_logs_export + +> crate::models::ActorsExportActorLogsResponse actors_logs_export(actors_logs_export_request) + + +Exports logs for the given actors to an S3 bucket and returns a presigned URL to download. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**actors_logs_export_request** | [**ActorsLogsExportRequest**](ActorsLogsExportRequest.md) | | [required] | + +### Return type + +[**crate::models::ActorsExportActorLogsResponse**](ActorsExportActorLogsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + ## actors_logs_get -> crate::models::ActorsGetActorLogsResponse actors_logs_get(stream, actor_ids_json, project, environment, search_text, search_case_sensitive, search_enable_regex, watch_index) +> crate::models::ActorsGetActorLogsResponse actors_logs_get(query_json, project, environment, watch_index) Returns the logs for a given actor. @@ -20,13 +51,9 @@ Returns the logs for a given actor. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**stream** | [**ActorsQueryLogStream**](.md) | | [required] | -**actor_ids_json** | **String** | | [required] | +**query_json** | **String** | JSON-encoded query expression for filtering logs | [required] | **project** | Option<**String**> | | | **environment** | Option<**String**> | | | -**search_text** | Option<**String**> | | | -**search_case_sensitive** | Option<**bool**> | | | -**search_enable_regex** | Option<**bool**> | | | **watch_index** | Option<**String**> | A query parameter denoting the requests watch index. | | ### Return type diff --git a/sdks/api/runtime/rust/docs/ActorsLogsExportRequest.md b/sdks/api/runtime/rust/docs/ActorsLogsExportRequest.md new file mode 100644 index 0000000000..acbeb6b410 --- /dev/null +++ b/sdks/api/runtime/rust/docs/ActorsLogsExportRequest.md @@ -0,0 +1,13 @@ +# ActorsLogsExportRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**project** | Option<**String**> | | [optional] +**environment** | Option<**String**> | | [optional] +**query_json** | **String** | JSON-encoded query expression for filtering logs | + +[[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/ActorsQueryActorsResponse.md b/sdks/api/runtime/rust/docs/ActorsQueryActorsResponse.md new file mode 100644 index 0000000000..96ca869d0d --- /dev/null +++ b/sdks/api/runtime/rust/docs/ActorsQueryActorsResponse.md @@ -0,0 +1,12 @@ +# ActorsQueryActorsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**actors** | [**Vec**](ActorsActor.md) | A list of actors matching the query | +**pagination** | [**crate::models::Pagination**](Pagination.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/RoutesApi.md b/sdks/api/runtime/rust/docs/RoutesApi.md index 9c8b377f4c..4ef653385c 100644 --- a/sdks/api/runtime/rust/docs/RoutesApi.md +++ b/sdks/api/runtime/rust/docs/RoutesApi.md @@ -5,6 +5,7 @@ All URIs are relative to *https://api.rivet.gg* Method | HTTP request | Description ------------- | ------------- | ------------- [**routes_delete**](RoutesApi.md#routes_delete) | **DELETE** /routes/{id} | +[**routes_history**](RoutesApi.md#routes_history) | **GET** /routes/history | [**routes_list**](RoutesApi.md#routes_list) | **GET** /routes | [**routes_update**](RoutesApi.md#routes_update) | **PUT** /routes/{id} | @@ -42,6 +43,42 @@ Name | Type | Description | Required | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +## routes_history + +> crate::models::RoutesHistoryResponse routes_history(start, end, interval, project, environment, query_json, group_by) + + +Returns time series data for HTTP requests routed to actors. Allows filtering and grouping by various request properties. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**start** | **i32** | Start timestamp in milliseconds | [required] | +**end** | **i32** | End timestamp in milliseconds | [required] | +**interval** | **i32** | Time bucket interval in milliseconds | [required] | +**project** | Option<**String**> | | | +**environment** | Option<**String**> | | | +**query_json** | Option<**String**> | JSON-encoded query expression for filtering requests | | +**group_by** | Option<**String**> | JSON-encoded KeyPath for grouping results (e.g. {\"property\":\"client_request_host\"} or {\"property\":\"tags\",\"map_key\":\"version\"}) | | + +### Return type + +[**crate::models::RoutesHistoryResponse**](RoutesHistoryResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + ## routes_list > crate::models::RoutesListRoutesResponse routes_list(project, environment) diff --git a/sdks/api/runtime/rust/docs/RoutesHistoryResponse.md b/sdks/api/runtime/rust/docs/RoutesHistoryResponse.md new file mode 100644 index 0000000000..2520698a06 --- /dev/null +++ b/sdks/api/runtime/rust/docs/RoutesHistoryResponse.md @@ -0,0 +1,14 @@ +# RoutesHistoryResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metric_names** | **Vec** | | +**metric_attributes** | [**Vec<::std::collections::HashMap>**](map.md) | | +**metric_types** | **Vec** | | +**metric_values** | [**Vec>**](array.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/src/apis/actors_api.rs b/sdks/api/runtime/rust/src/apis/actors_api.rs index e13c99f956..feb838eb9d 100644 --- a/sdks/api/runtime/rust/src/apis/actors_api.rs +++ b/sdks/api/runtime/rust/src/apis/actors_api.rs @@ -67,6 +67,19 @@ pub enum ActorsListError { UnknownValue(serde_json::Value), } +/// struct for typed errors of method [`actors_query`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ActorsQueryError { + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), +} + /// struct for typed errors of method [`actors_upgrade`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -93,6 +106,19 @@ pub enum ActorsUpgradeAllError { UnknownValue(serde_json::Value), } +/// struct for typed errors of method [`actors_usage`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ActorsUsageError { + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), +} + /// Create a new dynamic actor. pub async fn actors_create(configuration: &configuration::Configuration, actors_create_actor_request: crate::models::ActorsCreateActorRequest, project: Option<&str>, environment: Option<&str>, endpoint_type: Option) -> Result> { @@ -264,6 +290,47 @@ pub async fn actors_list(configuration: &configuration::Configuration, project: } } +/// Queries actors using a JSON-encoded query expression. Supports pagination with cursor-based navigation. +pub async fn actors_query(configuration: &configuration::Configuration, query_json: &str, project: Option<&str>, environment: Option<&str>, cursor: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/actors/query", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = project { + local_var_req_builder = local_var_req_builder.query(&[("project", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = environment { + local_var_req_builder = local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("query_json", &query_json.to_string())]); + if let Some(ref local_var_str) = cursor { + local_var_req_builder = local_var_req_builder.query(&[("cursor", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + /// Upgrades a dynamic actor. pub async fn actors_upgrade(configuration: &configuration::Configuration, actor: &str, actors_upgrade_actor_request: crate::models::ActorsUpgradeActorRequest, project: Option<&str>, environment: Option<&str>) -> Result> { let local_var_configuration = configuration; @@ -340,3 +407,49 @@ pub async fn actors_upgrade_all(configuration: &configuration::Configuration, ac } } +/// Returns time series data for actor usage metrics. Allows filtering and grouping by various actor properties. +pub async fn actors_usage(configuration: &configuration::Configuration, start: i32, end: i32, interval: i32, project: Option<&str>, environment: Option<&str>, group_by: Option<&str>, query_json: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/actors/usage", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = project { + local_var_req_builder = local_var_req_builder.query(&[("project", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = environment { + local_var_req_builder = local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("start", &start.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("end", &end.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("interval", &interval.to_string())]); + if let Some(ref local_var_str) = group_by { + local_var_req_builder = local_var_req_builder.query(&[("group_by", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = query_json { + local_var_req_builder = local_var_req_builder.query(&[("query_json", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/sdks/api/runtime/rust/src/apis/actors_logs_api.rs b/sdks/api/runtime/rust/src/apis/actors_logs_api.rs index be9aed6732..4f60aa6059 100644 --- a/sdks/api/runtime/rust/src/apis/actors_logs_api.rs +++ b/sdks/api/runtime/rust/src/apis/actors_logs_api.rs @@ -15,6 +15,19 @@ use crate::apis::ResponseContent; use super::{Error, configuration}; +/// struct for typed errors of method [`actors_logs_export`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ActorsLogsExportError { + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), +} + /// struct for typed errors of method [`actors_logs_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -29,8 +42,40 @@ pub enum ActorsLogsGetError { } +/// Exports logs for the given actors to an S3 bucket and returns a presigned URL to download. +pub async fn actors_logs_export(configuration: &configuration::Configuration, actors_logs_export_request: crate::models::ActorsLogsExportRequest) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/actors/logs/export", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&actors_logs_export_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + /// Returns the logs for a given actor. -pub async fn actors_logs_get(configuration: &configuration::Configuration, stream: crate::models::ActorsQueryLogStream, actor_ids_json: &str, project: Option<&str>, environment: Option<&str>, search_text: Option<&str>, search_case_sensitive: Option, search_enable_regex: Option, watch_index: Option<&str>) -> Result> { +pub async fn actors_logs_get(configuration: &configuration::Configuration, query_json: &str, project: Option<&str>, environment: Option<&str>, watch_index: Option<&str>) -> Result> { let local_var_configuration = configuration; let local_var_client = &local_var_configuration.client; @@ -44,17 +89,7 @@ pub async fn actors_logs_get(configuration: &configuration::Configuration, strea if let Some(ref local_var_str) = environment { local_var_req_builder = local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); } - local_var_req_builder = local_var_req_builder.query(&[("stream", &stream.to_string())]); - local_var_req_builder = local_var_req_builder.query(&[("actor_ids_json", &actor_ids_json.to_string())]); - if let Some(ref local_var_str) = search_text { - local_var_req_builder = local_var_req_builder.query(&[("search_text", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = search_case_sensitive { - local_var_req_builder = local_var_req_builder.query(&[("search_case_sensitive", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = search_enable_regex { - local_var_req_builder = local_var_req_builder.query(&[("search_enable_regex", &local_var_str.to_string())]); - } + local_var_req_builder = local_var_req_builder.query(&[("query_json", &query_json.to_string())]); if let Some(ref local_var_str) = watch_index { local_var_req_builder = local_var_req_builder.query(&[("watch_index", &local_var_str.to_string())]); } diff --git a/sdks/api/runtime/rust/src/apis/mod.rs.orig b/sdks/api/runtime/rust/src/apis/mod.rs.orig new file mode 100644 index 0000000000..b977825b38 --- /dev/null +++ b/sdks/api/runtime/rust/src/apis/mod.rs.orig @@ -0,0 +1,99 @@ +use std::error; +use std::fmt; + +#[derive(Debug, Clone)] +pub struct ResponseContent { + pub status: reqwest::StatusCode, + pub content: String, + pub entity: Option, +} + +#[derive(Debug)] +pub enum Error { + Reqwest(reqwest::Error), + Serde(serde_json::Error), + Io(std::io::Error), + ResponseError(ResponseContent), +} + +impl fmt::Display for Error { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let (module, e) = match self { + Error::Reqwest(e) => ("reqwest", e.to_string()), + Error::Serde(e) => ("serde", e.to_string()), + Error::Io(e) => ("IO", e.to_string()), + Error::ResponseError(e) => ("response", format!("status code {}", e.status)), + }; + write!(f, "error in {}: {}", module, e) + } +} + +impl error::Error for Error { + fn source(&self) -> Option<&(dyn error::Error + 'static)> { + Some(match self { + Error::Reqwest(e) => e, + Error::Serde(e) => e, + Error::Io(e) => e, + Error::ResponseError(_) => return None, + }) + } +} + +impl From for Error { + fn from(e: reqwest::Error) -> Self { + Error::Reqwest(e) + } +} + +impl From for Error { + fn from(e: serde_json::Error) -> Self { + Error::Serde(e) + } +} + +impl From for Error { + fn from(e: std::io::Error) -> Self { + Error::Io(e) + } +} + +pub fn urlencode>(s: T) -> String { + ::url::form_urlencoded::byte_serialize(s.as_ref().as_bytes()).collect() +} + +pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String, String)> { + if let serde_json::Value::Object(object) = value { + let mut params = vec![]; + + for (key, value) in object { + match value { + serde_json::Value::Object(_) => params.append(&mut parse_deep_object( + &format!("{}[{}]", prefix, key), + value, + )), + serde_json::Value::Array(array) => { + for (i, value) in array.iter().enumerate() { + params.append(&mut parse_deep_object( + &format!("{}[{}][{}]", prefix, key, i), + value, + )); + } + }, + serde_json::Value::String(s) => params.push((format!("{}[{}]", prefix, key), s.clone())), + _ => params.push((format!("{}[{}]", prefix, key), value.to_string())), + } + } + + return params; + } + + unimplemented!("Only objects are supported with style=deepObject") +} + +pub mod actors_api; +pub mod actors_logs_api; +pub mod builds_api; +pub mod regions_api; +pub mod routes_api; + +pub mod configuration; diff --git a/sdks/api/runtime/rust/src/apis/mod.rs.rej b/sdks/api/runtime/rust/src/apis/mod.rs.rej new file mode 100644 index 0000000000..174298e594 --- /dev/null +++ b/sdks/api/runtime/rust/src/apis/mod.rs.rej @@ -0,0 +1,37 @@ +--- mod.rs ++++ mod.rs +@@ -16,13 +16,33 @@ pub enum Error { + ResponseError(ResponseContent), + } + ++#[derive(serde::Deserialize)] ++pub struct RivetErrorBody { ++ pub code: String, ++ pub message: String, ++ pub documentation: Option, ++} ++ + impl fmt::Display for Error { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let (module, e) = match self { + Error::Reqwest(e) => ("reqwest", e.to_string()), + Error::Serde(e) => ("serde", e.to_string()), + Error::Io(e) => ("IO", e.to_string()), +- Error::ResponseError(e) => ("response", format!("status code {}", e.status)), ++ Error::ResponseError(e) => { ++ if let Ok(body) = serde_json::from_str::(&e.content) { ++ write!(f, "{}", body.message)?; ++ if let Some(docs) = &body.documentation { ++ write!(f, "\n{docs}")?; ++ } ++ return Ok(()); ++ } ++ ++ ( ++ "response", ++ format!("status code {}\n{}", e.status, e.content), ++ ) ++ } + }; + write!(f, "error in {}: {}", module, e) + } diff --git a/sdks/api/runtime/rust/src/apis/routes_api.rs b/sdks/api/runtime/rust/src/apis/routes_api.rs index 6118253996..92e697ab12 100644 --- a/sdks/api/runtime/rust/src/apis/routes_api.rs +++ b/sdks/api/runtime/rust/src/apis/routes_api.rs @@ -28,6 +28,19 @@ pub enum RoutesDeleteError { UnknownValue(serde_json::Value), } +/// struct for typed errors of method [`routes_history`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RoutesHistoryError { + Status400(crate::models::ErrorBody), + Status403(crate::models::ErrorBody), + Status404(crate::models::ErrorBody), + Status408(crate::models::ErrorBody), + Status429(crate::models::ErrorBody), + Status500(crate::models::ErrorBody), + UnknownValue(serde_json::Value), +} + /// struct for typed errors of method [`routes_list`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -92,6 +105,52 @@ pub async fn routes_delete(configuration: &configuration::Configuration, id: &st } } +/// Returns time series data for HTTP requests routed to actors. Allows filtering and grouping by various request properties. +pub async fn routes_history(configuration: &configuration::Configuration, start: i32, end: i32, interval: i32, project: Option<&str>, environment: Option<&str>, query_json: Option<&str>, group_by: Option<&str>) -> Result> { + let local_var_configuration = configuration; + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/routes/history", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_str) = project { + local_var_req_builder = local_var_req_builder.query(&[("project", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = environment { + local_var_req_builder = local_var_req_builder.query(&[("environment", &local_var_str.to_string())]); + } + local_var_req_builder = local_var_req_builder.query(&[("start", &start.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("end", &end.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("interval", &interval.to_string())]); + if let Some(ref local_var_str) = query_json { + local_var_req_builder = local_var_req_builder.query(&[("query_json", &local_var_str.to_string())]); + } + if let Some(ref local_var_str) = group_by { + local_var_req_builder = local_var_req_builder.query(&[("group_by", &local_var_str.to_string())]); + } + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + /// Lists all routes of the given environment. pub async fn routes_list(configuration: &configuration::Configuration, project: Option<&str>, environment: Option<&str>) -> Result> { let local_var_configuration = configuration; diff --git a/sdks/api/runtime/rust/src/models/actors_export_actor_logs_response.rs b/sdks/api/runtime/rust/src/models/actors_export_actor_logs_response.rs new file mode 100644 index 0000000000..7aef943b23 --- /dev/null +++ b/sdks/api/runtime/rust/src/models/actors_export_actor_logs_response.rs @@ -0,0 +1,29 @@ +/* + * 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 ActorsExportActorLogsResponse { + /// Presigned URL to download the exported logs + #[serde(rename = "url")] + pub url: String, +} + +impl ActorsExportActorLogsResponse { + pub fn new(url: String) -> ActorsExportActorLogsResponse { + ActorsExportActorLogsResponse { + url, + } + } +} + + diff --git a/sdks/api/runtime/rust/src/models/actors_get_actor_usage_response.rs b/sdks/api/runtime/rust/src/models/actors_get_actor_usage_response.rs new file mode 100644 index 0000000000..5fab3ae0a2 --- /dev/null +++ b/sdks/api/runtime/rust/src/models/actors_get_actor_usage_response.rs @@ -0,0 +1,37 @@ +/* + * 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 ActorsGetActorUsageResponse { + #[serde(rename = "metric_names")] + pub metric_names: Vec, + #[serde(rename = "metric_attributes")] + pub metric_attributes: Vec<::std::collections::HashMap>, + #[serde(rename = "metric_types")] + pub metric_types: Vec, + #[serde(rename = "metric_values")] + pub metric_values: Vec>, +} + +impl ActorsGetActorUsageResponse { + pub fn new(metric_names: Vec, metric_attributes: Vec<::std::collections::HashMap>, metric_types: Vec, metric_values: Vec>) -> ActorsGetActorUsageResponse { + ActorsGetActorUsageResponse { + metric_names, + metric_attributes, + metric_types, + metric_values, + } + } +} + + diff --git a/sdks/api/runtime/rust/src/models/actors_logs_export_request.rs b/sdks/api/runtime/rust/src/models/actors_logs_export_request.rs new file mode 100644 index 0000000000..d547cebdfc --- /dev/null +++ b/sdks/api/runtime/rust/src/models/actors_logs_export_request.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 ActorsLogsExportRequest { + #[serde(rename = "project", skip_serializing_if = "Option::is_none")] + pub project: Option, + #[serde(rename = "environment", skip_serializing_if = "Option::is_none")] + pub environment: Option, + /// JSON-encoded query expression for filtering logs + #[serde(rename = "query_json")] + pub query_json: String, +} + +impl ActorsLogsExportRequest { + pub fn new(query_json: String) -> ActorsLogsExportRequest { + ActorsLogsExportRequest { + project: None, + environment: None, + query_json, + } + } +} + + diff --git a/sdks/api/runtime/rust/src/models/actors_query_actors_response.rs b/sdks/api/runtime/rust/src/models/actors_query_actors_response.rs new file mode 100644 index 0000000000..9a66b60521 --- /dev/null +++ b/sdks/api/runtime/rust/src/models/actors_query_actors_response.rs @@ -0,0 +1,32 @@ +/* + * 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 ActorsQueryActorsResponse { + /// A list of actors matching the query + #[serde(rename = "actors")] + pub actors: Vec, + #[serde(rename = "pagination")] + pub pagination: Box, +} + +impl ActorsQueryActorsResponse { + pub fn new(actors: Vec, pagination: crate::models::Pagination) -> ActorsQueryActorsResponse { + ActorsQueryActorsResponse { + actors, + pagination: Box::new(pagination), + } + } +} + + diff --git a/sdks/api/runtime/rust/src/models/actors_query_log_stream.rs b/sdks/api/runtime/rust/src/models/actors_query_log_stream.rs deleted file mode 100644 index d718d59f58..0000000000 --- a/sdks/api/runtime/rust/src/models/actors_query_log_stream.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 ActorsQueryLogStream { - #[serde(rename = "std_out")] - StdOut, - #[serde(rename = "std_err")] - StdErr, - #[serde(rename = "all")] - All, - -} - -impl ToString for ActorsQueryLogStream { - fn to_string(&self) -> String { - match self { - Self::StdOut => String::from("std_out"), - Self::StdErr => String::from("std_err"), - Self::All => String::from("all"), - } - } -} - -impl Default for ActorsQueryLogStream { - fn default() -> ActorsQueryLogStream { - Self::StdOut - } -} - - - - diff --git a/sdks/api/runtime/rust/src/models/mod.rs b/sdks/api/runtime/rust/src/models/mod.rs index 8d3e549a91..80816f0d2b 100644 --- a/sdks/api/runtime/rust/src/models/mod.rs +++ b/sdks/api/runtime/rust/src/models/mod.rs @@ -14,14 +14,20 @@ 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; +pub use self::actors_export_actor_logs_response::ActorsExportActorLogsResponse; pub mod actors_get_actor_logs_response; pub use self::actors_get_actor_logs_response::ActorsGetActorLogsResponse; pub mod actors_get_actor_response; pub use self::actors_get_actor_response::ActorsGetActorResponse; +pub mod actors_get_actor_usage_response; +pub use self::actors_get_actor_usage_response::ActorsGetActorUsageResponse; pub mod actors_lifecycle; pub use self::actors_lifecycle::ActorsLifecycle; pub mod actors_list_actors_response; pub use self::actors_list_actors_response::ActorsListActorsResponse; +pub mod actors_logs_export_request; +pub use self::actors_logs_export_request::ActorsLogsExportRequest; pub mod actors_network; pub use self::actors_network::ActorsNetwork; pub mod actors_network_mode; @@ -32,8 +38,8 @@ pub mod actors_port_protocol; pub use self::actors_port_protocol::ActorsPortProtocol; pub mod actors_port_routing; pub use self::actors_port_routing::ActorsPortRouting; -pub mod actors_query_log_stream; -pub use self::actors_query_log_stream::ActorsQueryLogStream; +pub mod actors_query_actors_response; +pub use self::actors_query_actors_response::ActorsQueryActorsResponse; pub mod actors_resources; pub use self::actors_resources::ActorsResources; pub mod actors_runtime; @@ -70,6 +76,8 @@ pub mod regions_recommend_region_response; pub use self::regions_recommend_region_response::RegionsRecommendRegionResponse; pub mod regions_region; pub use self::regions_region::RegionsRegion; +pub mod routes_history_response; +pub use self::routes_history_response::RoutesHistoryResponse; pub mod routes_list_routes_response; pub use self::routes_list_routes_response::RoutesListRoutesResponse; pub mod routes_route; diff --git a/sdks/api/runtime/rust/src/models/routes_history_response.rs b/sdks/api/runtime/rust/src/models/routes_history_response.rs new file mode 100644 index 0000000000..53adc5d50a --- /dev/null +++ b/sdks/api/runtime/rust/src/models/routes_history_response.rs @@ -0,0 +1,37 @@ +/* + * 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 RoutesHistoryResponse { + #[serde(rename = "metric_names")] + pub metric_names: Vec, + #[serde(rename = "metric_attributes")] + pub metric_attributes: Vec<::std::collections::HashMap>, + #[serde(rename = "metric_types")] + pub metric_types: Vec, + #[serde(rename = "metric_values")] + pub metric_values: Vec>, +} + +impl RoutesHistoryResponse { + pub fn new(metric_names: Vec, metric_attributes: Vec<::std::collections::HashMap>, metric_types: Vec, metric_values: Vec>) -> RoutesHistoryResponse { + RoutesHistoryResponse { + metric_names, + metric_attributes, + metric_types, + metric_values, + } + } +} + + 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 3101a38f71..c123fb186c 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 @@ -1044,6 +1044,331 @@ export class Actors { } } + /** + * Returns time series data for actor usage metrics. Allows filtering and grouping by various actor properties. + * + * @param {Rivet.actors.GetActorUsageRequestQuery} request + * @param {Actors.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Rivet.InternalError} + * @throws {@link Rivet.RateLimitError} + * @throws {@link Rivet.ForbiddenError} + * @throws {@link Rivet.UnauthorizedError} + * @throws {@link Rivet.NotFoundError} + * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.actors.usage({ + * project: "string", + * environment: "string", + * start: 1, + * end: 1, + * interval: 1, + * groupBy: "string", + * queryJson: "string" + * }) + */ + public async usage( + request: Rivet.actors.GetActorUsageRequestQuery, + requestOptions?: Actors.RequestOptions, + ): Promise { + const { project, environment, start, end, interval, groupBy, queryJson } = request; + const _queryParams: Record = {}; + if (project != null) { + _queryParams["project"] = project; + } + + if (environment != null) { + _queryParams["environment"] = environment; + } + + _queryParams["start"] = start.toString(); + _queryParams["end"] = end.toString(); + _queryParams["interval"] = interval.toString(); + if (groupBy != null) { + _queryParams["group_by"] = groupBy; + } + + if (queryJson != null) { + _queryParams["query_json"] = queryJson; + } + + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.RivetEnvironment.Production, + "/actors/usage", + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.actors.GetActorUsageResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 500: + throw new Rivet.InternalError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 429: + throw new Rivet.RateLimitError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 403: + throw new Rivet.ForbiddenError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 408: + throw new Rivet.UnauthorizedError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 404: + throw new Rivet.NotFoundError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 400: + throw new Rivet.BadRequestError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + default: + throw new errors.RivetError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.RivetError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.RivetTimeoutError("Timeout exceeded when calling GET /actors/usage."); + case "unknown": + throw new errors.RivetError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Queries actors using a JSON-encoded query expression. Supports pagination with cursor-based navigation. + * + * @param {Rivet.actors.QueryActorsRequestQuery} request + * @param {Actors.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Rivet.InternalError} + * @throws {@link Rivet.RateLimitError} + * @throws {@link Rivet.ForbiddenError} + * @throws {@link Rivet.UnauthorizedError} + * @throws {@link Rivet.NotFoundError} + * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.actors.query({ + * project: "string", + * environment: "string", + * queryJson: "string", + * cursor: "string" + * }) + */ + public async query( + request: Rivet.actors.QueryActorsRequestQuery, + requestOptions?: Actors.RequestOptions, + ): Promise { + const { project, environment, queryJson, cursor } = request; + const _queryParams: Record = {}; + if (project != null) { + _queryParams["project"] = project; + } + + if (environment != null) { + _queryParams["environment"] = environment; + } + + _queryParams["query_json"] = queryJson; + if (cursor != null) { + _queryParams["cursor"] = cursor; + } + + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.RivetEnvironment.Production, + "/actors/query", + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.actors.QueryActorsResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 500: + throw new Rivet.InternalError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 429: + throw new Rivet.RateLimitError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 403: + throw new Rivet.ForbiddenError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 408: + throw new Rivet.UnauthorizedError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 404: + throw new Rivet.NotFoundError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 400: + throw new Rivet.BadRequestError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + default: + throw new errors.RivetError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.RivetError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.RivetTimeoutError("Timeout exceeded when calling GET /actors/query."); + case "unknown": + throw new errors.RivetError({ + message: _response.error.errorMessage, + }); + } + } + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { diff --git a/sdks/api/runtime/typescript/src/api/resources/actors/client/requests/GetActorUsageRequestQuery.ts b/sdks/api/runtime/typescript/src/api/resources/actors/client/requests/GetActorUsageRequestQuery.ts new file mode 100644 index 0000000000..b9b058df4f --- /dev/null +++ b/sdks/api/runtime/typescript/src/api/resources/actors/client/requests/GetActorUsageRequestQuery.ts @@ -0,0 +1,40 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * project: "string", + * environment: "string", + * start: 1, + * end: 1, + * interval: 1, + * groupBy: "string", + * queryJson: "string" + * } + */ +export interface GetActorUsageRequestQuery { + project?: string; + environment?: string; + /** + * Start timestamp in milliseconds + */ + start: number; + /** + * End timestamp in milliseconds + */ + end: number; + /** + * Time bucket interval in milliseconds + */ + interval: number; + /** + * JSON-encoded KeyPath for grouping results (e.g. {"property":"datacenter_id"} or {"property":"tags","map_key":"region"}) + */ + groupBy?: string; + /** + * JSON-encoded query expression for filtering actors + */ + queryJson?: string; +} diff --git a/sdks/api/runtime/typescript/src/api/resources/actors/client/requests/QueryActorsRequestQuery.ts b/sdks/api/runtime/typescript/src/api/resources/actors/client/requests/QueryActorsRequestQuery.ts new file mode 100644 index 0000000000..16707a4e81 --- /dev/null +++ b/sdks/api/runtime/typescript/src/api/resources/actors/client/requests/QueryActorsRequestQuery.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * project: "string", + * environment: "string", + * queryJson: "string", + * cursor: "string" + * } + */ +export interface QueryActorsRequestQuery { + project?: string; + environment?: string; + /** + * JSON-encoded query expression for filtering actors + */ + queryJson: string; + /** + * Cursor for pagination + */ + cursor?: string; +} diff --git a/sdks/api/runtime/typescript/src/api/resources/actors/client/requests/index.ts b/sdks/api/runtime/typescript/src/api/resources/actors/client/requests/index.ts index 8953e26e0c..bb635b00e7 100644 --- a/sdks/api/runtime/typescript/src/api/resources/actors/client/requests/index.ts +++ b/sdks/api/runtime/typescript/src/api/resources/actors/client/requests/index.ts @@ -4,3 +4,5 @@ export { type CreateActorRequestQuery } from "./CreateActorRequestQuery"; export { type DestroyActorRequestQuery } from "./DestroyActorRequestQuery"; export { type UpgradeActorRequestQuery } from "./UpgradeActorRequestQuery"; export { type UpgradeAllActorsRequestQuery } from "./UpgradeAllActorsRequestQuery"; +export { type GetActorUsageRequestQuery } from "./GetActorUsageRequestQuery"; +export { type QueryActorsRequestQuery } from "./QueryActorsRequestQuery"; diff --git a/sdks/api/runtime/typescript/src/api/resources/actors/resources/logs/client/Client.ts b/sdks/api/runtime/typescript/src/api/resources/actors/resources/logs/client/Client.ts index e6b2ff63df..14a90f2b44 100644 --- a/sdks/api/runtime/typescript/src/api/resources/actors/resources/logs/client/Client.ts +++ b/sdks/api/runtime/typescript/src/api/resources/actors/resources/logs/client/Client.ts @@ -5,8 +5,8 @@ import * as environments from "../../../../../../environments"; import * as core from "../../../../../../core"; import * as Rivet from "../../../../../index"; -import * as serializers from "../../../../../../serialization/index"; import urlJoin from "url-join"; +import * as serializers from "../../../../../../serialization/index"; import * as errors from "../../../../../../errors/index"; export declare namespace Logs { @@ -54,11 +54,7 @@ export class Logs { * await client.actors.logs.get({ * project: "string", * environment: "string", - * stream: "std_out", - * actorIdsJson: "string", - * searchText: "string", - * searchCaseSensitive: true, - * searchEnableRegex: true, + * queryJson: "string", * watchIndex: "string" * }) */ @@ -66,16 +62,7 @@ export class Logs { request: Rivet.actors.GetActorLogsRequestQuery, requestOptions?: Logs.RequestOptions, ): Promise { - const { - project, - environment, - stream, - actorIdsJson, - searchText, - searchCaseSensitive, - searchEnableRegex, - watchIndex, - } = request; + const { project, environment, queryJson, watchIndex } = request; const _queryParams: Record = {}; if (project != null) { _queryParams["project"] = project; @@ -85,22 +72,7 @@ export class Logs { _queryParams["environment"] = environment; } - _queryParams["stream"] = serializers.actors.QueryLogStream.jsonOrThrow(stream, { - unrecognizedObjectKeys: "strip", - }); - _queryParams["actor_ids_json"] = actorIdsJson; - if (searchText != null) { - _queryParams["search_text"] = searchText; - } - - if (searchCaseSensitive != null) { - _queryParams["search_case_sensitive"] = searchCaseSensitive.toString(); - } - - if (searchEnableRegex != null) { - _queryParams["search_enable_regex"] = searchEnableRegex.toString(); - } - + _queryParams["query_json"] = queryJson; if (watchIndex != null) { _queryParams["watch_index"] = watchIndex; } @@ -223,6 +195,148 @@ export class Logs { } } + /** + * Exports logs for the given actors to an S3 bucket and returns a presigned URL to download. + * + * @param {Rivet.actors.ExportActorLogsRequest} request + * @param {Logs.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Rivet.InternalError} + * @throws {@link Rivet.RateLimitError} + * @throws {@link Rivet.ForbiddenError} + * @throws {@link Rivet.UnauthorizedError} + * @throws {@link Rivet.NotFoundError} + * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.actors.logs.export({ + * project: "string", + * environment: "string", + * queryJson: "string" + * }) + */ + public async export( + request: Rivet.actors.ExportActorLogsRequest, + requestOptions?: Logs.RequestOptions, + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.RivetEnvironment.Production, + "/actors/logs/export", + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + body: serializers.actors.ExportActorLogsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.actors.ExportActorLogsResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 500: + throw new Rivet.InternalError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 429: + throw new Rivet.RateLimitError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 403: + throw new Rivet.ForbiddenError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 408: + throw new Rivet.UnauthorizedError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 404: + throw new Rivet.NotFoundError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 400: + throw new Rivet.BadRequestError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + default: + throw new errors.RivetError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.RivetError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.RivetTimeoutError("Timeout exceeded when calling POST /actors/logs/export."); + case "unknown": + throw new errors.RivetError({ + message: _response.error.errorMessage, + }); + } + } + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { diff --git a/sdks/api/runtime/typescript/src/api/resources/actors/resources/logs/client/requests/ExportActorLogsRequest.ts b/sdks/api/runtime/typescript/src/api/resources/actors/resources/logs/client/requests/ExportActorLogsRequest.ts new file mode 100644 index 0000000000..fa308a4fd9 --- /dev/null +++ b/sdks/api/runtime/typescript/src/api/resources/actors/resources/logs/client/requests/ExportActorLogsRequest.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * project: "string", + * environment: "string", + * queryJson: "string" + * } + */ +export interface ExportActorLogsRequest { + project?: string; + environment?: string; + /** JSON-encoded query expression for filtering logs */ + queryJson: string; +} diff --git a/sdks/api/runtime/typescript/src/api/resources/actors/resources/logs/client/requests/GetActorLogsRequestQuery.ts b/sdks/api/runtime/typescript/src/api/resources/actors/resources/logs/client/requests/GetActorLogsRequestQuery.ts index 0b87f5db8b..a10aa16f10 100644 --- a/sdks/api/runtime/typescript/src/api/resources/actors/resources/logs/client/requests/GetActorLogsRequestQuery.ts +++ b/sdks/api/runtime/typescript/src/api/resources/actors/resources/logs/client/requests/GetActorLogsRequestQuery.ts @@ -2,29 +2,22 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Rivet from "../../../../../../index"; - /** * @example * { * project: "string", * environment: "string", - * stream: "std_out", - * actorIdsJson: "string", - * searchText: "string", - * searchCaseSensitive: true, - * searchEnableRegex: true, + * queryJson: "string", * watchIndex: "string" * } */ export interface GetActorLogsRequestQuery { project?: string; environment?: string; - stream: Rivet.actors.QueryLogStream; - actorIdsJson: string; - searchText?: string; - searchCaseSensitive?: boolean; - searchEnableRegex?: boolean; + /** + * JSON-encoded query expression for filtering logs + */ + queryJson: string; /** * A query parameter denoting the requests watch index. */ diff --git a/sdks/api/runtime/typescript/src/api/resources/actors/resources/logs/client/requests/index.ts b/sdks/api/runtime/typescript/src/api/resources/actors/resources/logs/client/requests/index.ts index 599c89b601..9fe04449c9 100644 --- a/sdks/api/runtime/typescript/src/api/resources/actors/resources/logs/client/requests/index.ts +++ b/sdks/api/runtime/typescript/src/api/resources/actors/resources/logs/client/requests/index.ts @@ -1 +1,2 @@ export { type GetActorLogsRequestQuery } from "./GetActorLogsRequestQuery"; +export { type ExportActorLogsRequest } from "./ExportActorLogsRequest"; diff --git a/sdks/api/runtime/typescript/src/api/resources/actors/resources/logs/types/ExportActorLogsResponse.ts b/sdks/api/runtime/typescript/src/api/resources/actors/resources/logs/types/ExportActorLogsResponse.ts new file mode 100644 index 0000000000..d800431bf0 --- /dev/null +++ b/sdks/api/runtime/typescript/src/api/resources/actors/resources/logs/types/ExportActorLogsResponse.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface ExportActorLogsResponse { + /** Presigned URL to download the exported logs */ + url: string; +} diff --git a/sdks/api/runtime/typescript/src/api/resources/actors/resources/logs/types/QueryLogStream.ts b/sdks/api/runtime/typescript/src/api/resources/actors/resources/logs/types/QueryLogStream.ts deleted file mode 100644 index 556646c57e..0000000000 --- a/sdks/api/runtime/typescript/src/api/resources/actors/resources/logs/types/QueryLogStream.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export type QueryLogStream = "std_out" | "std_err" | "all"; -export const QueryLogStream = { - StdOut: "std_out", - StdErr: "std_err", - All: "all", -} as const; diff --git a/sdks/api/runtime/typescript/src/api/resources/actors/resources/logs/types/index.ts b/sdks/api/runtime/typescript/src/api/resources/actors/resources/logs/types/index.ts index a7db7fd2b2..a36d7aa9d6 100644 --- a/sdks/api/runtime/typescript/src/api/resources/actors/resources/logs/types/index.ts +++ b/sdks/api/runtime/typescript/src/api/resources/actors/resources/logs/types/index.ts @@ -1,2 +1,2 @@ export * from "./GetActorLogsResponse"; -export * from "./QueryLogStream"; +export * from "./ExportActorLogsResponse"; diff --git a/sdks/api/runtime/typescript/src/api/resources/actors/types/GetActorUsageResponse.ts b/sdks/api/runtime/typescript/src/api/resources/actors/types/GetActorUsageResponse.ts new file mode 100644 index 0000000000..e1a1d7cc48 --- /dev/null +++ b/sdks/api/runtime/typescript/src/api/resources/actors/types/GetActorUsageResponse.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface GetActorUsageResponse { + metricNames: string[]; + metricAttributes: Record[]; + metricTypes: string[]; + metricValues: number[][]; +} diff --git a/sdks/api/runtime/typescript/src/api/resources/actors/types/QueryActorsResponse.ts b/sdks/api/runtime/typescript/src/api/resources/actors/types/QueryActorsResponse.ts new file mode 100644 index 0000000000..a05b320571 --- /dev/null +++ b/sdks/api/runtime/typescript/src/api/resources/actors/types/QueryActorsResponse.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Rivet from "../../../index"; + +export interface QueryActorsResponse { + /** A list of actors matching the query */ + actors: Rivet.actors.Actor[]; + pagination: Rivet.Pagination; +} 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 9aab9504b0..785b43b9fd 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 @@ -11,3 +11,5 @@ export * from "./UpgradeActorResponse"; export * from "./UpgradeAllActorsRequest"; export * from "./UpgradeAllActorsResponse"; export * from "./ListActorsResponse"; +export * from "./GetActorUsageResponse"; +export * from "./QueryActorsResponse"; diff --git a/sdks/api/runtime/typescript/src/api/resources/routes/client/Client.ts b/sdks/api/runtime/typescript/src/api/resources/routes/client/Client.ts index 94df00589d..4332d0d51c 100644 --- a/sdks/api/runtime/typescript/src/api/resources/routes/client/Client.ts +++ b/sdks/api/runtime/typescript/src/api/resources/routes/client/Client.ts @@ -506,6 +506,173 @@ export class Routes { } } + /** + * Returns time series data for HTTP requests routed to actors. Allows filtering and grouping by various request properties. + * + * @param {Rivet.routes.HistoryQuery} request + * @param {Routes.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Rivet.InternalError} + * @throws {@link Rivet.RateLimitError} + * @throws {@link Rivet.ForbiddenError} + * @throws {@link Rivet.UnauthorizedError} + * @throws {@link Rivet.NotFoundError} + * @throws {@link Rivet.BadRequestError} + * + * @example + * await client.routes.history({ + * project: "string", + * environment: "string", + * start: 1, + * end: 1, + * interval: 1, + * queryJson: "string", + * groupBy: "string" + * }) + */ + public async history( + request: Rivet.routes.HistoryQuery, + requestOptions?: Routes.RequestOptions, + ): Promise { + const { project, environment, start, end, interval, queryJson, groupBy } = request; + const _queryParams: Record = {}; + if (project != null) { + _queryParams["project"] = project; + } + + if (environment != null) { + _queryParams["environment"] = environment; + } + + _queryParams["start"] = start.toString(); + _queryParams["end"] = end.toString(); + _queryParams["interval"] = interval.toString(); + if (queryJson != null) { + _queryParams["query_json"] = queryJson; + } + + if (groupBy != null) { + _queryParams["group_by"] = groupBy; + } + + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.RivetEnvironment.Production, + "/routes/history", + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-API-Version": requestOptions?.xApiVersion ?? this._options?.xApiVersion ?? "25.5.2", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 180000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.routes.HistoryResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 500: + throw new Rivet.InternalError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 429: + throw new Rivet.RateLimitError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 403: + throw new Rivet.ForbiddenError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 408: + throw new Rivet.UnauthorizedError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 404: + throw new Rivet.NotFoundError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + case 400: + throw new Rivet.BadRequestError( + serializers.ErrorBody.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + default: + throw new errors.RivetError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.RivetError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.RivetTimeoutError("Timeout exceeded when calling GET /routes/history."); + case "unknown": + throw new errors.RivetError({ + message: _response.error.errorMessage, + }); + } + } + protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { diff --git a/sdks/api/runtime/typescript/src/api/resources/routes/client/requests/HistoryQuery.ts b/sdks/api/runtime/typescript/src/api/resources/routes/client/requests/HistoryQuery.ts new file mode 100644 index 0000000000..cc4171b55a --- /dev/null +++ b/sdks/api/runtime/typescript/src/api/resources/routes/client/requests/HistoryQuery.ts @@ -0,0 +1,40 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * project: "string", + * environment: "string", + * start: 1, + * end: 1, + * interval: 1, + * queryJson: "string", + * groupBy: "string" + * } + */ +export interface HistoryQuery { + project?: string; + environment?: string; + /** + * Start timestamp in milliseconds + */ + start: number; + /** + * End timestamp in milliseconds + */ + end: number; + /** + * Time bucket interval in milliseconds + */ + interval: number; + /** + * JSON-encoded query expression for filtering requests + */ + queryJson?: string; + /** + * JSON-encoded KeyPath for grouping results (e.g. {"property":"client_request_host"} or {"property":"tags","map_key":"version"}) + */ + groupBy?: string; +} diff --git a/sdks/api/runtime/typescript/src/api/resources/routes/client/requests/index.ts b/sdks/api/runtime/typescript/src/api/resources/routes/client/requests/index.ts index e7f76515fd..349dbb9381 100644 --- a/sdks/api/runtime/typescript/src/api/resources/routes/client/requests/index.ts +++ b/sdks/api/runtime/typescript/src/api/resources/routes/client/requests/index.ts @@ -1,3 +1,4 @@ export { type ListRoutesQuery } from "./ListRoutesQuery"; export { type UpdateRouteQuery } from "./UpdateRouteQuery"; export { type DeleteRouteQuery } from "./DeleteRouteQuery"; +export { type HistoryQuery } from "./HistoryQuery"; diff --git a/sdks/api/runtime/typescript/src/api/resources/routes/types/HistoryResponse.ts b/sdks/api/runtime/typescript/src/api/resources/routes/types/HistoryResponse.ts new file mode 100644 index 0000000000..185f83aa11 --- /dev/null +++ b/sdks/api/runtime/typescript/src/api/resources/routes/types/HistoryResponse.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface HistoryResponse { + metricNames: string[]; + metricAttributes: Record[]; + metricTypes: string[]; + metricValues: number[][]; +} diff --git a/sdks/api/runtime/typescript/src/api/resources/routes/types/index.ts b/sdks/api/runtime/typescript/src/api/resources/routes/types/index.ts index 0b92bfd8f1..d0b71111ad 100644 --- a/sdks/api/runtime/typescript/src/api/resources/routes/types/index.ts +++ b/sdks/api/runtime/typescript/src/api/resources/routes/types/index.ts @@ -2,3 +2,4 @@ export * from "./ListRoutesResponse"; export * from "./UpdateRouteBody"; export * from "./UpdateRouteResponse"; export * from "./DeleteRouteResponse"; +export * from "./HistoryResponse"; diff --git a/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/index.ts b/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/index.ts index 6eaa67cdc2..bb93a8b0c8 100644 --- a/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/index.ts +++ b/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/index.ts @@ -2,3 +2,4 @@ export * as common from "./common"; export * from "./common/types"; export * as logs from "./logs"; export * from "./logs/types"; +export * from "./logs/client/requests"; diff --git a/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/logs/client/index.ts b/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/logs/client/index.ts new file mode 100644 index 0000000000..415726b7fe --- /dev/null +++ b/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/logs/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/logs/client/requests/ExportActorLogsRequest.ts b/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/logs/client/requests/ExportActorLogsRequest.ts new file mode 100644 index 0000000000..d6de8a63dc --- /dev/null +++ b/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/logs/client/requests/ExportActorLogsRequest.ts @@ -0,0 +1,24 @@ +/** + * 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 ExportActorLogsRequest: core.serialization.Schema< + serializers.actors.ExportActorLogsRequest.Raw, + Rivet.actors.ExportActorLogsRequest +> = core.serialization.object({ + project: core.serialization.string().optional(), + environment: core.serialization.string().optional(), + queryJson: core.serialization.property("query_json", core.serialization.string()), +}); + +export declare namespace ExportActorLogsRequest { + export interface Raw { + project?: string | null; + environment?: string | null; + query_json: string; + } +} diff --git a/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/logs/client/requests/index.ts b/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/logs/client/requests/index.ts new file mode 100644 index 0000000000..fe5e71e618 --- /dev/null +++ b/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/logs/client/requests/index.ts @@ -0,0 +1 @@ +export { ExportActorLogsRequest } from "./ExportActorLogsRequest"; diff --git a/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/logs/index.ts b/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/logs/index.ts index eea524d655..c9240f83b4 100644 --- a/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/logs/index.ts +++ b/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/logs/index.ts @@ -1 +1,2 @@ export * from "./types"; +export * from "./client"; diff --git a/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/logs/types/ExportActorLogsResponse.ts b/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/logs/types/ExportActorLogsResponse.ts new file mode 100644 index 0000000000..1f9d58c0bf --- /dev/null +++ b/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/logs/types/ExportActorLogsResponse.ts @@ -0,0 +1,20 @@ +/** + * 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 ExportActorLogsResponse: core.serialization.ObjectSchema< + serializers.actors.ExportActorLogsResponse.Raw, + Rivet.actors.ExportActorLogsResponse +> = core.serialization.object({ + url: core.serialization.string(), +}); + +export declare namespace ExportActorLogsResponse { + export interface Raw { + url: string; + } +} diff --git a/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/logs/types/QueryLogStream.ts b/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/logs/types/QueryLogStream.ts deleted file mode 100644 index ec7baffeb2..0000000000 --- a/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/logs/types/QueryLogStream.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 QueryLogStream: core.serialization.Schema< - serializers.actors.QueryLogStream.Raw, - Rivet.actors.QueryLogStream -> = core.serialization.enum_(["std_out", "std_err", "all"]); - -export declare namespace QueryLogStream { - export type Raw = "std_out" | "std_err" | "all"; -} diff --git a/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/logs/types/index.ts b/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/logs/types/index.ts index a7db7fd2b2..a36d7aa9d6 100644 --- a/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/logs/types/index.ts +++ b/sdks/api/runtime/typescript/src/serialization/resources/actors/resources/logs/types/index.ts @@ -1,2 +1,2 @@ export * from "./GetActorLogsResponse"; -export * from "./QueryLogStream"; +export * from "./ExportActorLogsResponse"; diff --git a/sdks/api/runtime/typescript/src/serialization/resources/actors/types/GetActorUsageResponse.ts b/sdks/api/runtime/typescript/src/serialization/resources/actors/types/GetActorUsageResponse.ts new file mode 100644 index 0000000000..cad1720b26 --- /dev/null +++ b/sdks/api/runtime/typescript/src/serialization/resources/actors/types/GetActorUsageResponse.ts @@ -0,0 +1,32 @@ +/** + * 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 GetActorUsageResponse: core.serialization.ObjectSchema< + serializers.actors.GetActorUsageResponse.Raw, + Rivet.actors.GetActorUsageResponse +> = core.serialization.object({ + metricNames: core.serialization.property("metric_names", core.serialization.list(core.serialization.string())), + metricAttributes: core.serialization.property( + "metric_attributes", + core.serialization.list(core.serialization.record(core.serialization.string(), core.serialization.string())), + ), + metricTypes: core.serialization.property("metric_types", core.serialization.list(core.serialization.string())), + metricValues: core.serialization.property( + "metric_values", + core.serialization.list(core.serialization.list(core.serialization.number())), + ), +}); + +export declare namespace GetActorUsageResponse { + export interface Raw { + metric_names: string[]; + metric_attributes: Record[]; + metric_types: string[]; + metric_values: number[][]; + } +} diff --git a/sdks/api/runtime/typescript/src/serialization/resources/actors/types/QueryActorsResponse.ts b/sdks/api/runtime/typescript/src/serialization/resources/actors/types/QueryActorsResponse.ts new file mode 100644 index 0000000000..1951b2edca --- /dev/null +++ b/sdks/api/runtime/typescript/src/serialization/resources/actors/types/QueryActorsResponse.ts @@ -0,0 +1,24 @@ +/** + * 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 { Actor } from "../resources/common/types/Actor"; +import { Pagination } from "../../common/types/Pagination"; + +export const QueryActorsResponse: core.serialization.ObjectSchema< + serializers.actors.QueryActorsResponse.Raw, + Rivet.actors.QueryActorsResponse +> = core.serialization.object({ + actors: core.serialization.list(Actor), + pagination: Pagination, +}); + +export declare namespace QueryActorsResponse { + export interface Raw { + actors: Actor.Raw[]; + pagination: Pagination.Raw; + } +} 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 9aab9504b0..785b43b9fd 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 @@ -11,3 +11,5 @@ export * from "./UpgradeActorResponse"; export * from "./UpgradeAllActorsRequest"; export * from "./UpgradeAllActorsResponse"; export * from "./ListActorsResponse"; +export * from "./GetActorUsageResponse"; +export * from "./QueryActorsResponse"; diff --git a/sdks/api/runtime/typescript/src/serialization/resources/routes/types/HistoryResponse.ts b/sdks/api/runtime/typescript/src/serialization/resources/routes/types/HistoryResponse.ts new file mode 100644 index 0000000000..3ce928d922 --- /dev/null +++ b/sdks/api/runtime/typescript/src/serialization/resources/routes/types/HistoryResponse.ts @@ -0,0 +1,32 @@ +/** + * 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 HistoryResponse: core.serialization.ObjectSchema< + serializers.routes.HistoryResponse.Raw, + Rivet.routes.HistoryResponse +> = core.serialization.object({ + metricNames: core.serialization.property("metric_names", core.serialization.list(core.serialization.string())), + metricAttributes: core.serialization.property( + "metric_attributes", + core.serialization.list(core.serialization.record(core.serialization.string(), core.serialization.string())), + ), + metricTypes: core.serialization.property("metric_types", core.serialization.list(core.serialization.string())), + metricValues: core.serialization.property( + "metric_values", + core.serialization.list(core.serialization.list(core.serialization.number())), + ), +}); + +export declare namespace HistoryResponse { + export interface Raw { + metric_names: string[]; + metric_attributes: Record[]; + metric_types: string[]; + metric_values: number[][]; + } +} diff --git a/sdks/api/runtime/typescript/src/serialization/resources/routes/types/index.ts b/sdks/api/runtime/typescript/src/serialization/resources/routes/types/index.ts index 0b92bfd8f1..d0b71111ad 100644 --- a/sdks/api/runtime/typescript/src/serialization/resources/routes/types/index.ts +++ b/sdks/api/runtime/typescript/src/serialization/resources/routes/types/index.ts @@ -2,3 +2,4 @@ export * from "./ListRoutesResponse"; export * from "./UpdateRouteBody"; export * from "./UpdateRouteResponse"; export * from "./DeleteRouteResponse"; +export * from "./HistoryResponse"; diff --git a/site/src/content/docs/cloud/api/actors/logs/export.mdx b/site/src/content/docs/cloud/api/actors/logs/export.mdx new file mode 100644 index 0000000000..45bd0db208 --- /dev/null +++ b/site/src/content/docs/cloud/api/actors/logs/export.mdx @@ -0,0 +1,41 @@ +{/* This file is auto-generated by `generateApi.js`. + * + * Do not edit this file directly. + */} + +import { JsonSchemaPreview, PropertyLabel } from '@/components/JsonSchemaPreview'; +import API_SCHEMA from './../../spec.json'; + +# actors.logs.export + +## Description +Exports logs for the given actors to an S3 bucket and returns a presigned URL to download. + +## Code Examples + + + +```bash {{ "title": "cURL" }} +# Write the request body to body.json before running +curl -X POST -d '@body.json' 'https://api.rivet.gg/actors/logs/export' + + +``` + +```ts +// Create Rivet client +import { RivetClient } from '@rivet-gg/api'; +const RIVET = new RivetClient({ token: '[YOUR TOKEN HERE]' }); + +// Make request +await RIVET.actors.logs.export({ + // Add your request body here +}); +``` + + + +## Schema + + + diff --git a/site/src/content/docs/cloud/api/actors/logs/get.mdx b/site/src/content/docs/cloud/api/actors/logs/get.mdx index bb7ea383b1..13fb34e432 100644 --- a/site/src/content/docs/cloud/api/actors/logs/get.mdx +++ b/site/src/content/docs/cloud/api/actors/logs/get.mdx @@ -33,5 +33,5 @@ await RIVET.actors.logs.get({ ## Schema - + diff --git a/site/src/content/docs/cloud/api/actors/query.mdx b/site/src/content/docs/cloud/api/actors/query.mdx new file mode 100644 index 0000000000..6f5fa98825 --- /dev/null +++ b/site/src/content/docs/cloud/api/actors/query.mdx @@ -0,0 +1,37 @@ +{/* This file is auto-generated by `generateApi.js`. + * + * Do not edit this file directly. + */} + +import { JsonSchemaPreview, PropertyLabel } from '@/components/JsonSchemaPreview'; +import API_SCHEMA from './../spec.json'; + +# actors.query + +## Description +Queries actors using a JSON-encoded query expression. Supports pagination with cursor-based navigation. + +## Code Examples + + + +```bash {{ "title": "cURL" }} +curl -X GET 'https://api.rivet.gg/actors/query' +``` + +```ts +// Create Rivet client +import { RivetClient } from '@rivet-gg/api'; +const RIVET = new RivetClient({ token: '[YOUR TOKEN HERE]' }); + +// Make request +await RIVET.actors.query({ + // Add your request body here +}); +``` + + + +## Schema + + diff --git a/site/src/content/docs/cloud/api/actors/usage.mdx b/site/src/content/docs/cloud/api/actors/usage.mdx new file mode 100644 index 0000000000..a26009eb62 --- /dev/null +++ b/site/src/content/docs/cloud/api/actors/usage.mdx @@ -0,0 +1,37 @@ +{/* This file is auto-generated by `generateApi.js`. + * + * Do not edit this file directly. + */} + +import { JsonSchemaPreview, PropertyLabel } from '@/components/JsonSchemaPreview'; +import API_SCHEMA from './../spec.json'; + +# actors.usage + +## Description +Returns time series data for actor usage metrics. Allows filtering and grouping by various actor properties. + +## Code Examples + + + +```bash {{ "title": "cURL" }} +curl -X GET 'https://api.rivet.gg/actors/usage' +``` + +```ts +// Create Rivet client +import { RivetClient } from '@rivet-gg/api'; +const RIVET = new RivetClient({ token: '[YOUR TOKEN HERE]' }); + +// Make request +await RIVET.actors.usage({ + // Add your request body here +}); +``` + + + +## Schema + + diff --git a/site/src/content/docs/cloud/api/errors.mdx b/site/src/content/docs/cloud/api/errors.mdx index 315d662915..52d344ff72 100644 --- a/site/src/content/docs/cloud/api/errors.mdx +++ b/site/src/content/docs/cloud/api/errors.mdx @@ -27,6 +27,13 @@ Actor failed to create. The provided list of actor IDs is not in a valid JSON format. Please provide a valid JSON array of UUIDs. +## Invalid Query Expression + +{`ACTOR_LOGS_INVALID_QUERY_EXPR`} + +The provided query expression is not in a valid format. Please provide a valid JSON-encoded query expression. + + ## No Actor Ids {`ACTOR_LOGS_NO_ACTOR_IDS`} @@ -494,6 +501,54 @@ The requested project could not be found. The requested region was not found. +## Field Not Groupable + +{`REQUEST_QUERY_FIELD_NOT_GROUPABLE`} + +The specified field exists but cannot be used in GROUP BY operations. + +## Causes + +- Field is not marked as groupable in the schema +- Field type doesn't support grouping +- Using a computed or derived field that can't be grouped + +## Field Not Map + +{`REQUEST_QUERY_FIELD_NOT_MAP`} + +The specified field is not a map type but a map key was provided. + +## Causes + +- Trying to access a map key on a non-map field +- Field type mismatch in query +- Incorrect field path syntax + +## Invalid Group By Field + +{`REQUEST_QUERY_INVALID_GROUP_BY_FIELD`} + +The specified field does not exist in the schema and cannot be used for grouping. + +## Causes + +- Field name is misspelled +- Field doesn't exist in the schema +- Using a field that's not available for grouping + +## Map Requires Key + +{`REQUEST_QUERY_MAP_REQUIRES_KEY`} + +Map properties require a map key to be specified when used in GROUP BY. + +## Causes + +- Using a map field in GROUP BY without specifying a key +- Missing map key in the KeyPath structure +- Attempting to group by the entire map instead of a specific key + ## Hostname Already Exists {`ROUTE_HOSTNAME_ALREADY_EXISTS`} diff --git a/site/src/content/docs/cloud/api/routes/history.mdx b/site/src/content/docs/cloud/api/routes/history.mdx new file mode 100644 index 0000000000..a6720f7de2 --- /dev/null +++ b/site/src/content/docs/cloud/api/routes/history.mdx @@ -0,0 +1,37 @@ +{/* This file is auto-generated by `generateApi.js`. + * + * Do not edit this file directly. + */} + +import { JsonSchemaPreview, PropertyLabel } from '@/components/JsonSchemaPreview'; +import API_SCHEMA from './../spec.json'; + +# routes.history + +## Description +Returns time series data for HTTP requests routed to actors. Allows filtering and grouping by various request properties. + +## Code Examples + + + +```bash {{ "title": "cURL" }} +curl -X GET 'https://api.rivet.gg/routes/history' +``` + +```ts +// Create Rivet client +import { RivetClient } from '@rivet-gg/api'; +const RIVET = new RivetClient({ token: '[YOUR TOKEN HERE]' }); + +// Make request +await RIVET.routes.history({ + // Add your request body here +}); +``` + + + +## Schema + + diff --git a/site/src/content/docs/cloud/api/spec.json b/site/src/content/docs/cloud/api/spec.json index 886d8a40ab..e4fa6727e0 100644 --- a/site/src/content/docs/cloud/api/spec.json +++ b/site/src/content/docs/cloud/api/spec.json @@ -1 +1 @@ -{"definitions":{"ActorsGetActorResponse":{"type":"object","properties":{"actor":{"$ref":"#/components/schemas/ActorsActor"}},"required":["actor"]},"ActorsCreateActorRequest":{"type":"object","properties":{"region":{"type":"string"},"tags":{},"build":{"type":"string","format":"uuid"},"build_tags":{},"runtime":{"$ref":"#/components/schemas/ActorsCreateActorRuntimeRequest"},"network":{"$ref":"#/components/schemas/ActorsCreateActorNetworkRequest"},"resources":{"$ref":"#/components/schemas/ActorsResources"},"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":{"$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":{"type":"boolean"}}},"ActorsCreateActorPortRequest":{"type":"object","properties":{"protocol":{"$ref":"#/components/schemas/ActorsPortProtocol"},"internal_port":{"type":"integer"},"routing":{"$ref":"#/components/schemas/ActorsPortRouting"}},"required":["protocol"]},"ActorsCreateActorResponse":{"type":"object","properties":{"actor":{"$ref":"#/components/schemas/ActorsActor","description":"The actor that was created"}},"required":["actor"]},"ActorsDestroyActorResponse":{"type":"object","properties":{}},"ActorsUpgradeActorRequest":{"type":"object","properties":{"build":{"type":"string","format":"uuid"},"build_tags":{}}},"ActorsUpgradeActorResponse":{"type":"object","properties":{}},"ActorsUpgradeAllActorsRequest":{"type":"object","properties":{"tags":{},"build":{"type":"string","format":"uuid"},"build_tags":{}},"required":["tags"]},"ActorsUpgradeAllActorsResponse":{"type":"object","properties":{"count":{"type":"integer","format":"int64"}},"required":["count"]},"ActorsListActorsResponse":{"type":"object","properties":{"actors":{"type":"array","items":{"$ref":"#/components/schemas/ActorsActor"},"description":"A list of actors for the project associated with the token."},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["actors","pagination"]},"BuildsGetBuildResponse":{"type":"object","properties":{"build":{"$ref":"#/components/schemas/BuildsBuild"}},"required":["build"]},"BuildsListBuildsResponse":{"type":"object","properties":{"builds":{"type":"array","items":{"$ref":"#/components/schemas/BuildsBuild"},"description":"A list of builds for the project associated with the token."}},"required":["builds"]},"BuildsPatchBuildTagsRequest":{"type":"object","properties":{"tags":{},"exclusive_tags":{"type":"array","items":{"type":"string"},"description":"**Deprecated**\nRemoves the given tag keys from all other builds."}},"required":["tags"]},"BuildsPatchBuildTagsResponse":{"type":"object","properties":{}},"BuildsPrepareBuildRequest":{"type":"object","properties":{"image_tag":{"type":"string","description":"A tag given to the project build."},"image_file":{"$ref":"#/components/schemas/UploadPrepareFile"},"kind":{"$ref":"#/components/schemas/BuildsBuildKind"},"compression":{"$ref":"#/components/schemas/BuildsBuildCompression"}},"required":["image_file"]},"BuildsPrepareBuildResponse":{"type":"object","properties":{"build":{"type":"string","format":"uuid"},"presigned_requests":{"type":"array","items":{"$ref":"#/components/schemas/UploadPresignedRequest"}}},"required":["build","presigned_requests"]},"BuildsBuildKind":{"type":"string","enum":["docker_image","oci_bundle","javascript"]},"BuildsBuildCompression":{"type":"string","enum":["none","lz4"]},"CloudBootstrapResponse":{"type":"object","properties":{"cluster":{"$ref":"#/components/schemas/CloudBootstrapCluster"},"access":{"$ref":"#/components/schemas/CloudBootstrapAccess"},"domains":{"$ref":"#/components/schemas/CloudBootstrapDomains"},"origins":{"$ref":"#/components/schemas/CloudBootstrapOrigins"},"captcha":{"$ref":"#/components/schemas/CloudBootstrapCaptcha"},"login_methods":{"$ref":"#/components/schemas/CloudBootstrapLoginMethods"},"deploy_hash":{"type":"string"}},"required":["cluster","access","domains","origins","captcha","login_methods","deploy_hash"]},"CloudBootstrapCluster":{"type":"string","enum":["enterprise","oss"],"description":"The type of cluster that the backend is currently running."},"CloudBootstrapAccess":{"type":"string","enum":["public","private","development"]},"CloudBootstrapDomains":{"type":"object","description":"Domains that host parts of Rivet","properties":{"cdn":{"type":"string"},"job":{"type":"string"},"main":{"type":"string"},"opengb":{"type":"string"}}},"CloudBootstrapOrigins":{"type":"object","description":"Origins used to build URLs from","properties":{"hub":{"type":"string"}},"required":["hub"]},"CloudBootstrapCaptcha":{"type":"object","properties":{"turnstile":{"$ref":"#/components/schemas/CloudBootstrapCaptchaTurnstile"}}},"CloudBootstrapCaptchaTurnstile":{"type":"object","properties":{"site_key":{"type":"string"}},"required":["site_key"]},"CloudBootstrapLoginMethods":{"type":"object","properties":{"email":{"type":"boolean"},"access_token":{"type":"boolean"}},"required":["email"]},"CloudGamesGetGamesResponse":{"type":"object","properties":{"games":{"type":"array","items":{"$ref":"#/components/schemas/GameGameSummary"},"description":"A list of game summaries."},"groups":{"type":"array","items":{"$ref":"#/components/schemas/GroupGroupSummary"},"description":"A list of group summaries."},"watch":{"$ref":"#/components/schemas/WatchResponse"}},"required":["games","groups","watch"]},"CloudGamesCreateGameRequest":{"type":"object","properties":{"name_id":{"$ref":"#/components/schemas/Identifier","description":"**Deprecated**"},"display_name":{"$ref":"#/components/schemas/DisplayName"},"developer_group_id":{"type":"string","format":"uuid"}},"required":["display_name","developer_group_id"]},"CloudGamesCreateGameResponse":{"type":"object","properties":{"game_id":{"type":"string","format":"uuid"}},"required":["game_id"]},"CloudGamesValidateGameRequest":{"type":"object","properties":{"display_name":{"$ref":"#/components/schemas/DisplayName"},"name_id":{"$ref":"#/components/schemas/Identifier","description":"**Deprecated**"}},"required":["display_name"]},"CloudGamesValidateGameResponse":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/ValidationError"},"description":"A list of validation errors."}},"required":["errors"]},"CloudGamesGetGameByIdResponse":{"type":"object","properties":{"game":{"$ref":"#/components/schemas/CloudGameFull"},"watch":{"$ref":"#/components/schemas/WatchResponse"}},"required":["game","watch"]},"CloudGamesGameBannerUploadPrepareRequest":{"type":"object","properties":{"path":{"type":"string","description":"The path/filename of the game banner."},"mime":{"type":"string","description":"The MIME type of the game banner."},"content_length":{"type":"integer","format":"int64","description":"Unsigned 64 bit integer."}},"required":["path","content_length"]},"CloudGamesGameBannerUploadPrepareResponse":{"type":"object","properties":{"upload_id":{"type":"string","format":"uuid"},"presigned_request":{"$ref":"#/components/schemas/UploadPresignedRequest"}},"required":["upload_id","presigned_request"]},"CloudGamesGameLogoUploadPrepareRequest":{"type":"object","properties":{"path":{"type":"string","description":"The path/filename of the game logo."},"mime":{"type":"string","description":"The MIME type of the game logo."},"content_length":{"type":"integer","format":"int64","description":"Unsigned 64 bit integer."}},"required":["path","content_length"]},"CloudGamesGameLogoUploadPrepareResponse":{"type":"object","properties":{"upload_id":{"type":"string","format":"uuid"},"presigned_request":{"$ref":"#/components/schemas/UploadPresignedRequest"}},"required":["upload_id","presigned_request"]},"CloudGamesNamespacesInspectResponse":{"type":"object","properties":{"agent":{"$ref":"#/components/schemas/CloudAuthAgent"}},"required":["agent"]},"CloudGamesNamespacesCreateGameNamespaceRequest":{"type":"object","properties":{"display_name":{"$ref":"#/components/schemas/DisplayName"},"version_id":{"type":"string","format":"uuid"},"name_id":{"type":"string","description":"A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short."}},"required":["display_name","version_id","name_id"]},"CloudGamesNamespacesCreateGameNamespaceResponse":{"type":"object","properties":{"namespace_id":{"type":"string","format":"uuid"}},"required":["namespace_id"]},"CloudGamesNamespacesValidateGameNamespaceRequest":{"type":"object","properties":{"display_name":{"$ref":"#/components/schemas/DisplayName"},"name_id":{"type":"string","description":"A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short."}},"required":["display_name","name_id"]},"CloudGamesNamespacesValidateGameNamespaceResponse":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/ValidationError"},"description":"A list of validation errors."}},"required":["errors"]},"CloudGamesNamespacesGetGameNamespaceByIdResponse":{"type":"object","properties":{"namespace":{"$ref":"#/components/schemas/CloudNamespaceFull"}},"required":["namespace"]},"CloudGamesNamespacesUpdateNamespaceCdnAuthUserRequest":{"type":"object","properties":{"user":{"type":"string","description":"A user name."},"password":{"type":"string","description":"A bcrypt encrypted password. An error is returned if the given string is not properly encrypted."}},"required":["user","password"]},"CloudGamesNamespacesSetNamespaceCdnAuthTypeRequest":{"type":"object","properties":{"auth_type":{"$ref":"#/components/schemas/CloudCdnAuthType"}},"required":["auth_type"]},"CloudGamesNamespacesToggleNamespaceDomainPublicAuthRequest":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether or not to enable authentication based on domain."}},"required":["enabled"]},"CloudGamesNamespacesAddNamespaceDomainRequest":{"type":"object","properties":{"domain":{"type":"string","description":"A valid domain name (no protocol)."}},"required":["domain"]},"CloudGamesNamespacesUpdateGameNamespaceMatchmakerConfigRequest":{"type":"object","properties":{"lobby_count_max":{"type":"integer","description":"Unsigned 32 bit integer."},"max_players":{"type":"integer","description":"Unsigned 32 bit integer."}},"required":["lobby_count_max","max_players"]},"CloudGamesNamespacesGetGameNamespaceVersionHistoryResponse":{"type":"object","properties":{"versions":{"type":"array","items":{"$ref":"#/components/schemas/CloudNamespaceVersion"},"description":"A list of previously deployed namespace versions."}},"required":["versions"]},"CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigRequest":{"type":"object","properties":{"lobby_count_max":{"type":"integer","description":"Unsigned 32 bit integer."},"max_players":{"type":"integer","description":"Unsigned 32 bit integer."}},"required":["lobby_count_max","max_players"]},"CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigResponse":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/ValidationError"},"description":"A list of validation errors."}},"required":["errors"]},"CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentRequest":{"type":"object","properties":{"hostname":{"type":"string","description":"The hostname used for the token."},"ports":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CloudMatchmakerDevelopmentPort"}},"lobby_ports":{"type":"array","items":{"$ref":"#/components/schemas/CloudVersionMatchmakerLobbyGroupRuntimeDockerPort"},"description":"**Deprecated**\nA list of docker ports."}},"required":["hostname"]},"CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentResponse":{"type":"object","properties":{"token":{"type":"string","description":"A JSON Web Token.\nSlightly modified to include a description prefix and use Protobufs of\nJSON."}},"required":["token"]},"CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentRequest":{"type":"object","properties":{"hostname":{"type":"string"},"lobby_ports":{"type":"array","items":{"$ref":"#/components/schemas/CloudVersionMatchmakerLobbyGroupRuntimeDockerPort"},"description":"A list of docker ports."}},"required":["hostname","lobby_ports"]},"CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentResponse":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/ValidationError"},"description":"A list of validation errors."}},"required":["errors"]},"CloudGamesNamespacesCreateGameNamespaceTokenPublicResponse":{"type":"object","properties":{"token":{"type":"string","description":"A JSON Web Token.\nSlightly modified to include a description prefix and use Protobufs of\nJSON."}},"required":["token"]},"CloudGamesNamespacesUpdateGameNamespaceVersionRequest":{"type":"object","properties":{"version_id":{"type":"string","format":"uuid"}},"required":["version_id"]},"CloudVersionConfig":{"type":"object","description":"Cloud configuration for a given version.","properties":{"scripts":{"type":"object","additionalProperties":{"type":"string"}},"engine":{"$ref":"#/components/schemas/CloudVersionEngineEngineConfig"},"cdn":{"$ref":"#/components/schemas/CloudVersionCdnCdnConfig"},"matchmaker":{"$ref":"#/components/schemas/CloudVersionMatchmakerMatchmakerConfig"},"kv":{"$ref":"#/components/schemas/CloudVersionKvKvConfig"},"identity":{"$ref":"#/components/schemas/CloudVersionIdentityIdentityConfig"}}},"CloudVersionFull":{"type":"object","description":"A full version.","properties":{"version_id":{"type":"string","format":"uuid"},"create_ts":{"$ref":"#/components/schemas/Timestamp"},"display_name":{"$ref":"#/components/schemas/DisplayName"},"config":{"$ref":"#/components/schemas/CloudVersionConfig"}},"required":["version_id","create_ts","display_name","config"]},"CloudVersionSummary":{"type":"object","description":"A version summary.","properties":{"version_id":{"type":"string","format":"uuid"},"create_ts":{"$ref":"#/components/schemas/Timestamp"},"display_name":{"$ref":"#/components/schemas/DisplayName"}},"required":["version_id","create_ts","display_name"]},"CloudVersionCdnCdnConfig":{"type":"object","description":"CDN configuration for a given version.","properties":{"build_command":{"type":"string","description":"_Configures Rivet CLI behavior. Has no effect on server behavior._"},"build_output":{"type":"string","description":"_Configures Rivet CLI behavior. Has no effect on server behavior._"},"build_env":{"type":"object","additionalProperties":{"type":"string"},"description":"_Configures Rivet CLI behavior. Has no effect on server behavior._"},"site_id":{"type":"string","format":"uuid"},"routes":{"type":"array","items":{"$ref":"#/components/schemas/CloudVersionCdnRoute"},"description":"Multiple CDN version routes."}}},"CloudVersionCdnRoute":{"type":"object","properties":{"glob":{"type":"string"},"priority":{"type":"integer","description":"Unsigned 32 bit integer."},"middlewares":{"type":"array","items":{"$ref":"#/components/schemas/CloudVersionCdnMiddleware"},"description":"Multiple CDN version middleware."}},"required":["glob","priority","middlewares"]},"CloudVersionCdnMiddleware":{"type":"object","properties":{"kind":{"$ref":"#/components/schemas/CloudVersionCdnMiddlewareKind"}},"required":["kind"]},"CloudVersionCdnMiddlewareKind":{"type":"object","properties":{"custom_headers":{"$ref":"#/components/schemas/CloudVersionCdnCustomHeadersMiddleware"}}},"CloudVersionCdnCustomHeadersMiddleware":{"type":"object","properties":{"headers":{"type":"array","items":{"$ref":"#/components/schemas/CloudVersionCdnHeader"}}},"required":["headers"]},"CloudVersionCdnHeader":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"]},"CloudVersionEngineEngineConfig":{"type":"object","properties":{"unity":{"$ref":"#/components/schemas/CloudVersionEngineUnityConfig"},"unreal":{"$ref":"#/components/schemas/CloudVersionEngineUnrealConfig"},"godot":{"$ref":"#/components/schemas/CloudVersionEngineGodotConfig"},"html5":{"$ref":"#/components/schemas/CloudVersionEngineHtml5Config"},"custom":{"$ref":"#/components/schemas/CloudVersionEngineCustomConfig"}}},"CloudVersionIdentityIdentityConfig":{"type":"object","description":"**Deprecated**\nIdentity configuration for a given version.","properties":{"display_names":{"type":"array","items":{"type":"string"},"description":"**Deprecated**"},"avatars":{"type":"array","items":{"type":"string","format":"uuid"},"description":"**Deprecated**"},"custom_display_names":{"type":"array","items":{"$ref":"#/components/schemas/CloudVersionIdentityCustomDisplayName"},"description":"**Deprecated**"},"custom_avatars":{"type":"array","items":{"$ref":"#/components/schemas/CloudVersionIdentityCustomAvatar"},"description":"**Deprecated**"}}},"CloudVersionIdentityCustomDisplayName":{"type":"object","properties":{"display_name":{"$ref":"#/components/schemas/DisplayName"}},"required":["display_name"]},"CloudVersionIdentityCustomAvatar":{"type":"object","properties":{"upload_id":{"type":"string","format":"uuid"}},"required":["upload_id"]},"CloudVersionKvKvConfig":{"type":"object","description":"KV configuration for a given version.","properties":{}},"CloudVersionMatchmakerMatchmakerConfig":{"type":"object","description":"Matchmaker configuration for a given version.","properties":{"game_modes":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameMode"},"description":"A list of game modes."},"captcha":{"$ref":"#/components/schemas/CloudVersionMatchmakerCaptcha"},"dev_hostname":{"type":"string","description":"_Configures Rivet CLI behavior. Has no effect on server behavior._"},"regions":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameModeRegion"}},"max_players":{"type":"integer"},"max_players_direct":{"type":"integer"},"max_players_party":{"type":"integer"},"docker":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameModeRuntimeDocker"},"tier":{"type":"string"},"idle_lobbies":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameModeIdleLobbiesConfig"},"lobby_groups":{"type":"array","items":{"$ref":"#/components/schemas/CloudVersionMatchmakerLobbyGroup"},"description":"**Deprecated: use `game_modes` instead**\nA list of game modes."}}},"CoreIntercomPegboardMarkClientRegisteredRequest":{"type":"object","properties":{"server_id":{"type":"string","format":"uuid"}},"required":["server_id"]},"EdgeIntercomPegboardPrewarmImageRequest":{"type":"object","properties":{}},"EdgeIntercomPegboardToggleClientDrainRequest":{"type":"object","properties":{"draining":{"type":"boolean"},"drain_complete_ts":{"$ref":"#/components/schemas/Timestamp"}},"required":["draining"]},"GroupListSuggestedResponse":{"type":"object","properties":{"groups":{"type":"array","items":{"$ref":"#/components/schemas/GroupGroupSummary"},"description":"A list of group summaries."},"watch":{"$ref":"#/components/schemas/WatchResponse"}},"required":["groups","watch"]},"GroupCreateRequest":{"type":"object","properties":{"display_name":{"$ref":"#/components/schemas/DisplayName"}},"required":["display_name"]},"GroupCreateResponse":{"type":"object","properties":{"group_id":{"type":"string","format":"uuid"}},"required":["group_id"]},"GroupPrepareAvatarUploadRequest":{"type":"object","properties":{"path":{"type":"string","description":"The path/filename of the group avatar."},"mime":{"type":"string","description":"The MIME type of the group avatar."},"content_length":{"type":"integer","format":"int64","description":"Unsigned 64 bit integer."}},"required":["path","content_length"]},"GroupPrepareAvatarUploadResponse":{"type":"object","properties":{"upload_id":{"type":"string","format":"uuid"},"presigned_request":{"$ref":"#/components/schemas/UploadPresignedRequest"}},"required":["upload_id","presigned_request"]},"GroupValidateProfileRequest":{"type":"object","properties":{"display_name":{"$ref":"#/components/schemas/DisplayName"},"bio":{"$ref":"#/components/schemas/DisplayName"},"publicity":{"$ref":"#/components/schemas/GroupPublicity"}}},"GroupValidateProfileResponse":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/ValidationError"},"description":"A list of validation errors."}},"required":["errors"]},"GroupGetBansResponse":{"type":"object","properties":{"banned_identities":{"type":"array","items":{"$ref":"#/components/schemas/GroupBannedIdentity"},"description":"A list of banned group members."},"anchor":{"type":"string","description":"The pagination anchor."},"watch":{"$ref":"#/components/schemas/WatchResponse"}},"required":["banned_identities","watch"]},"GroupGetJoinRequestsResponse":{"type":"object","properties":{"join_requests":{"type":"array","items":{"$ref":"#/components/schemas/GroupJoinRequest"},"description":"A list of group join requests."},"anchor":{"type":"string","description":"The pagination anchor."},"watch":{"$ref":"#/components/schemas/WatchResponse"}},"required":["join_requests","watch"]},"GroupGetMembersResponse":{"type":"object","properties":{"members":{"type":"array","items":{"$ref":"#/components/schemas/GroupMember"},"description":"A list of group members."},"anchor":{"type":"string","description":"The pagination anchor."},"watch":{"$ref":"#/components/schemas/WatchResponse"}},"required":["members","watch"]},"GroupGetProfileResponse":{"type":"object","properties":{"group":{"$ref":"#/components/schemas/GroupProfile"},"watch":{"$ref":"#/components/schemas/WatchResponse"}},"required":["group","watch"]},"GroupUpdateProfileRequest":{"type":"object","properties":{"display_name":{"$ref":"#/components/schemas/DisplayName"},"bio":{"type":"string","description":"Detailed information about a profile."},"publicity":{"$ref":"#/components/schemas/GroupPublicity"}}},"GroupGetSummaryResponse":{"type":"object","properties":{"group":{"$ref":"#/components/schemas/GroupGroupSummary"}},"required":["group"]},"GroupTransferOwnershipRequest":{"type":"object","properties":{"new_owner_identity_id":{"type":"string","description":"Identity to transfer the group to.\nMust be a member of the group."}},"required":["new_owner_identity_id"]},"IdentitySetupResponse":{"type":"object","properties":{"identity_token":{"$ref":"#/components/schemas/Jwt","description":"Token used to authenticate the identity.\nShould be stored somewhere permanent.\nPass this to `rivet.api.identity#Setup$existing_identity_token` next time `rivet.api.identity#Setup` is called.\nToken has a 90 day TTL.\nThis means that if `rivet.api.identity#Setup` is not called again within 90 days, the token will no longer be valid.\nIf this happens, the user can recover their account through the linking process (see `rivet.api.identity#PrepareGameLink`).\nThis token should be stored locally and never sent to a server or another device.\nIf this token is compromised, anyone with access to this token has control of the identity."},"identity_token_expire_ts":{"$ref":"#/components/schemas/Timestamp"},"identity":{"$ref":"#/components/schemas/IdentityProfile","description":"Information about the identity that was just authenticated."},"game_id":{"type":"string","format":"uuid"}},"required":["identity_token","identity_token_expire_ts","identity","game_id"]},"IdentityGetProfileResponse":{"type":"object","properties":{"identity":{"$ref":"#/components/schemas/IdentityProfile"},"watch":{"$ref":"#/components/schemas/WatchResponse"}},"required":["identity","watch"]},"IdentityGetHandlesResponse":{"type":"object","properties":{"identities":{"type":"array","items":{"$ref":"#/components/schemas/IdentityHandle"}},"watch":{"$ref":"#/components/schemas/WatchResponse"}},"required":["identities","watch"]},"IdentityGetSummariesResponse":{"type":"object","properties":{"identities":{"type":"array","items":{"$ref":"#/components/schemas/IdentitySummary"}},"watch":{"$ref":"#/components/schemas/WatchResponse"}},"required":["identities","watch"]},"IdentityValidateProfileResponse":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}},"required":["errors"]},"IdentityPrepareAvatarUploadResponse":{"type":"object","properties":{"upload_id":{"type":"string","format":"uuid"},"presigned_request":{"$ref":"#/components/schemas/UploadPresignedRequest"}},"required":["upload_id","presigned_request"]},"ProvisionDatacentersGetTlsResponse":{"type":"object","properties":{"job_cert_pem":{"type":"string"},"job_private_key_pem":{"type":"string"},"api_cert_pem":{"type":"string"},"api_private_key_pem":{"type":"string"}},"required":["job_cert_pem","job_private_key_pem","api_cert_pem","api_private_key_pem"]},"ProvisionDatacentersGetServersResponse":{"type":"object","properties":{"servers":{"type":"array","items":{"$ref":"#/components/schemas/ProvisionServer"}}},"required":["servers"]},"ProvisionServersGetInfoResponse":{"type":"object","properties":{"name":{"type":"string"},"server_id":{"type":"string","format":"uuid"},"datacenter_id":{"type":"string","format":"uuid"},"datacenter_name_id":{"type":"string"},"cluster_id":{"type":"string","format":"uuid"},"lan_ip":{"type":"string"},"wan_ip":{"type":"string"},"vlan_ip":{"type":"string","description":"**Deprecated**: Use lan_ip"},"public_ip":{"type":"string","description":"**Deprecated**: Use wan_ip"}},"required":["name","server_id","datacenter_id","datacenter_name_id","cluster_id","lan_ip","wan_ip","vlan_ip","public_ip"]},"ProvisionTunnelGetTlsResponse":{"type":"object","properties":{"cert_pem":{"type":"string"},"root_ca_cert_pem":{"type":"string"},"private_key_pem":{"type":"string"}},"required":["cert_pem","root_ca_cert_pem","private_key_pem"]},"RegionsListRegionsResponse":{"type":"object","properties":{"regions":{"type":"array","items":{"$ref":"#/components/schemas/RegionsRegion"}}},"required":["regions"]},"RegionsRecommendRegionResponse":{"type":"object","properties":{"region":{"$ref":"#/components/schemas/RegionsRegion"}},"required":["region"]},"RoutesListRoutesResponse":{"type":"object","properties":{"routes":{"type":"array","items":{"$ref":"#/components/schemas/RoutesRoute"}}},"required":["routes"]},"RoutesUpdateRouteBody":{"type":"object","properties":{"hostname":{"type":"string"},"path":{"type":"string"},"strip_prefix":{"type":"boolean","description":"Whether to remove the path prefix before sending the request to the actor."},"route_subpaths":{"type":"boolean","description":"Whether to route all subpaths of this path"},"target":{"$ref":"#/components/schemas/RoutesRouteTarget"}},"required":["hostname","path","strip_prefix","route_subpaths","target"]},"RoutesUpdateRouteResponse":{"type":"object","properties":{}},"RoutesDeleteRouteResponse":{"type":"object","properties":{}},"ServersGetServerResponse":{"type":"object","properties":{"server":{"$ref":"#/components/schemas/ServersServer"}},"required":["server"]},"ServersCreateServerRequest":{"type":"object","properties":{"datacenter":{"type":"string","format":"uuid"},"tags":{},"runtime":{"$ref":"#/components/schemas/ServersCreateServerRuntimeRequest"},"network":{"$ref":"#/components/schemas/ServersCreateServerNetworkRequest"},"resources":{"$ref":"#/components/schemas/ServersResources"},"lifecycle":{"$ref":"#/components/schemas/ServersLifecycle"}},"required":["datacenter","tags","runtime","network","resources"]},"ServersCreateServerRuntimeRequest":{"type":"object","properties":{"build":{"type":"string","format":"uuid"},"arguments":{"type":"array","items":{"type":"string"}},"environment":{"type":"object","additionalProperties":{"type":"string"}}},"required":["build"]},"ServersCreateServerNetworkRequest":{"type":"object","properties":{"mode":{"$ref":"#/components/schemas/ServersNetworkMode"},"ports":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ServersCreateServerPortRequest"}}},"required":["ports"]},"ServersCreateServerPortRequest":{"type":"object","properties":{"protocol":{"$ref":"#/components/schemas/ServersPortProtocol"},"internal_port":{"type":"integer"},"routing":{"$ref":"#/components/schemas/ServersPortRouting"}},"required":["protocol"]},"ServersCreateServerResponse":{"type":"object","properties":{"server":{"$ref":"#/components/schemas/ServersServer","description":"The server that was created"}},"required":["server"]},"ServersDestroyServerResponse":{"type":"object","properties":{}},"ServersListServersResponse":{"type":"object","properties":{"servers":{"type":"array","items":{"$ref":"#/components/schemas/ServersServer"},"description":"A list of servers for the game associated with the token."}},"required":["servers"]},"ActorsActor":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"region":{"type":"string"},"tags":{},"runtime":{"$ref":"#/components/schemas/ActorsRuntime"},"network":{"$ref":"#/components/schemas/ActorsNetwork"},"resources":{"$ref":"#/components/schemas/ActorsResources"},"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","resources","lifecycle","created_at"]},"ActorsRuntime":{"type":"object","properties":{"build":{"type":"string","format":"uuid"},"arguments":{"type":"array","items":{"type":"string"}},"environment":{"type":"object","additionalProperties":{"type":"string"}}},"required":["build"]},"ActorsLifecycle":{"type":"object","properties":{"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."},"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."}}},"ActorsResources":{"type":"object","properties":{"cpu":{"type":"integer","description":"The number of CPU cores in millicores, or 1/1000 of a core. For example,\n1/8 of a core would be 125 millicores, and 1 core would be 1000\nmillicores."},"memory":{"type":"integer","description":"The amount of memory in megabytes"}},"required":["cpu","memory"]},"ActorsNetwork":{"type":"object","properties":{"mode":{"$ref":"#/components/schemas/ActorsNetworkMode"},"ports":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ActorsPort"}}},"required":["mode","ports"]},"ActorsNetworkMode":{"type":"string","enum":["bridge","host"]},"ActorsPort":{"type":"object","properties":{"protocol":{"$ref":"#/components/schemas/ActorsPortProtocol"},"internal_port":{"type":"integer"},"hostname":{"type":"string"},"port":{"type":"integer"},"path":{"type":"string"},"url":{"type":"string","description":"Fully formed connection URL including protocol, hostname, port, and path, if applicable."},"routing":{"$ref":"#/components/schemas/ActorsPortRouting"}},"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":["hostname","path"]},"ActorsGetActorLogsResponse":{"type":"object","properties":{"actor_ids":{"type":"array","items":{"type":"string"},"description":"List of actor IDs in these logs. The order of these correspond to the index in the log entry."},"lines":{"type":"array","items":{"type":"string"},"description":"Sorted old to new."},"timestamps":{"type":"array","items":{"$ref":"#/components/schemas/Timestamp"},"description":"Sorted old to new."},"streams":{"type":"array","items":{"type":"integer"},"description":"Streams the logs came from.\n\n0 = stdout\n1 = stderr"},"actor_indices":{"type":"array","items":{"type":"integer"},"description":"Index of the actor that this log was for. Use this index to look the full ID in `actor_ids`."},"watch":{"$ref":"#/components/schemas/WatchResponse"}},"required":["actor_ids","lines","timestamps","streams","actor_indices","watch"]},"ActorsQueryLogStream":{"type":"string","enum":["std_out","std_err","all"]},"ActorsGetActorMetricsResponse":{"type":"object","properties":{"actor_ids":{"type":"array","items":{"type":"string"}},"metric_names":{"type":"array","items":{"type":"string"}},"metric_attributes":{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}}},"metric_types":{"type":"array","items":{"type":"string"}},"metric_values":{"type":"array","items":{"type":"array","items":{"type":"number","format":"double"}}}},"required":["actor_ids","metric_names","metric_attributes","metric_types","metric_values"]},"AuthCompleteStatus":{"type":"string","enum":["switch_identity","linked_account_added","already_complete","expired","too_many_attempts","incorrect"],"description":"Represents the state of an external account linking process."},"AuthIdentityStartEmailVerificationRequest":{"type":"object","properties":{"email":{"type":"string"},"captcha":{"$ref":"#/components/schemas/CaptchaConfig"},"game_id":{"type":"string","format":"uuid"}},"required":["email"]},"AuthIdentityStartEmailVerificationResponse":{"type":"object","properties":{"verification_id":{"type":"string","format":"uuid"}},"required":["verification_id"]},"AuthIdentityCompleteEmailVerificationRequest":{"type":"object","properties":{"verification_id":{"type":"string","format":"uuid"},"code":{"type":"string","description":"The code sent to the requestee's email."}},"required":["verification_id","code"]},"AuthIdentityCompleteEmailVerificationResponse":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/AuthCompleteStatus"}},"required":["status"]},"AuthRefreshIdentityTokenRequest":{"type":"object","properties":{"logout":{"type":"boolean","description":"When `true`, the current identity for the provided cookie will be logged out and a new identity will be returned."}}},"AuthRefreshIdentityTokenResponse":{"type":"object","properties":{"token":{"type":"string","description":"A JSON Web Token.\nSlightly modified to include a description prefix and use Protobufs of\nJSON."},"exp":{"type":"string","description":"Token expiration time (in milliseconds)."},"identity_id":{"type":"string","format":"uuid"}},"required":["token","exp","identity_id"]},"BuildsBuild":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"created_at":{"$ref":"#/components/schemas/Timestamp"},"content_length":{"type":"integer","format":"int64","description":"Unsigned 64 bit integer."},"tags":{"type":"object","additionalProperties":{"type":"string"},"description":"Tags of this build"}},"required":["id","name","created_at","content_length","tags"]},"CaptchaConfig":{"type":"object","description":"Methods to verify a captcha","properties":{"hcaptcha":{"$ref":"#/components/schemas/CaptchaConfigHcaptcha"},"turnstile":{"$ref":"#/components/schemas/CaptchaConfigTurnstile"}}},"CaptchaConfigHcaptcha":{"type":"object","description":"Captcha configuration.","properties":{"client_response":{"type":"string"}},"required":["client_response"]},"CaptchaConfigTurnstile":{"type":"object","description":"Captcha configuration.","properties":{"client_response":{"type":"string"}},"required":["client_response"]},"CloudInspectResponse":{"type":"object","properties":{"agent":{"$ref":"#/components/schemas/CloudAuthAgent"}},"required":["agent"]},"CloudSvcPerf":{"type":"object","description":"A service performance summary.","properties":{"svc_name":{"type":"string","description":"The name of the service."},"ts":{"$ref":"#/components/schemas/Timestamp"},"duration":{"type":"integer","format":"int64","description":"Unsigned 64 bit integer."},"req_id":{"type":"string","format":"uuid"},"spans":{"type":"array","items":{"$ref":"#/components/schemas/CloudLogsPerfSpan"},"description":"A list of performance spans."},"marks":{"type":"array","items":{"$ref":"#/components/schemas/CloudLogsPerfMark"},"description":"A list of performance marks."}},"required":["svc_name","ts","duration","spans","marks"]},"CloudLogsPerfSpan":{"type":"object","description":"A performance span.","properties":{"label":{"type":"string","description":"The label given to this performance span."},"start_ts":{"$ref":"#/components/schemas/Timestamp"},"finish_ts":{"$ref":"#/components/schemas/Timestamp"},"req_id":{"type":"string","format":"uuid"}},"required":["label","start_ts"]},"CloudLogsPerfMark":{"type":"object","description":"A performance mark.","properties":{"label":{"type":"string","description":"The label given to this performance mark."},"ts":{"$ref":"#/components/schemas/Timestamp"},"ray_id":{"type":"string","format":"uuid"},"req_id":{"type":"string","format":"uuid"}},"required":["label","ts"]},"CloudLobbySummaryAnalytics":{"type":"object","description":"Analytical information about a lobby.","properties":{"lobby_id":{"type":"string","format":"uuid"},"lobby_group_id":{"type":"string","format":"uuid"},"lobby_group_name_id":{"type":"string","description":"A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short."},"region_id":{"type":"string","format":"uuid"},"create_ts":{"$ref":"#/components/schemas/Timestamp"},"is_ready":{"type":"boolean","description":"Whether or not this lobby is ready."},"is_idle":{"type":"boolean","description":"Whether or not this lobby is idle."},"is_closed":{"type":"boolean","description":"Whether or not this lobby is in a closed state."},"is_outdated":{"type":"boolean","description":"Whether or not this lobby is outdated."},"max_players_normal":{"type":"integer","description":"Unsigned 32 bit integer."},"max_players_direct":{"type":"integer","description":"Unsigned 32 bit integer."},"max_players_party":{"type":"integer","description":"Unsigned 32 bit integer."},"total_player_count":{"type":"integer","description":"Unsigned 32 bit integer."},"registered_player_count":{"type":"integer","description":"Unsigned 32 bit integer."}},"required":["lobby_id","lobby_group_id","lobby_group_name_id","region_id","create_ts","is_ready","is_idle","is_closed","is_outdated","max_players_normal","max_players_direct","max_players_party","total_player_count","registered_player_count"]},"CloudLogsLobbySummary":{"type":"object","description":"A logs summary for a lobby.","properties":{"lobby_id":{"type":"string","format":"uuid"},"namespace_id":{"type":"string","format":"uuid"},"lobby_group_name_id":{"type":"string","description":"A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short."},"region_id":{"type":"string","format":"uuid"},"create_ts":{"$ref":"#/components/schemas/Timestamp"},"start_ts":{"$ref":"#/components/schemas/Timestamp"},"ready_ts":{"$ref":"#/components/schemas/Timestamp"},"status":{"$ref":"#/components/schemas/CloudLogsLobbyStatus"}},"required":["lobby_id","namespace_id","lobby_group_name_id","region_id","create_ts","status"]},"CloudLogsLobbyStatus":{"type":"object","description":"A union representing the state of a lobby.","properties":{"running":{"$ref":"#/components/schemas/EmptyObject"},"stopped":{"$ref":"#/components/schemas/CloudLogsLobbyStatusStopped"}},"required":["running"]},"CloudLogsLobbyStatusStopped":{"type":"object","description":"The status of a stopped lobby.","properties":{"stop_ts":{"$ref":"#/components/schemas/Timestamp"},"failed":{"type":"boolean","description":"Whether or not the lobby failed or stopped successfully."},"exit_code":{"type":"integer","description":"The exit code returned by the lobby's main process when stopped."}},"required":["stop_ts","failed","exit_code"]},"CloudSvcMetrics":{"type":"object","description":"Metrics relating to a job service.","properties":{"job":{"type":"string","description":"The job name."},"cpu":{"type":"array","items":{"type":"number","format":"double"},"description":"CPU metrics."},"memory":{"type":"array","items":{"type":"number","format":"double"},"description":"Memory metrics."},"allocated_memory":{"type":"number","format":"double","description":"Total allocated memory (MB)."}},"required":["job","cpu","memory"]},"CloudAuthAgent":{"type":"object","description":"The current authenticated agent.","properties":{"identity":{"$ref":"#/components/schemas/CloudAuthAgentIdentity"},"game_cloud":{"$ref":"#/components/schemas/CloudAuthAgentGameCloud"}}},"CloudAuthAgentIdentity":{"type":"object","description":"The current authenticated identity.","properties":{"identity_id":{"type":"string","format":"uuid"}},"required":["identity_id"]},"CloudAuthAgentGameCloud":{"type":"object","description":"The current authenticated game cloud.","properties":{"game_id":{"type":"string","format":"uuid"}},"required":["game_id"]},"CloudCustomAvatarSummary":{"type":"object","description":"A custom avatar summary.","properties":{"upload_id":{"type":"string","format":"uuid"},"display_name":{"$ref":"#/components/schemas/DisplayName"},"create_ts":{"$ref":"#/components/schemas/Timestamp"},"url":{"type":"string","description":"The URL of this custom avatar image. Only present if upload is complete."},"content_length":{"type":"integer","format":"int64","description":"Unsigned 64 bit integer."},"complete":{"type":"boolean","description":"Whether or not this custom avatar has completely been uploaded."}},"required":["upload_id","display_name","create_ts","content_length","complete"]},"CloudBuildSummary":{"type":"object","description":"A build summary.","properties":{"build_id":{"type":"string","format":"uuid"},"upload_id":{"type":"string","format":"uuid"},"display_name":{"$ref":"#/components/schemas/DisplayName"},"create_ts":{"$ref":"#/components/schemas/Timestamp"},"content_length":{"type":"integer","format":"int64","description":"Unsigned 64 bit integer."},"complete":{"type":"boolean","description":"Whether or not this build has completely been uploaded."},"tags":{"type":"object","additionalProperties":{"type":"string"},"description":"Tags of this build"}},"required":["build_id","upload_id","display_name","create_ts","content_length","complete","tags"]},"CloudCdnSiteSummary":{"type":"object","description":"A CDN site summary.","properties":{"site_id":{"type":"string","format":"uuid"},"upload_id":{"type":"string","format":"uuid"},"display_name":{"$ref":"#/components/schemas/DisplayName"},"create_ts":{"$ref":"#/components/schemas/Timestamp"},"content_length":{"type":"integer","format":"int64","description":"Unsigned 64 bit integer."},"complete":{"type":"boolean","description":"Whether or not this site has completely been uploaded."}},"required":["site_id","upload_id","display_name","create_ts","content_length","complete"]},"CloudGameFull":{"type":"object","description":"A full game.","properties":{"game_id":{"type":"string","format":"uuid"},"create_ts":{"$ref":"#/components/schemas/Timestamp"},"name_id":{"type":"string","description":"A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short."},"display_name":{"$ref":"#/components/schemas/DisplayName"},"developer_group_id":{"type":"string","format":"uuid"},"total_player_count":{"type":"integer","description":"Unsigned 32 bit integer."},"logo_url":{"type":"string","description":"The URL of this game's logo image."},"banner_url":{"type":"string","description":"The URL of this game's banner image."},"namespaces":{"type":"array","items":{"$ref":"#/components/schemas/CloudNamespaceSummary"},"description":"A list of namespace summaries."},"versions":{"type":"array","items":{"$ref":"#/components/schemas/CloudVersionSummary"},"description":"A list of version summaries."},"available_regions":{"type":"array","items":{"$ref":"#/components/schemas/CloudRegionSummary"},"description":"A list of region summaries."}},"required":["game_id","create_ts","name_id","display_name","developer_group_id","total_player_count","namespaces","versions","available_regions"]},"CloudNamespaceSummary":{"type":"object","description":"A namespace summary.","properties":{"namespace_id":{"type":"string","format":"uuid"},"create_ts":{"$ref":"#/components/schemas/Timestamp"},"display_name":{"$ref":"#/components/schemas/DisplayName"},"version_id":{"type":"string","format":"uuid"},"name_id":{"type":"string","description":"A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short."}},"required":["namespace_id","create_ts","display_name","version_id","name_id"]},"CloudRegionSummary":{"type":"object","description":"A region summary.","properties":{"region_id":{"type":"string","format":"uuid"},"region_name_id":{"type":"string","description":"A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short."},"provider":{"type":"string","description":"The server provider of this region."},"universal_region":{"$ref":"#/components/schemas/CloudUniversalRegion","description":"**Deprecated**\nA universal region label given to this region."},"provider_display_name":{"$ref":"#/components/schemas/DisplayName"},"region_display_name":{"$ref":"#/components/schemas/DisplayName"}},"required":["region_id","region_name_id","provider","universal_region","provider_display_name","region_display_name"]},"CloudGameLobbyExpenses":{"type":"object","description":"Game lobby expenses.","properties":{"game":{"$ref":"#/components/schemas/GameHandle"},"namespaces":{"type":"array","items":{"$ref":"#/components/schemas/CloudNamespaceSummary"},"description":"A list of namespace summaries."},"expenses":{"type":"array","items":{"$ref":"#/components/schemas/CloudRegionTierExpenses"},"description":"A list of multiple region tier expenses."}},"required":["game","namespaces","expenses"]},"CloudRegionTierExpenses":{"type":"object","description":"Region tier expenses.","properties":{"namespace_id":{"type":"string","format":"uuid"},"region_id":{"type":"string","format":"uuid"},"tier_name_id":{"type":"string","description":"A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short."},"lobby_group_name_id":{"type":"string","description":"A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short."},"uptime":{"type":"number","format":"double","description":"How long a region tier has been active (in milliseconds)."},"expenses":{"type":"number","format":"double","description":"Amount of expenses for this region tier (in hundred-thousandths USD, 100,000 = $1.00)."}},"required":["namespace_id","region_id","tier_name_id","lobby_group_name_id","uptime","expenses"]},"CloudGroupBankSource":{"type":"object","properties":{"account_number":{"type":"string","description":"The bank account number of this group's bank source."},"routing_number":{"type":"string","description":"The bank routing number of this group's bank source."}},"required":["account_number","routing_number"]},"CloudRegionTier":{"type":"object","description":"A region server tier.","properties":{"tier_name_id":{"type":"string","description":"A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short."},"rivet_cores_numerator":{"type":"integer","description":"Together with the denominator, denotes the portion of the CPU a given server uses."},"rivet_cores_denominator":{"type":"integer","description":"Together with the numerator, denotes the portion of the CPU a given server uses."},"cpu":{"type":"integer","description":"CPU frequency (MHz)."},"memory":{"type":"integer","description":"Allocated memory (MB)."},"disk":{"type":"integer","description":"Allocated disk space (MB)."},"bandwidth":{"type":"integer","description":"Internet bandwidth (MB)."},"price_per_second":{"type":"integer","description":"**Deprecated**\nPrice billed for every second this server is running (in quadrillionth USD, 1,000,000,000,000 = $1.00)."}},"required":["tier_name_id","rivet_cores_numerator","rivet_cores_denominator","cpu","memory","disk","bandwidth","price_per_second"]},"CloudUniversalRegion":{"type":"string","enum":["unknown","local","amsterdam","atlanta","bangalore","dallas","frankfurt","london","mumbai","newark","new_york_city","san_francisco","singapore","sydney","tokyo","toronto","washington_dc","chicago","paris","seattle","sao_paulo","stockholm","chennai","osaka","milan","miami","jakarta","los_angeles"],"description":"**Deprecated**"},"CloudNamespaceFull":{"type":"object","description":"A full namespace.","properties":{"namespace_id":{"type":"string","format":"uuid"},"create_ts":{"$ref":"#/components/schemas/Timestamp"},"display_name":{"$ref":"#/components/schemas/DisplayName"},"version_id":{"type":"string","format":"uuid"},"name_id":{"type":"string","description":"A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short."},"config":{"$ref":"#/components/schemas/CloudNamespaceConfig"}},"required":["namespace_id","create_ts","display_name","version_id","name_id","config"]},"CloudNamespaceConfig":{"type":"object","description":"Cloud configuration for a given namespace.","properties":{"cdn":{"$ref":"#/components/schemas/CloudCdnNamespaceConfig"},"matchmaker":{"$ref":"#/components/schemas/CloudMatchmakerNamespaceConfig"},"kv":{"$ref":"#/components/schemas/CloudKvNamespaceConfig"},"identity":{"$ref":"#/components/schemas/CloudIdentityNamespaceConfig"}},"required":["cdn","matchmaker","kv","identity"]},"CloudCdnNamespaceConfig":{"type":"object","description":"CDN configuration for a given namespace.","properties":{"enable_domain_public_auth":{"type":"boolean","description":"Whether or not to allow users to connect to the given namespace via domain name."},"domains":{"type":"array","items":{"$ref":"#/components/schemas/CloudCdnNamespaceDomain"},"description":"A list of CDN domains for a given namespace."},"auth_type":{"$ref":"#/components/schemas/CloudCdnAuthType"},"auth_user_list":{"type":"array","items":{"$ref":"#/components/schemas/CloudCdnNamespaceAuthUser"},"description":"A list of CDN authenticated users for a given namespace."}},"required":["enable_domain_public_auth","domains","auth_type","auth_user_list"]},"CloudMatchmakerNamespaceConfig":{"type":"object","description":"Matchmaker configuration for a given namespace.","properties":{"lobby_count_max":{"type":"integer","description":"Unsigned 32 bit integer."},"max_players_per_client":{"type":"integer","description":"Unsigned 32 bit integer."},"max_players_per_client_vpn":{"type":"integer","description":"Unsigned 32 bit integer."},"max_players_per_client_proxy":{"type":"integer","description":"Unsigned 32 bit integer."},"max_players_per_client_tor":{"type":"integer","description":"Unsigned 32 bit integer."},"max_players_per_client_hosting":{"type":"integer","description":"Unsigned 32 bit integer."}},"required":["lobby_count_max","max_players_per_client","max_players_per_client_vpn","max_players_per_client_proxy","max_players_per_client_tor","max_players_per_client_hosting"]},"CloudKvNamespaceConfig":{"type":"object","description":"KV configuration for a given namespace.","properties":{}},"CloudIdentityNamespaceConfig":{"type":"object","description":"Identity configuration for a given namespace.","properties":{}},"CloudCdnAuthType":{"type":"string","enum":["none","basic"],"description":"A value denoting what type of authentication to use for a game namespace's CDN."},"CloudCdnNamespaceDomain":{"type":"object","description":"A CDN domain for a given namespace.","properties":{"domain":{"type":"string","description":"A valid domain name (no protocol)."},"create_ts":{"$ref":"#/components/schemas/Timestamp"},"verification_status":{"$ref":"#/components/schemas/CloudCdnNamespaceDomainVerificationStatus"},"verification_method":{"$ref":"#/components/schemas/CloudCdnNamespaceDomainVerificationMethod"},"verification_errors":{"type":"array","items":{"type":"string"}}},"required":["domain","create_ts","verification_status","verification_method","verification_errors"]},"CloudCdnNamespaceDomainVerificationMethod":{"type":"object","description":"A union representing the verification method used for this CDN domain.","properties":{"invalid":{"$ref":"#/components/schemas/EmptyObject"},"http":{"$ref":"#/components/schemas/CloudCdnNamespaceDomainVerificationMethodHttp"}}},"CloudCdnNamespaceDomainVerificationMethodHttp":{"type":"object","properties":{"cname_record":{"type":"string"}},"required":["cname_record"]},"CloudCdnNamespaceDomainVerificationStatus":{"type":"string","enum":["active","pending","failed"],"description":"A value denoting the status of a CDN domain's verification status."},"CloudCdnNamespaceAuthUser":{"type":"object","description":"An authenticated CDN user for a given namespace.","properties":{"user":{"type":"string","description":"A user name."}},"required":["user"]},"CloudMatchmakerDevelopmentPort":{"type":"object","description":"A port configuration used to create development tokens.","properties":{"port":{"type":"integer"},"port_range":{"$ref":"#/components/schemas/CloudVersionMatchmakerPortRange"},"protocol":{"$ref":"#/components/schemas/CloudVersionMatchmakerPortProtocol"}},"required":["protocol"]},"CloudNamespaceVersion":{"type":"object","description":"A previously deployed namespace version.","properties":{"namespace_id":{"type":"string","description":"A universally unique identifier."},"version_id":{"type":"string","description":"A universally unique identifier."},"deploy_ts":{"$ref":"#/components/schemas/Timestamp"}},"required":["namespace_id","version_id","deploy_ts"]},"CloudDevicesPrepareDeviceLinkResponse":{"type":"object","properties":{"device_link_id":{"type":"string","format":"uuid"},"device_link_token":{"type":"string"},"device_link_url":{"type":"string"}},"required":["device_link_id","device_link_token","device_link_url"]},"CloudDevicesGetDeviceLinkResponse":{"type":"object","properties":{"cloud_token":{"type":"string"},"watch":{"$ref":"#/components/schemas/WatchResponse"}},"required":["watch"]},"CloudDevicesCompleteDeviceLinkRequest":{"type":"object","properties":{"device_link_token":{"$ref":"#/components/schemas/Jwt"},"game_id":{"type":"string","format":"uuid"}},"required":["device_link_token","game_id"]},"CloudGamesListGameCustomAvatarsResponse":{"type":"object","properties":{"custom_avatars":{"type":"array","items":{"$ref":"#/components/schemas/CloudCustomAvatarSummary"},"description":"A list of custom avatar summaries."}},"required":["custom_avatars"]},"CloudGamesPrepareCustomAvatarUploadRequest":{"type":"object","properties":{"path":{"type":"string","description":"The path/filename of the custom avatar."},"mime":{"type":"string","description":"The MIME type of the custom avatar."},"content_length":{"type":"integer","format":"int64","description":"Unsigned 64 bit integer."}},"required":["path","content_length"]},"CloudGamesPrepareCustomAvatarUploadResponse":{"type":"object","properties":{"upload_id":{"type":"string","format":"uuid"},"presigned_request":{"$ref":"#/components/schemas/UploadPresignedRequest"}},"required":["upload_id","presigned_request"]},"CloudGamesListGameBuildsResponse":{"type":"object","properties":{"builds":{"type":"array","items":{"$ref":"#/components/schemas/CloudBuildSummary"},"description":"A list of build summaries."}},"required":["builds"]},"CloudGamesCreateGameBuildRequest":{"type":"object","properties":{"display_name":{"$ref":"#/components/schemas/DisplayName"},"image_tag":{"type":"string","description":"A tag given to the game build."},"image_file":{"$ref":"#/components/schemas/UploadPrepareFile"},"multipart_upload":{"type":"boolean"},"kind":{"$ref":"#/components/schemas/CloudGamesBuildKind"},"compression":{"$ref":"#/components/schemas/CloudGamesBuildCompression"}},"required":["display_name","image_tag","image_file"]},"CloudGamesCreateGameBuildResponse":{"type":"object","properties":{"build_id":{"type":"string","format":"uuid"},"upload_id":{"type":"string","format":"uuid"},"image_presigned_request":{"$ref":"#/components/schemas/UploadPresignedRequest"},"image_presigned_requests":{"type":"array","items":{"$ref":"#/components/schemas/UploadPresignedRequest"}}},"required":["build_id","upload_id"]},"CloudGamesBuildKind":{"type":"string","enum":["docker_image","oci_bundle"]},"CloudGamesBuildCompression":{"type":"string","enum":["none","lz4"]},"CloudGamesListGameCdnSitesResponse":{"type":"object","properties":{"sites":{"type":"array","items":{"$ref":"#/components/schemas/CloudCdnSiteSummary"},"description":"A list of CDN site summaries."}},"required":["sites"]},"CloudGamesCreateGameCdnSiteRequest":{"type":"object","properties":{"display_name":{"$ref":"#/components/schemas/DisplayName"},"files":{"type":"array","items":{"$ref":"#/components/schemas/UploadPrepareFile"},"description":"A list of files preparing to upload."}},"required":["display_name","files"]},"CloudGamesCreateGameCdnSiteResponse":{"type":"object","properties":{"site_id":{"type":"string","format":"uuid"},"upload_id":{"type":"string","format":"uuid"},"presigned_requests":{"type":"array","items":{"$ref":"#/components/schemas/UploadPresignedRequest"}}},"required":["site_id","upload_id","presigned_requests"]},"CloudGamesExportMatchmakerLobbyHistoryRequest":{"type":"object","properties":{"query_start":{"type":"integer","format":"int64","description":"Unsigned 64 bit integer."},"query_end":{"type":"integer","format":"int64","description":"Unsigned 64 bit integer."}},"required":["query_start","query_end"]},"CloudGamesExportMatchmakerLobbyHistoryResponse":{"type":"object","properties":{"url":{"type":"string","description":"The URL to a CSV file for the given lobby history."}},"required":["url"]},"CloudGamesDeleteMatchmakerLobbyResponse":{"type":"object","properties":{"did_remove":{"type":"boolean","description":"Whether or not the lobby was successfully stopped."}},"required":["did_remove"]},"CloudGamesGetLobbyLogsResponse":{"type":"object","properties":{"lines":{"type":"array","items":{"type":"string"},"description":"Sorted old to new."},"timestamps":{"type":"array","items":{"type":"string"},"description":"Sorted old to new."},"watch":{"$ref":"#/components/schemas/WatchResponse"}},"required":["lines","timestamps","watch"]},"CloudGamesExportLobbyLogsRequest":{"type":"object","properties":{"stream":{"$ref":"#/components/schemas/CloudGamesLogStream"}},"required":["stream"]},"CloudGamesExportLobbyLogsResponse":{"type":"object","properties":{"url":{"type":"string","description":"The URL to a CSV file for the given lobby history."}},"required":["url"]},"CloudGamesLogStream":{"type":"string","enum":["std_out","std_err"]},"CloudGamesNamespacesGetAnalyticsMatchmakerLiveResponse":{"type":"object","properties":{"lobbies":{"type":"array","items":{"$ref":"#/components/schemas/CloudLobbySummaryAnalytics"},"description":"A list of analytics lobby summaries."}},"required":["lobbies"]},"CloudGamesNamespacesListNamespaceLobbiesResponse":{"type":"object","properties":{"lobbies":{"type":"array","items":{"$ref":"#/components/schemas/CloudLogsLobbySummary"},"description":"A list of lobby log summaries."}},"required":["lobbies"]},"CloudGamesNamespacesGetNamespaceLobbyResponse":{"type":"object","properties":{"lobby":{"$ref":"#/components/schemas/CloudLogsLobbySummary"},"metrics":{"$ref":"#/components/schemas/CloudSvcMetrics"},"stdout_presigned_urls":{"type":"array","items":{"type":"string"},"description":"**Deprecated**\nA list of URLs."},"stderr_presigned_urls":{"type":"array","items":{"type":"string"},"description":"**Deprecated**\nA list of URLs."},"perf_lists":{"type":"array","items":{"$ref":"#/components/schemas/CloudSvcPerf"},"description":"**Deprecated**\nA list of service performance summaries."}},"required":["lobby","stdout_presigned_urls","stderr_presigned_urls","perf_lists"]},"CloudGamesCreateCloudTokenResponse":{"type":"object","properties":{"token":{"type":"string","description":"A JSON Web Token.\nSlightly modified to include a description prefix and use Protobufs of\nJSON."}},"required":["token"]},"CloudGamesCreateGameVersionRequest":{"type":"object","properties":{"display_name":{"$ref":"#/components/schemas/DisplayName"},"config":{"$ref":"#/components/schemas/CloudVersionConfig"}},"required":["display_name","config"]},"CloudGamesCreateGameVersionResponse":{"type":"object","properties":{"version_id":{"type":"string","format":"uuid"}},"required":["version_id"]},"CloudGamesReserveVersionNameResponse":{"type":"object","properties":{"version_display_name":{"$ref":"#/components/schemas/DisplayName"}},"required":["version_display_name"]},"CloudGamesValidateGameVersionRequest":{"type":"object","properties":{"display_name":{"$ref":"#/components/schemas/DisplayName"},"config":{"$ref":"#/components/schemas/CloudVersionConfig"}},"required":["display_name","config"]},"CloudGamesValidateGameVersionResponse":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/ValidationError"},"description":"A list of validation errors."}},"required":["errors"]},"CloudGamesGetGameVersionByIdResponse":{"type":"object","properties":{"version":{"$ref":"#/components/schemas/CloudVersionFull"}},"required":["version"]},"CloudValidateGroupRequest":{"type":"object","properties":{"display_name":{"$ref":"#/components/schemas/DisplayName"}},"required":["display_name"]},"CloudValidateGroupResponse":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/ValidationError"},"description":"A list of validation errors."}},"required":["errors"]},"CloudGetRayPerfLogsResponse":{"type":"object","properties":{"perf_lists":{"type":"array","items":{"$ref":"#/components/schemas/CloudSvcPerf"},"description":"A list of service performance summaries."}},"required":["perf_lists"]},"CloudGetRegionTiersResponse":{"type":"object","properties":{"tiers":{"type":"array","items":{"$ref":"#/components/schemas/CloudRegionTier"},"description":"A list of region server tiers."}},"required":["tiers"]},"CloudVersionEngineCustomConfig":{"type":"object","properties":{}},"CloudVersionEngineGodotConfig":{"type":"object","properties":{}},"CloudVersionEngineHtml5Config":{"type":"object","properties":{}},"CloudVersionEngineUnityConfig":{"type":"object","properties":{}},"CloudVersionEngineUnrealConfig":{"type":"object","properties":{"game_module":{"type":"string","description":"Name of the Unreal module that holds the game code.\nThis is usually the value of `$.Modules[0].Name` in the file `MyProject.unproject`.\n_Configures Rivet CLI behavior. Has no effect on server behavior._"}},"required":["game_module"]},"CloudVersionMatchmakerPortRange":{"type":"object","description":"Range of ports that can be connected to.\nIf configured, `network_mode` must equal `host`.\nPort ranges may overlap between containers, it is the responsibility of the developer to ensure ports are available before using.\nRead more about host networking [here](https://rivet.gg/docs/dynamic-servers/concepts/host-bridge-networking).\nOnly available on Rivet Open Source & Enterprise.\n\n### Related\n\n- cloud.version.matchmaker.PortProtocol\n- cloud.version.matchmaker.ProxyKind","properties":{"min":{"type":"integer","description":"Unsigned 32 bit integer."},"max":{"type":"integer","description":"Unsigned 32 bit integer."}},"required":["min","max"]},"CloudVersionMatchmakerPortProtocol":{"type":"string","enum":["http","https","tcp","tcp_tls","udp"],"description":"Signifies the protocol of the port.\nNote that when proxying through GameGuard (via `ProxyKind`), the port number returned by `/find`, `/join`, and `/create` will not be the same as the port number configured in the config:\n\n- With HTTP, the port will always be 80. The hostname of the port correctly routes the incoming\n connection to the correct port being used by the game server.\n- With HTTPS, the port will always be 443. The hostname of the port correctly routes the incoming\n connection to the correct port being used by the game server.\n- Using TCP/UDP, the port will be a random number between 26000 and 31999. This gets automatically\n routed to the correct port being used by the game server.\n\n### Related - cloud.version.matchmaker.GameModeRuntimeDockerPort - cloud.version.matchmaker.ProxyKind - /docs/dynamic-servers/concepts/game-guard - matchmaker.lobbies.find"},"CloudVersionMatchmakerProxyKind":{"type":"string","enum":["none","game_guard"],"description":"Range of ports that can be connected to.\n`game_guard` (default) proxies all traffic through [Game Guard](https://rivet.gg/docs/dynamic-servers/concepts/game-guard) to mitigate DDoS attacks and provide TLS termination.\n`none` sends traffic directly to the game server. If configured, `network_mode` must equal `host`. Read more about host networking [here](https://rivet.gg/docs/dynamic-servers/concepts/host-bridge-networking). Only available on Rivet Open Source & Enterprise.\n\n### Related - /docs/dynamic-servers/concepts/game-guard - cloud.version.matchmaker.PortProtocol"},"CloudVersionMatchmakerCaptcha":{"type":"object","description":"Matchmaker captcha configuration.","properties":{"requests_before_reverify":{"type":"integer","description":"Denotes how many requests a connection can make before it is required to reverify a captcha."},"verification_ttl":{"type":"integer","format":"int64","description":"Denotes how long a connection can continue to reconnect without having to reverify a captcha (in milliseconds)."},"hcaptcha":{"$ref":"#/components/schemas/CloudVersionMatchmakerCaptchaHcaptcha"},"turnstile":{"$ref":"#/components/schemas/CloudVersionMatchmakerCaptchaTurnstile"}},"required":["requests_before_reverify","verification_ttl"]},"CloudVersionMatchmakerCaptchaHcaptcha":{"type":"object","description":"hCpatcha configuration.","properties":{"level":{"$ref":"#/components/schemas/CloudVersionMatchmakerCaptchaHcaptchaLevel","description":"**Deprecated**"},"site_key":{"type":"string","description":"Site key for your hCaptcha application. Must be set."},"secret_key":{"type":"string","description":"Secret key for your hCaptcha application. Must be set."}}},"CloudVersionMatchmakerCaptchaHcaptchaLevel":{"type":"string","enum":["easy","moderate","difficult","always_on"],"description":"**Deprecated**\nHow hard a captcha should be."},"CloudVersionMatchmakerCaptchaTurnstile":{"type":"object","description":"Turnstile captcha configuration.","properties":{"site_key":{"type":"string"},"secret_key":{"type":"string"}},"required":["site_key","secret_key"]},"CloudVersionMatchmakerNetworkMode":{"type":"string","enum":["bridge","host"],"description":"Configures how the container's network is isolated from the host.\n`bridge` (default) networking isolates the container's network from the host & other containers.\n`host` networking removes isolation between the container and the host. Only available in Rivet Open Source & Enterprise.\nRead more about bridge vs host networking [here](https://rivet.gg/docs/dynamic-servers/concepts/host-bridge-networking)."},"CloudVersionMatchmakerGameMode":{"type":"object","description":"A game mode.","properties":{"regions":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameModeRegion"}},"max_players":{"type":"integer"},"max_players_direct":{"type":"integer"},"max_players_party":{"type":"integer"},"docker":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameModeRuntimeDocker"},"listable":{"type":"boolean"},"taggable":{"type":"boolean"},"allow_dynamic_max_players":{"type":"boolean"},"actions":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameModeActions"},"tier":{"type":"string"},"idle_lobbies":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameModeIdleLobbiesConfig"}}},"CloudVersionMatchmakerGameModeRegion":{"type":"object","description":"A game mode region.","properties":{"tier":{"type":"string"},"idle_lobbies":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameModeIdleLobbiesConfig"}}},"CloudVersionMatchmakerGameModeRuntimeDocker":{"type":"object","description":"A game mode runtime running through Docker.","properties":{"dockerfile":{"type":"string","description":"_Configures Rivet CLI behavior. Has no effect on server behavior._"},"build_args":{"type":"object","additionalProperties":{"type":"string"},"description":"_Configures Rivet CLI behavior. Has no effect on server behavior._"},"image":{"type":"string","description":"_Configures Rivet CLI behavior. Has no effect on server behavior._"},"image_id":{"type":"string","format":"uuid"},"args":{"type":"array","items":{"type":"string"}},"env":{"type":"object","additionalProperties":{"type":"string"}},"network_mode":{"$ref":"#/components/schemas/CloudVersionMatchmakerNetworkMode"},"ports":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameModeRuntimeDockerPort"}}}},"CloudVersionMatchmakerGameModeRuntimeDockerPort":{"type":"object","description":"Port config for a docker build.","properties":{"port":{"type":"integer","description":"The port number to connect to.\n\n### Related - cloud.version.matchmaker.PortProtocol - cloud.version.matchmaker.ProxyKind"},"port_range":{"$ref":"#/components/schemas/CloudVersionMatchmakerPortRange"},"protocol":{"$ref":"#/components/schemas/CloudVersionMatchmakerPortProtocol"},"proxy":{"$ref":"#/components/schemas/CloudVersionMatchmakerProxyKind","description":"How this port should be proxied. Defaults to 'game-guard`."},"dev_port":{"type":"integer","description":"_Configures Rivet CLI behavior. Has no effect on server behavior._"},"dev_port_range":{"$ref":"#/components/schemas/CloudVersionMatchmakerPortRange","description":"_Configures Rivet CLI behavior. Has no effect on server behavior._"},"dev_protocol":{"$ref":"#/components/schemas/CloudVersionMatchmakerPortProtocol","description":"_Configures Rivet CLI behavior. Has no effect on server behavior._"}}},"CloudVersionMatchmakerGameModeIdleLobbiesConfig":{"type":"object","description":"Configuration for how many idle lobbies a game version should have.","properties":{"min":{"type":"integer"},"max":{"type":"integer"}},"required":["min","max"]},"CloudVersionMatchmakerGameModeActions":{"type":"object","description":"Configuration for the connection types allowed for a game mode.","properties":{"find":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameModeFindConfig"},"join":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameModeJoinConfig"},"create":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameModeCreateConfig"}}},"CloudVersionMatchmakerGameModeIdentityRequirement":{"type":"string","enum":["none","guest","registered"],"description":"**Deprecated**\nThe registration requirement for a user when joining/finding/creating a lobby. \"None\" allows for connections without an identity."},"CloudVersionMatchmakerGameModeVerificationConfig":{"type":"object","description":"Configuration that tells Rivet where to send validation requests and with what headers. When set, Rivet will send the `verification_data` property (given by the user in the find/join/create endpoint) to the given url along with the headers provided and some information about the requested lobby. The response of this request will determine if the user can join that lobby or not.","properties":{"url":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}}},"required":["url","headers"]},"CloudVersionMatchmakerGameModeFindConfig":{"type":"object","description":"Configures the requirements and authentication for the /find endpoint. If this value is not set in the config, the /find endpoint is still enabled.","properties":{"enabled":{"type":"boolean","description":"Sets whether or not the /find endpoint is enabled."},"identity_requirement":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameModeIdentityRequirement"},"verification":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameModeVerificationConfig"}},"required":["enabled"]},"CloudVersionMatchmakerGameModeJoinConfig":{"type":"object","description":"Configures the requirements and authentication for the /join endpoint. If this value is not set in the config, the /join endpoint is still enabled.","properties":{"enabled":{"type":"boolean","description":"Sets whether or not the /join endpoint is enabled."},"identity_requirement":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameModeIdentityRequirement"},"verification":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameModeVerificationConfig"}},"required":["enabled"]},"CloudVersionMatchmakerGameModeCreateConfig":{"type":"object","description":"Configures the requirements and authentication for the /create endpoint. If this value is not set in the config, the /create endpoint is NOT enabled.","properties":{"enabled":{"type":"boolean","description":"Sets whether or not the /create endpoint is enabled."},"identity_requirement":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameModeIdentityRequirement"},"verification":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameModeVerificationConfig"},"enable_public":{"type":"boolean","description":"Defaults to false when unset."},"enable_private":{"type":"boolean","description":"Defaults to true when unset."},"max_lobbies_per_identity":{"type":"integer","description":"**Deprecated**"}},"required":["enabled"]},"CloudVersionMatchmakerLobbyGroup":{"type":"object","description":"A game mode.","properties":{"name_id":{"type":"string","description":"**Deprecated: use GameMode instead**\nA human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short."},"regions":{"type":"array","items":{"$ref":"#/components/schemas/CloudVersionMatchmakerLobbyGroupRegion"},"description":"A list of game mode regions."},"max_players_normal":{"type":"integer","description":"Unsigned 32 bit integer."},"max_players_direct":{"type":"integer","description":"Unsigned 32 bit integer."},"max_players_party":{"type":"integer","description":"Unsigned 32 bit integer."},"runtime":{"$ref":"#/components/schemas/CloudVersionMatchmakerLobbyGroupRuntime"}},"required":["name_id","regions","max_players_normal","max_players_direct","max_players_party","runtime"]},"CloudVersionMatchmakerLobbyGroupRuntime":{"type":"object","description":"**Deprecated: use GameMode instead**\nA union representing the runtime a game mode runs on.","properties":{"docker":{"$ref":"#/components/schemas/CloudVersionMatchmakerLobbyGroupRuntimeDocker"}}},"CloudVersionMatchmakerLobbyGroupRegion":{"type":"object","description":"**Deprecated: use GameMode instead**\nA game mode region.","properties":{"region_id":{"type":"string","format":"uuid"},"tier_name_id":{"type":"string","description":"A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short."},"idle_lobbies":{"$ref":"#/components/schemas/CloudVersionMatchmakerLobbyGroupIdleLobbiesConfig"}},"required":["region_id","tier_name_id"]},"CloudVersionMatchmakerLobbyGroupRuntimeDocker":{"type":"object","description":"**Deprecated: use GameMode instead**\nA game mode runtime running through Docker.","properties":{"build_id":{"type":"string","format":"uuid"},"args":{"type":"array","items":{"type":"string"}},"env_vars":{"type":"array","items":{"$ref":"#/components/schemas/CloudVersionMatchmakerLobbyGroupRuntimeDockerEnvVar"}},"network_mode":{"$ref":"#/components/schemas/CloudVersionMatchmakerNetworkMode"},"ports":{"type":"array","items":{"$ref":"#/components/schemas/CloudVersionMatchmakerLobbyGroupRuntimeDockerPort"}}},"required":["args","env_vars","ports"]},"CloudVersionMatchmakerLobbyGroupRuntimeDockerEnvVar":{"type":"object","description":"**Deprecated: use GameMode instead**\nA docker environment variable.","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]},"CloudVersionMatchmakerLobbyGroupRuntimeDockerPort":{"type":"object","description":"**Deprecated: use GameMode instead**\nA docker port.","properties":{"label":{"type":"string","description":"The label of this docker port."},"target_port":{"type":"integer","description":"The port number to connect to."},"port_range":{"$ref":"#/components/schemas/CloudVersionMatchmakerPortRange"},"proxy_protocol":{"$ref":"#/components/schemas/CloudVersionMatchmakerPortProtocol"}},"required":["label","proxy_protocol"]},"CloudVersionMatchmakerLobbyGroupIdleLobbiesConfig":{"type":"object","description":"**Deprecated: use GameMode instead**\nConfiguration for how many idle lobbies a game version should have.","properties":{"min_idle_lobbies":{"type":"integer","description":"Unsigned 32 bit integer."},"max_idle_lobbies":{"type":"integer","description":"Unsigned 32 bit integer."}},"required":["min_idle_lobbies","max_idle_lobbies"]},"Identifier":{"type":"string","description":"A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short."},"Bio":{"type":"string","description":"Follows regex ^(?:[^\\n\\r]+\\n?|\\n){1,5}$"},"Email":{"type":"string","description":"A valid email address"},"Jwt":{"type":"string","description":"Documentation at https://jwt.io/"},"WatchQuery":{"type":"string","description":"A query parameter denoting the requests watch index."},"WatchResponse":{"type":"object","description":"Provided by watchable endpoints used in blocking loops.","properties":{"index":{"type":"string","description":"Index indicating the version of the data responded.\nPass this to `WatchQuery` to block and wait for the next response."}},"required":["index"]},"DisplayName":{"type":"string","description":"Represent a resource's readable display name."},"AccountNumber":{"type":"integer"},"Timestamp":{"type":"string","format":"date-time","description":"RFC3339 timestamp"},"GlobalEventNotification":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"thumbnail_url":{"type":"string"},"url":{"type":"string"}},"required":["title","description","thumbnail_url","url"]},"ValidationError":{"type":"object","description":"An error given by failed content validation.","properties":{"path":{"type":"array","items":{"type":"string"},"description":"A list of strings denoting the origin of a validation error."}},"required":["path"]},"EmptyObject":{"type":"object","properties":{}},"ErrorMetadata":{"description":"Unstructured metadata relating to an error. Must be manually parsed."},"ErrorBody":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"ray_id":{"type":"string"},"documentation":{"type":"string"},"metadata":{"$ref":"#/components/schemas/ErrorMetadata"}},"required":["code","message","ray_id"]},"Pagination":{"type":"object","properties":{"cursor":{"type":"string"}}},"GameHandle":{"type":"object","properties":{"game_id":{"type":"string","format":"uuid"},"name_id":{"$ref":"#/components/schemas/Identifier"},"display_name":{"$ref":"#/components/schemas/DisplayName"},"logo_url":{"type":"string","description":"The URL of this game's logo image."},"banner_url":{"type":"string","description":"The URL of this game's banner image."}},"required":["game_id","name_id","display_name"]},"GameGameSummary":{"type":"object","properties":{"game_id":{"type":"string","format":"uuid"},"name_id":{"$ref":"#/components/schemas/Identifier"},"display_name":{"$ref":"#/components/schemas/DisplayName"},"logo_url":{"type":"string","description":"The URL of this game's logo image."},"banner_url":{"type":"string","description":"The URL of this game's banner image."},"url":{"type":"string"},"developer":{"$ref":"#/components/schemas/GroupHandle"},"total_player_count":{"type":"integer","description":"Unsigned 32 bit integer."}},"required":["game_id","name_id","display_name","url","developer","total_player_count"]},"GameProfile":{"type":"object","description":"A game profile.","properties":{"game_id":{"type":"string","format":"uuid"},"name_id":{"type":"string","description":"A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short."},"display_name":{"$ref":"#/components/schemas/DisplayName"},"logo_url":{"type":"string","description":"The URL of this game's logo image."},"banner_url":{"type":"string","description":"The URL of this game's banner image."},"url":{"type":"string","description":"The URL to this game's website."},"developer":{"$ref":"#/components/schemas/GroupGroupSummary"},"tags":{"type":"array","items":{"type":"string"},"description":"A list of game tags."},"description":{"type":"string","description":"A description of the given game."},"platforms":{"type":"array","items":{"$ref":"#/components/schemas/GamePlatformLink"},"description":"A list of platform links."},"recommended_groups":{"type":"array","items":{"$ref":"#/components/schemas/GroupGroupSummary"},"description":"A list of group summaries."},"identity_leaderboard_categories":{"type":"array","items":{"$ref":"#/components/schemas/GameLeaderboardCategory"},"description":"A list of game leaderboard categories."},"group_leaderboard_categories":{"type":"array","items":{"$ref":"#/components/schemas/GameLeaderboardCategory"},"description":"A list of game leaderboard categories."}},"required":["game_id","name_id","display_name","url","developer","tags","description","platforms","recommended_groups","identity_leaderboard_categories","group_leaderboard_categories"]},"GamePlatformLink":{"type":"object","description":"A platform link denoting a supported platform.","properties":{"display_name":{"$ref":"#/components/schemas/DisplayName"},"url":{"type":"string","description":"The URL to the given game's method of distribution on this platform."}},"required":["display_name","url"]},"GameLeaderboardCategory":{"type":"object","description":"A game leaderboard category.","properties":{"display_name":{"$ref":"#/components/schemas/DisplayName"}},"required":["display_name"]},"GameStatSummary":{"type":"object","description":"A game statistic summary.","properties":{"game":{"$ref":"#/components/schemas/GameHandle"},"stats":{"type":"array","items":{"$ref":"#/components/schemas/GameStat"}}},"required":["game","stats"]},"GameStat":{"type":"object","description":"A game statistic.","properties":{"config":{"$ref":"#/components/schemas/GameStatConfig"},"overall_value":{"type":"number","format":"double","description":"A single overall value of the given statistic."}},"required":["config","overall_value"]},"GameStatConfig":{"type":"object","description":"A game statistic config.","properties":{"record_id":{"type":"string","format":"uuid"},"icon_id":{"type":"string","format":"uuid"},"format":{"$ref":"#/components/schemas/GameStatFormatMethod"},"aggregation":{"$ref":"#/components/schemas/GameStatAggregationMethod"},"sorting":{"$ref":"#/components/schemas/GameStatSortingMethod"},"priority":{"type":"integer"},"display_name":{"$ref":"#/components/schemas/DisplayName"},"postfix_singular":{"type":"string","description":"A string appended to the end of a singular game statistic's value. Example: 1 **dollar**."},"postfix_plural":{"type":"string","description":"A string appended to the end of a game statistic's value that is not exactly 1. Example: 45 **dollars**."},"prefix_singular":{"type":"string","description":"A string appended to the beginning of a singular game statistic's value. Example: **value** 1."},"prefix_plural":{"type":"string","description":"A string prepended to the beginning of a game statistic's value that is not exactly 1. Example: **values** 45."}},"required":["record_id","icon_id","format","aggregation","sorting","priority","display_name"]},"GameStatFormatMethod":{"type":"string","enum":["integer","float_1","float_2","float_3","duration_minute","duration_second","duration_hundredth_second"],"description":"A value denoting the format method of a game statistic."},"GameStatAggregationMethod":{"type":"string","enum":["sum","average","min","max"],"description":"A value denoting the aggregation method of a game statistic."},"GameStatSortingMethod":{"type":"string","enum":["desc","asc"],"description":"A value denoting the sorting method of a game statistic."},"GamesEnvironmentsCreateServiceTokenResponse":{"type":"object","properties":{"token":{"type":"string","description":"A JSON Web Token."}},"required":["token"]},"GeoCoord":{"type":"object","description":"Geographical coordinates for a location on Planet Earth.","properties":{"latitude":{"type":"number","format":"double"},"longitude":{"type":"number","format":"double"}},"required":["latitude","longitude"]},"GeoDistance":{"type":"object","description":"Distance available in multiple units.","properties":{"kilometers":{"type":"number","format":"double"},"miles":{"type":"number","format":"double"}},"required":["kilometers","miles"]},"GroupGroupSummary":{"type":"object","properties":{"group_id":{"type":"string","format":"uuid"},"display_name":{"$ref":"#/components/schemas/DisplayName"},"avatar_url":{"type":"string","description":"The URL of this group's avatar image."},"external":{"$ref":"#/components/schemas/GroupExternalLinks"},"is_developer":{"type":"boolean","description":"**Deprecated**\nWhether or not this group is a developer."},"bio":{"$ref":"#/components/schemas/Bio"},"is_current_identity_member":{"type":"boolean","description":"Whether or not the current identity is a member of this group."},"publicity":{"$ref":"#/components/schemas/GroupPublicity"},"member_count":{"type":"integer"},"owner_identity_id":{"type":"string","format":"uuid"}},"required":["group_id","display_name","external","is_developer","bio","is_current_identity_member","publicity","member_count","owner_identity_id"]},"GroupPublicity":{"type":"string","enum":["open","closed"],"description":"The current publicity value for the given group."},"GroupHandle":{"type":"object","description":"A group handle.","properties":{"group_id":{"type":"string","format":"uuid"},"display_name":{"$ref":"#/components/schemas/DisplayName"},"avatar_url":{"type":"string","description":"The URL of this group's avatar image"},"external":{"$ref":"#/components/schemas/GroupExternalLinks"},"is_developer":{"type":"boolean","description":"Whether or not this group is a developer group."}},"required":["group_id","display_name","external"]},"GroupExternalLinks":{"type":"object","description":"External links for this group.","properties":{"profile":{"type":"string","description":"A link to this group's profile page."}},"required":["profile"]},"GroupJoinRequest":{"type":"object","description":"A group join request.","properties":{"identity":{"$ref":"#/components/schemas/IdentityHandle"},"ts":{"$ref":"#/components/schemas/Timestamp"}},"required":["identity","ts"]},"GroupMember":{"type":"object","description":"A group member.","properties":{"identity":{"$ref":"#/components/schemas/IdentityHandle"}},"required":["identity"]},"GroupProfile":{"type":"object","description":"A list of group profiles.","properties":{"group_id":{"type":"string","format":"uuid"},"display_name":{"$ref":"#/components/schemas/DisplayName"},"avatar_url":{"type":"string","description":"The URL of this group's avatar image."},"external":{"$ref":"#/components/schemas/GroupExternalLinks"},"is_developer":{"type":"boolean","description":"Whether or not this group is a developer."},"bio":{"type":"string","description":"Detailed information about a profile."},"is_current_identity_member":{"type":"boolean","description":"Whether or not the current identity is a member of this group."},"publicity":{"$ref":"#/components/schemas/GroupPublicity"},"member_count":{"type":"integer","description":"Unsigned 32 bit integer."},"members":{"type":"array","items":{"$ref":"#/components/schemas/GroupMember"},"description":"A list of group members."},"join_requests":{"type":"array","items":{"$ref":"#/components/schemas/GroupJoinRequest"},"description":"A list of group join requests."},"is_current_identity_requesting_join":{"type":"boolean","description":"Whether or not the current identity is currently requesting to join this group."},"owner_identity_id":{"type":"string","format":"uuid"}},"required":["group_id","display_name","external","bio","publicity","members","join_requests","owner_identity_id"]},"GroupBannedIdentity":{"type":"object","description":"A banned identity.","properties":{"identity":{"$ref":"#/components/schemas/IdentityHandle"},"ban_ts":{"$ref":"#/components/schemas/Timestamp"}},"required":["identity","ban_ts"]},"GroupGetInviteResponse":{"type":"object","properties":{"group":{"$ref":"#/components/schemas/GroupHandle"}},"required":["group"]},"GroupConsumeInviteResponse":{"type":"object","properties":{"group_id":{"type":"string","format":"uuid"}}},"GroupCreateInviteRequest":{"type":"object","properties":{"ttl":{"type":"number","format":"double","description":"How long until the group invite expires (in milliseconds)."},"use_count":{"type":"number","format":"double","description":"How many times the group invite can be used."}}},"GroupCreateInviteResponse":{"type":"object","properties":{"code":{"type":"string","description":"The code that will be passed to `rivet.api.group#ConsumeInvite` to join a group."}},"required":["code"]},"GroupResolveJoinRequestRequest":{"type":"object","properties":{"resolution":{"type":"boolean"}}},"IdentityListActivitiesResponse":{"type":"object","properties":{"identities":{"type":"array","items":{"$ref":"#/components/schemas/IdentityHandle"}},"games":{"type":"array","items":{"$ref":"#/components/schemas/GameGameSummary"}},"suggested_groups":{"type":"array","items":{"$ref":"#/components/schemas/GroupGroupSummary"}},"suggested_players":{"type":"array","items":{"$ref":"#/components/schemas/IdentityHandle"}},"watch":{"$ref":"#/components/schemas/WatchResponse"}},"required":["identities","games","suggested_groups","suggested_players","watch"]},"IdentityGlobalEvent":{"type":"object","description":"An event relevant to the current identity.","properties":{"ts":{"$ref":"#/components/schemas/Timestamp"},"kind":{"$ref":"#/components/schemas/IdentityGlobalEventKind"},"notification":{"$ref":"#/components/schemas/IdentityGlobalEventNotification"}},"required":["ts","kind"]},"IdentityGlobalEventKind":{"type":"object","properties":{"identity_update":{"$ref":"#/components/schemas/IdentityGlobalEventIdentityUpdate"}}},"IdentityGlobalEventNotification":{"type":"object","description":"Notifications represent information that should be presented to the user\nimmediately.\nAt the moment, only chat message events have associated notifications.\n\n# Display\n\nNotifications should be displayed in an unobtrusive manner throughout the\nentire game. Notifications should disappear after a few seconds if not\ninteracted with.\n\n# Interactions\n\nIf your platform supports it, notifications should be able to be clicked or\ntapped in order to open the relevant context for the event.\nFor a simple implementation of notification interactions, open `url` in a\nweb browser to present the relevant context. For example, a chat message\nnotification will open the thread the chat message was sent in.\nFor advanced implementations that implement a custom chat UI, use\n`GlobalEvent.kind` to determine what action to take when the notification is interacted with.\nFor example, if the global event kind is `GlobalEventChatMessage`, then open\nthe chat UI for the given thread.","properties":{"title":{"type":"string"},"description":{"type":"string"},"thumbnail_url":{"type":"string","description":"URL to an image thumbnail that should be shown for this notification."},"url":{"type":"string","description":"Rivet Hub URL that holds the relevant context for this notification."}},"required":["title","description","thumbnail_url","url"]},"IdentityGlobalEventIdentityUpdate":{"type":"object","properties":{"identity":{"$ref":"#/components/schemas/IdentityProfile"}},"required":["identity"]},"IdentityUpdateGameActivity":{"type":"object","description":"Information about the identity's current game. This is information that all other identities can see about what the current identity is doing.","properties":{"message":{"type":"string","description":"A short message about the current game activity."},"public_metadata":{"description":"JSON data seen by anyone."},"mutual_metadata":{"description":"JSON data seen only by the given identity and their mutual followers."}}},"IdentityHandle":{"type":"object","description":"An identity handle.","properties":{"identity_id":{"type":"string","format":"uuid"},"display_name":{"$ref":"#/components/schemas/DisplayName"},"account_number":{"$ref":"#/components/schemas/AccountNumber"},"avatar_url":{"type":"string","description":"The URL of this identity's avatar image."},"is_registered":{"type":"boolean","description":"Whether or not this identity is registered with a linked account."},"external":{"$ref":"#/components/schemas/IdentityExternalLinks"}},"required":["identity_id","display_name","account_number","avatar_url","is_registered","external"]},"IdentitySummary":{"type":"object","description":"An identity summary.","properties":{"identity_id":{"type":"string","format":"uuid"},"display_name":{"$ref":"#/components/schemas/DisplayName"},"account_number":{"$ref":"#/components/schemas/AccountNumber"},"avatar_url":{"type":"string","description":"The URL of this identity's avatar image."},"is_registered":{"type":"boolean","description":"Whether or not this identity is registered with a linked account."},"external":{"$ref":"#/components/schemas/IdentityExternalLinks"},"following":{"type":"boolean","description":"Whether or not the requestee's identity is following this identity."},"is_following_me":{"type":"boolean","description":"Whether or not this identity is both following and is followed by the requestee's identity."},"is_mutual_following":{"type":"boolean"}},"required":["identity_id","display_name","account_number","avatar_url","is_registered","external","following","is_following_me","is_mutual_following"]},"IdentityProfile":{"type":"object","description":"An identity profile.","properties":{"identity_id":{"type":"string","format":"uuid"},"display_name":{"$ref":"#/components/schemas/DisplayName"},"account_number":{"$ref":"#/components/schemas/AccountNumber"},"avatar_url":{"type":"string","description":"The URL of this identity's avatar image."},"is_registered":{"type":"boolean","description":"Whether or not this identity is registered with a linked account."},"external":{"$ref":"#/components/schemas/IdentityExternalLinks"},"is_admin":{"type":"boolean","description":"Whether or not this identity is an admin."},"is_game_linked":{"type":"boolean","description":"Whether or not this game user has been linked through the Rivet dashboard."},"dev_state":{"$ref":"#/components/schemas/IdentityDevState","description":"**Deprecated**"},"follower_count":{"type":"integer","format":"int64"},"following_count":{"type":"integer","format":"int64"},"following":{"type":"boolean","description":"Whether or not the requestee's identity is following this identity."},"is_following_me":{"type":"boolean","description":"Whether or not this identity is both following and is followed by the requestee's identity."},"is_mutual_following":{"type":"boolean"},"join_ts":{"$ref":"#/components/schemas/Timestamp"},"bio":{"$ref":"#/components/schemas/Bio"},"linked_accounts":{"type":"array","items":{"$ref":"#/components/schemas/IdentityLinkedAccount"}},"groups":{"type":"array","items":{"$ref":"#/components/schemas/IdentityGroup"}},"games":{"type":"array","items":{"$ref":"#/components/schemas/GameStatSummary"}},"awaiting_deletion":{"type":"boolean","description":"Whether or not this identity is awaiting account deletion. Only visible to when the requestee is\nthis identity."}},"required":["identity_id","display_name","account_number","avatar_url","is_registered","external","is_admin","follower_count","following_count","following","is_following_me","is_mutual_following","join_ts","bio","linked_accounts","groups","games"]},"IdentityExternalLinks":{"type":"object","description":"External links for an identity.","properties":{"profile":{"type":"string","description":"A link to this identity's profile page."},"settings":{"type":"string","description":"A link to the Rivet settings page."}},"required":["profile"]},"IdentityStatus":{"type":"string","enum":["online","away","offline"],"description":"The current status of an identity. This helps players understand if another player is currently playing or has their game in the background."},"IdentityGameActivity":{"type":"object","description":"The game an identity is currently participating in.","properties":{"game":{"$ref":"#/components/schemas/GameHandle"},"message":{"type":"string","description":"A short activity message about the current game activity."},"public_metadata":{"description":"JSON data seen by anyone."},"mutual_metadata":{"description":"JSON data seen only by the given identity and their mutual followers."}},"required":["game","message"]},"IdentityGroup":{"type":"object","description":"A group that the given identity.","properties":{"group":{"$ref":"#/components/schemas/GroupHandle"}},"required":["group"]},"IdentityLinkedAccount":{"type":"object","description":"A union representing an identity's linked accounts.","properties":{"email":{"$ref":"#/components/schemas/IdentityEmailLinkedAccount"},"default_user":{"type":"boolean"}}},"IdentityEmailLinkedAccount":{"type":"object","description":"An identity's linked email.","properties":{"email":{"$ref":"#/components/schemas/Email"}},"required":["email"]},"IdentityDevState":{"type":"string","enum":["inactive","pending","accepted"],"description":"The state of the given identity's developer status."},"IdentityGameLinkStatus":{"type":"string","enum":["incomplete","complete","cancelled"]},"IdentityWatchEventsResponse":{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/IdentityGlobalEvent"}},"watch":{"$ref":"#/components/schemas/WatchResponse"}},"required":["events","watch"]},"MatchmakerLobbyInfo":{"type":"object","description":"A public lobby in the lobby list.","properties":{"region_id":{"type":"string"},"game_mode_id":{"type":"string"},"lobby_id":{"type":"string","format":"uuid"},"max_players_normal":{"type":"integer"},"max_players_direct":{"type":"integer"},"max_players_party":{"type":"integer"},"total_player_count":{"type":"integer"},"state":{}},"required":["region_id","game_mode_id","lobby_id","max_players_normal","max_players_direct","max_players_party","total_player_count"]},"MatchmakerGameModeInfo":{"type":"object","description":"A game mode that the player can join.","properties":{"game_mode_id":{"$ref":"#/components/schemas/Identifier"}},"required":["game_mode_id"]},"MatchmakerRegionInfo":{"type":"object","description":"A region that the player can connect to.","properties":{"region_id":{"$ref":"#/components/schemas/Identifier"},"provider_display_name":{"$ref":"#/components/schemas/DisplayName"},"region_display_name":{"$ref":"#/components/schemas/DisplayName"},"datacenter_coord":{"$ref":"#/components/schemas/GeoCoord"},"datacenter_distance_from_client":{"$ref":"#/components/schemas/GeoDistance"}},"required":["region_id","provider_display_name","region_display_name","datacenter_coord","datacenter_distance_from_client"]},"MatchmakerJoinLobby":{"type":"object","description":"A matchmaker lobby.","properties":{"lobby_id":{"type":"string","format":"uuid"},"region":{"$ref":"#/components/schemas/MatchmakerJoinRegion"},"ports":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/MatchmakerJoinPort"},"description":"**Deprecated**"},"player":{"$ref":"#/components/schemas/MatchmakerJoinPlayer","description":"**Deprecated**"}},"required":["lobby_id","region","ports","player"]},"MatchmakerJoinRegion":{"type":"object","description":"A matchmaker lobby region.","properties":{"region_id":{"$ref":"#/components/schemas/Identifier"},"display_name":{"$ref":"#/components/schemas/DisplayName"}},"required":["region_id","display_name"]},"MatchmakerJoinPort":{"type":"object","properties":{"host":{"type":"string","description":"The host for the given port. Will be null if using a port range."},"hostname":{"type":"string"},"port":{"type":"integer","description":"The port number for this lobby. Will be null if using a port range."},"port_range":{"$ref":"#/components/schemas/MatchmakerJoinPortRange"},"is_tls":{"type":"boolean","description":"Whether or not this lobby port uses TLS. You cannot mix a non-TLS and TLS ports."}},"required":["hostname","is_tls"]},"MatchmakerJoinPortRange":{"type":"object","description":"Inclusive range of ports that can be connected to.","properties":{"min":{"type":"integer","description":"Minimum port that can be connected to. Inclusive range."},"max":{"type":"integer","description":"Maximum port that can be connected to. Inclusive range."}},"required":["min","max"]},"MatchmakerJoinPlayer":{"type":"object","description":"A matchmaker lobby player.","properties":{"token":{"$ref":"#/components/schemas/Jwt","description":"Pass this token through the socket to the lobby server. The lobby server will validate this token with `PlayerConnected.player_token`"}},"required":["token"]},"MatchmakerCustomLobbyPublicity":{"type":"string","enum":["public","private"]},"MatchmakerFindLobbyResponse":{"type":"object","properties":{"lobby":{"$ref":"#/components/schemas/MatchmakerJoinLobby"},"ports":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/MatchmakerJoinPort"}},"player":{"$ref":"#/components/schemas/MatchmakerJoinPlayer"}},"required":["lobby","ports","player"]},"MatchmakerJoinLobbyResponse":{"type":"object","properties":{"lobby":{"$ref":"#/components/schemas/MatchmakerJoinLobby"},"ports":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/MatchmakerJoinPort"}},"player":{"$ref":"#/components/schemas/MatchmakerJoinPlayer"}},"required":["lobby","ports","player"]},"MatchmakerCreateLobbyResponse":{"type":"object","properties":{"lobby":{"$ref":"#/components/schemas/MatchmakerJoinLobby"},"ports":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/MatchmakerJoinPort"}},"player":{"$ref":"#/components/schemas/MatchmakerJoinPlayer"}},"required":["lobby","ports","player"]},"MatchmakerListLobbiesResponse":{"type":"object","properties":{"game_modes":{"type":"array","items":{"$ref":"#/components/schemas/MatchmakerGameModeInfo"}},"regions":{"type":"array","items":{"$ref":"#/components/schemas/MatchmakerRegionInfo"}},"lobbies":{"type":"array","items":{"$ref":"#/components/schemas/MatchmakerLobbyInfo"}}},"required":["game_modes","regions","lobbies"]},"MatchmakerGetStatisticsResponse":{"type":"object","properties":{"player_count":{"type":"integer","format":"int64"},"game_modes":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/MatchmakerGameModeStatistics"}}},"required":["player_count","game_modes"]},"MatchmakerGameModeStatistics":{"type":"object","properties":{"player_count":{"type":"integer","format":"int64"},"regions":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/MatchmakerRegionStatistics"}}},"required":["player_count","regions"]},"MatchmakerRegionStatistics":{"type":"object","properties":{"player_count":{"type":"integer","format":"int64"}},"required":["player_count"]},"MatchmakerListRegionsResponse":{"type":"object","properties":{"regions":{"type":"array","items":{"$ref":"#/components/schemas/MatchmakerRegionInfo"}}},"required":["regions"]},"PortalNotificationRegisterService":{"type":"object","properties":{"firebase":{"$ref":"#/components/schemas/PortalNotificationRegisterFirebaseService"}}},"PortalNotificationRegisterFirebaseService":{"type":"object","properties":{"access_key":{"type":"string"}},"required":["access_key"]},"PortalNotificationUnregisterService":{"type":"string","enum":["firebase"]},"PortalGetSuggestedGamesResponse":{"type":"object","properties":{"games":{"type":"array","items":{"$ref":"#/components/schemas/GameGameSummary"},"description":"A list of game summaries."},"watch":{"$ref":"#/components/schemas/WatchResponse"}},"required":["games","watch"]},"PortalGetGameProfileResponse":{"type":"object","properties":{"game":{"$ref":"#/components/schemas/GameProfile"},"watch":{"$ref":"#/components/schemas/WatchResponse"}},"required":["game","watch"]},"ProvisionPoolType":{"type":"string","enum":["job","gg","ats","pegboard","pegboard_isolate","fdb","worker","nats","guard"]},"ProvisionServer":{"type":"object","properties":{"server_id":{"type":"string","format":"uuid"},"datacenter_id":{"type":"string","format":"uuid"},"pool_type":{"$ref":"#/components/schemas/ProvisionPoolType"},"lan_ip":{"type":"string"},"wan_ip":{"type":"string"}},"required":["server_id","datacenter_id","pool_type"]},"RegionsRegion":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"RoutesRouteTargetActors":{"type":"object","description":"Configuration for targeting actors.","properties":{"selector_tags":{"type":"object","additionalProperties":{"type":"string"},"description":"Tags of actors to route requests to."}},"required":["selector_tags"]},"RoutesRouteTarget":{"type":"object","properties":{"actors":{"$ref":"#/components/schemas/RoutesRouteTargetActors","description":"Configuration for targeting actors."}}},"RoutesRoute":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"$ref":"#/components/schemas/Timestamp"},"updated_at":{"$ref":"#/components/schemas/Timestamp"},"hostname":{"type":"string"},"path":{"type":"string"},"route_subpaths":{"type":"boolean","description":"Whether to route all subpaths of this path"},"strip_prefix":{"type":"boolean","description":"Whether to remove the path prefix before sending the request to the target."},"target":{"$ref":"#/components/schemas/RoutesRouteTarget"}},"required":["id","created_at","updated_at","hostname","path","route_subpaths","strip_prefix","target"]},"ServersGetBuildResponse":{"type":"object","properties":{"build":{"$ref":"#/components/schemas/ServersBuild"}},"required":["build"]},"ServersListBuildsResponse":{"type":"object","properties":{"builds":{"type":"array","items":{"$ref":"#/components/schemas/ServersBuild"},"description":"A list of builds for the game associated with the token."}},"required":["builds"]},"ServersPatchBuildTagsRequest":{"type":"object","properties":{"tags":{},"exclusive_tags":{"type":"array","items":{"type":"string"},"description":"Removes the given tag keys from all other builds."}},"required":["tags"]},"ServersPatchBuildTagsResponse":{"type":"object","properties":{}},"ServersCreateBuildRequest":{"type":"object","properties":{"name":{"type":"string"},"image_tag":{"type":"string","description":"A tag given to the game build."},"image_file":{"$ref":"#/components/schemas/UploadPrepareFile"},"multipart_upload":{"type":"boolean"},"kind":{"$ref":"#/components/schemas/ServersBuildKind"},"compression":{"$ref":"#/components/schemas/ServersBuildCompression"},"prewarm_datacenters":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["name","image_tag","image_file"]},"ServersCreateBuildResponse":{"type":"object","properties":{"build":{"type":"string","format":"uuid"},"image_presigned_request":{"$ref":"#/components/schemas/UploadPresignedRequest"},"image_presigned_requests":{"type":"array","items":{"$ref":"#/components/schemas/UploadPresignedRequest"}}},"required":["build"]},"ServersBuildKind":{"type":"string","enum":["docker_image","oci_bundle"]},"ServersBuildCompression":{"type":"string","enum":["none","lz4"]},"ServersServer":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"environment":{"type":"string","format":"uuid"},"datacenter":{"type":"string","format":"uuid"},"tags":{},"runtime":{"$ref":"#/components/schemas/ServersRuntime"},"network":{"$ref":"#/components/schemas/ServersNetwork"},"resources":{"$ref":"#/components/schemas/ServersResources"},"lifecycle":{"$ref":"#/components/schemas/ServersLifecycle"},"created_at":{"type":"integer","format":"int64"},"started_at":{"type":"integer","format":"int64"},"destroyed_at":{"type":"integer","format":"int64"}},"required":["id","environment","datacenter","tags","runtime","network","resources","lifecycle","created_at"]},"ServersRuntime":{"type":"object","properties":{"build":{"type":"string","format":"uuid"},"arguments":{"type":"array","items":{"type":"string"}},"environment":{"type":"object","additionalProperties":{"type":"string"}}},"required":["build"]},"ServersLifecycle":{"type":"object","properties":{"kill_timeout":{"type":"integer","format":"int64","description":"The duration to wait for in milliseconds before killing the server. This should be set to a safe default, and can be overridden during a DELETE request if needed."}}},"ServersResources":{"type":"object","properties":{"cpu":{"type":"integer","description":"The number of CPU cores in millicores, or 1/1000 of a core. For example,\n1/8 of a core would be 125 millicores, and 1 core would be 1000\nmillicores."},"memory":{"type":"integer","description":"The amount of memory in megabytes"}},"required":["cpu","memory"]},"ServersNetwork":{"type":"object","properties":{"mode":{"$ref":"#/components/schemas/ServersNetworkMode"},"ports":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ServersPort"}}},"required":["ports"]},"ServersNetworkMode":{"type":"string","enum":["bridge","host"]},"ServersPort":{"type":"object","properties":{"protocol":{"$ref":"#/components/schemas/ServersPortProtocol"},"internal_port":{"type":"integer"},"public_hostname":{"type":"string"},"public_port":{"type":"integer"},"routing":{"$ref":"#/components/schemas/ServersPortRouting"}},"required":["protocol","routing"]},"ServersPortProtocol":{"type":"string","enum":["http","https","tcp","tcp_tls","udp"]},"ServersPortRouting":{"type":"object","properties":{"game_guard":{"$ref":"#/components/schemas/ServersGameGuardRouting"},"host":{"$ref":"#/components/schemas/ServersHostRouting"}}},"ServersGameGuardRouting":{"type":"object","properties":{}},"ServersHostRouting":{"type":"object","properties":{}},"ServersBuild":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"created_at":{"$ref":"#/components/schemas/Timestamp"},"content_length":{"type":"integer","format":"int64","description":"Unsigned 64 bit integer."},"tags":{"type":"object","additionalProperties":{"type":"string"},"description":"Tags of this build"}},"required":["id","name","created_at","content_length","tags"]},"ServersDatacenter":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"name":{"type":"string"}},"required":["id","slug","name"]},"ServersListDatacentersResponse":{"type":"object","properties":{"datacenters":{"type":"array","items":{"$ref":"#/components/schemas/ServersDatacenter"}}},"required":["datacenters"]},"ServersGetServerLogsResponse":{"type":"object","properties":{"lines":{"type":"array","items":{"type":"string"},"description":"Sorted old to new."},"timestamps":{"type":"array","items":{"type":"string"},"description":"Sorted old to new."},"watch":{"$ref":"#/components/schemas/WatchResponse"}},"required":["lines","timestamps","watch"]},"ServersLogStream":{"type":"string","enum":["std_out","std_err"]},"UploadPresignedRequest":{"type":"object","description":"A presigned request used to upload files. Upload your file to the given URL via a PUT request.","properties":{"path":{"type":"string","description":"The name of the file to upload. This is the same as the one given in the upload prepare file."},"url":{"type":"string","description":"The URL of the presigned request for which to upload your file to."},"byte_offset":{"type":"integer","format":"int64","description":"The byte offset for this multipart chunk. Always 0 if not a multipart upload."},"content_length":{"type":"integer","format":"int64","description":"Expected size of this upload."}},"required":["path","url","byte_offset","content_length"]},"UploadPrepareFile":{"type":"object","description":"A file being prepared to upload.","properties":{"path":{"type":"string","description":"The path/filename of the file."},"content_type":{"type":"string","description":"The MIME type of the file."},"content_length":{"type":"integer","format":"int64","description":"Unsigned 64 bit integer."}},"required":["path","content_length"]}}} \ No newline at end of file +{"definitions":{"ActorsGetActorResponse":{"type":"object","properties":{"actor":{"$ref":"#/components/schemas/ActorsActor"}},"required":["actor"]},"ActorsCreateActorRequest":{"type":"object","properties":{"region":{"type":"string"},"tags":{},"build":{"type":"string","format":"uuid"},"build_tags":{},"runtime":{"$ref":"#/components/schemas/ActorsCreateActorRuntimeRequest"},"network":{"$ref":"#/components/schemas/ActorsCreateActorNetworkRequest"},"resources":{"$ref":"#/components/schemas/ActorsResources"},"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":{"$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":{"type":"boolean"}}},"ActorsCreateActorPortRequest":{"type":"object","properties":{"protocol":{"$ref":"#/components/schemas/ActorsPortProtocol"},"internal_port":{"type":"integer"},"routing":{"$ref":"#/components/schemas/ActorsPortRouting"}},"required":["protocol"]},"ActorsCreateActorResponse":{"type":"object","properties":{"actor":{"$ref":"#/components/schemas/ActorsActor","description":"The actor that was created"}},"required":["actor"]},"ActorsDestroyActorResponse":{"type":"object","properties":{}},"ActorsUpgradeActorRequest":{"type":"object","properties":{"build":{"type":"string","format":"uuid"},"build_tags":{}}},"ActorsUpgradeActorResponse":{"type":"object","properties":{}},"ActorsUpgradeAllActorsRequest":{"type":"object","properties":{"tags":{},"build":{"type":"string","format":"uuid"},"build_tags":{}},"required":["tags"]},"ActorsUpgradeAllActorsResponse":{"type":"object","properties":{"count":{"type":"integer","format":"int64"}},"required":["count"]},"ActorsListActorsResponse":{"type":"object","properties":{"actors":{"type":"array","items":{"$ref":"#/components/schemas/ActorsActor"},"description":"A list of actors for the project associated with the token."},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["actors","pagination"]},"ActorsGetActorUsageResponse":{"type":"object","properties":{"metric_names":{"type":"array","items":{"type":"string"}},"metric_attributes":{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}}},"metric_types":{"type":"array","items":{"type":"string"}},"metric_values":{"type":"array","items":{"type":"array","items":{"type":"number","format":"double"}}}},"required":["metric_names","metric_attributes","metric_types","metric_values"]},"ActorsQueryActorsResponse":{"type":"object","properties":{"actors":{"type":"array","items":{"$ref":"#/components/schemas/ActorsActor"},"description":"A list of actors matching the query"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["actors","pagination"]},"BuildsGetBuildResponse":{"type":"object","properties":{"build":{"$ref":"#/components/schemas/BuildsBuild"}},"required":["build"]},"BuildsListBuildsResponse":{"type":"object","properties":{"builds":{"type":"array","items":{"$ref":"#/components/schemas/BuildsBuild"},"description":"A list of builds for the project associated with the token."}},"required":["builds"]},"BuildsPatchBuildTagsRequest":{"type":"object","properties":{"tags":{},"exclusive_tags":{"type":"array","items":{"type":"string"},"description":"**Deprecated**\nRemoves the given tag keys from all other builds."}},"required":["tags"]},"BuildsPatchBuildTagsResponse":{"type":"object","properties":{}},"BuildsPrepareBuildRequest":{"type":"object","properties":{"image_tag":{"type":"string","description":"A tag given to the project build."},"image_file":{"$ref":"#/components/schemas/UploadPrepareFile"},"kind":{"$ref":"#/components/schemas/BuildsBuildKind"},"compression":{"$ref":"#/components/schemas/BuildsBuildCompression"}},"required":["image_file"]},"BuildsPrepareBuildResponse":{"type":"object","properties":{"build":{"type":"string","format":"uuid"},"presigned_requests":{"type":"array","items":{"$ref":"#/components/schemas/UploadPresignedRequest"}}},"required":["build","presigned_requests"]},"BuildsBuildKind":{"type":"string","enum":["docker_image","oci_bundle","javascript"]},"BuildsBuildCompression":{"type":"string","enum":["none","lz4"]},"CloudBootstrapResponse":{"type":"object","properties":{"cluster":{"$ref":"#/components/schemas/CloudBootstrapCluster"},"access":{"$ref":"#/components/schemas/CloudBootstrapAccess"},"domains":{"$ref":"#/components/schemas/CloudBootstrapDomains"},"origins":{"$ref":"#/components/schemas/CloudBootstrapOrigins"},"captcha":{"$ref":"#/components/schemas/CloudBootstrapCaptcha"},"login_methods":{"$ref":"#/components/schemas/CloudBootstrapLoginMethods"},"deploy_hash":{"type":"string"}},"required":["cluster","access","domains","origins","captcha","login_methods","deploy_hash"]},"CloudBootstrapCluster":{"type":"string","enum":["enterprise","oss"],"description":"The type of cluster that the backend is currently running."},"CloudBootstrapAccess":{"type":"string","enum":["public","private","development"]},"CloudBootstrapDomains":{"type":"object","description":"Domains that host parts of Rivet","properties":{"cdn":{"type":"string"},"job":{"type":"string"},"main":{"type":"string"},"opengb":{"type":"string"}}},"CloudBootstrapOrigins":{"type":"object","description":"Origins used to build URLs from","properties":{"hub":{"type":"string"}},"required":["hub"]},"CloudBootstrapCaptcha":{"type":"object","properties":{"turnstile":{"$ref":"#/components/schemas/CloudBootstrapCaptchaTurnstile"}}},"CloudBootstrapCaptchaTurnstile":{"type":"object","properties":{"site_key":{"type":"string"}},"required":["site_key"]},"CloudBootstrapLoginMethods":{"type":"object","properties":{"email":{"type":"boolean"},"access_token":{"type":"boolean"}},"required":["email"]},"CloudGamesGetGamesResponse":{"type":"object","properties":{"games":{"type":"array","items":{"$ref":"#/components/schemas/GameGameSummary"},"description":"A list of game summaries."},"groups":{"type":"array","items":{"$ref":"#/components/schemas/GroupGroupSummary"},"description":"A list of group summaries."},"watch":{"$ref":"#/components/schemas/WatchResponse"}},"required":["games","groups","watch"]},"CloudGamesCreateGameRequest":{"type":"object","properties":{"name_id":{"$ref":"#/components/schemas/Identifier","description":"**Deprecated**"},"display_name":{"$ref":"#/components/schemas/DisplayName"},"developer_group_id":{"type":"string","format":"uuid"}},"required":["display_name","developer_group_id"]},"CloudGamesCreateGameResponse":{"type":"object","properties":{"game_id":{"type":"string","format":"uuid"}},"required":["game_id"]},"CloudGamesValidateGameRequest":{"type":"object","properties":{"display_name":{"$ref":"#/components/schemas/DisplayName"},"name_id":{"$ref":"#/components/schemas/Identifier","description":"**Deprecated**"}},"required":["display_name"]},"CloudGamesValidateGameResponse":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/ValidationError"},"description":"A list of validation errors."}},"required":["errors"]},"CloudGamesGetGameByIdResponse":{"type":"object","properties":{"game":{"$ref":"#/components/schemas/CloudGameFull"},"watch":{"$ref":"#/components/schemas/WatchResponse"}},"required":["game","watch"]},"CloudGamesGameBannerUploadPrepareRequest":{"type":"object","properties":{"path":{"type":"string","description":"The path/filename of the game banner."},"mime":{"type":"string","description":"The MIME type of the game banner."},"content_length":{"type":"integer","format":"int64","description":"Unsigned 64 bit integer."}},"required":["path","content_length"]},"CloudGamesGameBannerUploadPrepareResponse":{"type":"object","properties":{"upload_id":{"type":"string","format":"uuid"},"presigned_request":{"$ref":"#/components/schemas/UploadPresignedRequest"}},"required":["upload_id","presigned_request"]},"CloudGamesGameLogoUploadPrepareRequest":{"type":"object","properties":{"path":{"type":"string","description":"The path/filename of the game logo."},"mime":{"type":"string","description":"The MIME type of the game logo."},"content_length":{"type":"integer","format":"int64","description":"Unsigned 64 bit integer."}},"required":["path","content_length"]},"CloudGamesGameLogoUploadPrepareResponse":{"type":"object","properties":{"upload_id":{"type":"string","format":"uuid"},"presigned_request":{"$ref":"#/components/schemas/UploadPresignedRequest"}},"required":["upload_id","presigned_request"]},"CloudGamesNamespacesInspectResponse":{"type":"object","properties":{"agent":{"$ref":"#/components/schemas/CloudAuthAgent"}},"required":["agent"]},"CloudGamesNamespacesCreateGameNamespaceRequest":{"type":"object","properties":{"display_name":{"$ref":"#/components/schemas/DisplayName"},"version_id":{"type":"string","format":"uuid"},"name_id":{"type":"string","description":"A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short."}},"required":["display_name","version_id","name_id"]},"CloudGamesNamespacesCreateGameNamespaceResponse":{"type":"object","properties":{"namespace_id":{"type":"string","format":"uuid"}},"required":["namespace_id"]},"CloudGamesNamespacesValidateGameNamespaceRequest":{"type":"object","properties":{"display_name":{"$ref":"#/components/schemas/DisplayName"},"name_id":{"type":"string","description":"A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short."}},"required":["display_name","name_id"]},"CloudGamesNamespacesValidateGameNamespaceResponse":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/ValidationError"},"description":"A list of validation errors."}},"required":["errors"]},"CloudGamesNamespacesGetGameNamespaceByIdResponse":{"type":"object","properties":{"namespace":{"$ref":"#/components/schemas/CloudNamespaceFull"}},"required":["namespace"]},"CloudGamesNamespacesUpdateNamespaceCdnAuthUserRequest":{"type":"object","properties":{"user":{"type":"string","description":"A user name."},"password":{"type":"string","description":"A bcrypt encrypted password. An error is returned if the given string is not properly encrypted."}},"required":["user","password"]},"CloudGamesNamespacesSetNamespaceCdnAuthTypeRequest":{"type":"object","properties":{"auth_type":{"$ref":"#/components/schemas/CloudCdnAuthType"}},"required":["auth_type"]},"CloudGamesNamespacesToggleNamespaceDomainPublicAuthRequest":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether or not to enable authentication based on domain."}},"required":["enabled"]},"CloudGamesNamespacesAddNamespaceDomainRequest":{"type":"object","properties":{"domain":{"type":"string","description":"A valid domain name (no protocol)."}},"required":["domain"]},"CloudGamesNamespacesUpdateGameNamespaceMatchmakerConfigRequest":{"type":"object","properties":{"lobby_count_max":{"type":"integer","description":"Unsigned 32 bit integer."},"max_players":{"type":"integer","description":"Unsigned 32 bit integer."}},"required":["lobby_count_max","max_players"]},"CloudGamesNamespacesGetGameNamespaceVersionHistoryResponse":{"type":"object","properties":{"versions":{"type":"array","items":{"$ref":"#/components/schemas/CloudNamespaceVersion"},"description":"A list of previously deployed namespace versions."}},"required":["versions"]},"CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigRequest":{"type":"object","properties":{"lobby_count_max":{"type":"integer","description":"Unsigned 32 bit integer."},"max_players":{"type":"integer","description":"Unsigned 32 bit integer."}},"required":["lobby_count_max","max_players"]},"CloudGamesNamespacesValidateGameNamespaceMatchmakerConfigResponse":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/ValidationError"},"description":"A list of validation errors."}},"required":["errors"]},"CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentRequest":{"type":"object","properties":{"hostname":{"type":"string","description":"The hostname used for the token."},"ports":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CloudMatchmakerDevelopmentPort"}},"lobby_ports":{"type":"array","items":{"$ref":"#/components/schemas/CloudVersionMatchmakerLobbyGroupRuntimeDockerPort"},"description":"**Deprecated**\nA list of docker ports."}},"required":["hostname"]},"CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentResponse":{"type":"object","properties":{"token":{"type":"string","description":"A JSON Web Token.\nSlightly modified to include a description prefix and use Protobufs of\nJSON."}},"required":["token"]},"CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentRequest":{"type":"object","properties":{"hostname":{"type":"string"},"lobby_ports":{"type":"array","items":{"$ref":"#/components/schemas/CloudVersionMatchmakerLobbyGroupRuntimeDockerPort"},"description":"A list of docker ports."}},"required":["hostname","lobby_ports"]},"CloudGamesNamespacesValidateGameNamespaceTokenDevelopmentResponse":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/ValidationError"},"description":"A list of validation errors."}},"required":["errors"]},"CloudGamesNamespacesCreateGameNamespaceTokenPublicResponse":{"type":"object","properties":{"token":{"type":"string","description":"A JSON Web Token.\nSlightly modified to include a description prefix and use Protobufs of\nJSON."}},"required":["token"]},"CloudGamesNamespacesUpdateGameNamespaceVersionRequest":{"type":"object","properties":{"version_id":{"type":"string","format":"uuid"}},"required":["version_id"]},"CloudVersionConfig":{"type":"object","description":"Cloud configuration for a given version.","properties":{"scripts":{"type":"object","additionalProperties":{"type":"string"}},"engine":{"$ref":"#/components/schemas/CloudVersionEngineEngineConfig"},"cdn":{"$ref":"#/components/schemas/CloudVersionCdnCdnConfig"},"matchmaker":{"$ref":"#/components/schemas/CloudVersionMatchmakerMatchmakerConfig"},"kv":{"$ref":"#/components/schemas/CloudVersionKvKvConfig"},"identity":{"$ref":"#/components/schemas/CloudVersionIdentityIdentityConfig"}}},"CloudVersionFull":{"type":"object","description":"A full version.","properties":{"version_id":{"type":"string","format":"uuid"},"create_ts":{"$ref":"#/components/schemas/Timestamp"},"display_name":{"$ref":"#/components/schemas/DisplayName"},"config":{"$ref":"#/components/schemas/CloudVersionConfig"}},"required":["version_id","create_ts","display_name","config"]},"CloudVersionSummary":{"type":"object","description":"A version summary.","properties":{"version_id":{"type":"string","format":"uuid"},"create_ts":{"$ref":"#/components/schemas/Timestamp"},"display_name":{"$ref":"#/components/schemas/DisplayName"}},"required":["version_id","create_ts","display_name"]},"CloudVersionCdnCdnConfig":{"type":"object","description":"CDN configuration for a given version.","properties":{"build_command":{"type":"string","description":"_Configures Rivet CLI behavior. Has no effect on server behavior._"},"build_output":{"type":"string","description":"_Configures Rivet CLI behavior. Has no effect on server behavior._"},"build_env":{"type":"object","additionalProperties":{"type":"string"},"description":"_Configures Rivet CLI behavior. Has no effect on server behavior._"},"site_id":{"type":"string","format":"uuid"},"routes":{"type":"array","items":{"$ref":"#/components/schemas/CloudVersionCdnRoute"},"description":"Multiple CDN version routes."}}},"CloudVersionCdnRoute":{"type":"object","properties":{"glob":{"type":"string"},"priority":{"type":"integer","description":"Unsigned 32 bit integer."},"middlewares":{"type":"array","items":{"$ref":"#/components/schemas/CloudVersionCdnMiddleware"},"description":"Multiple CDN version middleware."}},"required":["glob","priority","middlewares"]},"CloudVersionCdnMiddleware":{"type":"object","properties":{"kind":{"$ref":"#/components/schemas/CloudVersionCdnMiddlewareKind"}},"required":["kind"]},"CloudVersionCdnMiddlewareKind":{"type":"object","properties":{"custom_headers":{"$ref":"#/components/schemas/CloudVersionCdnCustomHeadersMiddleware"}}},"CloudVersionCdnCustomHeadersMiddleware":{"type":"object","properties":{"headers":{"type":"array","items":{"$ref":"#/components/schemas/CloudVersionCdnHeader"}}},"required":["headers"]},"CloudVersionCdnHeader":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"]},"CloudVersionEngineEngineConfig":{"type":"object","properties":{"unity":{"$ref":"#/components/schemas/CloudVersionEngineUnityConfig"},"unreal":{"$ref":"#/components/schemas/CloudVersionEngineUnrealConfig"},"godot":{"$ref":"#/components/schemas/CloudVersionEngineGodotConfig"},"html5":{"$ref":"#/components/schemas/CloudVersionEngineHtml5Config"},"custom":{"$ref":"#/components/schemas/CloudVersionEngineCustomConfig"}}},"CloudVersionIdentityIdentityConfig":{"type":"object","description":"**Deprecated**\nIdentity configuration for a given version.","properties":{"display_names":{"type":"array","items":{"type":"string"},"description":"**Deprecated**"},"avatars":{"type":"array","items":{"type":"string","format":"uuid"},"description":"**Deprecated**"},"custom_display_names":{"type":"array","items":{"$ref":"#/components/schemas/CloudVersionIdentityCustomDisplayName"},"description":"**Deprecated**"},"custom_avatars":{"type":"array","items":{"$ref":"#/components/schemas/CloudVersionIdentityCustomAvatar"},"description":"**Deprecated**"}}},"CloudVersionIdentityCustomDisplayName":{"type":"object","properties":{"display_name":{"$ref":"#/components/schemas/DisplayName"}},"required":["display_name"]},"CloudVersionIdentityCustomAvatar":{"type":"object","properties":{"upload_id":{"type":"string","format":"uuid"}},"required":["upload_id"]},"CloudVersionKvKvConfig":{"type":"object","description":"KV configuration for a given version.","properties":{}},"CloudVersionMatchmakerMatchmakerConfig":{"type":"object","description":"Matchmaker configuration for a given version.","properties":{"game_modes":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameMode"},"description":"A list of game modes."},"captcha":{"$ref":"#/components/schemas/CloudVersionMatchmakerCaptcha"},"dev_hostname":{"type":"string","description":"_Configures Rivet CLI behavior. Has no effect on server behavior._"},"regions":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameModeRegion"}},"max_players":{"type":"integer"},"max_players_direct":{"type":"integer"},"max_players_party":{"type":"integer"},"docker":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameModeRuntimeDocker"},"tier":{"type":"string"},"idle_lobbies":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameModeIdleLobbiesConfig"},"lobby_groups":{"type":"array","items":{"$ref":"#/components/schemas/CloudVersionMatchmakerLobbyGroup"},"description":"**Deprecated: use `game_modes` instead**\nA list of game modes."}}},"CoreIntercomPegboardMarkClientRegisteredRequest":{"type":"object","properties":{"server_id":{"type":"string","format":"uuid"}},"required":["server_id"]},"EdgeIntercomPegboardPrewarmImageRequest":{"type":"object","properties":{}},"EdgeIntercomPegboardToggleClientDrainRequest":{"type":"object","properties":{"draining":{"type":"boolean"},"drain_complete_ts":{"$ref":"#/components/schemas/Timestamp"}},"required":["draining"]},"GroupListSuggestedResponse":{"type":"object","properties":{"groups":{"type":"array","items":{"$ref":"#/components/schemas/GroupGroupSummary"},"description":"A list of group summaries."},"watch":{"$ref":"#/components/schemas/WatchResponse"}},"required":["groups","watch"]},"GroupCreateRequest":{"type":"object","properties":{"display_name":{"$ref":"#/components/schemas/DisplayName"}},"required":["display_name"]},"GroupCreateResponse":{"type":"object","properties":{"group_id":{"type":"string","format":"uuid"}},"required":["group_id"]},"GroupPrepareAvatarUploadRequest":{"type":"object","properties":{"path":{"type":"string","description":"The path/filename of the group avatar."},"mime":{"type":"string","description":"The MIME type of the group avatar."},"content_length":{"type":"integer","format":"int64","description":"Unsigned 64 bit integer."}},"required":["path","content_length"]},"GroupPrepareAvatarUploadResponse":{"type":"object","properties":{"upload_id":{"type":"string","format":"uuid"},"presigned_request":{"$ref":"#/components/schemas/UploadPresignedRequest"}},"required":["upload_id","presigned_request"]},"GroupValidateProfileRequest":{"type":"object","properties":{"display_name":{"$ref":"#/components/schemas/DisplayName"},"bio":{"$ref":"#/components/schemas/DisplayName"},"publicity":{"$ref":"#/components/schemas/GroupPublicity"}}},"GroupValidateProfileResponse":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/ValidationError"},"description":"A list of validation errors."}},"required":["errors"]},"GroupGetBansResponse":{"type":"object","properties":{"banned_identities":{"type":"array","items":{"$ref":"#/components/schemas/GroupBannedIdentity"},"description":"A list of banned group members."},"anchor":{"type":"string","description":"The pagination anchor."},"watch":{"$ref":"#/components/schemas/WatchResponse"}},"required":["banned_identities","watch"]},"GroupGetJoinRequestsResponse":{"type":"object","properties":{"join_requests":{"type":"array","items":{"$ref":"#/components/schemas/GroupJoinRequest"},"description":"A list of group join requests."},"anchor":{"type":"string","description":"The pagination anchor."},"watch":{"$ref":"#/components/schemas/WatchResponse"}},"required":["join_requests","watch"]},"GroupGetMembersResponse":{"type":"object","properties":{"members":{"type":"array","items":{"$ref":"#/components/schemas/GroupMember"},"description":"A list of group members."},"anchor":{"type":"string","description":"The pagination anchor."},"watch":{"$ref":"#/components/schemas/WatchResponse"}},"required":["members","watch"]},"GroupGetProfileResponse":{"type":"object","properties":{"group":{"$ref":"#/components/schemas/GroupProfile"},"watch":{"$ref":"#/components/schemas/WatchResponse"}},"required":["group","watch"]},"GroupUpdateProfileRequest":{"type":"object","properties":{"display_name":{"$ref":"#/components/schemas/DisplayName"},"bio":{"type":"string","description":"Detailed information about a profile."},"publicity":{"$ref":"#/components/schemas/GroupPublicity"}}},"GroupGetSummaryResponse":{"type":"object","properties":{"group":{"$ref":"#/components/schemas/GroupGroupSummary"}},"required":["group"]},"GroupTransferOwnershipRequest":{"type":"object","properties":{"new_owner_identity_id":{"type":"string","description":"Identity to transfer the group to.\nMust be a member of the group."}},"required":["new_owner_identity_id"]},"IdentitySetupResponse":{"type":"object","properties":{"identity_token":{"$ref":"#/components/schemas/Jwt","description":"Token used to authenticate the identity.\nShould be stored somewhere permanent.\nPass this to `rivet.api.identity#Setup$existing_identity_token` next time `rivet.api.identity#Setup` is called.\nToken has a 90 day TTL.\nThis means that if `rivet.api.identity#Setup` is not called again within 90 days, the token will no longer be valid.\nIf this happens, the user can recover their account through the linking process (see `rivet.api.identity#PrepareGameLink`).\nThis token should be stored locally and never sent to a server or another device.\nIf this token is compromised, anyone with access to this token has control of the identity."},"identity_token_expire_ts":{"$ref":"#/components/schemas/Timestamp"},"identity":{"$ref":"#/components/schemas/IdentityProfile","description":"Information about the identity that was just authenticated."},"game_id":{"type":"string","format":"uuid"}},"required":["identity_token","identity_token_expire_ts","identity","game_id"]},"IdentityGetProfileResponse":{"type":"object","properties":{"identity":{"$ref":"#/components/schemas/IdentityProfile"},"watch":{"$ref":"#/components/schemas/WatchResponse"}},"required":["identity","watch"]},"IdentityGetHandlesResponse":{"type":"object","properties":{"identities":{"type":"array","items":{"$ref":"#/components/schemas/IdentityHandle"}},"watch":{"$ref":"#/components/schemas/WatchResponse"}},"required":["identities","watch"]},"IdentityGetSummariesResponse":{"type":"object","properties":{"identities":{"type":"array","items":{"$ref":"#/components/schemas/IdentitySummary"}},"watch":{"$ref":"#/components/schemas/WatchResponse"}},"required":["identities","watch"]},"IdentityValidateProfileResponse":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}},"required":["errors"]},"IdentityPrepareAvatarUploadResponse":{"type":"object","properties":{"upload_id":{"type":"string","format":"uuid"},"presigned_request":{"$ref":"#/components/schemas/UploadPresignedRequest"}},"required":["upload_id","presigned_request"]},"ProvisionDatacentersGetTlsResponse":{"type":"object","properties":{"job_cert_pem":{"type":"string"},"job_private_key_pem":{"type":"string"},"api_cert_pem":{"type":"string"},"api_private_key_pem":{"type":"string"}},"required":["job_cert_pem","job_private_key_pem","api_cert_pem","api_private_key_pem"]},"ProvisionDatacentersGetServersResponse":{"type":"object","properties":{"servers":{"type":"array","items":{"$ref":"#/components/schemas/ProvisionServer"}}},"required":["servers"]},"ProvisionServersGetInfoResponse":{"type":"object","properties":{"name":{"type":"string"},"server_id":{"type":"string","format":"uuid"},"datacenter_id":{"type":"string","format":"uuid"},"datacenter_name_id":{"type":"string"},"cluster_id":{"type":"string","format":"uuid"},"lan_ip":{"type":"string"},"wan_ip":{"type":"string"},"vlan_ip":{"type":"string","description":"**Deprecated**: Use lan_ip"},"public_ip":{"type":"string","description":"**Deprecated**: Use wan_ip"}},"required":["name","server_id","datacenter_id","datacenter_name_id","cluster_id","lan_ip","wan_ip","vlan_ip","public_ip"]},"ProvisionTunnelGetTlsResponse":{"type":"object","properties":{"cert_pem":{"type":"string"},"root_ca_cert_pem":{"type":"string"},"private_key_pem":{"type":"string"}},"required":["cert_pem","root_ca_cert_pem","private_key_pem"]},"RegionsListRegionsResponse":{"type":"object","properties":{"regions":{"type":"array","items":{"$ref":"#/components/schemas/RegionsRegion"}}},"required":["regions"]},"RegionsRecommendRegionResponse":{"type":"object","properties":{"region":{"$ref":"#/components/schemas/RegionsRegion"}},"required":["region"]},"RoutesListRoutesResponse":{"type":"object","properties":{"routes":{"type":"array","items":{"$ref":"#/components/schemas/RoutesRoute"}}},"required":["routes"]},"RoutesUpdateRouteBody":{"type":"object","properties":{"hostname":{"type":"string"},"path":{"type":"string"},"strip_prefix":{"type":"boolean","description":"Whether to remove the path prefix before sending the request to the actor."},"route_subpaths":{"type":"boolean","description":"Whether to route all subpaths of this path"},"target":{"$ref":"#/components/schemas/RoutesRouteTarget"}},"required":["hostname","path","strip_prefix","route_subpaths","target"]},"RoutesUpdateRouteResponse":{"type":"object","properties":{}},"RoutesDeleteRouteResponse":{"type":"object","properties":{}},"RoutesHistoryResponse":{"type":"object","properties":{"metric_names":{"type":"array","items":{"type":"string"}},"metric_attributes":{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}}},"metric_types":{"type":"array","items":{"type":"string"}},"metric_values":{"type":"array","items":{"type":"array","items":{"type":"number","format":"double"}}}},"required":["metric_names","metric_attributes","metric_types","metric_values"]},"ServersGetServerResponse":{"type":"object","properties":{"server":{"$ref":"#/components/schemas/ServersServer"}},"required":["server"]},"ServersCreateServerRequest":{"type":"object","properties":{"datacenter":{"type":"string","format":"uuid"},"tags":{},"runtime":{"$ref":"#/components/schemas/ServersCreateServerRuntimeRequest"},"network":{"$ref":"#/components/schemas/ServersCreateServerNetworkRequest"},"resources":{"$ref":"#/components/schemas/ServersResources"},"lifecycle":{"$ref":"#/components/schemas/ServersLifecycle"}},"required":["datacenter","tags","runtime","network","resources"]},"ServersCreateServerRuntimeRequest":{"type":"object","properties":{"build":{"type":"string","format":"uuid"},"arguments":{"type":"array","items":{"type":"string"}},"environment":{"type":"object","additionalProperties":{"type":"string"}}},"required":["build"]},"ServersCreateServerNetworkRequest":{"type":"object","properties":{"mode":{"$ref":"#/components/schemas/ServersNetworkMode"},"ports":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ServersCreateServerPortRequest"}}},"required":["ports"]},"ServersCreateServerPortRequest":{"type":"object","properties":{"protocol":{"$ref":"#/components/schemas/ServersPortProtocol"},"internal_port":{"type":"integer"},"routing":{"$ref":"#/components/schemas/ServersPortRouting"}},"required":["protocol"]},"ServersCreateServerResponse":{"type":"object","properties":{"server":{"$ref":"#/components/schemas/ServersServer","description":"The server that was created"}},"required":["server"]},"ServersDestroyServerResponse":{"type":"object","properties":{}},"ServersListServersResponse":{"type":"object","properties":{"servers":{"type":"array","items":{"$ref":"#/components/schemas/ServersServer"},"description":"A list of servers for the game associated with the token."}},"required":["servers"]},"ActorsActor":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"region":{"type":"string"},"tags":{},"runtime":{"$ref":"#/components/schemas/ActorsRuntime"},"network":{"$ref":"#/components/schemas/ActorsNetwork"},"resources":{"$ref":"#/components/schemas/ActorsResources"},"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","resources","lifecycle","created_at"]},"ActorsRuntime":{"type":"object","properties":{"build":{"type":"string","format":"uuid"},"arguments":{"type":"array","items":{"type":"string"}},"environment":{"type":"object","additionalProperties":{"type":"string"}}},"required":["build"]},"ActorsLifecycle":{"type":"object","properties":{"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."},"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."}}},"ActorsResources":{"type":"object","properties":{"cpu":{"type":"integer","description":"The number of CPU cores in millicores, or 1/1000 of a core. For example,\n1/8 of a core would be 125 millicores, and 1 core would be 1000\nmillicores."},"memory":{"type":"integer","description":"The amount of memory in megabytes"}},"required":["cpu","memory"]},"ActorsNetwork":{"type":"object","properties":{"mode":{"$ref":"#/components/schemas/ActorsNetworkMode"},"ports":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ActorsPort"}}},"required":["mode","ports"]},"ActorsNetworkMode":{"type":"string","enum":["bridge","host"]},"ActorsPort":{"type":"object","properties":{"protocol":{"$ref":"#/components/schemas/ActorsPortProtocol"},"internal_port":{"type":"integer"},"hostname":{"type":"string"},"port":{"type":"integer"},"path":{"type":"string"},"url":{"type":"string","description":"Fully formed connection URL including protocol, hostname, port, and path, if applicable."},"routing":{"$ref":"#/components/schemas/ActorsPortRouting"}},"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":["hostname","path"]},"ActorsGetActorLogsResponse":{"type":"object","properties":{"actor_ids":{"type":"array","items":{"type":"string"},"description":"List of actor IDs in these logs. The order of these correspond to the index in the log entry."},"lines":{"type":"array","items":{"type":"string"},"description":"Sorted old to new."},"timestamps":{"type":"array","items":{"$ref":"#/components/schemas/Timestamp"},"description":"Sorted old to new."},"streams":{"type":"array","items":{"type":"integer"},"description":"Streams the logs came from.\n\n0 = stdout\n1 = stderr"},"actor_indices":{"type":"array","items":{"type":"integer"},"description":"Index of the actor that this log was for. Use this index to look the full ID in `actor_ids`."},"watch":{"$ref":"#/components/schemas/WatchResponse"}},"required":["actor_ids","lines","timestamps","streams","actor_indices","watch"]},"ActorsExportActorLogsResponse":{"type":"object","properties":{"url":{"type":"string","description":"Presigned URL to download the exported logs"}},"required":["url"]},"ActorsGetActorMetricsResponse":{"type":"object","properties":{"actor_ids":{"type":"array","items":{"type":"string"}},"metric_names":{"type":"array","items":{"type":"string"}},"metric_attributes":{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}}},"metric_types":{"type":"array","items":{"type":"string"}},"metric_values":{"type":"array","items":{"type":"array","items":{"type":"number","format":"double"}}}},"required":["actor_ids","metric_names","metric_attributes","metric_types","metric_values"]},"AuthCompleteStatus":{"type":"string","enum":["switch_identity","linked_account_added","already_complete","expired","too_many_attempts","incorrect"],"description":"Represents the state of an external account linking process."},"AuthIdentityStartEmailVerificationRequest":{"type":"object","properties":{"email":{"type":"string"},"captcha":{"$ref":"#/components/schemas/CaptchaConfig"},"game_id":{"type":"string","format":"uuid"}},"required":["email"]},"AuthIdentityStartEmailVerificationResponse":{"type":"object","properties":{"verification_id":{"type":"string","format":"uuid"}},"required":["verification_id"]},"AuthIdentityCompleteEmailVerificationRequest":{"type":"object","properties":{"verification_id":{"type":"string","format":"uuid"},"code":{"type":"string","description":"The code sent to the requestee's email."}},"required":["verification_id","code"]},"AuthIdentityCompleteEmailVerificationResponse":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/AuthCompleteStatus"}},"required":["status"]},"AuthRefreshIdentityTokenRequest":{"type":"object","properties":{"logout":{"type":"boolean","description":"When `true`, the current identity for the provided cookie will be logged out and a new identity will be returned."}}},"AuthRefreshIdentityTokenResponse":{"type":"object","properties":{"token":{"type":"string","description":"A JSON Web Token.\nSlightly modified to include a description prefix and use Protobufs of\nJSON."},"exp":{"type":"string","description":"Token expiration time (in milliseconds)."},"identity_id":{"type":"string","format":"uuid"}},"required":["token","exp","identity_id"]},"BuildsBuild":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"created_at":{"$ref":"#/components/schemas/Timestamp"},"content_length":{"type":"integer","format":"int64","description":"Unsigned 64 bit integer."},"tags":{"type":"object","additionalProperties":{"type":"string"},"description":"Tags of this build"}},"required":["id","name","created_at","content_length","tags"]},"CaptchaConfig":{"type":"object","description":"Methods to verify a captcha","properties":{"hcaptcha":{"$ref":"#/components/schemas/CaptchaConfigHcaptcha"},"turnstile":{"$ref":"#/components/schemas/CaptchaConfigTurnstile"}}},"CaptchaConfigHcaptcha":{"type":"object","description":"Captcha configuration.","properties":{"client_response":{"type":"string"}},"required":["client_response"]},"CaptchaConfigTurnstile":{"type":"object","description":"Captcha configuration.","properties":{"client_response":{"type":"string"}},"required":["client_response"]},"CloudInspectResponse":{"type":"object","properties":{"agent":{"$ref":"#/components/schemas/CloudAuthAgent"}},"required":["agent"]},"CloudSvcPerf":{"type":"object","description":"A service performance summary.","properties":{"svc_name":{"type":"string","description":"The name of the service."},"ts":{"$ref":"#/components/schemas/Timestamp"},"duration":{"type":"integer","format":"int64","description":"Unsigned 64 bit integer."},"req_id":{"type":"string","format":"uuid"},"spans":{"type":"array","items":{"$ref":"#/components/schemas/CloudLogsPerfSpan"},"description":"A list of performance spans."},"marks":{"type":"array","items":{"$ref":"#/components/schemas/CloudLogsPerfMark"},"description":"A list of performance marks."}},"required":["svc_name","ts","duration","spans","marks"]},"CloudLogsPerfSpan":{"type":"object","description":"A performance span.","properties":{"label":{"type":"string","description":"The label given to this performance span."},"start_ts":{"$ref":"#/components/schemas/Timestamp"},"finish_ts":{"$ref":"#/components/schemas/Timestamp"},"req_id":{"type":"string","format":"uuid"}},"required":["label","start_ts"]},"CloudLogsPerfMark":{"type":"object","description":"A performance mark.","properties":{"label":{"type":"string","description":"The label given to this performance mark."},"ts":{"$ref":"#/components/schemas/Timestamp"},"ray_id":{"type":"string","format":"uuid"},"req_id":{"type":"string","format":"uuid"}},"required":["label","ts"]},"CloudLobbySummaryAnalytics":{"type":"object","description":"Analytical information about a lobby.","properties":{"lobby_id":{"type":"string","format":"uuid"},"lobby_group_id":{"type":"string","format":"uuid"},"lobby_group_name_id":{"type":"string","description":"A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short."},"region_id":{"type":"string","format":"uuid"},"create_ts":{"$ref":"#/components/schemas/Timestamp"},"is_ready":{"type":"boolean","description":"Whether or not this lobby is ready."},"is_idle":{"type":"boolean","description":"Whether or not this lobby is idle."},"is_closed":{"type":"boolean","description":"Whether or not this lobby is in a closed state."},"is_outdated":{"type":"boolean","description":"Whether or not this lobby is outdated."},"max_players_normal":{"type":"integer","description":"Unsigned 32 bit integer."},"max_players_direct":{"type":"integer","description":"Unsigned 32 bit integer."},"max_players_party":{"type":"integer","description":"Unsigned 32 bit integer."},"total_player_count":{"type":"integer","description":"Unsigned 32 bit integer."},"registered_player_count":{"type":"integer","description":"Unsigned 32 bit integer."}},"required":["lobby_id","lobby_group_id","lobby_group_name_id","region_id","create_ts","is_ready","is_idle","is_closed","is_outdated","max_players_normal","max_players_direct","max_players_party","total_player_count","registered_player_count"]},"CloudLogsLobbySummary":{"type":"object","description":"A logs summary for a lobby.","properties":{"lobby_id":{"type":"string","format":"uuid"},"namespace_id":{"type":"string","format":"uuid"},"lobby_group_name_id":{"type":"string","description":"A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short."},"region_id":{"type":"string","format":"uuid"},"create_ts":{"$ref":"#/components/schemas/Timestamp"},"start_ts":{"$ref":"#/components/schemas/Timestamp"},"ready_ts":{"$ref":"#/components/schemas/Timestamp"},"status":{"$ref":"#/components/schemas/CloudLogsLobbyStatus"}},"required":["lobby_id","namespace_id","lobby_group_name_id","region_id","create_ts","status"]},"CloudLogsLobbyStatus":{"type":"object","description":"A union representing the state of a lobby.","properties":{"running":{"$ref":"#/components/schemas/EmptyObject"},"stopped":{"$ref":"#/components/schemas/CloudLogsLobbyStatusStopped"}},"required":["running"]},"CloudLogsLobbyStatusStopped":{"type":"object","description":"The status of a stopped lobby.","properties":{"stop_ts":{"$ref":"#/components/schemas/Timestamp"},"failed":{"type":"boolean","description":"Whether or not the lobby failed or stopped successfully."},"exit_code":{"type":"integer","description":"The exit code returned by the lobby's main process when stopped."}},"required":["stop_ts","failed","exit_code"]},"CloudSvcMetrics":{"type":"object","description":"Metrics relating to a job service.","properties":{"job":{"type":"string","description":"The job name."},"cpu":{"type":"array","items":{"type":"number","format":"double"},"description":"CPU metrics."},"memory":{"type":"array","items":{"type":"number","format":"double"},"description":"Memory metrics."},"allocated_memory":{"type":"number","format":"double","description":"Total allocated memory (MB)."}},"required":["job","cpu","memory"]},"CloudAuthAgent":{"type":"object","description":"The current authenticated agent.","properties":{"identity":{"$ref":"#/components/schemas/CloudAuthAgentIdentity"},"game_cloud":{"$ref":"#/components/schemas/CloudAuthAgentGameCloud"}}},"CloudAuthAgentIdentity":{"type":"object","description":"The current authenticated identity.","properties":{"identity_id":{"type":"string","format":"uuid"}},"required":["identity_id"]},"CloudAuthAgentGameCloud":{"type":"object","description":"The current authenticated game cloud.","properties":{"game_id":{"type":"string","format":"uuid"}},"required":["game_id"]},"CloudCustomAvatarSummary":{"type":"object","description":"A custom avatar summary.","properties":{"upload_id":{"type":"string","format":"uuid"},"display_name":{"$ref":"#/components/schemas/DisplayName"},"create_ts":{"$ref":"#/components/schemas/Timestamp"},"url":{"type":"string","description":"The URL of this custom avatar image. Only present if upload is complete."},"content_length":{"type":"integer","format":"int64","description":"Unsigned 64 bit integer."},"complete":{"type":"boolean","description":"Whether or not this custom avatar has completely been uploaded."}},"required":["upload_id","display_name","create_ts","content_length","complete"]},"CloudBuildSummary":{"type":"object","description":"A build summary.","properties":{"build_id":{"type":"string","format":"uuid"},"upload_id":{"type":"string","format":"uuid"},"display_name":{"$ref":"#/components/schemas/DisplayName"},"create_ts":{"$ref":"#/components/schemas/Timestamp"},"content_length":{"type":"integer","format":"int64","description":"Unsigned 64 bit integer."},"complete":{"type":"boolean","description":"Whether or not this build has completely been uploaded."},"tags":{"type":"object","additionalProperties":{"type":"string"},"description":"Tags of this build"}},"required":["build_id","upload_id","display_name","create_ts","content_length","complete","tags"]},"CloudCdnSiteSummary":{"type":"object","description":"A CDN site summary.","properties":{"site_id":{"type":"string","format":"uuid"},"upload_id":{"type":"string","format":"uuid"},"display_name":{"$ref":"#/components/schemas/DisplayName"},"create_ts":{"$ref":"#/components/schemas/Timestamp"},"content_length":{"type":"integer","format":"int64","description":"Unsigned 64 bit integer."},"complete":{"type":"boolean","description":"Whether or not this site has completely been uploaded."}},"required":["site_id","upload_id","display_name","create_ts","content_length","complete"]},"CloudGameFull":{"type":"object","description":"A full game.","properties":{"game_id":{"type":"string","format":"uuid"},"create_ts":{"$ref":"#/components/schemas/Timestamp"},"name_id":{"type":"string","description":"A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short."},"display_name":{"$ref":"#/components/schemas/DisplayName"},"developer_group_id":{"type":"string","format":"uuid"},"total_player_count":{"type":"integer","description":"Unsigned 32 bit integer."},"logo_url":{"type":"string","description":"The URL of this game's logo image."},"banner_url":{"type":"string","description":"The URL of this game's banner image."},"namespaces":{"type":"array","items":{"$ref":"#/components/schemas/CloudNamespaceSummary"},"description":"A list of namespace summaries."},"versions":{"type":"array","items":{"$ref":"#/components/schemas/CloudVersionSummary"},"description":"A list of version summaries."},"available_regions":{"type":"array","items":{"$ref":"#/components/schemas/CloudRegionSummary"},"description":"A list of region summaries."}},"required":["game_id","create_ts","name_id","display_name","developer_group_id","total_player_count","namespaces","versions","available_regions"]},"CloudNamespaceSummary":{"type":"object","description":"A namespace summary.","properties":{"namespace_id":{"type":"string","format":"uuid"},"create_ts":{"$ref":"#/components/schemas/Timestamp"},"display_name":{"$ref":"#/components/schemas/DisplayName"},"version_id":{"type":"string","format":"uuid"},"name_id":{"type":"string","description":"A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short."}},"required":["namespace_id","create_ts","display_name","version_id","name_id"]},"CloudRegionSummary":{"type":"object","description":"A region summary.","properties":{"region_id":{"type":"string","format":"uuid"},"region_name_id":{"type":"string","description":"A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short."},"provider":{"type":"string","description":"The server provider of this region."},"universal_region":{"$ref":"#/components/schemas/CloudUniversalRegion","description":"**Deprecated**\nA universal region label given to this region."},"provider_display_name":{"$ref":"#/components/schemas/DisplayName"},"region_display_name":{"$ref":"#/components/schemas/DisplayName"}},"required":["region_id","region_name_id","provider","universal_region","provider_display_name","region_display_name"]},"CloudGameLobbyExpenses":{"type":"object","description":"Game lobby expenses.","properties":{"game":{"$ref":"#/components/schemas/GameHandle"},"namespaces":{"type":"array","items":{"$ref":"#/components/schemas/CloudNamespaceSummary"},"description":"A list of namespace summaries."},"expenses":{"type":"array","items":{"$ref":"#/components/schemas/CloudRegionTierExpenses"},"description":"A list of multiple region tier expenses."}},"required":["game","namespaces","expenses"]},"CloudRegionTierExpenses":{"type":"object","description":"Region tier expenses.","properties":{"namespace_id":{"type":"string","format":"uuid"},"region_id":{"type":"string","format":"uuid"},"tier_name_id":{"type":"string","description":"A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short."},"lobby_group_name_id":{"type":"string","description":"A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short."},"uptime":{"type":"number","format":"double","description":"How long a region tier has been active (in milliseconds)."},"expenses":{"type":"number","format":"double","description":"Amount of expenses for this region tier (in hundred-thousandths USD, 100,000 = $1.00)."}},"required":["namespace_id","region_id","tier_name_id","lobby_group_name_id","uptime","expenses"]},"CloudGroupBankSource":{"type":"object","properties":{"account_number":{"type":"string","description":"The bank account number of this group's bank source."},"routing_number":{"type":"string","description":"The bank routing number of this group's bank source."}},"required":["account_number","routing_number"]},"CloudRegionTier":{"type":"object","description":"A region server tier.","properties":{"tier_name_id":{"type":"string","description":"A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short."},"rivet_cores_numerator":{"type":"integer","description":"Together with the denominator, denotes the portion of the CPU a given server uses."},"rivet_cores_denominator":{"type":"integer","description":"Together with the numerator, denotes the portion of the CPU a given server uses."},"cpu":{"type":"integer","description":"CPU frequency (MHz)."},"memory":{"type":"integer","description":"Allocated memory (MB)."},"disk":{"type":"integer","description":"Allocated disk space (MB)."},"bandwidth":{"type":"integer","description":"Internet bandwidth (MB)."},"price_per_second":{"type":"integer","description":"**Deprecated**\nPrice billed for every second this server is running (in quadrillionth USD, 1,000,000,000,000 = $1.00)."}},"required":["tier_name_id","rivet_cores_numerator","rivet_cores_denominator","cpu","memory","disk","bandwidth","price_per_second"]},"CloudUniversalRegion":{"type":"string","enum":["unknown","local","amsterdam","atlanta","bangalore","dallas","frankfurt","london","mumbai","newark","new_york_city","san_francisco","singapore","sydney","tokyo","toronto","washington_dc","chicago","paris","seattle","sao_paulo","stockholm","chennai","osaka","milan","miami","jakarta","los_angeles"],"description":"**Deprecated**"},"CloudNamespaceFull":{"type":"object","description":"A full namespace.","properties":{"namespace_id":{"type":"string","format":"uuid"},"create_ts":{"$ref":"#/components/schemas/Timestamp"},"display_name":{"$ref":"#/components/schemas/DisplayName"},"version_id":{"type":"string","format":"uuid"},"name_id":{"type":"string","description":"A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short."},"config":{"$ref":"#/components/schemas/CloudNamespaceConfig"}},"required":["namespace_id","create_ts","display_name","version_id","name_id","config"]},"CloudNamespaceConfig":{"type":"object","description":"Cloud configuration for a given namespace.","properties":{"cdn":{"$ref":"#/components/schemas/CloudCdnNamespaceConfig"},"matchmaker":{"$ref":"#/components/schemas/CloudMatchmakerNamespaceConfig"},"kv":{"$ref":"#/components/schemas/CloudKvNamespaceConfig"},"identity":{"$ref":"#/components/schemas/CloudIdentityNamespaceConfig"}},"required":["cdn","matchmaker","kv","identity"]},"CloudCdnNamespaceConfig":{"type":"object","description":"CDN configuration for a given namespace.","properties":{"enable_domain_public_auth":{"type":"boolean","description":"Whether or not to allow users to connect to the given namespace via domain name."},"domains":{"type":"array","items":{"$ref":"#/components/schemas/CloudCdnNamespaceDomain"},"description":"A list of CDN domains for a given namespace."},"auth_type":{"$ref":"#/components/schemas/CloudCdnAuthType"},"auth_user_list":{"type":"array","items":{"$ref":"#/components/schemas/CloudCdnNamespaceAuthUser"},"description":"A list of CDN authenticated users for a given namespace."}},"required":["enable_domain_public_auth","domains","auth_type","auth_user_list"]},"CloudMatchmakerNamespaceConfig":{"type":"object","description":"Matchmaker configuration for a given namespace.","properties":{"lobby_count_max":{"type":"integer","description":"Unsigned 32 bit integer."},"max_players_per_client":{"type":"integer","description":"Unsigned 32 bit integer."},"max_players_per_client_vpn":{"type":"integer","description":"Unsigned 32 bit integer."},"max_players_per_client_proxy":{"type":"integer","description":"Unsigned 32 bit integer."},"max_players_per_client_tor":{"type":"integer","description":"Unsigned 32 bit integer."},"max_players_per_client_hosting":{"type":"integer","description":"Unsigned 32 bit integer."}},"required":["lobby_count_max","max_players_per_client","max_players_per_client_vpn","max_players_per_client_proxy","max_players_per_client_tor","max_players_per_client_hosting"]},"CloudKvNamespaceConfig":{"type":"object","description":"KV configuration for a given namespace.","properties":{}},"CloudIdentityNamespaceConfig":{"type":"object","description":"Identity configuration for a given namespace.","properties":{}},"CloudCdnAuthType":{"type":"string","enum":["none","basic"],"description":"A value denoting what type of authentication to use for a game namespace's CDN."},"CloudCdnNamespaceDomain":{"type":"object","description":"A CDN domain for a given namespace.","properties":{"domain":{"type":"string","description":"A valid domain name (no protocol)."},"create_ts":{"$ref":"#/components/schemas/Timestamp"},"verification_status":{"$ref":"#/components/schemas/CloudCdnNamespaceDomainVerificationStatus"},"verification_method":{"$ref":"#/components/schemas/CloudCdnNamespaceDomainVerificationMethod"},"verification_errors":{"type":"array","items":{"type":"string"}}},"required":["domain","create_ts","verification_status","verification_method","verification_errors"]},"CloudCdnNamespaceDomainVerificationMethod":{"type":"object","description":"A union representing the verification method used for this CDN domain.","properties":{"invalid":{"$ref":"#/components/schemas/EmptyObject"},"http":{"$ref":"#/components/schemas/CloudCdnNamespaceDomainVerificationMethodHttp"}}},"CloudCdnNamespaceDomainVerificationMethodHttp":{"type":"object","properties":{"cname_record":{"type":"string"}},"required":["cname_record"]},"CloudCdnNamespaceDomainVerificationStatus":{"type":"string","enum":["active","pending","failed"],"description":"A value denoting the status of a CDN domain's verification status."},"CloudCdnNamespaceAuthUser":{"type":"object","description":"An authenticated CDN user for a given namespace.","properties":{"user":{"type":"string","description":"A user name."}},"required":["user"]},"CloudMatchmakerDevelopmentPort":{"type":"object","description":"A port configuration used to create development tokens.","properties":{"port":{"type":"integer"},"port_range":{"$ref":"#/components/schemas/CloudVersionMatchmakerPortRange"},"protocol":{"$ref":"#/components/schemas/CloudVersionMatchmakerPortProtocol"}},"required":["protocol"]},"CloudNamespaceVersion":{"type":"object","description":"A previously deployed namespace version.","properties":{"namespace_id":{"type":"string","description":"A universally unique identifier."},"version_id":{"type":"string","description":"A universally unique identifier."},"deploy_ts":{"$ref":"#/components/schemas/Timestamp"}},"required":["namespace_id","version_id","deploy_ts"]},"CloudDevicesPrepareDeviceLinkResponse":{"type":"object","properties":{"device_link_id":{"type":"string","format":"uuid"},"device_link_token":{"type":"string"},"device_link_url":{"type":"string"}},"required":["device_link_id","device_link_token","device_link_url"]},"CloudDevicesGetDeviceLinkResponse":{"type":"object","properties":{"cloud_token":{"type":"string"},"watch":{"$ref":"#/components/schemas/WatchResponse"}},"required":["watch"]},"CloudDevicesCompleteDeviceLinkRequest":{"type":"object","properties":{"device_link_token":{"$ref":"#/components/schemas/Jwt"},"game_id":{"type":"string","format":"uuid"}},"required":["device_link_token","game_id"]},"CloudGamesListGameCustomAvatarsResponse":{"type":"object","properties":{"custom_avatars":{"type":"array","items":{"$ref":"#/components/schemas/CloudCustomAvatarSummary"},"description":"A list of custom avatar summaries."}},"required":["custom_avatars"]},"CloudGamesPrepareCustomAvatarUploadRequest":{"type":"object","properties":{"path":{"type":"string","description":"The path/filename of the custom avatar."},"mime":{"type":"string","description":"The MIME type of the custom avatar."},"content_length":{"type":"integer","format":"int64","description":"Unsigned 64 bit integer."}},"required":["path","content_length"]},"CloudGamesPrepareCustomAvatarUploadResponse":{"type":"object","properties":{"upload_id":{"type":"string","format":"uuid"},"presigned_request":{"$ref":"#/components/schemas/UploadPresignedRequest"}},"required":["upload_id","presigned_request"]},"CloudGamesListGameBuildsResponse":{"type":"object","properties":{"builds":{"type":"array","items":{"$ref":"#/components/schemas/CloudBuildSummary"},"description":"A list of build summaries."}},"required":["builds"]},"CloudGamesCreateGameBuildRequest":{"type":"object","properties":{"display_name":{"$ref":"#/components/schemas/DisplayName"},"image_tag":{"type":"string","description":"A tag given to the game build."},"image_file":{"$ref":"#/components/schemas/UploadPrepareFile"},"multipart_upload":{"type":"boolean"},"kind":{"$ref":"#/components/schemas/CloudGamesBuildKind"},"compression":{"$ref":"#/components/schemas/CloudGamesBuildCompression"}},"required":["display_name","image_tag","image_file"]},"CloudGamesCreateGameBuildResponse":{"type":"object","properties":{"build_id":{"type":"string","format":"uuid"},"upload_id":{"type":"string","format":"uuid"},"image_presigned_request":{"$ref":"#/components/schemas/UploadPresignedRequest"},"image_presigned_requests":{"type":"array","items":{"$ref":"#/components/schemas/UploadPresignedRequest"}}},"required":["build_id","upload_id"]},"CloudGamesBuildKind":{"type":"string","enum":["docker_image","oci_bundle"]},"CloudGamesBuildCompression":{"type":"string","enum":["none","lz4"]},"CloudGamesListGameCdnSitesResponse":{"type":"object","properties":{"sites":{"type":"array","items":{"$ref":"#/components/schemas/CloudCdnSiteSummary"},"description":"A list of CDN site summaries."}},"required":["sites"]},"CloudGamesCreateGameCdnSiteRequest":{"type":"object","properties":{"display_name":{"$ref":"#/components/schemas/DisplayName"},"files":{"type":"array","items":{"$ref":"#/components/schemas/UploadPrepareFile"},"description":"A list of files preparing to upload."}},"required":["display_name","files"]},"CloudGamesCreateGameCdnSiteResponse":{"type":"object","properties":{"site_id":{"type":"string","format":"uuid"},"upload_id":{"type":"string","format":"uuid"},"presigned_requests":{"type":"array","items":{"$ref":"#/components/schemas/UploadPresignedRequest"}}},"required":["site_id","upload_id","presigned_requests"]},"CloudGamesExportMatchmakerLobbyHistoryRequest":{"type":"object","properties":{"query_start":{"type":"integer","format":"int64","description":"Unsigned 64 bit integer."},"query_end":{"type":"integer","format":"int64","description":"Unsigned 64 bit integer."}},"required":["query_start","query_end"]},"CloudGamesExportMatchmakerLobbyHistoryResponse":{"type":"object","properties":{"url":{"type":"string","description":"The URL to a CSV file for the given lobby history."}},"required":["url"]},"CloudGamesDeleteMatchmakerLobbyResponse":{"type":"object","properties":{"did_remove":{"type":"boolean","description":"Whether or not the lobby was successfully stopped."}},"required":["did_remove"]},"CloudGamesGetLobbyLogsResponse":{"type":"object","properties":{"lines":{"type":"array","items":{"type":"string"},"description":"Sorted old to new."},"timestamps":{"type":"array","items":{"type":"string"},"description":"Sorted old to new."},"watch":{"$ref":"#/components/schemas/WatchResponse"}},"required":["lines","timestamps","watch"]},"CloudGamesExportLobbyLogsRequest":{"type":"object","properties":{"stream":{"$ref":"#/components/schemas/CloudGamesLogStream"}},"required":["stream"]},"CloudGamesExportLobbyLogsResponse":{"type":"object","properties":{"url":{"type":"string","description":"The URL to a CSV file for the given lobby history."}},"required":["url"]},"CloudGamesLogStream":{"type":"string","enum":["std_out","std_err"]},"CloudGamesNamespacesGetAnalyticsMatchmakerLiveResponse":{"type":"object","properties":{"lobbies":{"type":"array","items":{"$ref":"#/components/schemas/CloudLobbySummaryAnalytics"},"description":"A list of analytics lobby summaries."}},"required":["lobbies"]},"CloudGamesNamespacesListNamespaceLobbiesResponse":{"type":"object","properties":{"lobbies":{"type":"array","items":{"$ref":"#/components/schemas/CloudLogsLobbySummary"},"description":"A list of lobby log summaries."}},"required":["lobbies"]},"CloudGamesNamespacesGetNamespaceLobbyResponse":{"type":"object","properties":{"lobby":{"$ref":"#/components/schemas/CloudLogsLobbySummary"},"metrics":{"$ref":"#/components/schemas/CloudSvcMetrics"},"stdout_presigned_urls":{"type":"array","items":{"type":"string"},"description":"**Deprecated**\nA list of URLs."},"stderr_presigned_urls":{"type":"array","items":{"type":"string"},"description":"**Deprecated**\nA list of URLs."},"perf_lists":{"type":"array","items":{"$ref":"#/components/schemas/CloudSvcPerf"},"description":"**Deprecated**\nA list of service performance summaries."}},"required":["lobby","stdout_presigned_urls","stderr_presigned_urls","perf_lists"]},"CloudGamesCreateCloudTokenResponse":{"type":"object","properties":{"token":{"type":"string","description":"A JSON Web Token.\nSlightly modified to include a description prefix and use Protobufs of\nJSON."}},"required":["token"]},"CloudGamesCreateGameVersionRequest":{"type":"object","properties":{"display_name":{"$ref":"#/components/schemas/DisplayName"},"config":{"$ref":"#/components/schemas/CloudVersionConfig"}},"required":["display_name","config"]},"CloudGamesCreateGameVersionResponse":{"type":"object","properties":{"version_id":{"type":"string","format":"uuid"}},"required":["version_id"]},"CloudGamesReserveVersionNameResponse":{"type":"object","properties":{"version_display_name":{"$ref":"#/components/schemas/DisplayName"}},"required":["version_display_name"]},"CloudGamesValidateGameVersionRequest":{"type":"object","properties":{"display_name":{"$ref":"#/components/schemas/DisplayName"},"config":{"$ref":"#/components/schemas/CloudVersionConfig"}},"required":["display_name","config"]},"CloudGamesValidateGameVersionResponse":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/ValidationError"},"description":"A list of validation errors."}},"required":["errors"]},"CloudGamesGetGameVersionByIdResponse":{"type":"object","properties":{"version":{"$ref":"#/components/schemas/CloudVersionFull"}},"required":["version"]},"CloudValidateGroupRequest":{"type":"object","properties":{"display_name":{"$ref":"#/components/schemas/DisplayName"}},"required":["display_name"]},"CloudValidateGroupResponse":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/ValidationError"},"description":"A list of validation errors."}},"required":["errors"]},"CloudGetRayPerfLogsResponse":{"type":"object","properties":{"perf_lists":{"type":"array","items":{"$ref":"#/components/schemas/CloudSvcPerf"},"description":"A list of service performance summaries."}},"required":["perf_lists"]},"CloudGetRegionTiersResponse":{"type":"object","properties":{"tiers":{"type":"array","items":{"$ref":"#/components/schemas/CloudRegionTier"},"description":"A list of region server tiers."}},"required":["tiers"]},"CloudVersionEngineCustomConfig":{"type":"object","properties":{}},"CloudVersionEngineGodotConfig":{"type":"object","properties":{}},"CloudVersionEngineHtml5Config":{"type":"object","properties":{}},"CloudVersionEngineUnityConfig":{"type":"object","properties":{}},"CloudVersionEngineUnrealConfig":{"type":"object","properties":{"game_module":{"type":"string","description":"Name of the Unreal module that holds the game code.\nThis is usually the value of `$.Modules[0].Name` in the file `MyProject.unproject`.\n_Configures Rivet CLI behavior. Has no effect on server behavior._"}},"required":["game_module"]},"CloudVersionMatchmakerPortRange":{"type":"object","description":"Range of ports that can be connected to.\nIf configured, `network_mode` must equal `host`.\nPort ranges may overlap between containers, it is the responsibility of the developer to ensure ports are available before using.\nRead more about host networking [here](https://rivet.gg/docs/dynamic-servers/concepts/host-bridge-networking).\nOnly available on Rivet Open Source & Enterprise.\n\n### Related\n\n- cloud.version.matchmaker.PortProtocol\n- cloud.version.matchmaker.ProxyKind","properties":{"min":{"type":"integer","description":"Unsigned 32 bit integer."},"max":{"type":"integer","description":"Unsigned 32 bit integer."}},"required":["min","max"]},"CloudVersionMatchmakerPortProtocol":{"type":"string","enum":["http","https","tcp","tcp_tls","udp"],"description":"Signifies the protocol of the port.\nNote that when proxying through GameGuard (via `ProxyKind`), the port number returned by `/find`, `/join`, and `/create` will not be the same as the port number configured in the config:\n\n- With HTTP, the port will always be 80. The hostname of the port correctly routes the incoming\n connection to the correct port being used by the game server.\n- With HTTPS, the port will always be 443. The hostname of the port correctly routes the incoming\n connection to the correct port being used by the game server.\n- Using TCP/UDP, the port will be a random number between 26000 and 31999. This gets automatically\n routed to the correct port being used by the game server.\n\n### Related - cloud.version.matchmaker.GameModeRuntimeDockerPort - cloud.version.matchmaker.ProxyKind - /docs/dynamic-servers/concepts/game-guard - matchmaker.lobbies.find"},"CloudVersionMatchmakerProxyKind":{"type":"string","enum":["none","game_guard"],"description":"Range of ports that can be connected to.\n`game_guard` (default) proxies all traffic through [Game Guard](https://rivet.gg/docs/dynamic-servers/concepts/game-guard) to mitigate DDoS attacks and provide TLS termination.\n`none` sends traffic directly to the game server. If configured, `network_mode` must equal `host`. Read more about host networking [here](https://rivet.gg/docs/dynamic-servers/concepts/host-bridge-networking). Only available on Rivet Open Source & Enterprise.\n\n### Related - /docs/dynamic-servers/concepts/game-guard - cloud.version.matchmaker.PortProtocol"},"CloudVersionMatchmakerCaptcha":{"type":"object","description":"Matchmaker captcha configuration.","properties":{"requests_before_reverify":{"type":"integer","description":"Denotes how many requests a connection can make before it is required to reverify a captcha."},"verification_ttl":{"type":"integer","format":"int64","description":"Denotes how long a connection can continue to reconnect without having to reverify a captcha (in milliseconds)."},"hcaptcha":{"$ref":"#/components/schemas/CloudVersionMatchmakerCaptchaHcaptcha"},"turnstile":{"$ref":"#/components/schemas/CloudVersionMatchmakerCaptchaTurnstile"}},"required":["requests_before_reverify","verification_ttl"]},"CloudVersionMatchmakerCaptchaHcaptcha":{"type":"object","description":"hCpatcha configuration.","properties":{"level":{"$ref":"#/components/schemas/CloudVersionMatchmakerCaptchaHcaptchaLevel","description":"**Deprecated**"},"site_key":{"type":"string","description":"Site key for your hCaptcha application. Must be set."},"secret_key":{"type":"string","description":"Secret key for your hCaptcha application. Must be set."}}},"CloudVersionMatchmakerCaptchaHcaptchaLevel":{"type":"string","enum":["easy","moderate","difficult","always_on"],"description":"**Deprecated**\nHow hard a captcha should be."},"CloudVersionMatchmakerCaptchaTurnstile":{"type":"object","description":"Turnstile captcha configuration.","properties":{"site_key":{"type":"string"},"secret_key":{"type":"string"}},"required":["site_key","secret_key"]},"CloudVersionMatchmakerNetworkMode":{"type":"string","enum":["bridge","host"],"description":"Configures how the container's network is isolated from the host.\n`bridge` (default) networking isolates the container's network from the host & other containers.\n`host` networking removes isolation between the container and the host. Only available in Rivet Open Source & Enterprise.\nRead more about bridge vs host networking [here](https://rivet.gg/docs/dynamic-servers/concepts/host-bridge-networking)."},"CloudVersionMatchmakerGameMode":{"type":"object","description":"A game mode.","properties":{"regions":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameModeRegion"}},"max_players":{"type":"integer"},"max_players_direct":{"type":"integer"},"max_players_party":{"type":"integer"},"docker":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameModeRuntimeDocker"},"listable":{"type":"boolean"},"taggable":{"type":"boolean"},"allow_dynamic_max_players":{"type":"boolean"},"actions":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameModeActions"},"tier":{"type":"string"},"idle_lobbies":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameModeIdleLobbiesConfig"}}},"CloudVersionMatchmakerGameModeRegion":{"type":"object","description":"A game mode region.","properties":{"tier":{"type":"string"},"idle_lobbies":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameModeIdleLobbiesConfig"}}},"CloudVersionMatchmakerGameModeRuntimeDocker":{"type":"object","description":"A game mode runtime running through Docker.","properties":{"dockerfile":{"type":"string","description":"_Configures Rivet CLI behavior. Has no effect on server behavior._"},"build_args":{"type":"object","additionalProperties":{"type":"string"},"description":"_Configures Rivet CLI behavior. Has no effect on server behavior._"},"image":{"type":"string","description":"_Configures Rivet CLI behavior. Has no effect on server behavior._"},"image_id":{"type":"string","format":"uuid"},"args":{"type":"array","items":{"type":"string"}},"env":{"type":"object","additionalProperties":{"type":"string"}},"network_mode":{"$ref":"#/components/schemas/CloudVersionMatchmakerNetworkMode"},"ports":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameModeRuntimeDockerPort"}}}},"CloudVersionMatchmakerGameModeRuntimeDockerPort":{"type":"object","description":"Port config for a docker build.","properties":{"port":{"type":"integer","description":"The port number to connect to.\n\n### Related - cloud.version.matchmaker.PortProtocol - cloud.version.matchmaker.ProxyKind"},"port_range":{"$ref":"#/components/schemas/CloudVersionMatchmakerPortRange"},"protocol":{"$ref":"#/components/schemas/CloudVersionMatchmakerPortProtocol"},"proxy":{"$ref":"#/components/schemas/CloudVersionMatchmakerProxyKind","description":"How this port should be proxied. Defaults to 'game-guard`."},"dev_port":{"type":"integer","description":"_Configures Rivet CLI behavior. Has no effect on server behavior._"},"dev_port_range":{"$ref":"#/components/schemas/CloudVersionMatchmakerPortRange","description":"_Configures Rivet CLI behavior. Has no effect on server behavior._"},"dev_protocol":{"$ref":"#/components/schemas/CloudVersionMatchmakerPortProtocol","description":"_Configures Rivet CLI behavior. Has no effect on server behavior._"}}},"CloudVersionMatchmakerGameModeIdleLobbiesConfig":{"type":"object","description":"Configuration for how many idle lobbies a game version should have.","properties":{"min":{"type":"integer"},"max":{"type":"integer"}},"required":["min","max"]},"CloudVersionMatchmakerGameModeActions":{"type":"object","description":"Configuration for the connection types allowed for a game mode.","properties":{"find":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameModeFindConfig"},"join":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameModeJoinConfig"},"create":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameModeCreateConfig"}}},"CloudVersionMatchmakerGameModeIdentityRequirement":{"type":"string","enum":["none","guest","registered"],"description":"**Deprecated**\nThe registration requirement for a user when joining/finding/creating a lobby. \"None\" allows for connections without an identity."},"CloudVersionMatchmakerGameModeVerificationConfig":{"type":"object","description":"Configuration that tells Rivet where to send validation requests and with what headers. When set, Rivet will send the `verification_data` property (given by the user in the find/join/create endpoint) to the given url along with the headers provided and some information about the requested lobby. The response of this request will determine if the user can join that lobby or not.","properties":{"url":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}}},"required":["url","headers"]},"CloudVersionMatchmakerGameModeFindConfig":{"type":"object","description":"Configures the requirements and authentication for the /find endpoint. If this value is not set in the config, the /find endpoint is still enabled.","properties":{"enabled":{"type":"boolean","description":"Sets whether or not the /find endpoint is enabled."},"identity_requirement":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameModeIdentityRequirement"},"verification":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameModeVerificationConfig"}},"required":["enabled"]},"CloudVersionMatchmakerGameModeJoinConfig":{"type":"object","description":"Configures the requirements and authentication for the /join endpoint. If this value is not set in the config, the /join endpoint is still enabled.","properties":{"enabled":{"type":"boolean","description":"Sets whether or not the /join endpoint is enabled."},"identity_requirement":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameModeIdentityRequirement"},"verification":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameModeVerificationConfig"}},"required":["enabled"]},"CloudVersionMatchmakerGameModeCreateConfig":{"type":"object","description":"Configures the requirements and authentication for the /create endpoint. If this value is not set in the config, the /create endpoint is NOT enabled.","properties":{"enabled":{"type":"boolean","description":"Sets whether or not the /create endpoint is enabled."},"identity_requirement":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameModeIdentityRequirement"},"verification":{"$ref":"#/components/schemas/CloudVersionMatchmakerGameModeVerificationConfig"},"enable_public":{"type":"boolean","description":"Defaults to false when unset."},"enable_private":{"type":"boolean","description":"Defaults to true when unset."},"max_lobbies_per_identity":{"type":"integer","description":"**Deprecated**"}},"required":["enabled"]},"CloudVersionMatchmakerLobbyGroup":{"type":"object","description":"A game mode.","properties":{"name_id":{"type":"string","description":"**Deprecated: use GameMode instead**\nA human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short."},"regions":{"type":"array","items":{"$ref":"#/components/schemas/CloudVersionMatchmakerLobbyGroupRegion"},"description":"A list of game mode regions."},"max_players_normal":{"type":"integer","description":"Unsigned 32 bit integer."},"max_players_direct":{"type":"integer","description":"Unsigned 32 bit integer."},"max_players_party":{"type":"integer","description":"Unsigned 32 bit integer."},"runtime":{"$ref":"#/components/schemas/CloudVersionMatchmakerLobbyGroupRuntime"}},"required":["name_id","regions","max_players_normal","max_players_direct","max_players_party","runtime"]},"CloudVersionMatchmakerLobbyGroupRuntime":{"type":"object","description":"**Deprecated: use GameMode instead**\nA union representing the runtime a game mode runs on.","properties":{"docker":{"$ref":"#/components/schemas/CloudVersionMatchmakerLobbyGroupRuntimeDocker"}}},"CloudVersionMatchmakerLobbyGroupRegion":{"type":"object","description":"**Deprecated: use GameMode instead**\nA game mode region.","properties":{"region_id":{"type":"string","format":"uuid"},"tier_name_id":{"type":"string","description":"A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short."},"idle_lobbies":{"$ref":"#/components/schemas/CloudVersionMatchmakerLobbyGroupIdleLobbiesConfig"}},"required":["region_id","tier_name_id"]},"CloudVersionMatchmakerLobbyGroupRuntimeDocker":{"type":"object","description":"**Deprecated: use GameMode instead**\nA game mode runtime running through Docker.","properties":{"build_id":{"type":"string","format":"uuid"},"args":{"type":"array","items":{"type":"string"}},"env_vars":{"type":"array","items":{"$ref":"#/components/schemas/CloudVersionMatchmakerLobbyGroupRuntimeDockerEnvVar"}},"network_mode":{"$ref":"#/components/schemas/CloudVersionMatchmakerNetworkMode"},"ports":{"type":"array","items":{"$ref":"#/components/schemas/CloudVersionMatchmakerLobbyGroupRuntimeDockerPort"}}},"required":["args","env_vars","ports"]},"CloudVersionMatchmakerLobbyGroupRuntimeDockerEnvVar":{"type":"object","description":"**Deprecated: use GameMode instead**\nA docker environment variable.","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]},"CloudVersionMatchmakerLobbyGroupRuntimeDockerPort":{"type":"object","description":"**Deprecated: use GameMode instead**\nA docker port.","properties":{"label":{"type":"string","description":"The label of this docker port."},"target_port":{"type":"integer","description":"The port number to connect to."},"port_range":{"$ref":"#/components/schemas/CloudVersionMatchmakerPortRange"},"proxy_protocol":{"$ref":"#/components/schemas/CloudVersionMatchmakerPortProtocol"}},"required":["label","proxy_protocol"]},"CloudVersionMatchmakerLobbyGroupIdleLobbiesConfig":{"type":"object","description":"**Deprecated: use GameMode instead**\nConfiguration for how many idle lobbies a game version should have.","properties":{"min_idle_lobbies":{"type":"integer","description":"Unsigned 32 bit integer."},"max_idle_lobbies":{"type":"integer","description":"Unsigned 32 bit integer."}},"required":["min_idle_lobbies","max_idle_lobbies"]},"Identifier":{"type":"string","description":"A human readable short identifier used to references resources. Different than a `uuid` because this is intended to be human readable. Different than `DisplayName` because this should not include special characters and be short."},"Bio":{"type":"string","description":"Follows regex ^(?:[^\\n\\r]+\\n?|\\n){1,5}$"},"Email":{"type":"string","description":"A valid email address"},"Jwt":{"type":"string","description":"Documentation at https://jwt.io/"},"WatchQuery":{"type":"string","description":"A query parameter denoting the requests watch index."},"WatchResponse":{"type":"object","description":"Provided by watchable endpoints used in blocking loops.","properties":{"index":{"type":"string","description":"Index indicating the version of the data responded.\nPass this to `WatchQuery` to block and wait for the next response."}},"required":["index"]},"DisplayName":{"type":"string","description":"Represent a resource's readable display name."},"AccountNumber":{"type":"integer"},"Timestamp":{"type":"string","format":"date-time","description":"RFC3339 timestamp"},"GlobalEventNotification":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"thumbnail_url":{"type":"string"},"url":{"type":"string"}},"required":["title","description","thumbnail_url","url"]},"ValidationError":{"type":"object","description":"An error given by failed content validation.","properties":{"path":{"type":"array","items":{"type":"string"},"description":"A list of strings denoting the origin of a validation error."}},"required":["path"]},"EmptyObject":{"type":"object","properties":{}},"ErrorMetadata":{"description":"Unstructured metadata relating to an error. Must be manually parsed."},"ErrorBody":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"ray_id":{"type":"string"},"documentation":{"type":"string"},"metadata":{"$ref":"#/components/schemas/ErrorMetadata"}},"required":["code","message","ray_id"]},"Pagination":{"type":"object","properties":{"cursor":{"type":"string"}}},"GameHandle":{"type":"object","properties":{"game_id":{"type":"string","format":"uuid"},"name_id":{"$ref":"#/components/schemas/Identifier"},"display_name":{"$ref":"#/components/schemas/DisplayName"},"logo_url":{"type":"string","description":"The URL of this game's logo image."},"banner_url":{"type":"string","description":"The URL of this game's banner image."}},"required":["game_id","name_id","display_name"]},"GameGameSummary":{"type":"object","properties":{"game_id":{"type":"string","format":"uuid"},"name_id":{"$ref":"#/components/schemas/Identifier"},"display_name":{"$ref":"#/components/schemas/DisplayName"},"logo_url":{"type":"string","description":"The URL of this game's logo image."},"banner_url":{"type":"string","description":"The URL of this game's banner image."},"url":{"type":"string"},"developer":{"$ref":"#/components/schemas/GroupHandle"},"total_player_count":{"type":"integer","description":"Unsigned 32 bit integer."}},"required":["game_id","name_id","display_name","url","developer","total_player_count"]},"GameProfile":{"type":"object","description":"A game profile.","properties":{"game_id":{"type":"string","format":"uuid"},"name_id":{"type":"string","description":"A human readable short identifier used to references resources. Different than a `rivet.common#Uuid` because this is intended to be human readable. Different than `rivet.common#DisplayName` because this should not include special characters and be short."},"display_name":{"$ref":"#/components/schemas/DisplayName"},"logo_url":{"type":"string","description":"The URL of this game's logo image."},"banner_url":{"type":"string","description":"The URL of this game's banner image."},"url":{"type":"string","description":"The URL to this game's website."},"developer":{"$ref":"#/components/schemas/GroupGroupSummary"},"tags":{"type":"array","items":{"type":"string"},"description":"A list of game tags."},"description":{"type":"string","description":"A description of the given game."},"platforms":{"type":"array","items":{"$ref":"#/components/schemas/GamePlatformLink"},"description":"A list of platform links."},"recommended_groups":{"type":"array","items":{"$ref":"#/components/schemas/GroupGroupSummary"},"description":"A list of group summaries."},"identity_leaderboard_categories":{"type":"array","items":{"$ref":"#/components/schemas/GameLeaderboardCategory"},"description":"A list of game leaderboard categories."},"group_leaderboard_categories":{"type":"array","items":{"$ref":"#/components/schemas/GameLeaderboardCategory"},"description":"A list of game leaderboard categories."}},"required":["game_id","name_id","display_name","url","developer","tags","description","platforms","recommended_groups","identity_leaderboard_categories","group_leaderboard_categories"]},"GamePlatformLink":{"type":"object","description":"A platform link denoting a supported platform.","properties":{"display_name":{"$ref":"#/components/schemas/DisplayName"},"url":{"type":"string","description":"The URL to the given game's method of distribution on this platform."}},"required":["display_name","url"]},"GameLeaderboardCategory":{"type":"object","description":"A game leaderboard category.","properties":{"display_name":{"$ref":"#/components/schemas/DisplayName"}},"required":["display_name"]},"GameStatSummary":{"type":"object","description":"A game statistic summary.","properties":{"game":{"$ref":"#/components/schemas/GameHandle"},"stats":{"type":"array","items":{"$ref":"#/components/schemas/GameStat"}}},"required":["game","stats"]},"GameStat":{"type":"object","description":"A game statistic.","properties":{"config":{"$ref":"#/components/schemas/GameStatConfig"},"overall_value":{"type":"number","format":"double","description":"A single overall value of the given statistic."}},"required":["config","overall_value"]},"GameStatConfig":{"type":"object","description":"A game statistic config.","properties":{"record_id":{"type":"string","format":"uuid"},"icon_id":{"type":"string","format":"uuid"},"format":{"$ref":"#/components/schemas/GameStatFormatMethod"},"aggregation":{"$ref":"#/components/schemas/GameStatAggregationMethod"},"sorting":{"$ref":"#/components/schemas/GameStatSortingMethod"},"priority":{"type":"integer"},"display_name":{"$ref":"#/components/schemas/DisplayName"},"postfix_singular":{"type":"string","description":"A string appended to the end of a singular game statistic's value. Example: 1 **dollar**."},"postfix_plural":{"type":"string","description":"A string appended to the end of a game statistic's value that is not exactly 1. Example: 45 **dollars**."},"prefix_singular":{"type":"string","description":"A string appended to the beginning of a singular game statistic's value. Example: **value** 1."},"prefix_plural":{"type":"string","description":"A string prepended to the beginning of a game statistic's value that is not exactly 1. Example: **values** 45."}},"required":["record_id","icon_id","format","aggregation","sorting","priority","display_name"]},"GameStatFormatMethod":{"type":"string","enum":["integer","float_1","float_2","float_3","duration_minute","duration_second","duration_hundredth_second"],"description":"A value denoting the format method of a game statistic."},"GameStatAggregationMethod":{"type":"string","enum":["sum","average","min","max"],"description":"A value denoting the aggregation method of a game statistic."},"GameStatSortingMethod":{"type":"string","enum":["desc","asc"],"description":"A value denoting the sorting method of a game statistic."},"GamesEnvironmentsCreateServiceTokenResponse":{"type":"object","properties":{"token":{"type":"string","description":"A JSON Web Token."}},"required":["token"]},"GeoCoord":{"type":"object","description":"Geographical coordinates for a location on Planet Earth.","properties":{"latitude":{"type":"number","format":"double"},"longitude":{"type":"number","format":"double"}},"required":["latitude","longitude"]},"GeoDistance":{"type":"object","description":"Distance available in multiple units.","properties":{"kilometers":{"type":"number","format":"double"},"miles":{"type":"number","format":"double"}},"required":["kilometers","miles"]},"GroupGroupSummary":{"type":"object","properties":{"group_id":{"type":"string","format":"uuid"},"display_name":{"$ref":"#/components/schemas/DisplayName"},"avatar_url":{"type":"string","description":"The URL of this group's avatar image."},"external":{"$ref":"#/components/schemas/GroupExternalLinks"},"is_developer":{"type":"boolean","description":"**Deprecated**\nWhether or not this group is a developer."},"bio":{"$ref":"#/components/schemas/Bio"},"is_current_identity_member":{"type":"boolean","description":"Whether or not the current identity is a member of this group."},"publicity":{"$ref":"#/components/schemas/GroupPublicity"},"member_count":{"type":"integer"},"owner_identity_id":{"type":"string","format":"uuid"}},"required":["group_id","display_name","external","is_developer","bio","is_current_identity_member","publicity","member_count","owner_identity_id"]},"GroupPublicity":{"type":"string","enum":["open","closed"],"description":"The current publicity value for the given group."},"GroupHandle":{"type":"object","description":"A group handle.","properties":{"group_id":{"type":"string","format":"uuid"},"display_name":{"$ref":"#/components/schemas/DisplayName"},"avatar_url":{"type":"string","description":"The URL of this group's avatar image"},"external":{"$ref":"#/components/schemas/GroupExternalLinks"},"is_developer":{"type":"boolean","description":"Whether or not this group is a developer group."}},"required":["group_id","display_name","external"]},"GroupExternalLinks":{"type":"object","description":"External links for this group.","properties":{"profile":{"type":"string","description":"A link to this group's profile page."}},"required":["profile"]},"GroupJoinRequest":{"type":"object","description":"A group join request.","properties":{"identity":{"$ref":"#/components/schemas/IdentityHandle"},"ts":{"$ref":"#/components/schemas/Timestamp"}},"required":["identity","ts"]},"GroupMember":{"type":"object","description":"A group member.","properties":{"identity":{"$ref":"#/components/schemas/IdentityHandle"}},"required":["identity"]},"GroupProfile":{"type":"object","description":"A list of group profiles.","properties":{"group_id":{"type":"string","format":"uuid"},"display_name":{"$ref":"#/components/schemas/DisplayName"},"avatar_url":{"type":"string","description":"The URL of this group's avatar image."},"external":{"$ref":"#/components/schemas/GroupExternalLinks"},"is_developer":{"type":"boolean","description":"Whether or not this group is a developer."},"bio":{"type":"string","description":"Detailed information about a profile."},"is_current_identity_member":{"type":"boolean","description":"Whether or not the current identity is a member of this group."},"publicity":{"$ref":"#/components/schemas/GroupPublicity"},"member_count":{"type":"integer","description":"Unsigned 32 bit integer."},"members":{"type":"array","items":{"$ref":"#/components/schemas/GroupMember"},"description":"A list of group members."},"join_requests":{"type":"array","items":{"$ref":"#/components/schemas/GroupJoinRequest"},"description":"A list of group join requests."},"is_current_identity_requesting_join":{"type":"boolean","description":"Whether or not the current identity is currently requesting to join this group."},"owner_identity_id":{"type":"string","format":"uuid"}},"required":["group_id","display_name","external","bio","publicity","members","join_requests","owner_identity_id"]},"GroupBannedIdentity":{"type":"object","description":"A banned identity.","properties":{"identity":{"$ref":"#/components/schemas/IdentityHandle"},"ban_ts":{"$ref":"#/components/schemas/Timestamp"}},"required":["identity","ban_ts"]},"GroupGetInviteResponse":{"type":"object","properties":{"group":{"$ref":"#/components/schemas/GroupHandle"}},"required":["group"]},"GroupConsumeInviteResponse":{"type":"object","properties":{"group_id":{"type":"string","format":"uuid"}}},"GroupCreateInviteRequest":{"type":"object","properties":{"ttl":{"type":"number","format":"double","description":"How long until the group invite expires (in milliseconds)."},"use_count":{"type":"number","format":"double","description":"How many times the group invite can be used."}}},"GroupCreateInviteResponse":{"type":"object","properties":{"code":{"type":"string","description":"The code that will be passed to `rivet.api.group#ConsumeInvite` to join a group."}},"required":["code"]},"GroupResolveJoinRequestRequest":{"type":"object","properties":{"resolution":{"type":"boolean"}}},"IdentityListActivitiesResponse":{"type":"object","properties":{"identities":{"type":"array","items":{"$ref":"#/components/schemas/IdentityHandle"}},"games":{"type":"array","items":{"$ref":"#/components/schemas/GameGameSummary"}},"suggested_groups":{"type":"array","items":{"$ref":"#/components/schemas/GroupGroupSummary"}},"suggested_players":{"type":"array","items":{"$ref":"#/components/schemas/IdentityHandle"}},"watch":{"$ref":"#/components/schemas/WatchResponse"}},"required":["identities","games","suggested_groups","suggested_players","watch"]},"IdentityGlobalEvent":{"type":"object","description":"An event relevant to the current identity.","properties":{"ts":{"$ref":"#/components/schemas/Timestamp"},"kind":{"$ref":"#/components/schemas/IdentityGlobalEventKind"},"notification":{"$ref":"#/components/schemas/IdentityGlobalEventNotification"}},"required":["ts","kind"]},"IdentityGlobalEventKind":{"type":"object","properties":{"identity_update":{"$ref":"#/components/schemas/IdentityGlobalEventIdentityUpdate"}}},"IdentityGlobalEventNotification":{"type":"object","description":"Notifications represent information that should be presented to the user\nimmediately.\nAt the moment, only chat message events have associated notifications.\n\n# Display\n\nNotifications should be displayed in an unobtrusive manner throughout the\nentire game. Notifications should disappear after a few seconds if not\ninteracted with.\n\n# Interactions\n\nIf your platform supports it, notifications should be able to be clicked or\ntapped in order to open the relevant context for the event.\nFor a simple implementation of notification interactions, open `url` in a\nweb browser to present the relevant context. For example, a chat message\nnotification will open the thread the chat message was sent in.\nFor advanced implementations that implement a custom chat UI, use\n`GlobalEvent.kind` to determine what action to take when the notification is interacted with.\nFor example, if the global event kind is `GlobalEventChatMessage`, then open\nthe chat UI for the given thread.","properties":{"title":{"type":"string"},"description":{"type":"string"},"thumbnail_url":{"type":"string","description":"URL to an image thumbnail that should be shown for this notification."},"url":{"type":"string","description":"Rivet Hub URL that holds the relevant context for this notification."}},"required":["title","description","thumbnail_url","url"]},"IdentityGlobalEventIdentityUpdate":{"type":"object","properties":{"identity":{"$ref":"#/components/schemas/IdentityProfile"}},"required":["identity"]},"IdentityUpdateGameActivity":{"type":"object","description":"Information about the identity's current game. This is information that all other identities can see about what the current identity is doing.","properties":{"message":{"type":"string","description":"A short message about the current game activity."},"public_metadata":{"description":"JSON data seen by anyone."},"mutual_metadata":{"description":"JSON data seen only by the given identity and their mutual followers."}}},"IdentityHandle":{"type":"object","description":"An identity handle.","properties":{"identity_id":{"type":"string","format":"uuid"},"display_name":{"$ref":"#/components/schemas/DisplayName"},"account_number":{"$ref":"#/components/schemas/AccountNumber"},"avatar_url":{"type":"string","description":"The URL of this identity's avatar image."},"is_registered":{"type":"boolean","description":"Whether or not this identity is registered with a linked account."},"external":{"$ref":"#/components/schemas/IdentityExternalLinks"}},"required":["identity_id","display_name","account_number","avatar_url","is_registered","external"]},"IdentitySummary":{"type":"object","description":"An identity summary.","properties":{"identity_id":{"type":"string","format":"uuid"},"display_name":{"$ref":"#/components/schemas/DisplayName"},"account_number":{"$ref":"#/components/schemas/AccountNumber"},"avatar_url":{"type":"string","description":"The URL of this identity's avatar image."},"is_registered":{"type":"boolean","description":"Whether or not this identity is registered with a linked account."},"external":{"$ref":"#/components/schemas/IdentityExternalLinks"},"following":{"type":"boolean","description":"Whether or not the requestee's identity is following this identity."},"is_following_me":{"type":"boolean","description":"Whether or not this identity is both following and is followed by the requestee's identity."},"is_mutual_following":{"type":"boolean"}},"required":["identity_id","display_name","account_number","avatar_url","is_registered","external","following","is_following_me","is_mutual_following"]},"IdentityProfile":{"type":"object","description":"An identity profile.","properties":{"identity_id":{"type":"string","format":"uuid"},"display_name":{"$ref":"#/components/schemas/DisplayName"},"account_number":{"$ref":"#/components/schemas/AccountNumber"},"avatar_url":{"type":"string","description":"The URL of this identity's avatar image."},"is_registered":{"type":"boolean","description":"Whether or not this identity is registered with a linked account."},"external":{"$ref":"#/components/schemas/IdentityExternalLinks"},"is_admin":{"type":"boolean","description":"Whether or not this identity is an admin."},"is_game_linked":{"type":"boolean","description":"Whether or not this game user has been linked through the Rivet dashboard."},"dev_state":{"$ref":"#/components/schemas/IdentityDevState","description":"**Deprecated**"},"follower_count":{"type":"integer","format":"int64"},"following_count":{"type":"integer","format":"int64"},"following":{"type":"boolean","description":"Whether or not the requestee's identity is following this identity."},"is_following_me":{"type":"boolean","description":"Whether or not this identity is both following and is followed by the requestee's identity."},"is_mutual_following":{"type":"boolean"},"join_ts":{"$ref":"#/components/schemas/Timestamp"},"bio":{"$ref":"#/components/schemas/Bio"},"linked_accounts":{"type":"array","items":{"$ref":"#/components/schemas/IdentityLinkedAccount"}},"groups":{"type":"array","items":{"$ref":"#/components/schemas/IdentityGroup"}},"games":{"type":"array","items":{"$ref":"#/components/schemas/GameStatSummary"}},"awaiting_deletion":{"type":"boolean","description":"Whether or not this identity is awaiting account deletion. Only visible to when the requestee is\nthis identity."}},"required":["identity_id","display_name","account_number","avatar_url","is_registered","external","is_admin","follower_count","following_count","following","is_following_me","is_mutual_following","join_ts","bio","linked_accounts","groups","games"]},"IdentityExternalLinks":{"type":"object","description":"External links for an identity.","properties":{"profile":{"type":"string","description":"A link to this identity's profile page."},"settings":{"type":"string","description":"A link to the Rivet settings page."}},"required":["profile"]},"IdentityStatus":{"type":"string","enum":["online","away","offline"],"description":"The current status of an identity. This helps players understand if another player is currently playing or has their game in the background."},"IdentityGameActivity":{"type":"object","description":"The game an identity is currently participating in.","properties":{"game":{"$ref":"#/components/schemas/GameHandle"},"message":{"type":"string","description":"A short activity message about the current game activity."},"public_metadata":{"description":"JSON data seen by anyone."},"mutual_metadata":{"description":"JSON data seen only by the given identity and their mutual followers."}},"required":["game","message"]},"IdentityGroup":{"type":"object","description":"A group that the given identity.","properties":{"group":{"$ref":"#/components/schemas/GroupHandle"}},"required":["group"]},"IdentityLinkedAccount":{"type":"object","description":"A union representing an identity's linked accounts.","properties":{"email":{"$ref":"#/components/schemas/IdentityEmailLinkedAccount"},"default_user":{"type":"boolean"}}},"IdentityEmailLinkedAccount":{"type":"object","description":"An identity's linked email.","properties":{"email":{"$ref":"#/components/schemas/Email"}},"required":["email"]},"IdentityDevState":{"type":"string","enum":["inactive","pending","accepted"],"description":"The state of the given identity's developer status."},"IdentityGameLinkStatus":{"type":"string","enum":["incomplete","complete","cancelled"]},"IdentityWatchEventsResponse":{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/IdentityGlobalEvent"}},"watch":{"$ref":"#/components/schemas/WatchResponse"}},"required":["events","watch"]},"MatchmakerLobbyInfo":{"type":"object","description":"A public lobby in the lobby list.","properties":{"region_id":{"type":"string"},"game_mode_id":{"type":"string"},"lobby_id":{"type":"string","format":"uuid"},"max_players_normal":{"type":"integer"},"max_players_direct":{"type":"integer"},"max_players_party":{"type":"integer"},"total_player_count":{"type":"integer"},"state":{}},"required":["region_id","game_mode_id","lobby_id","max_players_normal","max_players_direct","max_players_party","total_player_count"]},"MatchmakerGameModeInfo":{"type":"object","description":"A game mode that the player can join.","properties":{"game_mode_id":{"$ref":"#/components/schemas/Identifier"}},"required":["game_mode_id"]},"MatchmakerRegionInfo":{"type":"object","description":"A region that the player can connect to.","properties":{"region_id":{"$ref":"#/components/schemas/Identifier"},"provider_display_name":{"$ref":"#/components/schemas/DisplayName"},"region_display_name":{"$ref":"#/components/schemas/DisplayName"},"datacenter_coord":{"$ref":"#/components/schemas/GeoCoord"},"datacenter_distance_from_client":{"$ref":"#/components/schemas/GeoDistance"}},"required":["region_id","provider_display_name","region_display_name","datacenter_coord","datacenter_distance_from_client"]},"MatchmakerJoinLobby":{"type":"object","description":"A matchmaker lobby.","properties":{"lobby_id":{"type":"string","format":"uuid"},"region":{"$ref":"#/components/schemas/MatchmakerJoinRegion"},"ports":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/MatchmakerJoinPort"},"description":"**Deprecated**"},"player":{"$ref":"#/components/schemas/MatchmakerJoinPlayer","description":"**Deprecated**"}},"required":["lobby_id","region","ports","player"]},"MatchmakerJoinRegion":{"type":"object","description":"A matchmaker lobby region.","properties":{"region_id":{"$ref":"#/components/schemas/Identifier"},"display_name":{"$ref":"#/components/schemas/DisplayName"}},"required":["region_id","display_name"]},"MatchmakerJoinPort":{"type":"object","properties":{"host":{"type":"string","description":"The host for the given port. Will be null if using a port range."},"hostname":{"type":"string"},"port":{"type":"integer","description":"The port number for this lobby. Will be null if using a port range."},"port_range":{"$ref":"#/components/schemas/MatchmakerJoinPortRange"},"is_tls":{"type":"boolean","description":"Whether or not this lobby port uses TLS. You cannot mix a non-TLS and TLS ports."}},"required":["hostname","is_tls"]},"MatchmakerJoinPortRange":{"type":"object","description":"Inclusive range of ports that can be connected to.","properties":{"min":{"type":"integer","description":"Minimum port that can be connected to. Inclusive range."},"max":{"type":"integer","description":"Maximum port that can be connected to. Inclusive range."}},"required":["min","max"]},"MatchmakerJoinPlayer":{"type":"object","description":"A matchmaker lobby player.","properties":{"token":{"$ref":"#/components/schemas/Jwt","description":"Pass this token through the socket to the lobby server. The lobby server will validate this token with `PlayerConnected.player_token`"}},"required":["token"]},"MatchmakerCustomLobbyPublicity":{"type":"string","enum":["public","private"]},"MatchmakerFindLobbyResponse":{"type":"object","properties":{"lobby":{"$ref":"#/components/schemas/MatchmakerJoinLobby"},"ports":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/MatchmakerJoinPort"}},"player":{"$ref":"#/components/schemas/MatchmakerJoinPlayer"}},"required":["lobby","ports","player"]},"MatchmakerJoinLobbyResponse":{"type":"object","properties":{"lobby":{"$ref":"#/components/schemas/MatchmakerJoinLobby"},"ports":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/MatchmakerJoinPort"}},"player":{"$ref":"#/components/schemas/MatchmakerJoinPlayer"}},"required":["lobby","ports","player"]},"MatchmakerCreateLobbyResponse":{"type":"object","properties":{"lobby":{"$ref":"#/components/schemas/MatchmakerJoinLobby"},"ports":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/MatchmakerJoinPort"}},"player":{"$ref":"#/components/schemas/MatchmakerJoinPlayer"}},"required":["lobby","ports","player"]},"MatchmakerListLobbiesResponse":{"type":"object","properties":{"game_modes":{"type":"array","items":{"$ref":"#/components/schemas/MatchmakerGameModeInfo"}},"regions":{"type":"array","items":{"$ref":"#/components/schemas/MatchmakerRegionInfo"}},"lobbies":{"type":"array","items":{"$ref":"#/components/schemas/MatchmakerLobbyInfo"}}},"required":["game_modes","regions","lobbies"]},"MatchmakerGetStatisticsResponse":{"type":"object","properties":{"player_count":{"type":"integer","format":"int64"},"game_modes":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/MatchmakerGameModeStatistics"}}},"required":["player_count","game_modes"]},"MatchmakerGameModeStatistics":{"type":"object","properties":{"player_count":{"type":"integer","format":"int64"},"regions":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/MatchmakerRegionStatistics"}}},"required":["player_count","regions"]},"MatchmakerRegionStatistics":{"type":"object","properties":{"player_count":{"type":"integer","format":"int64"}},"required":["player_count"]},"MatchmakerListRegionsResponse":{"type":"object","properties":{"regions":{"type":"array","items":{"$ref":"#/components/schemas/MatchmakerRegionInfo"}}},"required":["regions"]},"PortalNotificationRegisterService":{"type":"object","properties":{"firebase":{"$ref":"#/components/schemas/PortalNotificationRegisterFirebaseService"}}},"PortalNotificationRegisterFirebaseService":{"type":"object","properties":{"access_key":{"type":"string"}},"required":["access_key"]},"PortalNotificationUnregisterService":{"type":"string","enum":["firebase"]},"PortalGetSuggestedGamesResponse":{"type":"object","properties":{"games":{"type":"array","items":{"$ref":"#/components/schemas/GameGameSummary"},"description":"A list of game summaries."},"watch":{"$ref":"#/components/schemas/WatchResponse"}},"required":["games","watch"]},"PortalGetGameProfileResponse":{"type":"object","properties":{"game":{"$ref":"#/components/schemas/GameProfile"},"watch":{"$ref":"#/components/schemas/WatchResponse"}},"required":["game","watch"]},"ProvisionPoolType":{"type":"string","enum":["job","gg","ats","pegboard","pegboard_isolate","fdb","worker","nats","guard"]},"ProvisionServer":{"type":"object","properties":{"server_id":{"type":"string","format":"uuid"},"datacenter_id":{"type":"string","format":"uuid"},"pool_type":{"$ref":"#/components/schemas/ProvisionPoolType"},"lan_ip":{"type":"string"},"wan_ip":{"type":"string"}},"required":["server_id","datacenter_id","pool_type"]},"RegionsRegion":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"RoutesRouteTargetActors":{"type":"object","description":"Configuration for targeting actors.","properties":{"selector_tags":{"type":"object","additionalProperties":{"type":"string"},"description":"Tags of actors to route requests to."}},"required":["selector_tags"]},"RoutesRouteTarget":{"type":"object","properties":{"actors":{"$ref":"#/components/schemas/RoutesRouteTargetActors","description":"Configuration for targeting actors."}}},"RoutesRoute":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"$ref":"#/components/schemas/Timestamp"},"updated_at":{"$ref":"#/components/schemas/Timestamp"},"hostname":{"type":"string"},"path":{"type":"string"},"route_subpaths":{"type":"boolean","description":"Whether to route all subpaths of this path"},"strip_prefix":{"type":"boolean","description":"Whether to remove the path prefix before sending the request to the target."},"target":{"$ref":"#/components/schemas/RoutesRouteTarget"}},"required":["id","created_at","updated_at","hostname","path","route_subpaths","strip_prefix","target"]},"ServersGetBuildResponse":{"type":"object","properties":{"build":{"$ref":"#/components/schemas/ServersBuild"}},"required":["build"]},"ServersListBuildsResponse":{"type":"object","properties":{"builds":{"type":"array","items":{"$ref":"#/components/schemas/ServersBuild"},"description":"A list of builds for the game associated with the token."}},"required":["builds"]},"ServersPatchBuildTagsRequest":{"type":"object","properties":{"tags":{},"exclusive_tags":{"type":"array","items":{"type":"string"},"description":"Removes the given tag keys from all other builds."}},"required":["tags"]},"ServersPatchBuildTagsResponse":{"type":"object","properties":{}},"ServersCreateBuildRequest":{"type":"object","properties":{"name":{"type":"string"},"image_tag":{"type":"string","description":"A tag given to the game build."},"image_file":{"$ref":"#/components/schemas/UploadPrepareFile"},"multipart_upload":{"type":"boolean"},"kind":{"$ref":"#/components/schemas/ServersBuildKind"},"compression":{"$ref":"#/components/schemas/ServersBuildCompression"},"prewarm_datacenters":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["name","image_tag","image_file"]},"ServersCreateBuildResponse":{"type":"object","properties":{"build":{"type":"string","format":"uuid"},"image_presigned_request":{"$ref":"#/components/schemas/UploadPresignedRequest"},"image_presigned_requests":{"type":"array","items":{"$ref":"#/components/schemas/UploadPresignedRequest"}}},"required":["build"]},"ServersBuildKind":{"type":"string","enum":["docker_image","oci_bundle"]},"ServersBuildCompression":{"type":"string","enum":["none","lz4"]},"ServersServer":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"environment":{"type":"string","format":"uuid"},"datacenter":{"type":"string","format":"uuid"},"tags":{},"runtime":{"$ref":"#/components/schemas/ServersRuntime"},"network":{"$ref":"#/components/schemas/ServersNetwork"},"resources":{"$ref":"#/components/schemas/ServersResources"},"lifecycle":{"$ref":"#/components/schemas/ServersLifecycle"},"created_at":{"type":"integer","format":"int64"},"started_at":{"type":"integer","format":"int64"},"destroyed_at":{"type":"integer","format":"int64"}},"required":["id","environment","datacenter","tags","runtime","network","resources","lifecycle","created_at"]},"ServersRuntime":{"type":"object","properties":{"build":{"type":"string","format":"uuid"},"arguments":{"type":"array","items":{"type":"string"}},"environment":{"type":"object","additionalProperties":{"type":"string"}}},"required":["build"]},"ServersLifecycle":{"type":"object","properties":{"kill_timeout":{"type":"integer","format":"int64","description":"The duration to wait for in milliseconds before killing the server. This should be set to a safe default, and can be overridden during a DELETE request if needed."}}},"ServersResources":{"type":"object","properties":{"cpu":{"type":"integer","description":"The number of CPU cores in millicores, or 1/1000 of a core. For example,\n1/8 of a core would be 125 millicores, and 1 core would be 1000\nmillicores."},"memory":{"type":"integer","description":"The amount of memory in megabytes"}},"required":["cpu","memory"]},"ServersNetwork":{"type":"object","properties":{"mode":{"$ref":"#/components/schemas/ServersNetworkMode"},"ports":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ServersPort"}}},"required":["ports"]},"ServersNetworkMode":{"type":"string","enum":["bridge","host"]},"ServersPort":{"type":"object","properties":{"protocol":{"$ref":"#/components/schemas/ServersPortProtocol"},"internal_port":{"type":"integer"},"public_hostname":{"type":"string"},"public_port":{"type":"integer"},"routing":{"$ref":"#/components/schemas/ServersPortRouting"}},"required":["protocol","routing"]},"ServersPortProtocol":{"type":"string","enum":["http","https","tcp","tcp_tls","udp"]},"ServersPortRouting":{"type":"object","properties":{"game_guard":{"$ref":"#/components/schemas/ServersGameGuardRouting"},"host":{"$ref":"#/components/schemas/ServersHostRouting"}}},"ServersGameGuardRouting":{"type":"object","properties":{}},"ServersHostRouting":{"type":"object","properties":{}},"ServersBuild":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"created_at":{"$ref":"#/components/schemas/Timestamp"},"content_length":{"type":"integer","format":"int64","description":"Unsigned 64 bit integer."},"tags":{"type":"object","additionalProperties":{"type":"string"},"description":"Tags of this build"}},"required":["id","name","created_at","content_length","tags"]},"ServersDatacenter":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"name":{"type":"string"}},"required":["id","slug","name"]},"ServersListDatacentersResponse":{"type":"object","properties":{"datacenters":{"type":"array","items":{"$ref":"#/components/schemas/ServersDatacenter"}}},"required":["datacenters"]},"ServersGetServerLogsResponse":{"type":"object","properties":{"lines":{"type":"array","items":{"type":"string"},"description":"Sorted old to new."},"timestamps":{"type":"array","items":{"type":"string"},"description":"Sorted old to new."},"watch":{"$ref":"#/components/schemas/WatchResponse"}},"required":["lines","timestamps","watch"]},"ServersLogStream":{"type":"string","enum":["std_out","std_err"]},"UploadPresignedRequest":{"type":"object","description":"A presigned request used to upload files. Upload your file to the given URL via a PUT request.","properties":{"path":{"type":"string","description":"The name of the file to upload. This is the same as the one given in the upload prepare file."},"url":{"type":"string","description":"The URL of the presigned request for which to upload your file to."},"byte_offset":{"type":"integer","format":"int64","description":"The byte offset for this multipart chunk. Always 0 if not a multipart upload."},"content_length":{"type":"integer","format":"int64","description":"Expected size of this upload."}},"required":["path","url","byte_offset","content_length"]},"UploadPrepareFile":{"type":"object","description":"A file being prepared to upload.","properties":{"path":{"type":"string","description":"The path/filename of the file."},"content_type":{"type":"string","description":"The MIME type of the file."},"content_length":{"type":"integer","format":"int64","description":"Unsigned 64 bit integer."}},"required":["path","content_length"]}}} \ No newline at end of file diff --git a/site/src/generated/apiPages.json b/site/src/generated/apiPages.json index 4f99ac2c65..c5d826674b 100644 --- a/site/src/generated/apiPages.json +++ b/site/src/generated/apiPages.json @@ -18,11 +18,26 @@ "href": "/docs/api/actors/logs/get", "sortingKey": "/actors/logs get" }, + { + "title": "actors.logs.export", + "href": "/docs/api/actors/logs/export", + "sortingKey": "/actors/logs/export post" + }, + { + "title": "actors.query", + "href": "/docs/api/actors/query", + "sortingKey": "/actors/query get" + }, { "title": "actors.upgradeAll", "href": "/docs/api/actors/upgrade-all", "sortingKey": "/actors/upgrade post" }, + { + "title": "actors.usage", + "href": "/docs/api/actors/usage", + "sortingKey": "/actors/usage get" + }, { "title": "actors.destroy", "href": "/docs/api/actors/destroy", @@ -98,6 +113,11 @@ "href": "/docs/api/routes/list", "sortingKey": "/routes get" }, + { + "title": "routes.history", + "href": "/docs/api/routes/history", + "sortingKey": "/routes/history get" + }, { "title": "routes.delete", "href": "/docs/api/routes/delete",