diff --git a/.dockerignore b/.dockerignore index 079814739b..caafd06a83 100644 --- a/.dockerignore +++ b/.dockerignore @@ -6,6 +6,7 @@ !sdks/full/rust/src !packages !resources/legacy/proto +!externals/ sdks/runtime svc/**/*.md diff --git a/.github/actions/docker-setup/action.yaml b/.github/actions/docker-setup/action.yaml new file mode 100644 index 0000000000..b9ba3a5d18 --- /dev/null +++ b/.github/actions/docker-setup/action.yaml @@ -0,0 +1,32 @@ +name: 'Docker Setup' +description: 'Set up Docker Buildx and log in to Docker Hub' +inputs: + docker_username: + description: 'Docker Hub username' + required: true + docker_password: + description: 'Docker Hub password' + required: true + github_token: + description: 'GitHub token' + required: true +runs: + using: 'composite' + steps: + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ inputs.docker_username }} + password: ${{ inputs.docker_password }} + + # This will be used as a secret to authenticate with Git repo pulls + - name: Create .netrc file + run: | + echo "machine github.com" > ${{ runner.temp }}/netrc + echo "login x-access-token" >> ${{ runner.temp }}/netrc + echo "password ${{ inputs.github_token }}" >> ${{ runner.temp }}/netrc + shell: bash + diff --git a/.github/workflows/bolt-check.yaml b/.github/workflows/bolt-check.yaml deleted file mode 100644 index ca0f0e6858..0000000000 --- a/.github/workflows/bolt-check.yaml +++ /dev/null @@ -1,46 +0,0 @@ -name: bolt-check - -on: push - -concurrency: - group: check-${{ github.ref }} - cancel-in-progress: true - -defaults: - run: - # Enable fail-fast behavior - shell: bash -e {0} - -env: - store: /home/runner/nix - -jobs: - check: - runs-on: [self-hosted, linux, x64] - - steps: - # MARK: Git - - name: Checkout - uses: actions/checkout@v4 - with: - token: ${{ secrets.GITHUB_TOKEN }} - submodules: recursive - - - uses: ./.github/actions/pre-init - with: - SCCACHE_AWS_SECRET_ACCESS_KEY: ${{ secrets.SCCACHE_AWS_SECRET_ACCESS_KEY }} - SCCACHE_AWS_ACCESS_KEY_ID: ${{ secrets.SCCACHE_AWS_ACCESS_KEY_ID }} - OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} - - - name: Bolt Change Project - run: nix-shell --pure --run "bolt config set-namespace ci" - - - name: Bolt Generate Project - run: nix-shell --pure --run "bolt gen project" - - - name: Bolt Check - run: nix-shell --pure --run "bolt check -g --validate-format" - - - name: Force Parallel Failure - if: failure() - uses: andymckay/cancel-action@0.3 diff --git a/.github/workflows/bolt-test.yaml b/.github/workflows/bolt-test.yaml deleted file mode 100644 index 9d062807c2..0000000000 --- a/.github/workflows/bolt-test.yaml +++ /dev/null @@ -1,50 +0,0 @@ -name: bolt-test - -on: workflow_dispatch - -concurrency: - group: check-${{ github.ref }} - cancel-in-progress: true - -defaults: - run: - # Enable fail-fast behavior - shell: bash -e {0} - -env: - store: /home/runner/nix - -jobs: - test: - runs-on: [self-hosted, linux, x64] - - steps: - # MARK: Git - - name: Checkout - uses: actions/checkout@v4 - with: - token: ${{ secrets.GITHUB_TOKEN }} - submodules: recursive - - - name: LFS - run: git lfs pull - - - uses: ./.github/actions/pre-init - with: - SCCACHE_AWS_SECRET_ACCESS_KEY: ${{ secrets.SCCACHE_AWS_SECRET_ACCESS_KEY }} - SCCACHE_AWS_ACCESS_KEY_ID: ${{ secrets.SCCACHE_AWS_ACCESS_KEY_ID }} - OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} - - - name: Bolt Init - run: nix-shell --pure --run "bolt init --yes ci" - - - name: Bolt Test - run: nix-shell --pure --run "bolt test" - - - name: K3D Cleanup - if: always() - run: nix-shell --pure --run "k3d cluster delete rivet-ci" - - - name: Force Parallel Failure - if: failure() - uses: andymckay/cancel-action@0.3 diff --git a/.github/workflows/detect-secrets.yaml b/.github/workflows/detect-secrets.yaml deleted file mode 100644 index 074072fc2a..0000000000 --- a/.github/workflows/detect-secrets.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: detect-secrets - -on: push - -jobs: - detect-secrets-scan: - runs-on: ubuntu-20.04 - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - - name: Install detect-secrets - run: pip install detect-secrets[gibberish]==1.4.0 - - - name: Check for new secrets - run: | - ./scripts/detect_secrets/check.sh diff --git a/.github/workflows/docker-publish.yaml b/.github/workflows/docker-publish.yaml deleted file mode 100644 index 97100ed9bc..0000000000 --- a/.github/workflows/docker-publish.yaml +++ /dev/null @@ -1,89 +0,0 @@ -name: docker-publish - -on: push - -defaults: - run: - # Enable fail-fast behavior - shell: bash -e {0} - -jobs: - rivet-local-binary-artifact-runner: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{github.actor}} - password: ${{secrets.GITHUB_TOKEN}} - - name: Build rivet-local-binary-artifact-runner - run: | - GHCR_TAG="ghcr.io/rivet-gg/rivet-local-binary-artifact-runner:$(git rev-parse --short HEAD)" - docker build -t "$GHCR_TAG" -f infra/docker/rivet_local_binary_artifact_runner/Dockerfile . - docker push "$GHCR_TAG" - - golang-migrate: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{github.actor}} - password: ${{secrets.GITHUB_TOKEN}} - - name: Build golang-migrate - run: | - GHCR_TAG="ghcr.io/rivet-gg/golang-migrate:$(git rev-parse --short HEAD)" - cd infra/docker/golang_migrate - docker build -t "$GHCR_TAG" . - docker push "$GHCR_TAG" - - redis: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{github.actor}} - password: ${{secrets.GITHUB_TOKEN}} - - name: Build redis - run: | - GHCR_TAG="ghcr.io/rivet-gg/redis:$(git rev-parse --short HEAD)" - cd infra/docker/redis - docker build -t "$GHCR_TAG" . - docker push "$GHCR_TAG" - - # HACK: Disabled by default because of how long it takes to rebuild. - # apache-traffic-server: - # runs-on: ubuntu-latest - - # steps: - # - name: Install Nix - # run: | - # curl -L https://nixos.org/nix/install | sh - # . /home/runner/.nix-profile/etc/profile.d/nix.sh - - # - uses: actions/checkout@v2 - - # - name: Login to GitHub Container Registry - # uses: docker/login-action@v2 - # with: - # registry: ghcr.io - # username: ${{github.actor}} - # password: ${{secrets.GITHUB_TOKEN}} - - # - name: Build apache-traffic-server - # run: | - # # Build - # . /home/runner/.nix-profile/etc/profile.d/nix.sh - # cd infra/docker/traffic_server - # nix-build docker.nix --option system-features kvm - # docker load < result - - # # Push - # GHCR_TAG="ghcr.io/rivet-gg/apache-traffic-server:$(git rev-parse --short HEAD)" - # echo "Tagging: $GHCR_TAG" - # docker tag apache-traffic-server:latest "$GHCR_TAG" - # docker push "$GHCR_TAG" diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml new file mode 100644 index 0000000000..afee27ebd4 --- /dev/null +++ b/.github/workflows/docker.yaml @@ -0,0 +1,214 @@ +name: docker + +on: + push: + branches: + - main + tags: + - '*' + # For testing: + # pull_request: + +jobs: + build-and-push-server: + strategy: + matrix: + include: + - platform: linux/arm64 + runner: [self-hosted, Linux, ARM64] + - platform: linux/x86_64 + runner: [self-hosted, Linux, X64] + runs-on: ${{ matrix.runner }} + steps: + - name: Setup Docker on macOS + if: runner.os == 'macOS' + uses: douglascamata/setup-docker-macos-action@v1-alpha + + - uses: actions/checkout@v4 + with: + submodules: true + + - uses: ./.github/actions/docker-setup + with: + docker_username: ${{ secrets.DOCKER_CI_USERNAME }} + docker_password: ${{ secrets.DOCKER_CI_ACCESS_TOKEN }} + github_token: ${{ secrets.GITHUB_TOKEN}} + + - name: Metadata (rivetgg/server:full) + id: meta-full + uses: docker/metadata-action@v4 + with: + images: rivetgg/rivet-server + tags: | + type=sha,prefix=full- + type=ref,event=branch,prefix=full- + type=ref,event=tag,prefix=full- + + - name: Build & Push (rivetgg/server:full) + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: ${{ steps.meta-full.outputs.tags }} + file: docker/server/Dockerfile + target: full + platforms: ${{ matrix.platform }} + secret-files: | + netrc=${{ runner.temp }}/netrc + + - name: Metadata (rivetgg/server:slim) + id: meta-slim + uses: docker/metadata-action@v4 + with: + images: rivetgg/rivet-server + tags: | + type=sha,prefix=slim- + type=ref,event=branch,prefix=slim- + type=ref,event=tag,prefix=slim- + + - name: Build & Push (rivetgg/server:slim) + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: ${{ steps.meta-slim.outputs.tags }} + file: docker/server/Dockerfile + target: slim + platforms: ${{ matrix.platform }} + secret-files: | + netrc=${{ runner.temp }}/netrc + + build-and-push-client: + strategy: + matrix: + include: + - platform: linux/arm64 + runner: [self-hosted, Linux, ARM64] + - platform: linux/x86_64 + runner: [self-hosted, Linux, X64] + runs-on: ${{ matrix.runner }} + steps: + - name: Setup Docker on macOS + if: runner.os == 'macOS' + uses: douglascamata/setup-docker-macos-action@v1-alpha + + - uses: actions/checkout@v4 + with: + submodules: true + + - uses: ./.github/actions/docker-setup + with: + docker_username: ${{ secrets.DOCKER_CI_USERNAME }} + docker_password: ${{ secrets.DOCKER_CI_ACCESS_TOKEN }} + github_token: ${{ secrets.GITHUB_TOKEN}} + + - name: Metadata (rivetgg/client:full-runner) + id: meta-full-runner + uses: docker/metadata-action@v4 + with: + images: rivetgg/rivet-client + tags: | + type=sha,prefix=full-runner- + type=ref,event=branch,prefix=full-runner- + type=ref,event=tag,prefix=full-runner- + + - name: Build & Push (rivetgg/client:full-runner) + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: ${{ steps.meta-full-runner.outputs.tags }} + file: docker/client/Dockerfile + target: full-runner + platforms: ${{ matrix.platform }} + secret-files: | + netrc=${{ runner.temp }}/netrc + + - name: Metadata (rivetgg/client:isolate-v8-runner) + id: meta-isolate-v8-runner + uses: docker/metadata-action@v4 + with: + images: rivetgg/rivet-client + tags: | + type=sha,prefix=isolate-v8-runner- + type=ref,event=branch,prefix=isolate-v8-runner- + type=ref,event=tag,prefix=isolate-v8-runner- + + - name: Build & Push (rivetgg/client:isolate-v8-runner) + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: ${{ steps.meta-isolate-v8-runner.outputs.tags }} + file: docker/client/Dockerfile + target: isolate-v8-runner + platforms: ${{ matrix.platform }} + secret-files: | + netrc=${{ runner.temp }}/netrc + + - name: Metadata (rivetgg/client:container-runner) + id: meta-container-runner + uses: docker/metadata-action@v4 + with: + images: rivetgg/rivet-client + tags: | + type=sha,prefix=container-runner- + type=ref,event=branch,prefix=container-runner- + type=ref,event=tag,prefix=container-runner- + + - name: Build & Push (rivetgg/client:container-runner) + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: ${{ steps.meta-container-runner.outputs.tags }} + file: docker/client/Dockerfile + target: container-runner + platforms: ${{ matrix.platform }} + secret-files: | + netrc=${{ runner.temp }}/netrc + + build-and-push-monolith: + strategy: + matrix: + include: + - platform: linux/arm64 + runner: [self-hosted, Linux, ARM64] + - platform: linux/x86_64 + runner: [self-hosted, Linux, X64] + runs-on: ${{ matrix.runner }} + steps: + - name: Setup Docker on macOS + if: runner.os == 'macOS' + uses: douglascamata/setup-docker-macos-action@v1-alpha + + - uses: actions/checkout@v4 + with: + submodules: true + + - uses: ./.github/actions/docker-setup + with: + docker_username: ${{ secrets.DOCKER_CI_USERNAME }} + docker_password: ${{ secrets.DOCKER_CI_ACCESS_TOKEN }} + github_token: ${{ secrets.GITHUB_TOKEN}} + + - name: Metadata (rivetgg/rivet) + id: meta-monolith + uses: docker/metadata-action@v4 + with: + images: rivetgg/rivet + tags: | + type=sha,prefix=monolith- + type=ref,event=branch,prefix=monolith- + type=ref,event=tag,prefix=monolith- + + - name: Build & Push (rivetgg/rivet) + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: ${{ steps.meta-monolith.outputs.tags }} + file: docker/monolith/Dockerfile + platforms: ${{ matrix.platform }} + secret-files: | + netrc=${{ runner.temp }}/netrc diff --git a/.github/workflows/fern.yaml b/.github/workflows/fern.yaml index fa7de7f52d..90c1262448 100644 --- a/.github/workflows/fern.yaml +++ b/.github/workflows/fern.yaml @@ -11,22 +11,16 @@ jobs: fern-check: runs-on: ubuntu-20.04 steps: - - name: Checkout repo - uses: actions/checkout@v4 - - - name: Install Fern - run: npm install -g fern-api - + - uses: actions/checkout@v4 + - run: npm install -g fern-api - name: Check Fern API is valid - run: fern check - - # TODO: Re-enable once https://github.com/fern-api/fern/pull/2551 is resolved - # - name: Verify generated code is up to date - # env: - # FERN_TOKEN: ${{ secrets.FERN_TOKEN }} - # run: | - # ./scripts/fern/gen.sh - # git --no-pager diff --exit-code + run: ./scripts/fern/check.sh + - name: Verify generated code is up to date + env: + FERN_TOKEN: ${{ secrets.FERN_TOKEN }} + run: | + ./scripts/fern/gen.sh + git --no-pager diff --exit-code fern-publish: runs-on: ubuntu-20.04 diff --git a/.github/workflows/format-check.yaml b/.github/workflows/format-check.yaml deleted file mode 100644 index d396096185..0000000000 --- a/.github/workflows/format-check.yaml +++ /dev/null @@ -1,19 +0,0 @@ -name: format-check - -on: push - -jobs: - prettier: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Setup node - uses: actions/setup-node@v3 - - - name: Install dependencies - run: yarn install --frozen-lockfile - - - name: Validate Prettier config - run: npx prettier@3.0 --check . diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yaml similarity index 92% rename from .github/workflows/release-please.yml rename to .github/workflows/release-please.yaml index 2276820f67..b07829a2f6 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yaml @@ -11,7 +11,7 @@ permissions: jobs: release-please: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: google-github-actions/release-please-action@v4 with: diff --git a/.github/workflows/rust.yaml b/.github/workflows/rust.yaml index d4a1af73a1..7679984d1d 100644 --- a/.github/workflows/rust.yaml +++ b/.github/workflows/rust.yaml @@ -1,26 +1,80 @@ name: rust -on: push +on: + pull_request: + push: + branches: + - main concurrency: group: rust-${{ github.ref }} cancel-in-progress: true +permissions: {} + defaults: run: # Enable fail-fast behavior shell: bash -e {0} +env: + # Disable incremental compilation for faster from-scratch builds + CARGO_INCREMENTAL: 0 + RUSTFLAGS: "--cfg tokio_unstable" + jobs: + cargo-fmt: + runs-on: ubuntu-20.04 + container: + image: rust:1.82.0 + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - run: rustup component add rustfmt + - run: cargo fmt --check + - run: cd packages/infra/client && cargo fmt --check + + cargo-check-main: + runs-on: [self-hosted, Linux] + container: + image: rust:1.82.0 + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - name: Install dependencies + run: | + apt-get update + apt-get install -y protobuf-compiler libpq-dev + - run: RUSTFLAGS="--cfg tokio_unstable" cargo check --release + + cargo-check-infra: + runs-on: [self-hosted, Linux] + container: + image: rust:1.82.0 + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - name: Install dependencies + run: | + apt-get update + apt-get install -y protobuf-compiler libpq-dev + - run: cd packages/infra/client && RUSTFLAGS="--cfg tokio_unstable" cargo check --release + cargo-deny: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 + container: + image: rust:1.82.0 steps: - uses: actions/checkout@v4 - - name: cargo deny (svc) - uses: EmbarkStudios/cargo-deny-action@v1 with: - manifest-path: svc/Cargo.toml - - name: cargo deny (lib/bolt) + submodules: true + - name: cargo deny + uses: EmbarkStudios/cargo-deny-action@v1 + - name: cargo deny (packages/infra/client) uses: EmbarkStudios/cargo-deny-action@v1 with: - manifest-path: lib/bolt/Cargo.toml + manifest-path: packages/infra/client/Cargo.toml + diff --git a/.github/workflows/service-containers-publish.yaml b/.github/workflows/service-containers-publish.yaml deleted file mode 100644 index 92072c0e60..0000000000 --- a/.github/workflows/service-containers-publish.yaml +++ /dev/null @@ -1,39 +0,0 @@ -name: service-containers-publish - -on: - push: - branches: - - main - -defaults: - run: - # Enable fail-fast behavior - shell: bash -e {0} - -env: - store: /home/runner/nix - -jobs: - service-containers-publish: - runs-on: [self-hosted, linux, x64] - - steps: - # MARK: Git - - name: Checkout - uses: actions/checkout@v4 - with: - token: ${{ secrets.GITHUB_TOKEN }} - submodules: recursive - - - uses: ./.github/actions/pre-init-distributed - with: - SCCACHE_AWS_SECRET_ACCESS_KEY: ${{ secrets.SCCACHE_AWS_SECRET_ACCESS_KEY }} - SCCACHE_AWS_ACCESS_KEY_ID: ${{ secrets.SCCACHE_AWS_ACCESS_KEY_ID }} - DOCKER_CI_ACCESS_TOKEN: ${{ secrets.DOCKER_CI_ACCESS_TOKEN }} - - - name: Bolt up and push containers - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - # Cannot use --pure `https://github.com/NixOS/nixpkgs/issues/66716` - run: nix-shell --run "bolt up --skip-deploy" diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000..3661097646 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,24 @@ +[submodule "externals/sqlx"] + path = externals/sqlx + url = https://github.com/rivet-gg/sqlx +[submodule "externals/nomad-client"] + path = externals/nomad-client + url = https://github.com/rivet-gg/nomad-client +[submodule "externals/deno"] + path = externals/deno + url = https://github.com/rivet-gg/deno +[submodule "externals/posthog-rs"] + path = externals/posthog-rs + url = https://github.com/rivet-gg/posthog-rs +[submodule "externals/cloudflare-rs"] + path = externals/cloudflare-rs + url = https://github.com/cloudflare/cloudflare-rs +[submodule "externals/rivet-term"] + path = externals/rivet-term + url = https://github.com/rivet-gg/rivet-term +[submodule "externals/redis-rs"] + path = externals/redis-rs + url = https://github.com/rivet-gg/redis-rs +[submodule "externals/serde_array_query"] + path = externals/serde_array_query + url = https://github.com/rivet-gg/serde_array_query diff --git a/Cargo.lock b/Cargo.lock index bcbc17fdc2..3be14faeb7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1105,7 +1105,6 @@ dependencies = [ [[package]] name = "async-posthog" version = "0.2.3" -source = "git+https://github.com/rivet-gg/posthog-rs.git?rev=ef4e80e#ef4e80e57747ea7204794bce9a103bfeccefabf1" dependencies = [ "posthog-core", "reqwest 0.11.27", @@ -1202,9 +1201,9 @@ dependencies = [ [[package]] name = "aws-sdk-s3" -version = "1.60.0" +version = "1.61.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0506cc60e392e33712d47717d5ae5760a3b134bf8ee7aea7e43df3d7e2669ae0" +checksum = "0e531658a0397d22365dfe26c3e1c0c8448bf6a3a2d8a098ded802f2b1261615" dependencies = [ "aws-credential-types", "aws-runtime", @@ -1705,9 +1704,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c" +checksum = "1a68f1f47cdf0ec8ee4b941b2eee2a80cb796db73118c0dd09ac63fbe405be22" dependencies = [ "memchr", ] @@ -1979,9 +1978,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.37" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40545c26d092346d8a8dab71ee48e7685a7a9cba76e634790c215b41a4a7b4cf" +checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47" dependencies = [ "jobserver", "libc", @@ -2465,9 +2464,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.20" +version = "4.5.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" +checksum = "fb3b4b9e5a7c7514dfa52869339ee98b3156b0bfb4e8a77c4ff4babb64b1604f" dependencies = [ "clap_builder", "clap_derive", @@ -2475,9 +2474,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.20" +version = "4.5.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" +checksum = "b17a95aa67cc7b5ebd32aa5370189aa0d79069ef1c64ce893bd30fb24bff20ec" dependencies = [ "anstream", "anstyle", @@ -2499,9 +2498,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" +checksum = "afb84c814227b90d6895e01398aee0d8033c00e7466aca416fb6a8e0eb19d8a7" [[package]] name = "clickhouse" @@ -2747,7 +2746,6 @@ dependencies = [ [[package]] name = "cloudflare" version = "0.12.0" -source = "git+https://github.com/cloudflare/cloudflare-rs.git?rev=f14720e42184ee176a97676e85ef2d2d85bc3aae#f14720e42184ee176a97676e85ef2d2d85bc3aae" dependencies = [ "chrono", "http 0.2.12", @@ -4096,9 +4094,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.34" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" +checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" dependencies = [ "crc32fast", "miniz_oxide", @@ -5082,7 +5080,7 @@ dependencies = [ "http 1.1.0", "hyper 1.5.0", "hyper-util", - "rustls 0.23.16", + "rustls 0.23.17", "rustls-pki-types", "tokio", "tokio-rustls 0.26.0", @@ -5571,7 +5569,7 @@ dependencies = [ "rivet-runtime", "rivet-test", "rivet-util-job", - "rustls 0.20.9", + "rustls 0.21.12", "serde", "serde_json", "serde_urlencoded", @@ -5625,9 +5623,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.162" +version = "0.2.164" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18d287de67fe55fd7e1581fe933d965a5a9477b38e949cfa9f8574ef01506398" +checksum = "433bfe06b8c75da9b2e3fbea6e5329ff87748f0b144ef75306e674c3f6f7c13f" [[package]] name = "libgit2-sys" @@ -6698,7 +6696,6 @@ dependencies = [ [[package]] name = "nomad_client" version = "1.1.4" -source = "git+https://github.com/rivet-gg/nomad-client?rev=abb66bf0c30c7ff5b0c695dae952481c33e538b5#abb66bf0c30c7ff5b0c695dae952481c33e538b5" dependencies = [ "reqwest 0.11.27", "serde", @@ -7282,7 +7279,6 @@ checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" [[package]] name = "posthog-core" version = "0.1.0" -source = "git+https://github.com/rivet-gg/posthog-rs.git?rev=ef4e80e#ef4e80e57747ea7204794bce9a103bfeccefabf1" dependencies = [ "chrono", "serde", @@ -7607,7 +7603,6 @@ dependencies = [ [[package]] name = "redis" version = "0.23.3" -source = "git+https://github.com/rivet-gg/redis-rs.git?rev=ac3e27fa1d133847db54354493f4d25957ad3466#ac3e27fa1d133847db54354493f4d25957ad3466" dependencies = [ "arc-swap", "async-trait", @@ -8571,7 +8566,6 @@ dependencies = [ [[package]] name = "rivet-term" version = "0.1.0" -source = "git+https://github.com/rivet-gg/rivet-term.git?rev=d539a07d2920d47b88410f20e6d106b497cff1f5#d539a07d2920d47b88410f20e6d106b497cff1f5" dependencies = [ "console", "derive_builder 0.12.0", @@ -8762,18 +8756,6 @@ dependencies = [ "webpki 0.21.4", ] -[[package]] -name = "rustls" -version = "0.20.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" -dependencies = [ - "log", - "ring 0.16.20", - "sct 0.7.1", - "webpki 0.22.4", -] - [[package]] name = "rustls" version = "0.21.12" @@ -8788,9 +8770,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.16" +version = "0.23.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eee87ff5d9b36712a58574e12e9f0ea80f915a5b0ac518d322b24a465617925e" +checksum = "7f1a745511c54ba6d4465e8d5dfbd81b45791756de28d4981af70d6dca128f1e" dependencies = [ "log", "once_cell", @@ -9025,7 +9007,6 @@ dependencies = [ [[package]] name = "serde_array_query" version = "0.2.0" -source = "git+https://github.com/rivet-gg/serde_array_query.git?rev=b9f8bfad77aea6f01dccc6cb77146b8c5daecaa3#b9f8bfad77aea6f01dccc6cb77146b8c5daecaa3" dependencies = [ "serde", "serde_urlencoded", @@ -9055,9 +9036,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.132" +version = "1.0.133" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" +checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" dependencies = [ "indexmap 2.6.0", "itoa 1.0.11", @@ -9357,7 +9338,6 @@ dependencies = [ [[package]] name = "sqlx" version = "0.8.2" -source = "git+https://github.com/rivet-gg/sqlx?rev=e7120f59b74fb6d83ac9b1d899b166bab31ba1d6#e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" dependencies = [ "sqlx-core", "sqlx-macros", @@ -9369,7 +9349,6 @@ dependencies = [ [[package]] name = "sqlx-core" version = "0.8.2" -source = "git+https://github.com/rivet-gg/sqlx?rev=e7120f59b74fb6d83ac9b1d899b166bab31ba1d6#e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" dependencies = [ "bit-vec", "bytes", @@ -9406,7 +9385,6 @@ dependencies = [ [[package]] name = "sqlx-macros" version = "0.8.2" -source = "git+https://github.com/rivet-gg/sqlx?rev=e7120f59b74fb6d83ac9b1d899b166bab31ba1d6#e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" dependencies = [ "proc-macro2", "quote", @@ -9418,7 +9396,6 @@ dependencies = [ [[package]] name = "sqlx-macros-core" version = "0.8.2" -source = "git+https://github.com/rivet-gg/sqlx?rev=e7120f59b74fb6d83ac9b1d899b166bab31ba1d6#e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" dependencies = [ "dotenvy", "either", @@ -9443,7 +9420,6 @@ dependencies = [ [[package]] name = "sqlx-mysql" version = "0.8.2" -source = "git+https://github.com/rivet-gg/sqlx?rev=e7120f59b74fb6d83ac9b1d899b166bab31ba1d6#e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" dependencies = [ "atoi", "base64 0.22.1", @@ -9485,7 +9461,6 @@ dependencies = [ [[package]] name = "sqlx-postgres" version = "0.8.2" -source = "git+https://github.com/rivet-gg/sqlx?rev=e7120f59b74fb6d83ac9b1d899b166bab31ba1d6#e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" dependencies = [ "atoi", "base64 0.22.1", @@ -9524,7 +9499,6 @@ dependencies = [ [[package]] name = "sqlx-sqlite" version = "0.8.2" -source = "git+https://github.com/rivet-gg/sqlx?rev=e7120f59b74fb6d83ac9b1d899b166bab31ba1d6#e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" dependencies = [ "atoi", "flume", @@ -10357,7 +10331,7 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.23.16", + "rustls 0.23.17", "rustls-pki-types", "tokio", ] @@ -10933,7 +10907,7 @@ dependencies = [ "flate2", "log", "once_cell", - "rustls 0.23.16", + "rustls 0.23.17", "rustls-pki-types", "url", "webpki-roots 0.26.6", diff --git a/Cargo.toml b/Cargo.toml index 2ad6289003..b6cfb4dac3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [workspace] resolver = "2" -# Find all packages with: find . -name Cargo.toml | grep -v resources | grep -v "sdks/runtime" | grep -v "sdks/full/rust-cli" | grep -v "infra/client/" | grep -v "infra/legacy/job-runner" | sed -E 's|^./(.*)Cargo\.toml$|"\1",|' +# Find all packages with: find . -name Cargo.toml | grep -v resources | grep -v externals | grep -v "sdks/runtime" | grep -v "sdks/full/rust-cli" | grep -v "infra/client/" | grep -v "infra/legacy/job-runner" | sed -E 's|^./(.*)Cargo\.toml$|"\1",|' members = [ "sdks/full/rust/", "packages/infra/server/", @@ -281,8 +281,20 @@ members = [ "packages/services/custom-user-avatar/ops/list-for-game/", "packages/services/custom-user-avatar/ops/upload-complete/", "packages/services/debug/ops/email-res/", -"packages/services/tier/", "packages/services/cloud/standalone/default-create" -, "packages/services/user"] +"packages/services/tier/", +"packages/services/cloud/standalone/default-create", +"packages/services/user", +] +exclude = [ +"externals/cloudflare-rs", +"externals/deno", +"externals/nomad-client", +"externals/posthog-rs", +"externals/redis-rs", +"externals/rivet-term", +"externals/serde_array_query", +"externals/sqlx", +] # Speed up compilation [profile.dev] diff --git a/deny.toml b/deny.toml index b66354d71e..2acd2eafe0 100644 --- a/deny.toml +++ b/deny.toml @@ -5,6 +5,13 @@ ignore = [ # webpki 0.21.4 only used by aws-smithy-client 0.41.0 in our deprecated # generated clients. This is used only for type ser/de and old tests. "RUSTSEC-2023-0052", + # rustls 0.19.1 is only used by aws-smithy-client in our deprecated + # generated clients. This is used only for type ser/de and old tests. + "RUSTSEC-2024-0336", + # Unmaintained, low-impact crates + "RUSTSEC-2020-0163", + "RUSTSEC-2024-0370", + "RUSTSEC-2024-0384", ] [licenses] @@ -20,8 +27,6 @@ allow = [ "Zlib", "EPL-2.0", ] - -# We use the same config to scan multiple projects unused-allowed-license = "allow" [[licenses.exceptions]] diff --git a/docker/README.md b/docker/README.md index 3f1b66c1f0..1f3d6c34e2 100644 --- a/docker/README.md +++ b/docker/README.md @@ -1,5 +1,24 @@ # Docker Configurations -- [dev-monolith](./dev-monolith/) is intended running a Rivet server to develop your application with. It can be used in an external Docker Compose. -- [dev-full](./dev-full/) is intended for developing Rivet itself +- [server](./server/) is the production-ready Rivet server. +- [client](./client/) is the production-ready Rivet client. +- [monolith](./dev-monolith/) is for running a Rivet server & client to develop your application with in a single container. It can also be used in an external Docker Compose. +- [dev-full](./dev-full/) (Docker Compose) is for testing & developing Rivet itself. + +## netrc & GitHub + +Rivet depends on cloning a lot of repos. GitHub rate limits these pulls, so we +have to authenticate with a GitHub Token in order to successfully build these +images in GitHub Actions. + +To do this, we generate a `.netrc` file with `secrets.GITHUB_TOKEN` (see +`.github/actions/docker-setup`). This file gets mounted as a Docker secret in +the build stage. + +It's important that we don't use an `ARG` or `COPY` for the secert nor write it +to the file system, since this might expose the token in the released image. In +theory, all Docker images use a separate runner build stage from the builder +stage so we _could_ write the token to the builder filesystem to simplify +things, but this risk should be avoided in case the wrong image gets pushed or +the wrong artifact ends up in the final image. diff --git a/docker/client/Dockerfile b/docker/client/Dockerfile new file mode 100644 index 0000000000..5ee6547df8 --- /dev/null +++ b/docker/client/Dockerfile @@ -0,0 +1,36 @@ +# MARK: Builder +FROM rust:1.82.0-bullseye AS builder + +RUN apt-get update && apt-get install --yes protobuf-compiler pkg-config libssl-dev g++ git libpq-dev wget && \ + ln -s /bin/g++ /bin/musl-g++ && \ + ln -s /bin/gcc-ar /bin/musl-ar + +WORKDIR /app +COPY . . +RUN \ + --mount=type=secret,id=netrc,target=/root/.netrc,mode=0600 \ + --mount=type=cache,target=/usr/local/cargo/git,id=client-cargo-git \ + --mount=type=cache,target=/usr/local/cargo/registry,id=client-cargo-registry \ + --mount=type=cache,target=/app/packages/infra/client/target,id=client-target \ + cd packages/infra/client && \ + RUSTFLAGS="--cfg tokio_unstable" cargo build -vv --release --bin rivet-client --bin rivet-isolate-v8-runner --bin rivet-container-runner && \ + mkdir -p /app/dist && \ + mv target/release/rivet-client target/release/rivet-isolate-v8-runner target/release/rivet-container-runner /app/dist/ + +# MARK: Runner (Full) +FROM debian:12-slim AS full-runner +RUN DEBIAN_FRONTEND=noninteractive apt-get update -y && apt-get install -y --no-install-recommends ca-certificates +COPY --from=builder /app/dist/rivet-client /app/dist/rivet-isolate-v8-runner /app/dist/rivet-container-runner /usr/local/bin/ +ENTRYPOINT ["rivet-client"] + +# MARK: Runner (Isolate V8) +FROM debian:12-slim AS isolate-v8-runner +RUN DEBIAN_FRONTEND=noninteractive apt-get update -y && apt-get install -y --no-install-recommends ca-certificates +COPY --from=builder /app/dist/rivet-isolate-v8-runner /usr/local/bin/ +ENTRYPOINT ["rivet-client"] + +# MARK: Runner (Container) +FROM debian:12-slim AS container-runner +RUN DEBIAN_FRONTEND=noninteractive apt-get update -y && apt-get install -y --no-install-recommends ca-certificates +COPY --from=builder /app/dist/rivet-container-runner /usr/local/bin/ +ENTRYPOINT ["rivet-client"] diff --git a/docker/client/Dockerfile.dockerignore b/docker/client/Dockerfile.dockerignore new file mode 100644 index 0000000000..892c380b4e --- /dev/null +++ b/docker/client/Dockerfile.dockerignore @@ -0,0 +1,11 @@ +* + +!Cargo.lock +!Cargo.toml +!packages +!resources/legacy/proto +!sdks/full/rust/Cargo.toml +!sdks/full/rust/src +!externals/ + +sdks/runtime diff --git a/docker/dev-full/README.md b/docker/dev-full/README.md index 9c5ccbd99c..1e48b6ff43 100644 --- a/docker/dev-full/README.md +++ b/docker/dev-full/README.md @@ -2,3 +2,107 @@ This Docker Compose is intended for running a full development environment for Rivet. +## Required ports + +The following ports need to be open before running Rivet: + +- 8080-8082 (Rivet server) +- 9000 (S3) +- 20000-20100 (Rivet client host networking) + +## Operation + +### Start + +Start the cluster with: + +```bash +docker-compose -f docker/dev-full/docker-compose.yml up -d +``` + +This will start the cluster in detached mode. Once complete, visit the dashboard at [http://localhost:8080](http://localhost:8080). + +To test creating an actor end-to-end, run: + +```bash +./scripts/manual_tests/actors_e2e_js.ts +``` + +You should see an actor in the actor list in the dashboard. + +### Stop + +To shut down the Rivet cluster, run: + +```bash +docker-compose -f docker/dev-full/docker-compose.yml down +``` + +When you start the cluster again, your data will still be there. + +### Nuke from orbit + +To destroy all containers & volumes immediately, run: + +```bash +docker-compose -f docker/dev-full/docker-compose.yml down -v -t 0 +``` + +## Development + +### Rebuilding + +To rebuild all services, run: + +```bash +docker-compose -f docker/dev-full/docker-compose.yml up -d --build +``` + +To rebuild just the server, run: + +```bash +docker-compose -f docker/dev-full/docker-compose.yml up -d --build rivet-server +``` + +### Logs + +To fetch logs for a service, run: + +```bash +docker-compose -f docker/dev-full/docker-compose.yml logs {name} +``` + +#### Following + +To follow logs, run: + +```bash +docker-compose -f docker/dev-full/docker-compose.yml logs -f {name} +``` + +#### Grep + +It's common to use grep (or the more modern +[ripgrep](https://www.google.com/search?q=ripgrep&oq=ripgrep&sourceid=chrome&ie=UTF-8)) +to filter logs. + +For example, to find all errors in `rivet-server` with the 10 preceding lines, run: + +```bash +docker-compose -f docker/dev-full/docker-compose.yml logs rivet-server | grep -B 10 level=error +``` + +Logs for `rivet-server` and `rivet-client` can also be configured via the environment. See [here](TODO) for more information. + +## Troubleshooting + +### Have you tried turning it off and on again? + +If something gets _really_ screwed up, you can destroy the entire cluster with: + +```bash +docker-compose -f docker/dev-full/docker-compose.yml down -v -t 0 +``` + +This will destroy all containers & volumes immediately. + diff --git a/docker/dev-full/client.Dockerfile b/docker/dev-full/client.Dockerfile index 5d9147f42f..160e25ffac 100644 --- a/docker/dev-full/client.Dockerfile +++ b/docker/dev-full/client.Dockerfile @@ -8,9 +8,10 @@ RUN apt-get update && apt-get install --yes protobuf-compiler pkg-config libssl- WORKDIR /app COPY . . RUN \ - --mount=type=cache,target=/usr/local/cargo/git \ - --mount=type=cache,target=/usr/local/cargo/registry \ - --mount=type=cache,target=/app/packages/infra/client/target \ + --mount=type=secret,id=netrc,target=/root/.netrc,mode=0600 \ + --mount=type=cache,target=/usr/local/cargo/git,id=dev-full-client-cargo-git \ + --mount=type=cache,target=/usr/local/cargo/registry,id=dev-full-client-cargo-registry \ + --mount=type=cache,target=/app/packages/infra/client/target,id=dev-full-client-target \ cd packages/infra/client && \ RUSTFLAGS="--cfg tokio_unstable" cargo build --bin rivet-client --bin rivet-isolate-v8-runner --bin rivet-container-runner && \ mkdir -p /app/dist && \ diff --git a/docker/dev-full/client.Dockerfile.dockerignore b/docker/dev-full/client.Dockerfile.dockerignore index 35d1dabaa4..48005c319b 100644 --- a/docker/dev-full/client.Dockerfile.dockerignore +++ b/docker/dev-full/client.Dockerfile.dockerignore @@ -7,6 +7,5 @@ !resources/legacy/proto !sdks/full/rust/Cargo.toml !sdks/full/rust/src -!svc sdks/runtime diff --git a/docker/dev-full/docker-compose.yml b/docker/dev-full/docker-compose.yml index 66d262ef74..37d43a4ede 100644 --- a/docker/dev-full/docker-compose.yml +++ b/docker/dev-full/docker-compose.yml @@ -22,8 +22,8 @@ services: condition: service_healthy redis: condition: service_healthy - clickhouse: - condition: service_healthy + # clickhouse: + # condition: service_healthy nats: condition: service_healthy # seaweedfs: @@ -35,7 +35,7 @@ services: networks: - rivet-network healthcheck: - test: ["CMD", "curl", "-f", "http://127.0.0.1:8090/health"] + test: ["CMD", "curl", "-f", "http://127.0.0.1:8090/health/liveness"] interval: 2s timeout: 10s retries: 10 @@ -140,7 +140,7 @@ services: command: | server \ -dir /var/lib/seaweedfs \ - -master.raftHashicorp \ + -master.raftBootstrap -master.raftHashicorp \ -s3 -s3.config /etc/seaweedfs/s3.json -s3.port=9000 -s3.allowEmptyFolder=false -s3.allowDeleteBucketNotEmpty=false volumes: - ./seaweedfs:/etc/seaweedfs:ro diff --git a/docker/dev-full/rivet-server/config.yaml b/docker/dev-full/rivet-server/config.yaml index 4f9fc457a2..bd2053f019 100644 --- a/docker/dev-full/rivet-server/config.yaml +++ b/docker/dev-full/rivet-server/config.yaml @@ -15,16 +15,16 @@ server: persistent: url: redis://redis:6379 password: password - clickhouse: - http_url: http://clickhouse:8123 - native_url: clickhouse://clickhouse:9000 - username: default - password: default - provision_users: - vector: - username: vector - password: vector - role: write + # clickhouse: + # http_url: http://clickhouse:8123 + # native_url: clickhouse://clickhouse:9000 + # username: default + # password: default + # provision_users: + # vector: + # username: vector + # password: vector + # role: write s3: region: us-east-1 endpoint_internal: http://seaweedfs:9000 diff --git a/docker/dev-full/server.Dockerfile b/docker/dev-full/server.Dockerfile index 5463865b36..d2768e290a 100644 --- a/docker/dev-full/server.Dockerfile +++ b/docker/dev-full/server.Dockerfile @@ -34,9 +34,9 @@ COPY . . # Build and copy all binaries from target directory into an empty image (it is not # included in the output because of cache mount) RUN \ - --mount=type=cache,target=/usr/local/cargo/git \ - --mount=type=cache,target=/usr/local/cargo/registry \ - --mount=type=cache,target=/app/target \ + --mount=type=cache,target=/usr/local/cargo/git,id=dev-full-server-cargo-git \ + --mount=type=cache,target=/usr/local/cargo/registry,id=dev-full-server-cargo-registry \ + --mount=type=cache,target=/app/target,id=dev-full-server-target \ RUSTFLAGS="--cfg tokio_unstable" cargo build --bin rivet-server && \ mv target/debug/rivet-server /usr/bin/rivet-server && \ mkdir /etc/rivet-server diff --git a/docker/dev-monolith/Dockerfile.dockerignore b/docker/dev-monolith/Dockerfile.dockerignore deleted file mode 100644 index 62523a4da4..0000000000 --- a/docker/dev-monolith/Dockerfile.dockerignore +++ /dev/null @@ -1,17 +0,0 @@ -* - -!Cargo.lock -!Cargo.toml -!sdks/full/rust/Cargo.toml -!sdks/full/rust/src -!packages -!resources/legacy/proto - -!docker/dev-monolith -docker/dev-monolith/Dockerfile -docker/dev-monolith/Dockerfile.dockerignore -docker/dev-monolith/*.md - -sdks/runtime -svc/**/*.md - diff --git a/docker/dev-monolith/Dockerfile b/docker/monolith/Dockerfile similarity index 75% rename from docker/dev-monolith/Dockerfile rename to docker/monolith/Dockerfile index fb461aedde..2cf64232d2 100644 --- a/docker/dev-monolith/Dockerfile +++ b/docker/monolith/Dockerfile @@ -20,11 +20,12 @@ WORKDIR /app COPY . . RUN \ - --mount=type=cache,target=/usr/local/cargo/git \ - --mount=type=cache,target=/usr/local/cargo/registry \ - --mount=type=cache,target=/app/target \ - RUSTFLAGS="--cfg tokio_unstable" cargo build --bin rivet-server && \ - mv target/debug/rivet-server /usr/bin/rivet-server + --mount=type=secret,id=netrc,target=/root/.netrc,mode=0600 \ + --mount=type=cache,target=/usr/local/cargo/git,id=monolith-server-cargo-git \ + --mount=type=cache,target=/usr/local/cargo/registry,id=monolith-server-cargo-registry \ + --mount=type=cache,target=/app/target,id=monolith-server-target \ + RUSTFLAGS="--cfg tokio_unstable" cargo build -vv --release --bin rivet-server && \ + mv target/release/rivet-server /usr/bin/rivet-server # MARK: Rivet Client Builder FROM rust:1.82.0-bullseye AS client-builder @@ -36,13 +37,14 @@ RUN apt-get update && apt-get install --yes protobuf-compiler pkg-config libssl- WORKDIR /app COPY . . RUN \ - --mount=type=cache,target=/usr/local/cargo/git \ - --mount=type=cache,target=/usr/local/cargo/registry \ - --mount=type=cache,target=/app/packages/infra/client/target \ + --mount=type=secret,id=netrc,target=/root/.netrc,mode=0600 \ + --mount=type=cache,target=/usr/local/cargo/git,id=monolith-client-cargo-git \ + --mount=type=cache,target=/usr/local/cargo/registry,id=monolith-client-cargo-registry \ + --mount=type=cache,target=/app/packages/infra/client/target,id=monolith-client-target \ cd packages/infra/client && \ - RUSTFLAGS="--cfg tokio_unstable" cargo build --bin rivet-client --bin rivet-isolate-v8-runner --bin rivet-container-runner && \ + RUSTFLAGS="--cfg tokio_unstable" cargo build -vv --release --bin rivet-client --bin rivet-isolate-v8-runner --bin rivet-container-runner && \ mkdir -p /app/dist && \ - mv target/debug/rivet-client target/debug/rivet-isolate-v8-runner target/debug/rivet-container-runner /app/dist/ + mv target/release/rivet-client target/release/rivet-isolate-v8-runner target/release/rivet-container-runner /app/dist/ # MARK: Runner # @@ -92,8 +94,8 @@ RUN useradd -m -s /bin/bash clickhouse && \ echo "deb [signed-by=/usr/share/keyrings/clickhouse-keyring.gpg] https://packages.clickhouse.com/deb stable main" | tee /etc/apt/sources.list.d/clickhouse.list && \ apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y clickhouse-client clickhouse-server -COPY ./docker/dev-monolith/clickhouse/config.xml /etc/clickhouse-server/config.d/config.xml -COPY ./docker/dev-monolith/clickhouse/users.xml /etc/clickhouse-server/users.d/users.xml +COPY ./docker/monolith/clickhouse/config.xml /etc/clickhouse-server/config.d/config.xml +COPY ./docker/monolith/clickhouse/users.xml /etc/clickhouse-server/users.d/users.xml # === NATS === RUN useradd -m -s /bin/bash nats && \ @@ -103,7 +105,7 @@ RUN useradd -m -s /bin/bash nats && \ # === SeaweedFS === RUN useradd -m -s /bin/bash seaweedfs && \ curl -sSLf https://github.com/seaweedfs/seaweedfs/releases/download/${SEAWEEDFS_VERSION}/linux_$(cat /tmp/arch).tar.gz | tar xz -C /usr/local/bin/ -COPY ./docker/dev-monolith/seaweedfs /etc/seaweedfs +COPY ./docker/monolith/seaweedfs /etc/seaweedfs # === Vector === RUN useradd -m -s /bin/bash vector-client && \ @@ -111,8 +113,8 @@ RUN useradd -m -s /bin/bash vector-client && \ curl -sSLf https://packages.timber.io/vector/${VECTOR_VERSION}/vector_${VECTOR_VERSION}-1_$(cat /tmp/arch).deb -o /tmp/vector.deb && \ dpkg -i /tmp/vector.deb && \ rm /tmp/vector.deb -COPY ./docker/dev-monolith/vector-client /etc/vector-client -COPY ./docker/dev-monolith/vector-server /etc/vector-server +COPY ./docker/monolith/vector-client /etc/vector-client +COPY ./docker/monolith/vector-server /etc/vector-server # === S6 Overlay === RUN curl -sSLf https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz -o /tmp/s6-overlay-noarch.tar.xz && \ @@ -121,17 +123,17 @@ RUN curl -sSLf https://github.com/just-containers/s6-overlay/releases/download/v tar -C / -Jxpf /tmp/s6-overlay-$(uname -m).tar.xz # Setup S6 -COPY ./docker/dev-monolith/scripts /tmp/scripts +COPY ./docker/monolith/scripts /tmp/scripts RUN deno run --allow-read --allow-write /tmp/scripts/setup_s6.ts # === Rivet Server === RUN useradd -m -s /bin/bash rivet-server -COPY ./docker/dev-monolith/rivet-server /etc/rivet-server +COPY ./docker/monolith/rivet-server /etc/rivet-server # === Rivet Client === # # Rivet Client runs as root. -COPY ./docker/dev-monolith/rivet-client /etc/rivet-client +COPY ./docker/monolith/rivet-client /etc/rivet-client # === Copy Build Artifacts === COPY --from=server-builder /usr/bin/rivet-server /usr/local/bin/ @@ -139,12 +141,6 @@ COPY --from=client-builder /app/dist/rivet-client /usr/local/bin/ COPY --from=client-builder /app/dist/rivet-isolate-v8-runner /usr/local/bin/ COPY --from=client-builder /app/dist/rivet-container-runner /usr/local/bin/ -# Default environment variables -ENV RUST_BACKTRACE=1 \ - RUST_LOG=debug,hyper=info \ - RUST_LOG_TARGET=1 \ - RUST_LOG_SPAN_PATH=1 - # Expose ports VOLUME ["/data"] EXPOSE 8080 8081 8082 8080 20000-20100 diff --git a/docker/monolith/Dockerfile.dockerignore b/docker/monolith/Dockerfile.dockerignore new file mode 100644 index 0000000000..6efd3238e3 --- /dev/null +++ b/docker/monolith/Dockerfile.dockerignore @@ -0,0 +1,17 @@ +* + +!Cargo.lock +!Cargo.toml +!sdks/full/rust/Cargo.toml +!sdks/full/rust/src +!packages +!resources/legacy/proto +!externals/ + +!docker/monolith +docker/monolith/Dockerfile +docker/monolith/Dockerfile.dockerignore +docker/monolith/*.md + +sdks/runtime + diff --git a/docker/dev-monolith/README.md b/docker/monolith/README.md similarity index 86% rename from docker/dev-monolith/README.md rename to docker/monolith/README.md index 60700137e2..3e60b581e3 100644 --- a/docker/dev-monolith/README.md +++ b/docker/monolith/README.md @@ -9,7 +9,7 @@ This container is intended for quickly running Rivet with a single `docker run` Before running the image, it needs to be built: ```bash -docker build -f docker/dev-monolith/Dockerfile -t rivet . +docker build -f docker/monolith/Dockerfile -t rivet . ``` ### Run via `docker run` @@ -62,7 +62,7 @@ vector top --url http://0.0.0.0:9510/graphql ## Testing ```bash -docker build -f docker/dev-monolith/Dockerfile -t rivet . && docker run --name rivet --rm -v "/tmp/rivet-data:/data" -p 8080:8080 -p 9000:9000 -p 20000-20100:20000-20100 rivet +docker build -f docker/monolith/Dockerfile -t rivet . && docker run --name rivet --rm -v "/tmp/rivet-data:/data" -p 8080:8080 -p 9000:9000 -p 20000-20100:20000-20100 rivet ``` ## Port collisions diff --git a/docker/dev-monolith/clickhouse/config.xml b/docker/monolith/clickhouse/config.xml similarity index 100% rename from docker/dev-monolith/clickhouse/config.xml rename to docker/monolith/clickhouse/config.xml diff --git a/docker/dev-monolith/clickhouse/users.xml b/docker/monolith/clickhouse/users.xml similarity index 100% rename from docker/dev-monolith/clickhouse/users.xml rename to docker/monolith/clickhouse/users.xml diff --git a/docker/dev-monolith/rivet-client/config.yaml b/docker/monolith/rivet-client/config.yaml similarity index 100% rename from docker/dev-monolith/rivet-client/config.yaml rename to docker/monolith/rivet-client/config.yaml diff --git a/docker/dev-monolith/rivet-server/config.yaml b/docker/monolith/rivet-server/config.yaml similarity index 100% rename from docker/dev-monolith/rivet-server/config.yaml rename to docker/monolith/rivet-server/config.yaml diff --git a/docker/dev-monolith/scripts/deno.jsonc b/docker/monolith/scripts/deno.jsonc similarity index 100% rename from docker/dev-monolith/scripts/deno.jsonc rename to docker/monolith/scripts/deno.jsonc diff --git a/docker/dev-monolith/scripts/setup_s6.ts b/docker/monolith/scripts/setup_s6.ts similarity index 100% rename from docker/dev-monolith/scripts/setup_s6.ts rename to docker/monolith/scripts/setup_s6.ts diff --git a/docker/dev-monolith/seaweedfs/s3.json b/docker/monolith/seaweedfs/s3.json similarity index 100% rename from docker/dev-monolith/seaweedfs/s3.json rename to docker/monolith/seaweedfs/s3.json diff --git a/docker/dev-monolith/vector-client/vector.yaml b/docker/monolith/vector-client/vector.yaml similarity index 100% rename from docker/dev-monolith/vector-client/vector.yaml rename to docker/monolith/vector-client/vector.yaml diff --git a/docker/dev-monolith/vector-server/vector.yaml b/docker/monolith/vector-server/vector.yaml similarity index 100% rename from docker/dev-monolith/vector-server/vector.yaml rename to docker/monolith/vector-server/vector.yaml diff --git a/docker/server/Dockerfile b/docker/server/Dockerfile new file mode 100644 index 0000000000..9836f6966a --- /dev/null +++ b/docker/server/Dockerfile @@ -0,0 +1,72 @@ +# syntax=docker/dockerfile:1.2 + +# MARK: Builder +FROM rust:1.82.0-slim AS build + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y \ + protobuf-compiler \ + pkg-config \ + libssl-dev \ + g++ \ + git \ + libpq-dev \ + wget \ + ca-certificates \ + openssl \ + curl \ + gpg + +WORKDIR /app + +COPY . . + +# Build and copy all binaries from target directory into an empty image (it is not +# included in the output because of cache mount) +RUN \ + --mount=type=secret,id=netrc,target=/root/.netrc,mode=0600 \ + --mount=type=cache,target=/usr/local/cargo/git,id=server-cargo-git \ + --mount=type=cache,target=/usr/local/cargo/registry,id=server-cargo-registry \ + --mount=type=cache,target=/app/target,id=server-target \ + RUSTFLAGS="--cfg tokio_unstable" cargo build -vv --bin rivet-server --release && \ + mv target/release/rivet-server /usr/bin/rivet-server && \ + mkdir /etc/rivet-server + +# MARK: Full +FROM debian:12.1-slim AS full + +# - Install curl for health checks +# - Install go-migrate for running migrations +# - Install database clients to be able to run `rivet db shell ...` (Redis, Postgres, ClickHouse) +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y \ + ca-certificates \ + openssl \ + curl \ + redis-tools \ + postgresql-client \ + gpg && \ + curl -fsSL 'https://packages.clickhouse.com/rpm/lts/repodata/repomd.xml.key' | gpg --dearmor -o /usr/share/keyrings/clickhouse-keyring.gpg && \ + echo "deb [signed-by=/usr/share/keyrings/clickhouse-keyring.gpg] https://packages.clickhouse.com/deb stable main" | tee /etc/apt/sources.list.d/clickhouse.list && \ + apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y clickhouse-client && \ + (curl -L https://github.com/golang-migrate/migrate/releases/download/v4.18.1/migrate.linux-amd64.tar.gz | tar xvz) && \ + mv migrate /usr/local/bin/migrate && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +COPY --from=build /usr/bin/rivet-server /usr/bin/rivet-server + +CMD ["/usr/bin/rivet-server"] + +# MARK: Slim +FROM debian:12.1-slim AS slim + +RUN DEBIAN_FRONTEND=noninteractive apt-get update -y && \ + apt-get install -y --no-install-recommends ca-certificates openssl && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +COPY --from=build /usr/bin/rivet-server /usr/bin/rivet-server + +CMD ["/usr/bin/rivet-server"] diff --git a/docs-internal/infrastructure/rust/GIT_DEPENDENCIES.md b/docs-internal/infrastructure/rust/GIT_DEPENDENCIES.md new file mode 100644 index 0000000000..d1c57cf46d --- /dev/null +++ b/docs-internal/infrastructure/rust/GIT_DEPENDENCIES.md @@ -0,0 +1,13 @@ +# Git Dependencies + +We opt to use submodules instead of Git dependencies because of complications with building: + +- Primariy, there are bugs with the Cargo git fetcher that cause it to not be + able to pull from GitHub Actions +- Development on externals is easier when developing in-place with a Git + submodule instead of having to push & update the ref every iteration +- Authenticating Git inside of a Docker build step is dangerous process that + can lead to accidentally leaking credentials + - Currently, we support mounting a netrc secret which is safe, but this + doesn't seem to solve the bugs with the Cargo git fetcher + diff --git a/docs-internal/processes/GITHUB_ACTIONS.md b/docs-internal/processes/GITHUB_ACTIONS.md new file mode 100644 index 0000000000..42b8c85a6d --- /dev/null +++ b/docs-internal/processes/GITHUB_ACTIONS.md @@ -0,0 +1,22 @@ +# GitHub Actions + +## When to use self hosted vs managed runners + +**Managed runners** + +Managed runners are good for running bursts of jobs in parallel, quickly. + +Use these for low-CPU intensive jobs, like formatting, linting, etc. Using +these for resource-hungry jobs will make those jobs take a long time and cost a +lot of money. + +**Self-hosted Runners** + +Self-hosted runners are good for running hardware intensive jobs quickly. +However, they have a fixed number of nodes that can run one job at a time each, +so we want to (a) always target 100% resource usage and (b) maintain as few of +these as possible in order to keep them cheap. + +Use these for CPU- & memory-intensive jobs. Using these for low-CPU intensive +jobs will cause jobs to queue up and take a long time to complete. + diff --git a/docs/scripts/buildcf.sh b/docs/scripts/buildcf.sh index df0712f5a3..1c6e866706 100755 --- a/docs/scripts/buildcf.sh +++ b/docs/scripts/buildcf.sh @@ -1,7 +1,10 @@ #!/bin/sh +set -euf + # Clone modules repository to parent directory -cd .. -git clone https://github.com/rivet-gg/modules.git --depth=1 --branch main -cd repo +( + cd .. && + git clone https://github.com/rivet-gg/modules.git --depth=1 --branch main +) yarn -next build && cp _redirects out/_redirects \ No newline at end of file +npx next build && cp _redirects out/_redirects diff --git a/docs/src/app/(v2)/docs/[...slug]/layout.tsx b/docs/src/app/(v2)/docs/[...slug]/layout.tsx index f591f4c67b..9a989fc618 100644 --- a/docs/src/app/(v2)/docs/[...slug]/layout.tsx +++ b/docs/src/app/(v2)/docs/[...slug]/layout.tsx @@ -8,8 +8,8 @@ function Subnav({ slug }) { const fullPath = `/docs/${slug.join('/')}`; return (
- {sitemap.map(({ title, href, sidebar }) => ( - {title} + {sitemap.map(({ title, href, sidebar }, i) => ( + {title} ))}
); diff --git a/docs/src/authors/forest-anderson/avatar.jpeg b/docs/src/authors/forest-anderson/avatar.jpeg index add0082dfa..8bc4e62f79 100644 Binary files a/docs/src/authors/forest-anderson/avatar.jpeg and b/docs/src/authors/forest-anderson/avatar.jpeg differ diff --git a/docs/src/authors/nathan-flurry/avatar.jpeg b/docs/src/authors/nathan-flurry/avatar.jpeg index 294284d5e9..521e661c18 100644 Binary files a/docs/src/authors/nathan-flurry/avatar.jpeg and b/docs/src/authors/nathan-flurry/avatar.jpeg differ diff --git a/docs/src/authors/nicholas-kissel/avatar.jpeg b/docs/src/authors/nicholas-kissel/avatar.jpeg index 748d1c839c..ce765264c0 100644 Binary files a/docs/src/authors/nicholas-kissel/avatar.jpeg and b/docs/src/authors/nicholas-kissel/avatar.jpeg differ diff --git a/docs/src/sitemap/mod.ts b/docs/src/sitemap/mod.ts index 5acdcf1cc5..567cdaa61f 100644 --- a/docs/src/sitemap/mod.ts +++ b/docs/src/sitemap/mod.ts @@ -10,7 +10,7 @@ import { Sitemap, SiteTab } from '@/lib/sitemap'; // - Does it work for my use cases -> Use Cases // - Curious about the technology -> Build with Rivet // - Just want to jump in -// - Poeple who want to run Open Source +// - People who want to run Open Source export const sitemap = [ { diff --git a/externals/cloudflare-rs b/externals/cloudflare-rs new file mode 160000 index 0000000000..f14720e421 --- /dev/null +++ b/externals/cloudflare-rs @@ -0,0 +1 @@ +Subproject commit f14720e42184ee176a97676e85ef2d2d85bc3aae diff --git a/externals/deno b/externals/deno new file mode 160000 index 0000000000..bd98563214 --- /dev/null +++ b/externals/deno @@ -0,0 +1 @@ +Subproject commit bd98563214c532c8dae97d918edb501fe1c72dbc diff --git a/externals/nomad-client b/externals/nomad-client new file mode 160000 index 0000000000..abb66bf0c3 --- /dev/null +++ b/externals/nomad-client @@ -0,0 +1 @@ +Subproject commit abb66bf0c30c7ff5b0c695dae952481c33e538b5 diff --git a/externals/posthog-rs b/externals/posthog-rs new file mode 160000 index 0000000000..ef4e80e577 --- /dev/null +++ b/externals/posthog-rs @@ -0,0 +1 @@ +Subproject commit ef4e80e57747ea7204794bce9a103bfeccefabf1 diff --git a/externals/redis-rs b/externals/redis-rs new file mode 160000 index 0000000000..ac3e27fa1d --- /dev/null +++ b/externals/redis-rs @@ -0,0 +1 @@ +Subproject commit ac3e27fa1d133847db54354493f4d25957ad3466 diff --git a/externals/rivet-term b/externals/rivet-term new file mode 160000 index 0000000000..d539a07d29 --- /dev/null +++ b/externals/rivet-term @@ -0,0 +1 @@ +Subproject commit d539a07d2920d47b88410f20e6d106b497cff1f5 diff --git a/externals/serde_array_query b/externals/serde_array_query new file mode 160000 index 0000000000..b9f8bfad77 --- /dev/null +++ b/externals/serde_array_query @@ -0,0 +1 @@ +Subproject commit b9f8bfad77aea6f01dccc6cb77146b8c5daecaa3 diff --git a/externals/sqlx b/externals/sqlx new file mode 160000 index 0000000000..e7120f59b7 --- /dev/null +++ b/externals/sqlx @@ -0,0 +1 @@ +Subproject commit e7120f59b74fb6d83ac9b1d899b166bab31ba1d6 diff --git a/packages/api/traefik-provider/Cargo.toml b/packages/api/traefik-provider/Cargo.toml index d6b6544a6c..304de1374d 100644 --- a/packages/api/traefik-provider/Cargo.toml +++ b/packages/api/traefik-provider/Cargo.toml @@ -43,8 +43,7 @@ rivet-config = { version = "0.1.0", path = "../../common/config" } rivet-env = { version = "0.1.0", path = "../../common/env" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../externals/sqlx" default-features = false features = ["json"] diff --git a/packages/common/api-helper/build/Cargo.toml b/packages/common/api-helper/build/Cargo.toml index 628d0964b8..a798393685 100644 --- a/packages/common/api-helper/build/Cargo.toml +++ b/packages/common/api-helper/build/Cargo.toml @@ -51,8 +51,7 @@ url = "2.2.2" uuid = { version = "1", features = ["v4"] } [dependencies.serde_array_query] -git = "https://github.com/rivet-gg/serde_array_query.git" -rev = "b9f8bfad77aea6f01dccc6cb77146b8c5daecaa3" # pragma: allowlist secret +path = "../../../../externals/serde_array_query" [dev-dependencies] chirp-worker = { path = "../../chirp/worker" } diff --git a/packages/common/cache/build/Cargo.toml b/packages/common/cache/build/Cargo.toml index 5b7eb61b82..651105becd 100644 --- a/packages/common/cache/build/Cargo.toml +++ b/packages/common/cache/build/Cargo.toml @@ -26,8 +26,7 @@ uuid = { version = "1", features = ["v4"] } [dependencies.redis] # TODO: https://github.com/rivet-gg/rivet/issues/508 -git = "https://github.com/rivet-gg/redis-rs.git" -rev = "ac3e27fa1d133847db54354493f4d25957ad3466" +path = "../../../../externals/redis-rs/redis" default-features = false features = [ "keep-alive", diff --git a/packages/common/chirp-workflow/core/Cargo.toml b/packages/common/chirp-workflow/core/Cargo.toml index 6dbd85f456..4a6e4a266b 100644 --- a/packages/common/chirp-workflow/core/Cargo.toml +++ b/packages/common/chirp-workflow/core/Cargo.toml @@ -38,8 +38,7 @@ tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } uuid = { version = "1.8.0", features = ["v4", "serde"] } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../externals/sqlx" default-features = false features = [ "runtime-tokio", diff --git a/packages/common/chirp/perf/Cargo.toml b/packages/common/chirp/perf/Cargo.toml index db64d9266d..3b58865850 100644 --- a/packages/common/chirp/perf/Cargo.toml +++ b/packages/common/chirp/perf/Cargo.toml @@ -22,8 +22,7 @@ features = ["v4", "serde"] [dependencies.redis] # TODO: https://github.com/rivet-gg/rivet/issues/508 -git = "https://github.com/rivet-gg/redis-rs.git" -rev = "ac3e27fa1d133847db54354493f4d25957ad3466" +path = "../../../../externals/redis-rs/redis" default-features = false features = [ "keep-alive", diff --git a/packages/common/chirp/worker/Cargo.toml b/packages/common/chirp/worker/Cargo.toml index 73a96a5c52..4071f504bf 100644 --- a/packages/common/chirp/worker/Cargo.toml +++ b/packages/common/chirp/worker/Cargo.toml @@ -50,8 +50,7 @@ features = ["v4", "serde"] [dependencies.redis] # TODO: https://github.com/rivet-gg/rivet/issues/508 -git = "https://github.com/rivet-gg/redis-rs.git" -rev = "ac3e27fa1d133847db54354493f4d25957ad3466" +path = "../../../../externals/redis-rs/redis" default-features = false features = [ "keep-alive", diff --git a/packages/common/nomad-util/Cargo.toml b/packages/common/nomad-util/Cargo.toml index 4c821ca7e0..c969c89143 100644 --- a/packages/common/nomad-util/Cargo.toml +++ b/packages/common/nomad-util/Cargo.toml @@ -22,5 +22,4 @@ tracing = "0.1" [dependencies.nomad_client_new] package = "nomad_client" -git = "https://github.com/rivet-gg/nomad-client" -rev = "abb66bf0c30c7ff5b0c695dae952481c33e538b5" # pragma: allowlist secret +path = "../../../externals/nomad-client" diff --git a/packages/common/pools/Cargo.toml b/packages/common/pools/Cargo.toml index 9de05e669f..710fbf386c 100644 --- a/packages/common/pools/Cargo.toml +++ b/packages/common/pools/Cargo.toml @@ -24,8 +24,7 @@ url = "2.4" rivet-config = { version = "0.1.0", path = "../config" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../externals/sqlx" default-features = false features = [ "runtime-tokio", @@ -40,8 +39,7 @@ features = [ [dependencies.redis] # TODO: https://github.com/rivet-gg/rivet/issues/508 -git = "https://github.com/rivet-gg/redis-rs.git" -rev = "ac3e27fa1d133847db54354493f4d25957ad3466" +path = "../../../externals/redis-rs/redis" default-features = false features = [ "keep-alive", diff --git a/packages/common/redis-util/Cargo.toml b/packages/common/redis-util/Cargo.toml index 0b377b2f94..ae41becf99 100644 --- a/packages/common/redis-util/Cargo.toml +++ b/packages/common/redis-util/Cargo.toml @@ -11,7 +11,6 @@ regex = "1.5" [dependencies.redis] # TODO: https://github.com/rivet-gg/rivet/issues/508 -git = "https://github.com/rivet-gg/redis-rs.git" -rev = "ac3e27fa1d133847db54354493f4d25957ad3466" +path = "../../../externals/redis-rs/redis" default-features = false diff --git a/packages/common/util/core/Cargo.toml b/packages/common/util/core/Cargo.toml index 7f2e49e05e..1f45e9025c 100644 --- a/packages/common/util/core/Cargo.toml +++ b/packages/common/util/core/Cargo.toml @@ -39,8 +39,7 @@ types-proto = { path = "../../types-proto/core" } uuid = { version = "1", features = ["v4", "serde"] } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../externals/sqlx" default-features = false features = [ "runtime-tokio", diff --git a/packages/infra/client/Cargo.lock b/packages/infra/client/Cargo.lock index fd143561fc..665490925d 100644 --- a/packages/infra/client/Cargo.lock +++ b/packages/infra/client/Cargo.lock @@ -141,9 +141,9 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.18" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +checksum = "45862d1c77f2228b9e10bc609d5bc203d86ebc9b87ad8d5d5167a6c9abf739d9" [[package]] name = "android-tzdata" @@ -162,9 +162,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.91" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c042108f3ed77fd83760a5fd79b53be043192bb3b9dba91d8c574c0ada7850c8" +checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" [[package]] name = "arraydeque" @@ -244,7 +244,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -280,7 +280,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -291,7 +291,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -428,13 +428,13 @@ dependencies = [ "lazy_static", "lazycell", "log", - "prettyplease 0.2.24", + "prettyplease 0.2.25", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", - "syn 2.0.82", + "syn 2.0.87", "which 4.4.2", ] @@ -599,9 +599,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.31" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" +checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47" dependencies = [ "shlex", ] @@ -712,17 +712,16 @@ dependencies = [ [[package]] name = "config" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7328b20597b53c2454f0b1919720c25c7339051c02b72b7e05409e00b14132be" +checksum = "68578f196d2a33ff61b27fae256c3164f65e36382648e30666dde05b8cc9dfdf" dependencies = [ "async-trait", - "lazy_static", "nom 7.1.3", "pathdiff", "serde", "serde_json", - "yaml-rust", + "yaml-rust2", ] [[package]] @@ -766,9 +765,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" +checksum = "0ca741a962e1b0bff6d724a1a0958b686406e853bb14061f218562e1896f95e6" dependencies = [ "libc", ] @@ -896,7 +895,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -958,7 +957,7 @@ dependencies = [ "once_cell", "percent-encoding", "serde", - "sourcemap 9.0.0", + "sourcemap 9.1.0", "swc_atoms", "swc_common", "swc_config", @@ -989,7 +988,6 @@ dependencies = [ [[package]] name = "deno_broadcast_channel" version = "0.165.0" -source = "git+https://github.com/rivet-gg/deno?rev=bd98563214c532c8dae97d918edb501fe1c72dbc#bd98563214c532c8dae97d918edb501fe1c72dbc" dependencies = [ "async-trait", "deno_core", @@ -1001,7 +999,6 @@ dependencies = [ [[package]] name = "deno_cache" version = "0.103.0" -source = "git+https://github.com/rivet-gg/deno?rev=bd98563214c532c8dae97d918edb501fe1c72dbc#bd98563214c532c8dae97d918edb501fe1c72dbc" dependencies = [ "async-trait", "deno_core", @@ -1015,7 +1012,6 @@ dependencies = [ [[package]] name = "deno_canvas" version = "0.40.0" -source = "git+https://github.com/rivet-gg/deno?rev=bd98563214c532c8dae97d918edb501fe1c72dbc#bd98563214c532c8dae97d918edb501fe1c72dbc" dependencies = [ "deno_core", "deno_webgpu", @@ -1027,7 +1023,6 @@ dependencies = [ [[package]] name = "deno_console" version = "0.171.0" -source = "git+https://github.com/rivet-gg/deno?rev=bd98563214c532c8dae97d918edb501fe1c72dbc#bd98563214c532c8dae97d918edb501fe1c72dbc" dependencies = [ "deno_core", ] @@ -1073,7 +1068,6 @@ checksum = "a13951ea98c0a4c372f162d669193b4c9d991512de9f2381dd161027f34b26b1" [[package]] name = "deno_cron" version = "0.51.0" -source = "git+https://github.com/rivet-gg/deno?rev=bd98563214c532c8dae97d918edb501fe1c72dbc#bd98563214c532c8dae97d918edb501fe1c72dbc" dependencies = [ "anyhow", "async-trait", @@ -1087,7 +1081,6 @@ dependencies = [ [[package]] name = "deno_crypto" version = "0.185.0" -source = "git+https://github.com/rivet-gg/deno?rev=bd98563214c532c8dae97d918edb501fe1c72dbc#bd98563214c532c8dae97d918edb501fe1c72dbc" dependencies = [ "aes", "aes-gcm", @@ -1123,7 +1116,6 @@ dependencies = [ [[package]] name = "deno_fetch" version = "0.195.0" -source = "git+https://github.com/rivet-gg/deno?rev=bd98563214c532c8dae97d918edb501fe1c72dbc#bd98563214c532c8dae97d918edb501fe1c72dbc" dependencies = [ "base64 0.21.7", "bytes", @@ -1155,7 +1147,6 @@ dependencies = [ [[package]] name = "deno_ffi" version = "0.158.0" -source = "git+https://github.com/rivet-gg/deno?rev=bd98563214c532c8dae97d918edb501fe1c72dbc#bd98563214c532c8dae97d918edb501fe1c72dbc" dependencies = [ "deno_core", "deno_permissions", @@ -1173,7 +1164,6 @@ dependencies = [ [[package]] name = "deno_fs" version = "0.81.0" -source = "git+https://github.com/rivet-gg/deno?rev=bd98563214c532c8dae97d918edb501fe1c72dbc#bd98563214c532c8dae97d918edb501fe1c72dbc" dependencies = [ "async-trait", "base32", @@ -1195,7 +1185,6 @@ dependencies = [ [[package]] name = "deno_http" version = "0.169.0" -source = "git+https://github.com/rivet-gg/deno?rev=bd98563214c532c8dae97d918edb501fe1c72dbc#bd98563214c532c8dae97d918edb501fe1c72dbc" dependencies = [ "async-compression", "async-trait", @@ -1232,7 +1221,6 @@ dependencies = [ [[package]] name = "deno_io" version = "0.81.0" -source = "git+https://github.com/rivet-gg/deno?rev=bd98563214c532c8dae97d918edb501fe1c72dbc#bd98563214c532c8dae97d918edb501fe1c72dbc" dependencies = [ "async-trait", "deno_core", @@ -1254,7 +1242,6 @@ dependencies = [ [[package]] name = "deno_kv" version = "0.79.0" -source = "git+https://github.com/rivet-gg/deno?rev=bd98563214c532c8dae97d918edb501fe1c72dbc#bd98563214c532c8dae97d918edb501fe1c72dbc" dependencies = [ "anyhow", "async-trait", @@ -1296,7 +1283,6 @@ dependencies = [ [[package]] name = "deno_napi" version = "0.102.0" -source = "git+https://github.com/rivet-gg/deno?rev=bd98563214c532c8dae97d918edb501fe1c72dbc#bd98563214c532c8dae97d918edb501fe1c72dbc" dependencies = [ "deno_core", "deno_permissions", @@ -1319,7 +1305,6 @@ dependencies = [ [[package]] name = "deno_net" version = "0.163.0" -source = "git+https://github.com/rivet-gg/deno?rev=bd98563214c532c8dae97d918edb501fe1c72dbc#bd98563214c532c8dae97d918edb501fe1c72dbc" dependencies = [ "deno_core", "deno_permissions", @@ -1336,7 +1321,6 @@ dependencies = [ [[package]] name = "deno_node" version = "0.108.0" -source = "git+https://github.com/rivet-gg/deno?rev=bd98563214c532c8dae97d918edb501fe1c72dbc#bd98563214c532c8dae97d918edb501fe1c72dbc" dependencies = [ "aead-gcm-stream", "aes", @@ -1435,7 +1419,7 @@ dependencies = [ "quote", "strum 0.25.0", "strum_macros 0.25.3", - "syn 2.0.82", + "syn 2.0.87", "thiserror", ] @@ -1467,7 +1451,6 @@ dependencies = [ [[package]] name = "deno_permissions" version = "0.31.0" -source = "git+https://github.com/rivet-gg/deno?rev=bd98563214c532c8dae97d918edb501fe1c72dbc#bd98563214c532c8dae97d918edb501fe1c72dbc" dependencies = [ "deno_core", "deno_path_util", @@ -1485,7 +1468,6 @@ dependencies = [ [[package]] name = "deno_runtime" version = "0.180.0" -source = "git+https://github.com/rivet-gg/deno?rev=bd98563214c532c8dae97d918edb501fe1c72dbc#bd98563214c532c8dae97d918edb501fe1c72dbc" dependencies = [ "deno_ast", "deno_broadcast_channel", @@ -1583,11 +1565,10 @@ dependencies = [ [[package]] name = "deno_tls" version = "0.158.0" -source = "git+https://github.com/rivet-gg/deno?rev=bd98563214c532c8dae97d918edb501fe1c72dbc#bd98563214c532c8dae97d918edb501fe1c72dbc" dependencies = [ "deno_core", "deno_native_certs", - "rustls 0.23.15", + "rustls 0.23.17", "rustls-pemfile 2.2.0", "rustls-tokio-stream", "rustls-webpki 0.102.8", @@ -1610,7 +1591,6 @@ dependencies = [ [[package]] name = "deno_url" version = "0.171.0" -source = "git+https://github.com/rivet-gg/deno?rev=bd98563214c532c8dae97d918edb501fe1c72dbc#bd98563214c532c8dae97d918edb501fe1c72dbc" dependencies = [ "deno_core", "urlpattern", @@ -1619,7 +1599,6 @@ dependencies = [ [[package]] name = "deno_web" version = "0.202.0" -source = "git+https://github.com/rivet-gg/deno?rev=bd98563214c532c8dae97d918edb501fe1c72dbc#bd98563214c532c8dae97d918edb501fe1c72dbc" dependencies = [ "async-trait", "base64-simd 0.8.0", @@ -1637,7 +1616,6 @@ dependencies = [ [[package]] name = "deno_webgpu" version = "0.138.0" -source = "git+https://github.com/rivet-gg/deno?rev=bd98563214c532c8dae97d918edb501fe1c72dbc#bd98563214c532c8dae97d918edb501fe1c72dbc" dependencies = [ "deno_core", "raw-window-handle", @@ -1650,7 +1628,6 @@ dependencies = [ [[package]] name = "deno_webidl" version = "0.171.0" -source = "git+https://github.com/rivet-gg/deno?rev=bd98563214c532c8dae97d918edb501fe1c72dbc#bd98563214c532c8dae97d918edb501fe1c72dbc" dependencies = [ "deno_core", ] @@ -1658,7 +1635,6 @@ dependencies = [ [[package]] name = "deno_websocket" version = "0.176.0" -source = "git+https://github.com/rivet-gg/deno?rev=bd98563214c532c8dae97d918edb501fe1c72dbc#bd98563214c532c8dae97d918edb501fe1c72dbc" dependencies = [ "bytes", "deno_core", @@ -1680,7 +1656,6 @@ dependencies = [ [[package]] name = "deno_webstorage" version = "0.166.0" -source = "git+https://github.com/rivet-gg/deno?rev=bd98563214c532c8dae97d918edb501fe1c72dbc#bd98563214c532c8dae97d918edb501fe1c72dbc" dependencies = [ "deno_core", "deno_web", @@ -1699,25 +1674,25 @@ dependencies = [ [[package]] name = "denokv_proto" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25e4ca7a6388ad11c5b8d8ad2300dbd57cdd1ba20fe7feb25aa5da8ae0ea83fd" +checksum = "f7ba1f99ed11a9c11e868a8521b1f71a7e1aba785d7f42ea9ecbdc01146c89ec" dependencies = [ "anyhow", "async-trait", "chrono", "futures", "num-bigint", - "prost 0.11.9", + "prost 0.13.3", "serde", "uuid", ] [[package]] name = "denokv_remote" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63bf273105c8ea5497fff56ec2729f72898347359b385ec9420158230a07ce67" +checksum = "08ed833073189e8f6d03155fe3b05a024e75e29d8a28a4c2e9ec3b5c925e727b" dependencies = [ "anyhow", "async-stream", @@ -1728,7 +1703,7 @@ dependencies = [ "futures", "http 1.1.0", "log", - "prost 0.11.9", + "prost 0.13.3", "rand", "serde", "serde_json", @@ -1740,9 +1715,9 @@ dependencies = [ [[package]] name = "denokv_sqlite" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e32dcfde2d7b2ed3200e2cdc2f90a6aeee31c83a2dd89425356f509f1238759" +checksum = "9b790f01d1302d53a0c3cbd27de88a06b3abd64ec8ab8673924e490541c7c713" dependencies = [ "anyhow", "async-stream", @@ -1797,7 +1772,7 @@ checksum = "8034092389675178f570469e6c3b0465d3d30b4505c294a6550db47f3c17ad18" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -1850,7 +1825,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -1885,7 +1860,7 @@ checksum = "f2b99bf03862d7f545ebc28ddd33a665b50865f4dfd84031a393823879bd4c54" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -2084,7 +2059,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -2181,9 +2156,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" +checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" [[package]] name = "fastwebsockets" @@ -2218,9 +2193,9 @@ dependencies = [ [[package]] name = "fdeflate" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8090f921a24b04994d9929e204f50b498a33ea6ba559ffaa05e04f7ee7fb5ab" +checksum = "07c6f4c64c1d33a3111c4466f7365ebdcc37c5bd1ea0d62aae2e3d722aacbedb" dependencies = [ "simd-adler32", ] @@ -2267,9 +2242,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.34" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" +checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" dependencies = [ "crc32fast", "miniz_oxide 0.8.0", @@ -2319,7 +2294,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -2363,7 +2338,7 @@ checksum = "32016f1242eb82af5474752d00fd8ebcd9004bd69b462b1c91de833972d08ed4" dependencies = [ "proc-macro2", "swc_macros_common", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -2469,7 +2444,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -2733,9 +2708,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" [[package]] name = "hashlink" @@ -2983,7 +2958,7 @@ dependencies = [ "http 1.1.0", "hyper 1.5.0", "hyper-util", - "rustls 0.23.15", + "rustls 0.23.17", "rustls-pki-types", "tokio", "tokio-rustls 0.26.0", @@ -3079,7 +3054,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.15.0", + "hashbrown 0.15.1", "serde", ] @@ -3157,14 +3132,14 @@ dependencies = [ [[package]] name = "is-macro" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2069faacbe981460232f880d26bf3c7634e322d49053aa48c27e3ae642f728f1" +checksum = "1d57a3e447e24c22647738e4607f1df1e0ec6f72e16182c4cd199f647cdfb0e4" dependencies = [ - "Inflector", + "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -3185,6 +3160,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.11" @@ -3296,7 +3280,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -3316,9 +3300,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.161" +version = "0.2.164" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" +checksum = "433bfe06b8c75da9b2e3fbea6e5329ff87748f0b144ef75306e674c3f6f7c13f" [[package]] name = "libffi" @@ -3361,9 +3345,9 @@ dependencies = [ [[package]] name = "libm" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" [[package]] name = "libredox" @@ -3674,7 +3658,6 @@ dependencies = [ [[package]] name = "node_resolver" version = "0.10.0" -source = "git+https://github.com/rivet-gg/deno?rev=bd98563214c532c8dae97d918edb501fe1c72dbc#bd98563214c532c8dae97d918edb501fe1c72dbc" dependencies = [ "anyhow", "async-trait", @@ -4187,7 +4170,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -4201,29 +4184,29 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.6" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf123a161dde1e524adf36f90bc5d8d3462824a9c43553ad07a8183161189ec" +checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.6" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4502d8515ca9f32f1fb543d987f63d95a14934883db45bdb48060b6b69257f8" +checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -4336,12 +4319,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.24" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "910d41a655dac3b764f1ade94821093d3610248694320cd072303a8eedcf221d" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" dependencies = [ "proc-macro2", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -4385,7 +4368,7 @@ checksum = "07c277e4e643ef00c1233393c673f655e3672cf7eb3ba08a00bdd0ea59139b5f" dependencies = [ "proc-macro-rules-macros", "proc-macro2", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -4397,7 +4380,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -4450,6 +4433,16 @@ dependencies = [ "prost-derive 0.11.9", ] +[[package]] +name = "prost" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b0487d90e047de87f984913713b85c601c05609aad5b0df4b4573fbf69aa13f" +dependencies = [ + "bytes", + "prost-derive 0.13.3", +] + [[package]] name = "prost-build" version = "0.11.9" @@ -4498,6 +4491,19 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "prost-derive" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9552f850d5f0964a4e4d0bf306459ac29323ddfbae05e35a7c0d35cb0803cc5" +dependencies = [ + "anyhow", + "itertools 0.13.0", + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "prost-types" version = "0.10.1" @@ -4525,9 +4531,9 @@ checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94" [[package]] name = "psm" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa37f80ca58604976033fae9515a8a2989fc13797d953f7c04fb8fa36a11f205" +checksum = "200b9ff220857e53e184257720a14553b2f4aa02577d2ed9842d45d4b9654810" dependencies = [ "cc", ] @@ -4682,14 +4688,14 @@ checksum = "bcc303e793d3734489387d205e9b186fac9c6cfacedd98cbb2e8a5943595f3e6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] name = "regex" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -4699,9 +4705,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -4939,9 +4945,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.37" +version = "0.38.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" +checksum = "99e4ea3e1cdc4b559b8e5650f9c8e5998e3e5c1343b4eaf034565f32318d63c0" dependencies = [ "bitflags 2.6.0", "errno 0.3.9", @@ -4964,9 +4970,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.15" +version = "0.23.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fbb44d7acc4e873d613422379f69f237a1b141928c02f6bc6ccfddddc2d7993" +checksum = "7f1a745511c54ba6d4465e8d5dfbd81b45791756de28d4981af70d6dca128f1e" dependencies = [ "log", "once_cell", @@ -5021,7 +5027,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22557157d7395bc30727745b365d923f1ecc230c4c80b176545f3f4f08c46e33" dependencies = [ "futures", - "rustls 0.23.15", + "rustls 0.23.17", "socket2", "tokio", ] @@ -5198,9 +5204,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.12.0" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" +checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2" dependencies = [ "core-foundation-sys", "libc", @@ -5229,9 +5235,9 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.213" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ea7893ff5e2466df8d720bb615088341b295f849602c6956047f8f80f0e9bc1" +checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" dependencies = [ "serde_derive", ] @@ -5257,20 +5263,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.213" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e85ad2009c50b58e87caa8cd6dac16bdf511bbfb7af6c33df902396aa480fa5" +checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] name = "serde_json" -version = "1.0.132" +version = "1.0.133" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" +checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" dependencies = [ "indexmap", "itoa", @@ -5429,9 +5435,9 @@ checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" [[package]] name = "simd-json" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1df0290e9bfe79ddd5ff8798ca887cd107b75353d2957efe9777296e17f26b5" +checksum = "aa2bcf6c6e164e81bc7a5d49fc6988b3d515d9e8c07457d7b74ffb9324b9cd40" dependencies = [ "getrandom", "halfbrown", @@ -5532,9 +5538,9 @@ dependencies = [ [[package]] name = "sourcemap" -version = "9.0.0" +version = "9.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dab08a862c70980b8e23698b507e272317ae52a608a164a844111f5372374f1f" +checksum = "4d146f02f4bbbabbbe3da0f9cd3ea2ab779defc4ed1f070b5bd83ea48ed78811" dependencies = [ "base64-simd 0.7.0", "bitvec", @@ -5580,7 +5586,6 @@ dependencies = [ [[package]] name = "sqlx" version = "0.8.2" -source = "git+https://github.com/rivet-gg/sqlx?rev=e7120f59b74fb6d83ac9b1d899b166bab31ba1d6#e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" dependencies = [ "sqlx-core", "sqlx-macros", @@ -5592,7 +5597,6 @@ dependencies = [ [[package]] name = "sqlx-core" version = "0.8.2" -source = "git+https://github.com/rivet-gg/sqlx?rev=e7120f59b74fb6d83ac9b1d899b166bab31ba1d6#e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" dependencies = [ "bytes", "crc", @@ -5627,19 +5631,17 @@ dependencies = [ [[package]] name = "sqlx-macros" version = "0.8.2" -source = "git+https://github.com/rivet-gg/sqlx?rev=e7120f59b74fb6d83ac9b1d899b166bab31ba1d6#e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" dependencies = [ "proc-macro2", "quote", "sqlx-core", "sqlx-macros-core", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] name = "sqlx-macros-core" version = "0.8.2" -source = "git+https://github.com/rivet-gg/sqlx?rev=e7120f59b74fb6d83ac9b1d899b166bab31ba1d6#e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" dependencies = [ "dotenvy", "either", @@ -5655,7 +5657,7 @@ dependencies = [ "sqlx-mysql", "sqlx-postgres", "sqlx-sqlite", - "syn 2.0.82", + "syn 2.0.87", "tempfile", "tokio", "url", @@ -5664,7 +5666,6 @@ dependencies = [ [[package]] name = "sqlx-mysql" version = "0.8.2" -source = "git+https://github.com/rivet-gg/sqlx?rev=e7120f59b74fb6d83ac9b1d899b166bab31ba1d6#e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" dependencies = [ "atoi", "base64 0.22.1", @@ -5706,7 +5707,6 @@ dependencies = [ [[package]] name = "sqlx-postgres" version = "0.8.2" -source = "git+https://github.com/rivet-gg/sqlx?rev=e7120f59b74fb6d83ac9b1d899b166bab31ba1d6#e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" dependencies = [ "atoi", "base64 0.22.1", @@ -5744,7 +5744,6 @@ dependencies = [ [[package]] name = "sqlx-sqlite" version = "0.8.2" -source = "git+https://github.com/rivet-gg/sqlx?rev=e7120f59b74fb6d83ac9b1d899b166bab31ba1d6#e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" dependencies = [ "atoi", "flume", @@ -5798,7 +5797,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -5853,7 +5852,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -5918,7 +5917,7 @@ dependencies = [ "rustc-hash", "serde", "siphasher", - "sourcemap 9.0.0", + "sourcemap 9.1.0", "swc_allocator", "swc_atoms", "swc_eq_ignore_macros", @@ -5951,7 +5950,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -5982,7 +5981,7 @@ dependencies = [ "num-bigint", "once_cell", "serde", - "sourcemap 9.0.0", + "sourcemap 9.1.0", "swc_allocator", "swc_atoms", "swc_common", @@ -6000,7 +5999,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -6085,7 +6084,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -6192,7 +6191,7 @@ checksum = "63db0adcff29d220c3d151c5b25c0eabe7e32dd936212b84cdaa1392e3130497" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -6203,7 +6202,7 @@ checksum = "f486687bfb7b5c560868f69ed2d458b880cebc9babebcb67e49f31b55c5bf847" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -6226,7 +6225,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -6242,9 +6241,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.82" +version = "2.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83540f837a8afc019423a8edb95b52a8effe46957ee402287f4292fae35be021" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" dependencies = [ "proc-macro2", "quote", @@ -6277,7 +6276,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -6323,9 +6322,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" +checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" dependencies = [ "cfg-if", "fastrand", @@ -6354,22 +6353,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.65" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d11abd9594d9b38965ef50805c5e469ca9cc6f197f883f717e0269a3057b3d5" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.65" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -6467,7 +6466,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -6498,7 +6497,7 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.23.15", + "rustls 0.23.17", "rustls-pki-types", "tokio", ] @@ -6665,7 +6664,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -7135,7 +7134,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", "wasm-bindgen-shared", ] @@ -7169,7 +7168,7 @@ checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -7182,9 +7181,9 @@ checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "wasm-streams" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e072d4e72f700fb3443d8fe94a39315df013eef1104903cdb0a2abd322bbecd" +checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" dependencies = [ "futures-util", "js-sys", @@ -7421,7 +7420,7 @@ checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -7432,7 +7431,7 @@ checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -7663,18 +7662,9 @@ dependencies = [ [[package]] name = "xml-rs" -version = "0.8.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af4e2e2f7cba5a093896c1e150fbfe177d1883e7448200efb81d40b9d339ef26" - -[[package]] -name = "yaml-rust" -version = "0.4.5" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" -dependencies = [ - "linked-hash-map", -] +checksum = "af310deaae937e48a26602b730250b4949e125f468f11e6990be3e5304ddd96f" [[package]] name = "yaml-rust2" @@ -7707,7 +7697,7 @@ checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", "synstructure 0.13.1", ] @@ -7729,7 +7719,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] [[package]] @@ -7749,7 +7739,7 @@ checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", "synstructure 0.13.1", ] @@ -7770,5 +7760,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.87", ] diff --git a/packages/infra/client/deny.toml b/packages/infra/client/deny.toml new file mode 100644 index 0000000000..073140d372 --- /dev/null +++ b/packages/infra/client/deny.toml @@ -0,0 +1,41 @@ +[advisories] +ignore = [ + # TODO(RVT-4096): + "RUSTSEC-2023-0071", + # Unmaintained, low-impact crates + "RUSTSEC-2024-0370", +] + +[licenses] +allow = [ + "Apache-2.0", + "BSD-2-Clause", + "BSD-3-Clause", + "ISC", + "MIT", + "MPL-2.0", + "CC0-1.0", + "Unicode-DFS-2016", + "Unicode-3.0", + "Zlib", + "EPL-2.0", +] +unused-allowed-license = "allow" + +[[licenses.exceptions]] +name = "ring" +allow = ["OpenSSL"] + +[[licenses.exceptions]] +name = "clipboard-win" +allow = ["BSL-1.0"] # Boost Software License, not Business Source License + +[[licenses.exceptions]] +name = "error-code" +allow = ["BSL-1.0"] # Boost Software License, not Business Source License + +# See https://github.com/EmbarkStudios/buildkite-jobify/blob/a1b953b03f3330e499b1af47cc2dc38bd777da7c/deny.toml#LL27C1-L38C1 +[[licenses.clarify]] +name = "ring" +expression = "ISC AND MIT AND OpenSSL" +license-files = [{ path = "LICENSE", hash = 0xbd0eed23 }] diff --git a/packages/infra/client/isolate-v8-runner/Cargo.toml b/packages/infra/client/isolate-v8-runner/Cargo.toml index 61a27961c3..75b96c8d2e 100644 --- a/packages/infra/client/isolate-v8-runner/Cargo.toml +++ b/packages/infra/client/isolate-v8-runner/Cargo.toml @@ -27,10 +27,7 @@ uuid = { version = "1.6.1", features = ["v4"] } runner-protocol = { path = "../runner-protocol", package = "pegboard-runner-protocol" } [dependencies.deno_runtime] -# path = "../../../../../deno/runtime" -git = "https://github.com/rivet-gg/deno" -rev = "bd98563214c532c8dae97d918edb501fe1c72dbc" -package = "deno_runtime" +path = "../../../../externals/deno/runtime" [dev-dependencies] portpicker = "0.1.1" diff --git a/packages/infra/client/manager/Cargo.toml b/packages/infra/client/manager/Cargo.toml index 92fee39f1a..16a99f2dc4 100644 --- a/packages/infra/client/manager/Cargo.toml +++ b/packages/infra/client/manager/Cargo.toml @@ -47,8 +47,7 @@ pegboard = { path = "../../../services/pegboard", default-features = false } serde_yaml = "0.9.34" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../externals/sqlx" default-features = false features = [ "runtime-tokio", diff --git a/packages/infra/server/Cargo.toml b/packages/infra/server/Cargo.toml index 91826afa0d..4c768cd511 100644 --- a/packages/infra/server/Cargo.toml +++ b/packages/infra/server/Cargo.toml @@ -22,7 +22,7 @@ rivet-migrate = { path = "../../common/migrate" } rivet-pools = { version = "0.1.0", path = "../../common/pools" } rivet-runtime = { version = "0.1.0", path = "../../common/runtime" } rivet-service-manager = { path = "../../common/service-manager" } -rivet-term = { git = "https://github.com/rivet-gg/rivet-term.git", rev = "d539a07d2920d47b88410f20e6d106b497cff1f5" } +rivet-term = { path = "../../../externals/rivet-term" } s3-util = { version = "0.1.0", path = "../../common/s3-util" } serde = { version = "1.0.210", features = ["derive"] } serde_json = "1.0.128" @@ -78,8 +78,7 @@ cloud-default-create = { version = "0.1.0", path = "../../services/cloud/standal [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../externals/sqlx" default-features = false features = ["runtime-tokio", "postgres"] diff --git a/packages/services/build/Cargo.toml b/packages/services/build/Cargo.toml index ff57ea24e7..ef34aa2b64 100644 --- a/packages/services/build/Cargo.toml +++ b/packages/services/build/Cargo.toml @@ -9,7 +9,7 @@ license = "Apache-2.0" acme-lib = "0.9" anyhow = "1.0" chirp-workflow = { path = "../../common/chirp-workflow/core" } -cloudflare = { git = "https://github.com/cloudflare/cloudflare-rs.git", rev = "f14720e42184ee176a97676e85ef2d2d85bc3aae" } +cloudflare = { path = "../../../externals/cloudflare-rs/cloudflare" } heck = "0.3" http = "0.2" include_dir = "0.7.3" @@ -38,8 +38,7 @@ upload-get = { path = "../upload/ops/get" } rivet-config = { version = "0.1.0", path = "../../common/config" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../externals/sqlx" default-features = false features = [ "json" ] diff --git a/packages/services/build/ops/create/Cargo.toml b/packages/services/build/ops/create/Cargo.toml index 8ca4348f4f..c65a0ded02 100644 --- a/packages/services/build/ops/create/Cargo.toml +++ b/packages/services/build/ops/create/Cargo.toml @@ -16,8 +16,7 @@ game-namespace-get = { path = "../../../game/ops/namespace-get" } upload-prepare = { path = "../../../upload/ops/prepare" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/build/ops/get/Cargo.toml b/packages/services/build/ops/get/Cargo.toml index 8bc51f9947..5129d63a94 100644 --- a/packages/services/build/ops/get/Cargo.toml +++ b/packages/services/build/ops/get/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/build/ops/list-for-env/Cargo.toml b/packages/services/build/ops/list-for-env/Cargo.toml index 83309328e0..de92cef1cd 100644 --- a/packages/services/build/ops/list-for-env/Cargo.toml +++ b/packages/services/build/ops/list-for-env/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/build/ops/list-for-game/Cargo.toml b/packages/services/build/ops/list-for-game/Cargo.toml index b800f3454b..90c6d96567 100644 --- a/packages/services/build/ops/list-for-game/Cargo.toml +++ b/packages/services/build/ops/list-for-game/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/build/standalone/default-create/Cargo.toml b/packages/services/build/standalone/default-create/Cargo.toml index e344ab4775..4e0ea9123c 100644 --- a/packages/services/build/standalone/default-create/Cargo.toml +++ b/packages/services/build/standalone/default-create/Cargo.toml @@ -30,8 +30,7 @@ upload-prepare = { path = "../../../upload/ops/prepare" } rivet-config = { version = "0.1.0", path = "../../../../common/config" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/captcha/ops/request/Cargo.toml b/packages/services/captcha/ops/request/Cargo.toml index 20d1d4ba2b..f4dbc6ae33 100644 --- a/packages/services/captcha/ops/request/Cargo.toml +++ b/packages/services/captcha/ops/request/Cargo.toml @@ -13,8 +13,7 @@ chrono = "0.4" util-captcha = { package = "rivet-util-captcha", path = "../../util" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/cdn/ops/namespace-auth-user-remove/Cargo.toml b/packages/services/cdn/ops/namespace-auth-user-remove/Cargo.toml index 9a78799b37..e7cce9ae89 100644 --- a/packages/services/cdn/ops/namespace-auth-user-remove/Cargo.toml +++ b/packages/services/cdn/ops/namespace-auth-user-remove/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/cdn/ops/namespace-auth-user-update/Cargo.toml b/packages/services/cdn/ops/namespace-auth-user-update/Cargo.toml index f3447dfe79..b6533e0e41 100644 --- a/packages/services/cdn/ops/namespace-auth-user-update/Cargo.toml +++ b/packages/services/cdn/ops/namespace-auth-user-update/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/cdn/ops/namespace-create/Cargo.toml b/packages/services/cdn/ops/namespace-create/Cargo.toml index efc51d005d..1ea1fa134c 100644 --- a/packages/services/cdn/ops/namespace-create/Cargo.toml +++ b/packages/services/cdn/ops/namespace-create/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/cdn/ops/namespace-domain-create/Cargo.toml b/packages/services/cdn/ops/namespace-domain-create/Cargo.toml index 681b441ad2..3afffa73f6 100644 --- a/packages/services/cdn/ops/namespace-domain-create/Cargo.toml +++ b/packages/services/cdn/ops/namespace-domain-create/Cargo.toml @@ -14,8 +14,7 @@ game-get = { path = "../../../game/ops/get" } game-resolve-namespace-id = { path = "../../../game/ops/resolve-namespace-id" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/cdn/ops/namespace-domain-remove/Cargo.toml b/packages/services/cdn/ops/namespace-domain-remove/Cargo.toml index b7b93e11e3..358f38e863 100644 --- a/packages/services/cdn/ops/namespace-domain-remove/Cargo.toml +++ b/packages/services/cdn/ops/namespace-domain-remove/Cargo.toml @@ -14,8 +14,7 @@ game-get = { path = "../../../game/ops/get" } game-resolve-namespace-id = { path = "../../../game/ops/resolve-namespace-id" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/cdn/ops/namespace-get/Cargo.toml b/packages/services/cdn/ops/namespace-get/Cargo.toml index 9476e8cf72..ab38154f0f 100644 --- a/packages/services/cdn/ops/namespace-get/Cargo.toml +++ b/packages/services/cdn/ops/namespace-get/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/cdn/ops/namespace-resolve-domain/Cargo.toml b/packages/services/cdn/ops/namespace-resolve-domain/Cargo.toml index 4c97a40e5d..713242b115 100644 --- a/packages/services/cdn/ops/namespace-resolve-domain/Cargo.toml +++ b/packages/services/cdn/ops/namespace-resolve-domain/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/cdn/ops/ns-auth-type-set/Cargo.toml b/packages/services/cdn/ops/ns-auth-type-set/Cargo.toml index 4880e62c4d..017d3322f8 100644 --- a/packages/services/cdn/ops/ns-auth-type-set/Cargo.toml +++ b/packages/services/cdn/ops/ns-auth-type-set/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/cdn/ops/ns-enable-domain-public-auth-set/Cargo.toml b/packages/services/cdn/ops/ns-enable-domain-public-auth-set/Cargo.toml index 11b4b2ea84..49311b1ae2 100644 --- a/packages/services/cdn/ops/ns-enable-domain-public-auth-set/Cargo.toml +++ b/packages/services/cdn/ops/ns-enable-domain-public-auth-set/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/cdn/ops/site-create/Cargo.toml b/packages/services/cdn/ops/site-create/Cargo.toml index 5f13227f24..e08bf21809 100644 --- a/packages/services/cdn/ops/site-create/Cargo.toml +++ b/packages/services/cdn/ops/site-create/Cargo.toml @@ -14,8 +14,7 @@ game-get = { path = "../../../game/ops/get" } upload-prepare = { path = "../../../upload/ops/prepare" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/cdn/ops/site-get/Cargo.toml b/packages/services/cdn/ops/site-get/Cargo.toml index 6d722892bd..56bedd9583 100644 --- a/packages/services/cdn/ops/site-get/Cargo.toml +++ b/packages/services/cdn/ops/site-get/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/cdn/ops/site-list-for-game/Cargo.toml b/packages/services/cdn/ops/site-list-for-game/Cargo.toml index c300d17eb7..530c626145 100644 --- a/packages/services/cdn/ops/site-list-for-game/Cargo.toml +++ b/packages/services/cdn/ops/site-list-for-game/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/cdn/ops/version-get/Cargo.toml b/packages/services/cdn/ops/version-get/Cargo.toml index b45026134e..37513419d6 100644 --- a/packages/services/cdn/ops/version-get/Cargo.toml +++ b/packages/services/cdn/ops/version-get/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/cdn/ops/version-publish/Cargo.toml b/packages/services/cdn/ops/version-publish/Cargo.toml index 1e705fc063..d4de016bf0 100644 --- a/packages/services/cdn/ops/version-publish/Cargo.toml +++ b/packages/services/cdn/ops/version-publish/Cargo.toml @@ -13,8 +13,7 @@ unzip-n = "0.1.2" itertools = "0.10.5" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/cf-custom-hostname/ops/get/Cargo.toml b/packages/services/cf-custom-hostname/ops/get/Cargo.toml index 4c6af4b728..840ceef0a2 100644 --- a/packages/services/cf-custom-hostname/ops/get/Cargo.toml +++ b/packages/services/cf-custom-hostname/ops/get/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/cf-custom-hostname/ops/list-for-namespace-id/Cargo.toml b/packages/services/cf-custom-hostname/ops/list-for-namespace-id/Cargo.toml index fbcaad22f5..0da9e3aefe 100644 --- a/packages/services/cf-custom-hostname/ops/list-for-namespace-id/Cargo.toml +++ b/packages/services/cf-custom-hostname/ops/list-for-namespace-id/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/cf-custom-hostname/ops/resolve-hostname/Cargo.toml b/packages/services/cf-custom-hostname/ops/resolve-hostname/Cargo.toml index 68b98ffef5..2b8d343724 100644 --- a/packages/services/cf-custom-hostname/ops/resolve-hostname/Cargo.toml +++ b/packages/services/cf-custom-hostname/ops/resolve-hostname/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/cloud/ops/game-config-create/Cargo.toml b/packages/services/cloud/ops/game-config-create/Cargo.toml index 51d8163788..ea6dffd0b4 100644 --- a/packages/services/cloud/ops/game-config-create/Cargo.toml +++ b/packages/services/cloud/ops/game-config-create/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/cloud/ops/game-config-get/Cargo.toml b/packages/services/cloud/ops/game-config-get/Cargo.toml index 70549637d2..0b79db9a22 100644 --- a/packages/services/cloud/ops/game-config-get/Cargo.toml +++ b/packages/services/cloud/ops/game-config-get/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/cloud/ops/game-token-create/Cargo.toml b/packages/services/cloud/ops/game-token-create/Cargo.toml index 5ed6a8f7e0..ec5e369f3d 100644 --- a/packages/services/cloud/ops/game-token-create/Cargo.toml +++ b/packages/services/cloud/ops/game-token-create/Cargo.toml @@ -13,8 +13,7 @@ prost = "0.10" token-create = { path = "../../../token/ops/create" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/cloud/ops/namespace-create/Cargo.toml b/packages/services/cloud/ops/namespace-create/Cargo.toml index 7939ffa6a5..89604ed8fd 100644 --- a/packages/services/cloud/ops/namespace-create/Cargo.toml +++ b/packages/services/cloud/ops/namespace-create/Cargo.toml @@ -16,8 +16,7 @@ cdn-namespace-create = { path = "../../../cdn/ops/namespace-create" } mm-config-namespace-create = { path = "../../../mm-config/ops/namespace-create" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/cloud/ops/namespace-get/Cargo.toml b/packages/services/cloud/ops/namespace-get/Cargo.toml index 706542889f..a65af9246b 100644 --- a/packages/services/cloud/ops/namespace-get/Cargo.toml +++ b/packages/services/cloud/ops/namespace-get/Cargo.toml @@ -14,8 +14,7 @@ cdn-namespace-get = { path = "../../../cdn/ops/namespace-get" } mm-config-namespace-get = { path = "../../../mm-config/ops/namespace-get" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/cloud/ops/namespace-token-development-create/Cargo.toml b/packages/services/cloud/ops/namespace-token-development-create/Cargo.toml index 0de0ac2475..2521b3af6f 100644 --- a/packages/services/cloud/ops/namespace-token-development-create/Cargo.toml +++ b/packages/services/cloud/ops/namespace-token-development-create/Cargo.toml @@ -15,8 +15,7 @@ game-token-development-validate = { path = "../../../game/ops/token-development- token-create = { path = "../../../token/ops/create" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/cloud/ops/namespace-token-public-create/Cargo.toml b/packages/services/cloud/ops/namespace-token-public-create/Cargo.toml index f239ce64e3..2a7bfcb3c6 100644 --- a/packages/services/cloud/ops/namespace-token-public-create/Cargo.toml +++ b/packages/services/cloud/ops/namespace-token-public-create/Cargo.toml @@ -15,8 +15,7 @@ game-namespace-get = { path = "../../../game/ops/namespace-get" } token-create = { path = "../../../token/ops/create" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/cloud/ops/version-get/Cargo.toml b/packages/services/cloud/ops/version-get/Cargo.toml index a2403ffc25..9cb8677512 100644 --- a/packages/services/cloud/ops/version-get/Cargo.toml +++ b/packages/services/cloud/ops/version-get/Cargo.toml @@ -15,8 +15,7 @@ cdn-version-get = { path = "../../../cdn/ops/version-get" } mm-config-version-get = { path = "../../../mm-config/ops/version-get" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/cloud/ops/version-publish/Cargo.toml b/packages/services/cloud/ops/version-publish/Cargo.toml index 93a56b8021..caecb5cfd2 100644 --- a/packages/services/cloud/ops/version-publish/Cargo.toml +++ b/packages/services/cloud/ops/version-publish/Cargo.toml @@ -19,8 +19,7 @@ mm-config-version-prepare = { path = "../../../mm-config/ops/version-prepare" } mm-config-version-publish = { path = "../../../mm-config/ops/version-publish" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/cluster/Cargo.toml b/packages/services/cluster/Cargo.toml index ca72b3afa8..f4a6dbc37c 100644 --- a/packages/services/cluster/Cargo.toml +++ b/packages/services/cluster/Cargo.toml @@ -10,7 +10,7 @@ acme-lib = "0.9" anyhow = "1.0" chirp-workflow = { path = "../../common/chirp-workflow/core" } chrono = "0.4" -cloudflare = { git = "https://github.com/cloudflare/cloudflare-rs.git", rev = "f14720e42184ee176a97676e85ef2d2d85bc3aae" } +cloudflare = { path = "../../../externals/cloudflare-rs/cloudflare" } http = "0.2" include_dir = "0.7.3" indoc = "1.0" @@ -37,12 +37,10 @@ rivet-config = { version = "0.1.0", path = "../../common/config" } ipnet = "2.10.1" [dependencies.nomad_client] -git = "https://github.com/rivet-gg/nomad-client" -rev = "abb66bf0c30c7ff5b0c695dae952481c33e538b5" # pragma: allowlist secret +path = "../../../externals/nomad-client" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../externals/sqlx" default-features = false features = [ "json", "ipnetwork" ] diff --git a/packages/services/cluster/standalone/datacenter-tls-renew/Cargo.toml b/packages/services/cluster/standalone/datacenter-tls-renew/Cargo.toml index 7dd4c2db36..ac801dc126 100644 --- a/packages/services/cluster/standalone/datacenter-tls-renew/Cargo.toml +++ b/packages/services/cluster/standalone/datacenter-tls-renew/Cargo.toml @@ -21,8 +21,7 @@ cluster = { path = "../.." } rivet-config = { version = "0.1.0", path = "../../../../common/config" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/cluster/standalone/gc/Cargo.toml b/packages/services/cluster/standalone/gc/Cargo.toml index b1f0fb49e2..5a4a4171f9 100644 --- a/packages/services/cluster/standalone/gc/Cargo.toml +++ b/packages/services/cluster/standalone/gc/Cargo.toml @@ -21,8 +21,7 @@ cluster = { path = "../.." } rivet-config = { version = "0.1.0", path = "../../../../common/config" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/cluster/standalone/metrics-publish/Cargo.toml b/packages/services/cluster/standalone/metrics-publish/Cargo.toml index 7285bad50d..61ad12817c 100644 --- a/packages/services/cluster/standalone/metrics-publish/Cargo.toml +++ b/packages/services/cluster/standalone/metrics-publish/Cargo.toml @@ -21,8 +21,7 @@ cluster = { path = "../.." } rivet-config = { version = "0.1.0", path = "../../../../common/config" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/custom-user-avatar/ops/list-for-game/Cargo.toml b/packages/services/custom-user-avatar/ops/list-for-game/Cargo.toml index 9f47227594..5a82f32346 100644 --- a/packages/services/custom-user-avatar/ops/list-for-game/Cargo.toml +++ b/packages/services/custom-user-avatar/ops/list-for-game/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/custom-user-avatar/ops/upload-complete/Cargo.toml b/packages/services/custom-user-avatar/ops/upload-complete/Cargo.toml index 8a82f6a2fa..044615039c 100644 --- a/packages/services/custom-user-avatar/ops/upload-complete/Cargo.toml +++ b/packages/services/custom-user-avatar/ops/upload-complete/Cargo.toml @@ -13,8 +13,7 @@ prost = "0.10" upload-complete = { path = "../../../upload/ops/complete" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/debug/ops/email-res/Cargo.toml b/packages/services/debug/ops/email-res/Cargo.toml index 01aa604f7c..ce0560e49e 100644 --- a/packages/services/debug/ops/email-res/Cargo.toml +++ b/packages/services/debug/ops/email-res/Cargo.toml @@ -13,8 +13,7 @@ rand = "0.8" serde_json = "1.0" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/ds-log/ops/export/Cargo.toml b/packages/services/ds-log/ops/export/Cargo.toml index fc3d7bfcd0..fc1dc58a30 100644 --- a/packages/services/ds-log/ops/export/Cargo.toml +++ b/packages/services/ds-log/ops/export/Cargo.toml @@ -15,8 +15,7 @@ upload-complete = { path = "../../../upload/ops/complete" } upload-prepare = { path = "../../../upload/ops/prepare" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/ds/Cargo.toml b/packages/services/ds/Cargo.toml index 9b2418460e..e453abdfde 100644 --- a/packages/services/ds/Cargo.toml +++ b/packages/services/ds/Cargo.toml @@ -59,14 +59,12 @@ user-identity-get = { path = "../user-identity/ops/get" } rivet-config = { version = "0.1.0", path = "../../common/config" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../externals/sqlx" default-features = false [dependencies.nomad_client] package = "nomad_client" -git = "https://github.com/rivet-gg/nomad-client" -rev = "abb66bf0c30c7ff5b0c695dae952481c33e538b5" # pragma: allowlist secret +path = "../../../externals/nomad-client" [dev-dependencies] cluster = { path = "../cluster" } diff --git a/packages/services/email-verification/ops/complete/Cargo.toml b/packages/services/email-verification/ops/complete/Cargo.toml index 4248000eaf..1eda680ef9 100644 --- a/packages/services/email-verification/ops/complete/Cargo.toml +++ b/packages/services/email-verification/ops/complete/Cargo.toml @@ -12,8 +12,7 @@ chrono = "0.4" prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/email-verification/ops/create/Cargo.toml b/packages/services/email-verification/ops/create/Cargo.toml index a0b861f305..9cba8dbece 100644 --- a/packages/services/email-verification/ops/create/Cargo.toml +++ b/packages/services/email-verification/ops/create/Cargo.toml @@ -18,8 +18,7 @@ email-send = { path = "../../../email/ops/send" } game-get = { path = "../../../game/ops/get" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/external/ops/request-validate/Cargo.toml b/packages/services/external/ops/request-validate/Cargo.toml index 970a5b7ad0..9c73bb6e74 100644 --- a/packages/services/external/ops/request-validate/Cargo.toml +++ b/packages/services/external/ops/request-validate/Cargo.toml @@ -16,8 +16,7 @@ serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/faker/ops/region/Cargo.toml b/packages/services/faker/ops/region/Cargo.toml index 515dc2e429..204936e1e0 100644 --- a/packages/services/faker/ops/region/Cargo.toml +++ b/packages/services/faker/ops/region/Cargo.toml @@ -14,8 +14,7 @@ region-get = { path = "../../../region/ops/get" } region-list = { path = "../../../region/ops/list" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/game/ops/banner-upload-complete/Cargo.toml b/packages/services/game/ops/banner-upload-complete/Cargo.toml index 02dc2a99b5..b9bddd90b3 100644 --- a/packages/services/game/ops/banner-upload-complete/Cargo.toml +++ b/packages/services/game/ops/banner-upload-complete/Cargo.toml @@ -13,8 +13,7 @@ prost = "0.10" upload-complete = { path = "../../../upload/ops/complete" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/game/ops/create/Cargo.toml b/packages/services/game/ops/create/Cargo.toml index 8ea84d4dda..71f02bd103 100644 --- a/packages/services/game/ops/create/Cargo.toml +++ b/packages/services/game/ops/create/Cargo.toml @@ -17,8 +17,7 @@ game-validate = { path = "../validate" } team-get = { path = "../../../team/ops/get" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/game/ops/get/Cargo.toml b/packages/services/game/ops/get/Cargo.toml index e88e264742..d6c04e62b7 100644 --- a/packages/services/game/ops/get/Cargo.toml +++ b/packages/services/game/ops/get/Cargo.toml @@ -14,8 +14,7 @@ upload-file-list = { path = "../../../upload/ops/file-list" } upload-get = { path = "../../../upload/ops/get" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/game/ops/list-all/Cargo.toml b/packages/services/game/ops/list-all/Cargo.toml index 8fae8d5b55..2ef8acb1da 100644 --- a/packages/services/game/ops/list-all/Cargo.toml +++ b/packages/services/game/ops/list-all/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/game/ops/list-for-team/Cargo.toml b/packages/services/game/ops/list-for-team/Cargo.toml index cda203a92a..c13e50dccd 100644 --- a/packages/services/game/ops/list-for-team/Cargo.toml +++ b/packages/services/game/ops/list-for-team/Cargo.toml @@ -10,8 +10,7 @@ chirp-client = { path = "../../../../common/chirp/client" } rivet-operation = { path = "../../../../common/operation/core" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/game/ops/logo-upload-complete/Cargo.toml b/packages/services/game/ops/logo-upload-complete/Cargo.toml index f525eedfdb..2f5f6e6f91 100644 --- a/packages/services/game/ops/logo-upload-complete/Cargo.toml +++ b/packages/services/game/ops/logo-upload-complete/Cargo.toml @@ -13,8 +13,7 @@ prost = "0.10" upload-complete = { path = "../../../upload/ops/complete" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/game/ops/namespace-create/Cargo.toml b/packages/services/game/ops/namespace-create/Cargo.toml index 802540f66a..f7beb33f67 100644 --- a/packages/services/game/ops/namespace-create/Cargo.toml +++ b/packages/services/game/ops/namespace-create/Cargo.toml @@ -13,8 +13,7 @@ prost = "0.10" game-namespace-validate = { path = "../namespace-validate" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/game/ops/namespace-get/Cargo.toml b/packages/services/game/ops/namespace-get/Cargo.toml index 9e3baf6b4b..e139089b8b 100644 --- a/packages/services/game/ops/namespace-get/Cargo.toml +++ b/packages/services/game/ops/namespace-get/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/game/ops/namespace-list/Cargo.toml b/packages/services/game/ops/namespace-list/Cargo.toml index 65984604d7..02c6560a37 100644 --- a/packages/services/game/ops/namespace-list/Cargo.toml +++ b/packages/services/game/ops/namespace-list/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/game/ops/namespace-resolve-name-id/Cargo.toml b/packages/services/game/ops/namespace-resolve-name-id/Cargo.toml index 12a57bd9e5..db593f3709 100644 --- a/packages/services/game/ops/namespace-resolve-name-id/Cargo.toml +++ b/packages/services/game/ops/namespace-resolve-name-id/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/game/ops/namespace-version-history-list/Cargo.toml b/packages/services/game/ops/namespace-version-history-list/Cargo.toml index ffc6bcd3aa..a307bcda62 100644 --- a/packages/services/game/ops/namespace-version-history-list/Cargo.toml +++ b/packages/services/game/ops/namespace-version-history-list/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/game/ops/namespace-version-set/Cargo.toml b/packages/services/game/ops/namespace-version-set/Cargo.toml index 085a1ae664..9738b8bdf7 100644 --- a/packages/services/game/ops/namespace-version-set/Cargo.toml +++ b/packages/services/game/ops/namespace-version-set/Cargo.toml @@ -16,8 +16,7 @@ region-list-for-game = { path = "../../../region/ops/list-for-game" } mm-lobby-idle-update = { path = "../../../mm/ops/lobby-idle-update" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/game/ops/recommend/Cargo.toml b/packages/services/game/ops/recommend/Cargo.toml index b957ac8a68..409935e7e7 100644 --- a/packages/services/game/ops/recommend/Cargo.toml +++ b/packages/services/game/ops/recommend/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/game/ops/resolve-name-id/Cargo.toml b/packages/services/game/ops/resolve-name-id/Cargo.toml index c5e4ed8be6..ada3077101 100644 --- a/packages/services/game/ops/resolve-name-id/Cargo.toml +++ b/packages/services/game/ops/resolve-name-id/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/game/ops/resolve-namespace-id/Cargo.toml b/packages/services/game/ops/resolve-namespace-id/Cargo.toml index 120bf6eb8e..5548abcc95 100644 --- a/packages/services/game/ops/resolve-namespace-id/Cargo.toml +++ b/packages/services/game/ops/resolve-namespace-id/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/game/ops/version-create/Cargo.toml b/packages/services/game/ops/version-create/Cargo.toml index b7a0863004..fa71bacb16 100644 --- a/packages/services/game/ops/version-create/Cargo.toml +++ b/packages/services/game/ops/version-create/Cargo.toml @@ -14,8 +14,7 @@ game-version-get = { path = "../version-get" } game-version-list = { path = "../version-list" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/game/ops/version-get/Cargo.toml b/packages/services/game/ops/version-get/Cargo.toml index 64df96b888..003b7bdc78 100644 --- a/packages/services/game/ops/version-get/Cargo.toml +++ b/packages/services/game/ops/version-get/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/game/ops/version-list/Cargo.toml b/packages/services/game/ops/version-list/Cargo.toml index 2e64e46fa3..1bf597a7af 100644 --- a/packages/services/game/ops/version-list/Cargo.toml +++ b/packages/services/game/ops/version-list/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/ip/ops/info/Cargo.toml b/packages/services/ip/ops/info/Cargo.toml index 04f53e8ded..ab48036e52 100644 --- a/packages/services/ip/ops/info/Cargo.toml +++ b/packages/services/ip/ops/info/Cargo.toml @@ -15,8 +15,7 @@ serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/job-run/Cargo.toml b/packages/services/job-run/Cargo.toml index cc54c6170a..5d828a30ad 100644 --- a/packages/services/job-run/Cargo.toml +++ b/packages/services/job-run/Cargo.toml @@ -34,18 +34,16 @@ rivet-config = { version = "0.1.0", path = "../../common/config" } [dependencies.nomad_client_new] package = "nomad_client" -git = "https://github.com/rivet-gg/nomad-client" -rev = "abb66bf0c30c7ff5b0c695dae952481c33e538b5" # pragma: allowlist secret +path = "../../../externals/nomad-client" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../externals/sqlx" default-features = false features = [ "json" ] [dev-dependencies] rivet-test = { version = "0.1.0", path = "../../common/test" } -rustls = "0.20" +rustls = "0.21" webpki = "0.22" webpki-roots = "0.22" diff --git a/packages/services/job/standalone/gc/Cargo.toml b/packages/services/job/standalone/gc/Cargo.toml index 27957c3eb8..64e01ca85b 100644 --- a/packages/services/job/standalone/gc/Cargo.toml +++ b/packages/services/job/standalone/gc/Cargo.toml @@ -36,8 +36,7 @@ mm-lobby-get = { path = "../../../mm/ops/lobby-get" } rivet-config = { version = "0.1.0", path = "../../../../common/config" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/linode/Cargo.toml b/packages/services/linode/Cargo.toml index 489417bd90..956bd6219e 100644 --- a/packages/services/linode/Cargo.toml +++ b/packages/services/linode/Cargo.toml @@ -17,8 +17,7 @@ serde_json = "1.0" ssh-key = "0.6.3" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/linode/standalone/gc/Cargo.toml b/packages/services/linode/standalone/gc/Cargo.toml index 884e75dcc6..a0a9bb27d8 100644 --- a/packages/services/linode/standalone/gc/Cargo.toml +++ b/packages/services/linode/standalone/gc/Cargo.toml @@ -26,8 +26,7 @@ linode = { path = "../.." } rivet-config = { version = "0.1.0", path = "../../../../common/config" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/load-test/standalone/sqlx/Cargo.toml b/packages/services/load-test/standalone/sqlx/Cargo.toml index 365553fb73..36a1701883 100644 --- a/packages/services/load-test/standalone/sqlx/Cargo.toml +++ b/packages/services/load-test/standalone/sqlx/Cargo.toml @@ -30,6 +30,5 @@ rivet-config = { version = "0.1.0", path = "../../../../common/config" } chirp-worker = { path = "../../../../common/chirp/worker" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false diff --git a/packages/services/mm-config/ops/game-get/Cargo.toml b/packages/services/mm-config/ops/game-get/Cargo.toml index b8842aa6f4..5fd59251d1 100644 --- a/packages/services/mm-config/ops/game-get/Cargo.toml +++ b/packages/services/mm-config/ops/game-get/Cargo.toml @@ -10,8 +10,7 @@ chirp-client = { path = "../../../../common/chirp/client" } rivet-operation = { path = "../../../../common/operation/core" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/mm-config/ops/game-upsert/Cargo.toml b/packages/services/mm-config/ops/game-upsert/Cargo.toml index ab277ee0cf..598d2e1d37 100644 --- a/packages/services/mm-config/ops/game-upsert/Cargo.toml +++ b/packages/services/mm-config/ops/game-upsert/Cargo.toml @@ -10,8 +10,7 @@ chirp-client = { path = "../../../../common/chirp/client" } rivet-operation = { path = "../../../../common/operation/core" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/mm-config/ops/lobby-group-get/Cargo.toml b/packages/services/mm-config/ops/lobby-group-get/Cargo.toml index 8887bdcabd..5796592f1d 100644 --- a/packages/services/mm-config/ops/lobby-group-get/Cargo.toml +++ b/packages/services/mm-config/ops/lobby-group-get/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/mm-config/ops/lobby-group-resolve-name-id/Cargo.toml b/packages/services/mm-config/ops/lobby-group-resolve-name-id/Cargo.toml index c855713a19..fdf0134804 100644 --- a/packages/services/mm-config/ops/lobby-group-resolve-name-id/Cargo.toml +++ b/packages/services/mm-config/ops/lobby-group-resolve-name-id/Cargo.toml @@ -12,8 +12,7 @@ prost = "0.10" util-mm = { package = "rivet-util-mm", path = "../../../mm/util" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/mm-config/ops/lobby-group-resolve-version/Cargo.toml b/packages/services/mm-config/ops/lobby-group-resolve-version/Cargo.toml index 8217386c0d..ca833b7041 100644 --- a/packages/services/mm-config/ops/lobby-group-resolve-version/Cargo.toml +++ b/packages/services/mm-config/ops/lobby-group-resolve-version/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/mm-config/ops/namespace-config-set/Cargo.toml b/packages/services/mm-config/ops/namespace-config-set/Cargo.toml index 8a3699de5b..f45b35d4d6 100644 --- a/packages/services/mm-config/ops/namespace-config-set/Cargo.toml +++ b/packages/services/mm-config/ops/namespace-config-set/Cargo.toml @@ -13,8 +13,7 @@ prost = "0.10" mm-config-namespace-config-validate = { path = "../namespace-config-validate" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/mm-config/ops/namespace-create/Cargo.toml b/packages/services/mm-config/ops/namespace-create/Cargo.toml index a783cf81eb..8298c06524 100644 --- a/packages/services/mm-config/ops/namespace-create/Cargo.toml +++ b/packages/services/mm-config/ops/namespace-create/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/mm-config/ops/namespace-get/Cargo.toml b/packages/services/mm-config/ops/namespace-get/Cargo.toml index 98d7f4cef7..8ca926e1ac 100644 --- a/packages/services/mm-config/ops/namespace-get/Cargo.toml +++ b/packages/services/mm-config/ops/namespace-get/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/mm-config/ops/version-get/Cargo.toml b/packages/services/mm-config/ops/version-get/Cargo.toml index a6ef6fe520..ff52ffb3c8 100644 --- a/packages/services/mm-config/ops/version-get/Cargo.toml +++ b/packages/services/mm-config/ops/version-get/Cargo.toml @@ -12,8 +12,7 @@ prost = "0.10" util-mm = { package = "rivet-util-mm", path = "../../../mm/util" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/mm-config/ops/version-prepare/Cargo.toml b/packages/services/mm-config/ops/version-prepare/Cargo.toml index 195a607a17..ae3b69d6ad 100644 --- a/packages/services/mm-config/ops/version-prepare/Cargo.toml +++ b/packages/services/mm-config/ops/version-prepare/Cargo.toml @@ -24,8 +24,7 @@ region-get = { path = "../../../region/ops/get" } tier = { path = "../../../tier" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/mm-config/ops/version-publish/Cargo.toml b/packages/services/mm-config/ops/version-publish/Cargo.toml index 149a365acc..ba5e863acf 100644 --- a/packages/services/mm-config/ops/version-publish/Cargo.toml +++ b/packages/services/mm-config/ops/version-publish/Cargo.toml @@ -12,8 +12,7 @@ prost = "0.10" util-mm = { package = "rivet-util-mm", path = "../../../mm/util" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/mm/ops/lobby-for-run-id/Cargo.toml b/packages/services/mm/ops/lobby-for-run-id/Cargo.toml index 8bbe4799f7..a69f4b3032 100644 --- a/packages/services/mm/ops/lobby-for-run-id/Cargo.toml +++ b/packages/services/mm/ops/lobby-for-run-id/Cargo.toml @@ -10,8 +10,7 @@ chirp-client = { path = "../../../../common/chirp/client" } rivet-operation = { path = "../../../../common/operation/core" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/mm/ops/lobby-get/Cargo.toml b/packages/services/mm/ops/lobby-get/Cargo.toml index 81c844d151..09945c2014 100644 --- a/packages/services/mm/ops/lobby-get/Cargo.toml +++ b/packages/services/mm/ops/lobby-get/Cargo.toml @@ -12,8 +12,7 @@ chrono = "0.4" prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/mm/ops/lobby-history/Cargo.toml b/packages/services/mm/ops/lobby-history/Cargo.toml index 64bc8fdcfe..616c957705 100644 --- a/packages/services/mm/ops/lobby-history/Cargo.toml +++ b/packages/services/mm/ops/lobby-history/Cargo.toml @@ -12,8 +12,7 @@ chrono = "0.4" prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/mm/ops/lobby-idle-update/Cargo.toml b/packages/services/mm/ops/lobby-idle-update/Cargo.toml index de120bec91..019710eb4b 100644 --- a/packages/services/mm/ops/lobby-idle-update/Cargo.toml +++ b/packages/services/mm/ops/lobby-idle-update/Cargo.toml @@ -17,8 +17,7 @@ game-namespace-get = { path = "../../../game/ops/namespace-get" } mm-config-version-get = { path = "../../../mm-config/ops/version-get" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/mm/ops/lobby-list-for-namespace/Cargo.toml b/packages/services/mm/ops/lobby-list-for-namespace/Cargo.toml index 4a1769f6dc..b2df118f48 100644 --- a/packages/services/mm/ops/lobby-list-for-namespace/Cargo.toml +++ b/packages/services/mm/ops/lobby-list-for-namespace/Cargo.toml @@ -12,8 +12,7 @@ prost = "0.10" util-mm = { package = "rivet-util-mm", path = "../../util" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/mm/ops/lobby-list-for-user-id/Cargo.toml b/packages/services/mm/ops/lobby-list-for-user-id/Cargo.toml index c0e5835b7f..498d85d2bf 100644 --- a/packages/services/mm/ops/lobby-list-for-user-id/Cargo.toml +++ b/packages/services/mm/ops/lobby-list-for-user-id/Cargo.toml @@ -11,8 +11,7 @@ rivet-operation = { path = "../../../../common/operation/core" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/mm/ops/lobby-player-count/Cargo.toml b/packages/services/mm/ops/lobby-player-count/Cargo.toml index 4dacbcac94..06e1563444 100644 --- a/packages/services/mm/ops/lobby-player-count/Cargo.toml +++ b/packages/services/mm/ops/lobby-player-count/Cargo.toml @@ -12,8 +12,7 @@ prost = "0.10" util-mm = { package = "rivet-util-mm", path = "../../util" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/mm/ops/lobby-runtime-aggregate/Cargo.toml b/packages/services/mm/ops/lobby-runtime-aggregate/Cargo.toml index 86d44d7d58..4adec6aa2c 100644 --- a/packages/services/mm/ops/lobby-runtime-aggregate/Cargo.toml +++ b/packages/services/mm/ops/lobby-runtime-aggregate/Cargo.toml @@ -16,8 +16,7 @@ mm-config-lobby-group-resolve-version = { path = "../../../mm-config/ops/lobby-g mm-config-version-get = { path = "../../../mm-config/ops/version-get" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/mm/ops/lobby-state-get/Cargo.toml b/packages/services/mm/ops/lobby-state-get/Cargo.toml index 2021bf5356..284e2f817e 100644 --- a/packages/services/mm/ops/lobby-state-get/Cargo.toml +++ b/packages/services/mm/ops/lobby-state-get/Cargo.toml @@ -12,8 +12,7 @@ prost = "0.10" util-mm = { package = "rivet-util-mm", path = "../../util" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/mm/ops/player-count-for-namespace/Cargo.toml b/packages/services/mm/ops/player-count-for-namespace/Cargo.toml index 678888f881..ba539f448b 100644 --- a/packages/services/mm/ops/player-count-for-namespace/Cargo.toml +++ b/packages/services/mm/ops/player-count-for-namespace/Cargo.toml @@ -12,8 +12,7 @@ prost = "0.10" util-mm = { package = "rivet-util-mm", path = "../../util" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/mm/ops/player-get/Cargo.toml b/packages/services/mm/ops/player-get/Cargo.toml index ab2c06db19..688db6513e 100644 --- a/packages/services/mm/ops/player-get/Cargo.toml +++ b/packages/services/mm/ops/player-get/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/mm/standalone/gc/Cargo.toml b/packages/services/mm/standalone/gc/Cargo.toml index c27f53ebbd..fa812d2454 100644 --- a/packages/services/mm/standalone/gc/Cargo.toml +++ b/packages/services/mm/standalone/gc/Cargo.toml @@ -31,8 +31,7 @@ region-list = { path = "../../../region/ops/list" } rivet-config = { version = "0.1.0", path = "../../../../common/config" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/mm/worker/Cargo.toml b/packages/services/mm/worker/Cargo.toml index 789204c379..83b0ba90f8 100644 --- a/packages/services/mm/worker/Cargo.toml +++ b/packages/services/mm/worker/Cargo.toml @@ -55,8 +55,7 @@ upload-prepare = { path = "../../upload/ops/prepare" } rivet-config = { version = "0.1.0", path = "../../../common/config" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/nomad/standalone/monitor/Cargo.toml b/packages/services/nomad/standalone/monitor/Cargo.toml index 53411755be..6f91f43207 100644 --- a/packages/services/nomad/standalone/monitor/Cargo.toml +++ b/packages/services/nomad/standalone/monitor/Cargo.toml @@ -37,8 +37,7 @@ ds = { path = "../../../ds" } rivet-config = { version = "0.1.0", path = "../../../../common/config" } [dependencies.nomad_client] -git = "https://github.com/rivet-gg/nomad-client" -rev = "abb66bf0c30c7ff5b0c695dae952481c33e538b5" # pragma: allowlist secret +path = "../../../../../externals/nomad-client" [dev-dependencies] chirp-worker = { path = "../../../../common/chirp/worker" } diff --git a/packages/services/pegboard/Cargo.toml b/packages/services/pegboard/Cargo.toml index a354d9196c..013179756c 100644 --- a/packages/services/pegboard/Cargo.toml +++ b/packages/services/pegboard/Cargo.toml @@ -26,7 +26,6 @@ rivet-config = { version = "0.1.0", path = "../../common/config" } [dependencies.sqlx] optional = true -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../externals/sqlx" default-features = false features = [ "json", "ipnetwork" ] diff --git a/packages/services/pegboard/standalone/gc/Cargo.toml b/packages/services/pegboard/standalone/gc/Cargo.toml index 40b6e2d501..045ddbc277 100644 --- a/packages/services/pegboard/standalone/gc/Cargo.toml +++ b/packages/services/pegboard/standalone/gc/Cargo.toml @@ -22,8 +22,7 @@ pegboard = { path = "../.." } rivet-config = { version = "0.1.0", path = "../../../../common/config" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/region/ops/get/Cargo.toml b/packages/services/region/ops/get/Cargo.toml index 970b87d9de..10f50992eb 100644 --- a/packages/services/region/ops/get/Cargo.toml +++ b/packages/services/region/ops/get/Cargo.toml @@ -14,8 +14,7 @@ rivet-operation = { path = "../../../../common/operation/core" } cluster = { path = "../../../cluster" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/region/ops/list-for-game/Cargo.toml b/packages/services/region/ops/list-for-game/Cargo.toml index f907923daa..40f5d884a1 100644 --- a/packages/services/region/ops/list-for-game/Cargo.toml +++ b/packages/services/region/ops/list-for-game/Cargo.toml @@ -14,8 +14,7 @@ rivet-operation = { path = "../../../../common/operation/core" } cluster = { path = "../../../cluster" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/region/ops/list/Cargo.toml b/packages/services/region/ops/list/Cargo.toml index 4b8052339e..92cdaa4b11 100644 --- a/packages/services/region/ops/list/Cargo.toml +++ b/packages/services/region/ops/list/Cargo.toml @@ -14,8 +14,7 @@ rivet-operation = { path = "../../../../common/operation/core" } cluster = { path = "../../../cluster" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/region/ops/recommend/Cargo.toml b/packages/services/region/ops/recommend/Cargo.toml index f4b86c40af..3bcf6b14ab 100644 --- a/packages/services/region/ops/recommend/Cargo.toml +++ b/packages/services/region/ops/recommend/Cargo.toml @@ -15,8 +15,7 @@ ip-info = { path = "../../../ip/ops/info" } region-get = { path = "../get" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/region/ops/resolve-for-game/Cargo.toml b/packages/services/region/ops/resolve-for-game/Cargo.toml index 0478f1fed2..d02e211664 100644 --- a/packages/services/region/ops/resolve-for-game/Cargo.toml +++ b/packages/services/region/ops/resolve-for-game/Cargo.toml @@ -15,8 +15,7 @@ cluster = { path = "../../../cluster" } region-list-for-game = { path = "../list-for-game" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/region/ops/resolve/Cargo.toml b/packages/services/region/ops/resolve/Cargo.toml index a4fd166ff8..3aab7f7d75 100644 --- a/packages/services/region/ops/resolve/Cargo.toml +++ b/packages/services/region/ops/resolve/Cargo.toml @@ -15,8 +15,7 @@ cluster = { path = "../../../cluster" } region-list = { path = "../list" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/team-invite/ops/get/Cargo.toml b/packages/services/team-invite/ops/get/Cargo.toml index dcb9258383..1c5487b5c7 100644 --- a/packages/services/team-invite/ops/get/Cargo.toml +++ b/packages/services/team-invite/ops/get/Cargo.toml @@ -12,8 +12,7 @@ chrono = "0.4" prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/team-invite/worker/Cargo.toml b/packages/services/team-invite/worker/Cargo.toml index a33238eaec..f5970d9025 100644 --- a/packages/services/team-invite/worker/Cargo.toml +++ b/packages/services/team-invite/worker/Cargo.toml @@ -18,8 +18,7 @@ team-user-ban-get = { path = "../../team/ops/user-ban-get" } rivet-config = { version = "0.1.0", path = "../../../common/config" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/team/ops/avatar-upload-complete/Cargo.toml b/packages/services/team/ops/avatar-upload-complete/Cargo.toml index 0cbd2d3dcc..a3b860b1c9 100644 --- a/packages/services/team/ops/avatar-upload-complete/Cargo.toml +++ b/packages/services/team/ops/avatar-upload-complete/Cargo.toml @@ -13,8 +13,7 @@ prost = "0.10" upload-complete = { path = "../../../upload/ops/complete" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/team/ops/get/Cargo.toml b/packages/services/team/ops/get/Cargo.toml index d064370395..69721baa15 100644 --- a/packages/services/team/ops/get/Cargo.toml +++ b/packages/services/team/ops/get/Cargo.toml @@ -14,8 +14,7 @@ upload-file-list = { path = "../../../upload/ops/file-list" } upload-get = { path = "../../../upload/ops/get" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/team/ops/join-request-list/Cargo.toml b/packages/services/team/ops/join-request-list/Cargo.toml index dc34ce638b..b8d91bfd2b 100644 --- a/packages/services/team/ops/join-request-list/Cargo.toml +++ b/packages/services/team/ops/join-request-list/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/team/ops/member-count/Cargo.toml b/packages/services/team/ops/member-count/Cargo.toml index 66246e6760..862604aeb4 100644 --- a/packages/services/team/ops/member-count/Cargo.toml +++ b/packages/services/team/ops/member-count/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/team/ops/member-get/Cargo.toml b/packages/services/team/ops/member-get/Cargo.toml index 1b6f52bf8d..33af566088 100644 --- a/packages/services/team/ops/member-get/Cargo.toml +++ b/packages/services/team/ops/member-get/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/team/ops/member-list/Cargo.toml b/packages/services/team/ops/member-list/Cargo.toml index cabc26bd26..30236f3af2 100644 --- a/packages/services/team/ops/member-list/Cargo.toml +++ b/packages/services/team/ops/member-list/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/team/ops/member-relationship-get/Cargo.toml b/packages/services/team/ops/member-relationship-get/Cargo.toml index 62119d47bd..2932506833 100644 --- a/packages/services/team/ops/member-relationship-get/Cargo.toml +++ b/packages/services/team/ops/member-relationship-get/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/team/ops/profile-validate/Cargo.toml b/packages/services/team/ops/profile-validate/Cargo.toml index 7cb171d504..80a412aae3 100644 --- a/packages/services/team/ops/profile-validate/Cargo.toml +++ b/packages/services/team/ops/profile-validate/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/team/ops/recommend/Cargo.toml b/packages/services/team/ops/recommend/Cargo.toml index 52e23adba3..0feea1dcd7 100644 --- a/packages/services/team/ops/recommend/Cargo.toml +++ b/packages/services/team/ops/recommend/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/team/ops/resolve-display-name/Cargo.toml b/packages/services/team/ops/resolve-display-name/Cargo.toml index c308248bf3..b2191327c3 100644 --- a/packages/services/team/ops/resolve-display-name/Cargo.toml +++ b/packages/services/team/ops/resolve-display-name/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/team/ops/user-ban-get/Cargo.toml b/packages/services/team/ops/user-ban-get/Cargo.toml index 0364e32eb8..bf45da8f31 100644 --- a/packages/services/team/ops/user-ban-get/Cargo.toml +++ b/packages/services/team/ops/user-ban-get/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/team/ops/user-ban-list/Cargo.toml b/packages/services/team/ops/user-ban-list/Cargo.toml index 6320490116..175f87c436 100644 --- a/packages/services/team/ops/user-ban-list/Cargo.toml +++ b/packages/services/team/ops/user-ban-list/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/telemetry/standalone/beacon/Cargo.toml b/packages/services/telemetry/standalone/beacon/Cargo.toml index 0f5028284c..276a18f513 100644 --- a/packages/services/telemetry/standalone/beacon/Cargo.toml +++ b/packages/services/telemetry/standalone/beacon/Cargo.toml @@ -6,7 +6,7 @@ authors = ["Rivet Gaming, LLC "] license = "Apache-2.0" [dependencies] -async-posthog = { git = "https://github.com/rivet-gg/posthog-rs.git", rev = "ef4e80e" } +async-posthog = { path = "../../../../../externals/posthog-rs/async" } chirp-client = { path = "../../../../common/chirp/client" } futures-util = "0.3" indoc = "1.0" @@ -41,8 +41,7 @@ pegboard = { version = "0.0.1", path = "../../../pegboard" } serde = { version = "1.0.214", features = ["derive"] } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/token/ops/create/Cargo.toml b/packages/services/token/ops/create/Cargo.toml index 3749a0b73d..fc22cd1cd9 100644 --- a/packages/services/token/ops/create/Cargo.toml +++ b/packages/services/token/ops/create/Cargo.toml @@ -16,8 +16,7 @@ jsonwebtoken = "8.2.0" lazy_static = "1.4" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/token/ops/exchange/Cargo.toml b/packages/services/token/ops/exchange/Cargo.toml index a90144070d..91a81f6330 100644 --- a/packages/services/token/ops/exchange/Cargo.toml +++ b/packages/services/token/ops/exchange/Cargo.toml @@ -12,8 +12,7 @@ chrono = "0.4" prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false diff --git a/packages/services/token/ops/get/Cargo.toml b/packages/services/token/ops/get/Cargo.toml index 0d6341cbb6..b21869e948 100644 --- a/packages/services/token/ops/get/Cargo.toml +++ b/packages/services/token/ops/get/Cargo.toml @@ -12,8 +12,7 @@ chrono = "0.4" prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/token/ops/revoke/Cargo.toml b/packages/services/token/ops/revoke/Cargo.toml index 5429f9b60d..8b6f6d92f5 100644 --- a/packages/services/token/ops/revoke/Cargo.toml +++ b/packages/services/token/ops/revoke/Cargo.toml @@ -12,8 +12,7 @@ chrono = "0.4" prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/upload/ops/complete/Cargo.toml b/packages/services/upload/ops/complete/Cargo.toml index 50403beb56..eb417cab8f 100644 --- a/packages/services/upload/ops/complete/Cargo.toml +++ b/packages/services/upload/ops/complete/Cargo.toml @@ -14,8 +14,7 @@ s3-util = { path = "../../../../common/s3-util" } url = "2.2" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/upload/ops/file-list/Cargo.toml b/packages/services/upload/ops/file-list/Cargo.toml index 6c47a30386..b17b2bd017 100644 --- a/packages/services/upload/ops/file-list/Cargo.toml +++ b/packages/services/upload/ops/file-list/Cargo.toml @@ -12,8 +12,7 @@ prost = "0.10" rivet-operation = { path = "../../../../common/operation/core" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/upload/ops/get/Cargo.toml b/packages/services/upload/ops/get/Cargo.toml index 22d9ef2193..5b707d506e 100644 --- a/packages/services/upload/ops/get/Cargo.toml +++ b/packages/services/upload/ops/get/Cargo.toml @@ -12,8 +12,7 @@ chrono = "0.4" prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/upload/ops/list-for-user/Cargo.toml b/packages/services/upload/ops/list-for-user/Cargo.toml index 080e1992a1..ed686f679f 100644 --- a/packages/services/upload/ops/list-for-user/Cargo.toml +++ b/packages/services/upload/ops/list-for-user/Cargo.toml @@ -12,8 +12,7 @@ chrono = "0.4" prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/upload/ops/prepare/Cargo.toml b/packages/services/upload/ops/prepare/Cargo.toml index ae61f4eb18..175815bfc6 100644 --- a/packages/services/upload/ops/prepare/Cargo.toml +++ b/packages/services/upload/ops/prepare/Cargo.toml @@ -13,8 +13,7 @@ prost = "0.10" s3-util = { path = "../../../../common/s3-util" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/upload/worker/Cargo.toml b/packages/services/upload/worker/Cargo.toml index 31544cbc25..45f64df35e 100644 --- a/packages/services/upload/worker/Cargo.toml +++ b/packages/services/upload/worker/Cargo.toml @@ -15,8 +15,7 @@ s3-util = { path = "../../../common/s3-util" } rivet-config = { version = "0.1.0", path = "../../../common/config" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/user-identity/ops/delete/Cargo.toml b/packages/services/user-identity/ops/delete/Cargo.toml index f5102bc536..3076a918be 100644 --- a/packages/services/user-identity/ops/delete/Cargo.toml +++ b/packages/services/user-identity/ops/delete/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/user-identity/ops/get/Cargo.toml b/packages/services/user-identity/ops/get/Cargo.toml index d2e236b9c6..4925e242de 100644 --- a/packages/services/user-identity/ops/get/Cargo.toml +++ b/packages/services/user-identity/ops/get/Cargo.toml @@ -13,8 +13,7 @@ user-get = { version = "0.0.1", path = "../../../user/ops/get" } rivet-config = { version = "0.1.0", path = "../../../../common/config" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/user/ops/avatar-upload-complete/Cargo.toml b/packages/services/user/ops/avatar-upload-complete/Cargo.toml index 6bf0d0cc8a..0f0a6ae267 100644 --- a/packages/services/user/ops/avatar-upload-complete/Cargo.toml +++ b/packages/services/user/ops/avatar-upload-complete/Cargo.toml @@ -13,8 +13,7 @@ prost = "0.10" upload-complete = { path = "../../../upload/ops/complete" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/user/ops/get/Cargo.toml b/packages/services/user/ops/get/Cargo.toml index 0d58d6685d..36845dc37b 100644 --- a/packages/services/user/ops/get/Cargo.toml +++ b/packages/services/user/ops/get/Cargo.toml @@ -14,8 +14,7 @@ upload-file-list = { path = "../../../upload/ops/file-list" } upload-get = { path = "../../../upload/ops/get" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/user/ops/pending-delete-toggle/Cargo.toml b/packages/services/user/ops/pending-delete-toggle/Cargo.toml index c3d3532221..373fb91125 100644 --- a/packages/services/user/ops/pending-delete-toggle/Cargo.toml +++ b/packages/services/user/ops/pending-delete-toggle/Cargo.toml @@ -13,8 +13,7 @@ prost = "0.10" user-identity-get = { path = "../../../user-identity/ops/get" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/user/ops/profile-validate/Cargo.toml b/packages/services/user/ops/profile-validate/Cargo.toml index d5bfe86cfd..658e4533bf 100644 --- a/packages/services/user/ops/profile-validate/Cargo.toml +++ b/packages/services/user/ops/profile-validate/Cargo.toml @@ -13,8 +13,7 @@ prost = "0.10" user-get = { path = "../get" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/user/ops/resolve-email/Cargo.toml b/packages/services/user/ops/resolve-email/Cargo.toml index 0d683653c8..4ee36f8dd2 100644 --- a/packages/services/user/ops/resolve-email/Cargo.toml +++ b/packages/services/user/ops/resolve-email/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/user/ops/team-list/Cargo.toml b/packages/services/user/ops/team-list/Cargo.toml index 09d0a29df6..01cf51da4e 100644 --- a/packages/services/user/ops/team-list/Cargo.toml +++ b/packages/services/user/ops/team-list/Cargo.toml @@ -11,8 +11,7 @@ chirp-client = { path = "../../../../common/chirp/client" } prost = "0.10" [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/user/ops/token-create/Cargo.toml b/packages/services/user/ops/token-create/Cargo.toml index fbe1ee06a2..a35934e40f 100644 --- a/packages/services/user/ops/token-create/Cargo.toml +++ b/packages/services/user/ops/token-create/Cargo.toml @@ -13,8 +13,7 @@ prost = "0.10" token-create = { path = "../../../token/ops/create" } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/packages/services/workflow/standalone/metrics-publish/Cargo.toml b/packages/services/workflow/standalone/metrics-publish/Cargo.toml index 6219121392..ff4b1d78dd 100644 --- a/packages/services/workflow/standalone/metrics-publish/Cargo.toml +++ b/packages/services/workflow/standalone/metrics-publish/Cargo.toml @@ -18,8 +18,7 @@ tracing = "0.1" tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt", "json", "ansi"] } [dependencies.sqlx] -git = "https://github.com/rivet-gg/sqlx" -rev = "e7120f59b74fb6d83ac9b1d899b166bab31ba1d6" +path = "../../../../../externals/sqlx" default-features = false [dev-dependencies] diff --git a/scripts/fern/check.sh b/scripts/fern/check.sh index 4554ac4ce6..9b5cae4fae 100755 --- a/scripts/fern/check.sh +++ b/scripts/fern/check.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash set -euf -o pipefail -(cd sdks && npx -p fern-api fern check --warnings) +(cd sdks && npx -p fern-api@0.44.11 fern check --warnings) diff --git a/scripts/fern/gen_inner.sh b/scripts/fern/gen_inner.sh index 0590df937f..072b329d76 100755 --- a/scripts/fern/gen_inner.sh +++ b/scripts/fern/gen_inner.sh @@ -2,7 +2,7 @@ set -euf -o pipefail # Generate Fern libraries -(cd sdks && FERN_NO_VERSION_REDIRECTION=true FERN_DISABLE_TELEMETRY=true npx -p fern-api fern generate --local --group $FERN_GROUP --log-level debug) +(cd sdks && FERN_NO_VERSION_REDIRECTION=true FERN_DISABLE_TELEMETRY=true npx -p fern-api@0.44.11 fern generate --local --group $FERN_GROUP --log-level debug) # Add missing deps (cd sdks/$FERN_GROUP/typescript && nix-shell -p jq --run 'jq ".devDependencies[\"@types/node-fetch\"] = \"2.6.11\"" package.json > package.json.tmp && mv package.json.tmp package.json') diff --git a/scripts/openapi/gen_rust.sh b/scripts/openapi/gen_rust.sh index b73ad5ceba..a2d28dddb6 100755 --- a/scripts/openapi/gen_rust.sh +++ b/scripts/openapi/gen_rust.sh @@ -30,3 +30,7 @@ if [ "$FERN_GROUP" == "full" ]; then # HACK: Modify libraries to disallow unknown fields in config find $GEN_PATH_RUST_CLI -name "cloud_version_*.rs" -exec sed -i 's/\(#\[derive.*Deserialize.*\]\)/\1\n#[serde(deny_unknown_fields)]/g' {} \; fi + +# Format SDKs +cargo fmt + diff --git a/sdks/full/rust/src/apis/actor_api.rs b/sdks/full/rust/src/apis/actor_api.rs index 765271de25..426517985e 100644 --- a/sdks/full/rust/src/apis/actor_api.rs +++ b/sdks/full/rust/src/apis/actor_api.rs @@ -4,222 +4,284 @@ * No description provided (generated 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 [`actor_create`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ActorCreateError { - Status400(crate::models::ErrorBody), - 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 [`actor_destroy`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ActorDestroyError { - Status400(crate::models::ErrorBody), - 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 [`actor_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ActorGetError { - Status400(crate::models::ErrorBody), - 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 [`actor_list`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ActorListError { - Status400(crate::models::ErrorBody), - 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 actor. -pub async fn actor_create(configuration: &configuration::Configuration, actor_create_actor_request: crate::models::ActorCreateActorRequest) -> 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_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref 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(&actor_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 actor_create( + configuration: &configuration::Configuration, + actor_create_actor_request: crate::models::ActorCreateActorRequest, +) -> 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_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref 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(&actor_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 actor_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 actor_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 actor_get(configuration: &configuration::Configuration, actor: &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!("{}/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_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref 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 actor_get( + configuration: &configuration::Configuration, + actor: &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!( + "{}/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_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref 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 actor_list(configuration: &configuration::Configuration, project: Option<&str>, environment: Option<&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!("{}/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) = 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 actor_list( + configuration: &configuration::Configuration, + project: Option<&str>, + environment: Option<&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!("{}/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) = 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/full/rust/src/apis/actor_builds_api.rs b/sdks/full/rust/src/apis/actor_builds_api.rs index b5e053e283..704abe4e48 100644 --- a/sdks/full/rust/src/apis/actor_builds_api.rs +++ b/sdks/full/rust/src/apis/actor_builds_api.rs @@ -4,272 +4,354 @@ * No description provided (generated 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 [`actor_builds_complete`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ActorBuildsCompleteError { - Status400(crate::models::ErrorBody), - 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 [`actor_builds_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ActorBuildsGetError { - Status400(crate::models::ErrorBody), - 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 [`actor_builds_list`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ActorBuildsListError { - Status400(crate::models::ErrorBody), - 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 [`actor_builds_patch_tags`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ActorBuildsPatchTagsError { - Status400(crate::models::ErrorBody), - 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 [`actor_builds_prepare`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ActorBuildsPrepareError { - Status400(crate::models::ErrorBody), - 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 actor_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 actor_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)) + } } /// Lists all builds of the project associated with the token used. Can be filtered by tags in the query string. -pub async fn actor_builds_get(configuration: &configuration::Configuration, build: &str, 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/{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_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 actor_builds_get( + configuration: &configuration::Configuration, + build: &str, + 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/{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_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 project associated with the token used. Can be filtered by tags in the query string. -pub async fn actor_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 actor_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 actor_builds_patch_tags(configuration: &configuration::Configuration, build: &str, actor_patch_build_tags_request: crate::models::ActorPatchBuildTagsRequest, 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(&actor_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 actor_builds_patch_tags( + configuration: &configuration::Configuration, + build: &str, + actor_patch_build_tags_request: crate::models::ActorPatchBuildTagsRequest, + 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(&actor_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 actor_builds_prepare(configuration: &configuration::Configuration, actor_prepare_build_request: crate::models::ActorPrepareBuildRequest, 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(&actor_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 actor_builds_prepare( + configuration: &configuration::Configuration, + actor_prepare_build_request: crate::models::ActorPrepareBuildRequest, + 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(&actor_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/full/rust/src/apis/actor_logs_api.rs b/sdks/full/rust/src/apis/actor_logs_api.rs index 461db7db1d..e5136cbffe 100644 --- a/sdks/full/rust/src/apis/actor_logs_api.rs +++ b/sdks/full/rust/src/apis/actor_logs_api.rs @@ -4,69 +4,86 @@ * No description provided (generated 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 [`actor_logs_get`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ActorLogsGetError { - Status400(crate::models::ErrorBody), - 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 actor. -pub async fn actor_logs_get(configuration: &configuration::Configuration, actor: &str, stream: crate::models::ActorLogStream, project: Option<&str>, environment: Option<&str>, watch_index: Option<&str>) -> Result> { - let local_var_configuration = configuration; +pub async fn actor_logs_get( + configuration: &configuration::Configuration, + actor: &str, + stream: crate::models::ActorLogStream, + 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_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/actors/{actor}/logs", 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}/logs", + 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(&[("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()); - }; + 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())]); + 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/full/rust/src/apis/actor_regions_api.rs b/sdks/full/rust/src/apis/actor_regions_api.rs index 4dacb2916b..965ea3902a 100644 --- a/sdks/full/rust/src/apis/actor_regions_api.rs +++ b/sdks/full/rust/src/apis/actor_regions_api.rs @@ -4,64 +4,73 @@ * No description provided (generated 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 [`actor_regions_list`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ActorRegionsListError { - Status400(crate::models::ErrorBody), - 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 actor_regions_list( + configuration: &configuration::Configuration, + project: Option<&str>, + environment: Option<&str>, +) -> Result> { + let local_var_configuration = configuration; -pub async fn actor_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_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()); - 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()); + } + if let Some(ref 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())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref 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/full/rust/src/apis/auth_identity_email_api.rs b/sdks/full/rust/src/apis/auth_identity_email_api.rs index 751bdad564..01663ebd12 100644 --- a/sdks/full/rust/src/apis/auth_identity_email_api.rs +++ b/sdks/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/full/rust/src/apis/auth_tokens_api.rs b/sdks/full/rust/src/apis/auth_tokens_api.rs index 1890915227..e528d6d633 100644 --- a/sdks/full/rust/src/apis/auth_tokens_api.rs +++ b/sdks/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/full/rust/src/apis/cloud_api.rs b/sdks/full/rust/src/apis/cloud_api.rs index a440747fbd..60482ad366 100644 --- a/sdks/full/rust/src/apis/cloud_api.rs +++ b/sdks/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/full/rust/src/apis/cloud_auth_api.rs b/sdks/full/rust/src/apis/cloud_auth_api.rs index dd9b6ace1c..e400bc46b1 100644 --- a/sdks/full/rust/src/apis/cloud_auth_api.rs +++ b/sdks/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/full/rust/src/apis/cloud_devices_links_api.rs b/sdks/full/rust/src/apis/cloud_devices_links_api.rs index ded16ed7e6..2d5c04d917 100644 --- a/sdks/full/rust/src/apis/cloud_devices_links_api.rs +++ b/sdks/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/full/rust/src/apis/cloud_games_api.rs b/sdks/full/rust/src/apis/cloud_games_api.rs index b9a0a98e2b..455760ed69 100644 --- a/sdks/full/rust/src/apis/cloud_games_api.rs +++ b/sdks/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/full/rust/src/apis/cloud_games_avatars_api.rs b/sdks/full/rust/src/apis/cloud_games_avatars_api.rs index f8f658cb3b..f04e020c20 100644 --- a/sdks/full/rust/src/apis/cloud_games_avatars_api.rs +++ b/sdks/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/full/rust/src/apis/cloud_games_builds_api.rs b/sdks/full/rust/src/apis/cloud_games_builds_api.rs index d1bc1e91f6..8dcd39fabd 100644 --- a/sdks/full/rust/src/apis/cloud_games_builds_api.rs +++ b/sdks/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/full/rust/src/apis/cloud_games_cdn_api.rs b/sdks/full/rust/src/apis/cloud_games_cdn_api.rs index 7e017e7854..3c11c484c9 100644 --- a/sdks/full/rust/src/apis/cloud_games_cdn_api.rs +++ b/sdks/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/full/rust/src/apis/cloud_games_matchmaker_api.rs b/sdks/full/rust/src/apis/cloud_games_matchmaker_api.rs index 81ac9a1086..dd9e9dd021 100644 --- a/sdks/full/rust/src/apis/cloud_games_matchmaker_api.rs +++ b/sdks/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/full/rust/src/apis/cloud_games_namespaces_analytics_api.rs b/sdks/full/rust/src/apis/cloud_games_namespaces_analytics_api.rs index 07ac2d5954..3ea7312a59 100644 --- a/sdks/full/rust/src/apis/cloud_games_namespaces_analytics_api.rs +++ b/sdks/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/full/rust/src/apis/cloud_games_namespaces_api.rs b/sdks/full/rust/src/apis/cloud_games_namespaces_api.rs index db4128e3af..89824582e0 100644 --- a/sdks/full/rust/src/apis/cloud_games_namespaces_api.rs +++ b/sdks/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/full/rust/src/apis/cloud_games_namespaces_logs_api.rs b/sdks/full/rust/src/apis/cloud_games_namespaces_logs_api.rs index 43e8b17d20..2a2849f0bd 100644 --- a/sdks/full/rust/src/apis/cloud_games_namespaces_logs_api.rs +++ b/sdks/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/full/rust/src/apis/cloud_games_tokens_api.rs b/sdks/full/rust/src/apis/cloud_games_tokens_api.rs index 42318b5460..b37531cc9a 100644 --- a/sdks/full/rust/src/apis/cloud_games_tokens_api.rs +++ b/sdks/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/full/rust/src/apis/cloud_games_versions_api.rs b/sdks/full/rust/src/apis/cloud_games_versions_api.rs index 3b57b01cc3..a8b523d19a 100644 --- a/sdks/full/rust/src/apis/cloud_games_versions_api.rs +++ b/sdks/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/full/rust/src/apis/cloud_groups_api.rs b/sdks/full/rust/src/apis/cloud_groups_api.rs index 74d4ad260f..9bf1053e71 100644 --- a/sdks/full/rust/src/apis/cloud_groups_api.rs +++ b/sdks/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/full/rust/src/apis/cloud_logs_api.rs b/sdks/full/rust/src/apis/cloud_logs_api.rs index 30436fa40d..0fc44fff99 100644 --- a/sdks/full/rust/src/apis/cloud_logs_api.rs +++ b/sdks/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/full/rust/src/apis/cloud_tiers_api.rs b/sdks/full/rust/src/apis/cloud_tiers_api.rs index 3f8df8ee31..cdecc649c7 100644 --- a/sdks/full/rust/src/apis/cloud_tiers_api.rs +++ b/sdks/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/full/rust/src/apis/cloud_uploads_api.rs b/sdks/full/rust/src/apis/cloud_uploads_api.rs index 5ff4809f43..685047855a 100644 --- a/sdks/full/rust/src/apis/cloud_uploads_api.rs +++ b/sdks/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/full/rust/src/apis/configuration.rs b/sdks/full/rust/src/apis/configuration.rs index 6535a51c12..15eda335ca 100644 --- a/sdks/full/rust/src/apis/configuration.rs +++ b/sdks/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/full/rust/src/apis/games_environments_tokens_api.rs b/sdks/full/rust/src/apis/games_environments_tokens_api.rs index a36af51a32..a23e9aedf7 100644 --- a/sdks/full/rust/src/apis/games_environments_tokens_api.rs +++ b/sdks/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/full/rust/src/apis/group_api.rs b/sdks/full/rust/src/apis/group_api.rs index a2e46b3ada..687ea14bc8 100644 --- a/sdks/full/rust/src/apis/group_api.rs +++ b/sdks/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/full/rust/src/apis/group_invites_api.rs b/sdks/full/rust/src/apis/group_invites_api.rs index 2940010eeb..74791d615b 100644 --- a/sdks/full/rust/src/apis/group_invites_api.rs +++ b/sdks/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/full/rust/src/apis/group_join_requests_api.rs b/sdks/full/rust/src/apis/group_join_requests_api.rs index 1b345544c5..321fe0c58b 100644 --- a/sdks/full/rust/src/apis/group_join_requests_api.rs +++ b/sdks/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/full/rust/src/apis/identity_activities_api.rs b/sdks/full/rust/src/apis/identity_activities_api.rs index b50c773b28..e559a90ab1 100644 --- a/sdks/full/rust/src/apis/identity_activities_api.rs +++ b/sdks/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/full/rust/src/apis/identity_api.rs b/sdks/full/rust/src/apis/identity_api.rs index fc7ff309f7..f0a656e0f0 100644 --- a/sdks/full/rust/src/apis/identity_api.rs +++ b/sdks/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/full/rust/src/apis/identity_events_api.rs b/sdks/full/rust/src/apis/identity_events_api.rs index db247b63fe..f31335222c 100644 --- a/sdks/full/rust/src/apis/identity_events_api.rs +++ b/sdks/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/full/rust/src/apis/job_run_api.rs b/sdks/full/rust/src/apis/job_run_api.rs index a67c3ad575..de8bad1fd2 100644 --- a/sdks/full/rust/src/apis/job_run_api.rs +++ b/sdks/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/full/rust/src/apis/matchmaker_lobbies_api.rs b/sdks/full/rust/src/apis/matchmaker_lobbies_api.rs index 50c2f0f0c6..44a4ce10e5 100644 --- a/sdks/full/rust/src/apis/matchmaker_lobbies_api.rs +++ b/sdks/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/full/rust/src/apis/matchmaker_players_api.rs b/sdks/full/rust/src/apis/matchmaker_players_api.rs index e0cb52729e..7121a0a8f8 100644 --- a/sdks/full/rust/src/apis/matchmaker_players_api.rs +++ b/sdks/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/full/rust/src/apis/matchmaker_regions_api.rs b/sdks/full/rust/src/apis/matchmaker_regions_api.rs index f70241924f..b7b1b4172c 100644 --- a/sdks/full/rust/src/apis/matchmaker_regions_api.rs +++ b/sdks/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/full/rust/src/apis/mod.rs b/sdks/full/rust/src/apis/mod.rs index ca5b181c44..308accea03 100644 --- a/sdks/full/rust/src/apis/mod.rs +++ b/sdks/full/rust/src/apis/mod.rs @@ -3,91 +3,93 @@ 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) - } +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 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![]; + 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())), - } - } + 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; - } + return params; + } - unimplemented!("Only objects are supported with style=deepObject") + unimplemented!("Only objects are supported with style=deepObject") } pub mod actor_api; @@ -104,8 +106,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; @@ -117,8 +119,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/full/rust/src/apis/portal_games_api.rs b/sdks/full/rust/src/apis/portal_games_api.rs index 731e627d6b..c7d12c164d 100644 --- a/sdks/full/rust/src/apis/portal_games_api.rs +++ b/sdks/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/full/rust/src/apis/provision_datacenters_api.rs b/sdks/full/rust/src/apis/provision_datacenters_api.rs index f65a93e263..7d5f9673ae 100644 --- a/sdks/full/rust/src/apis/provision_datacenters_api.rs +++ b/sdks/full/rust/src/apis/provision_datacenters_api.rs @@ -4,58 +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 [`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_tls( + configuration: &configuration::Configuration, + datacenter_id: &str, +) -> Result> +{ + let local_var_configuration = configuration; -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_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()); - 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()); + }; - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref 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/full/rust/src/apis/provision_servers_api.rs b/sdks/full/rust/src/apis/provision_servers_api.rs index c2aab2852d..7ef19287a8 100644 --- a/sdks/full/rust/src/apis/provision_servers_api.rs +++ b/sdks/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/full/rust/src/apis/servers_api.rs b/sdks/full/rust/src/apis/servers_api.rs index 3ae454a3c5..a9703b6b99 100644 --- a/sdks/full/rust/src/apis/servers_api.rs +++ b/sdks/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/full/rust/src/apis/servers_builds_api.rs b/sdks/full/rust/src/apis/servers_builds_api.rs index 1dcd704434..97ec771029 100644 --- a/sdks/full/rust/src/apis/servers_builds_api.rs +++ b/sdks/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/full/rust/src/apis/servers_datacenters_api.rs b/sdks/full/rust/src/apis/servers_datacenters_api.rs index 5bb388081f..11e8490029 100644 --- a/sdks/full/rust/src/apis/servers_datacenters_api.rs +++ b/sdks/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/full/rust/src/apis/servers_logs_api.rs b/sdks/full/rust/src/apis/servers_logs_api.rs index d0233ea3a7..5d1eb5f386 100644 --- a/sdks/full/rust/src/apis/servers_logs_api.rs +++ b/sdks/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/full/rust/src/lib.rs b/sdks/full/rust/src/lib.rs index c1dd666f79..fc22e4e4b9 100644 --- a/sdks/full/rust/src/lib.rs +++ b/sdks/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/full/rust/src/models/actor_actor.rs b/sdks/full/rust/src/models/actor_actor.rs index 15bbcbdf6b..1a2833dd58 100644 --- a/sdks/full/rust/src/models/actor_actor.rs +++ b/sdks/full/rust/src/models/actor_actor.rs @@ -4,52 +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 ActorActor { - #[serde(rename = "created_at")] - pub created_at: i64, - #[serde(rename = "destroyed_at", skip_serializing_if = "Option::is_none")] - pub destroyed_at: Option, - #[serde(rename = "id")] - pub id: uuid::Uuid, - #[serde(rename = "lifecycle")] - pub lifecycle: Box, - #[serde(rename = "network")] - pub network: Box, - #[serde(rename = "region")] - pub region: String, - #[serde(rename = "resources")] - pub resources: Box, - #[serde(rename = "runtime")] - pub runtime: Box, - #[serde(rename = "started_at", skip_serializing_if = "Option::is_none")] - pub started_at: Option, - #[serde(rename = "tags", deserialize_with = "Option::deserialize")] - pub tags: Option, + #[serde(rename = "created_at")] + pub created_at: i64, + #[serde(rename = "destroyed_at", skip_serializing_if = "Option::is_none")] + pub destroyed_at: Option, + #[serde(rename = "id")] + pub id: uuid::Uuid, + #[serde(rename = "lifecycle")] + pub lifecycle: Box, + #[serde(rename = "network")] + pub network: Box, + #[serde(rename = "region")] + pub region: String, + #[serde(rename = "resources")] + pub resources: Box, + #[serde(rename = "runtime")] + pub runtime: Box, + #[serde(rename = "started_at", skip_serializing_if = "Option::is_none")] + pub started_at: Option, + #[serde(rename = "tags", deserialize_with = "Option::deserialize")] + pub tags: Option, } impl ActorActor { - pub fn new(created_at: i64, id: uuid::Uuid, lifecycle: crate::models::ActorLifecycle, network: crate::models::ActorNetwork, region: String, resources: crate::models::ActorResources, runtime: crate::models::ActorRuntime, tags: Option) -> ActorActor { - ActorActor { - created_at, - destroyed_at: None, - id, - lifecycle: Box::new(lifecycle), - network: Box::new(network), - region, - resources: Box::new(resources), - runtime: Box::new(runtime), - started_at: None, - tags, - } - } + pub fn new( + created_at: i64, + id: uuid::Uuid, + lifecycle: crate::models::ActorLifecycle, + network: crate::models::ActorNetwork, + region: String, + resources: crate::models::ActorResources, + runtime: crate::models::ActorRuntime, + tags: Option, + ) -> ActorActor { + ActorActor { + created_at, + destroyed_at: None, + id, + lifecycle: Box::new(lifecycle), + network: Box::new(network), + region, + resources: Box::new(resources), + runtime: Box::new(runtime), + started_at: None, + tags, + } + } } - - diff --git a/sdks/full/rust/src/models/actor_build.rs b/sdks/full/rust/src/models/actor_build.rs index 15122033fb..22d4e34bdc 100644 --- a/sdks/full/rust/src/models/actor_build.rs +++ b/sdks/full/rust/src/models/actor_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 ActorBuild { - /// Unsigned 64 bit integer. - #[serde(rename = "content_length")] - pub content_length: i64, - /// RFC3339 timestamp - #[serde(rename = "created_at")] - pub created_at: String, - #[serde(rename = "id")] - pub id: uuid::Uuid, - #[serde(rename = "name")] - pub name: String, - /// Tags of this build - #[serde(rename = "tags")] - pub tags: ::std::collections::HashMap, + /// Unsigned 64 bit integer. + #[serde(rename = "content_length")] + pub content_length: i64, + /// RFC3339 timestamp + #[serde(rename = "created_at")] + pub created_at: String, + #[serde(rename = "id")] + pub id: uuid::Uuid, + #[serde(rename = "name")] + pub name: String, + /// Tags of this build + #[serde(rename = "tags")] + pub tags: ::std::collections::HashMap, } impl ActorBuild { - pub fn new(content_length: i64, created_at: String, id: uuid::Uuid, name: String, tags: ::std::collections::HashMap) -> ActorBuild { - ActorBuild { - content_length, - created_at, - id, - name, - tags, - } - } + pub fn new( + content_length: i64, + created_at: String, + id: uuid::Uuid, + name: String, + tags: ::std::collections::HashMap, + ) -> ActorBuild { + ActorBuild { + content_length, + created_at, + id, + name, + tags, + } + } } - - diff --git a/sdks/full/rust/src/models/actor_build_compression.rs b/sdks/full/rust/src/models/actor_build_compression.rs index 9554afe9c0..fa57788e02 100644 --- a/sdks/full/rust/src/models/actor_build_compression.rs +++ b/sdks/full/rust/src/models/actor_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 ActorBuildCompression { - #[serde(rename = "none")] - None, - #[serde(rename = "lz4")] - Lz4, - + #[serde(rename = "none")] + None, + #[serde(rename = "lz4")] + Lz4, } impl ToString for ActorBuildCompression { - 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 ActorBuildCompression { - fn default() -> ActorBuildCompression { - Self::None - } + fn default() -> ActorBuildCompression { + Self::None + } } - - - - diff --git a/sdks/full/rust/src/models/actor_build_kind.rs b/sdks/full/rust/src/models/actor_build_kind.rs index 9e9fd07ff3..6b26fe8fd7 100644 --- a/sdks/full/rust/src/models/actor_build_kind.rs +++ b/sdks/full/rust/src/models/actor_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 ActorBuildKind { - #[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 ActorBuildKind { - 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 ActorBuildKind { - fn default() -> ActorBuildKind { - Self::DockerImage - } + fn default() -> ActorBuildKind { + Self::DockerImage + } } - - - - diff --git a/sdks/full/rust/src/models/actor_create_actor_network_request.rs b/sdks/full/rust/src/models/actor_create_actor_network_request.rs index 41c09e11af..81cd677d80 100644 --- a/sdks/full/rust/src/models/actor_create_actor_network_request.rs +++ b/sdks/full/rust/src/models/actor_create_actor_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 ActorCreateActorNetworkRequest { - #[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 ActorCreateActorNetworkRequest { - pub fn new(ports: ::std::collections::HashMap) -> ActorCreateActorNetworkRequest { - ActorCreateActorNetworkRequest { - mode: None, - ports, - } - } + pub fn new( + ports: ::std::collections::HashMap, + ) -> ActorCreateActorNetworkRequest { + ActorCreateActorNetworkRequest { mode: None, ports } + } } - - diff --git a/sdks/full/rust/src/models/actor_create_actor_port_request.rs b/sdks/full/rust/src/models/actor_create_actor_port_request.rs index 74497965ba..37b0d352a0 100644 --- a/sdks/full/rust/src/models/actor_create_actor_port_request.rs +++ b/sdks/full/rust/src/models/actor_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 ActorCreateActorPortRequest { - #[serde(rename = "internal_port", skip_serializing_if = "Option::is_none")] - pub internal_port: Option, - #[serde(rename = "protocol")] - pub protocol: crate::models::ActorPortProtocol, - #[serde(rename = "routing", skip_serializing_if = "Option::is_none")] - pub routing: Option>, + #[serde(rename = "internal_port", skip_serializing_if = "Option::is_none")] + pub internal_port: Option, + #[serde(rename = "protocol")] + pub protocol: crate::models::ActorPortProtocol, + #[serde(rename = "routing", skip_serializing_if = "Option::is_none")] + pub routing: Option>, } impl ActorCreateActorPortRequest { - pub fn new(protocol: crate::models::ActorPortProtocol) -> ActorCreateActorPortRequest { - ActorCreateActorPortRequest { - internal_port: None, - protocol, - routing: None, - } - } + pub fn new(protocol: crate::models::ActorPortProtocol) -> ActorCreateActorPortRequest { + ActorCreateActorPortRequest { + internal_port: None, + protocol, + routing: None, + } + } } - - diff --git a/sdks/full/rust/src/models/actor_create_actor_request.rs b/sdks/full/rust/src/models/actor_create_actor_request.rs index 3dd801b337..544bcb9055 100644 --- a/sdks/full/rust/src/models/actor_create_actor_request.rs +++ b/sdks/full/rust/src/models/actor_create_actor_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 ActorCreateActorRequest { - #[serde(rename = "lifecycle", skip_serializing_if = "Option::is_none")] - pub lifecycle: Option>, - #[serde(rename = "network")] - pub network: Box, - #[serde(rename = "region")] - pub region: String, - #[serde(rename = "resources")] - pub resources: Box, - #[serde(rename = "runtime")] - pub runtime: Box, - #[serde(rename = "tags", deserialize_with = "Option::deserialize")] - pub tags: Option, + #[serde(rename = "lifecycle", skip_serializing_if = "Option::is_none")] + pub lifecycle: Option>, + #[serde(rename = "network")] + pub network: Box, + #[serde(rename = "region")] + pub region: String, + #[serde(rename = "resources")] + pub resources: Box, + #[serde(rename = "runtime")] + pub runtime: Box, + #[serde(rename = "tags", deserialize_with = "Option::deserialize")] + pub tags: Option, } impl ActorCreateActorRequest { - pub fn new(network: crate::models::ActorCreateActorNetworkRequest, region: String, resources: crate::models::ActorResources, runtime: crate::models::ActorCreateActorRuntimeRequest, tags: Option) -> ActorCreateActorRequest { - ActorCreateActorRequest { - lifecycle: None, - network: Box::new(network), - region, - resources: Box::new(resources), - runtime: Box::new(runtime), - tags, - } - } + pub fn new( + network: crate::models::ActorCreateActorNetworkRequest, + region: String, + resources: crate::models::ActorResources, + runtime: crate::models::ActorCreateActorRuntimeRequest, + tags: Option, + ) -> ActorCreateActorRequest { + ActorCreateActorRequest { + lifecycle: None, + network: Box::new(network), + region, + resources: Box::new(resources), + runtime: Box::new(runtime), + tags, + } + } } - - diff --git a/sdks/full/rust/src/models/actor_create_actor_response.rs b/sdks/full/rust/src/models/actor_create_actor_response.rs index bed37f45b7..3a00d20196 100644 --- a/sdks/full/rust/src/models/actor_create_actor_response.rs +++ b/sdks/full/rust/src/models/actor_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 ActorCreateActorResponse { - #[serde(rename = "actor")] - pub actor: Box, + #[serde(rename = "actor")] + pub actor: Box, } impl ActorCreateActorResponse { - pub fn new(actor: crate::models::ActorActor) -> ActorCreateActorResponse { - ActorCreateActorResponse { - actor: Box::new(actor), - } - } + pub fn new(actor: crate::models::ActorActor) -> ActorCreateActorResponse { + ActorCreateActorResponse { + actor: Box::new(actor), + } + } } - - diff --git a/sdks/full/rust/src/models/actor_create_actor_runtime_request.rs b/sdks/full/rust/src/models/actor_create_actor_runtime_request.rs index 502cbdc320..3a22ee1402 100644 --- a/sdks/full/rust/src/models/actor_create_actor_runtime_request.rs +++ b/sdks/full/rust/src/models/actor_create_actor_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 ActorCreateActorRuntimeRequest { - #[serde(rename = "arguments", skip_serializing_if = "Option::is_none")] - pub arguments: Option>, - #[serde(rename = "build")] - pub build: uuid::Uuid, - #[serde(rename = "environment", skip_serializing_if = "Option::is_none")] - pub environment: Option<::std::collections::HashMap>, + #[serde(rename = "arguments", skip_serializing_if = "Option::is_none")] + pub arguments: Option>, + #[serde(rename = "build")] + pub build: uuid::Uuid, + #[serde(rename = "environment", skip_serializing_if = "Option::is_none")] + pub environment: Option<::std::collections::HashMap>, } impl ActorCreateActorRuntimeRequest { - pub fn new(build: uuid::Uuid) -> ActorCreateActorRuntimeRequest { - ActorCreateActorRuntimeRequest { - arguments: None, - build, - environment: None, - } - } + pub fn new(build: uuid::Uuid) -> ActorCreateActorRuntimeRequest { + ActorCreateActorRuntimeRequest { + arguments: None, + build, + environment: None, + } + } } - - diff --git a/sdks/full/rust/src/models/actor_game_guard_routing.rs b/sdks/full/rust/src/models/actor_game_guard_routing.rs index b1a29406e2..f997f43aae 100644 --- a/sdks/full/rust/src/models/actor_game_guard_routing.rs +++ b/sdks/full/rust/src/models/actor_game_guard_routing.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 ActorGameGuardRouting { - #[serde(rename = "authorization", skip_serializing_if = "Option::is_none")] - pub authorization: Option>, + #[serde(rename = "authorization", skip_serializing_if = "Option::is_none")] + pub authorization: Option>, } impl ActorGameGuardRouting { - pub fn new() -> ActorGameGuardRouting { - ActorGameGuardRouting { - authorization: None, - } - } + pub fn new() -> ActorGameGuardRouting { + ActorGameGuardRouting { + authorization: None, + } + } } - - diff --git a/sdks/full/rust/src/models/actor_get_actor_logs_response.rs b/sdks/full/rust/src/models/actor_get_actor_logs_response.rs index 7475d6b35b..29050dd2be 100644 --- a/sdks/full/rust/src/models/actor_get_actor_logs_response.rs +++ b/sdks/full/rust/src/models/actor_get_actor_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 ActorGetActorLogsResponse { - /// 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 ActorGetActorLogsResponse { - pub fn new(lines: Vec, timestamps: Vec, watch: crate::models::WatchResponse) -> ActorGetActorLogsResponse { - ActorGetActorLogsResponse { - lines, - timestamps, - watch: Box::new(watch), - } - } + pub fn new( + lines: Vec, + timestamps: Vec, + watch: crate::models::WatchResponse, + ) -> ActorGetActorLogsResponse { + ActorGetActorLogsResponse { + lines, + timestamps, + watch: Box::new(watch), + } + } } - - diff --git a/sdks/full/rust/src/models/actor_get_actor_response.rs b/sdks/full/rust/src/models/actor_get_actor_response.rs index 39f675add9..3ed148b70a 100644 --- a/sdks/full/rust/src/models/actor_get_actor_response.rs +++ b/sdks/full/rust/src/models/actor_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 ActorGetActorResponse { - #[serde(rename = "actor")] - pub actor: Box, + #[serde(rename = "actor")] + pub actor: Box, } impl ActorGetActorResponse { - pub fn new(actor: crate::models::ActorActor) -> ActorGetActorResponse { - ActorGetActorResponse { - actor: Box::new(actor), - } - } + pub fn new(actor: crate::models::ActorActor) -> ActorGetActorResponse { + ActorGetActorResponse { + actor: Box::new(actor), + } + } } - - diff --git a/sdks/full/rust/src/models/actor_get_build_response.rs b/sdks/full/rust/src/models/actor_get_build_response.rs index 6b3176958d..05f748e69c 100644 --- a/sdks/full/rust/src/models/actor_get_build_response.rs +++ b/sdks/full/rust/src/models/actor_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 ActorGetBuildResponse { - #[serde(rename = "build")] - pub build: Box, + #[serde(rename = "build")] + pub build: Box, } impl ActorGetBuildResponse { - pub fn new(build: crate::models::ActorBuild) -> ActorGetBuildResponse { - ActorGetBuildResponse { - build: Box::new(build), - } - } + pub fn new(build: crate::models::ActorBuild) -> ActorGetBuildResponse { + ActorGetBuildResponse { + build: Box::new(build), + } + } } - - diff --git a/sdks/full/rust/src/models/actor_lifecycle.rs b/sdks/full/rust/src/models/actor_lifecycle.rs index bb91f243a0..42e1da1398 100644 --- a/sdks/full/rust/src/models/actor_lifecycle.rs +++ b/sdks/full/rust/src/models/actor_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 ActorLifecycle { - /// 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, + /// 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, } impl ActorLifecycle { - pub fn new() -> ActorLifecycle { - ActorLifecycle { - kill_timeout: None, - } - } + pub fn new() -> ActorLifecycle { + ActorLifecycle { kill_timeout: None } + } } - - diff --git a/sdks/full/rust/src/models/actor_list_actors_response.rs b/sdks/full/rust/src/models/actor_list_actors_response.rs index 36c315efc1..b3b58db82b 100644 --- a/sdks/full/rust/src/models/actor_list_actors_response.rs +++ b/sdks/full/rust/src/models/actor_list_actors_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 ActorListActorsResponse { - /// A list of actors for the project associated with the token. - #[serde(rename = "actors")] - pub actors: Vec, + /// A list of actors for the project associated with the token. + #[serde(rename = "actors")] + pub actors: Vec, } impl ActorListActorsResponse { - pub fn new(actors: Vec) -> ActorListActorsResponse { - ActorListActorsResponse { - actors, - } - } + pub fn new(actors: Vec) -> ActorListActorsResponse { + ActorListActorsResponse { actors } + } } - - diff --git a/sdks/full/rust/src/models/actor_list_builds_response.rs b/sdks/full/rust/src/models/actor_list_builds_response.rs index d7aa8fc073..33d4f7f426 100644 --- a/sdks/full/rust/src/models/actor_list_builds_response.rs +++ b/sdks/full/rust/src/models/actor_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 ActorListBuildsResponse { - /// 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 ActorListBuildsResponse { - pub fn new(builds: Vec) -> ActorListBuildsResponse { - ActorListBuildsResponse { - builds, - } - } + pub fn new(builds: Vec) -> ActorListBuildsResponse { + ActorListBuildsResponse { builds } + } } - - diff --git a/sdks/full/rust/src/models/actor_list_regions_response.rs b/sdks/full/rust/src/models/actor_list_regions_response.rs index cee15d56f7..1176e11a7e 100644 --- a/sdks/full/rust/src/models/actor_list_regions_response.rs +++ b/sdks/full/rust/src/models/actor_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 ActorListRegionsResponse { - #[serde(rename = "regions")] - pub regions: Vec, + #[serde(rename = "regions")] + pub regions: Vec, } impl ActorListRegionsResponse { - pub fn new(regions: Vec) -> ActorListRegionsResponse { - ActorListRegionsResponse { - regions, - } - } + pub fn new(regions: Vec) -> ActorListRegionsResponse { + ActorListRegionsResponse { regions } + } } - - diff --git a/sdks/full/rust/src/models/actor_log_stream.rs b/sdks/full/rust/src/models/actor_log_stream.rs index e4ec433d4f..613798dbdb 100644 --- a/sdks/full/rust/src/models/actor_log_stream.rs +++ b/sdks/full/rust/src/models/actor_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 ActorLogStream { - #[serde(rename = "std_out")] - StdOut, - #[serde(rename = "std_err")] - StdErr, - + #[serde(rename = "std_out")] + StdOut, + #[serde(rename = "std_err")] + StdErr, } impl ToString for ActorLogStream { - 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 ActorLogStream { - fn default() -> ActorLogStream { - Self::StdOut - } + fn default() -> ActorLogStream { + Self::StdOut + } } - - - - diff --git a/sdks/full/rust/src/models/actor_network.rs b/sdks/full/rust/src/models/actor_network.rs index a420d77c0c..5e63064871 100644 --- a/sdks/full/rust/src/models/actor_network.rs +++ b/sdks/full/rust/src/models/actor_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 ActorNetwork { - #[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 ActorNetwork { - pub fn new(ports: ::std::collections::HashMap) -> ActorNetwork { - ActorNetwork { - mode: None, - ports, - } - } + pub fn new( + ports: ::std::collections::HashMap, + ) -> ActorNetwork { + ActorNetwork { mode: None, ports } + } } - - diff --git a/sdks/full/rust/src/models/actor_network_mode.rs b/sdks/full/rust/src/models/actor_network_mode.rs index db460774fb..505cdbb6fe 100644 --- a/sdks/full/rust/src/models/actor_network_mode.rs +++ b/sdks/full/rust/src/models/actor_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 ActorNetworkMode { - #[serde(rename = "bridge")] - Bridge, - #[serde(rename = "host")] - Host, - + #[serde(rename = "bridge")] + Bridge, + #[serde(rename = "host")] + Host, } impl ToString for ActorNetworkMode { - 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 ActorNetworkMode { - fn default() -> ActorNetworkMode { - Self::Bridge - } + fn default() -> ActorNetworkMode { + Self::Bridge + } } - - - - diff --git a/sdks/full/rust/src/models/actor_patch_build_tags_request.rs b/sdks/full/rust/src/models/actor_patch_build_tags_request.rs index 26ec7f51b9..5957395ec4 100644 --- a/sdks/full/rust/src/models/actor_patch_build_tags_request.rs +++ b/sdks/full/rust/src/models/actor_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 ActorPatchBuildTagsRequest { - /// 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>, + #[serde(rename = "tags", deserialize_with = "Option::deserialize")] + pub tags: Option, } impl ActorPatchBuildTagsRequest { - pub fn new(tags: Option) -> ActorPatchBuildTagsRequest { - ActorPatchBuildTagsRequest { - exclusive_tags: None, - tags, - } - } + pub fn new(tags: Option) -> ActorPatchBuildTagsRequest { + ActorPatchBuildTagsRequest { + exclusive_tags: None, + tags, + } + } } - - diff --git a/sdks/full/rust/src/models/actor_port.rs b/sdks/full/rust/src/models/actor_port.rs index a217927b23..0f090c51e0 100644 --- a/sdks/full/rust/src/models/actor_port.rs +++ b/sdks/full/rust/src/models/actor_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 ActorPort { - #[serde(rename = "internal_port", skip_serializing_if = "Option::is_none")] - pub internal_port: Option, - #[serde(rename = "protocol")] - pub protocol: crate::models::ActorPortProtocol, - #[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 = "internal_port", skip_serializing_if = "Option::is_none")] + pub internal_port: Option, + #[serde(rename = "protocol")] + pub protocol: crate::models::ActorPortProtocol, + #[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 ActorPort { - pub fn new(protocol: crate::models::ActorPortProtocol, routing: crate::models::ActorPortRouting) -> ActorPort { - ActorPort { - internal_port: None, - protocol, - public_hostname: None, - public_port: None, - routing: Box::new(routing), - } - } + pub fn new( + protocol: crate::models::ActorPortProtocol, + routing: crate::models::ActorPortRouting, + ) -> ActorPort { + ActorPort { + internal_port: None, + protocol, + public_hostname: None, + public_port: None, + routing: Box::new(routing), + } + } } - - diff --git a/sdks/full/rust/src/models/actor_port_authorization.rs b/sdks/full/rust/src/models/actor_port_authorization.rs index c3962e01ac..f49785d6a2 100644 --- a/sdks/full/rust/src/models/actor_port_authorization.rs +++ b/sdks/full/rust/src/models/actor_port_authorization.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 ActorPortAuthorization { - #[serde(rename = "bearer", skip_serializing_if = "Option::is_none")] - pub bearer: Option, - #[serde(rename = "query", skip_serializing_if = "Option::is_none")] - pub query: Option>, + #[serde(rename = "bearer", skip_serializing_if = "Option::is_none")] + pub bearer: Option, + #[serde(rename = "query", skip_serializing_if = "Option::is_none")] + pub query: Option>, } impl ActorPortAuthorization { - pub fn new() -> ActorPortAuthorization { - ActorPortAuthorization { - bearer: None, - query: None, - } - } + pub fn new() -> ActorPortAuthorization { + ActorPortAuthorization { + bearer: None, + query: None, + } + } } - - diff --git a/sdks/full/rust/src/models/actor_port_protocol.rs b/sdks/full/rust/src/models/actor_port_protocol.rs index 06ef550fe2..c5e9d49c1e 100644 --- a/sdks/full/rust/src/models/actor_port_protocol.rs +++ b/sdks/full/rust/src/models/actor_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 ActorPortProtocol { - #[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 ActorPortProtocol { - 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 ActorPortProtocol { - fn default() -> ActorPortProtocol { - Self::Http - } + fn default() -> ActorPortProtocol { + Self::Http + } } - - - - diff --git a/sdks/full/rust/src/models/actor_port_query_authorization.rs b/sdks/full/rust/src/models/actor_port_query_authorization.rs index ea8b447713..a559e7adc3 100644 --- a/sdks/full/rust/src/models/actor_port_query_authorization.rs +++ b/sdks/full/rust/src/models/actor_port_query_authorization.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 ActorPortQueryAuthorization { - #[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 ActorPortQueryAuthorization { - pub fn new(key: String, value: String) -> ActorPortQueryAuthorization { - ActorPortQueryAuthorization { - key, - value, - } - } + pub fn new(key: String, value: String) -> ActorPortQueryAuthorization { + ActorPortQueryAuthorization { key, value } + } } - - diff --git a/sdks/full/rust/src/models/actor_port_routing.rs b/sdks/full/rust/src/models/actor_port_routing.rs index 11da800ef7..e976434af8 100644 --- a/sdks/full/rust/src/models/actor_port_routing.rs +++ b/sdks/full/rust/src/models/actor_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 ActorPortRouting { - #[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 ActorPortRouting { - pub fn new() -> ActorPortRouting { - ActorPortRouting { - game_guard: None, - host: None, - } - } + pub fn new() -> ActorPortRouting { + ActorPortRouting { + game_guard: None, + host: None, + } + } } - - diff --git a/sdks/full/rust/src/models/actor_prepare_build_request.rs b/sdks/full/rust/src/models/actor_prepare_build_request.rs index 176029b913..91e5729885 100644 --- a/sdks/full/rust/src/models/actor_prepare_build_request.rs +++ b/sdks/full/rust/src/models/actor_prepare_build_request.rs @@ -4,44 +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 */ - - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct ActorPrepareBuildRequest { - #[serde(rename = "compression", skip_serializing_if = "Option::is_none")] - pub compression: Option, - #[serde(rename = "image_file")] - pub image_file: Box, - /// A tag given to the project build. - #[serde(rename = "image_tag")] - pub image_tag: String, - #[serde(rename = "kind", skip_serializing_if = "Option::is_none")] - pub kind: Option, - #[serde(rename = "multipart_upload", skip_serializing_if = "Option::is_none")] - pub multipart_upload: Option, - #[serde(rename = "name")] - pub name: String, - #[serde(rename = "prewarm_regions", skip_serializing_if = "Option::is_none")] - pub prewarm_regions: Option>, + #[serde(rename = "compression", skip_serializing_if = "Option::is_none")] + pub compression: Option, + #[serde(rename = "image_file")] + pub image_file: Box, + /// A tag given to the project build. + #[serde(rename = "image_tag")] + pub image_tag: String, + #[serde(rename = "kind", skip_serializing_if = "Option::is_none")] + pub kind: Option, + #[serde(rename = "multipart_upload", skip_serializing_if = "Option::is_none")] + pub multipart_upload: Option, + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "prewarm_regions", skip_serializing_if = "Option::is_none")] + pub prewarm_regions: Option>, } impl ActorPrepareBuildRequest { - pub fn new(image_file: crate::models::UploadPrepareFile, image_tag: String, name: String) -> ActorPrepareBuildRequest { - ActorPrepareBuildRequest { - compression: None, - image_file: Box::new(image_file), - image_tag, - kind: None, - multipart_upload: None, - name, - prewarm_regions: None, - } - } + pub fn new( + image_file: crate::models::UploadPrepareFile, + image_tag: String, + name: String, + ) -> ActorPrepareBuildRequest { + ActorPrepareBuildRequest { + compression: None, + image_file: Box::new(image_file), + image_tag, + kind: None, + multipart_upload: None, + name, + prewarm_regions: None, + } + } } - - diff --git a/sdks/full/rust/src/models/actor_prepare_build_response.rs b/sdks/full/rust/src/models/actor_prepare_build_response.rs index 9dd9f19ece..67aacbb8a1 100644 --- a/sdks/full/rust/src/models/actor_prepare_build_response.rs +++ b/sdks/full/rust/src/models/actor_prepare_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 ActorPrepareBuildResponse { - #[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 ActorPrepareBuildResponse { - pub fn new(build: uuid::Uuid) -> ActorPrepareBuildResponse { - ActorPrepareBuildResponse { - build, - image_presigned_request: None, - image_presigned_requests: None, - } - } + pub fn new(build: uuid::Uuid) -> ActorPrepareBuildResponse { + ActorPrepareBuildResponse { + build, + image_presigned_request: None, + image_presigned_requests: None, + } + } } - - diff --git a/sdks/full/rust/src/models/actor_region.rs b/sdks/full/rust/src/models/actor_region.rs index 9d89f0371e..f22e5492f2 100644 --- a/sdks/full/rust/src/models/actor_region.rs +++ b/sdks/full/rust/src/models/actor_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 ActorRegion { - #[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 ActorRegion { - pub fn new(id: String, name: String) -> ActorRegion { - ActorRegion { - id, - name, - } - } + pub fn new(id: String, name: String) -> ActorRegion { + ActorRegion { id, name } + } } - - diff --git a/sdks/full/rust/src/models/actor_resources.rs b/sdks/full/rust/src/models/actor_resources.rs index 57d7dc7ed4..7d8d3661aa 100644 --- a/sdks/full/rust/src/models/actor_resources.rs +++ b/sdks/full/rust/src/models/actor_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 ActorResources { - /// 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 ActorResources { - pub fn new(cpu: i32, memory: i32) -> ActorResources { - ActorResources { - cpu, - memory, - } - } + pub fn new(cpu: i32, memory: i32) -> ActorResources { + ActorResources { cpu, memory } + } } - - diff --git a/sdks/full/rust/src/models/actor_runtime.rs b/sdks/full/rust/src/models/actor_runtime.rs index 63ba97b4e7..80e8ddcda9 100644 --- a/sdks/full/rust/src/models/actor_runtime.rs +++ b/sdks/full/rust/src/models/actor_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 ActorRuntime { - #[serde(rename = "arguments", skip_serializing_if = "Option::is_none")] - pub arguments: Option>, - #[serde(rename = "build")] - pub build: uuid::Uuid, - #[serde(rename = "environment", skip_serializing_if = "Option::is_none")] - pub environment: Option<::std::collections::HashMap>, + #[serde(rename = "arguments", skip_serializing_if = "Option::is_none")] + pub arguments: Option>, + #[serde(rename = "build")] + pub build: uuid::Uuid, + #[serde(rename = "environment", skip_serializing_if = "Option::is_none")] + pub environment: Option<::std::collections::HashMap>, } impl ActorRuntime { - pub fn new(build: uuid::Uuid) -> ActorRuntime { - ActorRuntime { - arguments: None, - build, - environment: None, - } - } + pub fn new(build: uuid::Uuid) -> ActorRuntime { + ActorRuntime { + arguments: None, + build, + environment: None, + } + } } - - diff --git a/sdks/full/rust/src/models/auth_complete_status.rs b/sdks/full/rust/src/models/auth_complete_status.rs index f2d9876170..a7fca96169 100644 --- a/sdks/full/rust/src/models/auth_complete_status.rs +++ b/sdks/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/full/rust/src/models/auth_identity_complete_email_verification_request.rs b/sdks/full/rust/src/models/auth_identity_complete_email_verification_request.rs index 5fb77a7dd3..eb650fc87a 100644 --- a/sdks/full/rust/src/models/auth_identity_complete_email_verification_request.rs +++ b/sdks/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 { - /// 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, + #[serde(rename = "verification_id")] + pub verification_id: uuid::Uuid, } impl AuthIdentityCompleteEmailVerificationRequest { - pub fn new(code: String, verification_id: uuid::Uuid) -> AuthIdentityCompleteEmailVerificationRequest { - AuthIdentityCompleteEmailVerificationRequest { - code, - verification_id, - } - } + pub fn new( + code: String, + verification_id: uuid::Uuid, + ) -> AuthIdentityCompleteEmailVerificationRequest { + AuthIdentityCompleteEmailVerificationRequest { + code, + verification_id, + } + } } - - diff --git a/sdks/full/rust/src/models/auth_identity_complete_email_verification_response.rs b/sdks/full/rust/src/models/auth_identity_complete_email_verification_response.rs index 557811bb75..0a7176f4b0 100644 --- a/sdks/full/rust/src/models/auth_identity_complete_email_verification_response.rs +++ b/sdks/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/full/rust/src/models/auth_identity_start_email_verification_request.rs b/sdks/full/rust/src/models/auth_identity_start_email_verification_request.rs index d11fbea291..3f9a2cdc91 100644 --- a/sdks/full/rust/src/models/auth_identity_start_email_verification_request.rs +++ b/sdks/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 = "captcha", skip_serializing_if = "Option::is_none")] - pub captcha: Option>, - #[serde(rename = "email")] - pub email: String, - #[serde(rename = "game_id", skip_serializing_if = "Option::is_none")] - pub game_id: Option, + #[serde(rename = "captcha", skip_serializing_if = "Option::is_none")] + pub captcha: Option>, + #[serde(rename = "email")] + pub email: String, + #[serde(rename = "game_id", skip_serializing_if = "Option::is_none")] + pub game_id: Option, } impl AuthIdentityStartEmailVerificationRequest { - pub fn new(email: String) -> AuthIdentityStartEmailVerificationRequest { - AuthIdentityStartEmailVerificationRequest { - captcha: None, - email, - game_id: None, - } - } + pub fn new(email: String) -> AuthIdentityStartEmailVerificationRequest { + AuthIdentityStartEmailVerificationRequest { + captcha: None, + email, + game_id: None, + } + } } - - diff --git a/sdks/full/rust/src/models/auth_identity_start_email_verification_response.rs b/sdks/full/rust/src/models/auth_identity_start_email_verification_response.rs index 78533e77b2..a071908725 100644 --- a/sdks/full/rust/src/models/auth_identity_start_email_verification_response.rs +++ b/sdks/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/full/rust/src/models/auth_refresh_identity_token_request.rs b/sdks/full/rust/src/models/auth_refresh_identity_token_request.rs index bfaf83a1f3..3312ac7ea8 100644 --- a/sdks/full/rust/src/models/auth_refresh_identity_token_request.rs +++ b/sdks/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/full/rust/src/models/auth_refresh_identity_token_response.rs b/sdks/full/rust/src/models/auth_refresh_identity_token_response.rs index 04fc595d97..e83886c5f0 100644 --- a/sdks/full/rust/src/models/auth_refresh_identity_token_response.rs +++ b/sdks/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 { - /// 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, + /// A JSON Web Token. Slightly modified to include a description prefix and use Protobufs of JSON. + #[serde(rename = "token")] + pub token: String, } impl AuthRefreshIdentityTokenResponse { - pub fn new(exp: String, identity_id: uuid::Uuid, token: String) -> AuthRefreshIdentityTokenResponse { - AuthRefreshIdentityTokenResponse { - exp, - identity_id, - token, - } - } + pub fn new( + exp: String, + identity_id: uuid::Uuid, + token: String, + ) -> AuthRefreshIdentityTokenResponse { + AuthRefreshIdentityTokenResponse { + exp, + identity_id, + token, + } + } } - - diff --git a/sdks/full/rust/src/models/captcha_config.rs b/sdks/full/rust/src/models/captcha_config.rs index d285073ecd..edbb05f410 100644 --- a/sdks/full/rust/src/models/captcha_config.rs +++ b/sdks/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/full/rust/src/models/captcha_config_hcaptcha.rs b/sdks/full/rust/src/models/captcha_config_hcaptcha.rs index a342255d1d..f229d0e40f 100644 --- a/sdks/full/rust/src/models/captcha_config_hcaptcha.rs +++ b/sdks/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/full/rust/src/models/captcha_config_turnstile.rs b/sdks/full/rust/src/models/captcha_config_turnstile.rs index ca74d127c0..2c464d4433 100644 --- a/sdks/full/rust/src/models/captcha_config_turnstile.rs +++ b/sdks/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/full/rust/src/models/cloud_auth_agent.rs b/sdks/full/rust/src/models/cloud_auth_agent.rs index 5ab694c6ad..d48a3aaa51 100644 --- a/sdks/full/rust/src/models/cloud_auth_agent.rs +++ b/sdks/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 = "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>, + #[serde(rename = "identity", skip_serializing_if = "Option::is_none")] + pub identity: Option>, } impl CloudAuthAgent { - /// The current authenticated agent. - pub fn new() -> CloudAuthAgent { - CloudAuthAgent { - game_cloud: None, - identity: None, - } - } + /// The current authenticated agent. + pub fn new() -> CloudAuthAgent { + CloudAuthAgent { + game_cloud: None, + identity: None, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_auth_agent_game_cloud.rs b/sdks/full/rust/src/models/cloud_auth_agent_game_cloud.rs index 4698420b34..29859b7b3f 100644 --- a/sdks/full/rust/src/models/cloud_auth_agent_game_cloud.rs +++ b/sdks/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/full/rust/src/models/cloud_auth_agent_identity.rs b/sdks/full/rust/src/models/cloud_auth_agent_identity.rs index 38dff8d0ec..799fe9ea84 100644 --- a/sdks/full/rust/src/models/cloud_auth_agent_identity.rs +++ b/sdks/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/full/rust/src/models/cloud_bootstrap_access.rs b/sdks/full/rust/src/models/cloud_bootstrap_access.rs index 30ad6842f2..6d5441c30e 100644 --- a/sdks/full/rust/src/models/cloud_bootstrap_access.rs +++ b/sdks/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/full/rust/src/models/cloud_bootstrap_captcha.rs b/sdks/full/rust/src/models/cloud_bootstrap_captcha.rs index 9f83ccbc73..af623c7661 100644 --- a/sdks/full/rust/src/models/cloud_bootstrap_captcha.rs +++ b/sdks/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/full/rust/src/models/cloud_bootstrap_captcha_turnstile.rs b/sdks/full/rust/src/models/cloud_bootstrap_captcha_turnstile.rs index 4e326bb691..04daf43ea0 100644 --- a/sdks/full/rust/src/models/cloud_bootstrap_captcha_turnstile.rs +++ b/sdks/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/full/rust/src/models/cloud_bootstrap_cluster.rs b/sdks/full/rust/src/models/cloud_bootstrap_cluster.rs index 3152f22de5..103fbe8182 100644 --- a/sdks/full/rust/src/models/cloud_bootstrap_cluster.rs +++ b/sdks/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/full/rust/src/models/cloud_bootstrap_domains.rs b/sdks/full/rust/src/models/cloud_bootstrap_domains.rs index 1ba4c25ae0..79f31cd630 100644 --- a/sdks/full/rust/src/models/cloud_bootstrap_domains.rs +++ b/sdks/full/rust/src/models/cloud_bootstrap_domains.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 */ /// 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 = "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 = "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, - opengb: None, - } - } + /// Domains that host parts of Rivet + pub fn new() -> CloudBootstrapDomains { + CloudBootstrapDomains { + cdn: None, + job: None, + opengb: None, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_bootstrap_login_methods.rs b/sdks/full/rust/src/models/cloud_bootstrap_login_methods.rs index f643f7fb3f..72a6bb5291 100644 --- a/sdks/full/rust/src/models/cloud_bootstrap_login_methods.rs +++ b/sdks/full/rust/src/models/cloud_bootstrap_login_methods.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 CloudBootstrapLoginMethods { - #[serde(rename = "email")] - pub email: bool, + #[serde(rename = "email")] + pub email: bool, } impl CloudBootstrapLoginMethods { - pub fn new(email: bool) -> CloudBootstrapLoginMethods { - CloudBootstrapLoginMethods { - email, - } - } + pub fn new(email: bool) -> CloudBootstrapLoginMethods { + CloudBootstrapLoginMethods { email } + } } - - diff --git a/sdks/full/rust/src/models/cloud_bootstrap_origins.rs b/sdks/full/rust/src/models/cloud_bootstrap_origins.rs index 4a26422571..f50a31c39c 100644 --- a/sdks/full/rust/src/models/cloud_bootstrap_origins.rs +++ b/sdks/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/full/rust/src/models/cloud_bootstrap_response.rs b/sdks/full/rust/src/models/cloud_bootstrap_response.rs index a0a2c78897..b4848ed6c9 100644 --- a/sdks/full/rust/src/models/cloud_bootstrap_response.rs +++ b/sdks/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 = "access")] - pub access: crate::models::CloudBootstrapAccess, - #[serde(rename = "captcha")] - pub captcha: Box, - #[serde(rename = "cluster")] - pub cluster: crate::models::CloudBootstrapCluster, - #[serde(rename = "deploy_hash")] - pub deploy_hash: String, - #[serde(rename = "domains")] - pub domains: Box, - #[serde(rename = "login_methods")] - pub login_methods: Box, - #[serde(rename = "origins")] - pub origins: Box, + #[serde(rename = "access")] + pub access: crate::models::CloudBootstrapAccess, + #[serde(rename = "captcha")] + pub captcha: Box, + #[serde(rename = "cluster")] + pub cluster: crate::models::CloudBootstrapCluster, + #[serde(rename = "deploy_hash")] + pub deploy_hash: String, + #[serde(rename = "domains")] + pub domains: Box, + #[serde(rename = "login_methods")] + pub login_methods: Box, + #[serde(rename = "origins")] + pub origins: Box, } impl CloudBootstrapResponse { - pub fn new(access: crate::models::CloudBootstrapAccess, captcha: crate::models::CloudBootstrapCaptcha, cluster: crate::models::CloudBootstrapCluster, deploy_hash: String, domains: crate::models::CloudBootstrapDomains, login_methods: crate::models::CloudBootstrapLoginMethods, origins: crate::models::CloudBootstrapOrigins) -> CloudBootstrapResponse { - CloudBootstrapResponse { - access, - captcha: Box::new(captcha), - cluster, - deploy_hash, - domains: Box::new(domains), - login_methods: Box::new(login_methods), - origins: Box::new(origins), - } - } + pub fn new( + access: crate::models::CloudBootstrapAccess, + captcha: crate::models::CloudBootstrapCaptcha, + cluster: crate::models::CloudBootstrapCluster, + deploy_hash: String, + domains: crate::models::CloudBootstrapDomains, + login_methods: crate::models::CloudBootstrapLoginMethods, + origins: crate::models::CloudBootstrapOrigins, + ) -> CloudBootstrapResponse { + CloudBootstrapResponse { + access, + captcha: Box::new(captcha), + cluster, + deploy_hash, + domains: Box::new(domains), + login_methods: Box::new(login_methods), + origins: Box::new(origins), + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_build_summary.rs b/sdks/full/rust/src/models/cloud_build_summary.rs index 2191748cf3..da48359dfe 100644 --- a/sdks/full/rust/src/models/cloud_build_summary.rs +++ b/sdks/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, - /// Whether or not this build has completely been uploaded. - #[serde(rename = "complete")] - pub complete: bool, - /// Unsigned 64 bit integer. - #[serde(rename = "content_length")] - pub content_length: i64, - /// 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, - /// Tags of this build - #[serde(rename = "tags")] - pub tags: ::std::collections::HashMap, - #[serde(rename = "upload_id")] - pub upload_id: uuid::Uuid, + #[serde(rename = "build_id")] + pub build_id: uuid::Uuid, + /// Whether or not this build has completely been uploaded. + #[serde(rename = "complete")] + pub complete: bool, + /// Unsigned 64 bit integer. + #[serde(rename = "content_length")] + pub content_length: i64, + /// 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, + /// Tags of this build + #[serde(rename = "tags")] + pub tags: ::std::collections::HashMap, + #[serde(rename = "upload_id")] + pub upload_id: uuid::Uuid, } impl CloudBuildSummary { - /// A build summary. - pub fn new(build_id: uuid::Uuid, complete: bool, content_length: i64, create_ts: String, display_name: String, tags: ::std::collections::HashMap, upload_id: uuid::Uuid) -> CloudBuildSummary { - CloudBuildSummary { - build_id, - complete, - content_length, - create_ts, - display_name, - tags, - upload_id, - } - } + /// A build summary. + pub fn new( + build_id: uuid::Uuid, + complete: bool, + content_length: i64, + create_ts: String, + display_name: String, + tags: ::std::collections::HashMap, + upload_id: uuid::Uuid, + ) -> CloudBuildSummary { + CloudBuildSummary { + build_id, + complete, + content_length, + create_ts, + display_name, + tags, + upload_id, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_cdn_auth_type.rs b/sdks/full/rust/src/models/cloud_cdn_auth_type.rs index bd9b926551..8175735bf6 100644 --- a/sdks/full/rust/src/models/cloud_cdn_auth_type.rs +++ b/sdks/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/full/rust/src/models/cloud_cdn_namespace_auth_user.rs b/sdks/full/rust/src/models/cloud_cdn_namespace_auth_user.rs index 21b67ffac2..a39ab114b4 100644 --- a/sdks/full/rust/src/models/cloud_cdn_namespace_auth_user.rs +++ b/sdks/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/full/rust/src/models/cloud_cdn_namespace_config.rs b/sdks/full/rust/src/models/cloud_cdn_namespace_config.rs index 438f4a8cc3..f5908c3393 100644 --- a/sdks/full/rust/src/models/cloud_cdn_namespace_config.rs +++ b/sdks/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 { - #[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, - /// A list of CDN domains for a given namespace. - #[serde(rename = "domains")] - pub domains: 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, + #[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, + /// A list of CDN domains for a given namespace. + #[serde(rename = "domains")] + pub domains: 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, } impl CloudCdnNamespaceConfig { - /// CDN configuration for a given namespace. - pub fn new(auth_type: crate::models::CloudCdnAuthType, auth_user_list: Vec, domains: Vec, enable_domain_public_auth: bool) -> CloudCdnNamespaceConfig { - CloudCdnNamespaceConfig { - auth_type, - auth_user_list, - domains, - enable_domain_public_auth, - } - } + /// CDN configuration for a given namespace. + pub fn new( + auth_type: crate::models::CloudCdnAuthType, + auth_user_list: Vec, + domains: Vec, + enable_domain_public_auth: bool, + ) -> CloudCdnNamespaceConfig { + CloudCdnNamespaceConfig { + auth_type, + auth_user_list, + domains, + enable_domain_public_auth, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_cdn_namespace_domain.rs b/sdks/full/rust/src/models/cloud_cdn_namespace_domain.rs index db81a282e7..f19b425709 100644 --- a/sdks/full/rust/src/models/cloud_cdn_namespace_domain.rs +++ b/sdks/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 { - /// RFC3339 timestamp - #[serde(rename = "create_ts")] - pub create_ts: String, - /// A valid domain name (no protocol). - #[serde(rename = "domain")] - pub domain: String, - #[serde(rename = "verification_errors")] - pub verification_errors: Vec, - #[serde(rename = "verification_method")] - pub verification_method: Box, - #[serde(rename = "verification_status")] - pub verification_status: crate::models::CloudCdnNamespaceDomainVerificationStatus, + /// RFC3339 timestamp + #[serde(rename = "create_ts")] + pub create_ts: String, + /// A valid domain name (no protocol). + #[serde(rename = "domain")] + pub domain: String, + #[serde(rename = "verification_errors")] + pub verification_errors: Vec, + #[serde(rename = "verification_method")] + pub verification_method: Box, + #[serde(rename = "verification_status")] + pub verification_status: crate::models::CloudCdnNamespaceDomainVerificationStatus, } impl CloudCdnNamespaceDomain { - /// A CDN domain for a given namespace. - pub fn new(create_ts: String, domain: String, verification_errors: Vec, verification_method: crate::models::CloudCdnNamespaceDomainVerificationMethod, verification_status: crate::models::CloudCdnNamespaceDomainVerificationStatus) -> CloudCdnNamespaceDomain { - CloudCdnNamespaceDomain { - create_ts, - domain, - verification_errors, - verification_method: Box::new(verification_method), - verification_status, - } - } + /// A CDN domain for a given namespace. + pub fn new( + create_ts: String, + domain: String, + verification_errors: Vec, + verification_method: crate::models::CloudCdnNamespaceDomainVerificationMethod, + verification_status: crate::models::CloudCdnNamespaceDomainVerificationStatus, + ) -> CloudCdnNamespaceDomain { + CloudCdnNamespaceDomain { + create_ts, + domain, + verification_errors, + verification_method: Box::new(verification_method), + verification_status, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_cdn_namespace_domain_verification_method.rs b/sdks/full/rust/src/models/cloud_cdn_namespace_domain_verification_method.rs index b6dfced487..0d2b113286 100644 --- a/sdks/full/rust/src/models/cloud_cdn_namespace_domain_verification_method.rs +++ b/sdks/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 = "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>, + #[serde(rename = "invalid", skip_serializing_if = "Option::is_none")] + pub invalid: Option, } impl CloudCdnNamespaceDomainVerificationMethod { - /// A union representing the verification method used for this CDN domain. - pub fn new() -> CloudCdnNamespaceDomainVerificationMethod { - CloudCdnNamespaceDomainVerificationMethod { - http: None, - invalid: None, - } - } + /// A union representing the verification method used for this CDN domain. + pub fn new() -> CloudCdnNamespaceDomainVerificationMethod { + CloudCdnNamespaceDomainVerificationMethod { + http: None, + invalid: None, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_cdn_namespace_domain_verification_method_http.rs b/sdks/full/rust/src/models/cloud_cdn_namespace_domain_verification_method_http.rs index 2e382e2dea..748a818f3d 100644 --- a/sdks/full/rust/src/models/cloud_cdn_namespace_domain_verification_method_http.rs +++ b/sdks/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/full/rust/src/models/cloud_cdn_namespace_domain_verification_status.rs b/sdks/full/rust/src/models/cloud_cdn_namespace_domain_verification_status.rs index c76e43bf9a..e99b8fec85 100644 --- a/sdks/full/rust/src/models/cloud_cdn_namespace_domain_verification_status.rs +++ b/sdks/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/full/rust/src/models/cloud_cdn_site_summary.rs b/sdks/full/rust/src/models/cloud_cdn_site_summary.rs index 15f0418c57..c1f81da4f4 100644 --- a/sdks/full/rust/src/models/cloud_cdn_site_summary.rs +++ b/sdks/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 { - /// Whether or not this site has completely been uploaded. - #[serde(rename = "complete")] - pub complete: bool, - /// Unsigned 64 bit integer. - #[serde(rename = "content_length")] - pub content_length: i64, - /// 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 = "site_id")] - pub site_id: uuid::Uuid, - #[serde(rename = "upload_id")] - pub upload_id: uuid::Uuid, + /// Whether or not this site has completely been uploaded. + #[serde(rename = "complete")] + pub complete: bool, + /// Unsigned 64 bit integer. + #[serde(rename = "content_length")] + pub content_length: i64, + /// 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 = "site_id")] + pub site_id: uuid::Uuid, + #[serde(rename = "upload_id")] + pub upload_id: uuid::Uuid, } impl CloudCdnSiteSummary { - /// A CDN site summary. - pub fn new(complete: bool, content_length: i64, create_ts: String, display_name: String, site_id: uuid::Uuid, upload_id: uuid::Uuid) -> CloudCdnSiteSummary { - CloudCdnSiteSummary { - complete, - content_length, - create_ts, - display_name, - site_id, - upload_id, - } - } + /// A CDN site summary. + pub fn new( + complete: bool, + content_length: i64, + create_ts: String, + display_name: String, + site_id: uuid::Uuid, + upload_id: uuid::Uuid, + ) -> CloudCdnSiteSummary { + CloudCdnSiteSummary { + complete, + content_length, + create_ts, + display_name, + site_id, + upload_id, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_custom_avatar_summary.rs b/sdks/full/rust/src/models/cloud_custom_avatar_summary.rs index e3716280da..ae427a4833 100644 --- a/sdks/full/rust/src/models/cloud_custom_avatar_summary.rs +++ b/sdks/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 { - /// Whether or not this custom avatar has completely been uploaded. - #[serde(rename = "complete")] - pub complete: bool, - /// Unsigned 64 bit integer. - #[serde(rename = "content_length")] - pub content_length: i64, - /// 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 = "upload_id")] - pub upload_id: uuid::Uuid, - /// 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, + /// Whether or not this custom avatar has completely been uploaded. + #[serde(rename = "complete")] + pub complete: bool, + /// Unsigned 64 bit integer. + #[serde(rename = "content_length")] + pub content_length: i64, + /// 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 = "upload_id")] + pub upload_id: uuid::Uuid, + /// 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, } impl CloudCustomAvatarSummary { - /// A custom avatar summary. - pub fn new(complete: bool, content_length: i64, create_ts: String, display_name: String, upload_id: uuid::Uuid) -> CloudCustomAvatarSummary { - CloudCustomAvatarSummary { - complete, - content_length, - create_ts, - display_name, - upload_id, - url: None, - } - } + /// A custom avatar summary. + pub fn new( + complete: bool, + content_length: i64, + create_ts: String, + display_name: String, + upload_id: uuid::Uuid, + ) -> CloudCustomAvatarSummary { + CloudCustomAvatarSummary { + complete, + content_length, + create_ts, + display_name, + upload_id, + url: None, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_devices_complete_device_link_request.rs b/sdks/full/rust/src/models/cloud_devices_complete_device_link_request.rs index be88fe67ec..9d9567e981 100644 --- a/sdks/full/rust/src/models/cloud_devices_complete_device_link_request.rs +++ b/sdks/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/full/rust/src/models/cloud_devices_get_device_link_response.rs b/sdks/full/rust/src/models/cloud_devices_get_device_link_response.rs index 38a1f79d55..ed0dd748b0 100644 --- a/sdks/full/rust/src/models/cloud_devices_get_device_link_response.rs +++ b/sdks/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/full/rust/src/models/cloud_devices_prepare_device_link_response.rs b/sdks/full/rust/src/models/cloud_devices_prepare_device_link_response.rs index 3e33ef2133..3615140d36 100644 --- a/sdks/full/rust/src/models/cloud_devices_prepare_device_link_response.rs +++ b/sdks/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/full/rust/src/models/cloud_game_full.rs b/sdks/full/rust/src/models/cloud_game_full.rs index a4ffd17835..7b58a6a1eb 100644 --- a/sdks/full/rust/src/models/cloud_game_full.rs +++ b/sdks/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 { - /// A list of region summaries. - #[serde(rename = "available_regions")] - pub available_regions: Vec, - /// The URL of this game's banner image. - #[serde(rename = "banner_url", skip_serializing_if = "Option::is_none")] - pub banner_url: Option, - /// RFC3339 timestamp - #[serde(rename = "create_ts")] - pub create_ts: String, - #[serde(rename = "developer_group_id")] - pub developer_group_id: uuid::Uuid, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "game_id")] - pub game_id: uuid::Uuid, - /// The URL of this game's logo image. - #[serde(rename = "logo_url", skip_serializing_if = "Option::is_none")] - pub logo_url: Option, - /// 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 namespace summaries. - #[serde(rename = "namespaces")] - pub namespaces: Vec, - /// Unsigned 32 bit integer. - #[serde(rename = "total_player_count")] - pub total_player_count: i32, - /// A list of version summaries. - #[serde(rename = "versions")] - pub versions: Vec, + /// A list of region summaries. + #[serde(rename = "available_regions")] + pub available_regions: Vec, + /// The URL of this game's banner image. + #[serde(rename = "banner_url", skip_serializing_if = "Option::is_none")] + pub banner_url: Option, + /// RFC3339 timestamp + #[serde(rename = "create_ts")] + pub create_ts: String, + #[serde(rename = "developer_group_id")] + pub developer_group_id: uuid::Uuid, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "game_id")] + pub game_id: uuid::Uuid, + /// The URL of this game's logo image. + #[serde(rename = "logo_url", skip_serializing_if = "Option::is_none")] + pub logo_url: Option, + /// 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 namespace summaries. + #[serde(rename = "namespaces")] + pub namespaces: Vec, + /// Unsigned 32 bit integer. + #[serde(rename = "total_player_count")] + pub total_player_count: i32, + /// A list of version summaries. + #[serde(rename = "versions")] + pub versions: Vec, } impl CloudGameFull { - /// A full game. - pub fn new(available_regions: Vec, create_ts: String, developer_group_id: uuid::Uuid, display_name: String, game_id: uuid::Uuid, name_id: String, namespaces: Vec, total_player_count: i32, versions: Vec) -> CloudGameFull { - CloudGameFull { - available_regions, - banner_url: None, - create_ts, - developer_group_id, - display_name, - game_id, - logo_url: None, - name_id, - namespaces, - total_player_count, - versions, - } - } + /// A full game. + pub fn new( + available_regions: Vec, + create_ts: String, + developer_group_id: uuid::Uuid, + display_name: String, + game_id: uuid::Uuid, + name_id: String, + namespaces: Vec, + total_player_count: i32, + versions: Vec, + ) -> CloudGameFull { + CloudGameFull { + available_regions, + banner_url: None, + create_ts, + developer_group_id, + display_name, + game_id, + logo_url: None, + name_id, + namespaces, + total_player_count, + versions, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_game_lobby_expenses.rs b/sdks/full/rust/src/models/cloud_game_lobby_expenses.rs index 8fd76e7e4e..0e9213b689 100644 --- a/sdks/full/rust/src/models/cloud_game_lobby_expenses.rs +++ b/sdks/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 { - /// 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, + #[serde(rename = "game")] + pub game: Box, + /// A list of namespace summaries. + #[serde(rename = "namespaces")] + pub namespaces: Vec, } impl CloudGameLobbyExpenses { - /// Game lobby expenses. - pub fn new(expenses: Vec, game: crate::models::GameHandle, namespaces: Vec) -> CloudGameLobbyExpenses { - CloudGameLobbyExpenses { - expenses, - game: Box::new(game), - namespaces, - } - } + /// Game lobby expenses. + pub fn new( + expenses: Vec, + game: crate::models::GameHandle, + namespaces: Vec, + ) -> CloudGameLobbyExpenses { + CloudGameLobbyExpenses { + expenses, + game: Box::new(game), + namespaces, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_games_build_compression.rs b/sdks/full/rust/src/models/cloud_games_build_compression.rs index 9980cc9cb9..9cf09b955b 100644 --- a/sdks/full/rust/src/models/cloud_games_build_compression.rs +++ b/sdks/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/full/rust/src/models/cloud_games_build_kind.rs b/sdks/full/rust/src/models/cloud_games_build_kind.rs index 892db37414..4afc78adae 100644 --- a/sdks/full/rust/src/models/cloud_games_build_kind.rs +++ b/sdks/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/full/rust/src/models/cloud_games_create_cloud_token_response.rs b/sdks/full/rust/src/models/cloud_games_create_cloud_token_response.rs index d6264302b4..c9cebaab4e 100644 --- a/sdks/full/rust/src/models/cloud_games_create_cloud_token_response.rs +++ b/sdks/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/full/rust/src/models/cloud_games_create_game_build_request.rs b/sdks/full/rust/src/models/cloud_games_create_game_build_request.rs index b25d286793..2ebbaed054 100644 --- a/sdks/full/rust/src/models/cloud_games_create_game_build_request.rs +++ b/sdks/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 { - #[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, - #[serde(rename = "image_file")] - pub image_file: Box, - /// A tag given to the game build. - #[serde(rename = "image_tag")] - pub image_tag: String, - #[serde(rename = "kind", skip_serializing_if = "Option::is_none")] - pub kind: Option, - #[serde(rename = "multipart_upload", skip_serializing_if = "Option::is_none")] - pub multipart_upload: 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, + #[serde(rename = "image_file")] + pub image_file: Box, + /// A tag given to the game build. + #[serde(rename = "image_tag")] + pub image_tag: String, + #[serde(rename = "kind", skip_serializing_if = "Option::is_none")] + pub kind: Option, + #[serde(rename = "multipart_upload", skip_serializing_if = "Option::is_none")] + pub multipart_upload: Option, } impl CloudGamesCreateGameBuildRequest { - pub fn new(display_name: String, image_file: crate::models::UploadPrepareFile, image_tag: String) -> CloudGamesCreateGameBuildRequest { - CloudGamesCreateGameBuildRequest { - compression: None, - display_name, - image_file: Box::new(image_file), - image_tag, - kind: None, - multipart_upload: None, - } - } + pub fn new( + display_name: String, + image_file: crate::models::UploadPrepareFile, + image_tag: String, + ) -> CloudGamesCreateGameBuildRequest { + CloudGamesCreateGameBuildRequest { + compression: None, + display_name, + image_file: Box::new(image_file), + image_tag, + kind: None, + multipart_upload: None, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_games_create_game_build_response.rs b/sdks/full/rust/src/models/cloud_games_create_game_build_response.rs index bf7ed65cca..607b999323 100644 --- a/sdks/full/rust/src/models/cloud_games_create_game_build_response.rs +++ b/sdks/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 = "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 = "upload_id")] - pub upload_id: uuid::Uuid, + #[serde(rename = "build_id")] + pub build_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 = "upload_id")] + pub upload_id: uuid::Uuid, } impl CloudGamesCreateGameBuildResponse { - pub fn new(build_id: uuid::Uuid, upload_id: uuid::Uuid) -> CloudGamesCreateGameBuildResponse { - CloudGamesCreateGameBuildResponse { - build_id, - image_presigned_request: None, - image_presigned_requests: None, - upload_id, - } - } + pub fn new(build_id: uuid::Uuid, upload_id: uuid::Uuid) -> CloudGamesCreateGameBuildResponse { + CloudGamesCreateGameBuildResponse { + build_id, + image_presigned_request: None, + image_presigned_requests: None, + upload_id, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_games_create_game_cdn_site_request.rs b/sdks/full/rust/src/models/cloud_games_create_game_cdn_site_request.rs index 57d52bb0a7..313aee8065 100644 --- a/sdks/full/rust/src/models/cloud_games_create_game_cdn_site_request.rs +++ b/sdks/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/full/rust/src/models/cloud_games_create_game_cdn_site_response.rs b/sdks/full/rust/src/models/cloud_games_create_game_cdn_site_response.rs index 55458bf686..c78123eabc 100644 --- a/sdks/full/rust/src/models/cloud_games_create_game_cdn_site_response.rs +++ b/sdks/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 = "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, + #[serde(rename = "site_id")] + pub site_id: uuid::Uuid, + #[serde(rename = "upload_id")] + pub upload_id: uuid::Uuid, } impl CloudGamesCreateGameCdnSiteResponse { - pub fn new(presigned_requests: Vec, site_id: uuid::Uuid, upload_id: uuid::Uuid) -> CloudGamesCreateGameCdnSiteResponse { - CloudGamesCreateGameCdnSiteResponse { - presigned_requests, - site_id, - upload_id, - } - } + pub fn new( + presigned_requests: Vec, + site_id: uuid::Uuid, + upload_id: uuid::Uuid, + ) -> CloudGamesCreateGameCdnSiteResponse { + CloudGamesCreateGameCdnSiteResponse { + presigned_requests, + site_id, + upload_id, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_games_create_game_request.rs b/sdks/full/rust/src/models/cloud_games_create_game_request.rs index e5fd44a582..5e4d2a651e 100644 --- a/sdks/full/rust/src/models/cloud_games_create_game_request.rs +++ b/sdks/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 { - #[serde(rename = "developer_group_id")] - pub developer_group_id: uuid::Uuid, - /// 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, + #[serde(rename = "developer_group_id")] + pub developer_group_id: uuid::Uuid, + /// 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 CloudGamesCreateGameRequest { - pub fn new(developer_group_id: uuid::Uuid, display_name: String) -> CloudGamesCreateGameRequest { - CloudGamesCreateGameRequest { - developer_group_id, - display_name, - name_id: None, - } - } + pub fn new( + developer_group_id: uuid::Uuid, + display_name: String, + ) -> CloudGamesCreateGameRequest { + CloudGamesCreateGameRequest { + developer_group_id, + display_name, + name_id: None, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_games_create_game_response.rs b/sdks/full/rust/src/models/cloud_games_create_game_response.rs index 9cb95bbc78..55865a7004 100644 --- a/sdks/full/rust/src/models/cloud_games_create_game_response.rs +++ b/sdks/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/full/rust/src/models/cloud_games_create_game_version_request.rs b/sdks/full/rust/src/models/cloud_games_create_game_version_request.rs index 0fd1233300..8fe360c142 100644 --- a/sdks/full/rust/src/models/cloud_games_create_game_version_request.rs +++ b/sdks/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 { - #[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, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, } impl CloudGamesCreateGameVersionRequest { - pub fn new(config: crate::models::CloudVersionConfig, display_name: String) -> CloudGamesCreateGameVersionRequest { - CloudGamesCreateGameVersionRequest { - config: Box::new(config), - display_name, - } - } + pub fn new( + config: crate::models::CloudVersionConfig, + display_name: String, + ) -> CloudGamesCreateGameVersionRequest { + CloudGamesCreateGameVersionRequest { + config: Box::new(config), + display_name, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_games_create_game_version_response.rs b/sdks/full/rust/src/models/cloud_games_create_game_version_response.rs index fdda808ad3..6faea83e92 100644 --- a/sdks/full/rust/src/models/cloud_games_create_game_version_response.rs +++ b/sdks/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/full/rust/src/models/cloud_games_delete_matchmaker_lobby_response.rs b/sdks/full/rust/src/models/cloud_games_delete_matchmaker_lobby_response.rs index d7fa01f123..2a9a1aa711 100644 --- a/sdks/full/rust/src/models/cloud_games_delete_matchmaker_lobby_response.rs +++ b/sdks/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/full/rust/src/models/cloud_games_export_lobby_logs_request.rs b/sdks/full/rust/src/models/cloud_games_export_lobby_logs_request.rs index 6f095bf46c..1bcbea9fe2 100644 --- a/sdks/full/rust/src/models/cloud_games_export_lobby_logs_request.rs +++ b/sdks/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/full/rust/src/models/cloud_games_export_lobby_logs_response.rs b/sdks/full/rust/src/models/cloud_games_export_lobby_logs_response.rs index 3d37548c73..537962e6a1 100644 --- a/sdks/full/rust/src/models/cloud_games_export_lobby_logs_response.rs +++ b/sdks/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/full/rust/src/models/cloud_games_export_matchmaker_lobby_history_request.rs b/sdks/full/rust/src/models/cloud_games_export_matchmaker_lobby_history_request.rs index 87efdd49d2..730d41d3f8 100644 --- a/sdks/full/rust/src/models/cloud_games_export_matchmaker_lobby_history_request.rs +++ b/sdks/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_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, + /// Unsigned 64 bit integer. + #[serde(rename = "query_start")] + pub query_start: i64, } impl CloudGamesExportMatchmakerLobbyHistoryRequest { - pub fn new(query_end: i64, query_start: i64) -> CloudGamesExportMatchmakerLobbyHistoryRequest { - CloudGamesExportMatchmakerLobbyHistoryRequest { - query_end, - query_start, - } - } + pub fn new(query_end: i64, query_start: i64) -> CloudGamesExportMatchmakerLobbyHistoryRequest { + CloudGamesExportMatchmakerLobbyHistoryRequest { + query_end, + query_start, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_games_export_matchmaker_lobby_history_response.rs b/sdks/full/rust/src/models/cloud_games_export_matchmaker_lobby_history_response.rs index a526adcc88..b6f7026b4e 100644 --- a/sdks/full/rust/src/models/cloud_games_export_matchmaker_lobby_history_response.rs +++ b/sdks/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/full/rust/src/models/cloud_games_game_banner_upload_prepare_request.rs b/sdks/full/rust/src/models/cloud_games_game_banner_upload_prepare_request.rs index 46eb2ebf13..d4cfa4066d 100644 --- a/sdks/full/rust/src/models/cloud_games_game_banner_upload_prepare_request.rs +++ b/sdks/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 { - /// Unsigned 64 bit integer. - #[serde(rename = "content_length")] - pub content_length: i64, - /// The MIME type of the game banner. - #[serde(rename = "mime", skip_serializing_if = "Option::is_none")] - pub mime: Option, - /// The path/filename of the game banner. - #[serde(rename = "path")] - pub path: String, + /// Unsigned 64 bit integer. + #[serde(rename = "content_length")] + pub content_length: i64, + /// The MIME type of the game banner. + #[serde(rename = "mime", skip_serializing_if = "Option::is_none")] + pub mime: Option, + /// The path/filename of the game banner. + #[serde(rename = "path")] + pub path: String, } impl CloudGamesGameBannerUploadPrepareRequest { - pub fn new(content_length: i64, path: String) -> CloudGamesGameBannerUploadPrepareRequest { - CloudGamesGameBannerUploadPrepareRequest { - content_length, - mime: None, - path, - } - } + pub fn new(content_length: i64, path: String) -> CloudGamesGameBannerUploadPrepareRequest { + CloudGamesGameBannerUploadPrepareRequest { + content_length, + mime: None, + path, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_games_game_banner_upload_prepare_response.rs b/sdks/full/rust/src/models/cloud_games_game_banner_upload_prepare_response.rs index f93a11279d..81449fb91b 100644 --- a/sdks/full/rust/src/models/cloud_games_game_banner_upload_prepare_response.rs +++ b/sdks/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 = "presigned_request")] - pub presigned_request: Box, - #[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, } impl CloudGamesGameBannerUploadPrepareResponse { - pub fn new(presigned_request: crate::models::UploadPresignedRequest, upload_id: uuid::Uuid) -> CloudGamesGameBannerUploadPrepareResponse { - CloudGamesGameBannerUploadPrepareResponse { - presigned_request: Box::new(presigned_request), - upload_id, - } - } + pub fn new( + presigned_request: crate::models::UploadPresignedRequest, + upload_id: uuid::Uuid, + ) -> CloudGamesGameBannerUploadPrepareResponse { + CloudGamesGameBannerUploadPrepareResponse { + presigned_request: Box::new(presigned_request), + upload_id, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_games_game_logo_upload_prepare_request.rs b/sdks/full/rust/src/models/cloud_games_game_logo_upload_prepare_request.rs index fb54a8713c..655c25fddb 100644 --- a/sdks/full/rust/src/models/cloud_games_game_logo_upload_prepare_request.rs +++ b/sdks/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 { - /// Unsigned 64 bit integer. - #[serde(rename = "content_length")] - pub content_length: i64, - /// The MIME type of the game logo. - #[serde(rename = "mime", skip_serializing_if = "Option::is_none")] - pub mime: Option, - /// The path/filename of the game logo. - #[serde(rename = "path")] - pub path: String, + /// Unsigned 64 bit integer. + #[serde(rename = "content_length")] + pub content_length: i64, + /// The MIME type of the game logo. + #[serde(rename = "mime", skip_serializing_if = "Option::is_none")] + pub mime: Option, + /// The path/filename of the game logo. + #[serde(rename = "path")] + pub path: String, } impl CloudGamesGameLogoUploadPrepareRequest { - pub fn new(content_length: i64, path: String) -> CloudGamesGameLogoUploadPrepareRequest { - CloudGamesGameLogoUploadPrepareRequest { - content_length, - mime: None, - path, - } - } + pub fn new(content_length: i64, path: String) -> CloudGamesGameLogoUploadPrepareRequest { + CloudGamesGameLogoUploadPrepareRequest { + content_length, + mime: None, + path, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_games_game_logo_upload_prepare_response.rs b/sdks/full/rust/src/models/cloud_games_game_logo_upload_prepare_response.rs index 9030027d3f..a873dfda35 100644 --- a/sdks/full/rust/src/models/cloud_games_game_logo_upload_prepare_response.rs +++ b/sdks/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 = "presigned_request")] - pub presigned_request: Box, - #[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, } impl CloudGamesGameLogoUploadPrepareResponse { - pub fn new(presigned_request: crate::models::UploadPresignedRequest, upload_id: uuid::Uuid) -> CloudGamesGameLogoUploadPrepareResponse { - CloudGamesGameLogoUploadPrepareResponse { - presigned_request: Box::new(presigned_request), - upload_id, - } - } + pub fn new( + presigned_request: crate::models::UploadPresignedRequest, + upload_id: uuid::Uuid, + ) -> CloudGamesGameLogoUploadPrepareResponse { + CloudGamesGameLogoUploadPrepareResponse { + presigned_request: Box::new(presigned_request), + upload_id, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_games_get_game_by_id_response.rs b/sdks/full/rust/src/models/cloud_games_get_game_by_id_response.rs index 7b34a45026..02eb27ff5d 100644 --- a/sdks/full/rust/src/models/cloud_games_get_game_by_id_response.rs +++ b/sdks/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/full/rust/src/models/cloud_games_get_game_version_by_id_response.rs b/sdks/full/rust/src/models/cloud_games_get_game_version_by_id_response.rs index 17d85fdb62..b95750a2cb 100644 --- a/sdks/full/rust/src/models/cloud_games_get_game_version_by_id_response.rs +++ b/sdks/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/full/rust/src/models/cloud_games_get_games_response.rs b/sdks/full/rust/src/models/cloud_games_get_games_response.rs index d6bf996615..a81d838fc3 100644 --- a/sdks/full/rust/src/models/cloud_games_get_games_response.rs +++ b/sdks/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/full/rust/src/models/cloud_games_get_lobby_logs_response.rs b/sdks/full/rust/src/models/cloud_games_get_lobby_logs_response.rs index 58f54377ac..d9afa54e1e 100644 --- a/sdks/full/rust/src/models/cloud_games_get_lobby_logs_response.rs +++ b/sdks/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/full/rust/src/models/cloud_games_list_game_builds_response.rs b/sdks/full/rust/src/models/cloud_games_list_game_builds_response.rs index b1acc359db..f2bd888b0b 100644 --- a/sdks/full/rust/src/models/cloud_games_list_game_builds_response.rs +++ b/sdks/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/full/rust/src/models/cloud_games_list_game_cdn_sites_response.rs b/sdks/full/rust/src/models/cloud_games_list_game_cdn_sites_response.rs index 6c6d5a0dc1..b3d42de100 100644 --- a/sdks/full/rust/src/models/cloud_games_list_game_cdn_sites_response.rs +++ b/sdks/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/full/rust/src/models/cloud_games_list_game_custom_avatars_response.rs b/sdks/full/rust/src/models/cloud_games_list_game_custom_avatars_response.rs index 12d3443345..569fef54b4 100644 --- a/sdks/full/rust/src/models/cloud_games_list_game_custom_avatars_response.rs +++ b/sdks/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/full/rust/src/models/cloud_games_log_stream.rs b/sdks/full/rust/src/models/cloud_games_log_stream.rs index 64bc9afaf3..7baa7ce2e1 100644 --- a/sdks/full/rust/src/models/cloud_games_log_stream.rs +++ b/sdks/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/full/rust/src/models/cloud_games_namespaces_add_namespace_domain_request.rs b/sdks/full/rust/src/models/cloud_games_namespaces_add_namespace_domain_request.rs index 444ef1c6a1..2d1a3bbee5 100644 --- a/sdks/full/rust/src/models/cloud_games_namespaces_add_namespace_domain_request.rs +++ b/sdks/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/full/rust/src/models/cloud_games_namespaces_create_game_namespace_request.rs b/sdks/full/rust/src/models/cloud_games_namespaces_create_game_namespace_request.rs index 39f79522d1..e7dac7cb97 100644 --- a/sdks/full/rust/src/models/cloud_games_namespaces_create_game_namespace_request.rs +++ b/sdks/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, - /// 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 = "version_id")] - pub version_id: uuid::Uuid, + /// 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, + #[serde(rename = "version_id")] + pub version_id: uuid::Uuid, } impl CloudGamesNamespacesCreateGameNamespaceRequest { - pub fn new(display_name: String, name_id: String, version_id: uuid::Uuid) -> CloudGamesNamespacesCreateGameNamespaceRequest { - CloudGamesNamespacesCreateGameNamespaceRequest { - display_name, - name_id, - version_id, - } - } + pub fn new( + display_name: String, + name_id: String, + version_id: uuid::Uuid, + ) -> CloudGamesNamespacesCreateGameNamespaceRequest { + CloudGamesNamespacesCreateGameNamespaceRequest { + display_name, + name_id, + version_id, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_games_namespaces_create_game_namespace_response.rs b/sdks/full/rust/src/models/cloud_games_namespaces_create_game_namespace_response.rs index 816d4796b3..a1351cfb99 100644 --- a/sdks/full/rust/src/models/cloud_games_namespaces_create_game_namespace_response.rs +++ b/sdks/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/full/rust/src/models/cloud_games_namespaces_create_game_namespace_token_development_request.rs b/sdks/full/rust/src/models/cloud_games_namespaces_create_game_namespace_token_development_request.rs index d494b88b33..506a52f6b7 100644 --- a/sdks/full/rust/src/models/cloud_games_namespaces_create_game_namespace_token_development_request.rs +++ b/sdks/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, - /// **Deprecated** A list of docker ports. - #[serde(rename = "lobby_ports", skip_serializing_if = "Option::is_none")] - pub lobby_ports: Option>, - #[serde(rename = "ports", skip_serializing_if = "Option::is_none")] - pub ports: Option<::std::collections::HashMap>, + /// The hostname used for the token. + #[serde(rename = "hostname")] + pub hostname: String, + /// **Deprecated** A list of docker ports. + #[serde(rename = "lobby_ports", skip_serializing_if = "Option::is_none")] + pub lobby_ports: Option>, + #[serde(rename = "ports", skip_serializing_if = "Option::is_none")] + pub ports: + Option<::std::collections::HashMap>, } impl CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentRequest { - pub fn new(hostname: String) -> CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentRequest { - CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentRequest { - hostname, - lobby_ports: None, - ports: None, - } - } + pub fn new(hostname: String) -> CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentRequest { + CloudGamesNamespacesCreateGameNamespaceTokenDevelopmentRequest { + hostname, + lobby_ports: None, + ports: None, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_games_namespaces_create_game_namespace_token_development_response.rs b/sdks/full/rust/src/models/cloud_games_namespaces_create_game_namespace_token_development_response.rs index 1e607255f1..c4f1e06b9f 100644 --- a/sdks/full/rust/src/models/cloud_games_namespaces_create_game_namespace_token_development_response.rs +++ b/sdks/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/full/rust/src/models/cloud_games_namespaces_create_game_namespace_token_public_response.rs b/sdks/full/rust/src/models/cloud_games_namespaces_create_game_namespace_token_public_response.rs index 9d6dd8b1ed..629019dc8c 100644 --- a/sdks/full/rust/src/models/cloud_games_namespaces_create_game_namespace_token_public_response.rs +++ b/sdks/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/full/rust/src/models/cloud_games_namespaces_get_analytics_matchmaker_live_response.rs b/sdks/full/rust/src/models/cloud_games_namespaces_get_analytics_matchmaker_live_response.rs index 09a134856e..3fc3a7304f 100644 --- a/sdks/full/rust/src/models/cloud_games_namespaces_get_analytics_matchmaker_live_response.rs +++ b/sdks/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/full/rust/src/models/cloud_games_namespaces_get_game_namespace_by_id_response.rs b/sdks/full/rust/src/models/cloud_games_namespaces_get_game_namespace_by_id_response.rs index 5aa1f56dc4..7e0d67f7d6 100644 --- a/sdks/full/rust/src/models/cloud_games_namespaces_get_game_namespace_by_id_response.rs +++ b/sdks/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/full/rust/src/models/cloud_games_namespaces_get_game_namespace_version_history_response.rs b/sdks/full/rust/src/models/cloud_games_namespaces_get_game_namespace_version_history_response.rs index 0e28f0773e..beae4bcaf9 100644 --- a/sdks/full/rust/src/models/cloud_games_namespaces_get_game_namespace_version_history_response.rs +++ b/sdks/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/full/rust/src/models/cloud_games_namespaces_get_namespace_lobby_response.rs b/sdks/full/rust/src/models/cloud_games_namespaces_get_namespace_lobby_response.rs index c09446bc8c..571152f5c6 100644 --- a/sdks/full/rust/src/models/cloud_games_namespaces_get_namespace_lobby_response.rs +++ b/sdks/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 service performance summaries. - #[serde(rename = "perf_lists")] - pub perf_lists: Vec, - /// **Deprecated** A list of URLs. - #[serde(rename = "stderr_presigned_urls")] - pub stderr_presigned_urls: Vec, - /// **Deprecated** A list of URLs. - #[serde(rename = "stdout_presigned_urls")] - pub stdout_presigned_urls: Vec, + #[serde(rename = "lobby")] + pub lobby: Box, + #[serde(rename = "metrics", skip_serializing_if = "Option::is_none")] + pub metrics: Option>, + /// **Deprecated** A list of service performance summaries. + #[serde(rename = "perf_lists")] + pub perf_lists: Vec, + /// **Deprecated** A list of URLs. + #[serde(rename = "stderr_presigned_urls")] + pub stderr_presigned_urls: Vec, + /// **Deprecated** A list of URLs. + #[serde(rename = "stdout_presigned_urls")] + pub stdout_presigned_urls: Vec, } impl CloudGamesNamespacesGetNamespaceLobbyResponse { - pub fn new(lobby: crate::models::CloudLogsLobbySummary, perf_lists: Vec, stderr_presigned_urls: Vec, stdout_presigned_urls: Vec) -> CloudGamesNamespacesGetNamespaceLobbyResponse { - CloudGamesNamespacesGetNamespaceLobbyResponse { - lobby: Box::new(lobby), - metrics: None, - perf_lists, - stderr_presigned_urls, - stdout_presigned_urls, - } - } + pub fn new( + lobby: crate::models::CloudLogsLobbySummary, + perf_lists: Vec, + stderr_presigned_urls: Vec, + stdout_presigned_urls: Vec, + ) -> CloudGamesNamespacesGetNamespaceLobbyResponse { + CloudGamesNamespacesGetNamespaceLobbyResponse { + lobby: Box::new(lobby), + metrics: None, + perf_lists, + stderr_presigned_urls, + stdout_presigned_urls, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_games_namespaces_inspect_response.rs b/sdks/full/rust/src/models/cloud_games_namespaces_inspect_response.rs index 90fc0df81b..04d48f490b 100644 --- a/sdks/full/rust/src/models/cloud_games_namespaces_inspect_response.rs +++ b/sdks/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/full/rust/src/models/cloud_games_namespaces_list_namespace_lobbies_response.rs b/sdks/full/rust/src/models/cloud_games_namespaces_list_namespace_lobbies_response.rs index 42e804d011..dc24c28505 100644 --- a/sdks/full/rust/src/models/cloud_games_namespaces_list_namespace_lobbies_response.rs +++ b/sdks/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/full/rust/src/models/cloud_games_namespaces_set_namespace_cdn_auth_type_request.rs b/sdks/full/rust/src/models/cloud_games_namespaces_set_namespace_cdn_auth_type_request.rs index d6f98905b4..dce840ab4e 100644 --- a/sdks/full/rust/src/models/cloud_games_namespaces_set_namespace_cdn_auth_type_request.rs +++ b/sdks/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/full/rust/src/models/cloud_games_namespaces_toggle_namespace_domain_public_auth_request.rs b/sdks/full/rust/src/models/cloud_games_namespaces_toggle_namespace_domain_public_auth_request.rs index 8f756de255..fbe7dc86f5 100644 --- a/sdks/full/rust/src/models/cloud_games_namespaces_toggle_namespace_domain_public_auth_request.rs +++ b/sdks/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/full/rust/src/models/cloud_games_namespaces_update_game_namespace_matchmaker_config_request.rs b/sdks/full/rust/src/models/cloud_games_namespaces_update_game_namespace_matchmaker_config_request.rs index 1e10a667a3..fcbeabf8e3 100644 --- a/sdks/full/rust/src/models/cloud_games_namespaces_update_game_namespace_matchmaker_config_request.rs +++ b/sdks/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/full/rust/src/models/cloud_games_namespaces_update_game_namespace_version_request.rs b/sdks/full/rust/src/models/cloud_games_namespaces_update_game_namespace_version_request.rs index 7bc24f72d1..449d2f84f5 100644 --- a/sdks/full/rust/src/models/cloud_games_namespaces_update_game_namespace_version_request.rs +++ b/sdks/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/full/rust/src/models/cloud_games_namespaces_update_namespace_cdn_auth_user_request.rs b/sdks/full/rust/src/models/cloud_games_namespaces_update_namespace_cdn_auth_user_request.rs index 639da0d8a5..f534b12a1b 100644 --- a/sdks/full/rust/src/models/cloud_games_namespaces_update_namespace_cdn_auth_user_request.rs +++ b/sdks/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 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, + /// A user name. + #[serde(rename = "user")] + pub user: String, } impl CloudGamesNamespacesUpdateNamespaceCdnAuthUserRequest { - pub fn new(password: String, user: String) -> CloudGamesNamespacesUpdateNamespaceCdnAuthUserRequest { - CloudGamesNamespacesUpdateNamespaceCdnAuthUserRequest { - password, - user, - } - } + pub fn new( + password: String, + user: String, + ) -> CloudGamesNamespacesUpdateNamespaceCdnAuthUserRequest { + CloudGamesNamespacesUpdateNamespaceCdnAuthUserRequest { password, user } + } } - - diff --git a/sdks/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_matchmaker_config_request.rs b/sdks/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_matchmaker_config_request.rs index b144620c51..4bd2f73d7c 100644 --- a/sdks/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_matchmaker_config_request.rs +++ b/sdks/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/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_matchmaker_config_response.rs b/sdks/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_matchmaker_config_response.rs index 5b0d3eee10..cecc971e97 100644 --- a/sdks/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_matchmaker_config_response.rs +++ b/sdks/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/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_request.rs b/sdks/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_request.rs index 3b49b7bcab..ad37b02940 100644 --- a/sdks/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_request.rs +++ b/sdks/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/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_response.rs b/sdks/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_response.rs index 65be900bea..fd9e4ecf65 100644 --- a/sdks/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_response.rs +++ b/sdks/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/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_token_development_request.rs b/sdks/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_token_development_request.rs index c3c7db4f09..dc2251e01a 100644 --- a/sdks/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_token_development_request.rs +++ b/sdks/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/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_token_development_response.rs b/sdks/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_token_development_response.rs index b647adf24a..1c1bf23657 100644 --- a/sdks/full/rust/src/models/cloud_games_namespaces_validate_game_namespace_token_development_response.rs +++ b/sdks/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/full/rust/src/models/cloud_games_prepare_custom_avatar_upload_request.rs b/sdks/full/rust/src/models/cloud_games_prepare_custom_avatar_upload_request.rs index fe9c725209..2bc7209e85 100644 --- a/sdks/full/rust/src/models/cloud_games_prepare_custom_avatar_upload_request.rs +++ b/sdks/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 { - /// Unsigned 64 bit integer. - #[serde(rename = "content_length")] - pub content_length: i64, - /// The MIME type of the custom avatar. - #[serde(rename = "mime", skip_serializing_if = "Option::is_none")] - pub mime: Option, - /// The path/filename of the custom avatar. - #[serde(rename = "path")] - pub path: String, + /// Unsigned 64 bit integer. + #[serde(rename = "content_length")] + pub content_length: i64, + /// The MIME type of the custom avatar. + #[serde(rename = "mime", skip_serializing_if = "Option::is_none")] + pub mime: Option, + /// The path/filename of the custom avatar. + #[serde(rename = "path")] + pub path: String, } impl CloudGamesPrepareCustomAvatarUploadRequest { - pub fn new(content_length: i64, path: String) -> CloudGamesPrepareCustomAvatarUploadRequest { - CloudGamesPrepareCustomAvatarUploadRequest { - content_length, - mime: None, - path, - } - } + pub fn new(content_length: i64, path: String) -> CloudGamesPrepareCustomAvatarUploadRequest { + CloudGamesPrepareCustomAvatarUploadRequest { + content_length, + mime: None, + path, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_games_prepare_custom_avatar_upload_response.rs b/sdks/full/rust/src/models/cloud_games_prepare_custom_avatar_upload_response.rs index acf310ffb8..4c5c52bd45 100644 --- a/sdks/full/rust/src/models/cloud_games_prepare_custom_avatar_upload_response.rs +++ b/sdks/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 = "presigned_request")] - pub presigned_request: Box, - #[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, } impl CloudGamesPrepareCustomAvatarUploadResponse { - pub fn new(presigned_request: crate::models::UploadPresignedRequest, upload_id: uuid::Uuid) -> CloudGamesPrepareCustomAvatarUploadResponse { - CloudGamesPrepareCustomAvatarUploadResponse { - presigned_request: Box::new(presigned_request), - upload_id, - } - } + pub fn new( + presigned_request: crate::models::UploadPresignedRequest, + upload_id: uuid::Uuid, + ) -> CloudGamesPrepareCustomAvatarUploadResponse { + CloudGamesPrepareCustomAvatarUploadResponse { + presigned_request: Box::new(presigned_request), + upload_id, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_games_reserve_version_name_response.rs b/sdks/full/rust/src/models/cloud_games_reserve_version_name_response.rs index 1ca6b9fd43..f4db92c3dc 100644 --- a/sdks/full/rust/src/models/cloud_games_reserve_version_name_response.rs +++ b/sdks/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/full/rust/src/models/cloud_games_validate_game_request.rs b/sdks/full/rust/src/models/cloud_games_validate_game_request.rs index 30f7fb8d7b..1583276b99 100644 --- a/sdks/full/rust/src/models/cloud_games_validate_game_request.rs +++ b/sdks/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/full/rust/src/models/cloud_games_validate_game_response.rs b/sdks/full/rust/src/models/cloud_games_validate_game_response.rs index d5b3f32d81..05215a883f 100644 --- a/sdks/full/rust/src/models/cloud_games_validate_game_response.rs +++ b/sdks/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/full/rust/src/models/cloud_games_validate_game_version_request.rs b/sdks/full/rust/src/models/cloud_games_validate_game_version_request.rs index 2f2f612e67..4ef42058f4 100644 --- a/sdks/full/rust/src/models/cloud_games_validate_game_version_request.rs +++ b/sdks/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 { - #[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, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, } impl CloudGamesValidateGameVersionRequest { - pub fn new(config: crate::models::CloudVersionConfig, display_name: String) -> CloudGamesValidateGameVersionRequest { - CloudGamesValidateGameVersionRequest { - config: Box::new(config), - display_name, - } - } + pub fn new( + config: crate::models::CloudVersionConfig, + display_name: String, + ) -> CloudGamesValidateGameVersionRequest { + CloudGamesValidateGameVersionRequest { + config: Box::new(config), + display_name, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_games_validate_game_version_response.rs b/sdks/full/rust/src/models/cloud_games_validate_game_version_response.rs index 8d55feaec9..c9d0d60710 100644 --- a/sdks/full/rust/src/models/cloud_games_validate_game_version_response.rs +++ b/sdks/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/full/rust/src/models/cloud_get_ray_perf_logs_response.rs b/sdks/full/rust/src/models/cloud_get_ray_perf_logs_response.rs index ec13db31b5..1f64ed13d8 100644 --- a/sdks/full/rust/src/models/cloud_get_ray_perf_logs_response.rs +++ b/sdks/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/full/rust/src/models/cloud_get_region_tiers_response.rs b/sdks/full/rust/src/models/cloud_get_region_tiers_response.rs index e49ac514bf..4c2f4b22de 100644 --- a/sdks/full/rust/src/models/cloud_get_region_tiers_response.rs +++ b/sdks/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/full/rust/src/models/cloud_group_bank_source.rs b/sdks/full/rust/src/models/cloud_group_bank_source.rs index 78e864f8c4..34e49405bb 100644 --- a/sdks/full/rust/src/models/cloud_group_bank_source.rs +++ b/sdks/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/full/rust/src/models/cloud_inspect_response.rs b/sdks/full/rust/src/models/cloud_inspect_response.rs index 21bfa6f475..721bc953dd 100644 --- a/sdks/full/rust/src/models/cloud_inspect_response.rs +++ b/sdks/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/full/rust/src/models/cloud_lobby_summary_analytics.rs b/sdks/full/rust/src/models/cloud_lobby_summary_analytics.rs index e99c372fb3..99601bf8bc 100644 --- a/sdks/full/rust/src/models/cloud_lobby_summary_analytics.rs +++ b/sdks/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 { - /// RFC3339 timestamp - #[serde(rename = "create_ts")] - pub create_ts: String, - /// Whether or not this lobby is in a closed state. - #[serde(rename = "is_closed")] - pub is_closed: bool, - /// Whether or not this lobby is idle. - #[serde(rename = "is_idle")] - pub is_idle: bool, - /// Whether or not this lobby is outdated. - #[serde(rename = "is_outdated")] - pub is_outdated: bool, - /// Whether or not this lobby is ready. - #[serde(rename = "is_ready")] - pub is_ready: bool, - #[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 = "lobby_id")] - pub lobby_id: uuid::Uuid, - /// Unsigned 32 bit integer. - #[serde(rename = "max_players_direct")] - pub max_players_direct: i32, - /// Unsigned 32 bit integer. - #[serde(rename = "max_players_normal")] - pub max_players_normal: i32, - /// Unsigned 32 bit integer. - #[serde(rename = "max_players_party")] - pub max_players_party: i32, - #[serde(rename = "region_id")] - pub region_id: uuid::Uuid, - /// Unsigned 32 bit integer. - #[serde(rename = "registered_player_count")] - pub registered_player_count: i32, - /// Unsigned 32 bit integer. - #[serde(rename = "total_player_count")] - pub total_player_count: i32, + /// RFC3339 timestamp + #[serde(rename = "create_ts")] + pub create_ts: String, + /// Whether or not this lobby is in a closed state. + #[serde(rename = "is_closed")] + pub is_closed: bool, + /// Whether or not this lobby is idle. + #[serde(rename = "is_idle")] + pub is_idle: bool, + /// Whether or not this lobby is outdated. + #[serde(rename = "is_outdated")] + pub is_outdated: bool, + /// Whether or not this lobby is ready. + #[serde(rename = "is_ready")] + pub is_ready: bool, + #[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 = "lobby_id")] + pub lobby_id: uuid::Uuid, + /// Unsigned 32 bit integer. + #[serde(rename = "max_players_direct")] + pub max_players_direct: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "max_players_normal")] + pub max_players_normal: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "max_players_party")] + pub max_players_party: i32, + #[serde(rename = "region_id")] + pub region_id: uuid::Uuid, + /// Unsigned 32 bit integer. + #[serde(rename = "registered_player_count")] + pub registered_player_count: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "total_player_count")] + pub total_player_count: i32, } impl CloudLobbySummaryAnalytics { - /// Analytical information about a lobby. - pub fn new(create_ts: String, is_closed: bool, is_idle: bool, is_outdated: bool, is_ready: bool, lobby_group_id: uuid::Uuid, lobby_group_name_id: String, lobby_id: uuid::Uuid, max_players_direct: i32, max_players_normal: i32, max_players_party: i32, region_id: uuid::Uuid, registered_player_count: i32, total_player_count: i32) -> CloudLobbySummaryAnalytics { - CloudLobbySummaryAnalytics { - create_ts, - is_closed, - is_idle, - is_outdated, - is_ready, - lobby_group_id, - lobby_group_name_id, - lobby_id, - max_players_direct, - max_players_normal, - max_players_party, - region_id, - registered_player_count, - total_player_count, - } - } + /// Analytical information about a lobby. + pub fn new( + create_ts: String, + is_closed: bool, + is_idle: bool, + is_outdated: bool, + is_ready: bool, + lobby_group_id: uuid::Uuid, + lobby_group_name_id: String, + lobby_id: uuid::Uuid, + max_players_direct: i32, + max_players_normal: i32, + max_players_party: i32, + region_id: uuid::Uuid, + registered_player_count: i32, + total_player_count: i32, + ) -> CloudLobbySummaryAnalytics { + CloudLobbySummaryAnalytics { + create_ts, + is_closed, + is_idle, + is_outdated, + is_ready, + lobby_group_id, + lobby_group_name_id, + lobby_id, + max_players_direct, + max_players_normal, + max_players_party, + region_id, + registered_player_count, + total_player_count, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_logs_lobby_status.rs b/sdks/full/rust/src/models/cloud_logs_lobby_status.rs index 6ce2a4709b..6ba2e567db 100644 --- a/sdks/full/rust/src/models/cloud_logs_lobby_status.rs +++ b/sdks/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/full/rust/src/models/cloud_logs_lobby_status_stopped.rs b/sdks/full/rust/src/models/cloud_logs_lobby_status_stopped.rs index c74fa79844..a8c76c69a2 100644 --- a/sdks/full/rust/src/models/cloud_logs_lobby_status_stopped.rs +++ b/sdks/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 { - /// The exit code returned by the lobby's main process when stopped. - #[serde(rename = "exit_code")] - pub exit_code: i32, - /// Whether or not the lobby failed or stopped successfully. - #[serde(rename = "failed")] - pub failed: bool, - /// RFC3339 timestamp - #[serde(rename = "stop_ts")] - pub stop_ts: String, + /// The exit code returned by the lobby's main process when stopped. + #[serde(rename = "exit_code")] + pub exit_code: i32, + /// Whether or not the lobby failed or stopped successfully. + #[serde(rename = "failed")] + pub failed: bool, + /// RFC3339 timestamp + #[serde(rename = "stop_ts")] + pub stop_ts: String, } impl CloudLogsLobbyStatusStopped { - /// The status of a stopped lobby. - pub fn new(exit_code: i32, failed: bool, stop_ts: String) -> CloudLogsLobbyStatusStopped { - CloudLogsLobbyStatusStopped { - exit_code, - failed, - stop_ts, - } - } + /// The status of a stopped lobby. + pub fn new(exit_code: i32, failed: bool, stop_ts: String) -> CloudLogsLobbyStatusStopped { + CloudLogsLobbyStatusStopped { + exit_code, + failed, + stop_ts, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_logs_lobby_summary.rs b/sdks/full/rust/src/models/cloud_logs_lobby_summary.rs index 7f24f714de..9453e99016 100644 --- a/sdks/full/rust/src/models/cloud_logs_lobby_summary.rs +++ b/sdks/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 { - /// 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 = "lobby_group_name_id")] - pub lobby_group_name_id: String, - #[serde(rename = "lobby_id")] - pub lobby_id: uuid::Uuid, - #[serde(rename = "namespace_id")] - pub namespace_id: uuid::Uuid, - /// RFC3339 timestamp - #[serde(rename = "ready_ts", skip_serializing_if = "Option::is_none")] - pub ready_ts: Option, - #[serde(rename = "region_id")] - pub region_id: uuid::Uuid, - /// RFC3339 timestamp - #[serde(rename = "start_ts", skip_serializing_if = "Option::is_none")] - pub start_ts: Option, - #[serde(rename = "status")] - pub status: Box, + /// 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 = "lobby_group_name_id")] + pub lobby_group_name_id: String, + #[serde(rename = "lobby_id")] + pub lobby_id: uuid::Uuid, + #[serde(rename = "namespace_id")] + pub namespace_id: uuid::Uuid, + /// RFC3339 timestamp + #[serde(rename = "ready_ts", skip_serializing_if = "Option::is_none")] + pub ready_ts: Option, + #[serde(rename = "region_id")] + pub region_id: uuid::Uuid, + /// RFC3339 timestamp + #[serde(rename = "start_ts", skip_serializing_if = "Option::is_none")] + pub start_ts: Option, + #[serde(rename = "status")] + pub status: Box, } impl CloudLogsLobbySummary { - /// A logs summary for a lobby. - pub fn new(create_ts: String, lobby_group_name_id: String, lobby_id: uuid::Uuid, namespace_id: uuid::Uuid, region_id: uuid::Uuid, status: crate::models::CloudLogsLobbyStatus) -> CloudLogsLobbySummary { - CloudLogsLobbySummary { - create_ts, - lobby_group_name_id, - lobby_id, - namespace_id, - ready_ts: None, - region_id, - start_ts: None, - status: Box::new(status), - } - } + /// A logs summary for a lobby. + pub fn new( + create_ts: String, + lobby_group_name_id: String, + lobby_id: uuid::Uuid, + namespace_id: uuid::Uuid, + region_id: uuid::Uuid, + status: crate::models::CloudLogsLobbyStatus, + ) -> CloudLogsLobbySummary { + CloudLogsLobbySummary { + create_ts, + lobby_group_name_id, + lobby_id, + namespace_id, + ready_ts: None, + region_id, + start_ts: None, + status: Box::new(status), + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_logs_perf_mark.rs b/sdks/full/rust/src/models/cloud_logs_perf_mark.rs index 7df6a121f9..5510570cbe 100644 --- a/sdks/full/rust/src/models/cloud_logs_perf_mark.rs +++ b/sdks/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, - #[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, - /// RFC3339 timestamp - #[serde(rename = "ts")] - pub ts: String, + /// The label given to this performance mark. + #[serde(rename = "label")] + pub label: 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, + /// RFC3339 timestamp + #[serde(rename = "ts")] + pub ts: String, } impl CloudLogsPerfMark { - /// A performance mark. - pub fn new(label: String, ts: String) -> CloudLogsPerfMark { - CloudLogsPerfMark { - label, - ray_id: None, - req_id: None, - ts, - } - } + /// A performance mark. + pub fn new(label: String, ts: String) -> CloudLogsPerfMark { + CloudLogsPerfMark { + label, + ray_id: None, + req_id: None, + ts, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_logs_perf_span.rs b/sdks/full/rust/src/models/cloud_logs_perf_span.rs index 43429ba2c8..ca76fd748f 100644 --- a/sdks/full/rust/src/models/cloud_logs_perf_span.rs +++ b/sdks/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 { - /// RFC3339 timestamp - #[serde(rename = "finish_ts", skip_serializing_if = "Option::is_none")] - pub finish_ts: Option, - /// The label given to this performance span. - #[serde(rename = "label")] - pub label: String, - #[serde(rename = "req_id", skip_serializing_if = "Option::is_none")] - pub req_id: Option, - /// 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, + /// The label given to this performance span. + #[serde(rename = "label")] + pub label: String, + #[serde(rename = "req_id", skip_serializing_if = "Option::is_none")] + pub req_id: Option, + /// RFC3339 timestamp + #[serde(rename = "start_ts")] + pub start_ts: String, } impl CloudLogsPerfSpan { - /// A performance span. - pub fn new(label: String, start_ts: String) -> CloudLogsPerfSpan { - CloudLogsPerfSpan { - finish_ts: None, - label, - req_id: None, - start_ts, - } - } + /// A performance span. + pub fn new(label: String, start_ts: String) -> CloudLogsPerfSpan { + CloudLogsPerfSpan { + finish_ts: None, + label, + req_id: None, + start_ts, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_matchmaker_development_port.rs b/sdks/full/rust/src/models/cloud_matchmaker_development_port.rs index b901399953..a4be2575ae 100644 --- a/sdks/full/rust/src/models/cloud_matchmaker_development_port.rs +++ b/sdks/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/full/rust/src/models/cloud_matchmaker_namespace_config.rs b/sdks/full/rust/src/models/cloud_matchmaker_namespace_config.rs index 458a1df6b1..07b9f85be3 100644 --- a/sdks/full/rust/src/models/cloud_matchmaker_namespace_config.rs +++ b/sdks/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_hosting")] - pub max_players_per_client_hosting: 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_vpn")] - pub max_players_per_client_vpn: 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_hosting")] + pub max_players_per_client_hosting: 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_vpn")] + pub max_players_per_client_vpn: 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_hosting: i32, max_players_per_client_proxy: i32, max_players_per_client_tor: i32, max_players_per_client_vpn: i32) -> CloudMatchmakerNamespaceConfig { - CloudMatchmakerNamespaceConfig { - lobby_count_max, - max_players_per_client, - max_players_per_client_hosting, - max_players_per_client_proxy, - max_players_per_client_tor, - max_players_per_client_vpn, - } - } + /// Matchmaker configuration for a given namespace. + pub fn new( + lobby_count_max: i32, + max_players_per_client: i32, + max_players_per_client_hosting: i32, + max_players_per_client_proxy: i32, + max_players_per_client_tor: i32, + max_players_per_client_vpn: i32, + ) -> CloudMatchmakerNamespaceConfig { + CloudMatchmakerNamespaceConfig { + lobby_count_max, + max_players_per_client, + max_players_per_client_hosting, + max_players_per_client_proxy, + max_players_per_client_tor, + max_players_per_client_vpn, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_namespace_config.rs b/sdks/full/rust/src/models/cloud_namespace_config.rs index 7dfe67ee46..80029d1d79 100644 --- a/sdks/full/rust/src/models/cloud_namespace_config.rs +++ b/sdks/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, - /// Identity configuration for a given namespace. - #[serde(rename = "identity")] - pub identity: serde_json::Value, - /// KV configuration for a given namespace. - #[serde(rename = "kv")] - pub kv: serde_json::Value, - #[serde(rename = "matchmaker")] - pub matchmaker: Box, + #[serde(rename = "cdn")] + pub cdn: Box, + /// Identity configuration for a given namespace. + #[serde(rename = "identity")] + pub identity: serde_json::Value, + /// KV configuration for a given namespace. + #[serde(rename = "kv")] + pub kv: serde_json::Value, + #[serde(rename = "matchmaker")] + pub matchmaker: Box, } impl CloudNamespaceConfig { - /// Cloud configuration for a given namespace. - pub fn new(cdn: crate::models::CloudCdnNamespaceConfig, identity: serde_json::Value, kv: serde_json::Value, matchmaker: crate::models::CloudMatchmakerNamespaceConfig) -> CloudNamespaceConfig { - CloudNamespaceConfig { - cdn: Box::new(cdn), - identity, - kv, - matchmaker: Box::new(matchmaker), - } - } + /// Cloud configuration for a given namespace. + pub fn new( + cdn: crate::models::CloudCdnNamespaceConfig, + identity: serde_json::Value, + kv: serde_json::Value, + matchmaker: crate::models::CloudMatchmakerNamespaceConfig, + ) -> CloudNamespaceConfig { + CloudNamespaceConfig { + cdn: Box::new(cdn), + identity, + kv, + matchmaker: Box::new(matchmaker), + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_namespace_full.rs b/sdks/full/rust/src/models/cloud_namespace_full.rs index 581f7008ae..a099ca3987 100644 --- a/sdks/full/rust/src/models/cloud_namespace_full.rs +++ b/sdks/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 = "config")] - pub config: Box, - /// 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, - /// 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, - #[serde(rename = "version_id")] - pub version_id: uuid::Uuid, + #[serde(rename = "config")] + pub config: Box, + /// 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, + /// 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, + #[serde(rename = "version_id")] + pub version_id: uuid::Uuid, } impl CloudNamespaceFull { - /// A full namespace. - pub fn new(config: crate::models::CloudNamespaceConfig, create_ts: String, display_name: String, name_id: String, namespace_id: uuid::Uuid, version_id: uuid::Uuid) -> CloudNamespaceFull { - CloudNamespaceFull { - config: Box::new(config), - create_ts, - display_name, - name_id, - namespace_id, - version_id, - } - } + /// A full namespace. + pub fn new( + config: crate::models::CloudNamespaceConfig, + create_ts: String, + display_name: String, + name_id: String, + namespace_id: uuid::Uuid, + version_id: uuid::Uuid, + ) -> CloudNamespaceFull { + CloudNamespaceFull { + config: Box::new(config), + create_ts, + display_name, + name_id, + namespace_id, + version_id, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_namespace_summary.rs b/sdks/full/rust/src/models/cloud_namespace_summary.rs index d7e3215a51..52aaf7abaf 100644 --- a/sdks/full/rust/src/models/cloud_namespace_summary.rs +++ b/sdks/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 { - /// 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, - /// 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, - #[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, + /// 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, + #[serde(rename = "version_id")] + pub version_id: uuid::Uuid, } impl CloudNamespaceSummary { - /// A namespace summary. - pub fn new(create_ts: String, display_name: String, name_id: String, namespace_id: uuid::Uuid, version_id: uuid::Uuid) -> CloudNamespaceSummary { - CloudNamespaceSummary { - create_ts, - display_name, - name_id, - namespace_id, - version_id, - } - } + /// A namespace summary. + pub fn new( + create_ts: String, + display_name: String, + name_id: String, + namespace_id: uuid::Uuid, + version_id: uuid::Uuid, + ) -> CloudNamespaceSummary { + CloudNamespaceSummary { + create_ts, + display_name, + name_id, + namespace_id, + version_id, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_namespace_version.rs b/sdks/full/rust/src/models/cloud_namespace_version.rs index fcab3769a1..16dcd05f7e 100644 --- a/sdks/full/rust/src/models/cloud_namespace_version.rs +++ b/sdks/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 { - /// 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, + /// A universally unique identifier. + #[serde(rename = "namespace_id")] + pub namespace_id: String, + /// A universally unique identifier. + #[serde(rename = "version_id")] + pub version_id: String, } impl CloudNamespaceVersion { - /// A previously deployed namespace version. - pub fn new(deploy_ts: String, namespace_id: String, version_id: String) -> CloudNamespaceVersion { - CloudNamespaceVersion { - deploy_ts, - namespace_id, - version_id, - } - } + /// A previously deployed namespace version. + pub fn new( + deploy_ts: String, + namespace_id: String, + version_id: String, + ) -> CloudNamespaceVersion { + CloudNamespaceVersion { + deploy_ts, + namespace_id, + version_id, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_region_summary.rs b/sdks/full/rust/src/models/cloud_region_summary.rs index 397c9ceb8e..cd574d637c 100644 --- a/sdks/full/rust/src/models/cloud_region_summary.rs +++ b/sdks/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 { - /// The server provider of this region. - #[serde(rename = "provider")] - pub provider: 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 = "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, - #[serde(rename = "universal_region")] - pub universal_region: crate::models::CloudUniversalRegion, + /// The server provider of this region. + #[serde(rename = "provider")] + pub provider: 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 = "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, + #[serde(rename = "universal_region")] + pub universal_region: crate::models::CloudUniversalRegion, } impl CloudRegionSummary { - /// A region summary. - pub fn new(provider: String, provider_display_name: String, region_display_name: String, region_id: uuid::Uuid, region_name_id: String, universal_region: crate::models::CloudUniversalRegion) -> CloudRegionSummary { - CloudRegionSummary { - provider, - provider_display_name, - region_display_name, - region_id, - region_name_id, - universal_region, - } - } + /// A region summary. + pub fn new( + provider: String, + provider_display_name: String, + region_display_name: String, + region_id: uuid::Uuid, + region_name_id: String, + universal_region: crate::models::CloudUniversalRegion, + ) -> CloudRegionSummary { + CloudRegionSummary { + provider, + provider_display_name, + region_display_name, + region_id, + region_name_id, + universal_region, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_region_tier.rs b/sdks/full/rust/src/models/cloud_region_tier.rs index 7b21fb0790..3a4a9b32fb 100644 --- a/sdks/full/rust/src/models/cloud_region_tier.rs +++ b/sdks/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 { - /// Internet bandwidth (MB). - #[serde(rename = "bandwidth")] - pub bandwidth: i32, - /// CPU frequency (MHz). - #[serde(rename = "cpu")] - pub cpu: i32, - /// Allocated disk space (MB). - #[serde(rename = "disk")] - pub disk: i32, - /// Allocated memory (MB). - #[serde(rename = "memory")] - pub memory: 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, - /// Together with the numerator, denotes the portion of the CPU a given server uses. - #[serde(rename = "rivet_cores_denominator")] - pub rivet_cores_denominator: i32, - /// Together with the denominator, denotes the portion of the CPU a given server uses. - #[serde(rename = "rivet_cores_numerator")] - pub rivet_cores_numerator: 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, + /// Internet bandwidth (MB). + #[serde(rename = "bandwidth")] + pub bandwidth: i32, + /// CPU frequency (MHz). + #[serde(rename = "cpu")] + pub cpu: i32, + /// Allocated disk space (MB). + #[serde(rename = "disk")] + pub disk: i32, + /// Allocated memory (MB). + #[serde(rename = "memory")] + pub memory: 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, + /// Together with the numerator, denotes the portion of the CPU a given server uses. + #[serde(rename = "rivet_cores_denominator")] + pub rivet_cores_denominator: i32, + /// Together with the denominator, denotes the portion of the CPU a given server uses. + #[serde(rename = "rivet_cores_numerator")] + pub rivet_cores_numerator: 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, } impl CloudRegionTier { - /// A region server tier. - pub fn new(bandwidth: i32, cpu: i32, disk: i32, memory: i32, price_per_second: i32, rivet_cores_denominator: i32, rivet_cores_numerator: i32, tier_name_id: String) -> CloudRegionTier { - CloudRegionTier { - bandwidth, - cpu, - disk, - memory, - price_per_second, - rivet_cores_denominator, - rivet_cores_numerator, - tier_name_id, - } - } + /// A region server tier. + pub fn new( + bandwidth: i32, + cpu: i32, + disk: i32, + memory: i32, + price_per_second: i32, + rivet_cores_denominator: i32, + rivet_cores_numerator: i32, + tier_name_id: String, + ) -> CloudRegionTier { + CloudRegionTier { + bandwidth, + cpu, + disk, + memory, + price_per_second, + rivet_cores_denominator, + rivet_cores_numerator, + tier_name_id, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_region_tier_expenses.rs b/sdks/full/rust/src/models/cloud_region_tier_expenses.rs index 58daa9b4a1..84015024eb 100644 --- a/sdks/full/rust/src/models/cloud_region_tier_expenses.rs +++ b/sdks/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 { - /// Amount of expenses for this region tier (in hundred-thousandths USD, 100,000 = $1.00). - #[serde(rename = "expenses")] - pub expenses: f64, - /// 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 = "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, - /// 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, + /// 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 = "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, + /// How long a region tier has been active (in milliseconds). + #[serde(rename = "uptime")] + pub uptime: f64, } impl CloudRegionTierExpenses { - /// Region tier expenses. - pub fn new(expenses: f64, lobby_group_name_id: String, namespace_id: uuid::Uuid, region_id: uuid::Uuid, tier_name_id: String, uptime: f64) -> CloudRegionTierExpenses { - CloudRegionTierExpenses { - expenses, - lobby_group_name_id, - namespace_id, - region_id, - tier_name_id, - uptime, - } - } + /// Region tier expenses. + pub fn new( + expenses: f64, + lobby_group_name_id: String, + namespace_id: uuid::Uuid, + region_id: uuid::Uuid, + tier_name_id: String, + uptime: f64, + ) -> CloudRegionTierExpenses { + CloudRegionTierExpenses { + expenses, + lobby_group_name_id, + namespace_id, + region_id, + tier_name_id, + uptime, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_svc_metrics.rs b/sdks/full/rust/src/models/cloud_svc_metrics.rs index e4d5250626..a2fc995492 100644 --- a/sdks/full/rust/src/models/cloud_svc_metrics.rs +++ b/sdks/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 { - /// Total allocated memory (MB). - #[serde(rename = "allocated_memory", skip_serializing_if = "Option::is_none")] - pub allocated_memory: Option, - /// CPU metrics. - #[serde(rename = "cpu")] - pub cpu: Vec, - /// The job name. - #[serde(rename = "job")] - pub job: String, - /// 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, + /// CPU metrics. + #[serde(rename = "cpu")] + pub cpu: Vec, + /// The job name. + #[serde(rename = "job")] + pub job: String, + /// Memory metrics. + #[serde(rename = "memory")] + pub memory: Vec, } impl CloudSvcMetrics { - /// Metrics relating to a job service. - pub fn new(cpu: Vec, job: String, memory: Vec) -> CloudSvcMetrics { - CloudSvcMetrics { - allocated_memory: None, - cpu, - job, - memory, - } - } + /// Metrics relating to a job service. + pub fn new(cpu: Vec, job: String, memory: Vec) -> CloudSvcMetrics { + CloudSvcMetrics { + allocated_memory: None, + cpu, + job, + memory, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_svc_perf.rs b/sdks/full/rust/src/models/cloud_svc_perf.rs index 297dd08172..0baeb61ec9 100644 --- a/sdks/full/rust/src/models/cloud_svc_perf.rs +++ b/sdks/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 { - /// Unsigned 64 bit integer. - #[serde(rename = "duration")] - pub duration: i64, - /// A list of performance marks. - #[serde(rename = "marks")] - pub marks: Vec, - #[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, - /// 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, + /// A list of performance marks. + #[serde(rename = "marks")] + pub marks: Vec, + #[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, + /// The name of the service. + #[serde(rename = "svc_name")] + pub svc_name: String, + /// RFC3339 timestamp + #[serde(rename = "ts")] + pub ts: String, } impl CloudSvcPerf { - /// A service performance summary. - pub fn new(duration: i64, marks: Vec, spans: Vec, svc_name: String, ts: String) -> CloudSvcPerf { - CloudSvcPerf { - duration, - marks, - req_id: None, - spans, - svc_name, - ts, - } - } + /// A service performance summary. + pub fn new( + duration: i64, + marks: Vec, + spans: Vec, + svc_name: String, + ts: String, + ) -> CloudSvcPerf { + CloudSvcPerf { + duration, + marks, + req_id: None, + spans, + svc_name, + ts, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_universal_region.rs b/sdks/full/rust/src/models/cloud_universal_region.rs index 33d71d0238..eadba68d59 100644 --- a/sdks/full/rust/src/models/cloud_universal_region.rs +++ b/sdks/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/full/rust/src/models/cloud_validate_group_request.rs b/sdks/full/rust/src/models/cloud_validate_group_request.rs index 998146bdce..394c6fea71 100644 --- a/sdks/full/rust/src/models/cloud_validate_group_request.rs +++ b/sdks/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/full/rust/src/models/cloud_validate_group_response.rs b/sdks/full/rust/src/models/cloud_validate_group_response.rs index 285d7b19c9..a36a8f15c4 100644 --- a/sdks/full/rust/src/models/cloud_validate_group_response.rs +++ b/sdks/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/full/rust/src/models/cloud_version_cdn_config.rs b/sdks/full/rust/src/models/cloud_version_cdn_config.rs index 4d3fabb0cf..5d4109fac7 100644 --- a/sdks/full/rust/src/models/cloud_version_cdn_config.rs +++ b/sdks/full/rust/src/models/cloud_version_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 */ /// CloudVersionCdnConfig : CDN configuration for a given version. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionCdnConfig { - /// _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_env", skip_serializing_if = "Option::is_none")] - pub build_env: Option<::std::collections::HashMap>, - /// _Configures Rivet CLI behavior. Has no effect on server behavior._ - #[serde(rename = "build_output", skip_serializing_if = "Option::is_none")] - pub build_output: Option, - /// Multiple CDN version routes. - #[serde(rename = "routes", skip_serializing_if = "Option::is_none")] - pub routes: Option>, - #[serde(rename = "site_id", skip_serializing_if = "Option::is_none")] - pub site_id: 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_env", skip_serializing_if = "Option::is_none")] + pub build_env: Option<::std::collections::HashMap>, + /// _Configures Rivet CLI behavior. Has no effect on server behavior._ + #[serde(rename = "build_output", skip_serializing_if = "Option::is_none")] + pub build_output: Option, + /// Multiple CDN version routes. + #[serde(rename = "routes", skip_serializing_if = "Option::is_none")] + pub routes: Option>, + #[serde(rename = "site_id", skip_serializing_if = "Option::is_none")] + pub site_id: Option, } impl CloudVersionCdnConfig { - /// CDN configuration for a given version. - pub fn new() -> CloudVersionCdnConfig { - CloudVersionCdnConfig { - build_command: None, - build_env: None, - build_output: None, - routes: None, - site_id: None, - } - } + /// CDN configuration for a given version. + pub fn new() -> CloudVersionCdnConfig { + CloudVersionCdnConfig { + build_command: None, + build_env: None, + build_output: None, + routes: None, + site_id: None, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_version_cdn_custom_headers_middleware.rs b/sdks/full/rust/src/models/cloud_version_cdn_custom_headers_middleware.rs index edcab304b2..7c6210fdfc 100644 --- a/sdks/full/rust/src/models/cloud_version_cdn_custom_headers_middleware.rs +++ b/sdks/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/full/rust/src/models/cloud_version_cdn_header.rs b/sdks/full/rust/src/models/cloud_version_cdn_header.rs index c588c07e13..6dd05a9aa5 100644 --- a/sdks/full/rust/src/models/cloud_version_cdn_header.rs +++ b/sdks/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/full/rust/src/models/cloud_version_cdn_middleware.rs b/sdks/full/rust/src/models/cloud_version_cdn_middleware.rs index 3a4f78a4b7..f7e81e7509 100644 --- a/sdks/full/rust/src/models/cloud_version_cdn_middleware.rs +++ b/sdks/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/full/rust/src/models/cloud_version_cdn_middleware_kind.rs b/sdks/full/rust/src/models/cloud_version_cdn_middleware_kind.rs index ef872cbb4d..cc2c743870 100644 --- a/sdks/full/rust/src/models/cloud_version_cdn_middleware_kind.rs +++ b/sdks/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/full/rust/src/models/cloud_version_cdn_route.rs b/sdks/full/rust/src/models/cloud_version_cdn_route.rs index 5498d95a48..ca1df1edf1 100644 --- a/sdks/full/rust/src/models/cloud_version_cdn_route.rs +++ b/sdks/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, - /// Multiple CDN version middleware. - #[serde(rename = "middlewares")] - pub middlewares: Vec, - /// Unsigned 32 bit integer. - #[serde(rename = "priority")] - pub priority: i32, + #[serde(rename = "glob")] + pub glob: String, + /// Multiple CDN version middleware. + #[serde(rename = "middlewares")] + pub middlewares: Vec, + /// Unsigned 32 bit integer. + #[serde(rename = "priority")] + pub priority: i32, } impl CloudVersionCdnRoute { - pub fn new(glob: String, middlewares: Vec, priority: i32) -> CloudVersionCdnRoute { - CloudVersionCdnRoute { - glob, - middlewares, - priority, - } - } + pub fn new( + glob: String, + middlewares: Vec, + priority: i32, + ) -> CloudVersionCdnRoute { + CloudVersionCdnRoute { + glob, + middlewares, + priority, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_version_config.rs b/sdks/full/rust/src/models/cloud_version_config.rs index 7815efc02b..e0ca93ee8c 100644 --- a/sdks/full/rust/src/models/cloud_version_config.rs +++ b/sdks/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 = "cdn", skip_serializing_if = "Option::is_none")] - pub cdn: Option>, - #[serde(rename = "engine", skip_serializing_if = "Option::is_none")] - pub engine: Option>, - #[serde(rename = "identity", skip_serializing_if = "Option::is_none")] - pub identity: Option>, - /// KV configuration for a given version. - #[serde(rename = "kv", skip_serializing_if = "Option::is_none")] - pub kv: Option, - #[serde(rename = "matchmaker", skip_serializing_if = "Option::is_none")] - pub matchmaker: Option>, - #[serde(rename = "scripts", skip_serializing_if = "Option::is_none")] - pub scripts: Option<::std::collections::HashMap>, + #[serde(rename = "cdn", skip_serializing_if = "Option::is_none")] + pub cdn: Option>, + #[serde(rename = "engine", skip_serializing_if = "Option::is_none")] + pub engine: Option>, + #[serde(rename = "identity", skip_serializing_if = "Option::is_none")] + pub identity: Option>, + /// KV configuration for a given version. + #[serde(rename = "kv", skip_serializing_if = "Option::is_none")] + pub kv: Option, + #[serde(rename = "matchmaker", skip_serializing_if = "Option::is_none")] + pub matchmaker: Option>, + #[serde(rename = "scripts", skip_serializing_if = "Option::is_none")] + pub scripts: Option<::std::collections::HashMap>, } impl CloudVersionConfig { - /// Cloud configuration for a given version. - pub fn new() -> CloudVersionConfig { - CloudVersionConfig { - cdn: None, - engine: None, - identity: None, - kv: None, - matchmaker: None, - scripts: None, - } - } + /// Cloud configuration for a given version. + pub fn new() -> CloudVersionConfig { + CloudVersionConfig { + cdn: None, + engine: None, + identity: None, + kv: None, + matchmaker: None, + scripts: None, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_version_engine_config.rs b/sdks/full/rust/src/models/cloud_version_engine_config.rs index 19c6114c49..b15e0422f0 100644 --- a/sdks/full/rust/src/models/cloud_version_engine_config.rs +++ b/sdks/full/rust/src/models/cloud_version_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 CloudVersionEngineConfig { - #[serde(rename = "custom", skip_serializing_if = "Option::is_none")] - pub custom: 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 = "unity", skip_serializing_if = "Option::is_none")] - pub unity: Option, - #[serde(rename = "unreal", skip_serializing_if = "Option::is_none")] - pub unreal: Option>, + #[serde(rename = "custom", skip_serializing_if = "Option::is_none")] + pub custom: 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 = "unity", skip_serializing_if = "Option::is_none")] + pub unity: Option, + #[serde(rename = "unreal", skip_serializing_if = "Option::is_none")] + pub unreal: Option>, } impl CloudVersionEngineConfig { - pub fn new() -> CloudVersionEngineConfig { - CloudVersionEngineConfig { - custom: None, - godot: None, - html5: None, - unity: None, - unreal: None, - } - } + pub fn new() -> CloudVersionEngineConfig { + CloudVersionEngineConfig { + custom: None, + godot: None, + html5: None, + unity: None, + unreal: None, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_version_engine_unreal_config.rs b/sdks/full/rust/src/models/cloud_version_engine_unreal_config.rs index 82c3f11211..c3305e692d 100644 --- a/sdks/full/rust/src/models/cloud_version_engine_unreal_config.rs +++ b/sdks/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/full/rust/src/models/cloud_version_full.rs b/sdks/full/rust/src/models/cloud_version_full.rs index 05edda9dd6..c4ee85004b 100644 --- a/sdks/full/rust/src/models/cloud_version_full.rs +++ b/sdks/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 = "config")] - pub config: Box, - /// 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, + #[serde(rename = "config")] + pub config: Box, + /// 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, } impl CloudVersionFull { - /// A full version. - pub fn new(config: crate::models::CloudVersionConfig, create_ts: String, display_name: String, version_id: uuid::Uuid) -> CloudVersionFull { - CloudVersionFull { - config: Box::new(config), - create_ts, - display_name, - version_id, - } - } + /// A full version. + pub fn new( + config: crate::models::CloudVersionConfig, + create_ts: String, + display_name: String, + version_id: uuid::Uuid, + ) -> CloudVersionFull { + CloudVersionFull { + config: Box::new(config), + create_ts, + display_name, + version_id, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_version_identity_config.rs b/sdks/full/rust/src/models/cloud_version_identity_config.rs index 386a7ddc70..37202c1264 100644 --- a/sdks/full/rust/src/models/cloud_version_identity_config.rs +++ b/sdks/full/rust/src/models/cloud_version_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 */ /// CloudVersionIdentityConfig : **Deprecated** Identity configuration for a given version. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionIdentityConfig { - /// **Deprecated** - #[serde(rename = "avatars", skip_serializing_if = "Option::is_none")] - pub avatars: Option>, - /// **Deprecated** - #[serde(rename = "custom_avatars", skip_serializing_if = "Option::is_none")] - pub custom_avatars: Option>, - /// **Deprecated** - #[serde(rename = "custom_display_names", skip_serializing_if = "Option::is_none")] - pub custom_display_names: 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_avatars", skip_serializing_if = "Option::is_none")] + pub custom_avatars: Option>, + /// **Deprecated** + #[serde( + rename = "custom_display_names", + skip_serializing_if = "Option::is_none" + )] + pub custom_display_names: Option>, + /// **Deprecated** + #[serde(rename = "display_names", skip_serializing_if = "Option::is_none")] + pub display_names: Option>, } impl CloudVersionIdentityConfig { - /// **Deprecated** Identity configuration for a given version. - pub fn new() -> CloudVersionIdentityConfig { - CloudVersionIdentityConfig { - avatars: None, - custom_avatars: None, - custom_display_names: None, - display_names: None, - } - } + /// **Deprecated** Identity configuration for a given version. + pub fn new() -> CloudVersionIdentityConfig { + CloudVersionIdentityConfig { + avatars: None, + custom_avatars: None, + custom_display_names: None, + display_names: None, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_version_identity_custom_avatar.rs b/sdks/full/rust/src/models/cloud_version_identity_custom_avatar.rs index f096ebc61c..c6a502ad7d 100644 --- a/sdks/full/rust/src/models/cloud_version_identity_custom_avatar.rs +++ b/sdks/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/full/rust/src/models/cloud_version_identity_custom_display_name.rs b/sdks/full/rust/src/models/cloud_version_identity_custom_display_name.rs index 8c4087fc33..9f0a4efd38 100644 --- a/sdks/full/rust/src/models/cloud_version_identity_custom_display_name.rs +++ b/sdks/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/full/rust/src/models/cloud_version_matchmaker_captcha.rs b/sdks/full/rust/src/models/cloud_version_matchmaker_captcha.rs index 8db17cc3f6..c90d667142 100644 --- a/sdks/full/rust/src/models/cloud_version_matchmaker_captcha.rs +++ b/sdks/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 { - #[serde(rename = "hcaptcha", skip_serializing_if = "Option::is_none")] - pub hcaptcha: 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, - #[serde(rename = "turnstile", skip_serializing_if = "Option::is_none")] - pub turnstile: Option>, - /// 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>, + /// 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, + #[serde(rename = "turnstile", skip_serializing_if = "Option::is_none")] + pub turnstile: Option>, + /// 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, } impl CloudVersionMatchmakerCaptcha { - /// Matchmaker captcha configuration. - pub fn new(requests_before_reverify: i32, verification_ttl: i64) -> CloudVersionMatchmakerCaptcha { - CloudVersionMatchmakerCaptcha { - hcaptcha: None, - requests_before_reverify, - turnstile: None, - verification_ttl, - } - } + /// Matchmaker captcha configuration. + pub fn new( + requests_before_reverify: i32, + verification_ttl: i64, + ) -> CloudVersionMatchmakerCaptcha { + CloudVersionMatchmakerCaptcha { + hcaptcha: None, + requests_before_reverify, + turnstile: None, + verification_ttl, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_version_matchmaker_captcha_hcaptcha.rs b/sdks/full/rust/src/models/cloud_version_matchmaker_captcha_hcaptcha.rs index 3154536904..8cee8814fd 100644 --- a/sdks/full/rust/src/models/cloud_version_matchmaker_captcha_hcaptcha.rs +++ b/sdks/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, - /// Secret key for your hCaptcha application. Must be set. - #[serde(rename = "secret_key", skip_serializing_if = "Option::is_none")] - pub secret_key: Option, - /// Site key for your hCaptcha application. Must be set. - #[serde(rename = "site_key", skip_serializing_if = "Option::is_none")] - pub site_key: Option, + #[serde(rename = "level", skip_serializing_if = "Option::is_none")] + pub level: Option, + /// Secret key for your hCaptcha application. Must be set. + #[serde(rename = "secret_key", skip_serializing_if = "Option::is_none")] + pub secret_key: Option, + /// Site key for your hCaptcha application. Must be set. + #[serde(rename = "site_key", skip_serializing_if = "Option::is_none")] + pub site_key: Option, } impl CloudVersionMatchmakerCaptchaHcaptcha { - /// hCpatcha configuration. - pub fn new() -> CloudVersionMatchmakerCaptchaHcaptcha { - CloudVersionMatchmakerCaptchaHcaptcha { - level: None, - secret_key: None, - site_key: None, - } - } + /// hCpatcha configuration. + pub fn new() -> CloudVersionMatchmakerCaptchaHcaptcha { + CloudVersionMatchmakerCaptchaHcaptcha { + level: None, + secret_key: None, + site_key: None, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_version_matchmaker_captcha_hcaptcha_level.rs b/sdks/full/rust/src/models/cloud_version_matchmaker_captcha_hcaptcha_level.rs index 8eb4d54577..42679b8cd0 100644 --- a/sdks/full/rust/src/models/cloud_version_matchmaker_captcha_hcaptcha_level.rs +++ b/sdks/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/full/rust/src/models/cloud_version_matchmaker_captcha_turnstile.rs b/sdks/full/rust/src/models/cloud_version_matchmaker_captcha_turnstile.rs index f4b1412810..bd7d314c8f 100644 --- a/sdks/full/rust/src/models/cloud_version_matchmaker_captcha_turnstile.rs +++ b/sdks/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 = "secret_key")] - pub secret_key: String, - #[serde(rename = "site_key")] - pub site_key: String, + #[serde(rename = "secret_key")] + pub secret_key: String, + #[serde(rename = "site_key")] + pub site_key: String, } impl CloudVersionMatchmakerCaptchaTurnstile { - /// Turnstile captcha configuration. - pub fn new(secret_key: String, site_key: String) -> CloudVersionMatchmakerCaptchaTurnstile { - CloudVersionMatchmakerCaptchaTurnstile { - secret_key, - site_key, - } - } + /// Turnstile captcha configuration. + pub fn new(secret_key: String, site_key: String) -> CloudVersionMatchmakerCaptchaTurnstile { + CloudVersionMatchmakerCaptchaTurnstile { + secret_key, + site_key, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_version_matchmaker_config.rs b/sdks/full/rust/src/models/cloud_version_matchmaker_config.rs index 407acf78b8..d3e793b84b 100644 --- a/sdks/full/rust/src/models/cloud_version_matchmaker_config.rs +++ b/sdks/full/rust/src/models/cloud_version_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 */ /// CloudVersionMatchmakerConfig : Matchmaker configuration for a given version. - - #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct CloudVersionMatchmakerConfig { - #[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 = "docker", skip_serializing_if = "Option::is_none")] - pub docker: 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 = "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>, - #[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 = "regions", skip_serializing_if = "Option::is_none")] - pub regions: Option<::std::collections::HashMap>, - #[serde(rename = "tier", skip_serializing_if = "Option::is_none")] - pub tier: Option, + #[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 = "docker", skip_serializing_if = "Option::is_none")] + pub docker: 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 = "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>, + #[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 = "regions", skip_serializing_if = "Option::is_none")] + pub regions: Option< + ::std::collections::HashMap, + >, + #[serde(rename = "tier", skip_serializing_if = "Option::is_none")] + pub tier: Option, } impl CloudVersionMatchmakerConfig { - /// Matchmaker configuration for a given version. - pub fn new() -> CloudVersionMatchmakerConfig { - CloudVersionMatchmakerConfig { - captcha: None, - dev_hostname: None, - docker: None, - game_modes: None, - idle_lobbies: None, - lobby_groups: None, - max_players: None, - max_players_direct: None, - max_players_party: None, - regions: None, - tier: None, - } - } + /// Matchmaker configuration for a given version. + pub fn new() -> CloudVersionMatchmakerConfig { + CloudVersionMatchmakerConfig { + captcha: None, + dev_hostname: None, + docker: None, + game_modes: None, + idle_lobbies: None, + lobby_groups: None, + max_players: None, + max_players_direct: None, + max_players_party: None, + regions: None, + tier: None, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_version_matchmaker_game_mode.rs b/sdks/full/rust/src/models/cloud_version_matchmaker_game_mode.rs index 07698268ca..5e4bb6c0cf 100644 --- a/sdks/full/rust/src/models/cloud_version_matchmaker_game_mode.rs +++ b/sdks/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 = "actions", skip_serializing_if = "Option::is_none")] - pub actions: Option>, - #[serde(rename = "allow_dynamic_max_players", skip_serializing_if = "Option::is_none")] - pub allow_dynamic_max_players: Option, - #[serde(rename = "docker", skip_serializing_if = "Option::is_none")] - pub docker: Option>, - #[serde(rename = "idle_lobbies", skip_serializing_if = "Option::is_none")] - pub idle_lobbies: Option>, - #[serde(rename = "listable", skip_serializing_if = "Option::is_none")] - pub listable: Option, - #[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 = "regions", skip_serializing_if = "Option::is_none")] - pub regions: Option<::std::collections::HashMap>, - #[serde(rename = "taggable", skip_serializing_if = "Option::is_none")] - pub taggable: Option, - #[serde(rename = "tier", skip_serializing_if = "Option::is_none")] - pub tier: Option, + #[serde(rename = "actions", skip_serializing_if = "Option::is_none")] + pub actions: Option>, + #[serde( + rename = "allow_dynamic_max_players", + skip_serializing_if = "Option::is_none" + )] + pub allow_dynamic_max_players: Option, + #[serde(rename = "docker", skip_serializing_if = "Option::is_none")] + pub docker: Option>, + #[serde(rename = "idle_lobbies", skip_serializing_if = "Option::is_none")] + pub idle_lobbies: Option>, + #[serde(rename = "listable", skip_serializing_if = "Option::is_none")] + pub listable: Option, + #[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 = "regions", skip_serializing_if = "Option::is_none")] + pub regions: Option< + ::std::collections::HashMap, + >, + #[serde(rename = "taggable", skip_serializing_if = "Option::is_none")] + pub taggable: Option, + #[serde(rename = "tier", skip_serializing_if = "Option::is_none")] + pub tier: Option, } impl CloudVersionMatchmakerGameMode { - /// A game mode. - pub fn new() -> CloudVersionMatchmakerGameMode { - CloudVersionMatchmakerGameMode { - actions: None, - allow_dynamic_max_players: None, - docker: None, - idle_lobbies: None, - listable: None, - max_players: None, - max_players_direct: None, - max_players_party: None, - regions: None, - taggable: None, - tier: None, - } - } + /// A game mode. + pub fn new() -> CloudVersionMatchmakerGameMode { + CloudVersionMatchmakerGameMode { + actions: None, + allow_dynamic_max_players: None, + docker: None, + idle_lobbies: None, + listable: None, + max_players: None, + max_players_direct: None, + max_players_party: None, + regions: None, + taggable: None, + tier: None, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_version_matchmaker_game_mode_actions.rs b/sdks/full/rust/src/models/cloud_version_matchmaker_game_mode_actions.rs index 3a1e7c4258..d6690de743 100644 --- a/sdks/full/rust/src/models/cloud_version_matchmaker_game_mode_actions.rs +++ b/sdks/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 = "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>, + #[serde(rename = "find", skip_serializing_if = "Option::is_none")] + pub find: Option>, + #[serde(rename = "join", skip_serializing_if = "Option::is_none")] + pub join: Option>, } impl CloudVersionMatchmakerGameModeActions { - /// Configuration for the connection types allowed for a game mode. - pub fn new() -> CloudVersionMatchmakerGameModeActions { - CloudVersionMatchmakerGameModeActions { - create: None, - find: None, - join: None, - } - } + /// Configuration for the connection types allowed for a game mode. + pub fn new() -> CloudVersionMatchmakerGameModeActions { + CloudVersionMatchmakerGameModeActions { + create: None, + find: None, + join: None, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_version_matchmaker_game_mode_create_config.rs b/sdks/full/rust/src/models/cloud_version_matchmaker_game_mode_create_config.rs index de1ecfcea3..85d3896fc4 100644 --- a/sdks/full/rust/src/models/cloud_version_matchmaker_game_mode_create_config.rs +++ b/sdks/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 { - /// Defaults to true when unset. - #[serde(rename = "enable_private", skip_serializing_if = "Option::is_none")] - pub enable_private: Option, - /// Defaults to false when unset. - #[serde(rename = "enable_public", skip_serializing_if = "Option::is_none")] - pub enable_public: 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, - /// **Deprecated** - #[serde(rename = "max_lobbies_per_identity", skip_serializing_if = "Option::is_none")] - pub max_lobbies_per_identity: Option, - #[serde(rename = "verification", skip_serializing_if = "Option::is_none")] - pub verification: Option>, + /// Defaults to true when unset. + #[serde(rename = "enable_private", skip_serializing_if = "Option::is_none")] + pub enable_private: Option, + /// Defaults to false when unset. + #[serde(rename = "enable_public", skip_serializing_if = "Option::is_none")] + pub enable_public: 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, + /// **Deprecated** + #[serde( + rename = "max_lobbies_per_identity", + skip_serializing_if = "Option::is_none" + )] + pub max_lobbies_per_identity: Option, + #[serde(rename = "verification", skip_serializing_if = "Option::is_none")] + pub verification: 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 { - enable_private: None, - enable_public: None, - enabled, - identity_requirement: None, - max_lobbies_per_identity: None, - verification: 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 { + enable_private: None, + enable_public: None, + enabled, + identity_requirement: None, + max_lobbies_per_identity: None, + verification: None, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_version_matchmaker_game_mode_find_config.rs b/sdks/full/rust/src/models/cloud_version_matchmaker_game_mode_find_config.rs index 93bbfc3fcf..983711b3e0 100644 --- a/sdks/full/rust/src/models/cloud_version_matchmaker_game_mode_find_config.rs +++ b/sdks/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/full/rust/src/models/cloud_version_matchmaker_game_mode_identity_requirement.rs b/sdks/full/rust/src/models/cloud_version_matchmaker_game_mode_identity_requirement.rs index e72e5b25a9..230ae04efa 100644 --- a/sdks/full/rust/src/models/cloud_version_matchmaker_game_mode_identity_requirement.rs +++ b/sdks/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/full/rust/src/models/cloud_version_matchmaker_game_mode_idle_lobbies_config.rs b/sdks/full/rust/src/models/cloud_version_matchmaker_game_mode_idle_lobbies_config.rs index 0b4bea341e..27d347bf86 100644 --- a/sdks/full/rust/src/models/cloud_version_matchmaker_game_mode_idle_lobbies_config.rs +++ b/sdks/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 = "max")] - pub max: i32, - #[serde(rename = "min")] - pub min: i32, + #[serde(rename = "max")] + pub max: i32, + #[serde(rename = "min")] + pub min: i32, } impl CloudVersionMatchmakerGameModeIdleLobbiesConfig { - /// Configuration for how many idle lobbies a game version should have. - pub fn new(max: i32, min: i32) -> CloudVersionMatchmakerGameModeIdleLobbiesConfig { - CloudVersionMatchmakerGameModeIdleLobbiesConfig { - max, - min, - } - } + /// Configuration for how many idle lobbies a game version should have. + pub fn new(max: i32, min: i32) -> CloudVersionMatchmakerGameModeIdleLobbiesConfig { + CloudVersionMatchmakerGameModeIdleLobbiesConfig { max, min } + } } - - diff --git a/sdks/full/rust/src/models/cloud_version_matchmaker_game_mode_join_config.rs b/sdks/full/rust/src/models/cloud_version_matchmaker_game_mode_join_config.rs index 471835d937..59c3612561 100644 --- a/sdks/full/rust/src/models/cloud_version_matchmaker_game_mode_join_config.rs +++ b/sdks/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/full/rust/src/models/cloud_version_matchmaker_game_mode_region.rs b/sdks/full/rust/src/models/cloud_version_matchmaker_game_mode_region.rs index bb1c3aa23d..61aa12558a 100644 --- a/sdks/full/rust/src/models/cloud_version_matchmaker_game_mode_region.rs +++ b/sdks/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 = "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>, + #[serde(rename = "tier", skip_serializing_if = "Option::is_none")] + pub tier: Option, } impl CloudVersionMatchmakerGameModeRegion { - /// A game mode region. - pub fn new() -> CloudVersionMatchmakerGameModeRegion { - CloudVersionMatchmakerGameModeRegion { - idle_lobbies: None, - tier: None, - } - } + /// A game mode region. + pub fn new() -> CloudVersionMatchmakerGameModeRegion { + CloudVersionMatchmakerGameModeRegion { + idle_lobbies: None, + tier: None, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_version_matchmaker_game_mode_runtime_docker.rs b/sdks/full/rust/src/models/cloud_version_matchmaker_game_mode_runtime_docker.rs index d94ccdb29f..9ad013bdaa 100644 --- a/sdks/full/rust/src/models/cloud_version_matchmaker_game_mode_runtime_docker.rs +++ b/sdks/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 { - #[serde(rename = "args", skip_serializing_if = "Option::is_none")] - pub args: 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 = "dockerfile", skip_serializing_if = "Option::is_none")] - pub dockerfile: Option, - #[serde(rename = "env", skip_serializing_if = "Option::is_none")] - pub env: 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 = "network_mode", skip_serializing_if = "Option::is_none")] - pub network_mode: Option, - #[serde(rename = "ports", skip_serializing_if = "Option::is_none")] - pub ports: Option<::std::collections::HashMap>, + #[serde(rename = "args", skip_serializing_if = "Option::is_none")] + pub args: 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 = "dockerfile", skip_serializing_if = "Option::is_none")] + pub dockerfile: Option, + #[serde(rename = "env", skip_serializing_if = "Option::is_none")] + pub env: 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 = "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 { - args: None, - build_args: None, - dockerfile: None, - env: None, - image: None, - image_id: None, - network_mode: None, - ports: None, - } - } + /// A game mode runtime running through Docker. + pub fn new() -> CloudVersionMatchmakerGameModeRuntimeDocker { + CloudVersionMatchmakerGameModeRuntimeDocker { + args: None, + build_args: None, + dockerfile: None, + env: None, + image: None, + image_id: None, + network_mode: None, + ports: None, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_version_matchmaker_game_mode_runtime_docker_port.rs b/sdks/full/rust/src/models/cloud_version_matchmaker_game_mode_runtime_docker_port.rs index 27660b0f01..6a61b5ca41 100644 --- a/sdks/full/rust/src/models/cloud_version_matchmaker_game_mode_runtime_docker_port.rs +++ b/sdks/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 { - /// _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, + /// 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, } impl CloudVersionMatchmakerGameModeRuntimeDockerPort { - /// Port config for a docker build. - pub fn new() -> CloudVersionMatchmakerGameModeRuntimeDockerPort { - CloudVersionMatchmakerGameModeRuntimeDockerPort { - dev_port: None, - dev_port_range: None, - dev_protocol: None, - port: None, - port_range: None, - protocol: None, - proxy: None, - } - } + /// Port config for a docker build. + pub fn new() -> CloudVersionMatchmakerGameModeRuntimeDockerPort { + CloudVersionMatchmakerGameModeRuntimeDockerPort { + dev_port: None, + dev_port_range: None, + dev_protocol: None, + port: None, + port_range: None, + protocol: None, + proxy: None, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_version_matchmaker_game_mode_verification_config.rs b/sdks/full/rust/src/models/cloud_version_matchmaker_game_mode_verification_config.rs index 306ca5d409..2311a9be1c 100644 --- a/sdks/full/rust/src/models/cloud_version_matchmaker_game_mode_verification_config.rs +++ b/sdks/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 = "headers")] - pub headers: ::std::collections::HashMap, - #[serde(rename = "url")] - pub url: String, + #[serde(rename = "headers")] + pub headers: ::std::collections::HashMap, + #[serde(rename = "url")] + pub url: String, } 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(headers: ::std::collections::HashMap, url: String) -> CloudVersionMatchmakerGameModeVerificationConfig { - CloudVersionMatchmakerGameModeVerificationConfig { - headers, - url, - } - } + /// 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( + headers: ::std::collections::HashMap, + url: String, + ) -> CloudVersionMatchmakerGameModeVerificationConfig { + CloudVersionMatchmakerGameModeVerificationConfig { headers, url } + } } - - diff --git a/sdks/full/rust/src/models/cloud_version_matchmaker_lobby_group.rs b/sdks/full/rust/src/models/cloud_version_matchmaker_lobby_group.rs index fdc1f740a4..ec57cf0ed4 100644 --- a/sdks/full/rust/src/models/cloud_version_matchmaker_lobby_group.rs +++ b/sdks/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 { - /// Unsigned 32 bit integer. - #[serde(rename = "max_players_direct")] - pub max_players_direct: i32, - /// Unsigned 32 bit integer. - #[serde(rename = "max_players_normal")] - pub max_players_normal: i32, - /// Unsigned 32 bit integer. - #[serde(rename = "max_players_party")] - pub max_players_party: i32, - /// **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, - #[serde(rename = "runtime")] - pub runtime: Box, + /// Unsigned 32 bit integer. + #[serde(rename = "max_players_direct")] + pub max_players_direct: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "max_players_normal")] + pub max_players_normal: i32, + /// Unsigned 32 bit integer. + #[serde(rename = "max_players_party")] + pub max_players_party: i32, + /// **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, + #[serde(rename = "runtime")] + pub runtime: Box, } impl CloudVersionMatchmakerLobbyGroup { - /// A game mode. - pub fn new(max_players_direct: i32, max_players_normal: i32, max_players_party: i32, name_id: String, regions: Vec, runtime: crate::models::CloudVersionMatchmakerLobbyGroupRuntime) -> CloudVersionMatchmakerLobbyGroup { - CloudVersionMatchmakerLobbyGroup { - max_players_direct, - max_players_normal, - max_players_party, - name_id, - regions, - runtime: Box::new(runtime), - } - } + /// A game mode. + pub fn new( + max_players_direct: i32, + max_players_normal: i32, + max_players_party: i32, + name_id: String, + regions: Vec, + runtime: crate::models::CloudVersionMatchmakerLobbyGroupRuntime, + ) -> CloudVersionMatchmakerLobbyGroup { + CloudVersionMatchmakerLobbyGroup { + max_players_direct, + max_players_normal, + max_players_party, + name_id, + regions, + runtime: Box::new(runtime), + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_version_matchmaker_lobby_group_idle_lobbies_config.rs b/sdks/full/rust/src/models/cloud_version_matchmaker_lobby_group_idle_lobbies_config.rs index f6a1279fe0..f956cf2423 100644 --- a/sdks/full/rust/src/models/cloud_version_matchmaker_lobby_group_idle_lobbies_config.rs +++ b/sdks/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 = "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, + /// Unsigned 32 bit integer. + #[serde(rename = "min_idle_lobbies")] + pub min_idle_lobbies: i32, } impl CloudVersionMatchmakerLobbyGroupIdleLobbiesConfig { - /// **Deprecated: use GameMode instead** Configuration for how many idle lobbies a game version should have. - pub fn new(max_idle_lobbies: i32, min_idle_lobbies: i32) -> CloudVersionMatchmakerLobbyGroupIdleLobbiesConfig { - CloudVersionMatchmakerLobbyGroupIdleLobbiesConfig { - max_idle_lobbies, - min_idle_lobbies, - } - } + /// **Deprecated: use GameMode instead** Configuration for how many idle lobbies a game version should have. + pub fn new( + max_idle_lobbies: i32, + min_idle_lobbies: i32, + ) -> CloudVersionMatchmakerLobbyGroupIdleLobbiesConfig { + CloudVersionMatchmakerLobbyGroupIdleLobbiesConfig { + max_idle_lobbies, + min_idle_lobbies, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_version_matchmaker_lobby_group_region.rs b/sdks/full/rust/src/models/cloud_version_matchmaker_lobby_group_region.rs index fd8dd5d457..3ac192f979 100644 --- a/sdks/full/rust/src/models/cloud_version_matchmaker_lobby_group_region.rs +++ b/sdks/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 = "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>, + #[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, } impl CloudVersionMatchmakerLobbyGroupRegion { - /// **Deprecated: use GameMode instead** A game mode region. - pub fn new(region_id: uuid::Uuid, tier_name_id: String) -> CloudVersionMatchmakerLobbyGroupRegion { - CloudVersionMatchmakerLobbyGroupRegion { - idle_lobbies: None, - region_id, - tier_name_id, - } - } + /// **Deprecated: use GameMode instead** A game mode region. + pub fn new( + region_id: uuid::Uuid, + tier_name_id: String, + ) -> CloudVersionMatchmakerLobbyGroupRegion { + CloudVersionMatchmakerLobbyGroupRegion { + idle_lobbies: None, + region_id, + tier_name_id, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_version_matchmaker_lobby_group_runtime.rs b/sdks/full/rust/src/models/cloud_version_matchmaker_lobby_group_runtime.rs index 1c6df44b6c..c8c5d51a73 100644 --- a/sdks/full/rust/src/models/cloud_version_matchmaker_lobby_group_runtime.rs +++ b/sdks/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/full/rust/src/models/cloud_version_matchmaker_lobby_group_runtime_docker.rs b/sdks/full/rust/src/models/cloud_version_matchmaker_lobby_group_runtime_docker.rs index 3b7abf858c..23e51de78b 100644 --- a/sdks/full/rust/src/models/cloud_version_matchmaker_lobby_group_runtime_docker.rs +++ b/sdks/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 = "args")] - pub args: Vec, - #[serde(rename = "build_id", skip_serializing_if = "Option::is_none")] - pub build_id: Option, - #[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 = "args")] + pub args: Vec, + #[serde(rename = "build_id", skip_serializing_if = "Option::is_none")] + pub build_id: Option, + #[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 { - args, - build_id: None, - 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 { + args, + build_id: None, + env_vars, + network_mode: None, + ports, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_version_matchmaker_lobby_group_runtime_docker_env_var.rs b/sdks/full/rust/src/models/cloud_version_matchmaker_lobby_group_runtime_docker_env_var.rs index 7deb9e1a6e..3c7c8a6d0e 100644 --- a/sdks/full/rust/src/models/cloud_version_matchmaker_lobby_group_runtime_docker_env_var.rs +++ b/sdks/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/full/rust/src/models/cloud_version_matchmaker_lobby_group_runtime_docker_port.rs b/sdks/full/rust/src/models/cloud_version_matchmaker_lobby_group_runtime_docker_port.rs index 33e4251a44..e9e71af610 100644 --- a/sdks/full/rust/src/models/cloud_version_matchmaker_lobby_group_runtime_docker_port.rs +++ b/sdks/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, - #[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 port number to connect to. - #[serde(rename = "target_port", skip_serializing_if = "Option::is_none")] - pub target_port: Option, + /// The label of this docker port. + #[serde(rename = "label")] + pub label: String, + #[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 port number to connect to. + #[serde(rename = "target_port", skip_serializing_if = "Option::is_none")] + pub target_port: Option, } impl CloudVersionMatchmakerLobbyGroupRuntimeDockerPort { - /// **Deprecated: use GameMode instead** A docker port. - pub fn new(label: String, proxy_protocol: crate::models::CloudVersionMatchmakerPortProtocol) -> CloudVersionMatchmakerLobbyGroupRuntimeDockerPort { - CloudVersionMatchmakerLobbyGroupRuntimeDockerPort { - label, - port_range: None, - proxy_protocol, - target_port: None, - } - } + /// **Deprecated: use GameMode instead** A docker port. + pub fn new( + label: String, + proxy_protocol: crate::models::CloudVersionMatchmakerPortProtocol, + ) -> CloudVersionMatchmakerLobbyGroupRuntimeDockerPort { + CloudVersionMatchmakerLobbyGroupRuntimeDockerPort { + label, + port_range: None, + proxy_protocol, + target_port: None, + } + } } - - diff --git a/sdks/full/rust/src/models/cloud_version_matchmaker_network_mode.rs b/sdks/full/rust/src/models/cloud_version_matchmaker_network_mode.rs index 01ac9c3c9e..9622bea2bd 100644 --- a/sdks/full/rust/src/models/cloud_version_matchmaker_network_mode.rs +++ b/sdks/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/full/rust/src/models/cloud_version_matchmaker_port_protocol.rs b/sdks/full/rust/src/models/cloud_version_matchmaker_port_protocol.rs index 50d9809f63..c051284dec 100644 --- a/sdks/full/rust/src/models/cloud_version_matchmaker_port_protocol.rs +++ b/sdks/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/full/rust/src/models/cloud_version_matchmaker_port_range.rs b/sdks/full/rust/src/models/cloud_version_matchmaker_port_range.rs index 97b716690d..d79b40a65c 100644 --- a/sdks/full/rust/src/models/cloud_version_matchmaker_port_range.rs +++ b/sdks/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 = "max")] - pub max: i32, - /// 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, } 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(max: i32, min: i32) -> CloudVersionMatchmakerPortRange { - CloudVersionMatchmakerPortRange { - max, - min, - } - } + /// 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(max: i32, min: i32) -> CloudVersionMatchmakerPortRange { + CloudVersionMatchmakerPortRange { max, min } + } } - - diff --git a/sdks/full/rust/src/models/cloud_version_matchmaker_proxy_kind.rs b/sdks/full/rust/src/models/cloud_version_matchmaker_proxy_kind.rs index f2d1f0de49..f102ccd44e 100644 --- a/sdks/full/rust/src/models/cloud_version_matchmaker_proxy_kind.rs +++ b/sdks/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/full/rust/src/models/cloud_version_summary.rs b/sdks/full/rust/src/models/cloud_version_summary.rs index 52f47690d2..d0b9e99e48 100644 --- a/sdks/full/rust/src/models/cloud_version_summary.rs +++ b/sdks/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 { - /// 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, + #[serde(rename = "version_id")] + pub version_id: uuid::Uuid, } impl CloudVersionSummary { - /// A version summary. - pub fn new(create_ts: String, display_name: String, version_id: uuid::Uuid) -> CloudVersionSummary { - CloudVersionSummary { - create_ts, - display_name, - version_id, - } - } + /// A version summary. + pub fn new( + create_ts: String, + display_name: String, + version_id: uuid::Uuid, + ) -> CloudVersionSummary { + CloudVersionSummary { + create_ts, + display_name, + version_id, + } + } } - - diff --git a/sdks/full/rust/src/models/error_body.rs b/sdks/full/rust/src/models/error_body.rs index 1ad1d62334..eccffc0d94 100644 --- a/sdks/full/rust/src/models/error_body.rs +++ b/sdks/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 = "documentation", skip_serializing_if = "Option::is_none")] - pub documentation: Option, - #[serde(rename = "message")] - pub message: String, - /// 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 = "ray_id")] - pub ray_id: String, + #[serde(rename = "code")] + pub code: String, + #[serde(rename = "documentation", skip_serializing_if = "Option::is_none")] + pub documentation: Option, + #[serde(rename = "message")] + pub message: String, + /// 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 = "ray_id")] + pub ray_id: String, } impl ErrorBody { - pub fn new(code: String, message: String, ray_id: String) -> ErrorBody { - ErrorBody { - code, - documentation: None, - message, - metadata: None, - ray_id, - } - } + pub fn new(code: String, message: String, ray_id: String) -> ErrorBody { + ErrorBody { + code, + documentation: None, + message, + metadata: None, + ray_id, + } + } } - - diff --git a/sdks/full/rust/src/models/game_handle.rs b/sdks/full/rust/src/models/game_handle.rs index 346a1b6a6e..930e573ccc 100644 --- a/sdks/full/rust/src/models/game_handle.rs +++ b/sdks/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 { - /// The URL of this game's banner image. - #[serde(rename = "banner_url", skip_serializing_if = "Option::is_none")] - pub banner_url: Option, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "game_id")] - pub game_id: uuid::Uuid, - /// The URL of this game's logo image. - #[serde(rename = "logo_url", skip_serializing_if = "Option::is_none")] - pub logo_url: Option, - /// 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, + /// The URL of this game's banner image. + #[serde(rename = "banner_url", skip_serializing_if = "Option::is_none")] + pub banner_url: Option, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "game_id")] + pub game_id: uuid::Uuid, + /// The URL of this game's logo image. + #[serde(rename = "logo_url", skip_serializing_if = "Option::is_none")] + pub logo_url: Option, + /// 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, } impl GameHandle { - pub fn new(display_name: String, game_id: uuid::Uuid, name_id: String) -> GameHandle { - GameHandle { - banner_url: None, - display_name, - game_id, - logo_url: None, - name_id, - } - } + pub fn new(display_name: String, game_id: uuid::Uuid, name_id: String) -> GameHandle { + GameHandle { + banner_url: None, + display_name, + game_id, + logo_url: None, + name_id, + } + } } - - diff --git a/sdks/full/rust/src/models/game_leaderboard_category.rs b/sdks/full/rust/src/models/game_leaderboard_category.rs index 29cb86fe4e..187d93ebe0 100644 --- a/sdks/full/rust/src/models/game_leaderboard_category.rs +++ b/sdks/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/full/rust/src/models/game_platform_link.rs b/sdks/full/rust/src/models/game_platform_link.rs index f8a8591e22..7b117be70c 100644 --- a/sdks/full/rust/src/models/game_platform_link.rs +++ b/sdks/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/full/rust/src/models/game_profile.rs b/sdks/full/rust/src/models/game_profile.rs index 4fd3a3dfdb..97e790e6e7 100644 --- a/sdks/full/rust/src/models/game_profile.rs +++ b/sdks/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 { - /// The URL of this game's banner image. - #[serde(rename = "banner_url", skip_serializing_if = "Option::is_none")] - pub banner_url: Option, - /// A description of the given game. - #[serde(rename = "description")] - pub description: String, - #[serde(rename = "developer")] - pub developer: Box, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "game_id")] - pub game_id: uuid::Uuid, - /// A list of game leaderboard categories. - #[serde(rename = "group_leaderboard_categories")] - pub group_leaderboard_categories: Vec, - /// A list of game leaderboard categories. - #[serde(rename = "identity_leaderboard_categories")] - pub identity_leaderboard_categories: Vec, - /// The URL of this game's logo image. - #[serde(rename = "logo_url", skip_serializing_if = "Option::is_none")] - pub logo_url: Option, - /// 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 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 tags. - #[serde(rename = "tags")] - pub tags: Vec, - /// The URL to this game's website. - #[serde(rename = "url")] - pub url: String, + /// The URL of this game's banner image. + #[serde(rename = "banner_url", skip_serializing_if = "Option::is_none")] + pub banner_url: Option, + /// A description of the given game. + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "developer")] + pub developer: Box, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "game_id")] + pub game_id: uuid::Uuid, + /// A list of game leaderboard categories. + #[serde(rename = "group_leaderboard_categories")] + pub group_leaderboard_categories: Vec, + /// A list of game leaderboard categories. + #[serde(rename = "identity_leaderboard_categories")] + pub identity_leaderboard_categories: Vec, + /// The URL of this game's logo image. + #[serde(rename = "logo_url", skip_serializing_if = "Option::is_none")] + pub logo_url: Option, + /// 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 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 tags. + #[serde(rename = "tags")] + pub tags: Vec, + /// The URL to this game's website. + #[serde(rename = "url")] + pub url: String, } impl GameProfile { - /// A game profile. - pub fn new(description: String, developer: crate::models::GroupSummary, display_name: String, game_id: uuid::Uuid, group_leaderboard_categories: Vec, identity_leaderboard_categories: Vec, name_id: String, platforms: Vec, recommended_groups: Vec, tags: Vec, url: String) -> GameProfile { - GameProfile { - banner_url: None, - description, - developer: Box::new(developer), - display_name, - game_id, - group_leaderboard_categories, - identity_leaderboard_categories, - logo_url: None, - name_id, - platforms, - recommended_groups, - tags, - url, - } - } + /// A game profile. + pub fn new( + description: String, + developer: crate::models::GroupSummary, + display_name: String, + game_id: uuid::Uuid, + group_leaderboard_categories: Vec, + identity_leaderboard_categories: Vec, + name_id: String, + platforms: Vec, + recommended_groups: Vec, + tags: Vec, + url: String, + ) -> GameProfile { + GameProfile { + banner_url: None, + description, + developer: Box::new(developer), + display_name, + game_id, + group_leaderboard_categories, + identity_leaderboard_categories, + logo_url: None, + name_id, + platforms, + recommended_groups, + tags, + url, + } + } } - - diff --git a/sdks/full/rust/src/models/game_stat.rs b/sdks/full/rust/src/models/game_stat.rs index d9fbbfe2d1..ddc881a2fb 100644 --- a/sdks/full/rust/src/models/game_stat.rs +++ b/sdks/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/full/rust/src/models/game_stat_aggregation_method.rs b/sdks/full/rust/src/models/game_stat_aggregation_method.rs index 7f11571aa2..6f39077c88 100644 --- a/sdks/full/rust/src/models/game_stat_aggregation_method.rs +++ b/sdks/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/full/rust/src/models/game_stat_config.rs b/sdks/full/rust/src/models/game_stat_config.rs index f9c47ec3b2..6df69b3d04 100644 --- a/sdks/full/rust/src/models/game_stat_config.rs +++ b/sdks/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 = "aggregation")] - pub aggregation: crate::models::GameStatAggregationMethod, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "format")] - pub format: crate::models::GameStatFormatMethod, - #[serde(rename = "icon_id")] - pub icon_id: uuid::Uuid, - /// 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 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 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, - /// 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, - #[serde(rename = "priority")] - pub priority: i32, - #[serde(rename = "record_id")] - pub record_id: uuid::Uuid, - #[serde(rename = "sorting")] - pub sorting: crate::models::GameStatSortingMethod, + #[serde(rename = "aggregation")] + pub aggregation: crate::models::GameStatAggregationMethod, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "format")] + pub format: crate::models::GameStatFormatMethod, + #[serde(rename = "icon_id")] + pub icon_id: uuid::Uuid, + /// 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 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 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, + /// 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, + #[serde(rename = "priority")] + pub priority: i32, + #[serde(rename = "record_id")] + pub record_id: uuid::Uuid, + #[serde(rename = "sorting")] + pub sorting: crate::models::GameStatSortingMethod, } impl GameStatConfig { - /// A game statistic config. - pub fn new(aggregation: crate::models::GameStatAggregationMethod, display_name: String, format: crate::models::GameStatFormatMethod, icon_id: uuid::Uuid, priority: i32, record_id: uuid::Uuid, sorting: crate::models::GameStatSortingMethod) -> GameStatConfig { - GameStatConfig { - aggregation, - display_name, - format, - icon_id, - postfix_plural: None, - postfix_singular: None, - prefix_plural: None, - prefix_singular: None, - priority, - record_id, - sorting, - } - } + /// A game statistic config. + pub fn new( + aggregation: crate::models::GameStatAggregationMethod, + display_name: String, + format: crate::models::GameStatFormatMethod, + icon_id: uuid::Uuid, + priority: i32, + record_id: uuid::Uuid, + sorting: crate::models::GameStatSortingMethod, + ) -> GameStatConfig { + GameStatConfig { + aggregation, + display_name, + format, + icon_id, + postfix_plural: None, + postfix_singular: None, + prefix_plural: None, + prefix_singular: None, + priority, + record_id, + sorting, + } + } } - - diff --git a/sdks/full/rust/src/models/game_stat_format_method.rs b/sdks/full/rust/src/models/game_stat_format_method.rs index 7340afdf6e..bbeb74d568 100644 --- a/sdks/full/rust/src/models/game_stat_format_method.rs +++ b/sdks/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/full/rust/src/models/game_stat_sorting_method.rs b/sdks/full/rust/src/models/game_stat_sorting_method.rs index 695fcf70a6..88fdf54b02 100644 --- a/sdks/full/rust/src/models/game_stat_sorting_method.rs +++ b/sdks/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/full/rust/src/models/game_stat_summary.rs b/sdks/full/rust/src/models/game_stat_summary.rs index 1d1a267675..443355d4ce 100644 --- a/sdks/full/rust/src/models/game_stat_summary.rs +++ b/sdks/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/full/rust/src/models/game_summary.rs b/sdks/full/rust/src/models/game_summary.rs index 88d337f3db..61e9ec4f4c 100644 --- a/sdks/full/rust/src/models/game_summary.rs +++ b/sdks/full/rust/src/models/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 GameSummary { - /// The URL of this game's banner image. - #[serde(rename = "banner_url", skip_serializing_if = "Option::is_none")] - pub banner_url: Option, - #[serde(rename = "developer")] - pub developer: Box, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "game_id")] - pub game_id: uuid::Uuid, - /// The URL of this game's logo image. - #[serde(rename = "logo_url", skip_serializing_if = "Option::is_none")] - pub logo_url: Option, - /// 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, - /// Unsigned 32 bit integer. - #[serde(rename = "total_player_count")] - pub total_player_count: i32, - #[serde(rename = "url")] - pub url: String, + /// The URL of this game's banner image. + #[serde(rename = "banner_url", skip_serializing_if = "Option::is_none")] + pub banner_url: Option, + #[serde(rename = "developer")] + pub developer: Box, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "game_id")] + pub game_id: uuid::Uuid, + /// The URL of this game's logo image. + #[serde(rename = "logo_url", skip_serializing_if = "Option::is_none")] + pub logo_url: Option, + /// 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, + /// Unsigned 32 bit integer. + #[serde(rename = "total_player_count")] + pub total_player_count: i32, + #[serde(rename = "url")] + pub url: String, } impl GameSummary { - pub fn new(developer: crate::models::GroupHandle, display_name: String, game_id: uuid::Uuid, name_id: String, total_player_count: i32, url: String) -> GameSummary { - GameSummary { - banner_url: None, - developer: Box::new(developer), - display_name, - game_id, - logo_url: None, - name_id, - total_player_count, - url, - } - } + pub fn new( + developer: crate::models::GroupHandle, + display_name: String, + game_id: uuid::Uuid, + name_id: String, + total_player_count: i32, + url: String, + ) -> GameSummary { + GameSummary { + banner_url: None, + developer: Box::new(developer), + display_name, + game_id, + logo_url: None, + name_id, + total_player_count, + url, + } + } } - - diff --git a/sdks/full/rust/src/models/games_environments_create_service_token_response.rs b/sdks/full/rust/src/models/games_environments_create_service_token_response.rs index fb7f482fce..f139fee460 100644 --- a/sdks/full/rust/src/models/games_environments_create_service_token_response.rs +++ b/sdks/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/full/rust/src/models/geo_coord.rs b/sdks/full/rust/src/models/geo_coord.rs index 6ebb7e3346..54c01a7bfb 100644 --- a/sdks/full/rust/src/models/geo_coord.rs +++ b/sdks/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/full/rust/src/models/geo_distance.rs b/sdks/full/rust/src/models/geo_distance.rs index 19b1f82bf0..d4373b1057 100644 --- a/sdks/full/rust/src/models/geo_distance.rs +++ b/sdks/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/full/rust/src/models/global_event_notification.rs b/sdks/full/rust/src/models/global_event_notification.rs index d0ff0d22ee..242c904a7b 100644 --- a/sdks/full/rust/src/models/global_event_notification.rs +++ b/sdks/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 = "description")] - pub description: String, - #[serde(rename = "thumbnail_url")] - pub thumbnail_url: String, - #[serde(rename = "title")] - pub title: String, - #[serde(rename = "url")] - pub url: String, + #[serde(rename = "description")] + pub description: String, + #[serde(rename = "thumbnail_url")] + pub thumbnail_url: String, + #[serde(rename = "title")] + pub title: String, + #[serde(rename = "url")] + pub url: String, } impl GlobalEventNotification { - pub fn new(description: String, thumbnail_url: String, title: String, url: String) -> GlobalEventNotification { - GlobalEventNotification { - description, - thumbnail_url, - title, - url, - } - } + pub fn new( + description: String, + thumbnail_url: String, + title: String, + url: String, + ) -> GlobalEventNotification { + GlobalEventNotification { + description, + thumbnail_url, + title, + url, + } + } } - - diff --git a/sdks/full/rust/src/models/group_banned_identity.rs b/sdks/full/rust/src/models/group_banned_identity.rs index 2e552da163..429b9368a4 100644 --- a/sdks/full/rust/src/models/group_banned_identity.rs +++ b/sdks/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 { - /// 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, + #[serde(rename = "identity")] + pub identity: Box, } impl GroupBannedIdentity { - /// A banned identity. - pub fn new(ban_ts: String, identity: crate::models::IdentityHandle) -> GroupBannedIdentity { - GroupBannedIdentity { - ban_ts, - identity: Box::new(identity), - } - } + /// A banned identity. + pub fn new(ban_ts: String, identity: crate::models::IdentityHandle) -> GroupBannedIdentity { + GroupBannedIdentity { + ban_ts, + identity: Box::new(identity), + } + } } - - diff --git a/sdks/full/rust/src/models/group_consume_invite_response.rs b/sdks/full/rust/src/models/group_consume_invite_response.rs index fe68dce2b4..ac423b29e5 100644 --- a/sdks/full/rust/src/models/group_consume_invite_response.rs +++ b/sdks/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/full/rust/src/models/group_create_invite_request.rs b/sdks/full/rust/src/models/group_create_invite_request.rs index c4a59e94e5..2c19fd9fd0 100644 --- a/sdks/full/rust/src/models/group_create_invite_request.rs +++ b/sdks/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/full/rust/src/models/group_create_invite_response.rs b/sdks/full/rust/src/models/group_create_invite_response.rs index 47edeb56b1..adf04e61e5 100644 --- a/sdks/full/rust/src/models/group_create_invite_response.rs +++ b/sdks/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/full/rust/src/models/group_create_request.rs b/sdks/full/rust/src/models/group_create_request.rs index 503c9ce897..1ee55bb191 100644 --- a/sdks/full/rust/src/models/group_create_request.rs +++ b/sdks/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/full/rust/src/models/group_create_response.rs b/sdks/full/rust/src/models/group_create_response.rs index f31960ece8..ea200e8016 100644 --- a/sdks/full/rust/src/models/group_create_response.rs +++ b/sdks/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/full/rust/src/models/group_external_links.rs b/sdks/full/rust/src/models/group_external_links.rs index b9e0f15885..6ae7c869c8 100644 --- a/sdks/full/rust/src/models/group_external_links.rs +++ b/sdks/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/full/rust/src/models/group_get_bans_response.rs b/sdks/full/rust/src/models/group_get_bans_response.rs index b2727d9fa0..5db580a07d 100644 --- a/sdks/full/rust/src/models/group_get_bans_response.rs +++ b/sdks/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 { - /// The pagination anchor. - #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] - pub anchor: Option, - /// A list of banned group members. - #[serde(rename = "banned_identities")] - pub banned_identities: Vec, - #[serde(rename = "watch")] - pub watch: Box, + /// The pagination anchor. + #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] + pub anchor: Option, + /// A list of banned group members. + #[serde(rename = "banned_identities")] + pub banned_identities: Vec, + #[serde(rename = "watch")] + pub watch: Box, } impl GroupGetBansResponse { - pub fn new(banned_identities: Vec, watch: crate::models::WatchResponse) -> GroupGetBansResponse { - GroupGetBansResponse { - anchor: None, - banned_identities, - watch: Box::new(watch), - } - } + pub fn new( + banned_identities: Vec, + watch: crate::models::WatchResponse, + ) -> GroupGetBansResponse { + GroupGetBansResponse { + anchor: None, + banned_identities, + watch: Box::new(watch), + } + } } - - diff --git a/sdks/full/rust/src/models/group_get_invite_response.rs b/sdks/full/rust/src/models/group_get_invite_response.rs index caead9d125..eb18e86d3c 100644 --- a/sdks/full/rust/src/models/group_get_invite_response.rs +++ b/sdks/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/full/rust/src/models/group_get_join_requests_response.rs b/sdks/full/rust/src/models/group_get_join_requests_response.rs index 62988ed18c..c9f9ac37e7 100644 --- a/sdks/full/rust/src/models/group_get_join_requests_response.rs +++ b/sdks/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 { - /// The pagination anchor. - #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] - pub anchor: Option, - /// A list of group join requests. - #[serde(rename = "join_requests")] - pub join_requests: Vec, - #[serde(rename = "watch")] - pub watch: Box, + /// The pagination anchor. + #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] + pub anchor: Option, + /// A list of group join requests. + #[serde(rename = "join_requests")] + pub join_requests: Vec, + #[serde(rename = "watch")] + pub watch: Box, } impl GroupGetJoinRequestsResponse { - pub fn new(join_requests: Vec, watch: crate::models::WatchResponse) -> GroupGetJoinRequestsResponse { - GroupGetJoinRequestsResponse { - anchor: None, - join_requests, - watch: Box::new(watch), - } - } + pub fn new( + join_requests: Vec, + watch: crate::models::WatchResponse, + ) -> GroupGetJoinRequestsResponse { + GroupGetJoinRequestsResponse { + anchor: None, + join_requests, + watch: Box::new(watch), + } + } } - - diff --git a/sdks/full/rust/src/models/group_get_members_response.rs b/sdks/full/rust/src/models/group_get_members_response.rs index 7b4917659c..c79310751f 100644 --- a/sdks/full/rust/src/models/group_get_members_response.rs +++ b/sdks/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 { - /// The pagination anchor. - #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] - pub anchor: Option, - /// A list of group members. - #[serde(rename = "members")] - pub members: Vec, - #[serde(rename = "watch")] - pub watch: Box, + /// The pagination anchor. + #[serde(rename = "anchor", skip_serializing_if = "Option::is_none")] + pub anchor: Option, + /// A list of group members. + #[serde(rename = "members")] + pub members: Vec, + #[serde(rename = "watch")] + pub watch: Box, } impl GroupGetMembersResponse { - pub fn new(members: Vec, watch: crate::models::WatchResponse) -> GroupGetMembersResponse { - GroupGetMembersResponse { - anchor: None, - members, - watch: Box::new(watch), - } - } + pub fn new( + members: Vec, + watch: crate::models::WatchResponse, + ) -> GroupGetMembersResponse { + GroupGetMembersResponse { + anchor: None, + members, + watch: Box::new(watch), + } + } } - - diff --git a/sdks/full/rust/src/models/group_get_profile_response.rs b/sdks/full/rust/src/models/group_get_profile_response.rs index d89ac68b35..9aba3fa350 100644 --- a/sdks/full/rust/src/models/group_get_profile_response.rs +++ b/sdks/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/full/rust/src/models/group_get_summary_response.rs b/sdks/full/rust/src/models/group_get_summary_response.rs index cc55fd9905..bdc9c75117 100644 --- a/sdks/full/rust/src/models/group_get_summary_response.rs +++ b/sdks/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::GroupSummary) -> GroupGetSummaryResponse { - GroupGetSummaryResponse { - group: Box::new(group), - } - } + pub fn new(group: crate::models::GroupSummary) -> GroupGetSummaryResponse { + GroupGetSummaryResponse { + group: Box::new(group), + } + } } - - diff --git a/sdks/full/rust/src/models/group_handle.rs b/sdks/full/rust/src/models/group_handle.rs index 6aed5a1bfa..e0dc00ee00 100644 --- a/sdks/full/rust/src/models/group_handle.rs +++ b/sdks/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 { - /// The URL of this group's avatar image - #[serde(rename = "avatar_url", skip_serializing_if = "Option::is_none")] - pub avatar_url: Option, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "external")] - pub external: Box, - #[serde(rename = "group_id")] - pub group_id: uuid::Uuid, - /// Whether or not this group is a developer group. - #[serde(rename = "is_developer", skip_serializing_if = "Option::is_none")] - pub is_developer: Option, + /// The URL of this group's avatar image + #[serde(rename = "avatar_url", skip_serializing_if = "Option::is_none")] + pub avatar_url: Option, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "external")] + pub external: Box, + #[serde(rename = "group_id")] + pub group_id: uuid::Uuid, + /// 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(display_name: String, external: crate::models::GroupExternalLinks, group_id: uuid::Uuid) -> GroupHandle { - GroupHandle { - avatar_url: None, - display_name, - external: Box::new(external), - group_id, - is_developer: None, - } - } + /// A group handle. + pub fn new( + display_name: String, + external: crate::models::GroupExternalLinks, + group_id: uuid::Uuid, + ) -> GroupHandle { + GroupHandle { + avatar_url: None, + display_name, + external: Box::new(external), + group_id, + is_developer: None, + } + } } - - diff --git a/sdks/full/rust/src/models/group_join_request.rs b/sdks/full/rust/src/models/group_join_request.rs index 64edb19238..b75c57750f 100644 --- a/sdks/full/rust/src/models/group_join_request.rs +++ b/sdks/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/full/rust/src/models/group_list_suggested_response.rs b/sdks/full/rust/src/models/group_list_suggested_response.rs index 2fe41ffa8e..31296a5b52 100644 --- a/sdks/full/rust/src/models/group_list_suggested_response.rs +++ b/sdks/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/full/rust/src/models/group_member.rs b/sdks/full/rust/src/models/group_member.rs index aecd0ba064..99ae2414ef 100644 --- a/sdks/full/rust/src/models/group_member.rs +++ b/sdks/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/full/rust/src/models/group_prepare_avatar_upload_request.rs b/sdks/full/rust/src/models/group_prepare_avatar_upload_request.rs index e07a49db68..676cff4a9a 100644 --- a/sdks/full/rust/src/models/group_prepare_avatar_upload_request.rs +++ b/sdks/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 { - /// Unsigned 64 bit integer. - #[serde(rename = "content_length")] - pub content_length: i64, - /// The MIME type of the group avatar. - #[serde(rename = "mime", skip_serializing_if = "Option::is_none")] - pub mime: Option, - /// The path/filename of the group avatar. - #[serde(rename = "path")] - pub path: String, + /// Unsigned 64 bit integer. + #[serde(rename = "content_length")] + pub content_length: i64, + /// The MIME type of the group avatar. + #[serde(rename = "mime", skip_serializing_if = "Option::is_none")] + pub mime: Option, + /// The path/filename of the group avatar. + #[serde(rename = "path")] + pub path: String, } impl GroupPrepareAvatarUploadRequest { - pub fn new(content_length: i64, path: String) -> GroupPrepareAvatarUploadRequest { - GroupPrepareAvatarUploadRequest { - content_length, - mime: None, - path, - } - } + pub fn new(content_length: i64, path: String) -> GroupPrepareAvatarUploadRequest { + GroupPrepareAvatarUploadRequest { + content_length, + mime: None, + path, + } + } } - - diff --git a/sdks/full/rust/src/models/group_prepare_avatar_upload_response.rs b/sdks/full/rust/src/models/group_prepare_avatar_upload_response.rs index 4917e80c8d..04f10e7ac7 100644 --- a/sdks/full/rust/src/models/group_prepare_avatar_upload_response.rs +++ b/sdks/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 = "presigned_request")] - pub presigned_request: Box, - #[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, } impl GroupPrepareAvatarUploadResponse { - pub fn new(presigned_request: crate::models::UploadPresignedRequest, upload_id: uuid::Uuid) -> GroupPrepareAvatarUploadResponse { - GroupPrepareAvatarUploadResponse { - presigned_request: Box::new(presigned_request), - upload_id, - } - } + pub fn new( + presigned_request: crate::models::UploadPresignedRequest, + upload_id: uuid::Uuid, + ) -> GroupPrepareAvatarUploadResponse { + GroupPrepareAvatarUploadResponse { + presigned_request: Box::new(presigned_request), + upload_id, + } + } } - - diff --git a/sdks/full/rust/src/models/group_profile.rs b/sdks/full/rust/src/models/group_profile.rs index c7ac6c1011..be6a629ebf 100644 --- a/sdks/full/rust/src/models/group_profile.rs +++ b/sdks/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 { - /// The URL of this group's avatar image. - #[serde(rename = "avatar_url", skip_serializing_if = "Option::is_none")] - pub avatar_url: Option, - /// Detailed information about a profile. - #[serde(rename = "bio")] - pub bio: String, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "external")] - pub external: Box, - #[serde(rename = "group_id")] - pub group_id: uuid::Uuid, - /// 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, - /// 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, - /// Whether or not this group is a developer. - #[serde(rename = "is_developer", skip_serializing_if = "Option::is_none")] - pub is_developer: Option, - /// A list of group join requests. - #[serde(rename = "join_requests")] - pub join_requests: Vec, - /// 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, - #[serde(rename = "owner_identity_id")] - pub owner_identity_id: uuid::Uuid, - #[serde(rename = "publicity")] - pub publicity: crate::models::GroupPublicity, + /// The URL of this group's avatar image. + #[serde(rename = "avatar_url", skip_serializing_if = "Option::is_none")] + pub avatar_url: Option, + /// Detailed information about a profile. + #[serde(rename = "bio")] + pub bio: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "external")] + pub external: Box, + #[serde(rename = "group_id")] + pub group_id: uuid::Uuid, + /// 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, + /// 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, + /// Whether or not this group is a developer. + #[serde(rename = "is_developer", skip_serializing_if = "Option::is_none")] + pub is_developer: Option, + /// A list of group join requests. + #[serde(rename = "join_requests")] + pub join_requests: Vec, + /// 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, + #[serde(rename = "owner_identity_id")] + pub owner_identity_id: uuid::Uuid, + #[serde(rename = "publicity")] + pub publicity: crate::models::GroupPublicity, } impl GroupProfile { - /// A list of group profiles. - pub fn new(bio: String, display_name: String, external: crate::models::GroupExternalLinks, group_id: uuid::Uuid, join_requests: Vec, members: Vec, owner_identity_id: uuid::Uuid, publicity: crate::models::GroupPublicity) -> GroupProfile { - GroupProfile { - avatar_url: None, - bio, - display_name, - external: Box::new(external), - group_id, - is_current_identity_member: None, - is_current_identity_requesting_join: None, - is_developer: None, - join_requests, - member_count: None, - members, - owner_identity_id, - publicity, - } - } + /// A list of group profiles. + pub fn new( + bio: String, + display_name: String, + external: crate::models::GroupExternalLinks, + group_id: uuid::Uuid, + join_requests: Vec, + members: Vec, + owner_identity_id: uuid::Uuid, + publicity: crate::models::GroupPublicity, + ) -> GroupProfile { + GroupProfile { + avatar_url: None, + bio, + display_name, + external: Box::new(external), + group_id, + is_current_identity_member: None, + is_current_identity_requesting_join: None, + is_developer: None, + join_requests, + member_count: None, + members, + owner_identity_id, + publicity, + } + } } - - diff --git a/sdks/full/rust/src/models/group_publicity.rs b/sdks/full/rust/src/models/group_publicity.rs index e8d758d80b..1e540fd925 100644 --- a/sdks/full/rust/src/models/group_publicity.rs +++ b/sdks/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/full/rust/src/models/group_resolve_join_request_request.rs b/sdks/full/rust/src/models/group_resolve_join_request_request.rs index 32c1e7fef7..79f4861803 100644 --- a/sdks/full/rust/src/models/group_resolve_join_request_request.rs +++ b/sdks/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/full/rust/src/models/group_summary.rs b/sdks/full/rust/src/models/group_summary.rs index 85ae0cfede..e153020a22 100644 --- a/sdks/full/rust/src/models/group_summary.rs +++ b/sdks/full/rust/src/models/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 GroupSummary { - /// The URL of this group's avatar image. - #[serde(rename = "avatar_url", skip_serializing_if = "Option::is_none")] - pub avatar_url: Option, - /// Follows regex ^(?:[^\\n\\r]+\\n?|\\n){1,5}$ - #[serde(rename = "bio")] - pub bio: String, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "external")] - pub external: Box, - #[serde(rename = "group_id")] - pub group_id: uuid::Uuid, - /// Whether or not the current identity is a member of this group. - #[serde(rename = "is_current_identity_member")] - pub is_current_identity_member: bool, - /// **Deprecated** Whether or not this group is a developer. - #[serde(rename = "is_developer")] - pub is_developer: bool, - #[serde(rename = "member_count")] - pub member_count: i32, - #[serde(rename = "owner_identity_id")] - pub owner_identity_id: uuid::Uuid, - #[serde(rename = "publicity")] - pub publicity: crate::models::GroupPublicity, + /// The URL of this group's avatar image. + #[serde(rename = "avatar_url", skip_serializing_if = "Option::is_none")] + pub avatar_url: Option, + /// Follows regex ^(?:[^\\n\\r]+\\n?|\\n){1,5}$ + #[serde(rename = "bio")] + pub bio: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "external")] + pub external: Box, + #[serde(rename = "group_id")] + pub group_id: uuid::Uuid, + /// Whether or not the current identity is a member of this group. + #[serde(rename = "is_current_identity_member")] + pub is_current_identity_member: bool, + /// **Deprecated** Whether or not this group is a developer. + #[serde(rename = "is_developer")] + pub is_developer: bool, + #[serde(rename = "member_count")] + pub member_count: i32, + #[serde(rename = "owner_identity_id")] + pub owner_identity_id: uuid::Uuid, + #[serde(rename = "publicity")] + pub publicity: crate::models::GroupPublicity, } impl GroupSummary { - pub fn new(bio: String, display_name: String, external: crate::models::GroupExternalLinks, group_id: uuid::Uuid, is_current_identity_member: bool, is_developer: bool, member_count: i32, owner_identity_id: uuid::Uuid, publicity: crate::models::GroupPublicity) -> GroupSummary { - GroupSummary { - avatar_url: None, - bio, - display_name, - external: Box::new(external), - group_id, - is_current_identity_member, - is_developer, - member_count, - owner_identity_id, - publicity, - } - } + pub fn new( + bio: String, + display_name: String, + external: crate::models::GroupExternalLinks, + group_id: uuid::Uuid, + is_current_identity_member: bool, + is_developer: bool, + member_count: i32, + owner_identity_id: uuid::Uuid, + publicity: crate::models::GroupPublicity, + ) -> GroupSummary { + GroupSummary { + avatar_url: None, + bio, + display_name, + external: Box::new(external), + group_id, + is_current_identity_member, + is_developer, + member_count, + owner_identity_id, + publicity, + } + } } - - diff --git a/sdks/full/rust/src/models/group_transfer_ownership_request.rs b/sdks/full/rust/src/models/group_transfer_ownership_request.rs index 39cbd20782..00711905d3 100644 --- a/sdks/full/rust/src/models/group_transfer_ownership_request.rs +++ b/sdks/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/full/rust/src/models/group_update_profile_request.rs b/sdks/full/rust/src/models/group_update_profile_request.rs index e8e7672df5..5e443ca780 100644 --- a/sdks/full/rust/src/models/group_update_profile_request.rs +++ b/sdks/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 { - /// Detailed information about a profile. - #[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 = "publicity", skip_serializing_if = "Option::is_none")] - pub publicity: Option, + /// Detailed information about a profile. + #[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 = "publicity", skip_serializing_if = "Option::is_none")] + pub publicity: Option, } impl GroupUpdateProfileRequest { - pub fn new() -> GroupUpdateProfileRequest { - GroupUpdateProfileRequest { - bio: None, - display_name: None, - publicity: None, - } - } + pub fn new() -> GroupUpdateProfileRequest { + GroupUpdateProfileRequest { + bio: None, + display_name: None, + publicity: None, + } + } } - - diff --git a/sdks/full/rust/src/models/group_validate_profile_request.rs b/sdks/full/rust/src/models/group_validate_profile_request.rs index 501acb5beb..9cd8de28c9 100644 --- a/sdks/full/rust/src/models/group_validate_profile_request.rs +++ b/sdks/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 = "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 = "publicity", skip_serializing_if = "Option::is_none")] - pub publicity: Option, + /// Represent a resource's readable display name. + #[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 = "publicity", skip_serializing_if = "Option::is_none")] + pub publicity: Option, } impl GroupValidateProfileRequest { - pub fn new() -> GroupValidateProfileRequest { - GroupValidateProfileRequest { - bio: None, - display_name: None, - publicity: None, - } - } + pub fn new() -> GroupValidateProfileRequest { + GroupValidateProfileRequest { + bio: None, + display_name: None, + publicity: None, + } + } } - - diff --git a/sdks/full/rust/src/models/group_validate_profile_response.rs b/sdks/full/rust/src/models/group_validate_profile_response.rs index decad7e290..794edc06d0 100644 --- a/sdks/full/rust/src/models/group_validate_profile_response.rs +++ b/sdks/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/full/rust/src/models/identity_dev_state.rs b/sdks/full/rust/src/models/identity_dev_state.rs index bfe9d673a4..b36d78c727 100644 --- a/sdks/full/rust/src/models/identity_dev_state.rs +++ b/sdks/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/full/rust/src/models/identity_email_linked_account.rs b/sdks/full/rust/src/models/identity_email_linked_account.rs index 6c458bb42f..a86d5eca1f 100644 --- a/sdks/full/rust/src/models/identity_email_linked_account.rs +++ b/sdks/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/full/rust/src/models/identity_external_links.rs b/sdks/full/rust/src/models/identity_external_links.rs index dddc3a0917..35a1d52d88 100644 --- a/sdks/full/rust/src/models/identity_external_links.rs +++ b/sdks/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/full/rust/src/models/identity_game_activity.rs b/sdks/full/rust/src/models/identity_game_activity.rs index e4be94ffcb..c2c874b53f 100644 --- a/sdks/full/rust/src/models/identity_game_activity.rs +++ b/sdks/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 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>, - /// 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>, + #[serde(rename = "game")] + pub game: Box, + /// A short activity message about the current game activity. + #[serde(rename = "message")] + pub message: String, + /// 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>, + /// 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>, } 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, - mutual_metadata: None, - public_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, + mutual_metadata: None, + public_metadata: None, + } + } } - - diff --git a/sdks/full/rust/src/models/identity_game_link_status.rs b/sdks/full/rust/src/models/identity_game_link_status.rs index 8fc24f518e..b9c9934697 100644 --- a/sdks/full/rust/src/models/identity_game_link_status.rs +++ b/sdks/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/full/rust/src/models/identity_get_handles_response.rs b/sdks/full/rust/src/models/identity_get_handles_response.rs index ddbb9f7a0a..ac8508481f 100644 --- a/sdks/full/rust/src/models/identity_get_handles_response.rs +++ b/sdks/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/full/rust/src/models/identity_get_profile_response.rs b/sdks/full/rust/src/models/identity_get_profile_response.rs index a1e34af613..77765e009b 100644 --- a/sdks/full/rust/src/models/identity_get_profile_response.rs +++ b/sdks/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/full/rust/src/models/identity_get_summaries_response.rs b/sdks/full/rust/src/models/identity_get_summaries_response.rs index bf83a8b651..42b328cd1f 100644 --- a/sdks/full/rust/src/models/identity_get_summaries_response.rs +++ b/sdks/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/full/rust/src/models/identity_global_event.rs b/sdks/full/rust/src/models/identity_global_event.rs index e3533a36a9..733befecce 100644 --- a/sdks/full/rust/src/models/identity_global_event.rs +++ b/sdks/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 { - #[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>, + /// RFC3339 timestamp + #[serde(rename = "ts")] + pub ts: String, } impl IdentityGlobalEvent { - /// An event relevant to the current identity. - pub fn new(kind: crate::models::IdentityGlobalEventKind, ts: String) -> IdentityGlobalEvent { - IdentityGlobalEvent { - kind: Box::new(kind), - notification: None, - ts, - } - } + /// An event relevant to the current identity. + pub fn new(kind: crate::models::IdentityGlobalEventKind, ts: String) -> IdentityGlobalEvent { + IdentityGlobalEvent { + kind: Box::new(kind), + notification: None, + ts, + } + } } - - diff --git a/sdks/full/rust/src/models/identity_global_event_identity_update.rs b/sdks/full/rust/src/models/identity_global_event_identity_update.rs index 5ccdc16e9f..0af36942a3 100644 --- a/sdks/full/rust/src/models/identity_global_event_identity_update.rs +++ b/sdks/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/full/rust/src/models/identity_global_event_kind.rs b/sdks/full/rust/src/models/identity_global_event_kind.rs index fab257077b..23f8447a1a 100644 --- a/sdks/full/rust/src/models/identity_global_event_kind.rs +++ b/sdks/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/full/rust/src/models/identity_global_event_notification.rs b/sdks/full/rust/src/models/identity_global_event_notification.rs index 8472601185..aa81ce7b00 100644 --- a/sdks/full/rust/src/models/identity_global_event_notification.rs +++ b/sdks/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 = "description")] - pub description: String, - /// URL to an image thumbnail that should be shown for this notification. - #[serde(rename = "thumbnail_url")] - pub thumbnail_url: String, - #[serde(rename = "title")] - pub title: String, - /// Rivet Hub URL that holds the relevant context for this notification. - #[serde(rename = "url")] - pub url: 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, + #[serde(rename = "title")] + pub title: 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(description: String, thumbnail_url: String, title: String, url: String) -> IdentityGlobalEventNotification { - IdentityGlobalEventNotification { - description, - thumbnail_url, - title, - 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( + description: String, + thumbnail_url: String, + title: String, + url: String, + ) -> IdentityGlobalEventNotification { + IdentityGlobalEventNotification { + description, + thumbnail_url, + title, + url, + } + } } - - diff --git a/sdks/full/rust/src/models/identity_group.rs b/sdks/full/rust/src/models/identity_group.rs index a280ad6ad2..2767ddae91 100644 --- a/sdks/full/rust/src/models/identity_group.rs +++ b/sdks/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/full/rust/src/models/identity_handle.rs b/sdks/full/rust/src/models/identity_handle.rs index aa3767fe0e..70c97f06d6 100644 --- a/sdks/full/rust/src/models/identity_handle.rs +++ b/sdks/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 = "account_number")] - pub account_number: i32, - /// The URL of this identity's avatar image. - #[serde(rename = "avatar_url")] - pub avatar_url: String, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "external")] - pub external: Box, - #[serde(rename = "identity_id")] - pub identity_id: uuid::Uuid, - /// Whether or not this identity is registered with a linked account. - #[serde(rename = "is_registered")] - pub is_registered: bool, + #[serde(rename = "account_number")] + pub account_number: i32, + /// The URL of this identity's avatar image. + #[serde(rename = "avatar_url")] + pub avatar_url: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "external")] + pub external: Box, + #[serde(rename = "identity_id")] + pub identity_id: uuid::Uuid, + /// Whether or not this identity is registered with a linked account. + #[serde(rename = "is_registered")] + pub is_registered: bool, } impl IdentityHandle { - /// An identity handle. - pub fn new(account_number: i32, avatar_url: String, display_name: String, external: crate::models::IdentityExternalLinks, identity_id: uuid::Uuid, is_registered: bool) -> IdentityHandle { - IdentityHandle { - account_number, - avatar_url, - display_name, - external: Box::new(external), - identity_id, - is_registered, - } - } + /// An identity handle. + pub fn new( + account_number: i32, + avatar_url: String, + display_name: String, + external: crate::models::IdentityExternalLinks, + identity_id: uuid::Uuid, + is_registered: bool, + ) -> IdentityHandle { + IdentityHandle { + account_number, + avatar_url, + display_name, + external: Box::new(external), + identity_id, + is_registered, + } + } } - - diff --git a/sdks/full/rust/src/models/identity_linked_account.rs b/sdks/full/rust/src/models/identity_linked_account.rs index b0f4f62dde..d262a579e7 100644 --- a/sdks/full/rust/src/models/identity_linked_account.rs +++ b/sdks/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 = "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, + #[serde(rename = "email", skip_serializing_if = "Option::is_none")] + pub email: Option>, } impl IdentityLinkedAccount { - /// A union representing an identity's linked accounts. - pub fn new() -> IdentityLinkedAccount { - IdentityLinkedAccount { - default_user: None, - email: None, - } - } + /// A union representing an identity's linked accounts. + pub fn new() -> IdentityLinkedAccount { + IdentityLinkedAccount { + default_user: None, + email: None, + } + } } - - diff --git a/sdks/full/rust/src/models/identity_list_activities_response.rs b/sdks/full/rust/src/models/identity_list_activities_response.rs index 373cbb29e5..c9f1f3edba 100644 --- a/sdks/full/rust/src/models/identity_list_activities_response.rs +++ b/sdks/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 = "games")] - pub games: Vec, - #[serde(rename = "identities")] - pub identities: 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 = "games")] + pub games: Vec, + #[serde(rename = "identities")] + pub identities: 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(games: Vec, identities: Vec, suggested_groups: Vec, suggested_players: Vec, watch: crate::models::WatchResponse) -> IdentityListActivitiesResponse { - IdentityListActivitiesResponse { - games, - identities, - suggested_groups, - suggested_players, - watch: Box::new(watch), - } - } + pub fn new( + games: Vec, + identities: Vec, + suggested_groups: Vec, + suggested_players: Vec, + watch: crate::models::WatchResponse, + ) -> IdentityListActivitiesResponse { + IdentityListActivitiesResponse { + games, + identities, + suggested_groups, + suggested_players, + watch: Box::new(watch), + } + } } - - diff --git a/sdks/full/rust/src/models/identity_prepare_avatar_upload_request.rs b/sdks/full/rust/src/models/identity_prepare_avatar_upload_request.rs index 89c23ec726..94c9b44fd6 100644 --- a/sdks/full/rust/src/models/identity_prepare_avatar_upload_request.rs +++ b/sdks/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 = "content_length")] - pub content_length: i64, - /// See https://www.iana.org/assignments/media-types/media-types.xhtml - #[serde(rename = "mime")] - pub mime: String, - #[serde(rename = "path")] - pub path: String, + #[serde(rename = "content_length")] + pub content_length: i64, + /// See https://www.iana.org/assignments/media-types/media-types.xhtml + #[serde(rename = "mime")] + pub mime: String, + #[serde(rename = "path")] + pub path: String, } impl IdentityPrepareAvatarUploadRequest { - pub fn new(content_length: i64, mime: String, path: String) -> IdentityPrepareAvatarUploadRequest { - IdentityPrepareAvatarUploadRequest { - content_length, - mime, - path, - } - } + pub fn new( + content_length: i64, + mime: String, + path: String, + ) -> IdentityPrepareAvatarUploadRequest { + IdentityPrepareAvatarUploadRequest { + content_length, + mime, + path, + } + } } - - diff --git a/sdks/full/rust/src/models/identity_prepare_avatar_upload_response.rs b/sdks/full/rust/src/models/identity_prepare_avatar_upload_response.rs index 756fdda3de..414223d33a 100644 --- a/sdks/full/rust/src/models/identity_prepare_avatar_upload_response.rs +++ b/sdks/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 = "presigned_request")] - pub presigned_request: Box, - #[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, } impl IdentityPrepareAvatarUploadResponse { - pub fn new(presigned_request: crate::models::UploadPresignedRequest, upload_id: uuid::Uuid) -> IdentityPrepareAvatarUploadResponse { - IdentityPrepareAvatarUploadResponse { - presigned_request: Box::new(presigned_request), - upload_id, - } - } + pub fn new( + presigned_request: crate::models::UploadPresignedRequest, + upload_id: uuid::Uuid, + ) -> IdentityPrepareAvatarUploadResponse { + IdentityPrepareAvatarUploadResponse { + presigned_request: Box::new(presigned_request), + upload_id, + } + } } - - diff --git a/sdks/full/rust/src/models/identity_profile.rs b/sdks/full/rust/src/models/identity_profile.rs index ef5de34586..cbc1644fa9 100644 --- a/sdks/full/rust/src/models/identity_profile.rs +++ b/sdks/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 = "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 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, - /// Follows regex ^(?:[^\\n\\r]+\\n?|\\n){1,5}$ - #[serde(rename = "bio")] - pub bio: String, - #[serde(rename = "dev_state", skip_serializing_if = "Option::is_none")] - pub dev_state: Option, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "external")] - pub external: Box, - #[serde(rename = "follower_count")] - pub follower_count: i64, - /// Whether or not the requestee's identity is following this identity. - #[serde(rename = "following")] - pub following: bool, - #[serde(rename = "following_count")] - pub following_count: i64, - #[serde(rename = "games")] - pub games: Vec, - #[serde(rename = "groups")] - pub groups: Vec, - #[serde(rename = "identity_id")] - pub identity_id: uuid::Uuid, - /// Whether or not this identity is an admin. - #[serde(rename = "is_admin")] - pub is_admin: 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, - /// 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 = "is_mutual_following")] - pub is_mutual_following: bool, - /// Whether or not this identity is registered with a linked account. - #[serde(rename = "is_registered")] - pub is_registered: bool, - /// RFC3339 timestamp - #[serde(rename = "join_ts")] - pub join_ts: String, - #[serde(rename = "linked_accounts")] - pub linked_accounts: Vec, + #[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 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, + /// Follows regex ^(?:[^\\n\\r]+\\n?|\\n){1,5}$ + #[serde(rename = "bio")] + pub bio: String, + #[serde(rename = "dev_state", skip_serializing_if = "Option::is_none")] + pub dev_state: Option, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "external")] + pub external: Box, + #[serde(rename = "follower_count")] + pub follower_count: i64, + /// Whether or not the requestee's identity is following this identity. + #[serde(rename = "following")] + pub following: bool, + #[serde(rename = "following_count")] + pub following_count: i64, + #[serde(rename = "games")] + pub games: Vec, + #[serde(rename = "groups")] + pub groups: Vec, + #[serde(rename = "identity_id")] + pub identity_id: uuid::Uuid, + /// Whether or not this identity is an admin. + #[serde(rename = "is_admin")] + pub is_admin: 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, + /// 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 = "is_mutual_following")] + pub is_mutual_following: bool, + /// Whether or not this identity is registered with a linked account. + #[serde(rename = "is_registered")] + pub is_registered: bool, + /// RFC3339 timestamp + #[serde(rename = "join_ts")] + pub join_ts: String, + #[serde(rename = "linked_accounts")] + pub linked_accounts: Vec, } impl IdentityProfile { - /// An identity profile. - pub fn new(account_number: i32, avatar_url: String, bio: String, display_name: String, external: crate::models::IdentityExternalLinks, follower_count: i64, following: bool, following_count: i64, games: Vec, groups: Vec, identity_id: uuid::Uuid, is_admin: bool, is_following_me: bool, is_mutual_following: bool, is_registered: bool, join_ts: String, linked_accounts: Vec) -> IdentityProfile { - IdentityProfile { - account_number, - avatar_url, - awaiting_deletion: None, - bio, - dev_state: None, - display_name, - external: Box::new(external), - follower_count, - following, - following_count, - games, - groups, - identity_id, - is_admin, - is_following_me, - is_game_linked: None, - is_mutual_following, - is_registered, - join_ts, - linked_accounts, - } - } + /// An identity profile. + pub fn new( + account_number: i32, + avatar_url: String, + bio: String, + display_name: String, + external: crate::models::IdentityExternalLinks, + follower_count: i64, + following: bool, + following_count: i64, + games: Vec, + groups: Vec, + identity_id: uuid::Uuid, + is_admin: bool, + is_following_me: bool, + is_mutual_following: bool, + is_registered: bool, + join_ts: String, + linked_accounts: Vec, + ) -> IdentityProfile { + IdentityProfile { + account_number, + avatar_url, + awaiting_deletion: None, + bio, + dev_state: None, + display_name, + external: Box::new(external), + follower_count, + following, + following_count, + games, + groups, + identity_id, + is_admin, + is_following_me, + is_game_linked: None, + is_mutual_following, + is_registered, + join_ts, + linked_accounts, + } + } } - - diff --git a/sdks/full/rust/src/models/identity_set_game_activity_request.rs b/sdks/full/rust/src/models/identity_set_game_activity_request.rs index cb53bb90bb..1de50baf6e 100644 --- a/sdks/full/rust/src/models/identity_set_game_activity_request.rs +++ b/sdks/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/full/rust/src/models/identity_setup_request.rs b/sdks/full/rust/src/models/identity_setup_request.rs index dba1402ee0..89389dd45c 100644 --- a/sdks/full/rust/src/models/identity_setup_request.rs +++ b/sdks/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/full/rust/src/models/identity_setup_response.rs b/sdks/full/rust/src/models/identity_setup_response.rs index d72d496270..aaa588629f 100644 --- a/sdks/full/rust/src/models/identity_setup_response.rs +++ b/sdks/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 { - #[serde(rename = "game_id")] - pub game_id: uuid::Uuid, - #[serde(rename = "identity")] - pub identity: Box, - /// 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 = "game_id")] + pub game_id: uuid::Uuid, + #[serde(rename = "identity")] + pub identity: Box, + /// 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, } impl IdentitySetupResponse { - pub fn new(game_id: uuid::Uuid, identity: crate::models::IdentityProfile, identity_token: String, identity_token_expire_ts: String) -> IdentitySetupResponse { - IdentitySetupResponse { - game_id, - identity: Box::new(identity), - identity_token, - identity_token_expire_ts, - } - } + pub fn new( + game_id: uuid::Uuid, + identity: crate::models::IdentityProfile, + identity_token: String, + identity_token_expire_ts: String, + ) -> IdentitySetupResponse { + IdentitySetupResponse { + game_id, + identity: Box::new(identity), + identity_token, + identity_token_expire_ts, + } + } } - - diff --git a/sdks/full/rust/src/models/identity_signup_for_beta_request.rs b/sdks/full/rust/src/models/identity_signup_for_beta_request.rs index 7e4e94dd23..f01715e87b 100644 --- a/sdks/full/rust/src/models/identity_signup_for_beta_request.rs +++ b/sdks/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 = "company_name", skip_serializing_if = "Option::is_none")] - pub company_name: Option, - #[serde(rename = "company_size")] - pub company_size: String, - #[serde(rename = "goals")] - pub goals: String, - #[serde(rename = "name")] - pub name: String, - #[serde(rename = "preferred_tools")] - pub preferred_tools: 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 = "goals")] + pub goals: String, + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "preferred_tools")] + pub preferred_tools: String, } impl IdentitySignupForBetaRequest { - pub fn new(company_size: String, goals: String, name: String, preferred_tools: String) -> IdentitySignupForBetaRequest { - IdentitySignupForBetaRequest { - company_name: None, - company_size, - goals, - name, - preferred_tools, - } - } + pub fn new( + company_size: String, + goals: String, + name: String, + preferred_tools: String, + ) -> IdentitySignupForBetaRequest { + IdentitySignupForBetaRequest { + company_name: None, + company_size, + goals, + name, + preferred_tools, + } + } } - - diff --git a/sdks/full/rust/src/models/identity_status.rs b/sdks/full/rust/src/models/identity_status.rs index 992b7897ac..ef1bdb6832 100644 --- a/sdks/full/rust/src/models/identity_status.rs +++ b/sdks/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/full/rust/src/models/identity_summary.rs b/sdks/full/rust/src/models/identity_summary.rs index d1d1fd63ec..c5e27c7e43 100644 --- a/sdks/full/rust/src/models/identity_summary.rs +++ b/sdks/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 = "account_number")] - pub account_number: i32, - /// The URL of this identity's avatar image. - #[serde(rename = "avatar_url")] - pub avatar_url: String, - /// Represent a resource's readable display name. - #[serde(rename = "display_name")] - pub display_name: String, - #[serde(rename = "external")] - pub external: Box, - /// Whether or not the requestee's identity is following this identity. - #[serde(rename = "following")] - pub following: bool, - #[serde(rename = "identity_id")] - pub identity_id: uuid::Uuid, - /// 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, - /// Whether or not this identity is registered with a linked account. - #[serde(rename = "is_registered")] - pub is_registered: bool, + #[serde(rename = "account_number")] + pub account_number: i32, + /// The URL of this identity's avatar image. + #[serde(rename = "avatar_url")] + pub avatar_url: String, + /// Represent a resource's readable display name. + #[serde(rename = "display_name")] + pub display_name: String, + #[serde(rename = "external")] + pub external: Box, + /// Whether or not the requestee's identity is following this identity. + #[serde(rename = "following")] + pub following: bool, + #[serde(rename = "identity_id")] + pub identity_id: uuid::Uuid, + /// 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, + /// Whether or not this identity is registered with a linked account. + #[serde(rename = "is_registered")] + pub is_registered: bool, } impl IdentitySummary { - /// An identity summary. - pub fn new(account_number: i32, avatar_url: String, display_name: String, external: crate::models::IdentityExternalLinks, following: bool, identity_id: uuid::Uuid, is_following_me: bool, is_mutual_following: bool, is_registered: bool) -> IdentitySummary { - IdentitySummary { - account_number, - avatar_url, - display_name, - external: Box::new(external), - following, - identity_id, - is_following_me, - is_mutual_following, - is_registered, - } - } + /// An identity summary. + pub fn new( + account_number: i32, + avatar_url: String, + display_name: String, + external: crate::models::IdentityExternalLinks, + following: bool, + identity_id: uuid::Uuid, + is_following_me: bool, + is_mutual_following: bool, + is_registered: bool, + ) -> IdentitySummary { + IdentitySummary { + account_number, + avatar_url, + display_name, + external: Box::new(external), + following, + identity_id, + is_following_me, + is_mutual_following, + is_registered, + } + } } - - diff --git a/sdks/full/rust/src/models/identity_update_game_activity.rs b/sdks/full/rust/src/models/identity_update_game_activity.rs index eb5698c4e9..3512ba8268 100644 --- a/sdks/full/rust/src/models/identity_update_game_activity.rs +++ b/sdks/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 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>, - /// 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>, + /// A short message about the current game activity. + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: 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>, + /// 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>, } 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, - mutual_metadata: None, - public_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, + mutual_metadata: None, + public_metadata: None, + } + } } - - diff --git a/sdks/full/rust/src/models/identity_update_profile_request.rs b/sdks/full/rust/src/models/identity_update_profile_request.rs index 24d90a91c4..a85d8a40ab 100644 --- a/sdks/full/rust/src/models/identity_update_profile_request.rs +++ b/sdks/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 { - #[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, + /// Represent a resource's readable display name. + #[serde(rename = "display_name", skip_serializing_if = "Option::is_none")] + pub display_name: Option, } impl IdentityUpdateProfileRequest { - pub fn new() -> IdentityUpdateProfileRequest { - IdentityUpdateProfileRequest { - account_number: None, - bio: None, - display_name: None, - } - } + pub fn new() -> IdentityUpdateProfileRequest { + IdentityUpdateProfileRequest { + account_number: None, + bio: None, + display_name: None, + } + } } - - diff --git a/sdks/full/rust/src/models/identity_update_status_request.rs b/sdks/full/rust/src/models/identity_update_status_request.rs index c6c79c6881..8c41927f5c 100644 --- a/sdks/full/rust/src/models/identity_update_status_request.rs +++ b/sdks/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/full/rust/src/models/identity_validate_profile_response.rs b/sdks/full/rust/src/models/identity_validate_profile_response.rs index f08e3f02b1..36054e28d4 100644 --- a/sdks/full/rust/src/models/identity_validate_profile_response.rs +++ b/sdks/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/full/rust/src/models/identity_watch_events_response.rs b/sdks/full/rust/src/models/identity_watch_events_response.rs index e04fd721dc..268c6dd650 100644 --- a/sdks/full/rust/src/models/identity_watch_events_response.rs +++ b/sdks/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/full/rust/src/models/matchmaker_create_lobby_response.rs b/sdks/full/rust/src/models/matchmaker_create_lobby_response.rs index 0d1bcc029a..fab017c125 100644 --- a/sdks/full/rust/src/models/matchmaker_create_lobby_response.rs +++ b/sdks/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 = "player")] - pub player: Box, - #[serde(rename = "ports")] - pub ports: ::std::collections::HashMap, + #[serde(rename = "lobby")] + pub lobby: Box, + #[serde(rename = "player")] + pub player: Box, + #[serde(rename = "ports")] + pub ports: ::std::collections::HashMap, } impl MatchmakerCreateLobbyResponse { - pub fn new(lobby: crate::models::MatchmakerJoinLobby, player: crate::models::MatchmakerJoinPlayer, ports: ::std::collections::HashMap) -> MatchmakerCreateLobbyResponse { - MatchmakerCreateLobbyResponse { - lobby: Box::new(lobby), - player: Box::new(player), - ports, - } - } + pub fn new( + lobby: crate::models::MatchmakerJoinLobby, + player: crate::models::MatchmakerJoinPlayer, + ports: ::std::collections::HashMap, + ) -> MatchmakerCreateLobbyResponse { + MatchmakerCreateLobbyResponse { + lobby: Box::new(lobby), + player: Box::new(player), + ports, + } + } } - - diff --git a/sdks/full/rust/src/models/matchmaker_custom_lobby_publicity.rs b/sdks/full/rust/src/models/matchmaker_custom_lobby_publicity.rs index e3dcead796..8bdb09d8f0 100644 --- a/sdks/full/rust/src/models/matchmaker_custom_lobby_publicity.rs +++ b/sdks/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/full/rust/src/models/matchmaker_find_lobby_response.rs b/sdks/full/rust/src/models/matchmaker_find_lobby_response.rs index 0a72c11058..9c30250ecf 100644 --- a/sdks/full/rust/src/models/matchmaker_find_lobby_response.rs +++ b/sdks/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 = "player")] - pub player: Box, - #[serde(rename = "ports")] - pub ports: ::std::collections::HashMap, + #[serde(rename = "lobby")] + pub lobby: Box, + #[serde(rename = "player")] + pub player: Box, + #[serde(rename = "ports")] + pub ports: ::std::collections::HashMap, } impl MatchmakerFindLobbyResponse { - pub fn new(lobby: crate::models::MatchmakerJoinLobby, player: crate::models::MatchmakerJoinPlayer, ports: ::std::collections::HashMap) -> MatchmakerFindLobbyResponse { - MatchmakerFindLobbyResponse { - lobby: Box::new(lobby), - player: Box::new(player), - ports, - } - } + pub fn new( + lobby: crate::models::MatchmakerJoinLobby, + player: crate::models::MatchmakerJoinPlayer, + ports: ::std::collections::HashMap, + ) -> MatchmakerFindLobbyResponse { + MatchmakerFindLobbyResponse { + lobby: Box::new(lobby), + player: Box::new(player), + ports, + } + } } - - diff --git a/sdks/full/rust/src/models/matchmaker_game_mode_info.rs b/sdks/full/rust/src/models/matchmaker_game_mode_info.rs index d3d921a688..a45e9f3615 100644 --- a/sdks/full/rust/src/models/matchmaker_game_mode_info.rs +++ b/sdks/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/full/rust/src/models/matchmaker_game_mode_statistics.rs b/sdks/full/rust/src/models/matchmaker_game_mode_statistics.rs index d2da15d2d9..e12272fc15 100644 --- a/sdks/full/rust/src/models/matchmaker_game_mode_statistics.rs +++ b/sdks/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/full/rust/src/models/matchmaker_get_statistics_response.rs b/sdks/full/rust/src/models/matchmaker_get_statistics_response.rs index 4275e93a5e..3650ef1378 100644 --- a/sdks/full/rust/src/models/matchmaker_get_statistics_response.rs +++ b/sdks/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 = "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, + #[serde(rename = "player_count")] + pub player_count: i64, } impl MatchmakerGetStatisticsResponse { - pub fn new(game_modes: ::std::collections::HashMap, player_count: i64) -> MatchmakerGetStatisticsResponse { - MatchmakerGetStatisticsResponse { - game_modes, - player_count, - } - } + pub fn new( + game_modes: ::std::collections::HashMap< + String, + crate::models::MatchmakerGameModeStatistics, + >, + player_count: i64, + ) -> MatchmakerGetStatisticsResponse { + MatchmakerGetStatisticsResponse { + game_modes, + player_count, + } + } } - - diff --git a/sdks/full/rust/src/models/matchmaker_join_lobby.rs b/sdks/full/rust/src/models/matchmaker_join_lobby.rs index aaf5bd9cd7..5b963a7bdc 100644 --- a/sdks/full/rust/src/models/matchmaker_join_lobby.rs +++ b/sdks/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 = "player")] - pub player: Box, - /// **Deprecated** - #[serde(rename = "ports")] - pub ports: ::std::collections::HashMap, - #[serde(rename = "region")] - pub region: Box, + #[serde(rename = "lobby_id")] + pub lobby_id: uuid::Uuid, + #[serde(rename = "player")] + pub player: Box, + /// **Deprecated** + #[serde(rename = "ports")] + pub ports: ::std::collections::HashMap, + #[serde(rename = "region")] + pub region: Box, } impl MatchmakerJoinLobby { - /// A matchmaker lobby. - pub fn new(lobby_id: uuid::Uuid, player: crate::models::MatchmakerJoinPlayer, ports: ::std::collections::HashMap, region: crate::models::MatchmakerJoinRegion) -> MatchmakerJoinLobby { - MatchmakerJoinLobby { - lobby_id, - player: Box::new(player), - ports, - region: Box::new(region), - } - } + /// A matchmaker lobby. + pub fn new( + lobby_id: uuid::Uuid, + player: crate::models::MatchmakerJoinPlayer, + ports: ::std::collections::HashMap, + region: crate::models::MatchmakerJoinRegion, + ) -> MatchmakerJoinLobby { + MatchmakerJoinLobby { + lobby_id, + player: Box::new(player), + ports, + region: Box::new(region), + } + } } - - diff --git a/sdks/full/rust/src/models/matchmaker_join_lobby_response.rs b/sdks/full/rust/src/models/matchmaker_join_lobby_response.rs index d284339b25..c502c5a62f 100644 --- a/sdks/full/rust/src/models/matchmaker_join_lobby_response.rs +++ b/sdks/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 = "player")] - pub player: Box, - #[serde(rename = "ports")] - pub ports: ::std::collections::HashMap, + #[serde(rename = "lobby")] + pub lobby: Box, + #[serde(rename = "player")] + pub player: Box, + #[serde(rename = "ports")] + pub ports: ::std::collections::HashMap, } impl MatchmakerJoinLobbyResponse { - pub fn new(lobby: crate::models::MatchmakerJoinLobby, player: crate::models::MatchmakerJoinPlayer, ports: ::std::collections::HashMap) -> MatchmakerJoinLobbyResponse { - MatchmakerJoinLobbyResponse { - lobby: Box::new(lobby), - player: Box::new(player), - ports, - } - } + pub fn new( + lobby: crate::models::MatchmakerJoinLobby, + player: crate::models::MatchmakerJoinPlayer, + ports: ::std::collections::HashMap, + ) -> MatchmakerJoinLobbyResponse { + MatchmakerJoinLobbyResponse { + lobby: Box::new(lobby), + player: Box::new(player), + ports, + } + } } - - diff --git a/sdks/full/rust/src/models/matchmaker_join_player.rs b/sdks/full/rust/src/models/matchmaker_join_player.rs index 198434b8ac..3645390464 100644 --- a/sdks/full/rust/src/models/matchmaker_join_player.rs +++ b/sdks/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/full/rust/src/models/matchmaker_join_port.rs b/sdks/full/rust/src/models/matchmaker_join_port.rs index 86e07f170a..cdb1083dd9 100644 --- a/sdks/full/rust/src/models/matchmaker_join_port.rs +++ b/sdks/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, - /// 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 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>, + /// 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, + /// 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 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>, } impl MatchmakerJoinPort { - pub fn new(hostname: String, is_tls: bool) -> MatchmakerJoinPort { - MatchmakerJoinPort { - host: None, - hostname, - is_tls, - port: None, - port_range: None, - } - } + pub fn new(hostname: String, is_tls: bool) -> MatchmakerJoinPort { + MatchmakerJoinPort { + host: None, + hostname, + is_tls, + port: None, + port_range: None, + } + } } - - diff --git a/sdks/full/rust/src/models/matchmaker_join_port_range.rs b/sdks/full/rust/src/models/matchmaker_join_port_range.rs index 5b793d5c52..cf8eb661fb 100644 --- a/sdks/full/rust/src/models/matchmaker_join_port_range.rs +++ b/sdks/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 { - /// 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, + /// Minimum port that can be connected to. Inclusive range. + #[serde(rename = "min")] + pub min: i32, } impl MatchmakerJoinPortRange { - /// Inclusive range of ports that can be connected to. - pub fn new(max: i32, min: i32) -> MatchmakerJoinPortRange { - MatchmakerJoinPortRange { - max, - min, - } - } + /// Inclusive range of ports that can be connected to. + pub fn new(max: i32, min: i32) -> MatchmakerJoinPortRange { + MatchmakerJoinPortRange { max, min } + } } - - diff --git a/sdks/full/rust/src/models/matchmaker_join_region.rs b/sdks/full/rust/src/models/matchmaker_join_region.rs index 7f38d680cf..79f4b2ff46 100644 --- a/sdks/full/rust/src/models/matchmaker_join_region.rs +++ b/sdks/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 { - /// 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, + /// 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, } impl MatchmakerJoinRegion { - /// A matchmaker lobby region. - pub fn new(display_name: String, region_id: String) -> MatchmakerJoinRegion { - MatchmakerJoinRegion { - display_name, - region_id, - } - } + /// A matchmaker lobby region. + pub fn new(display_name: String, region_id: String) -> MatchmakerJoinRegion { + MatchmakerJoinRegion { + display_name, + region_id, + } + } } - - diff --git a/sdks/full/rust/src/models/matchmaker_list_lobbies_response.rs b/sdks/full/rust/src/models/matchmaker_list_lobbies_response.rs index 181d6b0bd0..3ead5b1d9b 100644 --- a/sdks/full/rust/src/models/matchmaker_list_lobbies_response.rs +++ b/sdks/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 = "lobbies")] - pub lobbies: Vec, - #[serde(rename = "regions")] - pub regions: Vec, + #[serde(rename = "game_modes")] + pub game_modes: Vec, + #[serde(rename = "lobbies")] + pub lobbies: Vec, + #[serde(rename = "regions")] + pub regions: Vec, } impl MatchmakerListLobbiesResponse { - pub fn new(game_modes: Vec, lobbies: Vec, regions: Vec) -> MatchmakerListLobbiesResponse { - MatchmakerListLobbiesResponse { - game_modes, - lobbies, - regions, - } - } + pub fn new( + game_modes: Vec, + lobbies: Vec, + regions: Vec, + ) -> MatchmakerListLobbiesResponse { + MatchmakerListLobbiesResponse { + game_modes, + lobbies, + regions, + } + } } - - diff --git a/sdks/full/rust/src/models/matchmaker_list_regions_response.rs b/sdks/full/rust/src/models/matchmaker_list_regions_response.rs index 07eae13752..c418c2237a 100644 --- a/sdks/full/rust/src/models/matchmaker_list_regions_response.rs +++ b/sdks/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/full/rust/src/models/matchmaker_lobbies_create_request.rs b/sdks/full/rust/src/models/matchmaker_lobbies_create_request.rs index 4a61128a8f..c4b058ecb7 100644 --- a/sdks/full/rust/src/models/matchmaker_lobbies_create_request.rs +++ b/sdks/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 = "captcha", skip_serializing_if = "Option::is_none")] - pub captcha: Option>, - #[serde(rename = "game_mode")] - pub game_mode: String, - #[serde(rename = "lobby_config", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub lobby_config: Option>, - #[serde(rename = "max_players", skip_serializing_if = "Option::is_none")] - pub max_players: Option, - #[serde(rename = "publicity", skip_serializing_if = "Option::is_none")] - pub publicity: Option, - #[serde(rename = "region", skip_serializing_if = "Option::is_none")] - pub region: Option, - #[serde(rename = "tags", skip_serializing_if = "Option::is_none")] - pub tags: Option<::std::collections::HashMap>, - #[serde(rename = "verification_data", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub verification_data: Option>, + #[serde(rename = "captcha", skip_serializing_if = "Option::is_none")] + pub captcha: Option>, + #[serde(rename = "game_mode")] + pub game_mode: String, + #[serde( + rename = "lobby_config", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub lobby_config: Option>, + #[serde(rename = "max_players", skip_serializing_if = "Option::is_none")] + pub max_players: Option, + #[serde(rename = "publicity", skip_serializing_if = "Option::is_none")] + pub publicity: Option, + #[serde(rename = "region", skip_serializing_if = "Option::is_none")] + pub region: Option, + #[serde(rename = "tags", skip_serializing_if = "Option::is_none")] + pub tags: Option<::std::collections::HashMap>, + #[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 { - captcha: None, - game_mode, - lobby_config: None, - max_players: None, - publicity: None, - region: None, - tags: None, - verification_data: None, - } - } + pub fn new(game_mode: String) -> MatchmakerLobbiesCreateRequest { + MatchmakerLobbiesCreateRequest { + captcha: None, + game_mode, + lobby_config: None, + max_players: None, + publicity: None, + region: None, + tags: None, + verification_data: None, + } + } } - - diff --git a/sdks/full/rust/src/models/matchmaker_lobbies_find_request.rs b/sdks/full/rust/src/models/matchmaker_lobbies_find_request.rs index 6761c70629..f76487ae22 100644 --- a/sdks/full/rust/src/models/matchmaker_lobbies_find_request.rs +++ b/sdks/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 = "captcha", skip_serializing_if = "Option::is_none")] - pub captcha: Option>, - #[serde(rename = "game_modes")] - pub game_modes: Vec, - #[serde(rename = "max_players", skip_serializing_if = "Option::is_none")] - pub max_players: Option, - #[serde(rename = "prevent_auto_create_lobby", skip_serializing_if = "Option::is_none")] - pub prevent_auto_create_lobby: Option, - #[serde(rename = "regions", skip_serializing_if = "Option::is_none")] - pub regions: Option>, - #[serde(rename = "tags", skip_serializing_if = "Option::is_none")] - pub tags: Option<::std::collections::HashMap>, - #[serde(rename = "verification_data", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub verification_data: Option>, + #[serde(rename = "captcha", skip_serializing_if = "Option::is_none")] + pub captcha: Option>, + #[serde(rename = "game_modes")] + pub game_modes: Vec, + #[serde(rename = "max_players", skip_serializing_if = "Option::is_none")] + pub max_players: Option, + #[serde( + rename = "prevent_auto_create_lobby", + skip_serializing_if = "Option::is_none" + )] + pub prevent_auto_create_lobby: Option, + #[serde(rename = "regions", skip_serializing_if = "Option::is_none")] + pub regions: Option>, + #[serde(rename = "tags", skip_serializing_if = "Option::is_none")] + pub tags: Option<::std::collections::HashMap>, + #[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 { - captcha: None, - game_modes, - max_players: None, - prevent_auto_create_lobby: None, - regions: None, - tags: None, - verification_data: None, - } - } + pub fn new(game_modes: Vec) -> MatchmakerLobbiesFindRequest { + MatchmakerLobbiesFindRequest { + captcha: None, + game_modes, + max_players: None, + prevent_auto_create_lobby: None, + regions: None, + tags: None, + verification_data: None, + } + } } - - diff --git a/sdks/full/rust/src/models/matchmaker_lobbies_join_request.rs b/sdks/full/rust/src/models/matchmaker_lobbies_join_request.rs index 6f622e00a1..f029003f63 100644 --- a/sdks/full/rust/src/models/matchmaker_lobbies_join_request.rs +++ b/sdks/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 = "captcha", skip_serializing_if = "Option::is_none")] - pub captcha: Option>, - #[serde(rename = "lobby_id")] - pub lobby_id: String, - #[serde(rename = "verification_data", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub verification_data: Option>, + #[serde(rename = "captcha", skip_serializing_if = "Option::is_none")] + pub captcha: Option>, + #[serde(rename = "lobby_id")] + pub lobby_id: String, + #[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 { - captcha: None, - lobby_id, - verification_data: None, - } - } + pub fn new(lobby_id: String) -> MatchmakerLobbiesJoinRequest { + MatchmakerLobbiesJoinRequest { + captcha: None, + lobby_id, + verification_data: None, + } + } } - - diff --git a/sdks/full/rust/src/models/matchmaker_lobbies_set_closed_request.rs b/sdks/full/rust/src/models/matchmaker_lobbies_set_closed_request.rs index 32b2a4cfe2..196665e468 100644 --- a/sdks/full/rust/src/models/matchmaker_lobbies_set_closed_request.rs +++ b/sdks/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/full/rust/src/models/matchmaker_lobby_info.rs b/sdks/full/rust/src/models/matchmaker_lobby_info.rs index bdae0cba81..a8b03ff8c7 100644 --- a/sdks/full/rust/src/models/matchmaker_lobby_info.rs +++ b/sdks/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 = "game_mode_id")] - pub game_mode_id: String, - #[serde(rename = "lobby_id")] - pub lobby_id: uuid::Uuid, - #[serde(rename = "max_players_direct")] - pub max_players_direct: i32, - #[serde(rename = "max_players_normal")] - pub max_players_normal: i32, - #[serde(rename = "max_players_party")] - pub max_players_party: i32, - #[serde(rename = "region_id")] - pub region_id: String, - #[serde(rename = "state", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub state: Option>, - #[serde(rename = "total_player_count")] - pub total_player_count: i32, + #[serde(rename = "game_mode_id")] + pub game_mode_id: String, + #[serde(rename = "lobby_id")] + pub lobby_id: uuid::Uuid, + #[serde(rename = "max_players_direct")] + pub max_players_direct: i32, + #[serde(rename = "max_players_normal")] + pub max_players_normal: i32, + #[serde(rename = "max_players_party")] + pub max_players_party: i32, + #[serde(rename = "region_id")] + pub region_id: String, + #[serde( + rename = "state", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] + pub state: Option>, + #[serde(rename = "total_player_count")] + pub total_player_count: i32, } impl MatchmakerLobbyInfo { - /// A public lobby in the lobby list. - pub fn new(game_mode_id: String, lobby_id: uuid::Uuid, max_players_direct: i32, max_players_normal: i32, max_players_party: i32, region_id: String, total_player_count: i32) -> MatchmakerLobbyInfo { - MatchmakerLobbyInfo { - game_mode_id, - lobby_id, - max_players_direct, - max_players_normal, - max_players_party, - region_id, - state: None, - total_player_count, - } - } + /// A public lobby in the lobby list. + pub fn new( + game_mode_id: String, + lobby_id: uuid::Uuid, + max_players_direct: i32, + max_players_normal: i32, + max_players_party: i32, + region_id: String, + total_player_count: i32, + ) -> MatchmakerLobbyInfo { + MatchmakerLobbyInfo { + game_mode_id, + lobby_id, + max_players_direct, + max_players_normal, + max_players_party, + region_id, + state: None, + total_player_count, + } + } } - - diff --git a/sdks/full/rust/src/models/matchmaker_players_connected_request.rs b/sdks/full/rust/src/models/matchmaker_players_connected_request.rs index c5de54c33c..00930513c4 100644 --- a/sdks/full/rust/src/models/matchmaker_players_connected_request.rs +++ b/sdks/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/full/rust/src/models/matchmaker_region_info.rs b/sdks/full/rust/src/models/matchmaker_region_info.rs index ed5df899d6..6329a0d4b3 100644 --- a/sdks/full/rust/src/models/matchmaker_region_info.rs +++ b/sdks/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 { - #[serde(rename = "datacenter_coord")] - pub datacenter_coord: Box, - #[serde(rename = "datacenter_distance_from_client")] - pub datacenter_distance_from_client: Box, - /// 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, - /// 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, + #[serde(rename = "datacenter_coord")] + pub datacenter_coord: Box, + #[serde(rename = "datacenter_distance_from_client")] + pub datacenter_distance_from_client: Box, + /// 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, + /// 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, } impl MatchmakerRegionInfo { - /// A region that the player can connect to. - pub fn new(datacenter_coord: crate::models::GeoCoord, datacenter_distance_from_client: crate::models::GeoDistance, provider_display_name: String, region_display_name: String, region_id: String) -> MatchmakerRegionInfo { - MatchmakerRegionInfo { - datacenter_coord: Box::new(datacenter_coord), - datacenter_distance_from_client: Box::new(datacenter_distance_from_client), - provider_display_name, - region_display_name, - region_id, - } - } + /// A region that the player can connect to. + pub fn new( + datacenter_coord: crate::models::GeoCoord, + datacenter_distance_from_client: crate::models::GeoDistance, + provider_display_name: String, + region_display_name: String, + region_id: String, + ) -> MatchmakerRegionInfo { + MatchmakerRegionInfo { + datacenter_coord: Box::new(datacenter_coord), + datacenter_distance_from_client: Box::new(datacenter_distance_from_client), + provider_display_name, + region_display_name, + region_id, + } + } } - - diff --git a/sdks/full/rust/src/models/matchmaker_region_statistics.rs b/sdks/full/rust/src/models/matchmaker_region_statistics.rs index 1f213d2419..b98695d5c1 100644 --- a/sdks/full/rust/src/models/matchmaker_region_statistics.rs +++ b/sdks/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/full/rust/src/models/portal_get_game_profile_response.rs b/sdks/full/rust/src/models/portal_get_game_profile_response.rs index 956b0da212..8e42244a81 100644 --- a/sdks/full/rust/src/models/portal_get_game_profile_response.rs +++ b/sdks/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/full/rust/src/models/portal_get_suggested_games_response.rs b/sdks/full/rust/src/models/portal_get_suggested_games_response.rs index a663aeaac5..f3eaad952a 100644 --- a/sdks/full/rust/src/models/portal_get_suggested_games_response.rs +++ b/sdks/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/full/rust/src/models/portal_notification_register_firebase_service.rs b/sdks/full/rust/src/models/portal_notification_register_firebase_service.rs index 213357992e..89005a210b 100644 --- a/sdks/full/rust/src/models/portal_notification_register_firebase_service.rs +++ b/sdks/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/full/rust/src/models/portal_notification_register_service.rs b/sdks/full/rust/src/models/portal_notification_register_service.rs index 1058fd743b..e9232ea5ec 100644 --- a/sdks/full/rust/src/models/portal_notification_register_service.rs +++ b/sdks/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/full/rust/src/models/portal_notification_unregister_service.rs b/sdks/full/rust/src/models/portal_notification_unregister_service.rs index d4bda04c73..f7d60722c9 100644 --- a/sdks/full/rust/src/models/portal_notification_unregister_service.rs +++ b/sdks/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/full/rust/src/models/provision_datacenters_get_tls_response.rs b/sdks/full/rust/src/models/provision_datacenters_get_tls_response.rs index a2039a21ba..c74afabfb0 100644 --- a/sdks/full/rust/src/models/provision_datacenters_get_tls_response.rs +++ b/sdks/full/rust/src/models/provision_datacenters_get_tls_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 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 = "job_cert_pem")] + pub job_cert_pem: String, + #[serde(rename = "job_private_key_pem")] + pub job_private_key_pem: String, } impl ProvisionDatacentersGetTlsResponse { - pub fn new(job_cert_pem: String, job_private_key_pem: String) -> ProvisionDatacentersGetTlsResponse { - ProvisionDatacentersGetTlsResponse { - job_cert_pem, - job_private_key_pem, - } - } + pub fn new( + job_cert_pem: String, + job_private_key_pem: String, + ) -> ProvisionDatacentersGetTlsResponse { + ProvisionDatacentersGetTlsResponse { + job_cert_pem, + job_private_key_pem, + } + } } - - diff --git a/sdks/full/rust/src/models/provision_servers_get_info_response.rs b/sdks/full/rust/src/models/provision_servers_get_info_response.rs index 7c7048be3d..a328594c55 100644 --- a/sdks/full/rust/src/models/provision_servers_get_info_response.rs +++ b/sdks/full/rust/src/models/provision_servers_get_info_response.rs @@ -4,40 +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 ProvisionServersGetInfoResponse { - #[serde(rename = "cluster_id")] - pub cluster_id: uuid::Uuid, - #[serde(rename = "datacenter_id")] - pub datacenter_id: uuid::Uuid, - #[serde(rename = "name")] - pub name: String, - #[serde(rename = "public_ip")] - pub public_ip: String, - #[serde(rename = "server_id")] - pub server_id: uuid::Uuid, - #[serde(rename = "vlan_ip")] - pub vlan_ip: String, + #[serde(rename = "cluster_id")] + pub cluster_id: uuid::Uuid, + #[serde(rename = "datacenter_id")] + pub datacenter_id: uuid::Uuid, + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "public_ip")] + pub public_ip: String, + #[serde(rename = "server_id")] + pub server_id: uuid::Uuid, + #[serde(rename = "vlan_ip")] + pub vlan_ip: String, } impl ProvisionServersGetInfoResponse { - pub fn new(cluster_id: uuid::Uuid, datacenter_id: uuid::Uuid, name: String, public_ip: String, server_id: uuid::Uuid, vlan_ip: String) -> ProvisionServersGetInfoResponse { - ProvisionServersGetInfoResponse { - cluster_id, - datacenter_id, - name, - public_ip, - server_id, - vlan_ip, - } - } + pub fn new( + cluster_id: uuid::Uuid, + datacenter_id: uuid::Uuid, + name: String, + public_ip: String, + server_id: uuid::Uuid, + vlan_ip: String, + ) -> ProvisionServersGetInfoResponse { + ProvisionServersGetInfoResponse { + cluster_id, + datacenter_id, + name, + public_ip, + server_id, + vlan_ip, + } + } } - - diff --git a/sdks/full/rust/src/models/servers_build.rs b/sdks/full/rust/src/models/servers_build.rs index fdd8d54e66..fb591dbeb5 100644 --- a/sdks/full/rust/src/models/servers_build.rs +++ b/sdks/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 { - /// Unsigned 64 bit integer. - #[serde(rename = "content_length")] - pub content_length: i64, - /// RFC3339 timestamp - #[serde(rename = "created_at")] - pub created_at: String, - #[serde(rename = "id")] - pub id: uuid::Uuid, - #[serde(rename = "name")] - pub name: String, - /// Tags of this build - #[serde(rename = "tags")] - pub tags: ::std::collections::HashMap, + /// Unsigned 64 bit integer. + #[serde(rename = "content_length")] + pub content_length: i64, + /// RFC3339 timestamp + #[serde(rename = "created_at")] + pub created_at: String, + #[serde(rename = "id")] + pub id: uuid::Uuid, + #[serde(rename = "name")] + pub name: String, + /// Tags of this build + #[serde(rename = "tags")] + pub tags: ::std::collections::HashMap, } impl ServersBuild { - pub fn new(content_length: i64, created_at: String, id: uuid::Uuid, name: String, tags: ::std::collections::HashMap) -> ServersBuild { - ServersBuild { - content_length, - created_at, - id, - name, - tags, - } - } + pub fn new( + content_length: i64, + created_at: String, + id: uuid::Uuid, + name: String, + tags: ::std::collections::HashMap, + ) -> ServersBuild { + ServersBuild { + content_length, + created_at, + id, + name, + tags, + } + } } - - diff --git a/sdks/full/rust/src/models/servers_build_compression.rs b/sdks/full/rust/src/models/servers_build_compression.rs index fd549d6279..ab301d44e2 100644 --- a/sdks/full/rust/src/models/servers_build_compression.rs +++ b/sdks/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/full/rust/src/models/servers_build_kind.rs b/sdks/full/rust/src/models/servers_build_kind.rs index 853abbb0e7..e79562ffe6 100644 --- a/sdks/full/rust/src/models/servers_build_kind.rs +++ b/sdks/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/full/rust/src/models/servers_create_build_request.rs b/sdks/full/rust/src/models/servers_create_build_request.rs index eb128a33f3..d0d067ca91 100644 --- a/sdks/full/rust/src/models/servers_create_build_request.rs +++ b/sdks/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 = "compression", skip_serializing_if = "Option::is_none")] - pub compression: Option, - #[serde(rename = "image_file")] - pub image_file: Box, - /// A tag given to the game build. - #[serde(rename = "image_tag")] - pub image_tag: String, - #[serde(rename = "kind", skip_serializing_if = "Option::is_none")] - pub kind: Option, - #[serde(rename = "multipart_upload", skip_serializing_if = "Option::is_none")] - pub multipart_upload: Option, - #[serde(rename = "name")] - pub name: String, - #[serde(rename = "prewarm_datacenters", skip_serializing_if = "Option::is_none")] - pub prewarm_datacenters: Option>, + #[serde(rename = "compression", skip_serializing_if = "Option::is_none")] + pub compression: Option, + #[serde(rename = "image_file")] + pub image_file: Box, + /// A tag given to the game build. + #[serde(rename = "image_tag")] + pub image_tag: String, + #[serde(rename = "kind", skip_serializing_if = "Option::is_none")] + pub kind: Option, + #[serde(rename = "multipart_upload", skip_serializing_if = "Option::is_none")] + pub multipart_upload: Option, + #[serde(rename = "name")] + pub name: String, + #[serde( + rename = "prewarm_datacenters", + skip_serializing_if = "Option::is_none" + )] + pub prewarm_datacenters: Option>, } impl ServersCreateBuildRequest { - pub fn new(image_file: crate::models::UploadPrepareFile, image_tag: String, name: String) -> ServersCreateBuildRequest { - ServersCreateBuildRequest { - compression: None, - image_file: Box::new(image_file), - image_tag, - kind: None, - multipart_upload: None, - name, - prewarm_datacenters: None, - } - } + pub fn new( + image_file: crate::models::UploadPrepareFile, + image_tag: String, + name: String, + ) -> ServersCreateBuildRequest { + ServersCreateBuildRequest { + compression: None, + image_file: Box::new(image_file), + image_tag, + kind: None, + multipart_upload: None, + name, + prewarm_datacenters: None, + } + } } - - diff --git a/sdks/full/rust/src/models/servers_create_build_response.rs b/sdks/full/rust/src/models/servers_create_build_response.rs index c277171564..ef947a0bd9 100644 --- a/sdks/full/rust/src/models/servers_create_build_response.rs +++ b/sdks/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/full/rust/src/models/servers_create_server_network_request.rs b/sdks/full/rust/src/models/servers_create_server_network_request.rs index d469cc181d..78756844c5 100644 --- a/sdks/full/rust/src/models/servers_create_server_network_request.rs +++ b/sdks/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/full/rust/src/models/servers_create_server_port_request.rs b/sdks/full/rust/src/models/servers_create_server_port_request.rs index d818685f71..c11370436b 100644 --- a/sdks/full/rust/src/models/servers_create_server_port_request.rs +++ b/sdks/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 = "internal_port", skip_serializing_if = "Option::is_none")] - pub internal_port: Option, - #[serde(rename = "protocol")] - pub protocol: crate::models::ServersPortProtocol, - #[serde(rename = "routing", skip_serializing_if = "Option::is_none")] - pub routing: Option>, + #[serde(rename = "internal_port", skip_serializing_if = "Option::is_none")] + pub internal_port: Option, + #[serde(rename = "protocol")] + pub protocol: crate::models::ServersPortProtocol, + #[serde(rename = "routing", skip_serializing_if = "Option::is_none")] + pub routing: Option>, } impl ServersCreateServerPortRequest { - pub fn new(protocol: crate::models::ServersPortProtocol) -> ServersCreateServerPortRequest { - ServersCreateServerPortRequest { - internal_port: None, - protocol, - routing: None, - } - } + pub fn new(protocol: crate::models::ServersPortProtocol) -> ServersCreateServerPortRequest { + ServersCreateServerPortRequest { + internal_port: None, + protocol, + routing: None, + } + } } - - diff --git a/sdks/full/rust/src/models/servers_create_server_request.rs b/sdks/full/rust/src/models/servers_create_server_request.rs index 84c0f99936..bf213b3ca6 100644 --- a/sdks/full/rust/src/models/servers_create_server_request.rs +++ b/sdks/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 = "lifecycle", skip_serializing_if = "Option::is_none")] - pub lifecycle: Option>, - #[serde(rename = "network")] - pub network: Box, - #[serde(rename = "resources")] - pub resources: Box, - #[serde(rename = "runtime")] - pub runtime: Box, - #[serde(rename = "tags", deserialize_with = "Option::deserialize")] - pub tags: Option, + #[serde(rename = "datacenter")] + pub datacenter: uuid::Uuid, + #[serde(rename = "lifecycle", skip_serializing_if = "Option::is_none")] + pub lifecycle: Option>, + #[serde(rename = "network")] + pub network: Box, + #[serde(rename = "resources")] + pub resources: Box, + #[serde(rename = "runtime")] + pub runtime: Box, + #[serde(rename = "tags", deserialize_with = "Option::deserialize")] + pub tags: Option, } impl ServersCreateServerRequest { - pub fn new(datacenter: uuid::Uuid, network: crate::models::ServersCreateServerNetworkRequest, resources: crate::models::ServersResources, runtime: crate::models::ServersCreateServerRuntimeRequest, tags: Option) -> ServersCreateServerRequest { - ServersCreateServerRequest { - datacenter, - lifecycle: None, - network: Box::new(network), - resources: Box::new(resources), - runtime: Box::new(runtime), - tags, - } - } + pub fn new( + datacenter: uuid::Uuid, + network: crate::models::ServersCreateServerNetworkRequest, + resources: crate::models::ServersResources, + runtime: crate::models::ServersCreateServerRuntimeRequest, + tags: Option, + ) -> ServersCreateServerRequest { + ServersCreateServerRequest { + datacenter, + lifecycle: None, + network: Box::new(network), + resources: Box::new(resources), + runtime: Box::new(runtime), + tags, + } + } } - - diff --git a/sdks/full/rust/src/models/servers_create_server_response.rs b/sdks/full/rust/src/models/servers_create_server_response.rs index 3c32cbd896..b26f499470 100644 --- a/sdks/full/rust/src/models/servers_create_server_response.rs +++ b/sdks/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/full/rust/src/models/servers_create_server_runtime_request.rs b/sdks/full/rust/src/models/servers_create_server_runtime_request.rs index 11f4647cf9..4485959944 100644 --- a/sdks/full/rust/src/models/servers_create_server_runtime_request.rs +++ b/sdks/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 = "arguments", skip_serializing_if = "Option::is_none")] - pub arguments: Option>, - #[serde(rename = "build")] - pub build: uuid::Uuid, - #[serde(rename = "environment", skip_serializing_if = "Option::is_none")] - pub environment: Option<::std::collections::HashMap>, + #[serde(rename = "arguments", skip_serializing_if = "Option::is_none")] + pub arguments: Option>, + #[serde(rename = "build")] + pub build: uuid::Uuid, + #[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 { - arguments: None, - build, - environment: None, - } - } + pub fn new(build: uuid::Uuid) -> ServersCreateServerRuntimeRequest { + ServersCreateServerRuntimeRequest { + arguments: None, + build, + environment: None, + } + } } - - diff --git a/sdks/full/rust/src/models/servers_datacenter.rs b/sdks/full/rust/src/models/servers_datacenter.rs index b267b68a6e..12af6dabf7 100644 --- a/sdks/full/rust/src/models/servers_datacenter.rs +++ b/sdks/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 = "name")] - pub name: String, - #[serde(rename = "slug")] - pub slug: String, + #[serde(rename = "id")] + pub id: uuid::Uuid, + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "slug")] + pub slug: String, } impl ServersDatacenter { - pub fn new(id: uuid::Uuid, name: String, slug: String) -> ServersDatacenter { - ServersDatacenter { - id, - name, - slug, - } - } + pub fn new(id: uuid::Uuid, name: String, slug: String) -> ServersDatacenter { + ServersDatacenter { id, name, slug } + } } - - diff --git a/sdks/full/rust/src/models/servers_get_build_response.rs b/sdks/full/rust/src/models/servers_get_build_response.rs index 25515b9332..65ac964d73 100644 --- a/sdks/full/rust/src/models/servers_get_build_response.rs +++ b/sdks/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/full/rust/src/models/servers_get_server_logs_response.rs b/sdks/full/rust/src/models/servers_get_server_logs_response.rs index dd6df5a770..df3bc16c0c 100644 --- a/sdks/full/rust/src/models/servers_get_server_logs_response.rs +++ b/sdks/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/full/rust/src/models/servers_get_server_response.rs b/sdks/full/rust/src/models/servers_get_server_response.rs index 2f017da813..a6a739546b 100644 --- a/sdks/full/rust/src/models/servers_get_server_response.rs +++ b/sdks/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/full/rust/src/models/servers_lifecycle.rs b/sdks/full/rust/src/models/servers_lifecycle.rs index 47b2074f46..6268eb01b8 100644 --- a/sdks/full/rust/src/models/servers_lifecycle.rs +++ b/sdks/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/full/rust/src/models/servers_list_builds_response.rs b/sdks/full/rust/src/models/servers_list_builds_response.rs index c3e1d63e80..e9bc64a4ce 100644 --- a/sdks/full/rust/src/models/servers_list_builds_response.rs +++ b/sdks/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/full/rust/src/models/servers_list_datacenters_response.rs b/sdks/full/rust/src/models/servers_list_datacenters_response.rs index ac3a02b52d..3e228c8d52 100644 --- a/sdks/full/rust/src/models/servers_list_datacenters_response.rs +++ b/sdks/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/full/rust/src/models/servers_list_servers_response.rs b/sdks/full/rust/src/models/servers_list_servers_response.rs index 202010aa26..75d728f86f 100644 --- a/sdks/full/rust/src/models/servers_list_servers_response.rs +++ b/sdks/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/full/rust/src/models/servers_log_stream.rs b/sdks/full/rust/src/models/servers_log_stream.rs index b96bdda215..22c8742c30 100644 --- a/sdks/full/rust/src/models/servers_log_stream.rs +++ b/sdks/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/full/rust/src/models/servers_network.rs b/sdks/full/rust/src/models/servers_network.rs index 97bade5673..5a0b97d95b 100644 --- a/sdks/full/rust/src/models/servers_network.rs +++ b/sdks/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/full/rust/src/models/servers_network_mode.rs b/sdks/full/rust/src/models/servers_network_mode.rs index bbb9bd9a5b..d18f6caea8 100644 --- a/sdks/full/rust/src/models/servers_network_mode.rs +++ b/sdks/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/full/rust/src/models/servers_patch_build_tags_request.rs b/sdks/full/rust/src/models/servers_patch_build_tags_request.rs index 3857d9654a..43bfdcff35 100644 --- a/sdks/full/rust/src/models/servers_patch_build_tags_request.rs +++ b/sdks/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 { - /// 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>, + #[serde(rename = "tags", deserialize_with = "Option::deserialize")] + pub tags: Option, } impl ServersPatchBuildTagsRequest { - pub fn new(tags: Option) -> ServersPatchBuildTagsRequest { - ServersPatchBuildTagsRequest { - exclusive_tags: None, - tags, - } - } + pub fn new(tags: Option) -> ServersPatchBuildTagsRequest { + ServersPatchBuildTagsRequest { + exclusive_tags: None, + tags, + } + } } - - diff --git a/sdks/full/rust/src/models/servers_port.rs b/sdks/full/rust/src/models/servers_port.rs index ab305ac1e4..f3fdb8470e 100644 --- a/sdks/full/rust/src/models/servers_port.rs +++ b/sdks/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 = "internal_port", skip_serializing_if = "Option::is_none")] - pub internal_port: Option, - #[serde(rename = "protocol")] - pub protocol: crate::models::ServersPortProtocol, - #[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 = "internal_port", skip_serializing_if = "Option::is_none")] + pub internal_port: Option, + #[serde(rename = "protocol")] + pub protocol: crate::models::ServersPortProtocol, + #[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 { - internal_port: None, - protocol, - public_hostname: None, - public_port: None, - routing: Box::new(routing), - } - } + pub fn new( + protocol: crate::models::ServersPortProtocol, + routing: crate::models::ServersPortRouting, + ) -> ServersPort { + ServersPort { + internal_port: None, + protocol, + public_hostname: None, + public_port: None, + routing: Box::new(routing), + } + } } - - diff --git a/sdks/full/rust/src/models/servers_port_protocol.rs b/sdks/full/rust/src/models/servers_port_protocol.rs index e2e8c326c9..b5b0e4ca64 100644 --- a/sdks/full/rust/src/models/servers_port_protocol.rs +++ b/sdks/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/full/rust/src/models/servers_port_routing.rs b/sdks/full/rust/src/models/servers_port_routing.rs index 83f0846fc4..5ba748b474 100644 --- a/sdks/full/rust/src/models/servers_port_routing.rs +++ b/sdks/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/full/rust/src/models/servers_resources.rs b/sdks/full/rust/src/models/servers_resources.rs index d29a3cb0ac..34addff66f 100644 --- a/sdks/full/rust/src/models/servers_resources.rs +++ b/sdks/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/full/rust/src/models/servers_runtime.rs b/sdks/full/rust/src/models/servers_runtime.rs index 489b53a7a9..d29bd15c94 100644 --- a/sdks/full/rust/src/models/servers_runtime.rs +++ b/sdks/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 = "arguments", skip_serializing_if = "Option::is_none")] - pub arguments: Option>, - #[serde(rename = "build")] - pub build: uuid::Uuid, - #[serde(rename = "environment", skip_serializing_if = "Option::is_none")] - pub environment: Option<::std::collections::HashMap>, + #[serde(rename = "arguments", skip_serializing_if = "Option::is_none")] + pub arguments: Option>, + #[serde(rename = "build")] + pub build: uuid::Uuid, + #[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 { - arguments: None, - build, - environment: None, - } - } + pub fn new(build: uuid::Uuid) -> ServersRuntime { + ServersRuntime { + arguments: None, + build, + environment: None, + } + } } - - diff --git a/sdks/full/rust/src/models/servers_server.rs b/sdks/full/rust/src/models/servers_server.rs index 3238d633ea..2d6738168c 100644 --- a/sdks/full/rust/src/models/servers_server.rs +++ b/sdks/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 = "created_at")] - pub created_at: i64, - #[serde(rename = "datacenter")] - pub datacenter: uuid::Uuid, - #[serde(rename = "destroyed_at", skip_serializing_if = "Option::is_none")] - pub destroyed_at: Option, - #[serde(rename = "environment")] - pub environment: uuid::Uuid, - #[serde(rename = "id")] - pub id: uuid::Uuid, - #[serde(rename = "lifecycle")] - pub lifecycle: Box, - #[serde(rename = "network")] - pub network: Box, - #[serde(rename = "resources")] - pub resources: Box, - #[serde(rename = "runtime")] - pub runtime: Box, - #[serde(rename = "started_at", skip_serializing_if = "Option::is_none")] - pub started_at: Option, - #[serde(rename = "tags", deserialize_with = "Option::deserialize")] - pub tags: Option, + #[serde(rename = "created_at")] + pub created_at: i64, + #[serde(rename = "datacenter")] + pub datacenter: uuid::Uuid, + #[serde(rename = "destroyed_at", skip_serializing_if = "Option::is_none")] + pub destroyed_at: Option, + #[serde(rename = "environment")] + pub environment: uuid::Uuid, + #[serde(rename = "id")] + pub id: uuid::Uuid, + #[serde(rename = "lifecycle")] + pub lifecycle: Box, + #[serde(rename = "network")] + pub network: Box, + #[serde(rename = "resources")] + pub resources: Box, + #[serde(rename = "runtime")] + pub runtime: Box, + #[serde(rename = "started_at", skip_serializing_if = "Option::is_none")] + pub started_at: Option, + #[serde(rename = "tags", deserialize_with = "Option::deserialize")] + pub tags: Option, } impl ServersServer { - pub fn new(created_at: i64, datacenter: uuid::Uuid, environment: uuid::Uuid, id: uuid::Uuid, lifecycle: crate::models::ServersLifecycle, network: crate::models::ServersNetwork, resources: crate::models::ServersResources, runtime: crate::models::ServersRuntime, tags: Option) -> ServersServer { - ServersServer { - created_at, - datacenter, - destroyed_at: None, - environment, - id, - lifecycle: Box::new(lifecycle), - network: Box::new(network), - resources: Box::new(resources), - runtime: Box::new(runtime), - started_at: None, - tags, - } - } + pub fn new( + created_at: i64, + datacenter: uuid::Uuid, + environment: uuid::Uuid, + id: uuid::Uuid, + lifecycle: crate::models::ServersLifecycle, + network: crate::models::ServersNetwork, + resources: crate::models::ServersResources, + runtime: crate::models::ServersRuntime, + tags: Option, + ) -> ServersServer { + ServersServer { + created_at, + datacenter, + destroyed_at: None, + environment, + id, + lifecycle: Box::new(lifecycle), + network: Box::new(network), + resources: Box::new(resources), + runtime: Box::new(runtime), + started_at: None, + tags, + } + } } - - diff --git a/sdks/full/rust/src/models/upload_prepare_file.rs b/sdks/full/rust/src/models/upload_prepare_file.rs index 0d197af99b..3a4e4fee92 100644 --- a/sdks/full/rust/src/models/upload_prepare_file.rs +++ b/sdks/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 { - /// Unsigned 64 bit integer. - #[serde(rename = "content_length")] - pub content_length: i64, - /// The MIME type of the file. - #[serde(rename = "content_type", skip_serializing_if = "Option::is_none")] - pub content_type: Option, - /// The path/filename of the file. - #[serde(rename = "path")] - pub path: String, + /// Unsigned 64 bit integer. + #[serde(rename = "content_length")] + pub content_length: i64, + /// The MIME type of the file. + #[serde(rename = "content_type", skip_serializing_if = "Option::is_none")] + pub content_type: Option, + /// The path/filename of the file. + #[serde(rename = "path")] + pub path: String, } impl UploadPrepareFile { - /// A file being prepared to upload. - pub fn new(content_length: i64, path: String) -> UploadPrepareFile { - UploadPrepareFile { - content_length, - content_type: None, - path, - } - } + /// A file being prepared to upload. + pub fn new(content_length: i64, path: String) -> UploadPrepareFile { + UploadPrepareFile { + content_length, + content_type: None, + path, + } + } } - - diff --git a/sdks/full/rust/src/models/upload_presigned_request.rs b/sdks/full/rust/src/models/upload_presigned_request.rs index 7f2ca3aad5..941e8799b9 100644 --- a/sdks/full/rust/src/models/upload_presigned_request.rs +++ b/sdks/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 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, + /// 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, } impl UploadPresignedRequest { - /// A presigned request used to upload files. Upload your file to the given URL via a PUT request. - pub fn new(byte_offset: i64, content_length: i64, path: String, url: String) -> UploadPresignedRequest { - UploadPresignedRequest { - byte_offset, - content_length, - path, - url, - } - } + /// A presigned request used to upload files. Upload your file to the given URL via a PUT request. + pub fn new( + byte_offset: i64, + content_length: i64, + path: String, + url: String, + ) -> UploadPresignedRequest { + UploadPresignedRequest { + byte_offset, + content_length, + path, + url, + } + } } - - diff --git a/sdks/full/rust/src/models/validation_error.rs b/sdks/full/rust/src/models/validation_error.rs index d4b2471cb7..df6f1ad56d 100644 --- a/sdks/full/rust/src/models/validation_error.rs +++ b/sdks/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/full/rust/src/models/watch_response.rs b/sdks/full/rust/src/models/watch_response.rs index d1ca872c6c..f30fc24b53 100644 --- a/sdks/full/rust/src/models/watch_response.rs +++ b/sdks/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 } + } } - -