diff --git a/.github/.kodiak.toml b/.github/.kodiak.toml new file mode 100644 index 0000000..f642dba --- /dev/null +++ b/.github/.kodiak.toml @@ -0,0 +1,15 @@ +version = 1 + +[approve] +auto_approve_usernames = ["cloudquery-ci"] + +[merge.message] +body = "pull_request_body" +cut_body_after = "Use the following steps to ensure your PR is ready to be reviewed" +cut_body_and_text = true +cut_body_before = "" +title = "pull_request_title" + +[merge] +blocking_labels = ["wip", "no automerge"] +notify_on_conflict = false diff --git a/.github/renovate.json5 b/.github/renovate.json5 new file mode 100644 index 0000000..fe4b671 --- /dev/null +++ b/.github/renovate.json5 @@ -0,0 +1,5 @@ +{ + extends: [ + "github>cloudquery/.github//.github/renovate-go-default.json5", + ], +} diff --git a/.github/workflows/gen-client.yml b/.github/workflows/gen-client.yml index 2cd3ab9..779cec8 100644 --- a/.github/workflows/gen-client.yml +++ b/.github/workflows/gen-client.yml @@ -1,25 +1,49 @@ name: Generate API Client on: - schedule: - - cron: '0 8 * * *' workflow_dispatch: +permissions: + contents: read + jobs: gen-api: timeout-minutes: 30 runs-on: ubuntu-latest steps: + - name: Generate GitHub App token + id: app-token + uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3 + with: + app-id: ${{ secrets.CQ_APP_ID }} + private-key: ${{ secrets.CQ_APP_PRIVATE_KEY }} + permission-contents: write + permission-pull-requests: write + - name: Generate GitHub App token for cloud repo + id: app-token-cloud + uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3 + with: + app-id: ${{ secrets.CQ_APP_ID }} + private-key: ${{ secrets.CQ_APP_PRIVATE_KEY }} + repositories: | + cloud + permission-contents: read - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: - token: ${{ secrets.GH_CQ_BOT }} + token: ${{ steps.app-token.outputs.token }} - name: Get Specs File run: | - curl -H "Authorization: token ${{ secrets.GH_CQ_BOT }}" https://raw.githubusercontent.com/cloudquery/cloud/main/internal/servergen/spec.json -o spec.json + curl -H "Authorization: token ${{ steps.app-token-cloud.outputs.token }}" https://raw.githubusercontent.com/cloudquery/cloud/main/cloud/internal/servergen/spec.json -o spec.json + + - name: Format Specs File + run: | + docker run --rm -v $(pwd):/local openapitools/openapi-generator-cli:v7.5.0 generate -i /local/spec.json -g openapi --skip-validate-spec -o /local/.generated + cp .generated/openapi.json spec.json + sudo rm -rf .generated - name: Set up Go 1.x - uses: actions/setup-go@v3 + uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6 with: go-version-file: go.mod @@ -28,14 +52,13 @@ jobs: go generate ./... - name: Create Pull Request - uses: peter-evans/create-pull-request@v5 + uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8 with: # required so the PR triggers workflow runs - token: ${{ secrets.GH_CQ_BOT }} + token: ${{ steps.app-token.outputs.token }} branch: fix/gen-cloudquery-api base: main title: 'fix: Generate CloudQuery Go API Client from `spec.json`' commit-message: 'fix: Generate CloudQuery Go API Client from `spec.json`' body: This PR was created by a scheduled workflow to generate the CloudQuery Go API Client from `spec.json` - author: cq-bot labels: automerge diff --git a/.github/workflows/lint_golang.yml b/.github/workflows/lint_golang.yml new file mode 100644 index 0000000..c1a8fef --- /dev/null +++ b/.github/workflows/lint_golang.yml @@ -0,0 +1,26 @@ +name: Lint +on: + push: + branches: + - main + pull_request: + branches: + - main + +permissions: + contents: read + +jobs: + golangci: + name: Lint with GolangCI + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6 + with: + go-version-file: go.mod + - name: golangci-lint + uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9 + with: + version: v2.11.4 diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml index e19ba21..9350acf 100644 --- a/.github/workflows/release-pr.yml +++ b/.github/workflows/release-pr.yml @@ -3,20 +3,36 @@ on: push: branches: - main - workflow_dispatch: + +permissions: + contents: read jobs: release-please: runs-on: ubuntu-latest timeout-minutes: 10 steps: - - uses: google-github-actions/release-please-action@v3 + - name: Generate GitHub App token + id: app-token + uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3 + with: + app-id: ${{ secrets.CQ_APP_ID }} + private-key: ${{ secrets.CQ_APP_PRIVATE_KEY }} + permission-contents: write + permission-pull-requests: write + - name: Generate GitHub App token for .github repo + id: app-token-github + uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3 + with: + app-id: ${{ secrets.CQ_APP_ID }} + private-key: ${{ secrets.CQ_APP_PRIVATE_KEY }} + repositories: | + .github + permission-actions: write + - uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4 id: release with: - release-type: go - package-name: cloudquery-api-go - token: ${{ secrets.GH_CQ_BOT }} - pull-request-title-pattern: "chore${scope}: Release${component} v${version}" + token: ${{ steps.app-token.outputs.token }} - name: Parse semver string if: steps.release.outputs.release_created id: semver_parser @@ -32,10 +48,10 @@ jobs: with: prerelease: true - name: Trigger Renovate - uses: actions/github-script@v6 + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 if: steps.release.outputs.release_created && steps.semver_parser.outputs.prerelease == '' with: - github-token: ${{ secrets.GH_CQ_BOT }} + github-token: ${{ steps.app-token-github.outputs.token }} script: | github.rest.actions.createWorkflowDispatch({ owner: 'cloudquery', diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml new file mode 100644 index 0000000..e7411f0 --- /dev/null +++ b/.github/workflows/unittest.yml @@ -0,0 +1,31 @@ +name: "Unit tests" +on: + push: + branches: + - main + pull_request: + branches: + - main + +permissions: + contents: read + +jobs: + unitests: + timeout-minutes: 30 + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + - name: Set up Go 1.x + uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6 + with: + go-version-file: go.mod + - run: go mod download + - run: go build ./... + - name: Run tests + run: make test diff --git a/.gitignore b/.gitignore index 3b735ec..35a66d0 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,6 @@ # Go workspace file go.work + +# Intellij IDE file +.idea diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..f70c31b --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "1.14.9" +} diff --git a/CHANGELOG.md b/CHANGELOG.md index 6181728..6675811 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,726 @@ # Changelog +## [1.14.9](https://github.com/cloudquery/cloudquery-api-go/compare/v1.14.8...v1.14.9) (2026-03-26) + + +### Bug Fixes + +* **deps:** Update dependency go to v1.26.1 ([#270](https://github.com/cloudquery/cloudquery-api-go/issues/270)) ([d3418b9](https://github.com/cloudquery/cloudquery-api-go/commit/d3418b9f822b1d674b96294fe4b9b2dda67d8361)) +* Generate CloudQuery Go API Client from `spec.json` ([#348](https://github.com/cloudquery/cloudquery-api-go/issues/348)) ([0fc0f99](https://github.com/cloudquery/cloudquery-api-go/commit/0fc0f991252b688bdf3a94ceb940c0818fe6ad14)) + +## [1.14.8](https://github.com/cloudquery/cloudquery-api-go/compare/v1.14.7...v1.14.8) (2025-12-22) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#344](https://github.com/cloudquery/cloudquery-api-go/issues/344)) ([31fbfc7](https://github.com/cloudquery/cloudquery-api-go/commit/31fbfc7d15ca31395e4f3e3a6a4d2d162fd6f079)) + +## [1.14.7](https://github.com/cloudquery/cloudquery-api-go/compare/v1.14.6...v1.14.7) (2025-12-15) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#340](https://github.com/cloudquery/cloudquery-api-go/issues/340)) ([a05f180](https://github.com/cloudquery/cloudquery-api-go/commit/a05f180b68c7993a2bde94de2302fca012883c6e)) + +## [1.14.6](https://github.com/cloudquery/cloudquery-api-go/compare/v1.14.5...v1.14.6) (2025-12-02) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#331](https://github.com/cloudquery/cloudquery-api-go/issues/331)) ([04860b2](https://github.com/cloudquery/cloudquery-api-go/commit/04860b27f7a42b8928c9c3b820ec9a67f3246e99)) +* Generate CloudQuery Go API Client from `spec.json` ([#333](https://github.com/cloudquery/cloudquery-api-go/issues/333)) ([c0ea4fb](https://github.com/cloudquery/cloudquery-api-go/commit/c0ea4fb176ca14761f7db0264ed48d0d0a61498a)) +* Generate CloudQuery Go API Client from `spec.json` ([#334](https://github.com/cloudquery/cloudquery-api-go/issues/334)) ([8c3d7e1](https://github.com/cloudquery/cloudquery-api-go/commit/8c3d7e17cd5454cfc38f6a8957cdec16da678794)) +* Generate CloudQuery Go API Client from `spec.json` ([#335](https://github.com/cloudquery/cloudquery-api-go/issues/335)) ([ed62fb1](https://github.com/cloudquery/cloudquery-api-go/commit/ed62fb1d3f5f2f5dd38528d6b5a7035f5fae88a1)) +* Generate CloudQuery Go API Client from `spec.json` ([#336](https://github.com/cloudquery/cloudquery-api-go/issues/336)) ([fc7968c](https://github.com/cloudquery/cloudquery-api-go/commit/fc7968c99994838255f0c57aaff3a8022e6de21b)) + +## [1.14.5](https://github.com/cloudquery/cloudquery-api-go/compare/v1.14.4...v1.14.5) (2025-10-01) + + +### Bug Fixes + +* **deps:** Update module github.com/stretchr/testify to v1.11.1 ([#326](https://github.com/cloudquery/cloudquery-api-go/issues/326)) ([50dbd12](https://github.com/cloudquery/cloudquery-api-go/commit/50dbd125a6653783a1d393358e670b1cb05d9b73)) + +## [1.14.4](https://github.com/cloudquery/cloudquery-api-go/compare/v1.14.3...v1.14.4) (2025-09-19) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#322](https://github.com/cloudquery/cloudquery-api-go/issues/322)) ([7a8ae6c](https://github.com/cloudquery/cloudquery-api-go/commit/7a8ae6c0b9e44a6725edacfecd75f195ee08d0c0)) +* Generate CloudQuery Go API Client from `spec.json` ([#324](https://github.com/cloudquery/cloudquery-api-go/issues/324)) ([03a2ab8](https://github.com/cloudquery/cloudquery-api-go/commit/03a2ab867d0d42c536921bf50fa3b04764a1c02e)) + +## [1.14.3](https://github.com/cloudquery/cloudquery-api-go/compare/v1.14.2...v1.14.3) (2025-09-15) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#319](https://github.com/cloudquery/cloudquery-api-go/issues/319)) ([b68800f](https://github.com/cloudquery/cloudquery-api-go/commit/b68800f58be3ed6d819e6eedeee08d3404642004)) +* Generate CloudQuery Go API Client from `spec.json` ([#321](https://github.com/cloudquery/cloudquery-api-go/issues/321)) ([88f276f](https://github.com/cloudquery/cloudquery-api-go/commit/88f276fde79752059ffaee10e95524f831b8c8ff)) + +## [1.14.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.14.1...v1.14.2) (2025-09-01) + + +### Bug Fixes + +* **deps:** Update module github.com/stretchr/testify to v1.11.0 ([#318](https://github.com/cloudquery/cloudquery-api-go/issues/318)) ([5e7bd4e](https://github.com/cloudquery/cloudquery-api-go/commit/5e7bd4e3688ffec36ac88501c5e4c5c50a552786)) +* Generate CloudQuery Go API Client from `spec.json` ([#312](https://github.com/cloudquery/cloudquery-api-go/issues/312)) ([cc2862f](https://github.com/cloudquery/cloudquery-api-go/commit/cc2862fbebdda98bedbab5eb36478de4bb975bfb)) +* Generate CloudQuery Go API Client from `spec.json` ([#314](https://github.com/cloudquery/cloudquery-api-go/issues/314)) ([0b6a3ce](https://github.com/cloudquery/cloudquery-api-go/commit/0b6a3cebbf2aa5eb07bf8bb787fe592680a0f560)) +* Generate CloudQuery Go API Client from `spec.json` ([#317](https://github.com/cloudquery/cloudquery-api-go/issues/317)) ([21673f6](https://github.com/cloudquery/cloudquery-api-go/commit/21673f6d91f4af4c6f487c7f7439c36208e88339)) + +## [1.14.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.14.0...v1.14.1) (2025-08-01) + + +### Bug Fixes + +* **deps:** Update module github.com/oapi-codegen/runtime to v1.1.2 ([#308](https://github.com/cloudquery/cloudquery-api-go/issues/308)) ([97e4e57](https://github.com/cloudquery/cloudquery-api-go/commit/97e4e579cf578b9b913cac7f2ddb497fe1e244d9)) + +## [1.14.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.11...v1.14.0) (2025-07-29) + + +### Features + +* Add new config key ([#307](https://github.com/cloudquery/cloudquery-api-go/issues/307)) ([f1ac7da](https://github.com/cloudquery/cloudquery-api-go/commit/f1ac7da20ab96b83aed95ebe2cc8cde3ae8457a4)) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#301](https://github.com/cloudquery/cloudquery-api-go/issues/301)) ([5975534](https://github.com/cloudquery/cloudquery-api-go/commit/59755345cde7833d65c67d9425bcd4c47b6a2856)) +* Generate CloudQuery Go API Client from `spec.json` ([#303](https://github.com/cloudquery/cloudquery-api-go/issues/303)) ([a5a438d](https://github.com/cloudquery/cloudquery-api-go/commit/a5a438d68a63c72cba5b08622c5fae7576b42720)) +* Generate CloudQuery Go API Client from `spec.json` ([#305](https://github.com/cloudquery/cloudquery-api-go/issues/305)) ([c479386](https://github.com/cloudquery/cloudquery-api-go/commit/c479386c885f36da1fbe7bf74f7f08e1ed544fa0)) +* Generate CloudQuery Go API Client from `spec.json` ([#306](https://github.com/cloudquery/cloudquery-api-go/issues/306)) ([683c7bf](https://github.com/cloudquery/cloudquery-api-go/commit/683c7bf7f717503e0f130ccc4f2aacd9fca5cc19)) + +## [1.13.11](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.10...v1.13.11) (2025-07-01) + + +### Bug Fixes + +* **deps:** Update module github.com/hashicorp/go-retryablehttp to v0.7.8 ([#299](https://github.com/cloudquery/cloudquery-api-go/issues/299)) ([d64f973](https://github.com/cloudquery/cloudquery-api-go/commit/d64f97314476bd2ac7d8d84a88a5acd28a2be461)) + +## [1.13.10](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.9...v1.13.10) (2025-06-27) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#295](https://github.com/cloudquery/cloudquery-api-go/issues/295)) ([93d1444](https://github.com/cloudquery/cloudquery-api-go/commit/93d1444f3497066bf41b761b8ae953813113fe1d)) +* Generate CloudQuery Go API Client from `spec.json` ([#297](https://github.com/cloudquery/cloudquery-api-go/issues/297)) ([57ee37d](https://github.com/cloudquery/cloudquery-api-go/commit/57ee37d0133b774de13d2c81f8e8ec4faadb587e)) + +## [1.13.9](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.8...v1.13.9) (2025-05-07) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#286](https://github.com/cloudquery/cloudquery-api-go/issues/286)) ([f9fb5a6](https://github.com/cloudquery/cloudquery-api-go/commit/f9fb5a69d73d228cfd275e2baddb8c7cb863599e)) +* Generate CloudQuery Go API Client from `spec.json` ([#288](https://github.com/cloudquery/cloudquery-api-go/issues/288)) ([f942abe](https://github.com/cloudquery/cloudquery-api-go/commit/f942abe0da733d49612019f7cda6185118d073eb)) +* Generate CloudQuery Go API Client from `spec.json` ([#289](https://github.com/cloudquery/cloudquery-api-go/issues/289)) ([998358c](https://github.com/cloudquery/cloudquery-api-go/commit/998358c23f530e44a61b656b2fe783e1f3056f46)) +* Generate CloudQuery Go API Client from `spec.json` ([#290](https://github.com/cloudquery/cloudquery-api-go/issues/290)) ([0c327a7](https://github.com/cloudquery/cloudquery-api-go/commit/0c327a726ac3dec0061a44ae3e69c3d04459fc74)) +* Generate CloudQuery Go API Client from `spec.json` ([#291](https://github.com/cloudquery/cloudquery-api-go/issues/291)) ([74639ed](https://github.com/cloudquery/cloudquery-api-go/commit/74639eda923f0900d54fba7eb601d4703a1b8705)) +* Generate CloudQuery Go API Client from `spec.json` ([#292](https://github.com/cloudquery/cloudquery-api-go/issues/292)) ([a081596](https://github.com/cloudquery/cloudquery-api-go/commit/a081596632931d6e5ba696a728da502605902aac)) +* Generate CloudQuery Go API Client from `spec.json` ([#294](https://github.com/cloudquery/cloudquery-api-go/issues/294)) ([3639c91](https://github.com/cloudquery/cloudquery-api-go/commit/3639c918111c7128696b598036cd7eda09f89bb4)) + +## [1.13.8](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.7...v1.13.8) (2025-03-31) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#281](https://github.com/cloudquery/cloudquery-api-go/issues/281)) ([1b3bb9f](https://github.com/cloudquery/cloudquery-api-go/commit/1b3bb9f4af55e68487f0855f047fa3b688e28349)) + +## [1.13.7](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.6...v1.13.7) (2025-03-13) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#278](https://github.com/cloudquery/cloudquery-api-go/issues/278)) ([71cb41f](https://github.com/cloudquery/cloudquery-api-go/commit/71cb41f0d429ce06872fd1f7554eef5f887bb565)) +* Generate CloudQuery Go API Client from `spec.json` ([#280](https://github.com/cloudquery/cloudquery-api-go/issues/280)) ([bd0afda](https://github.com/cloudquery/cloudquery-api-go/commit/bd0afda36b76b447b8d80261923c17e98f849fdc)) + +## [1.13.6](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.5...v1.13.6) (2025-03-01) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#274](https://github.com/cloudquery/cloudquery-api-go/issues/274)) ([aeebd1d](https://github.com/cloudquery/cloudquery-api-go/commit/aeebd1d47e505f6fb09f57c08c41cbca4a71a7b0)) +* Generate CloudQuery Go API Client from `spec.json` ([#276](https://github.com/cloudquery/cloudquery-api-go/issues/276)) ([0406903](https://github.com/cloudquery/cloudquery-api-go/commit/040690319106ba9d245a2052fc7ccea794ce426d)) + +## [1.13.5](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.4...v1.13.5) (2024-12-19) + + +### Bug Fixes + +* **deps:** Update module github.com/adrg/xdg to v0.5.3 ([#259](https://github.com/cloudquery/cloudquery-api-go/issues/259)) ([9c97ad9](https://github.com/cloudquery/cloudquery-api-go/commit/9c97ad9edca9906f86bd717fbf5ad9d2a1bf9dc2)) +* **deps:** Update module github.com/stretchr/testify to v1.10.0 ([#260](https://github.com/cloudquery/cloudquery-api-go/issues/260)) ([c5c30db](https://github.com/cloudquery/cloudquery-api-go/commit/c5c30dbabb9facc50d2d0e06870c23b03bbefebf)) +* Trim API token on read to avoid accidental line break issues ([#269](https://github.com/cloudquery/cloudquery-api-go/issues/269)) ([89f4cef](https://github.com/cloudquery/cloudquery-api-go/commit/89f4cefa15bed372e08277a7232aa802d4e97db4)) + +## [1.13.4](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.3...v1.13.4) (2024-12-02) + + +### Bug Fixes + +* **deps:** Bump github.com/hashicorp/go-retryablehttp from 0.7.5 to 0.7.7 ([#255](https://github.com/cloudquery/cloudquery-api-go/issues/255)) ([c628e2a](https://github.com/cloudquery/cloudquery-api-go/commit/c628e2add9f77e8a1dfe5fa7dad213cb86eb5d44)) + +## [1.13.3](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.2...v1.13.3) (2024-12-02) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#251](https://github.com/cloudquery/cloudquery-api-go/issues/251)) ([fba35bb](https://github.com/cloudquery/cloudquery-api-go/commit/fba35bb6907fdf07f3324fb3e6a6d327497f8c2c)) + +## [1.13.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.1...v1.13.2) (2024-11-27) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#243](https://github.com/cloudquery/cloudquery-api-go/issues/243)) ([75fe815](https://github.com/cloudquery/cloudquery-api-go/commit/75fe815a0062fa103c6e1a7c307d64b6cf5862f1)) +* Generate CloudQuery Go API Client from `spec.json` ([#245](https://github.com/cloudquery/cloudquery-api-go/issues/245)) ([1ba37da](https://github.com/cloudquery/cloudquery-api-go/commit/1ba37dac1a79ecad11d4b683728ee34c8c3e992f)) +* Generate CloudQuery Go API Client from `spec.json` ([#246](https://github.com/cloudquery/cloudquery-api-go/issues/246)) ([10b3917](https://github.com/cloudquery/cloudquery-api-go/commit/10b3917a5b8e17819090f27636b64d0ee4d429c9)) +* Generate CloudQuery Go API Client from `spec.json` ([#247](https://github.com/cloudquery/cloudquery-api-go/issues/247)) ([de64e70](https://github.com/cloudquery/cloudquery-api-go/commit/de64e703f5be9449d4db9c9695b7e1a0532192ca)) +* Generate CloudQuery Go API Client from `spec.json` ([#248](https://github.com/cloudquery/cloudquery-api-go/issues/248)) ([e20a7e9](https://github.com/cloudquery/cloudquery-api-go/commit/e20a7e92338e9925a1c8894891a87fd4bedc38de)) +* Generate CloudQuery Go API Client from `spec.json` ([#249](https://github.com/cloudquery/cloudquery-api-go/issues/249)) ([9f8c47b](https://github.com/cloudquery/cloudquery-api-go/commit/9f8c47b22672e40942d0f9860dc36a25566cc246)) +* Generate CloudQuery Go API Client from `spec.json` ([#250](https://github.com/cloudquery/cloudquery-api-go/issues/250)) ([c49fede](https://github.com/cloudquery/cloudquery-api-go/commit/c49fede7906195bd5dfe1038a9f7fdda93682a80)) + +## [1.13.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.13.0...v1.13.1) (2024-09-24) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#228](https://github.com/cloudquery/cloudquery-api-go/issues/228)) ([310278f](https://github.com/cloudquery/cloudquery-api-go/commit/310278f4b5c9871cf3588007d4eb49e0f56b8e13)) +* Generate CloudQuery Go API Client from `spec.json` ([#230](https://github.com/cloudquery/cloudquery-api-go/issues/230)) ([9fe6755](https://github.com/cloudquery/cloudquery-api-go/commit/9fe67555586fc9ef924c361e06d96345b3af8f2d)) +* Generate CloudQuery Go API Client from `spec.json` ([#231](https://github.com/cloudquery/cloudquery-api-go/issues/231)) ([b456ab7](https://github.com/cloudquery/cloudquery-api-go/commit/b456ab79a3eea0ad6414c79b1fa9c8fb64f532f2)) +* Generate CloudQuery Go API Client from `spec.json` ([#232](https://github.com/cloudquery/cloudquery-api-go/issues/232)) ([1e64d94](https://github.com/cloudquery/cloudquery-api-go/commit/1e64d94a9a313dce58b77a7927e5c18d06d57b23)) +* Generate CloudQuery Go API Client from `spec.json` ([#233](https://github.com/cloudquery/cloudquery-api-go/issues/233)) ([94adb27](https://github.com/cloudquery/cloudquery-api-go/commit/94adb274aba69874a0de62012f77c383eba69c60)) +* Generate CloudQuery Go API Client from `spec.json` ([#234](https://github.com/cloudquery/cloudquery-api-go/issues/234)) ([e4e7c1d](https://github.com/cloudquery/cloudquery-api-go/commit/e4e7c1d55ca709e835d351d28ee5bc3c7a44fb07)) +* Generate CloudQuery Go API Client from `spec.json` ([#235](https://github.com/cloudquery/cloudquery-api-go/issues/235)) ([2436ba0](https://github.com/cloudquery/cloudquery-api-go/commit/2436ba03d681d6c0f9a925f07201a57c8a6a322d)) +* Generate CloudQuery Go API Client from `spec.json` ([#236](https://github.com/cloudquery/cloudquery-api-go/issues/236)) ([2eb8ecf](https://github.com/cloudquery/cloudquery-api-go/commit/2eb8ecf59bffb2ebd43dceab4e198de73d8b1c7a)) +* Generate CloudQuery Go API Client from `spec.json` ([#237](https://github.com/cloudquery/cloudquery-api-go/issues/237)) ([528ba1c](https://github.com/cloudquery/cloudquery-api-go/commit/528ba1ced05a74bb8223e03f0fe1da2af56ed7df)) +* Generate CloudQuery Go API Client from `spec.json` ([#238](https://github.com/cloudquery/cloudquery-api-go/issues/238)) ([02a1381](https://github.com/cloudquery/cloudquery-api-go/commit/02a1381bc54cbb876239f35a1e035d619fa2a438)) +* Generate CloudQuery Go API Client from `spec.json` ([#239](https://github.com/cloudquery/cloudquery-api-go/issues/239)) ([7a6847b](https://github.com/cloudquery/cloudquery-api-go/commit/7a6847b7ae94d9d13ae66cc946b9164c14005513)) +* Generate CloudQuery Go API Client from `spec.json` ([#240](https://github.com/cloudquery/cloudquery-api-go/issues/240)) ([1684c05](https://github.com/cloudquery/cloudquery-api-go/commit/1684c0524f802b48a7f30d015c013ca4461103a2)) +* Generate CloudQuery Go API Client from `spec.json` ([#241](https://github.com/cloudquery/cloudquery-api-go/issues/241)) ([36913c8](https://github.com/cloudquery/cloudquery-api-go/commit/36913c80e7b43d0e85f6ece270f953b2e6f092cd)) +* Generate CloudQuery Go API Client from `spec.json` ([#242](https://github.com/cloudquery/cloudquery-api-go/issues/242)) ([a8d1460](https://github.com/cloudquery/cloudquery-api-go/commit/a8d14601bf2d7880cf285d7c95deb5c6cc19082d)) + +## [1.13.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.12.9...v1.13.0) (2024-08-21) + + +### Features + +* add team_internal config key ([#224](https://github.com/cloudquery/cloudquery-api-go/issues/224)) ([b29625e](https://github.com/cloudquery/cloudquery-api-go/commit/b29625e4e682c352996f846d5eca30c54498287c)) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#225](https://github.com/cloudquery/cloudquery-api-go/issues/225)) ([6311b43](https://github.com/cloudquery/cloudquery-api-go/commit/6311b438f0b50f96114f7aba5057586056ae092d)) +* Generate CloudQuery Go API Client from `spec.json` ([#227](https://github.com/cloudquery/cloudquery-api-go/issues/227)) ([882b4b8](https://github.com/cloudquery/cloudquery-api-go/commit/882b4b8bcab6f55e055a8682c65e8d9249cf17af)) + +## [1.12.9](https://github.com/cloudquery/cloudquery-api-go/compare/v1.12.8...v1.12.9) (2024-08-19) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#222](https://github.com/cloudquery/cloudquery-api-go/issues/222)) ([0e19de5](https://github.com/cloudquery/cloudquery-api-go/commit/0e19de5955c01520b2decce8ebc0d848448c68ad)) + +## [1.12.8](https://github.com/cloudquery/cloudquery-api-go/compare/v1.12.7...v1.12.8) (2024-08-16) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#215](https://github.com/cloudquery/cloudquery-api-go/issues/215)) ([1f15d68](https://github.com/cloudquery/cloudquery-api-go/commit/1f15d68d2af2adaa53f83154cc28a2bed9c4582f)) +* Generate CloudQuery Go API Client from `spec.json` ([#217](https://github.com/cloudquery/cloudquery-api-go/issues/217)) ([d230b6b](https://github.com/cloudquery/cloudquery-api-go/commit/d230b6b22b69ab6d6e9b788cb070d97473fab67e)) +* Generate CloudQuery Go API Client from `spec.json` ([#218](https://github.com/cloudquery/cloudquery-api-go/issues/218)) ([877306f](https://github.com/cloudquery/cloudquery-api-go/commit/877306f88ede298d88e5821ca8a26891e78f9bc9)) +* Generate CloudQuery Go API Client from `spec.json` ([#219](https://github.com/cloudquery/cloudquery-api-go/issues/219)) ([c9ba02b](https://github.com/cloudquery/cloudquery-api-go/commit/c9ba02b6d3238c6413e193c8f7f8ff941051b3ec)) +* Generate CloudQuery Go API Client from `spec.json` ([#220](https://github.com/cloudquery/cloudquery-api-go/issues/220)) ([39b9bd1](https://github.com/cloudquery/cloudquery-api-go/commit/39b9bd156dbeb2daa9495d6600f4769ab033aaa7)) +* Generate CloudQuery Go API Client from `spec.json` ([#221](https://github.com/cloudquery/cloudquery-api-go/issues/221)) ([cc7d1ee](https://github.com/cloudquery/cloudquery-api-go/commit/cc7d1ee5ab0fbfa409e140c084cfb70fe49255dd)) + +## [1.12.7](https://github.com/cloudquery/cloudquery-api-go/compare/v1.12.6...v1.12.7) (2024-08-06) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#212](https://github.com/cloudquery/cloudquery-api-go/issues/212)) ([54c40ed](https://github.com/cloudquery/cloudquery-api-go/commit/54c40edf6254fbf3f252659c19920c9c3b155fe7)) +* Generate CloudQuery Go API Client from `spec.json` ([#214](https://github.com/cloudquery/cloudquery-api-go/issues/214)) ([1c65a7e](https://github.com/cloudquery/cloudquery-api-go/commit/1c65a7e2fb2b38c0a73860de6e1e897ad8eba20b)) + +## [1.12.6](https://github.com/cloudquery/cloudquery-api-go/compare/v1.12.5...v1.12.6) (2024-08-02) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#210](https://github.com/cloudquery/cloudquery-api-go/issues/210)) ([b233506](https://github.com/cloudquery/cloudquery-api-go/commit/b2335062d61468d791f0719e7257752db84ced44)) + +## [1.12.5](https://github.com/cloudquery/cloudquery-api-go/compare/v1.12.4...v1.12.5) (2024-07-31) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#207](https://github.com/cloudquery/cloudquery-api-go/issues/207)) ([ac1f821](https://github.com/cloudquery/cloudquery-api-go/commit/ac1f821d8a6ee9a28014131818f5f579b3fb28ff)) +* Generate CloudQuery Go API Client from `spec.json` ([#209](https://github.com/cloudquery/cloudquery-api-go/issues/209)) ([fe9d914](https://github.com/cloudquery/cloudquery-api-go/commit/fe9d914b40884ad28a494fcc61cb08072976ab1e)) + +## [1.12.4](https://github.com/cloudquery/cloudquery-api-go/compare/v1.12.3...v1.12.4) (2024-07-29) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#202](https://github.com/cloudquery/cloudquery-api-go/issues/202)) ([d3871d3](https://github.com/cloudquery/cloudquery-api-go/commit/d3871d3c8feeeaace134ef32446b563068739330)) +* Generate CloudQuery Go API Client from `spec.json` ([#204](https://github.com/cloudquery/cloudquery-api-go/issues/204)) ([1c4be5b](https://github.com/cloudquery/cloudquery-api-go/commit/1c4be5bfdca67bc0b519c14fd2d8b9d3fc4e6cc4)) +* Generate CloudQuery Go API Client from `spec.json` ([#206](https://github.com/cloudquery/cloudquery-api-go/issues/206)) ([3cd27b8](https://github.com/cloudquery/cloudquery-api-go/commit/3cd27b8898f02b7e41cef5f16886e81a75b73765)) + +## [1.12.3](https://github.com/cloudquery/cloudquery-api-go/compare/v1.12.2...v1.12.3) (2024-07-19) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#198](https://github.com/cloudquery/cloudquery-api-go/issues/198)) ([7045185](https://github.com/cloudquery/cloudquery-api-go/commit/7045185d92d7590880a563cf6c61112216cdbfaf)) +* Generate CloudQuery Go API Client from `spec.json` ([#200](https://github.com/cloudquery/cloudquery-api-go/issues/200)) ([d307710](https://github.com/cloudquery/cloudquery-api-go/commit/d3077102422d6fb3a837719bc2514e3ea583477b)) +* Generate CloudQuery Go API Client from `spec.json` ([#201](https://github.com/cloudquery/cloudquery-api-go/issues/201)) ([a2c07e1](https://github.com/cloudquery/cloudquery-api-go/commit/a2c07e196f223af9336298619195e3d335e6984e)) + +## [1.12.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.12.1...v1.12.2) (2024-07-17) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#194](https://github.com/cloudquery/cloudquery-api-go/issues/194)) ([28d4679](https://github.com/cloudquery/cloudquery-api-go/commit/28d4679c5f825d92857967e099f2b3b6038ea635)) +* Generate CloudQuery Go API Client from `spec.json` ([#197](https://github.com/cloudquery/cloudquery-api-go/issues/197)) ([612e02f](https://github.com/cloudquery/cloudquery-api-go/commit/612e02fc917d594356df918c87928cb33bdfd707)) + +## [1.12.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.12.0...v1.12.1) (2024-07-04) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#190](https://github.com/cloudquery/cloudquery-api-go/issues/190)) ([ecacca7](https://github.com/cloudquery/cloudquery-api-go/commit/ecacca723f46efdd4bbbeaf9d1f1aed8f95fecb7)) +* Generate CloudQuery Go API Client from `spec.json` ([#192](https://github.com/cloudquery/cloudquery-api-go/issues/192)) ([e427c4a](https://github.com/cloudquery/cloudquery-api-go/commit/e427c4a81f1c8d1fee239d594e3f1280dd9eda52)) + +## [1.12.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.11.3...v1.12.0) (2024-07-03) + + +### Features + +* Upgrade oapi-codegen version ([#189](https://github.com/cloudquery/cloudquery-api-go/issues/189)) ([b478180](https://github.com/cloudquery/cloudquery-api-go/commit/b478180b847da753d6283533479381ae008bd974)) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#170](https://github.com/cloudquery/cloudquery-api-go/issues/170)) ([cfc4eed](https://github.com/cloudquery/cloudquery-api-go/commit/cfc4eed76e9122d702c6e249cb9ab5acaca17ee3)) +* Generate CloudQuery Go API Client from `spec.json` ([#172](https://github.com/cloudquery/cloudquery-api-go/issues/172)) ([0557f6e](https://github.com/cloudquery/cloudquery-api-go/commit/0557f6e7c60b1cdf45d65005046af2a282f957da)) +* Generate CloudQuery Go API Client from `spec.json` ([#173](https://github.com/cloudquery/cloudquery-api-go/issues/173)) ([ded4693](https://github.com/cloudquery/cloudquery-api-go/commit/ded46932fad761ed5e8ecee8a05170e111c302d4)) +* Generate CloudQuery Go API Client from `spec.json` ([#174](https://github.com/cloudquery/cloudquery-api-go/issues/174)) ([f42ea7f](https://github.com/cloudquery/cloudquery-api-go/commit/f42ea7f7c639fe22dff6b90cc7c4b4fb92550dc4)) +* Generate CloudQuery Go API Client from `spec.json` ([#175](https://github.com/cloudquery/cloudquery-api-go/issues/175)) ([e7930cc](https://github.com/cloudquery/cloudquery-api-go/commit/e7930cc35a92f93527e916c2b0bd4d5cf04ce11f)) +* Generate CloudQuery Go API Client from `spec.json` ([#176](https://github.com/cloudquery/cloudquery-api-go/issues/176)) ([58bf785](https://github.com/cloudquery/cloudquery-api-go/commit/58bf785bbb8ca97a1f604cabd7ffd7b5d4b3afec)) +* Generate CloudQuery Go API Client from `spec.json` ([#177](https://github.com/cloudquery/cloudquery-api-go/issues/177)) ([fd9a4ef](https://github.com/cloudquery/cloudquery-api-go/commit/fd9a4efb75db2ab775257ce98e84547c70889556)) +* Generate CloudQuery Go API Client from `spec.json` ([#178](https://github.com/cloudquery/cloudquery-api-go/issues/178)) ([99ac21b](https://github.com/cloudquery/cloudquery-api-go/commit/99ac21b8ad9747624e74864b454b50a75fe9fa23)) +* Generate CloudQuery Go API Client from `spec.json` ([#179](https://github.com/cloudquery/cloudquery-api-go/issues/179)) ([0386cad](https://github.com/cloudquery/cloudquery-api-go/commit/0386cad9556e21bb60bf5435fef27d1e00507fa4)) +* Generate CloudQuery Go API Client from `spec.json` ([#180](https://github.com/cloudquery/cloudquery-api-go/issues/180)) ([a6ad886](https://github.com/cloudquery/cloudquery-api-go/commit/a6ad88671b21578349f4c8c359b02fa187cb0043)) +* Generate CloudQuery Go API Client from `spec.json` ([#181](https://github.com/cloudquery/cloudquery-api-go/issues/181)) ([03c7442](https://github.com/cloudquery/cloudquery-api-go/commit/03c744269ff40f8babfd670508a7f773417d8637)) +* Generate CloudQuery Go API Client from `spec.json` ([#182](https://github.com/cloudquery/cloudquery-api-go/issues/182)) ([4c194a7](https://github.com/cloudquery/cloudquery-api-go/commit/4c194a72ebda5dd0f5412ab1e4d0af4d7c0ccf83)) +* Generate CloudQuery Go API Client from `spec.json` ([#183](https://github.com/cloudquery/cloudquery-api-go/issues/183)) ([6ac8600](https://github.com/cloudquery/cloudquery-api-go/commit/6ac86009d72e9884ae48284ae428aba43d0eeb53)) +* Generate CloudQuery Go API Client from `spec.json` ([#184](https://github.com/cloudquery/cloudquery-api-go/issues/184)) ([bef70d4](https://github.com/cloudquery/cloudquery-api-go/commit/bef70d4b346f1361de5bac3110eee4c567118594)) +* Generate CloudQuery Go API Client from `spec.json` ([#185](https://github.com/cloudquery/cloudquery-api-go/issues/185)) ([e2b4aba](https://github.com/cloudquery/cloudquery-api-go/commit/e2b4aba01a86951a9ee955beb32d1ce2bd11fd6e)) +* Generate CloudQuery Go API Client from `spec.json` ([#186](https://github.com/cloudquery/cloudquery-api-go/issues/186)) ([170ae88](https://github.com/cloudquery/cloudquery-api-go/commit/170ae888837baaec7559710390801f0b1bf22822)) +* Generate CloudQuery Go API Client from `spec.json` ([#187](https://github.com/cloudquery/cloudquery-api-go/issues/187)) ([63205b9](https://github.com/cloudquery/cloudquery-api-go/commit/63205b94db002ba554b7924d2469cde5d29a0096)) +* Generate CloudQuery Go API Client from `spec.json` ([#188](https://github.com/cloudquery/cloudquery-api-go/issues/188)) ([3ebded6](https://github.com/cloudquery/cloudquery-api-go/commit/3ebded6d6ca274eb8a7e0538ce94fd3851f77ecf)) + +## [1.11.3](https://github.com/cloudquery/cloudquery-api-go/compare/v1.11.2...v1.11.3) (2024-05-30) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#166](https://github.com/cloudquery/cloudquery-api-go/issues/166)) ([a596adc](https://github.com/cloudquery/cloudquery-api-go/commit/a596adc8b5c06e5c7312dd5cf002b61e9dc71107)) +* Generate CloudQuery Go API Client from `spec.json` ([#168](https://github.com/cloudquery/cloudquery-api-go/issues/168)) ([0706f83](https://github.com/cloudquery/cloudquery-api-go/commit/0706f83b76745bc9fedb111c6dbd018ca2fa90da)) +* Generate CloudQuery Go API Client from `spec.json` ([#169](https://github.com/cloudquery/cloudquery-api-go/issues/169)) ([2cdf436](https://github.com/cloudquery/cloudquery-api-go/commit/2cdf436608b4d01a2ebccaa0769c57468e1c5499)) + +## [1.11.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.11.1...v1.11.2) (2024-05-17) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#164](https://github.com/cloudquery/cloudquery-api-go/issues/164)) ([36294a6](https://github.com/cloudquery/cloudquery-api-go/commit/36294a688773187f26e424893022e98ec812dd14)) + +## [1.11.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.11.0...v1.11.1) (2024-05-10) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#162](https://github.com/cloudquery/cloudquery-api-go/issues/162)) ([aec32b3](https://github.com/cloudquery/cloudquery-api-go/commit/aec32b3fcbb581689dd0dd02c5604a63392ba0e4)) + +## [1.11.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.10.0...v1.11.0) (2024-05-09) + + +### Features + +* Extract nested properties in their own structs ([#158](https://github.com/cloudquery/cloudquery-api-go/issues/158)) ([01453e3](https://github.com/cloudquery/cloudquery-api-go/commit/01453e3bf74fa1f9f36a43c9ae78e4130a254f52)) + +## [1.10.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.9.2...v1.10.0) (2024-05-08) + + +### Features + +* Use consistent enum naming ([#159](https://github.com/cloudquery/cloudquery-api-go/issues/159)) ([3d854f8](https://github.com/cloudquery/cloudquery-api-go/commit/3d854f8120d9bbb7a6c80c1c61f1a5a3c2cf5c20)) + +## [1.9.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.9.1...v1.9.2) (2024-05-06) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#146](https://github.com/cloudquery/cloudquery-api-go/issues/146)) ([a90e87b](https://github.com/cloudquery/cloudquery-api-go/commit/a90e87b9f0025bdf7a4badf17927369dc167916a)) +* Generate CloudQuery Go API Client from `spec.json` ([#148](https://github.com/cloudquery/cloudquery-api-go/issues/148)) ([15e0252](https://github.com/cloudquery/cloudquery-api-go/commit/15e02524a5da068c9cc104a3d0ce09c1a268c093)) +* Generate CloudQuery Go API Client from `spec.json` ([#149](https://github.com/cloudquery/cloudquery-api-go/issues/149)) ([33fe0a6](https://github.com/cloudquery/cloudquery-api-go/commit/33fe0a62af1b44e23908e4cc308b6585a96e095d)) +* Generate CloudQuery Go API Client from `spec.json` ([#150](https://github.com/cloudquery/cloudquery-api-go/issues/150)) ([7885344](https://github.com/cloudquery/cloudquery-api-go/commit/788534459b01f2786bb8dd7a840f49743995b471)) +* Generate CloudQuery Go API Client from `spec.json` ([#151](https://github.com/cloudquery/cloudquery-api-go/issues/151)) ([cd9aa44](https://github.com/cloudquery/cloudquery-api-go/commit/cd9aa4416b92b586b754906b7772d998822e1c28)) +* Generate CloudQuery Go API Client from `spec.json` ([#152](https://github.com/cloudquery/cloudquery-api-go/issues/152)) ([57939a5](https://github.com/cloudquery/cloudquery-api-go/commit/57939a53deb3f8bd2c7219ae0ebe58633e3c8adf)) +* Generate CloudQuery Go API Client from `spec.json` ([#153](https://github.com/cloudquery/cloudquery-api-go/issues/153)) ([13e63ad](https://github.com/cloudquery/cloudquery-api-go/commit/13e63ad91365ea906dec430b68d7255261a091fa)) +* Generate CloudQuery Go API Client from `spec.json` ([#154](https://github.com/cloudquery/cloudquery-api-go/issues/154)) ([ecfd659](https://github.com/cloudquery/cloudquery-api-go/commit/ecfd6590a9e8a183be8de0fc56d790513c4b3b36)) +* Generate CloudQuery Go API Client from `spec.json` ([#155](https://github.com/cloudquery/cloudquery-api-go/issues/155)) ([1b3d18c](https://github.com/cloudquery/cloudquery-api-go/commit/1b3d18ce2ee5dc61edce4767c70b04026fd095bb)) +* Generate CloudQuery Go API Client from `spec.json` ([#156](https://github.com/cloudquery/cloudquery-api-go/issues/156)) ([bffc1b7](https://github.com/cloudquery/cloudquery-api-go/commit/bffc1b7219558250661590d6c6342da3408b7690)) +* Generate CloudQuery Go API Client from `spec.json` ([#157](https://github.com/cloudquery/cloudquery-api-go/issues/157)) ([6846e84](https://github.com/cloudquery/cloudquery-api-go/commit/6846e843cc68715a9110947add0a312c74dc21f5)) + +## [1.9.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.9.0...v1.9.1) (2024-04-04) + + +### Bug Fixes + +* Disable retry logging ([#144](https://github.com/cloudquery/cloudquery-api-go/issues/144)) ([738de6d](https://github.com/cloudquery/cloudquery-api-go/commit/738de6d0c2b5e8d260e33f8ccd7343fc7a291c49)) +* Generate CloudQuery Go API Client from `spec.json` ([#142](https://github.com/cloudquery/cloudquery-api-go/issues/142)) ([b8ead7c](https://github.com/cloudquery/cloudquery-api-go/commit/b8ead7c4ae372f36266dd437f0590067ce731598)) + +## [1.9.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.8.1...v1.9.0) (2024-03-28) + + +### Features + +* Add retry to API requests ([#141](https://github.com/cloudquery/cloudquery-api-go/issues/141)) ([bf7b4e6](https://github.com/cloudquery/cloudquery-api-go/commit/bf7b4e60808a4c48de4b5d9b83cb2d9968e2dc17)) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#139](https://github.com/cloudquery/cloudquery-api-go/issues/139)) ([0eb7391](https://github.com/cloudquery/cloudquery-api-go/commit/0eb73912341ed29313c58d35828f7e548e5893fc)) + +## [1.8.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.8.0...v1.8.1) (2024-03-18) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#137](https://github.com/cloudquery/cloudquery-api-go/issues/137)) ([ffde20a](https://github.com/cloudquery/cloudquery-api-go/commit/ffde20a66dd68faab42e67b77ebf7fd84ca0235b)) + +## [1.8.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.7.5...v1.8.0) (2024-03-15) + + +### Features + +* Support sync test connection API tokens ([#135](https://github.com/cloudquery/cloudquery-api-go/issues/135)) ([7695310](https://github.com/cloudquery/cloudquery-api-go/commit/76953109904102e91eae7462b3e73f5d03ae6b2a)) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#130](https://github.com/cloudquery/cloudquery-api-go/issues/130)) ([aca9d0c](https://github.com/cloudquery/cloudquery-api-go/commit/aca9d0c5123faf62de5e70bc139ba0015f830629)) +* Generate CloudQuery Go API Client from `spec.json` ([#132](https://github.com/cloudquery/cloudquery-api-go/issues/132)) ([84ee52e](https://github.com/cloudquery/cloudquery-api-go/commit/84ee52e4cd8feed20ddb31009280af9c2b46909c)) +* Generate CloudQuery Go API Client from `spec.json` ([#133](https://github.com/cloudquery/cloudquery-api-go/issues/133)) ([9e72ad2](https://github.com/cloudquery/cloudquery-api-go/commit/9e72ad24f24bfd51ce1842b2866dd74938e7464d)) +* Generate CloudQuery Go API Client from `spec.json` ([#134](https://github.com/cloudquery/cloudquery-api-go/issues/134)) ([107e98f](https://github.com/cloudquery/cloudquery-api-go/commit/107e98fb861d35f8fa44d112757f1959dff8c5e6)) + +## [1.7.5](https://github.com/cloudquery/cloudquery-api-go/compare/v1.7.4...v1.7.5) (2024-02-16) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#127](https://github.com/cloudquery/cloudquery-api-go/issues/127)) ([248816e](https://github.com/cloudquery/cloudquery-api-go/commit/248816e168734cf9b14913103999800008a491c2)) +* Generate CloudQuery Go API Client from `spec.json` ([#129](https://github.com/cloudquery/cloudquery-api-go/issues/129)) ([b680d68](https://github.com/cloudquery/cloudquery-api-go/commit/b680d6879e7b99ad3cea24a09883ff2a705194b9)) + +## [1.7.4](https://github.com/cloudquery/cloudquery-api-go/compare/v1.7.3...v1.7.4) (2024-02-14) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#121](https://github.com/cloudquery/cloudquery-api-go/issues/121)) ([a4a1c08](https://github.com/cloudquery/cloudquery-api-go/commit/a4a1c08e064a0e0a3a377001a0730bf481c633ab)) +* Generate CloudQuery Go API Client from `spec.json` ([#123](https://github.com/cloudquery/cloudquery-api-go/issues/123)) ([37ddfcc](https://github.com/cloudquery/cloudquery-api-go/commit/37ddfcc2ae4e2505ab7e1783850a39fdda361756)) +* Generate CloudQuery Go API Client from `spec.json` ([#124](https://github.com/cloudquery/cloudquery-api-go/issues/124)) ([fc41e37](https://github.com/cloudquery/cloudquery-api-go/commit/fc41e371042da4be7420df48524b4d8c82af75ed)) +* Generate CloudQuery Go API Client from `spec.json` ([#125](https://github.com/cloudquery/cloudquery-api-go/issues/125)) ([daa185d](https://github.com/cloudquery/cloudquery-api-go/commit/daa185d354063a2d21698c629f84178812a5d882)) +* Generate CloudQuery Go API Client from `spec.json` ([#126](https://github.com/cloudquery/cloudquery-api-go/issues/126)) ([5a45b73](https://github.com/cloudquery/cloudquery-api-go/commit/5a45b734fb24be6a3316516bb61404e8b73ff698)) + +## [1.7.3](https://github.com/cloudquery/cloudquery-api-go/compare/v1.7.2...v1.7.3) (2024-02-01) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#118](https://github.com/cloudquery/cloudquery-api-go/issues/118)) ([c545ec6](https://github.com/cloudquery/cloudquery-api-go/commit/c545ec69b9fd356b28516979d439d2b4f75e8a9f)) +* Generate CloudQuery Go API Client from `spec.json` ([#120](https://github.com/cloudquery/cloudquery-api-go/issues/120)) ([140f2fe](https://github.com/cloudquery/cloudquery-api-go/commit/140f2fe262e80c9c915dce3726d8b5978c437805)) + +## [1.7.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.7.1...v1.7.2) (2024-01-31) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#116](https://github.com/cloudquery/cloudquery-api-go/issues/116)) ([c4915d7](https://github.com/cloudquery/cloudquery-api-go/commit/c4915d7dc638c092f1f2c97a1c9f06e8d9e11d52)) + +## [1.7.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.7.0...v1.7.1) (2024-01-31) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#111](https://github.com/cloudquery/cloudquery-api-go/issues/111)) ([5ac719b](https://github.com/cloudquery/cloudquery-api-go/commit/5ac719bb0633c3c8d923a8227bd410ecff6a5b75)) +* Generate CloudQuery Go API Client from `spec.json` ([#113](https://github.com/cloudquery/cloudquery-api-go/issues/113)) ([7267cc4](https://github.com/cloudquery/cloudquery-api-go/commit/7267cc42921a60a6125aa6d1efa787ace164bd80)) +* Generate CloudQuery Go API Client from `spec.json` ([#115](https://github.com/cloudquery/cloudquery-api-go/issues/115)) ([d8528b0](https://github.com/cloudquery/cloudquery-api-go/commit/d8528b0b610c7a67e990421cdafd391123de4afb)) + +## [1.7.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.6.5...v1.7.0) (2024-01-23) + + +### Features + +* Add Sync Run API Token Type ([#109](https://github.com/cloudquery/cloudquery-api-go/issues/109)) ([f1bcc50](https://github.com/cloudquery/cloudquery-api-go/commit/f1bcc50c874ba18f66acc38a43a87ce8a4140cd7)) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#107](https://github.com/cloudquery/cloudquery-api-go/issues/107)) ([3e8e533](https://github.com/cloudquery/cloudquery-api-go/commit/3e8e5331a7e6d661e4919828aa65e7a6a80fe524)) +* Generate CloudQuery Go API Client from `spec.json` ([#110](https://github.com/cloudquery/cloudquery-api-go/issues/110)) ([bcf1462](https://github.com/cloudquery/cloudquery-api-go/commit/bcf1462886b934c9cdb4754c37f45e48b1ba9d5d)) + +## [1.6.5](https://github.com/cloudquery/cloudquery-api-go/compare/v1.6.4...v1.6.5) (2024-01-18) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#102](https://github.com/cloudquery/cloudquery-api-go/issues/102)) ([10fd8e4](https://github.com/cloudquery/cloudquery-api-go/commit/10fd8e4a9f4f5867b8cb2af4a84400e967f8aa84)) +* Generate CloudQuery Go API Client from `spec.json` ([#104](https://github.com/cloudquery/cloudquery-api-go/issues/104)) ([4849707](https://github.com/cloudquery/cloudquery-api-go/commit/48497073af826fa8480e3780341199e7d3d642ca)) +* Generate CloudQuery Go API Client from `spec.json` ([#105](https://github.com/cloudquery/cloudquery-api-go/issues/105)) ([5f5b960](https://github.com/cloudquery/cloudquery-api-go/commit/5f5b9607ec97925331918e38aa5ba159c82267d7)) +* Generate CloudQuery Go API Client from `spec.json` ([#106](https://github.com/cloudquery/cloudquery-api-go/issues/106)) ([753656a](https://github.com/cloudquery/cloudquery-api-go/commit/753656a8418fa2dd09d30e6f3610b4d69b87f6c5)) + +## [1.6.4](https://github.com/cloudquery/cloudquery-api-go/compare/v1.6.3...v1.6.4) (2024-01-04) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#100](https://github.com/cloudquery/cloudquery-api-go/issues/100)) ([515b000](https://github.com/cloudquery/cloudquery-api-go/commit/515b000bd7472e41066c667e54b5c1b36bf0a5a2)) +* Generate CloudQuery Go API Client from `spec.json` ([#101](https://github.com/cloudquery/cloudquery-api-go/issues/101)) ([58275d0](https://github.com/cloudquery/cloudquery-api-go/commit/58275d0b0354ed2438c899f6a02bacd8ed50545e)) +* Generate CloudQuery Go API Client from `spec.json` ([#91](https://github.com/cloudquery/cloudquery-api-go/issues/91)) ([7de06f2](https://github.com/cloudquery/cloudquery-api-go/commit/7de06f2038c275960ad102d00cbf360947c96297)) +* Generate CloudQuery Go API Client from `spec.json` ([#93](https://github.com/cloudquery/cloudquery-api-go/issues/93)) ([0d3dea8](https://github.com/cloudquery/cloudquery-api-go/commit/0d3dea833f7be08cfa3ca973e829b1e650cddf2b)) +* Generate CloudQuery Go API Client from `spec.json` ([#94](https://github.com/cloudquery/cloudquery-api-go/issues/94)) ([e2388ba](https://github.com/cloudquery/cloudquery-api-go/commit/e2388ba3f2bf07a96f5a7f4add475365caf2d18c)) +* Generate CloudQuery Go API Client from `spec.json` ([#95](https://github.com/cloudquery/cloudquery-api-go/issues/95)) ([0f4d8b5](https://github.com/cloudquery/cloudquery-api-go/commit/0f4d8b5a8dccf977a179eaf9168a2d90fbaed4bb)) +* Generate CloudQuery Go API Client from `spec.json` ([#96](https://github.com/cloudquery/cloudquery-api-go/issues/96)) ([9a1990c](https://github.com/cloudquery/cloudquery-api-go/commit/9a1990ca787a1cbeac65676967dd746352640be3)) +* Generate CloudQuery Go API Client from `spec.json` ([#97](https://github.com/cloudquery/cloudquery-api-go/issues/97)) ([46da085](https://github.com/cloudquery/cloudquery-api-go/commit/46da0853b105b14c2b084d5a579fbbdea6255aac)) +* Generate CloudQuery Go API Client from `spec.json` ([#98](https://github.com/cloudquery/cloudquery-api-go/issues/98)) ([68874b1](https://github.com/cloudquery/cloudquery-api-go/commit/68874b1880c3c3fd1abfab834add35caa090b641)) +* Generate CloudQuery Go API Client from `spec.json` ([#99](https://github.com/cloudquery/cloudquery-api-go/issues/99)) ([84e8a5a](https://github.com/cloudquery/cloudquery-api-go/commit/84e8a5ab339a3ac360faa4443c2b6417057be7ec)) + +## [1.6.3](https://github.com/cloudquery/cloudquery-api-go/compare/v1.6.2...v1.6.3) (2023-12-18) + + +### Bug Fixes + +* Better error on expired token ([#90](https://github.com/cloudquery/cloudquery-api-go/issues/90)) ([5d40225](https://github.com/cloudquery/cloudquery-api-go/commit/5d40225648e94e8baeafec64bc88c55fb0e093a3)) +* Generate CloudQuery Go API Client from `spec.json` ([#88](https://github.com/cloudquery/cloudquery-api-go/issues/88)) ([cc496c5](https://github.com/cloudquery/cloudquery-api-go/commit/cc496c51789398000e33a07507eb6a5926b4ba0b)) + +## [1.6.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.6.1...v1.6.2) (2023-12-12) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#84](https://github.com/cloudquery/cloudquery-api-go/issues/84)) ([d60e627](https://github.com/cloudquery/cloudquery-api-go/commit/d60e62730c2e86e5b82da7c0f283b5a6ed0d97aa)) +* Generate CloudQuery Go API Client from `spec.json` ([#86](https://github.com/cloudquery/cloudquery-api-go/issues/86)) ([a859c21](https://github.com/cloudquery/cloudquery-api-go/commit/a859c21302e8a982cd38796544a838c39f3e8681)) +* Generate CloudQuery Go API Client from `spec.json` ([#87](https://github.com/cloudquery/cloudquery-api-go/issues/87)) ([854b0df](https://github.com/cloudquery/cloudquery-api-go/commit/854b0dfa1011b27b257027573a5131122c8ff16f)) + +## [1.6.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.6.0...v1.6.1) (2023-12-07) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#76](https://github.com/cloudquery/cloudquery-api-go/issues/76)) ([d97a5b7](https://github.com/cloudquery/cloudquery-api-go/commit/d97a5b7f175719cf4b486b31229e4dfb1e2bb333)) +* Generate CloudQuery Go API Client from `spec.json` ([#78](https://github.com/cloudquery/cloudquery-api-go/issues/78)) ([52bbb81](https://github.com/cloudquery/cloudquery-api-go/commit/52bbb81b047f27878361eddccf201eda386bed6d)) +* Generate CloudQuery Go API Client from `spec.json` ([#79](https://github.com/cloudquery/cloudquery-api-go/issues/79)) ([0d4f433](https://github.com/cloudquery/cloudquery-api-go/commit/0d4f433e7ef47a78d4e8ec5f96e69f61903d51be)) +* Generate CloudQuery Go API Client from `spec.json` ([#80](https://github.com/cloudquery/cloudquery-api-go/issues/80)) ([fbffe9b](https://github.com/cloudquery/cloudquery-api-go/commit/fbffe9b7d9b5a20a717eaec3943db87f637b063f)) +* Generate CloudQuery Go API Client from `spec.json` ([#81](https://github.com/cloudquery/cloudquery-api-go/issues/81)) ([81d3ca0](https://github.com/cloudquery/cloudquery-api-go/commit/81d3ca00b0e326ea6539a7981b8eed85db7ed2cf)) +* Generate CloudQuery Go API Client from `spec.json` ([#82](https://github.com/cloudquery/cloudquery-api-go/issues/82)) ([5484cb2](https://github.com/cloudquery/cloudquery-api-go/commit/5484cb230d5705166e1c09887ff757721deb65ec)) +* Generate CloudQuery Go API Client from `spec.json` ([#83](https://github.com/cloudquery/cloudquery-api-go/issues/83)) ([57c9a3e](https://github.com/cloudquery/cloudquery-api-go/commit/57c9a3e6dd6a8c4c596a92c7324e162f9f0be383)) + +## [1.6.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.5.1...v1.6.0) (2023-11-16) + + +### Features + +* Add method to return token type ([#75](https://github.com/cloudquery/cloudquery-api-go/issues/75)) ([e07af9f](https://github.com/cloudquery/cloudquery-api-go/commit/e07af9f5d7ff20cee004d497a30a50427ee31790)) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#73](https://github.com/cloudquery/cloudquery-api-go/issues/73)) ([db26b9c](https://github.com/cloudquery/cloudquery-api-go/commit/db26b9c0db72240072ef5f075a098c0c6153b6bc)) + +## [1.5.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.5.0...v1.5.1) (2023-11-15) + + +### Bug Fixes + +* Add stringer to Token ([#71](https://github.com/cloudquery/cloudquery-api-go/issues/71)) ([cd50e79](https://github.com/cloudquery/cloudquery-api-go/commit/cd50e79c7bbaaac45d63c82b8ef33aab9ce462b1)) + +## [1.5.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.4.6...v1.5.0) (2023-11-14) + + +### Features + +* Add a `Token` struct to allow the CLI to differentiate between `Bearer` and `APIKey` tokens ([#66](https://github.com/cloudquery/cloudquery-api-go/issues/66)) ([bf70ed2](https://github.com/cloudquery/cloudquery-api-go/commit/bf70ed239f33dc280433963e3e6d1c6bf954920a)) + +## [1.4.6](https://github.com/cloudquery/cloudquery-api-go/compare/v1.4.5...v1.4.6) (2023-11-14) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#67](https://github.com/cloudquery/cloudquery-api-go/issues/67)) ([8aa1edc](https://github.com/cloudquery/cloudquery-api-go/commit/8aa1edcf0ec2075696e5f5610c09bc540365c993)) +* Generate CloudQuery Go API Client from `spec.json` ([#69](https://github.com/cloudquery/cloudquery-api-go/issues/69)) ([0794b2e](https://github.com/cloudquery/cloudquery-api-go/commit/0794b2e3257e7354516318d80f4b68174420d23f)) + +## [1.4.5](https://github.com/cloudquery/cloudquery-api-go/compare/v1.4.4...v1.4.5) (2023-11-13) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#64](https://github.com/cloudquery/cloudquery-api-go/issues/64)) ([4b92507](https://github.com/cloudquery/cloudquery-api-go/commit/4b92507c7cb48ffa0bb6bbc587450cea9c7d6c81)) + +## [1.4.4](https://github.com/cloudquery/cloudquery-api-go/compare/v1.4.3...v1.4.4) (2023-11-13) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#61](https://github.com/cloudquery/cloudquery-api-go/issues/61)) ([6b00213](https://github.com/cloudquery/cloudquery-api-go/commit/6b00213353ac8e8e1c9fb994317556610fa3c22b)) +* Generate CloudQuery Go API Client from `spec.json` ([#63](https://github.com/cloudquery/cloudquery-api-go/issues/63)) ([bfe3e8e](https://github.com/cloudquery/cloudquery-api-go/commit/bfe3e8e5d9abea07939299361cb2443677571e79)) + +## [1.4.3](https://github.com/cloudquery/cloudquery-api-go/compare/v1.4.2...v1.4.3) (2023-11-06) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#56](https://github.com/cloudquery/cloudquery-api-go/issues/56)) ([0f10e57](https://github.com/cloudquery/cloudquery-api-go/commit/0f10e57098160bfd63a816813d7795c4f842523d)) +* Generate CloudQuery Go API Client from `spec.json` ([#58](https://github.com/cloudquery/cloudquery-api-go/issues/58)) ([942941d](https://github.com/cloudquery/cloudquery-api-go/commit/942941d67f10a20f188cf4cc014c52fbb4bc2d9f)) +* Generate CloudQuery Go API Client from `spec.json` ([#59](https://github.com/cloudquery/cloudquery-api-go/issues/59)) ([6fd3157](https://github.com/cloudquery/cloudquery-api-go/commit/6fd3157f9c494926b1f3ce91023fdc0f082c4d55)) +* Generate CloudQuery Go API Client from `spec.json` ([#60](https://github.com/cloudquery/cloudquery-api-go/issues/60)) ([d97ae7e](https://github.com/cloudquery/cloudquery-api-go/commit/d97ae7e6165b7eebbd270de1060009dbc70e977c)) + +## [1.4.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.4.1...v1.4.2) (2023-10-27) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#46](https://github.com/cloudquery/cloudquery-api-go/issues/46)) ([5f83a82](https://github.com/cloudquery/cloudquery-api-go/commit/5f83a82d4cbf79271609c12c612ba495c6613ef6)) +* Generate CloudQuery Go API Client from `spec.json` ([#48](https://github.com/cloudquery/cloudquery-api-go/issues/48)) ([7dfeae5](https://github.com/cloudquery/cloudquery-api-go/commit/7dfeae55de35be96272a16b56cce36b4250e03b0)) +* Generate CloudQuery Go API Client from `spec.json` ([#49](https://github.com/cloudquery/cloudquery-api-go/issues/49)) ([b67368e](https://github.com/cloudquery/cloudquery-api-go/commit/b67368efe71d56298d64b101c92e3c14733cdf0b)) +* Generate CloudQuery Go API Client from `spec.json` ([#50](https://github.com/cloudquery/cloudquery-api-go/issues/50)) ([eeb9744](https://github.com/cloudquery/cloudquery-api-go/commit/eeb9744efd103f9f499355fd68735d8d4d2c6f6d)) +* Generate CloudQuery Go API Client from `spec.json` ([#51](https://github.com/cloudquery/cloudquery-api-go/issues/51)) ([c7fa339](https://github.com/cloudquery/cloudquery-api-go/commit/c7fa339728fa234a9b4923567e2fa42d39f1e7ab)) +* Generate CloudQuery Go API Client from `spec.json` ([#52](https://github.com/cloudquery/cloudquery-api-go/issues/52)) ([71eb1d8](https://github.com/cloudquery/cloudquery-api-go/commit/71eb1d8cc41e859aede30765c7fae3b03d50185d)) +* Generate CloudQuery Go API Client from `spec.json` ([#53](https://github.com/cloudquery/cloudquery-api-go/issues/53)) ([a67bcba](https://github.com/cloudquery/cloudquery-api-go/commit/a67bcba14f1d84b6898cf0d3bacb2bef7e69942d)) +* Generate CloudQuery Go API Client from `spec.json` ([#54](https://github.com/cloudquery/cloudquery-api-go/issues/54)) ([8b970be](https://github.com/cloudquery/cloudquery-api-go/commit/8b970bec590c9cf36c80ece0e8e40629664cf6e9)) +* Generate CloudQuery Go API Client from `spec.json` ([#55](https://github.com/cloudquery/cloudquery-api-go/issues/55)) ([0c91565](https://github.com/cloudquery/cloudquery-api-go/commit/0c915656da7e6cff881848bd1295896805c5e205)) + +## [1.4.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.4.0...v1.4.1) (2023-10-18) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#44](https://github.com/cloudquery/cloudquery-api-go/issues/44)) ([abcb423](https://github.com/cloudquery/cloudquery-api-go/commit/abcb4233fe7c653c78c8ecfdab29188bdc76f0f4)) + +## [1.4.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.3.0...v1.4.0) (2023-10-17) + + +### Features + +* Allow configurable config home directory ([#42](https://github.com/cloudquery/cloudquery-api-go/issues/42)) ([3235143](https://github.com/cloudquery/cloudquery-api-go/commit/32351436b1bbf3bfd3247a692d2d990f058f2250)) + +## [1.3.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.2.9...v1.3.0) (2023-10-17) + + +### Features + +* Moving configuration and auth logic ([#37](https://github.com/cloudquery/cloudquery-api-go/issues/37)) ([0bffdb2](https://github.com/cloudquery/cloudquery-api-go/commit/0bffdb20ef7533cac3d3953f593d56fc7dc09e24)) + +## [1.2.9](https://github.com/cloudquery/cloudquery-api-go/compare/v1.2.8...v1.2.9) (2023-10-17) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#38](https://github.com/cloudquery/cloudquery-api-go/issues/38)) ([4a4f899](https://github.com/cloudquery/cloudquery-api-go/commit/4a4f8997c4457634b94e0740727f6a2f5a80b795)) + +## [1.2.8](https://github.com/cloudquery/cloudquery-api-go/compare/v1.2.7...v1.2.8) (2023-10-12) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#35](https://github.com/cloudquery/cloudquery-api-go/issues/35)) ([ca1947b](https://github.com/cloudquery/cloudquery-api-go/commit/ca1947be7d9d350a06a84dffcb08b3142ece2407)) + +## [1.2.7](https://github.com/cloudquery/cloudquery-api-go/compare/v1.2.6...v1.2.7) (2023-10-12) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#33](https://github.com/cloudquery/cloudquery-api-go/issues/33)) ([164f267](https://github.com/cloudquery/cloudquery-api-go/commit/164f267ef22a68e9252f3a75b56b6e09adfd29ca)) + +## [1.2.6](https://github.com/cloudquery/cloudquery-api-go/compare/v1.2.5...v1.2.6) (2023-10-09) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#30](https://github.com/cloudquery/cloudquery-api-go/issues/30)) ([0bc90d5](https://github.com/cloudquery/cloudquery-api-go/commit/0bc90d51cac329115d2172811c749eb4cbe27ba1)) + +## [1.2.5](https://github.com/cloudquery/cloudquery-api-go/compare/v1.2.4...v1.2.5) (2023-10-09) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#27](https://github.com/cloudquery/cloudquery-api-go/issues/27)) ([20fff2c](https://github.com/cloudquery/cloudquery-api-go/commit/20fff2c3e447a8a198b8906ca47b33936c4fadff)) + +## [1.2.4](https://github.com/cloudquery/cloudquery-api-go/compare/v1.2.3...v1.2.4) (2023-10-05) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#25](https://github.com/cloudquery/cloudquery-api-go/issues/25)) ([5cb006d](https://github.com/cloudquery/cloudquery-api-go/commit/5cb006de422fcd6e6014315f428c6eddf7c4813c)) + +## [1.2.3](https://github.com/cloudquery/cloudquery-api-go/compare/v1.2.2...v1.2.3) (2023-10-04) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#23](https://github.com/cloudquery/cloudquery-api-go/issues/23)) ([9d74666](https://github.com/cloudquery/cloudquery-api-go/commit/9d74666e5151a2cb78035995867d5ff74dced7d5)) + +## [1.2.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.2.1...v1.2.2) (2023-10-04) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#20](https://github.com/cloudquery/cloudquery-api-go/issues/20)) ([8b2e57b](https://github.com/cloudquery/cloudquery-api-go/commit/8b2e57b85b6f016a0f27d58a3d37b03f0c6be3db)) +* Generate CloudQuery Go API Client from `spec.json` ([#22](https://github.com/cloudquery/cloudquery-api-go/issues/22)) ([df9748f](https://github.com/cloudquery/cloudquery-api-go/commit/df9748ff000ba153b217ab0c2bcf374395fb6a51)) + +## [1.2.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.2.0...v1.2.1) (2023-09-26) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#18](https://github.com/cloudquery/cloudquery-api-go/issues/18)) ([4e5e8fe](https://github.com/cloudquery/cloudquery-api-go/commit/4e5e8fe98983d4919a8f7278dc3e2e8d2c6ae4ab)) + +## [1.2.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.1.0...v1.2.0) (2023-09-22) + + +### Features + +* Revert "feat: Support Go 1.19 ([#14](https://github.com/cloudquery/cloudquery-api-go/issues/14))" ([#16](https://github.com/cloudquery/cloudquery-api-go/issues/16)) ([d9f5557](https://github.com/cloudquery/cloudquery-api-go/commit/d9f55574f596ee503216cb8b87ce11bc328a5e64)) + +## [1.1.0](https://github.com/cloudquery/cloudquery-api-go/compare/v1.0.3...v1.1.0) (2023-09-22) + + +### Features + +* Support Go 1.19 ([#14](https://github.com/cloudquery/cloudquery-api-go/issues/14)) ([ec60c6f](https://github.com/cloudquery/cloudquery-api-go/commit/ec60c6f2c976144c254017eb7a5a541d80facb23)) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#13](https://github.com/cloudquery/cloudquery-api-go/issues/13)) ([73a3836](https://github.com/cloudquery/cloudquery-api-go/commit/73a38360c1bcf1236754b42f3b4db546341b64d5)) + +## [1.0.3](https://github.com/cloudquery/cloudquery-api-go/compare/v1.0.2...v1.0.3) (2023-09-22) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#10](https://github.com/cloudquery/cloudquery-api-go/issues/10)) ([8859e7e](https://github.com/cloudquery/cloudquery-api-go/commit/8859e7e769d32bad5a83589c637a3a1bab0f9169)) +* Generate CloudQuery Go API Client from `spec.json` ([#12](https://github.com/cloudquery/cloudquery-api-go/issues/12)) ([80f48c1](https://github.com/cloudquery/cloudquery-api-go/commit/80f48c1d09f4b8d9f058995564e1f41badcb52a5)) + +## [1.0.2](https://github.com/cloudquery/cloudquery-api-go/compare/v1.0.1...v1.0.2) (2023-09-15) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#8](https://github.com/cloudquery/cloudquery-api-go/issues/8)) ([5c3fd7e](https://github.com/cloudquery/cloudquery-api-go/commit/5c3fd7eefd2824ca7fbe28b640f0acd921381f0b)) + +## [1.0.1](https://github.com/cloudquery/cloudquery-api-go/compare/v1.0.0...v1.0.1) (2023-09-14) + + +### Bug Fixes + +* Generate CloudQuery Go API Client from `spec.json` ([#6](https://github.com/cloudquery/cloudquery-api-go/issues/6)) ([bf745a9](https://github.com/cloudquery/cloudquery-api-go/commit/bf745a932f0af962a2922e9deb8572884385c261)) + ## 1.0.0 (2023-09-14) * Generate CloudQuery Go API Client from `spec.json` ([eaa26dc](https://github.com/cloudquery/cloudquery-api-go/commit/eaa26dc40c4e3b06414536a7d4686eeff66d1316)) diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..9b84ce2 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,3 @@ +* @cloudquery/backend +go.mod +go.sum diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..6a91c67 --- /dev/null +++ b/Makefile @@ -0,0 +1,20 @@ +.PHONY: test +test: + go test -race ./... + +.PHONY: lint +lint: + golangci-lint run + +.PHONY: gen-client +gen-client: + @command -v openapi-generator >/dev/null 2>&1 || { \ + echo "Error: 'openapi-generator' command not found. Please install it before running convert-spec."; \ + echo "On MacOS you can use Homebrew: brew install openapi-generator"; \ + echo "You can install it by following the instructions at: https://github.com/OpenAPITools/openapi-generator?tab=readme-ov-file#1---installation"; \ + exit 1; \ + } + openapi-generator generate -g openapi -i spec.json -o .openapi-tmp + mv .openapi-tmp/openapi.json spec.json + rm -rf .openapi-tmp + go generate ./... \ No newline at end of file diff --git a/auth/token.go b/auth/token.go new file mode 100644 index 0000000..5d10f9f --- /dev/null +++ b/auth/token.go @@ -0,0 +1,189 @@ +package auth + +import ( + "encoding/json" + "fmt" + "io" + "net/http" + "net/url" + "os" + "strings" + "time" + + "github.com/cloudquery/cloudquery-api-go/config" +) + +const ( + FirebaseAPIKey = "AIzaSyCxsrwjABEF-dWLzUqmwiL-ct02cnG9GCs" + TokenBaseURL = "https://securetoken.googleapis.com" + EnvVarCloudQueryAPIKey = "CLOUDQUERY_API_KEY" + ExpiryBuffer = 60 * time.Second + tokenFilePath = "cloudquery/token" + syncRunAPIKeyPrefix = "cqsr_" + syncTestConnectionAPIKeyPrefix = "cqstc_" +) + +type tokenResponse struct { + AccessToken string `json:"access_token"` + ExpiresIn string `json:"expires_in"` + TokenType string `json:"token_type"` + RefreshToken string `json:"refresh_token"` + IDToken string `json:"id_token"` + UserID string `json:"user_id"` + ProjectID string `json:"project_id"` +} + +type TokenType int + +const ( + Undefined TokenType = iota + BearerToken + APIKey + SyncRunAPIKey + SyncTestConnectionAPIKey +) + +var UndefinedToken = Token{Type: Undefined, Value: ""} + +type Token struct { + Type TokenType + Value string +} + +func (t Token) String() string { + return t.Value +} + +type TokenClient struct { + url string + apiKey string + idToken string + expiresAt time.Time +} + +func NewTokenClient() *TokenClient { + return &TokenClient{ + url: TokenBaseURL, + apiKey: FirebaseAPIKey, + } +} + +// GetToken returns the ID token +// If CLOUDQUERY_API_KEY is set, it returns that value, otherwise it returns an ID token generated from the refresh token. +func (tc *TokenClient) GetToken() (Token, error) { + tokenType := tc.GetTokenType() + if tokenType != BearerToken { + tokenFromEnv := os.Getenv(EnvVarCloudQueryAPIKey) + trimmedToken := strings.TrimSpace(tokenFromEnv) + return Token{Type: tokenType, Value: trimmedToken}, nil + } + + // If the token is not expired, return it + if !tc.expiresAt.IsZero() && tc.expiresAt.Sub(time.Now().UTC()) > ExpiryBuffer { + return Token{Type: BearerToken, Value: tc.idToken}, nil + } + + refreshToken, err := ReadRefreshToken() + if err != nil { + return UndefinedToken, fmt.Errorf("failed to read refresh token: %w. Hint: You may need to run `cloudquery login` or set %s", err, EnvVarCloudQueryAPIKey) + } + if refreshToken == "" { + return UndefinedToken, fmt.Errorf("authentication token not found. Hint: You may need to run `cloudquery login` or set %s", EnvVarCloudQueryAPIKey) + } + tokenResponse, err := tc.generateToken(refreshToken) + if err != nil { + if IsTokenExpiredError(err) { + return UndefinedToken, fmt.Errorf("authentication token expired: %w. Hint: You may need to run `cloudquery login` or set %s", err, EnvVarCloudQueryAPIKey) + } + return UndefinedToken, fmt.Errorf("failed to sign in with token: %w", err) + } + + if err := SaveRefreshToken(tokenResponse.RefreshToken); err != nil { + return UndefinedToken, fmt.Errorf("failed to save refresh token: %w", err) + } + + if err := tc.updateIDToken(tokenResponse); err != nil { + return UndefinedToken, fmt.Errorf("failed to update ID token: %w", err) + } + + return Token{Type: BearerToken, Value: tc.idToken}, nil +} + +// GetTokenType returns the type of token that will be returned by GetToken +func (tc *TokenClient) GetTokenType() TokenType { + if token := os.Getenv(EnvVarCloudQueryAPIKey); token != "" { + switch { + case strings.HasPrefix(token, syncRunAPIKeyPrefix): + return SyncRunAPIKey + case strings.HasPrefix(token, syncTestConnectionAPIKeyPrefix): + return SyncTestConnectionAPIKey + default: + return APIKey + } + } + return BearerToken +} + +func (tc *TokenClient) generateToken(refreshToken string) (*tokenResponse, error) { + data := url.Values{} + data.Set("grant_type", "refresh_token") + data.Set("refresh_token", refreshToken) + + resp, err := http.PostForm(fmt.Sprintf("%s/v1/token?key=%s", tc.url, tc.apiKey), data) + if err != nil { + return nil, err + } + defer func() { + _ = resp.Body.Close() + }() + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, err + } + + if resp.StatusCode != http.StatusOK { + return nil, fmt.Errorf("failed to refresh token: %s: %w", resp.Status, TokenErrorFromBody(body)) + } + + var tr tokenResponse + if err := parseToken(body, &tr); err != nil { + return nil, err + } + + return &tr, nil +} + +func (tc *TokenClient) updateIDToken(tr *tokenResponse) error { + // Convert string duration in seconds to time.Duration + duration, err := time.ParseDuration(tr.ExpiresIn + "s") + if err != nil { + return err + } + + tc.expiresAt = time.Now().UTC().Add(duration) + tc.idToken = tr.IDToken + return nil +} + +func parseToken(response []byte, tr *tokenResponse) error { + err := json.Unmarshal(response, tr) + if err != nil { + return err + } + return nil +} + +// SaveRefreshToken saves the refresh token to the token file +func SaveRefreshToken(refreshToken string) error { + return config.SaveDataString(tokenFilePath, refreshToken) +} + +// ReadRefreshToken reads the refresh token from the token file +func ReadRefreshToken() (string, error) { + return config.ReadDataString(tokenFilePath) +} + +// RemoveRefreshToken removes the token file +func RemoveRefreshToken() error { + return config.DeleteDataString(tokenFilePath) +} diff --git a/auth/token_error.go b/auth/token_error.go new file mode 100644 index 0000000..465ea6c --- /dev/null +++ b/auth/token_error.go @@ -0,0 +1,39 @@ +package auth + +import ( + "encoding/json" + "errors" +) + +type TokenError struct { + Body []byte `json:"-"` + ErrorDetails struct { + Code int `json:"code"` + Message string `json:"message"` + Status string `json:"status"` + } `json:"error"` +} + +func (t TokenError) Error() string { + return string(t.Body) +} + +func TokenErrorFromBody(body []byte) *TokenError { + t := &TokenError{} + _ = json.Unmarshal(body, t) + t.Body = body + return t +} + +func IsTokenExpiredError(err error) bool { + if err == nil { + return false + } + + var te *TokenError + if errors.As(err, &te) { + return te.ErrorDetails.Code == 400 && te.ErrorDetails.Message == "TOKEN_EXPIRED" + } + + return false +} diff --git a/auth/token_test.go b/auth/token_test.go new file mode 100644 index 0000000..483d8cc --- /dev/null +++ b/auth/token_test.go @@ -0,0 +1,174 @@ +package auth + +import ( + "encoding/json" + "fmt" + "net/http" + "net/http/httptest" + "os" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestRefreshToken_RoundTrip(t *testing.T) { + token := "my_token" + + err := SaveRefreshToken(token) + require.NoError(t, err) + + readToken, err := ReadRefreshToken() + require.NoError(t, err) + + require.Equal(t, token, readToken) +} + +func TestRefreshToken_Removal(t *testing.T) { + token := "my_token" + + err := SaveRefreshToken(token) + require.NoError(t, err) + + _, err = ReadRefreshToken() + require.NoError(t, err) + + err = RemoveRefreshToken() + require.NoError(t, err) + + _, err = ReadRefreshToken() + require.Error(t, err) +} + +func TestToken_Stringer(t *testing.T) { + token := Token{Type: BearerToken, Value: "my_token"} + out := fmt.Sprintf("Bearer %s", token) + require.Equal(t, "Bearer my_token", out) +} + +func TestTokenClient_EnvironmentVariable(t *testing.T) { + reset := overrideEnvironmentVariable(t, EnvVarCloudQueryAPIKey, "my_token") + defer reset() + + token, err := NewTokenClient().GetToken() + require.NoError(t, err) + + require.Equal(t, Token{Type: APIKey, Value: "my_token"}, token) +} + +func TestTokenClient_GetToken_ShortExpiry(t *testing.T) { + server, closer := fakeAuthServer(t, "0") + defer closer() + + err := SaveRefreshToken("my_refresh_token") + require.NoError(t, err) + + t0 := time.Now().UTC() + + tc := TokenClient{ + url: server.URL, + apiKey: "my-api-key", + expiresAt: t0, + } + + token, err := tc.GetToken() + require.NoError(t, err) + require.Equal(t, Token{Type: BearerToken, Value: "my_id_token_0"}, token, "first token") + + tc.expiresAt = t0 + + token, err = tc.GetToken() + require.NoError(t, err) + require.Equal(t, Token{Type: BearerToken, Value: "my_id_token_1"}, token, "expected to issue new token") +} + +func TestTokenClient_GetToken_LongExpiry(t *testing.T) { + server, closer := fakeAuthServer(t, "3600") + defer closer() + + err := SaveRefreshToken("my_refresh_token") + require.NoError(t, err) + + tc := TokenClient{ + url: server.URL, + apiKey: "my-api-key", + } + + token, err := tc.GetToken() + require.NoError(t, err) + require.Equal(t, Token{Type: BearerToken, Value: "my_id_token_0"}, token, "first token") + + token, err = tc.GetToken() + require.NoError(t, err) + require.Equal(t, Token{Type: BearerToken, Value: "my_id_token_0"}, token, "expected to reuse token") +} + +func TestTokenClient_BearerTokenType(t *testing.T) { + tc := NewTokenClient() + + assert.Equal(t, BearerToken, tc.GetTokenType()) +} + +func TestTokenClient_APIKeyTokenType(t *testing.T) { + t.Setenv(EnvVarCloudQueryAPIKey, "my_token") + + tc := NewTokenClient() + + assert.Equal(t, APIKey, tc.GetTokenType()) +} + +func TestTokenClient_SyncRunAPIKeyTokenType(t *testing.T) { + t.Setenv(EnvVarCloudQueryAPIKey, "cqsr_my_token") + + tc := NewTokenClient() + + assert.Equal(t, SyncRunAPIKey, tc.GetTokenType()) +} + +func overrideEnvironmentVariable(t *testing.T, key, value string) func() { + originalValue := os.Getenv(key) + resetFn := func() { + err := os.Setenv(key, originalValue) + require.NoError(t, err) + } + + err := os.Setenv(key, value) + require.NoError(t, err) + + return resetFn +} + +func fakeAuthServer(t *testing.T, expiresIn string) (*httptest.Server, func()) { + tokenCount := 0 + + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + require.Equal(t, http.MethodPost, r.Method) + require.Equal(t, "/v1/token?key=my-api-key", r.URL.String()) + + err := r.ParseForm() + require.NoError(t, err) + + require.Equal(t, "my_refresh_token", r.Form.Get("refresh_token")) + require.Equal(t, "refresh_token", r.Form.Get("grant_type")) + + w.Header().Set("Content-Type", "application/json") + response := tokenResponse{ + AccessToken: "my_access_token", + ExpiresIn: expiresIn, + TokenType: "Bearer", + RefreshToken: "my_refresh_token", + IDToken: fmt.Sprintf("my_id_token_%d", tokenCount), + UserID: "abcd-1234", + ProjectID: "project-1", + } + err = json.NewEncoder(w).Encode(response) + require.NoError(t, err) + + tokenCount++ + })) + + return server, func() { + server.Close() + } +} diff --git a/client.gen.go b/client.gen.go index f07ac53..3fe9b8e 100644 --- a/client.gen.go +++ b/client.gen.go @@ -1,6 +1,6 @@ // Package cloudquery_api provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen version v1.13.3 DO NOT EDIT. +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT. package cloudquery_api import ( @@ -13,7 +13,9 @@ import ( "net/url" "strings" - "github.com/deepmap/oapi-codegen/pkg/runtime" + "github.com/hashicorp/go-retryablehttp" + "github.com/oapi-codegen/runtime" + openapi_types "github.com/oapi-codegen/runtime/types" ) // RequestEditorFn is the function signature for the RequestEditor callback function @@ -48,6 +50,9 @@ type ClientOption func(*Client) error // Creates a new Client, with reasonable defaults func NewClient(server string, opts ...ClientOption) (*Client, error) { + retryClient := retryablehttp.NewClient() + retryClient.Logger = nil + opts = append([]ClientOption{WithHTTPClient(retryClient.StandardClient())}, opts...) // create a client with sane default values client := Client{ Server: server, @@ -92,6 +97,87 @@ type ClientInterface interface { // HealthCheck request HealthCheck(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListAddons request + ListAddons(ctx context.Context, params *ListAddonsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateAddonWithBody request with any body + CreateAddonWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateAddon(ctx context.Context, body CreateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteAddonByTeamAndName request + DeleteAddonByTeamAndName(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetAddon request + GetAddon(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateAddonWithBody request with any body + UpdateAddonWithBody(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateAddon(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, body UpdateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ListAddonVersions request + ListAddonVersions(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, params *ListAddonVersionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetAddonVersion request + GetAddonVersion(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateAddonVersionWithBody request with any body + UpdateAddonVersionWithBody(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateAddonVersion(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body UpdateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateAddonVersionWithBody request with any body + CreateAddonVersionWithBody(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateAddonVersion(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body CreateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DownloadAddonAsset request + DownloadAddonAsset(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UploadAddonAsset request + UploadAddonAsset(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CQHealthCheck request + CQHealthCheck(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOpenAPIJSON request + GetOpenAPIJSON(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ActivatePlatformWithBody request with any body + ActivatePlatformWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + ActivatePlatform(ctx context.Context, body ActivatePlatformJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // RenewPlatformActivationWithBody request with any body + RenewPlatformActivationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + RenewPlatformActivation(ctx context.Context, body RenewPlatformActivationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ReportPlatformDataWithBody request with any body + ReportPlatformDataWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + ReportPlatformData(ctx context.Context, body ReportPlatformDataJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ReportTenantPlatformDataWithBody request with any body + ReportTenantPlatformDataWithBody(ctx context.Context, tenantID openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + ReportTenantPlatformData(ctx context.Context, tenantID openapi_types.UUID, body ReportTenantPlatformDataJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ListPluginNotificationRequests request + ListPluginNotificationRequests(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreatePluginNotificationRequestWithBody request with any body + CreatePluginNotificationRequestWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreatePluginNotificationRequest(ctx context.Context, body CreatePluginNotificationRequestJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeletePluginNotificationRequest request + DeletePluginNotificationRequest(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetPluginNotificationRequest request + GetPluginNotificationRequest(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListPlugins request ListPlugins(ctx context.Context, params *ListPluginsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -100,64 +186,99 @@ type ClientInterface interface { CreatePlugin(ctx context.Context, body CreatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeletePluginByTeamAndPluginName request + DeletePluginByTeamAndPluginName(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetPlugin request - GetPlugin(ctx context.Context, teamName TeamName, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) + GetPlugin(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) // UpdatePluginWithBody request with any body - UpdatePluginWithBody(ctx context.Context, teamName TeamName, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + UpdatePluginWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - UpdatePlugin(ctx context.Context, teamName TeamName, pluginName PluginName, body UpdatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + UpdatePlugin(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body UpdatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // ListPluginVersions request - ListPluginVersions(ctx context.Context, teamName TeamName, pluginName PluginName, params *ListPluginVersionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeletePluginUpcomingPriceChanges request + DeletePluginUpcomingPriceChanges(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreatePluginVersionWithBody request with any body - CreatePluginVersionWithBody(ctx context.Context, teamName TeamName, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListPluginUpcomingPriceChanges request + ListPluginUpcomingPriceChanges(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreatePluginUpcomingPriceChangeWithBody request with any body + CreatePluginUpcomingPriceChangeWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - CreatePluginVersion(ctx context.Context, teamName TeamName, pluginName PluginName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + CreatePluginUpcomingPriceChange(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body CreatePluginUpcomingPriceChangeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ListPluginVersions request + ListPluginVersions(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, params *ListPluginVersionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) // GetPluginVersion request - GetPluginVersion(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) + GetPluginVersion(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) // UpdatePluginVersionWithBody request with any body - UpdatePluginVersionWithBody(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + UpdatePluginVersionWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - UpdatePluginVersion(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + UpdatePluginVersion(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreatePluginVersionWithBody request with any body + CreatePluginVersionWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreatePluginVersion(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // DownloadPluginAsset request - DownloadPluginAsset(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*http.Response, error) + DownloadPluginAsset(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetParams, reqEditors ...RequestEditorFn) (*http.Response, error) // UploadPluginAsset request - UploadPluginAsset(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*http.Response, error) + UploadPluginAsset(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*http.Response, error) // DeletePluginVersionDocsWithBody request with any body - DeletePluginVersionDocsWithBody(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + DeletePluginVersionDocsWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - DeletePluginVersionDocs(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + DeletePluginVersionDocs(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // ListPluginVersionDocs request - ListPluginVersionDocs(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + ListPluginVersionDocs(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ReplacePluginVersionDocsWithBody request with any body + ReplacePluginVersionDocsWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + ReplacePluginVersionDocs(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body ReplacePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // CreatePluginVersionDocsWithBody request with any body - CreatePluginVersionDocsWithBody(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + CreatePluginVersionDocsWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - CreatePluginVersionDocs(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + CreatePluginVersionDocs(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // DeletePluginVersionTablesWithBody request with any body - DeletePluginVersionTablesWithBody(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + DeletePluginVersionTablesWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - DeletePluginVersionTables(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + DeletePluginVersionTables(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // ListPluginVersionTables request - ListPluginVersionTables(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + ListPluginVersionTables(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams, reqEditors ...RequestEditorFn) (*http.Response, error) // CreatePluginVersionTablesWithBody request with any body - CreatePluginVersionTablesWithBody(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + CreatePluginVersionTablesWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - CreatePluginVersionTables(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + CreatePluginVersionTables(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // GetPluginVersionTable request - GetPluginVersionTable(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*http.Response, error) + GetPluginVersionTable(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // RemovePluginUIAssets request + RemovePluginUIAssets(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UploadPluginUIAssetsWithBody request with any body + UploadPluginUIAssetsWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UploadPluginUIAssets(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UploadPluginUIAssetsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // FinalizePluginUIAssetUploadWithBody request with any body + FinalizePluginUIAssetUploadWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + FinalizePluginUIAssetUpload(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body FinalizePluginUIAssetUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // AuthRegistryRequest request + AuthRegistryRequest(ctx context.Context, params *AuthRegistryRequestParams, reqEditors ...RequestEditorFn) (*http.Response, error) // ListTeams request ListTeams(ctx context.Context, params *ListTeamsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -167,17 +288,70 @@ type ClientInterface interface { CreateTeam(ctx context.Context, body CreateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeleteTeam request + DeleteTeam(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetTeamByName request GetTeamByName(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) - // ListTeamApiKeys request - ListTeamApiKeys(ctx context.Context, teamName TeamName, params *ListTeamApiKeysParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // UpdateTeamWithBody request with any body + UpdateTeamWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateTeam(ctx context.Context, teamName TeamName, body UpdateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ListAddonOrdersByTeam request + ListAddonOrdersByTeam(ctx context.Context, teamName TeamName, params *ListAddonOrdersByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateAddonOrderForTeamWithBody request with any body + CreateAddonOrderForTeamWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateAddonOrderForTeam(ctx context.Context, teamName TeamName, body CreateAddonOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetAddonOrderByTeam request + GetAddonOrderByTeam(ctx context.Context, teamName TeamName, addonOrderID AddonOrderID, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteAddonsByTeam request + DeleteAddonsByTeam(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ListAddonsByTeam request + ListAddonsByTeam(ctx context.Context, teamName TeamName, params *ListAddonsByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DownloadAddonAssetByTeam request + DownloadAddonAssetByTeam(ctx context.Context, teamName TeamName, addonTeam AddonTeam, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // AIOnboardingChatWithBody request with any body + AIOnboardingChatWithBody(ctx context.Context, teamName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + AIOnboardingChat(ctx context.Context, teamName string, body AIOnboardingChatJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // AIOnboardingEndConversation request + AIOnboardingEndConversation(ctx context.Context, teamName string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // AIOnboardingNewConversationWithBody request with any body + AIOnboardingNewConversationWithBody(ctx context.Context, teamName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + AIOnboardingNewConversation(ctx context.Context, teamName string, body AIOnboardingNewConversationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ListTeamAPIKeys request + ListTeamAPIKeys(ctx context.Context, teamName TeamName, params *ListTeamAPIKeysParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateTeamAPIKeyWithBody request with any body + CreateTeamAPIKeyWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateTeamAPIKey(ctx context.Context, teamName TeamName, body CreateTeamAPIKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreateTeamApiKey request - CreateTeamApiKey(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeleteTeamAPIKey request + DeleteTeamAPIKey(ctx context.Context, teamName TeamName, apiKeyID APIKeyID, reqEditors ...RequestEditorFn) (*http.Response, error) - // DeleteTeamApiKey request - DeleteTeamApiKey(ctx context.Context, teamName TeamName, apiKeyName ApiKeyName, reqEditors ...RequestEditorFn) (*http.Response, error) + // CreateTeamImagesWithBody request with any body + CreateTeamImagesWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateTeamImages(ctx context.Context, teamName TeamName, body CreateTeamImagesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteTeamInvitationWithBody request with any body + DeleteTeamInvitationWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + DeleteTeamInvitation(ctx context.Context, teamName TeamName, body DeleteTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // ListTeamInvitations request ListTeamInvitations(ctx context.Context, teamName TeamName, params *ListTeamInvitationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -187,32 +361,169 @@ type ClientInterface interface { EmailTeamInvitation(ctx context.Context, teamName TeamName, body EmailTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // AcceptTeamInvitation request - AcceptTeamInvitation(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) + // AcceptTeamInvitationWithBody request with any body + AcceptTeamInvitationWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + AcceptTeamInvitation(ctx context.Context, teamName TeamName, body AcceptTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // CancelTeamInvitation request - CancelTeamInvitation(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*http.Response, error) + CancelTeamInvitation(ctx context.Context, teamName TeamName, email EmailBasic, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ListInvoicesByTeam request + ListInvoicesByTeam(ctx context.Context, teamName TeamName, params *ListInvoicesByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetManagedDatabases request + GetManagedDatabases(ctx context.Context, teamName TeamName, params *GetManagedDatabasesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateManagedDatabaseWithBody request with any body + CreateManagedDatabaseWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateManagedDatabase(ctx context.Context, teamName TeamName, body CreateManagedDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteManagedDatabase request + DeleteManagedDatabase(ctx context.Context, teamName TeamName, managedDatabaseID ManagedDatabaseID, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetManagedDatabase request + GetManagedDatabase(ctx context.Context, teamName TeamName, managedDatabaseID ManagedDatabaseID, reqEditors ...RequestEditorFn) (*http.Response, error) + + // RemoveTeamMembershipWithBody request with any body + RemoveTeamMembershipWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + RemoveTeamMembership(ctx context.Context, teamName TeamName, body RemoveTeamMembershipJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // GetTeamMemberships request GetTeamMemberships(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeleteTeamMembership request + DeleteTeamMembership(ctx context.Context, teamName TeamName, email EmailBasic, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeletePluginsByTeam request + DeletePluginsByTeam(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListPluginsByTeam request ListPluginsByTeam(ctx context.Context, teamName TeamName, params *ListPluginsByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // DownloadPluginAssetByTeam request + DownloadPluginAssetByTeam(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetSettings request + GetSettings(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateSettingsWithBody request with any body + UpdateSettingsWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateSettings(ctx context.Context, teamName TeamName, body UpdateSettingsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ListSubscriptionOrdersByTeam request + ListSubscriptionOrdersByTeam(ctx context.Context, teamName TeamName, params *ListSubscriptionOrdersByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateSubscriptionOrderForTeamWithBody request with any body + CreateSubscriptionOrderForTeamWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateSubscriptionOrderForTeam(ctx context.Context, teamName TeamName, body CreateSubscriptionOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetSubscriptionOrderByTeam request + GetSubscriptionOrderByTeam(ctx context.Context, teamName TeamName, teamSubscriptionOrderID TeamSubscriptionOrderID, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ListTeamPluginUsage request + ListTeamPluginUsage(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // IncreaseTeamPluginUsageWithBody request with any body + IncreaseTeamPluginUsageWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + IncreaseTeamPluginUsage(ctx context.Context, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetTeamUsageSummary request + GetTeamUsageSummary(ctx context.Context, teamName TeamName, params *GetTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetGroupedTeamUsageSummary request + GetGroupedTeamUsageSummary(ctx context.Context, teamName TeamName, groupBy GetGroupedTeamUsageSummaryParamsGroupBy, params *GetGroupedTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetTeamPluginUsage request + GetTeamPluginUsage(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListUsersByTeam request ListUsersByTeam(ctx context.Context, teamName TeamName, params *ListUsersByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // UploadImage request - UploadImage(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + // UploadImageWithBody request with any body + UploadImageWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UploadImage(ctx context.Context, body UploadImageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // GetCurrentUser request GetCurrentUser(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + // UpdateCurrentUserWithBody request with any body + UpdateCurrentUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateCurrentUser(ctx context.Context, body UpdateCurrentUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // SendAnonymousEventWithBody request with any body + SendAnonymousEventWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + SendAnonymousEvent(ctx context.Context, body SendAnonymousEventJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CheckUserAuthStatus request + CheckUserAuthStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateCustomerWithBody request with any body + UpdateCustomerWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateCustomer(ctx context.Context, body UpdateCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // SendUserEventWithBody request with any body + SendUserEventWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + SendUserEvent(ctx context.Context, body SendUserEventJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListCurrentUserInvitations request ListCurrentUserInvitations(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // LogoutUser request + LogoutUser(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // LoginUserWithBody request with any body + LoginUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + LoginUser(ctx context.Context, body LoginUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetCurrentUserMemberships request GetCurrentUserMemberships(ctx context.Context, params *GetCurrentUserMembershipsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // RegisterUserWithBody request with any body + RegisterUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + RegisterUser(ctx context.Context, body RegisterUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ResetUserPasswordWithBody request with any body + ResetUserPasswordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + ResetUserPassword(ctx context.Context, body ResetUserPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeterminePlatformTenantByEmail request + DeterminePlatformTenantByEmail(ctx context.Context, params *DeterminePlatformTenantByEmailParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateUserToken request + CreateUserToken(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UserTOTPDelete request + UserTOTPDelete(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UserTOTPSetup request + UserTOTPSetup(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UserTOTPVerifyWithBody request with any body + UserTOTPVerifyWithBody(ctx context.Context, params *UserTOTPVerifyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UserTOTPVerify(ctx context.Context, params *UserTOTPVerifyParams, body UserTOTPVerifyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // VerifyUserEmailWithBody request with any body + VerifyUserEmailWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + VerifyUserEmail(ctx context.Context, body VerifyUserEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteUser request + DeleteUser(ctx context.Context, userID UserID, reqEditors ...RequestEditorFn) (*http.Response, error) } func (c *Client) HealthCheck(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { @@ -227,8 +538,8 @@ func (c *Client) HealthCheck(ctx context.Context, reqEditors ...RequestEditorFn) return c.Client.Do(req) } -func (c *Client) ListPlugins(ctx context.Context, params *ListPluginsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListPluginsRequest(c.Server, params) +func (c *Client) ListAddons(ctx context.Context, params *ListAddonsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListAddonsRequest(c.Server, params) if err != nil { return nil, err } @@ -239,8 +550,8 @@ func (c *Client) ListPlugins(ctx context.Context, params *ListPluginsParams, req return c.Client.Do(req) } -func (c *Client) CreatePluginWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreatePluginRequestWithBody(c.Server, contentType, body) +func (c *Client) CreateAddonWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateAddonRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -251,8 +562,8 @@ func (c *Client) CreatePluginWithBody(ctx context.Context, contentType string, b return c.Client.Do(req) } -func (c *Client) CreatePlugin(ctx context.Context, body CreatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreatePluginRequest(c.Server, body) +func (c *Client) CreateAddon(ctx context.Context, body CreateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateAddonRequest(c.Server, body) if err != nil { return nil, err } @@ -263,8 +574,8 @@ func (c *Client) CreatePlugin(ctx context.Context, body CreatePluginJSONRequestB return c.Client.Do(req) } -func (c *Client) GetPlugin(ctx context.Context, teamName TeamName, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetPluginRequest(c.Server, teamName, pluginName) +func (c *Client) DeleteAddonByTeamAndName(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteAddonByTeamAndNameRequest(c.Server, teamName, addonType, addonName) if err != nil { return nil, err } @@ -275,8 +586,8 @@ func (c *Client) GetPlugin(ctx context.Context, teamName TeamName, pluginName Pl return c.Client.Do(req) } -func (c *Client) UpdatePluginWithBody(ctx context.Context, teamName TeamName, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdatePluginRequestWithBody(c.Server, teamName, pluginName, contentType, body) +func (c *Client) GetAddon(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetAddonRequest(c.Server, teamName, addonType, addonName) if err != nil { return nil, err } @@ -287,8 +598,8 @@ func (c *Client) UpdatePluginWithBody(ctx context.Context, teamName TeamName, pl return c.Client.Do(req) } -func (c *Client) UpdatePlugin(ctx context.Context, teamName TeamName, pluginName PluginName, body UpdatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdatePluginRequest(c.Server, teamName, pluginName, body) +func (c *Client) UpdateAddonWithBody(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateAddonRequestWithBody(c.Server, teamName, addonType, addonName, contentType, body) if err != nil { return nil, err } @@ -299,8 +610,8 @@ func (c *Client) UpdatePlugin(ctx context.Context, teamName TeamName, pluginName return c.Client.Do(req) } -func (c *Client) ListPluginVersions(ctx context.Context, teamName TeamName, pluginName PluginName, params *ListPluginVersionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListPluginVersionsRequest(c.Server, teamName, pluginName, params) +func (c *Client) UpdateAddon(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, body UpdateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateAddonRequest(c.Server, teamName, addonType, addonName, body) if err != nil { return nil, err } @@ -311,8 +622,8 @@ func (c *Client) ListPluginVersions(ctx context.Context, teamName TeamName, plug return c.Client.Do(req) } -func (c *Client) CreatePluginVersionWithBody(ctx context.Context, teamName TeamName, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreatePluginVersionRequestWithBody(c.Server, teamName, pluginName, contentType, body) +func (c *Client) ListAddonVersions(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, params *ListAddonVersionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListAddonVersionsRequest(c.Server, teamName, addonType, addonName, params) if err != nil { return nil, err } @@ -323,8 +634,8 @@ func (c *Client) CreatePluginVersionWithBody(ctx context.Context, teamName TeamN return c.Client.Do(req) } -func (c *Client) CreatePluginVersion(ctx context.Context, teamName TeamName, pluginName PluginName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreatePluginVersionRequest(c.Server, teamName, pluginName, body) +func (c *Client) GetAddonVersion(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetAddonVersionRequest(c.Server, teamName, addonType, addonName, versionName) if err != nil { return nil, err } @@ -335,8 +646,8 @@ func (c *Client) CreatePluginVersion(ctx context.Context, teamName TeamName, plu return c.Client.Do(req) } -func (c *Client) GetPluginVersion(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetPluginVersionRequest(c.Server, teamName, pluginName, versionName) +func (c *Client) UpdateAddonVersionWithBody(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateAddonVersionRequestWithBody(c.Server, teamName, addonType, addonName, versionName, contentType, body) if err != nil { return nil, err } @@ -347,8 +658,8 @@ func (c *Client) GetPluginVersion(ctx context.Context, teamName TeamName, plugin return c.Client.Do(req) } -func (c *Client) UpdatePluginVersionWithBody(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdatePluginVersionRequestWithBody(c.Server, teamName, pluginName, versionName, contentType, body) +func (c *Client) UpdateAddonVersion(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body UpdateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateAddonVersionRequest(c.Server, teamName, addonType, addonName, versionName, body) if err != nil { return nil, err } @@ -359,8 +670,8 @@ func (c *Client) UpdatePluginVersionWithBody(ctx context.Context, teamName TeamN return c.Client.Do(req) } -func (c *Client) UpdatePluginVersion(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdatePluginVersionRequest(c.Server, teamName, pluginName, versionName, body) +func (c *Client) CreateAddonVersionWithBody(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateAddonVersionRequestWithBody(c.Server, teamName, addonType, addonName, versionName, contentType, body) if err != nil { return nil, err } @@ -371,8 +682,8 @@ func (c *Client) UpdatePluginVersion(ctx context.Context, teamName TeamName, plu return c.Client.Do(req) } -func (c *Client) DownloadPluginAsset(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDownloadPluginAssetRequest(c.Server, teamName, pluginName, versionName, targetName) +func (c *Client) CreateAddonVersion(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body CreateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateAddonVersionRequest(c.Server, teamName, addonType, addonName, versionName, body) if err != nil { return nil, err } @@ -383,8 +694,8 @@ func (c *Client) DownloadPluginAsset(ctx context.Context, teamName TeamName, plu return c.Client.Do(req) } -func (c *Client) UploadPluginAsset(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUploadPluginAssetRequest(c.Server, teamName, pluginName, versionName, targetName) +func (c *Client) DownloadAddonAsset(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDownloadAddonAssetRequest(c.Server, teamName, addonType, addonName, versionName, params) if err != nil { return nil, err } @@ -395,8 +706,8 @@ func (c *Client) UploadPluginAsset(ctx context.Context, teamName TeamName, plugi return c.Client.Do(req) } -func (c *Client) DeletePluginVersionDocsWithBody(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeletePluginVersionDocsRequestWithBody(c.Server, teamName, pluginName, versionName, contentType, body) +func (c *Client) UploadAddonAsset(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUploadAddonAssetRequest(c.Server, teamName, addonType, addonName, versionName) if err != nil { return nil, err } @@ -407,8 +718,8 @@ func (c *Client) DeletePluginVersionDocsWithBody(ctx context.Context, teamName T return c.Client.Do(req) } -func (c *Client) DeletePluginVersionDocs(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeletePluginVersionDocsRequest(c.Server, teamName, pluginName, versionName, body) +func (c *Client) CQHealthCheck(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCQHealthCheckRequest(c.Server) if err != nil { return nil, err } @@ -419,8 +730,8 @@ func (c *Client) DeletePluginVersionDocs(ctx context.Context, teamName TeamName, return c.Client.Do(req) } -func (c *Client) ListPluginVersionDocs(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListPluginVersionDocsRequest(c.Server, teamName, pluginName, versionName, params) +func (c *Client) GetOpenAPIJSON(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOpenAPIJSONRequest(c.Server) if err != nil { return nil, err } @@ -431,8 +742,8 @@ func (c *Client) ListPluginVersionDocs(ctx context.Context, teamName TeamName, p return c.Client.Do(req) } -func (c *Client) CreatePluginVersionDocsWithBody(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreatePluginVersionDocsRequestWithBody(c.Server, teamName, pluginName, versionName, contentType, body) +func (c *Client) ActivatePlatformWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewActivatePlatformRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -443,8 +754,8 @@ func (c *Client) CreatePluginVersionDocsWithBody(ctx context.Context, teamName T return c.Client.Do(req) } -func (c *Client) CreatePluginVersionDocs(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreatePluginVersionDocsRequest(c.Server, teamName, pluginName, versionName, body) +func (c *Client) ActivatePlatform(ctx context.Context, body ActivatePlatformJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewActivatePlatformRequest(c.Server, body) if err != nil { return nil, err } @@ -455,8 +766,8 @@ func (c *Client) CreatePluginVersionDocs(ctx context.Context, teamName TeamName, return c.Client.Do(req) } -func (c *Client) DeletePluginVersionTablesWithBody(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeletePluginVersionTablesRequestWithBody(c.Server, teamName, pluginName, versionName, contentType, body) +func (c *Client) RenewPlatformActivationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewRenewPlatformActivationRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -467,8 +778,8 @@ func (c *Client) DeletePluginVersionTablesWithBody(ctx context.Context, teamName return c.Client.Do(req) } -func (c *Client) DeletePluginVersionTables(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeletePluginVersionTablesRequest(c.Server, teamName, pluginName, versionName, body) +func (c *Client) RenewPlatformActivation(ctx context.Context, body RenewPlatformActivationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewRenewPlatformActivationRequest(c.Server, body) if err != nil { return nil, err } @@ -479,8 +790,8 @@ func (c *Client) DeletePluginVersionTables(ctx context.Context, teamName TeamNam return c.Client.Do(req) } -func (c *Client) ListPluginVersionTables(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListPluginVersionTablesRequest(c.Server, teamName, pluginName, versionName, params) +func (c *Client) ReportPlatformDataWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewReportPlatformDataRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -491,8 +802,8 @@ func (c *Client) ListPluginVersionTables(ctx context.Context, teamName TeamName, return c.Client.Do(req) } -func (c *Client) CreatePluginVersionTablesWithBody(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreatePluginVersionTablesRequestWithBody(c.Server, teamName, pluginName, versionName, contentType, body) +func (c *Client) ReportPlatformData(ctx context.Context, body ReportPlatformDataJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewReportPlatformDataRequest(c.Server, body) if err != nil { return nil, err } @@ -503,8 +814,8 @@ func (c *Client) CreatePluginVersionTablesWithBody(ctx context.Context, teamName return c.Client.Do(req) } -func (c *Client) CreatePluginVersionTables(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreatePluginVersionTablesRequest(c.Server, teamName, pluginName, versionName, body) +func (c *Client) ReportTenantPlatformDataWithBody(ctx context.Context, tenantID openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewReportTenantPlatformDataRequestWithBody(c.Server, tenantID, contentType, body) if err != nil { return nil, err } @@ -515,8 +826,8 @@ func (c *Client) CreatePluginVersionTables(ctx context.Context, teamName TeamNam return c.Client.Do(req) } -func (c *Client) GetPluginVersionTable(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetPluginVersionTableRequest(c.Server, teamName, pluginName, versionName, tableName) +func (c *Client) ReportTenantPlatformData(ctx context.Context, tenantID openapi_types.UUID, body ReportTenantPlatformDataJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewReportTenantPlatformDataRequest(c.Server, tenantID, body) if err != nil { return nil, err } @@ -527,8 +838,8 @@ func (c *Client) GetPluginVersionTable(ctx context.Context, teamName TeamName, p return c.Client.Do(req) } -func (c *Client) ListTeams(ctx context.Context, params *ListTeamsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListTeamsRequest(c.Server, params) +func (c *Client) ListPluginNotificationRequests(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListPluginNotificationRequestsRequest(c.Server, params) if err != nil { return nil, err } @@ -539,8 +850,8 @@ func (c *Client) ListTeams(ctx context.Context, params *ListTeamsParams, reqEdit return c.Client.Do(req) } -func (c *Client) CreateTeamWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateTeamRequestWithBody(c.Server, contentType, body) +func (c *Client) CreatePluginNotificationRequestWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePluginNotificationRequestRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -551,8 +862,8 @@ func (c *Client) CreateTeamWithBody(ctx context.Context, contentType string, bod return c.Client.Do(req) } -func (c *Client) CreateTeam(ctx context.Context, body CreateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateTeamRequest(c.Server, body) +func (c *Client) CreatePluginNotificationRequest(ctx context.Context, body CreatePluginNotificationRequestJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePluginNotificationRequestRequest(c.Server, body) if err != nil { return nil, err } @@ -563,8 +874,8 @@ func (c *Client) CreateTeam(ctx context.Context, body CreateTeamJSONRequestBody, return c.Client.Do(req) } -func (c *Client) GetTeamByName(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetTeamByNameRequest(c.Server, teamName) +func (c *Client) DeletePluginNotificationRequest(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeletePluginNotificationRequestRequest(c.Server, pluginTeam, pluginKind, pluginName) if err != nil { return nil, err } @@ -575,8 +886,8 @@ func (c *Client) GetTeamByName(ctx context.Context, teamName TeamName, reqEditor return c.Client.Do(req) } -func (c *Client) ListTeamApiKeys(ctx context.Context, teamName TeamName, params *ListTeamApiKeysParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListTeamApiKeysRequest(c.Server, teamName, params) +func (c *Client) GetPluginNotificationRequest(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetPluginNotificationRequestRequest(c.Server, pluginTeam, pluginKind, pluginName) if err != nil { return nil, err } @@ -587,8 +898,8 @@ func (c *Client) ListTeamApiKeys(ctx context.Context, teamName TeamName, params return c.Client.Do(req) } -func (c *Client) CreateTeamApiKey(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateTeamApiKeyRequest(c.Server, teamName) +func (c *Client) ListPlugins(ctx context.Context, params *ListPluginsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListPluginsRequest(c.Server, params) if err != nil { return nil, err } @@ -599,8 +910,8 @@ func (c *Client) CreateTeamApiKey(ctx context.Context, teamName TeamName, reqEdi return c.Client.Do(req) } -func (c *Client) DeleteTeamApiKey(ctx context.Context, teamName TeamName, apiKeyName ApiKeyName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteTeamApiKeyRequest(c.Server, teamName, apiKeyName) +func (c *Client) CreatePluginWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePluginRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -611,8 +922,8 @@ func (c *Client) DeleteTeamApiKey(ctx context.Context, teamName TeamName, apiKey return c.Client.Do(req) } -func (c *Client) ListTeamInvitations(ctx context.Context, teamName TeamName, params *ListTeamInvitationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListTeamInvitationsRequest(c.Server, teamName, params) +func (c *Client) CreatePlugin(ctx context.Context, body CreatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePluginRequest(c.Server, body) if err != nil { return nil, err } @@ -623,8 +934,8 @@ func (c *Client) ListTeamInvitations(ctx context.Context, teamName TeamName, par return c.Client.Do(req) } -func (c *Client) EmailTeamInvitationWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewEmailTeamInvitationRequestWithBody(c.Server, teamName, contentType, body) +func (c *Client) DeletePluginByTeamAndPluginName(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeletePluginByTeamAndPluginNameRequest(c.Server, teamName, pluginKind, pluginName) if err != nil { return nil, err } @@ -635,8 +946,8 @@ func (c *Client) EmailTeamInvitationWithBody(ctx context.Context, teamName TeamN return c.Client.Do(req) } -func (c *Client) EmailTeamInvitation(ctx context.Context, teamName TeamName, body EmailTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewEmailTeamInvitationRequest(c.Server, teamName, body) +func (c *Client) GetPlugin(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetPluginRequest(c.Server, teamName, pluginKind, pluginName) if err != nil { return nil, err } @@ -647,8 +958,8 @@ func (c *Client) EmailTeamInvitation(ctx context.Context, teamName TeamName, bod return c.Client.Do(req) } -func (c *Client) AcceptTeamInvitation(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewAcceptTeamInvitationRequest(c.Server, teamName) +func (c *Client) UpdatePluginWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdatePluginRequestWithBody(c.Server, teamName, pluginKind, pluginName, contentType, body) if err != nil { return nil, err } @@ -659,8 +970,8 @@ func (c *Client) AcceptTeamInvitation(ctx context.Context, teamName TeamName, re return c.Client.Do(req) } -func (c *Client) CancelTeamInvitation(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCancelTeamInvitationRequest(c.Server, teamName, email) +func (c *Client) UpdatePlugin(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body UpdatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdatePluginRequest(c.Server, teamName, pluginKind, pluginName, body) if err != nil { return nil, err } @@ -671,8 +982,8 @@ func (c *Client) CancelTeamInvitation(ctx context.Context, teamName TeamName, em return c.Client.Do(req) } -func (c *Client) GetTeamMemberships(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetTeamMembershipsRequest(c.Server, teamName, params) +func (c *Client) DeletePluginUpcomingPriceChanges(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeletePluginUpcomingPriceChangesRequest(c.Server, teamName, pluginKind, pluginName) if err != nil { return nil, err } @@ -683,8 +994,8 @@ func (c *Client) GetTeamMemberships(ctx context.Context, teamName TeamName, para return c.Client.Do(req) } -func (c *Client) ListPluginsByTeam(ctx context.Context, teamName TeamName, params *ListPluginsByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListPluginsByTeamRequest(c.Server, teamName, params) +func (c *Client) ListPluginUpcomingPriceChanges(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListPluginUpcomingPriceChangesRequest(c.Server, teamName, pluginKind, pluginName) if err != nil { return nil, err } @@ -695,8 +1006,8 @@ func (c *Client) ListPluginsByTeam(ctx context.Context, teamName TeamName, param return c.Client.Do(req) } -func (c *Client) ListUsersByTeam(ctx context.Context, teamName TeamName, params *ListUsersByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListUsersByTeamRequest(c.Server, teamName, params) +func (c *Client) CreatePluginUpcomingPriceChangeWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePluginUpcomingPriceChangeRequestWithBody(c.Server, teamName, pluginKind, pluginName, contentType, body) if err != nil { return nil, err } @@ -707,8 +1018,8 @@ func (c *Client) ListUsersByTeam(ctx context.Context, teamName TeamName, params return c.Client.Do(req) } -func (c *Client) UploadImage(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUploadImageRequest(c.Server) +func (c *Client) CreatePluginUpcomingPriceChange(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body CreatePluginUpcomingPriceChangeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePluginUpcomingPriceChangeRequest(c.Server, teamName, pluginKind, pluginName, body) if err != nil { return nil, err } @@ -719,8 +1030,8 @@ func (c *Client) UploadImage(ctx context.Context, reqEditors ...RequestEditorFn) return c.Client.Do(req) } -func (c *Client) GetCurrentUser(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetCurrentUserRequest(c.Server) +func (c *Client) ListPluginVersions(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, params *ListPluginVersionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListPluginVersionsRequest(c.Server, teamName, pluginKind, pluginName, params) if err != nil { return nil, err } @@ -731,8 +1042,8 @@ func (c *Client) GetCurrentUser(ctx context.Context, reqEditors ...RequestEditor return c.Client.Do(req) } -func (c *Client) ListCurrentUserInvitations(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListCurrentUserInvitationsRequest(c.Server, params) +func (c *Client) GetPluginVersion(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetPluginVersionRequest(c.Server, teamName, pluginKind, pluginName, versionName) if err != nil { return nil, err } @@ -743,8 +1054,8 @@ func (c *Client) ListCurrentUserInvitations(ctx context.Context, params *ListCur return c.Client.Do(req) } -func (c *Client) GetCurrentUserMemberships(ctx context.Context, params *GetCurrentUserMembershipsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetCurrentUserMembershipsRequest(c.Server, params) +func (c *Client) UpdatePluginVersionWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdatePluginVersionRequestWithBody(c.Server, teamName, pluginKind, pluginName, versionName, contentType, body) if err != nil { return nil, err } @@ -755,1210 +1066,1384 @@ func (c *Client) GetCurrentUserMemberships(ctx context.Context, params *GetCurre return c.Client.Do(req) } -// NewHealthCheckRequest generates requests for HealthCheck -func NewHealthCheckRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) +func (c *Client) UpdatePluginVersion(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdatePluginVersionRequest(c.Server, teamName, pluginKind, pluginName, versionName, body) if err != nil { return nil, err } - - operationPath := fmt.Sprintf("/") - if operationPath[0] == '/' { - operationPath = "." + operationPath + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - queryURL, err := serverURL.Parse(operationPath) +func (c *Client) CreatePluginVersionWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePluginVersionRequestWithBody(c.Server, teamName, pluginKind, pluginName, versionName, contentType, body) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - req, err := http.NewRequest("GET", queryURL.String(), nil) +func (c *Client) CreatePluginVersion(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePluginVersionRequest(c.Server, teamName, pluginKind, pluginName, versionName, body) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - return req, nil +func (c *Client) DownloadPluginAsset(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDownloadPluginAssetRequest(c.Server, teamName, pluginKind, pluginName, versionName, targetName, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewListPluginsRequest generates requests for ListPlugins -func NewListPluginsRequest(server string, params *ListPluginsParams) (*http.Request, error) { - var err error +func (c *Client) UploadPluginAsset(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUploadPluginAssetRequest(c.Server, teamName, pluginKind, pluginName, versionName, targetName) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - serverURL, err := url.Parse(server) +func (c *Client) DeletePluginVersionDocsWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeletePluginVersionDocsRequestWithBody(c.Server, teamName, pluginKind, pluginName, versionName, contentType, body) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - operationPath := fmt.Sprintf("/plugins") - if operationPath[0] == '/' { - operationPath = "." + operationPath +func (c *Client) DeletePluginVersionDocs(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeletePluginVersionDocsRequest(c.Server, teamName, pluginKind, pluginName, versionName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - queryURL, err := serverURL.Parse(operationPath) +func (c *Client) ListPluginVersionDocs(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListPluginVersionDocsRequest(c.Server, teamName, pluginKind, pluginName, versionName, params) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - if params != nil { - queryValues := queryURL.Query() +func (c *Client) ReplacePluginVersionDocsWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewReplacePluginVersionDocsRequestWithBody(c.Server, teamName, pluginKind, pluginName, versionName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - if params.SortBy != nil { +func (c *Client) ReplacePluginVersionDocs(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body ReplacePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewReplacePluginVersionDocsRequest(c.Server, teamName, pluginKind, pluginName, versionName, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort_by", runtime.ParamLocationQuery, *params.SortBy); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() +func (c *Client) CreatePluginVersionDocsWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePluginVersionDocsRequestWithBody(c.Server, teamName, pluginKind, pluginName, versionName, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - req, err := http.NewRequest("GET", queryURL.String(), nil) +func (c *Client) CreatePluginVersionDocs(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePluginVersionDocsRequest(c.Server, teamName, pluginKind, pluginName, versionName, body) if err != nil { return nil, err } - - return req, nil + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewCreatePluginRequest calls the generic CreatePlugin builder with application/json body -func NewCreatePluginRequest(server string, body CreatePluginJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +func (c *Client) DeletePluginVersionTablesWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeletePluginVersionTablesRequestWithBody(c.Server, teamName, pluginKind, pluginName, versionName, contentType, body) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewCreatePluginRequestWithBody(server, "application/json", bodyReader) + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewCreatePluginRequestWithBody generates requests for CreatePlugin with any type of body -func NewCreatePluginRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) +func (c *Client) DeletePluginVersionTables(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeletePluginVersionTablesRequest(c.Server, teamName, pluginKind, pluginName, versionName, body) if err != nil { return nil, err } - - operationPath := fmt.Sprintf("/plugins") - if operationPath[0] == '/' { - operationPath = "." + operationPath + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - queryURL, err := serverURL.Parse(operationPath) +func (c *Client) ListPluginVersionTables(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListPluginVersionTablesRequest(c.Server, teamName, pluginKind, pluginName, versionName, params) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - req, err := http.NewRequest("POST", queryURL.String(), body) +func (c *Client) CreatePluginVersionTablesWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePluginVersionTablesRequestWithBody(c.Server, teamName, pluginKind, pluginName, versionName, contentType, body) if err != nil { return nil, err } - - req.Header.Add("Content-Type", contentType) - - return req, nil + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewGetPluginRequest generates requests for GetPlugin -func NewGetPluginRequest(server string, teamName TeamName, pluginName PluginName) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) +func (c *Client) CreatePluginVersionTables(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreatePluginVersionTablesRequest(c.Server, teamName, pluginKind, pluginName, versionName, body) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) +func (c *Client) GetPluginVersionTable(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetPluginVersionTableRequest(c.Server, teamName, pluginKind, pluginName, versionName, tableName) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - serverURL, err := url.Parse(server) +func (c *Client) RemovePluginUIAssets(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewRemovePluginUIAssetsRequest(c.Server, teamName, pluginKind, pluginName, versionName) if err != nil { return nil, err } - - operationPath := fmt.Sprintf("/plugins/%s/%s", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - queryURL, err := serverURL.Parse(operationPath) +func (c *Client) UploadPluginUIAssetsWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUploadPluginUIAssetsRequestWithBody(c.Server, teamName, pluginKind, pluginName, versionName, contentType, body) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - req, err := http.NewRequest("GET", queryURL.String(), nil) +func (c *Client) UploadPluginUIAssets(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UploadPluginUIAssetsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUploadPluginUIAssetsRequest(c.Server, teamName, pluginKind, pluginName, versionName, body) if err != nil { return nil, err } - - return req, nil + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewUpdatePluginRequest calls the generic UpdatePlugin builder with application/json body -func NewUpdatePluginRequest(server string, teamName TeamName, pluginName PluginName, body UpdatePluginJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +func (c *Client) FinalizePluginUIAssetUploadWithBody(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewFinalizePluginUIAssetUploadRequestWithBody(c.Server, teamName, pluginKind, pluginName, versionName, contentType, body) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewUpdatePluginRequestWithBody(server, teamName, pluginName, "application/json", bodyReader) + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewUpdatePluginRequestWithBody generates requests for UpdatePlugin with any type of body -func NewUpdatePluginRequestWithBody(server string, teamName TeamName, pluginName PluginName, contentType string, body io.Reader) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) +func (c *Client) FinalizePluginUIAssetUpload(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body FinalizePluginUIAssetUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewFinalizePluginUIAssetUploadRequest(c.Server, teamName, pluginKind, pluginName, versionName, body) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) +func (c *Client) AuthRegistryRequest(ctx context.Context, params *AuthRegistryRequestParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAuthRegistryRequestRequest(c.Server, params) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - serverURL, err := url.Parse(server) +func (c *Client) ListTeams(ctx context.Context, params *ListTeamsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListTeamsRequest(c.Server, params) if err != nil { return nil, err } - - operationPath := fmt.Sprintf("/plugins/%s/%s", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - queryURL, err := serverURL.Parse(operationPath) +func (c *Client) CreateTeamWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateTeamRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - req, err := http.NewRequest("PUT", queryURL.String(), body) +func (c *Client) CreateTeam(ctx context.Context, body CreateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateTeamRequest(c.Server, body) if err != nil { return nil, err } - - req.Header.Add("Content-Type", contentType) - - return req, nil + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewListPluginVersionsRequest generates requests for ListPluginVersions -func NewListPluginVersionsRequest(server string, teamName TeamName, pluginName PluginName, params *ListPluginVersionsParams) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) +func (c *Client) DeleteTeam(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteTeamRequest(c.Server, teamName) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) +func (c *Client) GetTeamByName(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetTeamByNameRequest(c.Server, teamName) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - serverURL, err := url.Parse(server) +func (c *Client) UpdateTeamWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateTeamRequestWithBody(c.Server, teamName, contentType, body) if err != nil { return nil, err } - - operationPath := fmt.Sprintf("/plugins/%s/%s/versions", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - queryURL, err := serverURL.Parse(operationPath) +func (c *Client) UpdateTeam(ctx context.Context, teamName TeamName, body UpdateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateTeamRequest(c.Server, teamName, body) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - if params != nil { - queryValues := queryURL.Query() +func (c *Client) ListAddonOrdersByTeam(ctx context.Context, teamName TeamName, params *ListAddonOrdersByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListAddonOrdersByTeamRequest(c.Server, teamName, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - if params.SortBy != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort_by", runtime.ParamLocationQuery, *params.SortBy); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) +func (c *Client) CreateAddonOrderForTeamWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateAddonOrderForTeamRequestWithBody(c.Server, teamName, contentType, body) if err != nil { return nil, err } - - return req, nil -} - -// NewCreatePluginVersionRequest calls the generic CreatePluginVersion builder with application/json body -func NewCreatePluginVersionRequest(server string, teamName TeamName, pluginName PluginName, body CreatePluginVersionJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewCreatePluginVersionRequestWithBody(server, teamName, pluginName, "application/json", bodyReader) + return c.Client.Do(req) } -// NewCreatePluginVersionRequestWithBody generates requests for CreatePluginVersion with any type of body -func NewCreatePluginVersionRequestWithBody(server string, teamName TeamName, pluginName PluginName, contentType string, body io.Reader) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) +func (c *Client) CreateAddonOrderForTeam(ctx context.Context, teamName TeamName, body CreateAddonOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateAddonOrderForTeamRequest(c.Server, teamName, body) if err != nil { return nil, err } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) - if err != nil { + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { return nil, err } + return c.Client.Do(req) +} - serverURL, err := url.Parse(server) +func (c *Client) GetAddonOrderByTeam(ctx context.Context, teamName TeamName, addonOrderID AddonOrderID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetAddonOrderByTeamRequest(c.Server, teamName, addonOrderID) if err != nil { return nil, err } - - operationPath := fmt.Sprintf("/plugins/%s/%s/versions", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - queryURL, err := serverURL.Parse(operationPath) +func (c *Client) DeleteAddonsByTeam(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteAddonsByTeamRequest(c.Server, teamName) if err != nil { return nil, err } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { return nil, err } - - req.Header.Add("Content-Type", contentType) - - return req, nil + return c.Client.Do(req) } -// NewGetPluginVersionRequest generates requests for GetPluginVersion -func NewGetPluginVersionRequest(server string, teamName TeamName, pluginName PluginName, versionName VersionName) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) +func (c *Client) ListAddonsByTeam(ctx context.Context, teamName TeamName, params *ListAddonsByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListAddonsByTeamRequest(c.Server, teamName, params) if err != nil { return nil, err } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) - if err != nil { + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { return nil, err } + return c.Client.Do(req) +} - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) +func (c *Client) DownloadAddonAssetByTeam(ctx context.Context, teamName TeamName, addonTeam AddonTeam, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDownloadAddonAssetByTeamRequest(c.Server, teamName, addonTeam, addonType, addonName, versionName, params) if err != nil { return nil, err } - - serverURL, err := url.Parse(server) - if err != nil { + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { return nil, err } + return c.Client.Do(req) +} - operationPath := fmt.Sprintf("/plugins/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) +func (c *Client) AIOnboardingChatWithBody(ctx context.Context, teamName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAIOnboardingChatRequestWithBody(c.Server, teamName, contentType, body) if err != nil { return nil, err } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { return nil, err } - - return req, nil + return c.Client.Do(req) } -// NewUpdatePluginVersionRequest calls the generic UpdatePluginVersion builder with application/json body -func NewUpdatePluginVersionRequest(server string, teamName TeamName, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +func (c *Client) AIOnboardingChat(ctx context.Context, teamName string, body AIOnboardingChatJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAIOnboardingChatRequest(c.Server, teamName, body) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewUpdatePluginVersionRequestWithBody(server, teamName, pluginName, versionName, "application/json", bodyReader) -} - -// NewUpdatePluginVersionRequestWithBody generates requests for UpdatePluginVersion with any type of body -func NewUpdatePluginVersionRequestWithBody(server string, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { return nil, err } + return c.Client.Do(req) +} - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) +func (c *Client) AIOnboardingEndConversation(ctx context.Context, teamName string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAIOnboardingEndConversationRequest(c.Server, teamName) if err != nil { return nil, err } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) - if err != nil { + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { return nil, err } + return c.Client.Do(req) +} - serverURL, err := url.Parse(server) +func (c *Client) AIOnboardingNewConversationWithBody(ctx context.Context, teamName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAIOnboardingNewConversationRequestWithBody(c.Server, teamName, contentType, body) if err != nil { return nil, err } - - operationPath := fmt.Sprintf("/plugins/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2) - if operationPath[0] == '/' { - operationPath = "." + operationPath + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - queryURL, err := serverURL.Parse(operationPath) +func (c *Client) AIOnboardingNewConversation(ctx context.Context, teamName string, body AIOnboardingNewConversationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAIOnboardingNewConversationRequest(c.Server, teamName, body) if err != nil { return nil, err } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { return nil, err } - - req.Header.Add("Content-Type", contentType) - - return req, nil + return c.Client.Do(req) } -// NewDownloadPluginAssetRequest generates requests for DownloadPluginAsset -func NewDownloadPluginAssetRequest(server string, teamName TeamName, pluginName PluginName, versionName VersionName, targetName TargetName) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) +func (c *Client) ListTeamAPIKeys(ctx context.Context, teamName TeamName, params *ListTeamAPIKeysParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListTeamAPIKeysRequest(c.Server, teamName, params) if err != nil { return nil, err } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) - if err != nil { + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { return nil, err } + return c.Client.Do(req) +} - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) +func (c *Client) CreateTeamAPIKeyWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateTeamAPIKeyRequestWithBody(c.Server, teamName, contentType, body) if err != nil { return nil, err } - - var pathParam3 string - - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "target_name", runtime.ParamLocationPath, targetName) - if err != nil { + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { return nil, err } + return c.Client.Do(req) +} - serverURL, err := url.Parse(server) +func (c *Client) CreateTeamAPIKey(ctx context.Context, teamName TeamName, body CreateTeamAPIKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateTeamAPIKeyRequest(c.Server, teamName, body) if err != nil { return nil, err } - - operationPath := fmt.Sprintf("/plugins/%s/%s/versions/%s/assets/%s", pathParam0, pathParam1, pathParam2, pathParam3) - if operationPath[0] == '/' { - operationPath = "." + operationPath + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - queryURL, err := serverURL.Parse(operationPath) +func (c *Client) DeleteTeamAPIKey(ctx context.Context, teamName TeamName, apiKeyID APIKeyID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteTeamAPIKeyRequest(c.Server, teamName, apiKeyID) if err != nil { return nil, err } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { return nil, err } - - return req, nil + return c.Client.Do(req) } -// NewUploadPluginAssetRequest generates requests for UploadPluginAsset -func NewUploadPluginAssetRequest(server string, teamName TeamName, pluginName PluginName, versionName VersionName, targetName TargetName) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) +func (c *Client) CreateTeamImagesWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateTeamImagesRequestWithBody(c.Server, teamName, contentType, body) if err != nil { return nil, err } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) - if err != nil { + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { return nil, err } + return c.Client.Do(req) +} - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) +func (c *Client) CreateTeamImages(ctx context.Context, teamName TeamName, body CreateTeamImagesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateTeamImagesRequest(c.Server, teamName, body) if err != nil { return nil, err } - - var pathParam3 string - - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "target_name", runtime.ParamLocationPath, targetName) - if err != nil { + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { return nil, err } + return c.Client.Do(req) +} - serverURL, err := url.Parse(server) +func (c *Client) DeleteTeamInvitationWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteTeamInvitationRequestWithBody(c.Server, teamName, contentType, body) if err != nil { return nil, err } - - operationPath := fmt.Sprintf("/plugins/%s/%s/versions/%s/assets/%s", pathParam0, pathParam1, pathParam2, pathParam3) - if operationPath[0] == '/' { - operationPath = "." + operationPath + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - queryURL, err := serverURL.Parse(operationPath) +func (c *Client) DeleteTeamInvitation(ctx context.Context, teamName TeamName, body DeleteTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteTeamInvitationRequest(c.Server, teamName, body) if err != nil { return nil, err } - - req, err := http.NewRequest("POST", queryURL.String(), nil) - if err != nil { + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { return nil, err } - - return req, nil + return c.Client.Do(req) } -// NewDeletePluginVersionDocsRequest calls the generic DeletePluginVersionDocs builder with application/json body -func NewDeletePluginVersionDocsRequest(server string, teamName TeamName, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +func (c *Client) ListTeamInvitations(ctx context.Context, teamName TeamName, params *ListTeamInvitationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListTeamInvitationsRequest(c.Server, teamName, params) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewDeletePluginVersionDocsRequestWithBody(server, teamName, pluginName, versionName, "application/json", bodyReader) -} - -// NewDeletePluginVersionDocsRequestWithBody generates requests for DeletePluginVersionDocs with any type of body -func NewDeletePluginVersionDocsRequestWithBody(server string, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { return nil, err } + return c.Client.Do(req) +} - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) +func (c *Client) EmailTeamInvitationWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewEmailTeamInvitationRequestWithBody(c.Server, teamName, contentType, body) if err != nil { return nil, err } - - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) - if err != nil { + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { return nil, err } + return c.Client.Do(req) +} - serverURL, err := url.Parse(server) +func (c *Client) EmailTeamInvitation(ctx context.Context, teamName TeamName, body EmailTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewEmailTeamInvitationRequest(c.Server, teamName, body) if err != nil { return nil, err } - - operationPath := fmt.Sprintf("/plugins/%s/%s/versions/%s/docs", pathParam0, pathParam1, pathParam2) - if operationPath[0] == '/' { - operationPath = "." + operationPath + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - queryURL, err := serverURL.Parse(operationPath) +func (c *Client) AcceptTeamInvitationWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAcceptTeamInvitationRequestWithBody(c.Server, teamName, contentType, body) if err != nil { return nil, err } - - req, err := http.NewRequest("DELETE", queryURL.String(), body) - if err != nil { + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { return nil, err } - - req.Header.Add("Content-Type", contentType) - - return req, nil + return c.Client.Do(req) } -// NewListPluginVersionDocsRequest generates requests for ListPluginVersionDocs -func NewListPluginVersionDocsRequest(server string, teamName TeamName, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) +func (c *Client) AcceptTeamInvitation(ctx context.Context, teamName TeamName, body AcceptTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAcceptTeamInvitationRequest(c.Server, teamName, body) if err != nil { return nil, err } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) - if err != nil { + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { return nil, err } + return c.Client.Do(req) +} - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) +func (c *Client) CancelTeamInvitation(ctx context.Context, teamName TeamName, email EmailBasic, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCancelTeamInvitationRequest(c.Server, teamName, email) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - serverURL, err := url.Parse(server) +func (c *Client) ListInvoicesByTeam(ctx context.Context, teamName TeamName, params *ListInvoicesByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListInvoicesByTeamRequest(c.Server, teamName, params) if err != nil { return nil, err } - - operationPath := fmt.Sprintf("/plugins/%s/%s/versions/%s/docs", pathParam0, pathParam1, pathParam2) - if operationPath[0] == '/' { - operationPath = "." + operationPath + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - queryURL, err := serverURL.Parse(operationPath) +func (c *Client) GetManagedDatabases(ctx context.Context, teamName TeamName, params *GetManagedDatabasesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetManagedDatabasesRequest(c.Server, teamName, params) if err != nil { return nil, err } - - if params != nil { - queryValues := queryURL.Query() - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - req, err := http.NewRequest("GET", queryURL.String(), nil) +func (c *Client) CreateManagedDatabaseWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateManagedDatabaseRequestWithBody(c.Server, teamName, contentType, body) if err != nil { return nil, err } - - return req, nil + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewCreatePluginVersionDocsRequest calls the generic CreatePluginVersionDocs builder with application/json body -func NewCreatePluginVersionDocsRequest(server string, teamName TeamName, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +func (c *Client) CreateManagedDatabase(ctx context.Context, teamName TeamName, body CreateManagedDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateManagedDatabaseRequest(c.Server, teamName, body) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewCreatePluginVersionDocsRequestWithBody(server, teamName, pluginName, versionName, "application/json", bodyReader) + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewCreatePluginVersionDocsRequestWithBody generates requests for CreatePluginVersionDocs with any type of body -func NewCreatePluginVersionDocsRequestWithBody(server string, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) +func (c *Client) DeleteManagedDatabase(ctx context.Context, teamName TeamName, managedDatabaseID ManagedDatabaseID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteManagedDatabaseRequest(c.Server, teamName, managedDatabaseID) if err != nil { return nil, err } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) - if err != nil { + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { return nil, err } + return c.Client.Do(req) +} - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) +func (c *Client) GetManagedDatabase(ctx context.Context, teamName TeamName, managedDatabaseID ManagedDatabaseID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetManagedDatabaseRequest(c.Server, teamName, managedDatabaseID) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - serverURL, err := url.Parse(server) +func (c *Client) RemoveTeamMembershipWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewRemoveTeamMembershipRequestWithBody(c.Server, teamName, contentType, body) if err != nil { return nil, err } - - operationPath := fmt.Sprintf("/plugins/%s/%s/versions/%s/docs", pathParam0, pathParam1, pathParam2) - if operationPath[0] == '/' { - operationPath = "." + operationPath + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - queryURL, err := serverURL.Parse(operationPath) +func (c *Client) RemoveTeamMembership(ctx context.Context, teamName TeamName, body RemoveTeamMembershipJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewRemoveTeamMembershipRequest(c.Server, teamName, body) if err != nil { return nil, err } - - req, err := http.NewRequest("PUT", queryURL.String(), body) - if err != nil { + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { return nil, err } - - req.Header.Add("Content-Type", contentType) - - return req, nil + return c.Client.Do(req) } -// NewDeletePluginVersionTablesRequest calls the generic DeletePluginVersionTables builder with application/json body -func NewDeletePluginVersionTablesRequest(server string, teamName TeamName, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +func (c *Client) GetTeamMemberships(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetTeamMembershipsRequest(c.Server, teamName, params) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewDeletePluginVersionTablesRequestWithBody(server, teamName, pluginName, versionName, "application/json", bodyReader) + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewDeletePluginVersionTablesRequestWithBody generates requests for DeletePluginVersionTables with any type of body -func NewDeletePluginVersionTablesRequestWithBody(server string, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) +func (c *Client) DeleteTeamMembership(ctx context.Context, teamName TeamName, email EmailBasic, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteTeamMembershipRequest(c.Server, teamName, email) if err != nil { return nil, err } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) - if err != nil { + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { return nil, err } + return c.Client.Do(req) +} - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) +func (c *Client) DeletePluginsByTeam(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeletePluginsByTeamRequest(c.Server, teamName) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - serverURL, err := url.Parse(server) +func (c *Client) ListPluginsByTeam(ctx context.Context, teamName TeamName, params *ListPluginsByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListPluginsByTeamRequest(c.Server, teamName, params) if err != nil { return nil, err } - - operationPath := fmt.Sprintf("/plugins/%s/%s/versions/%s/tables", pathParam0, pathParam1, pathParam2) - if operationPath[0] == '/' { - operationPath = "." + operationPath + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - queryURL, err := serverURL.Parse(operationPath) +func (c *Client) DownloadPluginAssetByTeam(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDownloadPluginAssetByTeamRequest(c.Server, teamName, pluginTeam, pluginKind, pluginName, versionName, targetName, params) if err != nil { return nil, err } - - req, err := http.NewRequest("DELETE", queryURL.String(), body) - if err != nil { + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { return nil, err } - - req.Header.Add("Content-Type", contentType) - - return req, nil + return c.Client.Do(req) } -// NewListPluginVersionTablesRequest generates requests for ListPluginVersionTables -func NewListPluginVersionTablesRequest(server string, teamName TeamName, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) +func (c *Client) GetSettings(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSettingsRequest(c.Server, teamName) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) +func (c *Client) UpdateSettingsWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateSettingsRequestWithBody(c.Server, teamName, contentType, body) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) +func (c *Client) UpdateSettings(ctx context.Context, teamName TeamName, body UpdateSettingsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateSettingsRequest(c.Server, teamName, body) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - serverURL, err := url.Parse(server) +func (c *Client) ListSubscriptionOrdersByTeam(ctx context.Context, teamName TeamName, params *ListSubscriptionOrdersByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListSubscriptionOrdersByTeamRequest(c.Server, teamName, params) if err != nil { return nil, err } - - operationPath := fmt.Sprintf("/plugins/%s/%s/versions/%s/tables", pathParam0, pathParam1, pathParam2) - if operationPath[0] == '/' { - operationPath = "." + operationPath + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - queryURL, err := serverURL.Parse(operationPath) +func (c *Client) CreateSubscriptionOrderForTeamWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSubscriptionOrderForTeamRequestWithBody(c.Server, teamName, contentType, body) if err != nil { return nil, err } - - if params != nil { - queryValues := queryURL.Query() - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - req, err := http.NewRequest("GET", queryURL.String(), nil) +func (c *Client) CreateSubscriptionOrderForTeam(ctx context.Context, teamName TeamName, body CreateSubscriptionOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSubscriptionOrderForTeamRequest(c.Server, teamName, body) if err != nil { return nil, err } - - return req, nil + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewCreatePluginVersionTablesRequest calls the generic CreatePluginVersionTables builder with application/json body -func NewCreatePluginVersionTablesRequest(server string, teamName TeamName, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +func (c *Client) GetSubscriptionOrderByTeam(ctx context.Context, teamName TeamName, teamSubscriptionOrderID TeamSubscriptionOrderID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSubscriptionOrderByTeamRequest(c.Server, teamName, teamSubscriptionOrderID) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewCreatePluginVersionTablesRequestWithBody(server, teamName, pluginName, versionName, "application/json", bodyReader) + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewCreatePluginVersionTablesRequestWithBody generates requests for CreatePluginVersionTables with any type of body -func NewCreatePluginVersionTablesRequestWithBody(server string, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) +func (c *Client) ListTeamPluginUsage(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListTeamPluginUsageRequest(c.Server, teamName, params) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) +func (c *Client) IncreaseTeamPluginUsageWithBody(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewIncreaseTeamPluginUsageRequestWithBody(c.Server, teamName, contentType, body) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) +func (c *Client) IncreaseTeamPluginUsage(ctx context.Context, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewIncreaseTeamPluginUsageRequest(c.Server, teamName, body) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - serverURL, err := url.Parse(server) +func (c *Client) GetTeamUsageSummary(ctx context.Context, teamName TeamName, params *GetTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetTeamUsageSummaryRequest(c.Server, teamName, params) if err != nil { return nil, err } - - operationPath := fmt.Sprintf("/plugins/%s/%s/versions/%s/tables", pathParam0, pathParam1, pathParam2) - if operationPath[0] == '/' { - operationPath = "." + operationPath + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - queryURL, err := serverURL.Parse(operationPath) +func (c *Client) GetGroupedTeamUsageSummary(ctx context.Context, teamName TeamName, groupBy GetGroupedTeamUsageSummaryParamsGroupBy, params *GetGroupedTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetGroupedTeamUsageSummaryRequest(c.Server, teamName, groupBy, params) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - req, err := http.NewRequest("PUT", queryURL.String(), body) +func (c *Client) GetTeamPluginUsage(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetTeamPluginUsageRequest(c.Server, teamName, pluginTeam, pluginKind, pluginName) if err != nil { return nil, err } - - req.Header.Add("Content-Type", contentType) - - return req, nil + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewGetPluginVersionTableRequest generates requests for GetPluginVersionTable -func NewGetPluginVersionTableRequest(server string, teamName TeamName, pluginName PluginName, versionName VersionName, tableName string) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) +func (c *Client) ListUsersByTeam(ctx context.Context, teamName TeamName, params *ListUsersByTeamParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListUsersByTeamRequest(c.Server, teamName, params) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) +func (c *Client) UploadImageWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUploadImageRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - var pathParam2 string - - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) +func (c *Client) UploadImage(ctx context.Context, body UploadImageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUploadImageRequest(c.Server, body) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - var pathParam3 string - - pathParam3, err = runtime.StyleParamWithLocation("simple", false, "table_name", runtime.ParamLocationPath, tableName) +func (c *Client) GetCurrentUser(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetCurrentUserRequest(c.Server) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - serverURL, err := url.Parse(server) +func (c *Client) UpdateCurrentUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateCurrentUserRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } - - operationPath := fmt.Sprintf("/plugins/%s/%s/versions/%s/tables/%s", pathParam0, pathParam1, pathParam2, pathParam3) - if operationPath[0] == '/' { - operationPath = "." + operationPath + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - queryURL, err := serverURL.Parse(operationPath) +func (c *Client) UpdateCurrentUser(ctx context.Context, body UpdateCurrentUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateCurrentUserRequest(c.Server, body) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - req, err := http.NewRequest("GET", queryURL.String(), nil) +func (c *Client) SendAnonymousEventWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSendAnonymousEventRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - return req, nil +func (c *Client) SendAnonymousEvent(ctx context.Context, body SendAnonymousEventJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSendAnonymousEventRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewListTeamsRequest generates requests for ListTeams -func NewListTeamsRequest(server string, params *ListTeamsParams) (*http.Request, error) { - var err error +func (c *Client) CheckUserAuthStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCheckUserAuthStatusRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - serverURL, err := url.Parse(server) +func (c *Client) UpdateCustomerWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateCustomerRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - operationPath := fmt.Sprintf("/teams") - if operationPath[0] == '/' { - operationPath = "." + operationPath +func (c *Client) UpdateCustomer(ctx context.Context, body UpdateCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateCustomerRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - queryURL, err := serverURL.Parse(operationPath) +func (c *Client) SendUserEventWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSendUserEventRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - if params != nil { - queryValues := queryURL.Query() - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } +func (c *Client) SendUserEvent(ctx context.Context, body SendUserEventJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSendUserEventRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - } +func (c *Client) ListCurrentUserInvitations(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListCurrentUserInvitationsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - if params.Page != nil { +func (c *Client) LogoutUser(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewLogoutUserRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } +func (c *Client) LoginUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewLoginUserRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - } +func (c *Client) LoginUser(ctx context.Context, body LoginUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewLoginUserRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - queryURL.RawQuery = queryValues.Encode() +func (c *Client) GetCurrentUserMemberships(ctx context.Context, params *GetCurrentUserMembershipsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetCurrentUserMembershipsRequest(c.Server, params) + if err != nil { + return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - req, err := http.NewRequest("GET", queryURL.String(), nil) +func (c *Client) RegisterUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewRegisterUserRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - return req, nil +func (c *Client) RegisterUser(ctx context.Context, body RegisterUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewRegisterUserRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewCreateTeamRequest calls the generic CreateTeam builder with application/json body -func NewCreateTeamRequest(server string, body CreateTeamJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +func (c *Client) ResetUserPasswordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewResetUserPasswordRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewCreateTeamRequestWithBody(server, "application/json", bodyReader) + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewCreateTeamRequestWithBody generates requests for CreateTeam with any type of body -func NewCreateTeamRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error +func (c *Client) ResetUserPassword(ctx context.Context, body ResetUserPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewResetUserPasswordRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - serverURL, err := url.Parse(server) +func (c *Client) DeterminePlatformTenantByEmail(ctx context.Context, params *DeterminePlatformTenantByEmailParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeterminePlatformTenantByEmailRequest(c.Server, params) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - operationPath := fmt.Sprintf("/teams") - if operationPath[0] == '/' { - operationPath = "." + operationPath +func (c *Client) CreateUserToken(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateUserTokenRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err } + return c.Client.Do(req) +} - queryURL, err := serverURL.Parse(operationPath) +func (c *Client) UserTOTPDelete(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserTOTPDeleteRequest(c.Server) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - req, err := http.NewRequest("POST", queryURL.String(), body) +func (c *Client) UserTOTPSetup(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserTOTPSetupRequest(c.Server) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - req.Header.Add("Content-Type", contentType) +func (c *Client) UserTOTPVerifyWithBody(ctx context.Context, params *UserTOTPVerifyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserTOTPVerifyRequestWithBody(c.Server, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - return req, nil +func (c *Client) UserTOTPVerify(ctx context.Context, params *UserTOTPVerifyParams, body UserTOTPVerifyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUserTOTPVerifyRequest(c.Server, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewGetTeamByNameRequest generates requests for GetTeamByName -func NewGetTeamByNameRequest(server string, teamName TeamName) (*http.Request, error) { - var err error +func (c *Client) VerifyUserEmailWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewVerifyUserEmailRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - var pathParam0 string +func (c *Client) VerifyUserEmail(ctx context.Context, body VerifyUserEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewVerifyUserEmailRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) +func (c *Client) DeleteUser(ctx context.Context, userID UserID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteUserRequest(c.Server, userID) if err != nil { return nil, err } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +// NewHealthCheckRequest generates requests for HealthCheck +func NewHealthCheckRequest(server string) (*http.Request, error) { + var err error serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s", pathParam0) + operationPath := fmt.Sprintf("/") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -1976,23 +2461,16 @@ func NewGetTeamByNameRequest(server string, teamName TeamName) (*http.Request, e return req, nil } -// NewListTeamApiKeysRequest generates requests for ListTeamApiKeys -func NewListTeamApiKeysRequest(server string, teamName TeamName, params *ListTeamApiKeysParams) (*http.Request, error) { +// NewListAddonsRequest generates requests for ListAddons +func NewListAddonsRequest(server string, params *ListAddonsParams) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/apikeys", pathParam0) + operationPath := fmt.Sprintf("/addons") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2005,9 +2483,9 @@ func NewListTeamApiKeysRequest(server string, teamName TeamName, params *ListTea if params != nil { queryValues := queryURL.Query() - if params.PerPage != nil { + if params.SortBy != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort_by", runtime.ParamLocationQuery, *params.SortBy); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2037,6 +2515,22 @@ func NewListTeamApiKeysRequest(server string, teamName TeamName, params *ListTea } + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + queryURL.RawQuery = queryValues.Encode() } @@ -2048,23 +2542,27 @@ func NewListTeamApiKeysRequest(server string, teamName TeamName, params *ListTea return req, nil } -// NewCreateTeamApiKeyRequest generates requests for CreateTeamApiKey -func NewCreateTeamApiKeyRequest(server string, teamName TeamName) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) +// NewCreateAddonRequest calls the generic CreateAddon builder with application/json body +func NewCreateAddonRequest(server string, body CreateAddonJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } + bodyReader = bytes.NewReader(buf) + return NewCreateAddonRequestWithBody(server, "application/json", bodyReader) +} + +// NewCreateAddonRequestWithBody generates requests for CreateAddon with any type of body +func NewCreateAddonRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/apikeys", pathParam0) + operationPath := fmt.Sprintf("/addons") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2074,16 +2572,18 @@ func NewCreateTeamApiKeyRequest(server string, teamName TeamName) (*http.Request return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewDeleteTeamApiKeyRequest generates requests for DeleteTeamApiKey -func NewDeleteTeamApiKeyRequest(server string, teamName TeamName, apiKeyName ApiKeyName) (*http.Request, error) { +// NewDeleteAddonByTeamAndNameRequest generates requests for DeleteAddonByTeamAndName +func NewDeleteAddonByTeamAndNameRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName) (*http.Request, error) { var err error var pathParam0 string @@ -2095,17 +2595,24 @@ func NewDeleteTeamApiKeyRequest(server string, teamName TeamName, apiKeyName Api var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "apikey_name", runtime.ParamLocationPath, apiKeyName) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) if err != nil { return nil, err } - serverURL, err := url.Parse(server) + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/apikeys/%s", pathParam0, pathParam1) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/addons/%s/%s/%s", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2123,8 +2630,8 @@ func NewDeleteTeamApiKeyRequest(server string, teamName TeamName, apiKeyName Api return req, nil } -// NewListTeamInvitationsRequest generates requests for ListTeamInvitations -func NewListTeamInvitationsRequest(server string, teamName TeamName, params *ListTeamInvitationsParams) (*http.Request, error) { +// NewGetAddonRequest generates requests for GetAddon +func NewGetAddonRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName) (*http.Request, error) { var err error var pathParam0 string @@ -2134,12 +2641,26 @@ func NewListTeamInvitationsRequest(server string, teamName TeamName, params *Lis return nil, err } + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/invitations", pathParam0) + operationPath := fmt.Sprintf("/addons/%s/%s/%s", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2149,44 +2670,6 @@ func NewListTeamInvitationsRequest(server string, teamName TeamName, params *Lis return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err @@ -2195,19 +2678,19 @@ func NewListTeamInvitationsRequest(server string, teamName TeamName, params *Lis return req, nil } -// NewEmailTeamInvitationRequest calls the generic EmailTeamInvitation builder with application/json body -func NewEmailTeamInvitationRequest(server string, teamName TeamName, body EmailTeamInvitationJSONRequestBody) (*http.Request, error) { +// NewUpdateAddonRequest calls the generic UpdateAddon builder with application/json body +func NewUpdateAddonRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName, body UpdateAddonJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewEmailTeamInvitationRequestWithBody(server, teamName, "application/json", bodyReader) + return NewUpdateAddonRequestWithBody(server, teamName, addonType, addonName, "application/json", bodyReader) } -// NewEmailTeamInvitationRequestWithBody generates requests for EmailTeamInvitation with any type of body -func NewEmailTeamInvitationRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { +// NewUpdateAddonRequestWithBody generates requests for UpdateAddon with any type of body +func NewUpdateAddonRequestWithBody(server string, teamName TeamName, addonType AddonType, addonName AddonName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -2217,38 +2700,16 @@ func NewEmailTeamInvitationRequestWithBody(server string, teamName TeamName, con return nil, err } - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/invitations", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } + var pathParam1 string - req, err := http.NewRequest("POST", queryURL.String(), body) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewAcceptTeamInvitationRequest generates requests for AcceptTeamInvitation -func NewAcceptTeamInvitationRequest(server string, teamName TeamName) (*http.Request, error) { - var err error - - var pathParam0 string + var pathParam2 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) if err != nil { return nil, err } @@ -2258,7 +2719,7 @@ func NewAcceptTeamInvitationRequest(server string, teamName TeamName) (*http.Req return nil, err } - operationPath := fmt.Sprintf("/teams/%s/invitations/accept", pathParam0) + operationPath := fmt.Sprintf("/addons/%s/%s/%s", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2268,16 +2729,18 @@ func NewAcceptTeamInvitationRequest(server string, teamName TeamName) (*http.Req return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), nil) + req, err := http.NewRequest("PATCH", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewCancelTeamInvitationRequest generates requests for CancelTeamInvitation -func NewCancelTeamInvitationRequest(server string, teamName TeamName, email Email) (*http.Request, error) { +// NewListAddonVersionsRequest generates requests for ListAddonVersions +func NewListAddonVersionsRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName, params *ListAddonVersionsParams) (*http.Request, error) { var err error var pathParam0 string @@ -2289,41 +2752,14 @@ func NewCancelTeamInvitationRequest(server string, teamName TeamName, email Emai var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "email", runtime.ParamLocationPath, email) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/invitations/%s", pathParam0, pathParam1) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) if err != nil { return nil, err } - return req, nil -} - -// NewGetTeamMembershipsRequest generates requests for GetTeamMemberships -func NewGetTeamMembershipsRequest(server string, teamName TeamName, params *GetTeamMembershipsParams) (*http.Request, error) { - var err error - - var pathParam0 string + var pathParam2 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) if err != nil { return nil, err } @@ -2333,7 +2769,7 @@ func NewGetTeamMembershipsRequest(server string, teamName TeamName, params *GetT return nil, err } - operationPath := fmt.Sprintf("/teams/%s/memberships", pathParam0) + operationPath := fmt.Sprintf("/addons/%s/%s/%s/versions", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2346,9 +2782,9 @@ func NewGetTeamMembershipsRequest(server string, teamName TeamName, params *GetT if params != nil { queryValues := queryURL.Query() - if params.Page != nil { + if params.SortBy != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort_by", runtime.ParamLocationQuery, *params.SortBy); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2362,9 +2798,9 @@ func NewGetTeamMembershipsRequest(server string, teamName TeamName, params *GetT } - if params.PerPage != nil { + if params.Page != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2378,49 +2814,9 @@ func NewGetTeamMembershipsRequest(server string, teamName TeamName, params *GetT } - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewListPluginsByTeamRequest generates requests for ListPluginsByTeam -func NewListPluginsByTeamRequest(server string, teamName TeamName, params *ListPluginsByTeamParams) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/plugins", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Page != nil { + if params.PerPage != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2434,9 +2830,9 @@ func NewListPluginsByTeamRequest(server string, teamName TeamName, params *ListP } - if params.PerPage != nil { + if params.IncludeDrafts != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_drafts", runtime.ParamLocationQuery, *params.IncludeDrafts); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2461,8 +2857,8 @@ func NewListPluginsByTeamRequest(server string, teamName TeamName, params *ListP return req, nil } -// NewListUsersByTeamRequest generates requests for ListUsersByTeam -func NewListUsersByTeamRequest(server string, teamName TeamName, params *ListUsersByTeamParams) (*http.Request, error) { +// NewGetAddonVersionRequest generates requests for GetAddonVersion +func NewGetAddonVersionRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName) (*http.Request, error) { var err error var pathParam0 string @@ -2472,77 +2868,33 @@ func NewListUsersByTeamRequest(server string, teamName TeamName, params *ListUse return nil, err } - serverURL, err := url.Parse(server) + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/teams/%s/users", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + var pathParam2 string - queryURL, err := serverURL.Parse(operationPath) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) if err != nil { return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } + var pathParam3 string - req, err := http.NewRequest("GET", queryURL.String(), nil) + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) if err != nil { return nil, err } - return req, nil -} - -// NewUploadImageRequest generates requests for UploadImage -func NewUploadImageRequest(server string) (*http.Request, error) { - var err error - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/upload/image") + operationPath := fmt.Sprintf("/addons/%s/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2552,7 +2904,7 @@ func NewUploadImageRequest(server string) (*http.Request, error) { return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), nil) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } @@ -2560,43 +2912,55 @@ func NewUploadImageRequest(server string) (*http.Request, error) { return req, nil } -// NewGetCurrentUserRequest generates requests for GetCurrentUser -func NewGetCurrentUserRequest(server string) (*http.Request, error) { +// NewUpdateAddonVersionRequest calls the generic UpdateAddonVersion builder with application/json body +func NewUpdateAddonVersionRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body UpdateAddonVersionJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateAddonVersionRequestWithBody(server, teamName, addonType, addonName, versionName, "application/json", bodyReader) +} + +// NewUpdateAddonVersionRequestWithBody generates requests for UpdateAddonVersion with any type of body +func NewUpdateAddonVersionRequestWithBody(server string, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { var err error - serverURL, err := url.Parse(server) + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/user") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + var pathParam1 string - queryURL, err := serverURL.Parse(operationPath) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) if err != nil { return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) if err != nil { return nil, err } - return req, nil -} + var pathParam3 string -// NewListCurrentUserInvitationsRequest generates requests for ListCurrentUserInvitations -func NewListCurrentUserInvitationsRequest(server string, params *ListCurrentUserInvitationsParams) (*http.Request, error) { - var err error + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/user/invitations") + operationPath := fmt.Sprintf("/addons/%s/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2606,62 +2970,65 @@ func NewListCurrentUserInvitationsRequest(server string, params *ListCurrentUser return nil, err } - if params != nil { - queryValues := queryURL.Query() + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } - if params.Page != nil { + req.Header.Add("Content-Type", contentType) - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + return req, nil +} - } +// NewCreateAddonVersionRequest calls the generic CreateAddonVersion builder with application/json body +func NewCreateAddonVersionRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body CreateAddonVersionJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateAddonVersionRequestWithBody(server, teamName, addonType, addonName, versionName, "application/json", bodyReader) +} - if params.PerPage != nil { +// NewCreateAddonVersionRequestWithBody generates requests for CreateAddonVersion with any type of body +func NewCreateAddonVersionRequestWithBody(server string, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { + var err error - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + var pathParam0 string - } + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } - queryURL.RawQuery = queryValues.Encode() + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) + if err != nil { + return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) if err != nil { return nil, err } - return req, nil -} + var pathParam3 string -// NewGetCurrentUserMembershipsRequest generates requests for GetCurrentUserMemberships -func NewGetCurrentUserMembershipsRequest(server string, params *GetCurrentUserMembershipsParams) (*http.Request, error) { - var err error + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/user/memberships") + operationPath := fmt.Sprintf("/addons/%s/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2, pathParam3) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2671,1547 +3038,14993 @@ func NewGetCurrentUserMembershipsRequest(server string, params *GetCurrentUserMe return nil, err } - if params != nil { - queryValues := queryURL.Query() + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } - if params.Page != nil { + req.Header.Add("Content-Type", contentType) - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + return req, nil +} - } +// NewDownloadAddonAssetRequest generates requests for DownloadAddonAsset +func NewDownloadAddonAssetRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetParams) (*http.Request, error) { + var err error - if params.PerPage != nil { + var pathParam0 string - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } - } + var pathParam1 string - queryURL.RawQuery = queryValues.Encode() + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) + if err != nil { + return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) if err != nil { return nil, err } - return req, nil -} + var pathParam3 string -func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { - for _, r := range c.RequestEditors { - if err := r(ctx, req); err != nil { - return err - } - } - for _, r := range additionalEditors { - if err := r(ctx, req); err != nil { - return err - } + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err } - return nil -} - -// ClientWithResponses builds on ClientInterface to offer response payloads -type ClientWithResponses struct { - ClientInterface -} -// NewClientWithResponses creates a new ClientWithResponses, which wraps -// Client with return type handling -func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { - client, err := NewClient(server, opts...) + serverURL, err := url.Parse(server) if err != nil { return nil, err } - return &ClientWithResponses{client}, nil -} -// WithBaseURL overrides the baseURL. -func WithBaseURL(baseURL string) ClientOption { - return func(c *Client) error { - newBaseURL, err := url.Parse(baseURL) - if err != nil { - return err - } - c.Server = newBaseURL.String() - return nil + operationPath := fmt.Sprintf("/addons/%s/%s/%s/versions/%s/assets", pathParam0, pathParam1, pathParam2, pathParam3) + if operationPath[0] == '/' { + operationPath = "." + operationPath } -} -// ClientWithResponsesInterface is the interface specification for the client with responses above. -type ClientWithResponsesInterface interface { - // HealthCheckWithResponse request - HealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthCheckResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // ListPluginsWithResponse request - ListPluginsWithResponse(ctx context.Context, params *ListPluginsParams, reqEditors ...RequestEditorFn) (*ListPluginsResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - // CreatePluginWithBodyWithResponse request with any body - CreatePluginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) + if params != nil { - CreatePluginWithResponse(ctx context.Context, body CreatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) + if params.Accept != nil { + var headerParam0 string - // GetPluginWithResponse request - GetPluginWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginResponse, error) + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Accept", runtime.ParamLocationHeader, *params.Accept) + if err != nil { + return nil, err + } - // UpdatePluginWithBodyWithResponse request with any body - UpdatePluginWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) + req.Header.Set("Accept", headerParam0) + } - UpdatePluginWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, body UpdatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) + } - // ListPluginVersionsWithResponse request - ListPluginVersionsWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, params *ListPluginVersionsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionsResponse, error) + return req, nil +} - // CreatePluginVersionWithBodyWithResponse request with any body - CreatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) +// NewUploadAddonAssetRequest generates requests for UploadAddonAsset +func NewUploadAddonAssetRequest(server string, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName) (*http.Request, error) { + var err error - CreatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) + var pathParam0 string - // GetPluginVersionWithResponse request - GetPluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetPluginVersionResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } - // UpdatePluginVersionWithBodyWithResponse request with any body - UpdatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) + var pathParam1 string - UpdatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) + if err != nil { + return nil, err + } - // DownloadPluginAssetWithResponse request - DownloadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*DownloadPluginAssetResponse, error) + var pathParam2 string - // UploadPluginAssetWithResponse request - UploadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*UploadPluginAssetResponse, error) + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) + if err != nil { + return nil, err + } - // DeletePluginVersionDocsWithBodyWithResponse request with any body - DeletePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) + var pathParam3 string - DeletePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } - // ListPluginVersionDocsWithResponse request - ListPluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionDocsResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // CreatePluginVersionDocsWithBodyWithResponse request with any body - CreatePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) + operationPath := fmt.Sprintf("/addons/%s/%s/%s/versions/%s/assets", pathParam0, pathParam1, pathParam2, pathParam3) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - CreatePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // DeletePluginVersionTablesWithBodyWithResponse request with any body - DeletePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) + req, err := http.NewRequest("POST", queryURL.String(), nil) + if err != nil { + return nil, err + } - DeletePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) + return req, nil +} - // ListPluginVersionTablesWithResponse request - ListPluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams, reqEditors ...RequestEditorFn) (*ListPluginVersionTablesResponse, error) +// NewCQHealthCheckRequest generates requests for CQHealthCheck +func NewCQHealthCheckRequest(server string) (*http.Request, error) { + var err error - // CreatePluginVersionTablesWithBodyWithResponse request with any body - CreatePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - CreatePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) + operationPath := fmt.Sprintf("/cq-healthcheck") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // GetPluginVersionTableWithResponse request - GetPluginVersionTableWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*GetPluginVersionTableResponse, error) - - // ListTeamsWithResponse request - ListTeamsWithResponse(ctx context.Context, params *ListTeamsParams, reqEditors ...RequestEditorFn) (*ListTeamsResponse, error) - - // CreateTeamWithBodyWithResponse request with any body - CreateTeamWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error) - - CreateTeamWithResponse(ctx context.Context, body CreateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // GetTeamByNameWithResponse request - GetTeamByNameWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetTeamByNameResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - // ListTeamApiKeysWithResponse request - ListTeamApiKeysWithResponse(ctx context.Context, teamName TeamName, params *ListTeamApiKeysParams, reqEditors ...RequestEditorFn) (*ListTeamApiKeysResponse, error) + return req, nil +} - // CreateTeamApiKeyWithResponse request - CreateTeamApiKeyWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*CreateTeamApiKeyResponse, error) +// NewGetOpenAPIJSONRequest generates requests for GetOpenAPIJSON +func NewGetOpenAPIJSONRequest(server string) (*http.Request, error) { + var err error - // DeleteTeamApiKeyWithResponse request - DeleteTeamApiKeyWithResponse(ctx context.Context, teamName TeamName, apiKeyName ApiKeyName, reqEditors ...RequestEditorFn) (*DeleteTeamApiKeyResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // ListTeamInvitationsWithResponse request - ListTeamInvitationsWithResponse(ctx context.Context, teamName TeamName, params *ListTeamInvitationsParams, reqEditors ...RequestEditorFn) (*ListTeamInvitationsResponse, error) + operationPath := fmt.Sprintf("/openapi.json") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // EmailTeamInvitationWithBodyWithResponse request with any body - EmailTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmailTeamInvitationResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - EmailTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body EmailTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*EmailTeamInvitationResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - // AcceptTeamInvitationWithResponse request - AcceptTeamInvitationWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) + return req, nil +} - // CancelTeamInvitationWithResponse request - CancelTeamInvitationWithResponse(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*CancelTeamInvitationResponse, error) +// NewActivatePlatformRequest calls the generic ActivatePlatform builder with application/json body +func NewActivatePlatformRequest(server string, body ActivatePlatformJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewActivatePlatformRequestWithBody(server, "application/json", bodyReader) +} - // GetTeamMembershipsWithResponse request - GetTeamMembershipsWithResponse(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*GetTeamMembershipsResponse, error) +// NewActivatePlatformRequestWithBody generates requests for ActivatePlatform with any type of body +func NewActivatePlatformRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error - // ListPluginsByTeamWithResponse request - ListPluginsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListPluginsByTeamParams, reqEditors ...RequestEditorFn) (*ListPluginsByTeamResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // ListUsersByTeamWithResponse request - ListUsersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListUsersByTeamParams, reqEditors ...RequestEditorFn) (*ListUsersByTeamResponse, error) + operationPath := fmt.Sprintf("/platform/activate") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // UploadImageWithResponse request - UploadImageWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UploadImageResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // GetCurrentUserWithResponse request - GetCurrentUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentUserResponse, error) + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } - // ListCurrentUserInvitationsWithResponse request - ListCurrentUserInvitationsWithResponse(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*ListCurrentUserInvitationsResponse, error) + req.Header.Add("Content-Type", contentType) - // GetCurrentUserMembershipsWithResponse request - GetCurrentUserMembershipsWithResponse(ctx context.Context, params *GetCurrentUserMembershipsParams, reqEditors ...RequestEditorFn) (*GetCurrentUserMembershipsResponse, error) + return req, nil } -type HealthCheckResponse struct { - Body []byte - HTTPResponse *http.Response +// NewRenewPlatformActivationRequest calls the generic RenewPlatformActivation builder with application/json body +func NewRenewPlatformActivationRequest(server string, body RenewPlatformActivationJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewRenewPlatformActivationRequestWithBody(server, "application/json", bodyReader) } -// Status returns HTTPResponse.Status -func (r HealthCheckResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// NewRenewPlatformActivationRequestWithBody generates requests for RenewPlatformActivation with any type of body +func NewRenewPlatformActivationRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r HealthCheckResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + operationPath := fmt.Sprintf("/platform/activate/renew") + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return 0 -} -type ListPluginsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Items []Plugin `json:"items"` - Metadata ListMetadata `json:"metadata"` + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err } - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON500 *InternalError -} -// Status returns HTTPResponse.Status -func (r ListPluginsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err } - return http.StatusText(0) + + req.Header.Add("Content-Type", contentType) + + return req, nil } -// StatusCode returns HTTPResponse.StatusCode -func (r ListPluginsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// NewReportPlatformDataRequest calls the generic ReportPlatformData builder with application/json body +func NewReportPlatformDataRequest(server string, body ReportPlatformDataJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err } - return 0 + bodyReader = bytes.NewReader(buf) + return NewReportPlatformDataRequestWithBody(server, "application/json", bodyReader) } -type CreatePluginResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *Plugin - JSON403 *Forbidden - JSON422 *UnprocessableEntity - JSON500 *InternalError -} +// NewReportPlatformDataRequestWithBody generates requests for ReportPlatformData with any type of body +func NewReportPlatformDataRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error -// Status returns HTTPResponse.Status -func (r CreatePluginResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + serverURL, err := url.Parse(server) + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r CreatePluginResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + operationPath := fmt.Sprintf("/platform/report") + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return 0 -} -type GetPluginResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *Plugin - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON500 *InternalError -} + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } -// Status returns HTTPResponse.Status -func (r GetPluginResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err } - return http.StatusText(0) + + req.Header.Add("Content-Type", contentType) + + return req, nil } -// StatusCode returns HTTPResponse.StatusCode -func (r GetPluginResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// NewReportTenantPlatformDataRequest calls the generic ReportTenantPlatformData builder with application/json body +func NewReportTenantPlatformDataRequest(server string, tenantID openapi_types.UUID, body ReportTenantPlatformDataJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err } - return 0 + bodyReader = bytes.NewReader(buf) + return NewReportTenantPlatformDataRequestWithBody(server, tenantID, "application/json", bodyReader) } -type UpdatePluginResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *Plugin - JSON403 *Forbidden - JSON422 *UnprocessableEntity - JSON500 *InternalError -} +// NewReportTenantPlatformDataRequestWithBody generates requests for ReportTenantPlatformData with any type of body +func NewReportTenantPlatformDataRequestWithBody(server string, tenantID openapi_types.UUID, contentType string, body io.Reader) (*http.Request, error) { + var err error -// Status returns HTTPResponse.Status -func (r UpdatePluginResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "tenant_id", runtime.ParamLocationPath, tenantID) + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r UpdatePluginResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + serverURL, err := url.Parse(server) + if err != nil { + return nil, err } - return 0 -} -type ListPluginVersionsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Items []PluginVersion `json:"items"` - Metadata ListMetadata `json:"metadata"` + operationPath := fmt.Sprintf("/platform/%s/report", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath } - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON500 *InternalError -} -// Status returns HTTPResponse.Status -func (r ListPluginVersionsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r ListPluginVersionsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err } - return 0 + + req.Header.Add("Content-Type", contentType) + + return req, nil } -type CreatePluginVersionResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *PluginVersion - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON422 *UnprocessableEntity - JSON500 *InternalError -} +// NewListPluginNotificationRequestsRequest generates requests for ListPluginNotificationRequests +func NewListPluginNotificationRequestsRequest(server string, params *ListPluginNotificationRequestsParams) (*http.Request, error) { + var err error -// Status returns HTTPResponse.Status -func (r CreatePluginVersionResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + serverURL, err := url.Parse(server) + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r CreatePluginVersionResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + operationPath := fmt.Sprintf("/plugin-notification-requests") + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return 0 -} -type GetPluginVersionResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *PluginVersion - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } -// Status returns HTTPResponse.Status -func (r GetPluginVersionResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + if params != nil { + queryValues := queryURL.Query() + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r GetPluginVersionResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err } - return 0 -} -type UpdatePluginVersionResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *PluginVersion - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError + return req, nil } -// Status returns HTTPResponse.Status -func (r UpdatePluginVersionResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// NewCreatePluginNotificationRequestRequest calls the generic CreatePluginNotificationRequest builder with application/json body +func NewCreatePluginNotificationRequestRequest(server string, body CreatePluginNotificationRequestJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err } - return http.StatusText(0) + bodyReader = bytes.NewReader(buf) + return NewCreatePluginNotificationRequestRequestWithBody(server, "application/json", bodyReader) } -// StatusCode returns HTTPResponse.StatusCode -func (r UpdatePluginVersionResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// NewCreatePluginNotificationRequestRequestWithBody generates requests for CreatePluginNotificationRequest with any type of body +func NewCreatePluginNotificationRequestRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err } - return 0 -} -type DownloadPluginAssetResponse struct { - Body []byte - HTTPResponse *http.Response - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} + operationPath := fmt.Sprintf("/plugin-notification-requests") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } -// Status returns HTTPResponse.Status -func (r DownloadPluginAssetResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r DownloadPluginAssetResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err } - return 0 -} -type UploadPluginAssetResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *ReleaseURL - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON500 *InternalError + req.Header.Add("Content-Type", contentType) + + return req, nil } -// Status returns HTTPResponse.Status -func (r UploadPluginAssetResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// NewDeletePluginNotificationRequestRequest generates requests for DeletePluginNotificationRequest +func NewDeletePluginNotificationRequestRequest(server string, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r UploadPluginAssetResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err } - return 0 -} -type DeletePluginVersionDocsResponse struct { - Body []byte - HTTPResponse *http.Response -} + var pathParam2 string -// Status returns HTTPResponse.Status -func (r DeletePluginVersionDocsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r DeletePluginVersionDocsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + serverURL, err := url.Parse(server) + if err != nil { + return nil, err } - return 0 -} -type ListPluginVersionDocsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Items []PluginDocsPage `json:"items"` - Metadata ListMetadata `json:"metadata"` + operationPath := fmt.Sprintf("/plugin-notification-requests/%s/%s/%s", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath } - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON500 *InternalError -} -// Status returns HTTPResponse.Status -func (r ListPluginVersionDocsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r ListPluginVersionDocsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err } - return 0 -} -type CreatePluginVersionDocsResponse struct { - Body []byte - HTTPResponse *http.Response + return req, nil } -// Status returns HTTPResponse.Status -func (r CreatePluginVersionDocsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} +// NewGetPluginNotificationRequestRequest generates requests for GetPluginNotificationRequest +func NewGetPluginNotificationRequestRequest(server string, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { + var err error -// StatusCode returns HTTPResponse.StatusCode -func (r CreatePluginVersionDocsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) + if err != nil { + return nil, err } - return 0 -} -type DeletePluginVersionTablesResponse struct { - Body []byte - HTTPResponse *http.Response -} + var pathParam1 string -// Status returns HTTPResponse.Status -func (r DeletePluginVersionTablesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r DeletePluginVersionTablesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} + var pathParam2 string -type ListPluginVersionTablesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Items []PluginTable `json:"items"` - Metadata ListMetadata `json:"metadata"` + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err } - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError -} -// Status returns HTTPResponse.Status -func (r ListPluginVersionTablesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + serverURL, err := url.Parse(server) + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r ListPluginVersionTablesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + operationPath := fmt.Sprintf("/plugin-notification-requests/%s/%s/%s", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return 0 -} - -type CreatePluginVersionTablesResponse struct { - Body []byte - HTTPResponse *http.Response -} -// Status returns HTTPResponse.Status -func (r CreatePluginVersionTablesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r CreatePluginVersionTablesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err } - return 0 -} -type GetPluginVersionTableResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *PluginTableDetails - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON500 *InternalError + return req, nil } -// Status returns HTTPResponse.Status -func (r GetPluginVersionTableResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} +// NewListPluginsRequest generates requests for ListPlugins +func NewListPluginsRequest(server string, params *ListPluginsParams) (*http.Request, error) { + var err error -// StatusCode returns HTTPResponse.StatusCode -func (r GetPluginVersionTableResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + serverURL, err := url.Parse(server) + if err != nil { + return nil, err } - return 0 -} -type ListTeamsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Items []Team `json:"items"` - Metadata ListMetadata `json:"metadata"` + operationPath := fmt.Sprintf("/plugins") + if operationPath[0] == '/' { + operationPath = "." + operationPath } - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} -// Status returns HTTPResponse.Status -func (r ListTeamsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r ListTeamsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} + if params != nil { + queryValues := queryURL.Query() -type CreateTeamResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *Team - JSON422 *UnprocessableEntity - JSON500 *InternalError -} + if params.SortBy != nil { -// Status returns HTTPResponse.Status -func (r CreateTeamResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort_by", runtime.ParamLocationQuery, *params.SortBy); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } -// StatusCode returns HTTPResponse.StatusCode -func (r CreateTeamResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} + } -type GetTeamByNameResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *Team - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} + if params.Page != nil { -// Status returns HTTPResponse.Status -func (r GetTeamByNameResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } -// StatusCode returns HTTPResponse.StatusCode -func (r GetTeamByNameResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} + } -type ListTeamApiKeysResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Items []ApiKey `json:"items"` - Metadata ListMetadata `json:"metadata"` + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.IncludeReleaseStages != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_release_stages", runtime.ParamLocationQuery, *params.IncludeReleaseStages); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ExcludeReleaseStages != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "exclude_release_stages", runtime.ParamLocationQuery, *params.ExcludeReleaseStages); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() } - JSON401 *RequiresAuthentication - JSON500 *InternalError -} -// Status returns HTTPResponse.Status -func (r ListTeamApiKeysResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err } - return http.StatusText(0) + + return req, nil } -// StatusCode returns HTTPResponse.StatusCode -func (r ListTeamApiKeysResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// NewCreatePluginRequest calls the generic CreatePlugin builder with application/json body +func NewCreatePluginRequest(server string, body CreatePluginJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err } - return 0 + bodyReader = bytes.NewReader(buf) + return NewCreatePluginRequestWithBody(server, "application/json", bodyReader) } -type CreateTeamApiKeyResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *ApiKey - JSON401 *RequiresAuthentication - JSON500 *InternalError -} +// NewCreatePluginRequestWithBody generates requests for CreatePlugin with any type of body +func NewCreatePluginRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error -// Status returns HTTPResponse.Status -func (r CreateTeamApiKeyResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + serverURL, err := url.Parse(server) + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r CreateTeamApiKeyResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + operationPath := fmt.Sprintf("/plugins") + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return 0 -} - -type DeleteTeamApiKeyResponse struct { - Body []byte - HTTPResponse *http.Response - JSON401 *RequiresAuthentication - JSON500 *InternalError -} -// Status returns HTTPResponse.Status -func (r DeleteTeamApiKeyResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteTeamApiKeyResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err } - return 0 -} -type ListTeamInvitationsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Items []Invitation `json:"items"` - Metadata ListMetadata `json:"metadata"` - } - JSON403 *Forbidden - JSON500 *InternalError -} + req.Header.Add("Content-Type", contentType) -// Status returns HTTPResponse.Status -func (r ListTeamInvitationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) + return req, nil } -// StatusCode returns HTTPResponse.StatusCode -func (r ListTeamInvitationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} +// NewDeletePluginByTeamAndPluginNameRequest generates requests for DeletePluginByTeamAndPluginName +func NewDeletePluginByTeamAndPluginNameRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { + var err error -type EmailTeamInvitationResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *Invitation - JSON403 *Forbidden - JSON422 *UnprocessableEntity - JSON500 *InternalError -} + var pathParam0 string -// Status returns HTTPResponse.Status -func (r EmailTeamInvitationResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r EmailTeamInvitationResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err } - return 0 -} -type AcceptTeamInvitationResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *Membership - JSON303 *Membership - JSON403 *Forbidden - JSON500 *InternalError -} + var pathParam2 string -// Status returns HTTPResponse.Status -func (r AcceptTeamInvitationResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r AcceptTeamInvitationResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + serverURL, err := url.Parse(server) + if err != nil { + return nil, err } - return 0 -} - -type CancelTeamInvitationResponse struct { - Body []byte - HTTPResponse *http.Response - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} -// Status returns HTTPResponse.Status -func (r CancelTeamInvitationResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + operationPath := fmt.Sprintf("/plugins/%s/%s/%s", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r CancelTeamInvitationResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err } - return 0 -} -type GetTeamMembershipsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Items []Membership `json:"items"` - Metadata ListMetadata `json:"metadata"` + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err } - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError + + return req, nil } -// Status returns HTTPResponse.Status -func (r GetTeamMembershipsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// NewGetPluginRequest generates requests for GetPlugin +func NewGetPluginRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r GetTeamMembershipsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err } - return 0 -} -type ListPluginsByTeamResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Items []Plugin `json:"items"` - Metadata ListMetadata `json:"metadata"` + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err } - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON500 *InternalError -} -// Status returns HTTPResponse.Status -func (r ListPluginsByTeamResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + serverURL, err := url.Parse(server) + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r ListPluginsByTeamResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + operationPath := fmt.Sprintf("/plugins/%s/%s/%s", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return 0 -} -type ListUsersByTeamResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Items []User `json:"items"` - Metadata ListMetadata `json:"metadata"` + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err } - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} -// Status returns HTTPResponse.Status -func (r ListUsersByTeamResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err } - return http.StatusText(0) + + return req, nil } -// StatusCode returns HTTPResponse.StatusCode -func (r ListUsersByTeamResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// NewUpdatePluginRequest calls the generic UpdatePlugin builder with application/json body +func NewUpdatePluginRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body UpdatePluginJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err } - return 0 + bodyReader = bytes.NewReader(buf) + return NewUpdatePluginRequestWithBody(server, teamName, pluginKind, pluginName, "application/json", bodyReader) } -type UploadImageResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ImageURL - JSON500 *InternalError -} +// NewUpdatePluginRequestWithBody generates requests for UpdatePlugin with any type of body +func NewUpdatePluginRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader) (*http.Request, error) { + var err error -// Status returns HTTPResponse.Status -func (r UploadImageResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r UploadImageResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err } - return 0 -} -type GetCurrentUserResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *User - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON500 *InternalError -} + var pathParam2 string -// Status returns HTTPResponse.Status -func (r GetCurrentUserResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err } - return http.StatusText(0) -} -// StatusCode returns HTTPResponse.StatusCode -func (r GetCurrentUserResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode + serverURL, err := url.Parse(server) + if err != nil { + return nil, err } - return 0 -} -type ListCurrentUserInvitationsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Items []Invitation `json:"items"` - Metadata ListMetadata `json:"metadata"` + operationPath := fmt.Sprintf("/plugins/%s/%s/%s", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath } - JSON500 *InternalError -} -// Status returns HTTPResponse.Status -func (r ListCurrentUserInvitationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err } - return http.StatusText(0) + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil } -// StatusCode returns HTTPResponse.StatusCode -func (r ListCurrentUserInvitationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// NewDeletePluginUpcomingPriceChangesRequest generates requests for DeletePluginUpcomingPriceChanges +func NewDeletePluginUpcomingPriceChangesRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err } - return 0 + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/upcoming-price-changes", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil } -type GetCurrentUserMembershipsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Items []Membership `json:"items"` - Metadata ListMetadata `json:"metadata"` +// NewListPluginUpcomingPriceChangesRequest generates requests for ListPluginUpcomingPriceChanges +func NewListPluginUpcomingPriceChangesRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/upcoming-price-changes", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err } - JSON401 *RequiresAuthentication - JSON403 *Forbidden - JSON500 *InternalError + + return req, nil } -// Status returns HTTPResponse.Status -func (r GetCurrentUserMembershipsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// NewCreatePluginUpcomingPriceChangeRequest calls the generic CreatePluginUpcomingPriceChange builder with application/json body +func NewCreatePluginUpcomingPriceChangeRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body CreatePluginUpcomingPriceChangeJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err } - return http.StatusText(0) + bodyReader = bytes.NewReader(buf) + return NewCreatePluginUpcomingPriceChangeRequestWithBody(server, teamName, pluginKind, pluginName, "application/json", bodyReader) } -// StatusCode returns HTTPResponse.StatusCode -func (r GetCurrentUserMembershipsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// NewCreatePluginUpcomingPriceChangeRequestWithBody generates requests for CreatePluginUpcomingPriceChange with any type of body +func NewCreatePluginUpcomingPriceChangeRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err } - return 0 + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/upcoming-price-changes", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil } -// HealthCheckWithResponse request returning *HealthCheckResponse -func (c *ClientWithResponses) HealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthCheckResponse, error) { - rsp, err := c.HealthCheck(ctx, reqEditors...) - if err != nil { - return nil, err +// NewListPluginVersionsRequest generates requests for ListPluginVersions +func NewListPluginVersionsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, params *ListPluginVersionsParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions", pathParam0, pathParam1, pathParam2) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.SortBy != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort_by", runtime.ParamLocationQuery, *params.SortBy); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.IncludeDrafts != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_drafts", runtime.ParamLocationQuery, *params.IncludeDrafts); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.IncludeFips != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_fips", runtime.ParamLocationQuery, *params.IncludeFips); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.IncludePrereleases != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_prereleases", runtime.ParamLocationQuery, *params.IncludePrereleases); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.VersionFilter != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "version_filter", runtime.ParamLocationQuery, *params.VersionFilter); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetPluginVersionRequest generates requests for GetPluginVersion +func NewGetPluginVersionRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2, pathParam3) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUpdatePluginVersionRequest calls the generic UpdatePluginVersion builder with application/json body +func NewUpdatePluginVersionRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdatePluginVersionRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) +} + +// NewUpdatePluginVersionRequestWithBody generates requests for UpdatePluginVersion with any type of body +func NewUpdatePluginVersionRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2, pathParam3) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewCreatePluginVersionRequest calls the generic CreatePluginVersion builder with application/json body +func NewCreatePluginVersionRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreatePluginVersionRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) +} + +// NewCreatePluginVersionRequestWithBody generates requests for CreatePluginVersion with any type of body +func NewCreatePluginVersionRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s", pathParam0, pathParam1, pathParam2, pathParam3) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDownloadPluginAssetRequest generates requests for DownloadPluginAsset +func NewDownloadPluginAssetRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + + var pathParam4 string + + pathParam4, err = runtime.StyleParamWithLocation("simple", false, "target_name", runtime.ParamLocationPath, targetName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/assets/%s", pathParam0, pathParam1, pathParam2, pathParam3, pathParam4) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Accept != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Accept", runtime.ParamLocationHeader, *params.Accept) + if err != nil { + return nil, err + } + + req.Header.Set("Accept", headerParam0) + } + + } + + return req, nil +} + +// NewUploadPluginAssetRequest generates requests for UploadPluginAsset +func NewUploadPluginAssetRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + + var pathParam4 string + + pathParam4, err = runtime.StyleParamWithLocation("simple", false, "target_name", runtime.ParamLocationPath, targetName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/assets/%s", pathParam0, pathParam1, pathParam2, pathParam3, pathParam4) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewDeletePluginVersionDocsRequest calls the generic DeletePluginVersionDocs builder with application/json body +func NewDeletePluginVersionDocsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewDeletePluginVersionDocsRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) +} + +// NewDeletePluginVersionDocsRequestWithBody generates requests for DeletePluginVersionDocs with any type of body +func NewDeletePluginVersionDocsRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/docs", pathParam0, pathParam1, pathParam2, pathParam3) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewListPluginVersionDocsRequest generates requests for ListPluginVersionDocs +func NewListPluginVersionDocsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/docs", pathParam0, pathParam1, pathParam2, pathParam3) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewReplacePluginVersionDocsRequest calls the generic ReplacePluginVersionDocs builder with application/json body +func NewReplacePluginVersionDocsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body ReplacePluginVersionDocsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewReplacePluginVersionDocsRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) +} + +// NewReplacePluginVersionDocsRequestWithBody generates requests for ReplacePluginVersionDocs with any type of body +func NewReplacePluginVersionDocsRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/docs", pathParam0, pathParam1, pathParam2, pathParam3) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewCreatePluginVersionDocsRequest calls the generic CreatePluginVersionDocs builder with application/json body +func NewCreatePluginVersionDocsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreatePluginVersionDocsRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) +} + +// NewCreatePluginVersionDocsRequestWithBody generates requests for CreatePluginVersionDocs with any type of body +func NewCreatePluginVersionDocsRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/docs", pathParam0, pathParam1, pathParam2, pathParam3) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeletePluginVersionTablesRequest calls the generic DeletePluginVersionTables builder with application/json body +func NewDeletePluginVersionTablesRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewDeletePluginVersionTablesRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) +} + +// NewDeletePluginVersionTablesRequestWithBody generates requests for DeletePluginVersionTables with any type of body +func NewDeletePluginVersionTablesRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/tables", pathParam0, pathParam1, pathParam2, pathParam3) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewListPluginVersionTablesRequest generates requests for ListPluginVersionTables +func NewListPluginVersionTablesRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/tables", pathParam0, pathParam1, pathParam2, pathParam3) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreatePluginVersionTablesRequest calls the generic CreatePluginVersionTables builder with application/json body +func NewCreatePluginVersionTablesRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreatePluginVersionTablesRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) +} + +// NewCreatePluginVersionTablesRequestWithBody generates requests for CreatePluginVersionTables with any type of body +func NewCreatePluginVersionTablesRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/tables", pathParam0, pathParam1, pathParam2, pathParam3) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetPluginVersionTableRequest generates requests for GetPluginVersionTable +func NewGetPluginVersionTableRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + + var pathParam4 string + + pathParam4, err = runtime.StyleParamWithLocation("simple", false, "table_name", runtime.ParamLocationPath, tableName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/tables/%s", pathParam0, pathParam1, pathParam2, pathParam3, pathParam4) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewRemovePluginUIAssetsRequest generates requests for RemovePluginUIAssets +func NewRemovePluginUIAssetsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/uiassets", pathParam0, pathParam1, pathParam2, pathParam3) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUploadPluginUIAssetsRequest calls the generic UploadPluginUIAssets builder with application/json body +func NewUploadPluginUIAssetsRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UploadPluginUIAssetsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUploadPluginUIAssetsRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) +} + +// NewUploadPluginUIAssetsRequestWithBody generates requests for UploadPluginUIAssets with any type of body +func NewUploadPluginUIAssetsRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/uiassets", pathParam0, pathParam1, pathParam2, pathParam3) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewFinalizePluginUIAssetUploadRequest calls the generic FinalizePluginUIAssetUpload builder with application/json body +func NewFinalizePluginUIAssetUploadRequest(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body FinalizePluginUIAssetUploadJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewFinalizePluginUIAssetUploadRequestWithBody(server, teamName, pluginKind, pluginName, versionName, "application/json", bodyReader) +} + +// NewFinalizePluginUIAssetUploadRequestWithBody generates requests for FinalizePluginUIAssetUpload with any type of body +func NewFinalizePluginUIAssetUploadRequestWithBody(server string, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/plugins/%s/%s/%s/versions/%s/uiassets", pathParam0, pathParam1, pathParam2, pathParam3) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewAuthRegistryRequestRequest generates requests for AuthRegistryRequest +func NewAuthRegistryRequestRequest(server string, params *AuthRegistryRequestParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/registry/auth") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Account != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "account", runtime.ParamLocationQuery, *params.Account); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Service != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "service", runtime.ParamLocationQuery, *params.Service); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Scope != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "scope", runtime.ParamLocationQuery, *params.Scope); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.XMetaPluginVersion != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "X-Meta-Plugin-Version", runtime.ParamLocationHeader, *params.XMetaPluginVersion) + if err != nil { + return nil, err + } + + req.Header.Set("X-Meta-Plugin-Version", headerParam0) + } + + if params.XMetaUserTeamName != nil { + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "X-Meta-User-Team-Name", runtime.ParamLocationHeader, *params.XMetaUserTeamName) + if err != nil { + return nil, err + } + + req.Header.Set("X-Meta-User-Team-Name", headerParam1) + } + + } + + return req, nil +} + +// NewListTeamsRequest generates requests for ListTeams +func NewListTeamsRequest(server string, params *ListTeamsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreateTeamRequest calls the generic CreateTeam builder with application/json body +func NewCreateTeamRequest(server string, body CreateTeamJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateTeamRequestWithBody(server, "application/json", bodyReader) +} + +// NewCreateTeamRequestWithBody generates requests for CreateTeam with any type of body +func NewCreateTeamRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeleteTeamRequest generates requests for DeleteTeam +func NewDeleteTeamRequest(server string, teamName TeamName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetTeamByNameRequest generates requests for GetTeamByName +func NewGetTeamByNameRequest(server string, teamName TeamName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUpdateTeamRequest calls the generic UpdateTeam builder with application/json body +func NewUpdateTeamRequest(server string, teamName TeamName, body UpdateTeamJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateTeamRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewUpdateTeamRequestWithBody generates requests for UpdateTeam with any type of body +func NewUpdateTeamRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewListAddonOrdersByTeamRequest generates requests for ListAddonOrdersByTeam +func NewListAddonOrdersByTeamRequest(server string, teamName TeamName, params *ListAddonOrdersByTeamParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/addon-orders", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreateAddonOrderForTeamRequest calls the generic CreateAddonOrderForTeam builder with application/json body +func NewCreateAddonOrderForTeamRequest(server string, teamName TeamName, body CreateAddonOrderForTeamJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateAddonOrderForTeamRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewCreateAddonOrderForTeamRequestWithBody generates requests for CreateAddonOrderForTeam with any type of body +func NewCreateAddonOrderForTeamRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/addon-orders", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetAddonOrderByTeamRequest generates requests for GetAddonOrderByTeam +func NewGetAddonOrderByTeamRequest(server string, teamName TeamName, addonOrderID AddonOrderID) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_order_id", runtime.ParamLocationPath, addonOrderID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/addon-orders/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewDeleteAddonsByTeamRequest generates requests for DeleteAddonsByTeam +func NewDeleteAddonsByTeamRequest(server string, teamName TeamName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/addons", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewListAddonsByTeamRequest generates requests for ListAddonsByTeam +func NewListAddonsByTeamRequest(server string, teamName TeamName, params *ListAddonsByTeamParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/addons", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.IncludePrivate != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_private", runtime.ParamLocationQuery, *params.IncludePrivate); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewDownloadAddonAssetByTeamRequest generates requests for DownloadAddonAssetByTeam +func NewDownloadAddonAssetByTeamRequest(server string, teamName TeamName, addonTeam AddonTeam, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetByTeamParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_team", runtime.ParamLocationPath, addonTeam) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "addon_type", runtime.ParamLocationPath, addonType) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "addon_name", runtime.ParamLocationPath, addonName) + if err != nil { + return nil, err + } + + var pathParam4 string + + pathParam4, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/addons/%s/%s/%s/versions/%s/assets", pathParam0, pathParam1, pathParam2, pathParam3, pathParam4) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Accept != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Accept", runtime.ParamLocationHeader, *params.Accept) + if err != nil { + return nil, err + } + + req.Header.Set("Accept", headerParam0) + } + + } + + return req, nil +} + +// NewAIOnboardingChatRequest calls the generic AIOnboardingChat builder with application/json body +func NewAIOnboardingChatRequest(server string, teamName string, body AIOnboardingChatJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewAIOnboardingChatRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewAIOnboardingChatRequestWithBody generates requests for AIOnboardingChat with any type of body +func NewAIOnboardingChatRequestWithBody(server string, teamName string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/ai-onboarding/chat", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewAIOnboardingEndConversationRequest generates requests for AIOnboardingEndConversation +func NewAIOnboardingEndConversationRequest(server string, teamName string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/ai-onboarding/conversations", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewAIOnboardingNewConversationRequest calls the generic AIOnboardingNewConversation builder with application/json body +func NewAIOnboardingNewConversationRequest(server string, teamName string, body AIOnboardingNewConversationJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewAIOnboardingNewConversationRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewAIOnboardingNewConversationRequestWithBody generates requests for AIOnboardingNewConversation with any type of body +func NewAIOnboardingNewConversationRequestWithBody(server string, teamName string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/ai-onboarding/conversations", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewListTeamAPIKeysRequest generates requests for ListTeamAPIKeys +func NewListTeamAPIKeysRequest(server string, teamName TeamName, params *ListTeamAPIKeysParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/apikeys", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreateTeamAPIKeyRequest calls the generic CreateTeamAPIKey builder with application/json body +func NewCreateTeamAPIKeyRequest(server string, teamName TeamName, body CreateTeamAPIKeyJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateTeamAPIKeyRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewCreateTeamAPIKeyRequestWithBody generates requests for CreateTeamAPIKey with any type of body +func NewCreateTeamAPIKeyRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/apikeys", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeleteTeamAPIKeyRequest generates requests for DeleteTeamAPIKey +func NewDeleteTeamAPIKeyRequest(server string, teamName TeamName, apiKeyID APIKeyID) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "apikey_id", runtime.ParamLocationPath, apiKeyID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/apikeys/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreateTeamImagesRequest calls the generic CreateTeamImages builder with application/json body +func NewCreateTeamImagesRequest(server string, teamName TeamName, body CreateTeamImagesJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateTeamImagesRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewCreateTeamImagesRequestWithBody generates requests for CreateTeamImages with any type of body +func NewCreateTeamImagesRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/images", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeleteTeamInvitationRequest calls the generic DeleteTeamInvitation builder with application/json body +func NewDeleteTeamInvitationRequest(server string, teamName TeamName, body DeleteTeamInvitationJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewDeleteTeamInvitationRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewDeleteTeamInvitationRequestWithBody generates requests for DeleteTeamInvitation with any type of body +func NewDeleteTeamInvitationRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/invitations", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewListTeamInvitationsRequest generates requests for ListTeamInvitations +func NewListTeamInvitationsRequest(server string, teamName TeamName, params *ListTeamInvitationsParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/invitations", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewEmailTeamInvitationRequest calls the generic EmailTeamInvitation builder with application/json body +func NewEmailTeamInvitationRequest(server string, teamName TeamName, body EmailTeamInvitationJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewEmailTeamInvitationRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewEmailTeamInvitationRequestWithBody generates requests for EmailTeamInvitation with any type of body +func NewEmailTeamInvitationRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/invitations", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewAcceptTeamInvitationRequest calls the generic AcceptTeamInvitation builder with application/json body +func NewAcceptTeamInvitationRequest(server string, teamName TeamName, body AcceptTeamInvitationJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewAcceptTeamInvitationRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewAcceptTeamInvitationRequestWithBody generates requests for AcceptTeamInvitation with any type of body +func NewAcceptTeamInvitationRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/invitations/accept", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewCancelTeamInvitationRequest generates requests for CancelTeamInvitation +func NewCancelTeamInvitationRequest(server string, teamName TeamName, email EmailBasic) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "email", runtime.ParamLocationPath, email) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/invitations/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewListInvoicesByTeamRequest generates requests for ListInvoicesByTeam +func NewListInvoicesByTeamRequest(server string, teamName TeamName, params *ListInvoicesByTeamParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/invoices", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetManagedDatabasesRequest generates requests for GetManagedDatabases +func NewGetManagedDatabasesRequest(server string, teamName TeamName, params *GetManagedDatabasesParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/managed-databases", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreateManagedDatabaseRequest calls the generic CreateManagedDatabase builder with application/json body +func NewCreateManagedDatabaseRequest(server string, teamName TeamName, body CreateManagedDatabaseJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateManagedDatabaseRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewCreateManagedDatabaseRequestWithBody generates requests for CreateManagedDatabase with any type of body +func NewCreateManagedDatabaseRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/managed-databases", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeleteManagedDatabaseRequest generates requests for DeleteManagedDatabase +func NewDeleteManagedDatabaseRequest(server string, teamName TeamName, managedDatabaseID ManagedDatabaseID) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "managed_database_id", runtime.ParamLocationPath, managedDatabaseID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/managed-databases/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetManagedDatabaseRequest generates requests for GetManagedDatabase +func NewGetManagedDatabaseRequest(server string, teamName TeamName, managedDatabaseID ManagedDatabaseID) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "managed_database_id", runtime.ParamLocationPath, managedDatabaseID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/managed-databases/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewRemoveTeamMembershipRequest calls the generic RemoveTeamMembership builder with application/json body +func NewRemoveTeamMembershipRequest(server string, teamName TeamName, body RemoveTeamMembershipJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewRemoveTeamMembershipRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewRemoveTeamMembershipRequestWithBody generates requests for RemoveTeamMembership with any type of body +func NewRemoveTeamMembershipRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/memberships", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetTeamMembershipsRequest generates requests for GetTeamMemberships +func NewGetTeamMembershipsRequest(server string, teamName TeamName, params *GetTeamMembershipsParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/memberships", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewDeleteTeamMembershipRequest generates requests for DeleteTeamMembership +func NewDeleteTeamMembershipRequest(server string, teamName TeamName, email EmailBasic) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "email", runtime.ParamLocationPath, email) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/memberships/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewDeletePluginsByTeamRequest generates requests for DeletePluginsByTeam +func NewDeletePluginsByTeamRequest(server string, teamName TeamName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/plugins", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewListPluginsByTeamRequest generates requests for ListPluginsByTeam +func NewListPluginsByTeamRequest(server string, teamName TeamName, params *ListPluginsByTeamParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/plugins", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.IncludePrivate != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_private", runtime.ParamLocationQuery, *params.IncludePrivate); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewDownloadPluginAssetByTeamRequest generates requests for DownloadPluginAssetByTeam +func NewDownloadPluginAssetByTeamRequest(server string, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetByTeamParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + var pathParam4 string + + pathParam4, err = runtime.StyleParamWithLocation("simple", false, "version_name", runtime.ParamLocationPath, versionName) + if err != nil { + return nil, err + } + + var pathParam5 string + + pathParam5, err = runtime.StyleParamWithLocation("simple", false, "target_name", runtime.ParamLocationPath, targetName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/plugins/%s/%s/%s/versions/%s/assets/%s", pathParam0, pathParam1, pathParam2, pathParam3, pathParam4, pathParam5) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + if params != nil { + + if params.Accept != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Accept", runtime.ParamLocationHeader, *params.Accept) + if err != nil { + return nil, err + } + + req.Header.Set("Accept", headerParam0) + } + + } + + return req, nil +} + +// NewGetSettingsRequest generates requests for GetSettings +func NewGetSettingsRequest(server string, teamName TeamName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/settings", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUpdateSettingsRequest calls the generic UpdateSettings builder with application/json body +func NewUpdateSettingsRequest(server string, teamName TeamName, body UpdateSettingsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateSettingsRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewUpdateSettingsRequestWithBody generates requests for UpdateSettings with any type of body +func NewUpdateSettingsRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/settings", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewListSubscriptionOrdersByTeamRequest generates requests for ListSubscriptionOrdersByTeam +func NewListSubscriptionOrdersByTeamRequest(server string, teamName TeamName, params *ListSubscriptionOrdersByTeamParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/subscription-orders", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreateSubscriptionOrderForTeamRequest calls the generic CreateSubscriptionOrderForTeam builder with application/json body +func NewCreateSubscriptionOrderForTeamRequest(server string, teamName TeamName, body CreateSubscriptionOrderForTeamJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateSubscriptionOrderForTeamRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewCreateSubscriptionOrderForTeamRequestWithBody generates requests for CreateSubscriptionOrderForTeam with any type of body +func NewCreateSubscriptionOrderForTeamRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/subscription-orders", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetSubscriptionOrderByTeamRequest generates requests for GetSubscriptionOrderByTeam +func NewGetSubscriptionOrderByTeamRequest(server string, teamName TeamName, teamSubscriptionOrderID TeamSubscriptionOrderID) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "subscription_order_id", runtime.ParamLocationPath, teamSubscriptionOrderID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/subscription-orders/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewListTeamPluginUsageRequest generates requests for ListTeamPluginUsage +func NewListTeamPluginUsageRequest(server string, teamName TeamName, params *ListTeamPluginUsageParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/usage", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewIncreaseTeamPluginUsageRequest calls the generic IncreaseTeamPluginUsage builder with application/json body +func NewIncreaseTeamPluginUsageRequest(server string, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewIncreaseTeamPluginUsageRequestWithBody(server, teamName, "application/json", bodyReader) +} + +// NewIncreaseTeamPluginUsageRequestWithBody generates requests for IncreaseTeamPluginUsage with any type of body +func NewIncreaseTeamPluginUsageRequestWithBody(server string, teamName TeamName, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/usage", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetTeamUsageSummaryRequest generates requests for GetTeamUsageSummary +func NewGetTeamUsageSummaryRequest(server string, teamName TeamName, params *GetTeamUsageSummaryParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/usage-summary", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Metrics != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "metrics", runtime.ParamLocationQuery, *params.Metrics); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Start != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "start", runtime.ParamLocationQuery, *params.Start); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.End != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "end", runtime.ParamLocationQuery, *params.End); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.AggregationPeriod != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "aggregation_period", runtime.ParamLocationQuery, *params.AggregationPeriod); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetGroupedTeamUsageSummaryRequest generates requests for GetGroupedTeamUsageSummary +func NewGetGroupedTeamUsageSummaryRequest(server string, teamName TeamName, groupBy GetGroupedTeamUsageSummaryParamsGroupBy, params *GetGroupedTeamUsageSummaryParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "group_by", runtime.ParamLocationPath, groupBy) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/usage-summary/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Metrics != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "metrics", runtime.ParamLocationQuery, *params.Metrics); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Start != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "start", runtime.ParamLocationQuery, *params.Start); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.End != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "end", runtime.ParamLocationQuery, *params.End); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.AggregationPeriod != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "aggregation_period", runtime.ParamLocationQuery, *params.AggregationPeriod); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetTeamPluginUsageRequest generates requests for GetTeamPluginUsage +func NewGetTeamPluginUsageRequest(server string, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "plugin_team", runtime.ParamLocationPath, pluginTeam) + if err != nil { + return nil, err + } + + var pathParam2 string + + pathParam2, err = runtime.StyleParamWithLocation("simple", false, "plugin_kind", runtime.ParamLocationPath, pluginKind) + if err != nil { + return nil, err + } + + var pathParam3 string + + pathParam3, err = runtime.StyleParamWithLocation("simple", false, "plugin_name", runtime.ParamLocationPath, pluginName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/usage/%s/%s/%s", pathParam0, pathParam1, pathParam2, pathParam3) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewListUsersByTeamRequest generates requests for ListUsersByTeam +func NewListUsersByTeamRequest(server string, teamName TeamName, params *ListUsersByTeamParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/teams/%s/users", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUploadImageRequest calls the generic UploadImage builder with application/json body +func NewUploadImageRequest(server string, body UploadImageJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUploadImageRequestWithBody(server, "application/json", bodyReader) +} + +// NewUploadImageRequestWithBody generates requests for UploadImage with any type of body +func NewUploadImageRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/upload/image") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetCurrentUserRequest generates requests for GetCurrentUser +func NewGetCurrentUserRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUpdateCurrentUserRequest calls the generic UpdateCurrentUser builder with application/json body +func NewUpdateCurrentUserRequest(server string, body UpdateCurrentUserJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateCurrentUserRequestWithBody(server, "application/json", bodyReader) +} + +// NewUpdateCurrentUserRequestWithBody generates requests for UpdateCurrentUser with any type of body +func NewUpdateCurrentUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewSendAnonymousEventRequest calls the generic SendAnonymousEvent builder with application/json body +func NewSendAnonymousEventRequest(server string, body SendAnonymousEventJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewSendAnonymousEventRequestWithBody(server, "application/json", bodyReader) +} + +// NewSendAnonymousEventRequestWithBody generates requests for SendAnonymousEvent with any type of body +func NewSendAnonymousEventRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user/anon-event") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewCheckUserAuthStatusRequest generates requests for CheckUserAuthStatus +func NewCheckUserAuthStatusRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user/authenticated-status") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUpdateCustomerRequest calls the generic UpdateCustomer builder with application/json body +func NewUpdateCustomerRequest(server string, body UpdateCustomerJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateCustomerRequestWithBody(server, "application/json", bodyReader) +} + +// NewUpdateCustomerRequestWithBody generates requests for UpdateCustomer with any type of body +func NewUpdateCustomerRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user/customer") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewSendUserEventRequest calls the generic SendUserEvent builder with application/json body +func NewSendUserEventRequest(server string, body SendUserEventJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewSendUserEventRequestWithBody(server, "application/json", bodyReader) +} + +// NewSendUserEventRequestWithBody generates requests for SendUserEvent with any type of body +func NewSendUserEventRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user/event") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewListCurrentUserInvitationsRequest generates requests for ListCurrentUserInvitations +func NewListCurrentUserInvitationsRequest(server string, params *ListCurrentUserInvitationsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user/invitations") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewLogoutUserRequest generates requests for LogoutUser +func NewLogoutUserRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user/login") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewLoginUserRequest calls the generic LoginUser builder with application/json body +func NewLoginUserRequest(server string, body LoginUserJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewLoginUserRequestWithBody(server, "application/json", bodyReader) +} + +// NewLoginUserRequestWithBody generates requests for LoginUser with any type of body +func NewLoginUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user/login") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetCurrentUserMembershipsRequest generates requests for GetCurrentUserMemberships +func NewGetCurrentUserMembershipsRequest(server string, params *GetCurrentUserMembershipsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user/memberships") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewRegisterUserRequest calls the generic RegisterUser builder with application/json body +func NewRegisterUserRequest(server string, body RegisterUserJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewRegisterUserRequestWithBody(server, "application/json", bodyReader) +} + +// NewRegisterUserRequestWithBody generates requests for RegisterUser with any type of body +func NewRegisterUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user/register") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewResetUserPasswordRequest calls the generic ResetUserPassword builder with application/json body +func NewResetUserPasswordRequest(server string, body ResetUserPasswordJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewResetUserPasswordRequestWithBody(server, "application/json", bodyReader) +} + +// NewResetUserPasswordRequestWithBody generates requests for ResetUserPassword with any type of body +func NewResetUserPasswordRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user/reset-password") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeterminePlatformTenantByEmailRequest generates requests for DeterminePlatformTenantByEmail +func NewDeterminePlatformTenantByEmailRequest(server string, params *DeterminePlatformTenantByEmailParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user/tenant") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "email", runtime.ParamLocationQuery, params.Email); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreateUserTokenRequest generates requests for CreateUserToken +func NewCreateUserTokenRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user/token") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUserTOTPDeleteRequest generates requests for UserTOTPDelete +func NewUserTOTPDeleteRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user/totp") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUserTOTPSetupRequest generates requests for UserTOTPSetup +func NewUserTOTPSetupRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user/totp") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUserTOTPVerifyRequest calls the generic UserTOTPVerify builder with application/json body +func NewUserTOTPVerifyRequest(server string, params *UserTOTPVerifyParams, body UserTOTPVerifyJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUserTOTPVerifyRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewUserTOTPVerifyRequestWithBody generates requests for UserTOTPVerify with any type of body +func NewUserTOTPVerifyRequestWithBody(server string, params *UserTOTPVerifyParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user/totp/verify") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + if params.Session != nil { + var cookieParam0 string + + cookieParam0, err = runtime.StyleParamWithLocation("simple", true, "__session", runtime.ParamLocationCookie, *params.Session) + if err != nil { + return nil, err + } + + cookie0 := &http.Cookie{ + Name: "__session", + Value: cookieParam0, + } + req.AddCookie(cookie0) + } + } + return req, nil +} + +// NewVerifyUserEmailRequest calls the generic VerifyUserEmail builder with application/json body +func NewVerifyUserEmailRequest(server string, body VerifyUserEmailJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewVerifyUserEmailRequestWithBody(server, "application/json", bodyReader) +} + +// NewVerifyUserEmailRequestWithBody generates requests for VerifyUserEmail with any type of body +func NewVerifyUserEmailRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/user/verify-email") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeleteUserRequest generates requests for DeleteUser +func NewDeleteUserRequest(server string, userID UserID) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "user_id", runtime.ParamLocationPath, userID) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/users/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { + for _, r := range c.RequestEditors { + if err := r(ctx, req); err != nil { + return err + } + } + for _, r := range additionalEditors { + if err := r(ctx, req); err != nil { + return err + } + } + return nil +} + +// ClientWithResponses builds on ClientInterface to offer response payloads +type ClientWithResponses struct { + ClientInterface +} + +// NewClientWithResponses creates a new ClientWithResponses, which wraps +// Client with return type handling +func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { + client, err := NewClient(server, opts...) + if err != nil { + return nil, err + } + return &ClientWithResponses{client}, nil +} + +// WithBaseURL overrides the baseURL. +func WithBaseURL(baseURL string) ClientOption { + return func(c *Client) error { + newBaseURL, err := url.Parse(baseURL) + if err != nil { + return err + } + c.Server = newBaseURL.String() + return nil + } +} + +// ClientWithResponsesInterface is the interface specification for the client with responses above. +type ClientWithResponsesInterface interface { + // HealthCheckWithResponse request + HealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthCheckResponse, error) + + // ListAddonsWithResponse request + ListAddonsWithResponse(ctx context.Context, params *ListAddonsParams, reqEditors ...RequestEditorFn) (*ListAddonsResponse, error) + + // CreateAddonWithBodyWithResponse request with any body + CreateAddonWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonResponse, error) + + CreateAddonWithResponse(ctx context.Context, body CreateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonResponse, error) + + // DeleteAddonByTeamAndNameWithResponse request + DeleteAddonByTeamAndNameWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*DeleteAddonByTeamAndNameResponse, error) + + // GetAddonWithResponse request + GetAddonWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*GetAddonResponse, error) + + // UpdateAddonWithBodyWithResponse request with any body + UpdateAddonWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) + + UpdateAddonWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, body UpdateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) + + // ListAddonVersionsWithResponse request + ListAddonVersionsWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, params *ListAddonVersionsParams, reqEditors ...RequestEditorFn) (*ListAddonVersionsResponse, error) + + // GetAddonVersionWithResponse request + GetAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetAddonVersionResponse, error) + + // UpdateAddonVersionWithBodyWithResponse request with any body + UpdateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) + + UpdateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body UpdateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) + + // CreateAddonVersionWithBodyWithResponse request with any body + CreateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) + + CreateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body CreateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) + + // DownloadAddonAssetWithResponse request + DownloadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetParams, reqEditors ...RequestEditorFn) (*DownloadAddonAssetResponse, error) + + // UploadAddonAssetWithResponse request + UploadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*UploadAddonAssetResponse, error) + + // CQHealthCheckWithResponse request + CQHealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CQHealthCheckResponse, error) + + // GetOpenAPIJSONWithResponse request + GetOpenAPIJSONWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOpenAPIJSONResponse, error) + + // ActivatePlatformWithBodyWithResponse request with any body + ActivatePlatformWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ActivatePlatformResponse, error) + + ActivatePlatformWithResponse(ctx context.Context, body ActivatePlatformJSONRequestBody, reqEditors ...RequestEditorFn) (*ActivatePlatformResponse, error) + + // RenewPlatformActivationWithBodyWithResponse request with any body + RenewPlatformActivationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RenewPlatformActivationResponse, error) + + RenewPlatformActivationWithResponse(ctx context.Context, body RenewPlatformActivationJSONRequestBody, reqEditors ...RequestEditorFn) (*RenewPlatformActivationResponse, error) + + // ReportPlatformDataWithBodyWithResponse request with any body + ReportPlatformDataWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReportPlatformDataResponse, error) + + ReportPlatformDataWithResponse(ctx context.Context, body ReportPlatformDataJSONRequestBody, reqEditors ...RequestEditorFn) (*ReportPlatformDataResponse, error) + + // ReportTenantPlatformDataWithBodyWithResponse request with any body + ReportTenantPlatformDataWithBodyWithResponse(ctx context.Context, tenantID openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReportTenantPlatformDataResponse, error) + + ReportTenantPlatformDataWithResponse(ctx context.Context, tenantID openapi_types.UUID, body ReportTenantPlatformDataJSONRequestBody, reqEditors ...RequestEditorFn) (*ReportTenantPlatformDataResponse, error) + + // ListPluginNotificationRequestsWithResponse request + ListPluginNotificationRequestsWithResponse(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*ListPluginNotificationRequestsResponse, error) + + // CreatePluginNotificationRequestWithBodyWithResponse request with any body + CreatePluginNotificationRequestWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginNotificationRequestResponse, error) + + CreatePluginNotificationRequestWithResponse(ctx context.Context, body CreatePluginNotificationRequestJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginNotificationRequestResponse, error) + + // DeletePluginNotificationRequestWithResponse request + DeletePluginNotificationRequestWithResponse(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginNotificationRequestResponse, error) + + // GetPluginNotificationRequestWithResponse request + GetPluginNotificationRequestWithResponse(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginNotificationRequestResponse, error) + + // ListPluginsWithResponse request + ListPluginsWithResponse(ctx context.Context, params *ListPluginsParams, reqEditors ...RequestEditorFn) (*ListPluginsResponse, error) + + // CreatePluginWithBodyWithResponse request with any body + CreatePluginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) + + CreatePluginWithResponse(ctx context.Context, body CreatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) + + // DeletePluginByTeamAndPluginNameWithResponse request + DeletePluginByTeamAndPluginNameWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginByTeamAndPluginNameResponse, error) + + // GetPluginWithResponse request + GetPluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginResponse, error) + + // UpdatePluginWithBodyWithResponse request with any body + UpdatePluginWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) + + UpdatePluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body UpdatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) + + // DeletePluginUpcomingPriceChangesWithResponse request + DeletePluginUpcomingPriceChangesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginUpcomingPriceChangesResponse, error) + + // ListPluginUpcomingPriceChangesWithResponse request + ListPluginUpcomingPriceChangesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*ListPluginUpcomingPriceChangesResponse, error) + + // CreatePluginUpcomingPriceChangeWithBodyWithResponse request with any body + CreatePluginUpcomingPriceChangeWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginUpcomingPriceChangeResponse, error) + + CreatePluginUpcomingPriceChangeWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body CreatePluginUpcomingPriceChangeJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginUpcomingPriceChangeResponse, error) + + // ListPluginVersionsWithResponse request + ListPluginVersionsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, params *ListPluginVersionsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionsResponse, error) + + // GetPluginVersionWithResponse request + GetPluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetPluginVersionResponse, error) + + // UpdatePluginVersionWithBodyWithResponse request with any body + UpdatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) + + UpdatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) + + // CreatePluginVersionWithBodyWithResponse request with any body + CreatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) + + CreatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) + + // DownloadPluginAssetWithResponse request + DownloadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetParams, reqEditors ...RequestEditorFn) (*DownloadPluginAssetResponse, error) + + // UploadPluginAssetWithResponse request + UploadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*UploadPluginAssetResponse, error) + + // DeletePluginVersionDocsWithBodyWithResponse request with any body + DeletePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) + + DeletePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) + + // ListPluginVersionDocsWithResponse request + ListPluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionDocsResponse, error) + + // ReplacePluginVersionDocsWithBodyWithResponse request with any body + ReplacePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReplacePluginVersionDocsResponse, error) + + ReplacePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body ReplacePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*ReplacePluginVersionDocsResponse, error) + + // CreatePluginVersionDocsWithBodyWithResponse request with any body + CreatePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) + + CreatePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) + + // DeletePluginVersionTablesWithBodyWithResponse request with any body + DeletePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) + + DeletePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) + + // ListPluginVersionTablesWithResponse request + ListPluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams, reqEditors ...RequestEditorFn) (*ListPluginVersionTablesResponse, error) + + // CreatePluginVersionTablesWithBodyWithResponse request with any body + CreatePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) + + CreatePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) + + // GetPluginVersionTableWithResponse request + GetPluginVersionTableWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*GetPluginVersionTableResponse, error) + + // RemovePluginUIAssetsWithResponse request + RemovePluginUIAssetsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*RemovePluginUIAssetsResponse, error) + + // UploadPluginUIAssetsWithBodyWithResponse request with any body + UploadPluginUIAssetsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadPluginUIAssetsResponse, error) + + UploadPluginUIAssetsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UploadPluginUIAssetsJSONRequestBody, reqEditors ...RequestEditorFn) (*UploadPluginUIAssetsResponse, error) + + // FinalizePluginUIAssetUploadWithBodyWithResponse request with any body + FinalizePluginUIAssetUploadWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*FinalizePluginUIAssetUploadResponse, error) + + FinalizePluginUIAssetUploadWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body FinalizePluginUIAssetUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*FinalizePluginUIAssetUploadResponse, error) + + // AuthRegistryRequestWithResponse request + AuthRegistryRequestWithResponse(ctx context.Context, params *AuthRegistryRequestParams, reqEditors ...RequestEditorFn) (*AuthRegistryRequestResponse, error) + + // ListTeamsWithResponse request + ListTeamsWithResponse(ctx context.Context, params *ListTeamsParams, reqEditors ...RequestEditorFn) (*ListTeamsResponse, error) + + // CreateTeamWithBodyWithResponse request with any body + CreateTeamWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error) + + CreateTeamWithResponse(ctx context.Context, body CreateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error) + + // DeleteTeamWithResponse request + DeleteTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteTeamResponse, error) + + // GetTeamByNameWithResponse request + GetTeamByNameWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetTeamByNameResponse, error) + + // UpdateTeamWithBodyWithResponse request with any body + UpdateTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) + + UpdateTeamWithResponse(ctx context.Context, teamName TeamName, body UpdateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) + + // ListAddonOrdersByTeamWithResponse request + ListAddonOrdersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListAddonOrdersByTeamParams, reqEditors ...RequestEditorFn) (*ListAddonOrdersByTeamResponse, error) + + // CreateAddonOrderForTeamWithBodyWithResponse request with any body + CreateAddonOrderForTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonOrderForTeamResponse, error) + + CreateAddonOrderForTeamWithResponse(ctx context.Context, teamName TeamName, body CreateAddonOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonOrderForTeamResponse, error) + + // GetAddonOrderByTeamWithResponse request + GetAddonOrderByTeamWithResponse(ctx context.Context, teamName TeamName, addonOrderID AddonOrderID, reqEditors ...RequestEditorFn) (*GetAddonOrderByTeamResponse, error) + + // DeleteAddonsByTeamWithResponse request + DeleteAddonsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteAddonsByTeamResponse, error) + + // ListAddonsByTeamWithResponse request + ListAddonsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListAddonsByTeamParams, reqEditors ...RequestEditorFn) (*ListAddonsByTeamResponse, error) + + // DownloadAddonAssetByTeamWithResponse request + DownloadAddonAssetByTeamWithResponse(ctx context.Context, teamName TeamName, addonTeam AddonTeam, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetByTeamParams, reqEditors ...RequestEditorFn) (*DownloadAddonAssetByTeamResponse, error) + + // AIOnboardingChatWithBodyWithResponse request with any body + AIOnboardingChatWithBodyWithResponse(ctx context.Context, teamName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AIOnboardingChatResponse, error) + + AIOnboardingChatWithResponse(ctx context.Context, teamName string, body AIOnboardingChatJSONRequestBody, reqEditors ...RequestEditorFn) (*AIOnboardingChatResponse, error) + + // AIOnboardingEndConversationWithResponse request + AIOnboardingEndConversationWithResponse(ctx context.Context, teamName string, reqEditors ...RequestEditorFn) (*AIOnboardingEndConversationResponse, error) + + // AIOnboardingNewConversationWithBodyWithResponse request with any body + AIOnboardingNewConversationWithBodyWithResponse(ctx context.Context, teamName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AIOnboardingNewConversationResponse, error) + + AIOnboardingNewConversationWithResponse(ctx context.Context, teamName string, body AIOnboardingNewConversationJSONRequestBody, reqEditors ...RequestEditorFn) (*AIOnboardingNewConversationResponse, error) + + // ListTeamAPIKeysWithResponse request + ListTeamAPIKeysWithResponse(ctx context.Context, teamName TeamName, params *ListTeamAPIKeysParams, reqEditors ...RequestEditorFn) (*ListTeamAPIKeysResponse, error) + + // CreateTeamAPIKeyWithBodyWithResponse request with any body + CreateTeamAPIKeyWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) + + CreateTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, body CreateTeamAPIKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) + + // DeleteTeamAPIKeyWithResponse request + DeleteTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, apiKeyID APIKeyID, reqEditors ...RequestEditorFn) (*DeleteTeamAPIKeyResponse, error) + + // CreateTeamImagesWithBodyWithResponse request with any body + CreateTeamImagesWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamImagesResponse, error) + + CreateTeamImagesWithResponse(ctx context.Context, teamName TeamName, body CreateTeamImagesJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamImagesResponse, error) + + // DeleteTeamInvitationWithBodyWithResponse request with any body + DeleteTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteTeamInvitationResponse, error) + + DeleteTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body DeleteTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteTeamInvitationResponse, error) + + // ListTeamInvitationsWithResponse request + ListTeamInvitationsWithResponse(ctx context.Context, teamName TeamName, params *ListTeamInvitationsParams, reqEditors ...RequestEditorFn) (*ListTeamInvitationsResponse, error) + + // EmailTeamInvitationWithBodyWithResponse request with any body + EmailTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmailTeamInvitationResponse, error) + + EmailTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body EmailTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*EmailTeamInvitationResponse, error) + + // AcceptTeamInvitationWithBodyWithResponse request with any body + AcceptTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) + + AcceptTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body AcceptTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) + + // CancelTeamInvitationWithResponse request + CancelTeamInvitationWithResponse(ctx context.Context, teamName TeamName, email EmailBasic, reqEditors ...RequestEditorFn) (*CancelTeamInvitationResponse, error) + + // ListInvoicesByTeamWithResponse request + ListInvoicesByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListInvoicesByTeamParams, reqEditors ...RequestEditorFn) (*ListInvoicesByTeamResponse, error) + + // GetManagedDatabasesWithResponse request + GetManagedDatabasesWithResponse(ctx context.Context, teamName TeamName, params *GetManagedDatabasesParams, reqEditors ...RequestEditorFn) (*GetManagedDatabasesResponse, error) + + // CreateManagedDatabaseWithBodyWithResponse request with any body + CreateManagedDatabaseWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateManagedDatabaseResponse, error) + + CreateManagedDatabaseWithResponse(ctx context.Context, teamName TeamName, body CreateManagedDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateManagedDatabaseResponse, error) + + // DeleteManagedDatabaseWithResponse request + DeleteManagedDatabaseWithResponse(ctx context.Context, teamName TeamName, managedDatabaseID ManagedDatabaseID, reqEditors ...RequestEditorFn) (*DeleteManagedDatabaseResponse, error) + + // GetManagedDatabaseWithResponse request + GetManagedDatabaseWithResponse(ctx context.Context, teamName TeamName, managedDatabaseID ManagedDatabaseID, reqEditors ...RequestEditorFn) (*GetManagedDatabaseResponse, error) + + // RemoveTeamMembershipWithBodyWithResponse request with any body + RemoveTeamMembershipWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RemoveTeamMembershipResponse, error) + + RemoveTeamMembershipWithResponse(ctx context.Context, teamName TeamName, body RemoveTeamMembershipJSONRequestBody, reqEditors ...RequestEditorFn) (*RemoveTeamMembershipResponse, error) + + // GetTeamMembershipsWithResponse request + GetTeamMembershipsWithResponse(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*GetTeamMembershipsResponse, error) + + // DeleteTeamMembershipWithResponse request + DeleteTeamMembershipWithResponse(ctx context.Context, teamName TeamName, email EmailBasic, reqEditors ...RequestEditorFn) (*DeleteTeamMembershipResponse, error) + + // DeletePluginsByTeamWithResponse request + DeletePluginsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeletePluginsByTeamResponse, error) + + // ListPluginsByTeamWithResponse request + ListPluginsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListPluginsByTeamParams, reqEditors ...RequestEditorFn) (*ListPluginsByTeamResponse, error) + + // DownloadPluginAssetByTeamWithResponse request + DownloadPluginAssetByTeamWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetByTeamParams, reqEditors ...RequestEditorFn) (*DownloadPluginAssetByTeamResponse, error) + + // GetSettingsWithResponse request + GetSettingsWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetSettingsResponse, error) + + // UpdateSettingsWithBodyWithResponse request with any body + UpdateSettingsWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSettingsResponse, error) + + UpdateSettingsWithResponse(ctx context.Context, teamName TeamName, body UpdateSettingsJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSettingsResponse, error) + + // ListSubscriptionOrdersByTeamWithResponse request + ListSubscriptionOrdersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListSubscriptionOrdersByTeamParams, reqEditors ...RequestEditorFn) (*ListSubscriptionOrdersByTeamResponse, error) + + // CreateSubscriptionOrderForTeamWithBodyWithResponse request with any body + CreateSubscriptionOrderForTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSubscriptionOrderForTeamResponse, error) + + CreateSubscriptionOrderForTeamWithResponse(ctx context.Context, teamName TeamName, body CreateSubscriptionOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSubscriptionOrderForTeamResponse, error) + + // GetSubscriptionOrderByTeamWithResponse request + GetSubscriptionOrderByTeamWithResponse(ctx context.Context, teamName TeamName, teamSubscriptionOrderID TeamSubscriptionOrderID, reqEditors ...RequestEditorFn) (*GetSubscriptionOrderByTeamResponse, error) + + // ListTeamPluginUsageWithResponse request + ListTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*ListTeamPluginUsageResponse, error) + + // IncreaseTeamPluginUsageWithBodyWithResponse request with any body + IncreaseTeamPluginUsageWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) + + IncreaseTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) + + // GetTeamUsageSummaryWithResponse request + GetTeamUsageSummaryWithResponse(ctx context.Context, teamName TeamName, params *GetTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*GetTeamUsageSummaryResponse, error) + + // GetGroupedTeamUsageSummaryWithResponse request + GetGroupedTeamUsageSummaryWithResponse(ctx context.Context, teamName TeamName, groupBy GetGroupedTeamUsageSummaryParamsGroupBy, params *GetGroupedTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*GetGroupedTeamUsageSummaryResponse, error) + + // GetTeamPluginUsageWithResponse request + GetTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetTeamPluginUsageResponse, error) + + // ListUsersByTeamWithResponse request + ListUsersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListUsersByTeamParams, reqEditors ...RequestEditorFn) (*ListUsersByTeamResponse, error) + + // UploadImageWithBodyWithResponse request with any body + UploadImageWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadImageResponse, error) + + UploadImageWithResponse(ctx context.Context, body UploadImageJSONRequestBody, reqEditors ...RequestEditorFn) (*UploadImageResponse, error) + + // GetCurrentUserWithResponse request + GetCurrentUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentUserResponse, error) + + // UpdateCurrentUserWithBodyWithResponse request with any body + UpdateCurrentUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) + + UpdateCurrentUserWithResponse(ctx context.Context, body UpdateCurrentUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) + + // SendAnonymousEventWithBodyWithResponse request with any body + SendAnonymousEventWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendAnonymousEventResponse, error) + + SendAnonymousEventWithResponse(ctx context.Context, body SendAnonymousEventJSONRequestBody, reqEditors ...RequestEditorFn) (*SendAnonymousEventResponse, error) + + // CheckUserAuthStatusWithResponse request + CheckUserAuthStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CheckUserAuthStatusResponse, error) + + // UpdateCustomerWithBodyWithResponse request with any body + UpdateCustomerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCustomerResponse, error) + + UpdateCustomerWithResponse(ctx context.Context, body UpdateCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCustomerResponse, error) + + // SendUserEventWithBodyWithResponse request with any body + SendUserEventWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendUserEventResponse, error) + + SendUserEventWithResponse(ctx context.Context, body SendUserEventJSONRequestBody, reqEditors ...RequestEditorFn) (*SendUserEventResponse, error) + + // ListCurrentUserInvitationsWithResponse request + ListCurrentUserInvitationsWithResponse(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*ListCurrentUserInvitationsResponse, error) + + // LogoutUserWithResponse request + LogoutUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*LogoutUserResponse, error) + + // LoginUserWithBodyWithResponse request with any body + LoginUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LoginUserResponse, error) + + LoginUserWithResponse(ctx context.Context, body LoginUserJSONRequestBody, reqEditors ...RequestEditorFn) (*LoginUserResponse, error) + + // GetCurrentUserMembershipsWithResponse request + GetCurrentUserMembershipsWithResponse(ctx context.Context, params *GetCurrentUserMembershipsParams, reqEditors ...RequestEditorFn) (*GetCurrentUserMembershipsResponse, error) + + // RegisterUserWithBodyWithResponse request with any body + RegisterUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RegisterUserResponse, error) + + RegisterUserWithResponse(ctx context.Context, body RegisterUserJSONRequestBody, reqEditors ...RequestEditorFn) (*RegisterUserResponse, error) + + // ResetUserPasswordWithBodyWithResponse request with any body + ResetUserPasswordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ResetUserPasswordResponse, error) + + ResetUserPasswordWithResponse(ctx context.Context, body ResetUserPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*ResetUserPasswordResponse, error) + + // DeterminePlatformTenantByEmailWithResponse request + DeterminePlatformTenantByEmailWithResponse(ctx context.Context, params *DeterminePlatformTenantByEmailParams, reqEditors ...RequestEditorFn) (*DeterminePlatformTenantByEmailResponse, error) + + // CreateUserTokenWithResponse request + CreateUserTokenWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CreateUserTokenResponse, error) + + // UserTOTPDeleteWithResponse request + UserTOTPDeleteWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UserTOTPDeleteResponse, error) + + // UserTOTPSetupWithResponse request + UserTOTPSetupWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UserTOTPSetupResponse, error) + + // UserTOTPVerifyWithBodyWithResponse request with any body + UserTOTPVerifyWithBodyWithResponse(ctx context.Context, params *UserTOTPVerifyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UserTOTPVerifyResponse, error) + + UserTOTPVerifyWithResponse(ctx context.Context, params *UserTOTPVerifyParams, body UserTOTPVerifyJSONRequestBody, reqEditors ...RequestEditorFn) (*UserTOTPVerifyResponse, error) + + // VerifyUserEmailWithBodyWithResponse request with any body + VerifyUserEmailWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*VerifyUserEmailResponse, error) + + VerifyUserEmailWithResponse(ctx context.Context, body VerifyUserEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*VerifyUserEmailResponse, error) + + // DeleteUserWithResponse request + DeleteUserWithResponse(ctx context.Context, userID UserID, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error) +} + +type HealthCheckResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r HealthCheckResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r HealthCheckResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListAddonsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListAddons200Response + JSON401 *RequiresAuthentication + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListAddonsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListAddonsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateAddonResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *Addon + JSON400 *BadRequest + JSON403 *Forbidden + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreateAddonResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateAddonResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteAddonByTeamAndNameResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DeleteAddonByTeamAndNameResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteAddonByTeamAndNameResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetAddonResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListAddon + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetAddonResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetAddonResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateAddonResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Addon + JSON400 *BadRequest + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UpdateAddonResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateAddonResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListAddonVersionsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListAddonVersions200Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListAddonVersionsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListAddonVersionsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetAddonVersionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AddonVersion + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetAddonVersionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetAddonVersionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateAddonVersionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AddonVersion + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UpdateAddonVersionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateAddonVersionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateAddonVersionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AddonVersion + JSON201 *AddonVersion + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreateAddonVersionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateAddonVersionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DownloadAddonAssetResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AddonAsset + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON429 *TooManyRequests + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DownloadAddonAssetResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DownloadAddonAssetResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UploadAddonAssetResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *ReleaseURL + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UploadAddonAssetResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UploadAddonAssetResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CQHealthCheckResponse struct { + Body []byte + HTTPResponse *http.Response + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CQHealthCheckResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CQHealthCheckResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOpenAPIJSONResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *map[string]interface{} +} + +// Status returns HTTPResponse.Status +func (r GetOpenAPIJSONResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOpenAPIJSONResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ActivatePlatformResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ActivatePlatform200Response + JSON205 *ActivatePlatform205Response + JSON400 *BadRequest + JSON404 *NotFound + JSON429 *TooManyRequests + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ActivatePlatformResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ActivatePlatformResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type RenewPlatformActivationResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *RenewPlatformActivation200Response + JSON205 *ActivatePlatform205Response + JSON400 *BadRequest + JSON404 *NotFound + JSON429 *TooManyRequests + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r RenewPlatformActivationResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r RenewPlatformActivationResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ReportPlatformDataResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON404 *NotFound + JSON429 *TooManyRequests + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ReportPlatformDataResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ReportPlatformDataResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ReportTenantPlatformDataResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON403 *Forbidden + JSON404 *NotFound + JSON429 *TooManyRequests + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ReportTenantPlatformDataResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ReportTenantPlatformDataResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListPluginNotificationRequestsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListPluginNotificationRequests200Response + JSON401 *RequiresAuthentication + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListPluginNotificationRequestsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListPluginNotificationRequestsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreatePluginNotificationRequestResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *PluginNotificationRequest + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreatePluginNotificationRequestResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreatePluginNotificationRequestResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeletePluginNotificationRequestResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DeletePluginNotificationRequestResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeletePluginNotificationRequestResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetPluginNotificationRequestResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListPluginNotificationRequests200Response + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetPluginNotificationRequestResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetPluginNotificationRequestResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListPluginsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListPlugins200Response + JSON401 *RequiresAuthentication + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListPluginsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListPluginsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreatePluginResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *Plugin + JSON400 *BadRequest + JSON403 *Forbidden + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreatePluginResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreatePluginResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeletePluginByTeamAndPluginNameResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DeletePluginByTeamAndPluginNameResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeletePluginByTeamAndPluginNameResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetPluginResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListPlugin + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetPluginResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetPluginResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdatePluginResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Plugin + JSON400 *BadRequest + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UpdatePluginResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdatePluginResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeletePluginUpcomingPriceChangesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DeletePluginUpcomingPriceChangesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeletePluginUpcomingPriceChangesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListPluginUpcomingPriceChangesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListPluginUpcomingPriceChanges200Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListPluginUpcomingPriceChangesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListPluginUpcomingPriceChangesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreatePluginUpcomingPriceChangeResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *PluginPrice + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreatePluginUpcomingPriceChangeResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreatePluginUpcomingPriceChangeResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListPluginVersionsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListPluginVersions200Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListPluginVersionsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListPluginVersionsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetPluginVersionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *PluginVersionDetails + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetPluginVersionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetPluginVersionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdatePluginVersionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *PluginVersion + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UpdatePluginVersionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdatePluginVersionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreatePluginVersionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *PluginVersion + JSON201 *PluginVersion + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreatePluginVersionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreatePluginVersionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DownloadPluginAssetResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *PluginAsset + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON429 *TooManyRequests + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DownloadPluginAssetResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DownloadPluginAssetResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UploadPluginAssetResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *ReleaseURL + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UploadPluginAssetResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UploadPluginAssetResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeletePluginVersionDocsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DeletePluginVersionDocsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeletePluginVersionDocsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListPluginVersionDocsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListPluginVersionDocs200Response + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListPluginVersionDocsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListPluginVersionDocsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ReplacePluginVersionDocsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *CreatePluginVersionDocs201Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ReplacePluginVersionDocsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ReplacePluginVersionDocsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreatePluginVersionDocsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *CreatePluginVersionDocs201Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreatePluginVersionDocsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreatePluginVersionDocsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeletePluginVersionTablesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DeletePluginVersionTablesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeletePluginVersionTablesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListPluginVersionTablesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListPluginVersionTables200Response + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListPluginVersionTablesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListPluginVersionTablesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreatePluginVersionTablesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *CreatePluginVersionTables201Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreatePluginVersionTablesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreatePluginVersionTablesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetPluginVersionTableResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *PluginTableDetails + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetPluginVersionTableResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetPluginVersionTableResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type RemovePluginUIAssetsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r RemovePluginUIAssetsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r RemovePluginUIAssetsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UploadPluginUIAssetsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *UploadPluginUIAssets201Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UploadPluginUIAssetsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UploadPluginUIAssetsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type FinalizePluginUIAssetUploadResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r FinalizePluginUIAssetUploadResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r FinalizePluginUIAssetUploadResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type AuthRegistryRequestResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *RegistryAuthToken + JSON400 *DockerError + JSON401 *DockerError + JSON404 *DockerError + JSON422 *DockerError + JSON500 *DockerError +} + +// Status returns HTTPResponse.Status +func (r AuthRegistryRequestResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r AuthRegistryRequestResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListTeamsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListTeams200Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListTeamsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListTeamsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *Team + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreateTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DeleteTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetTeamByNameResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Team + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetTeamByNameResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetTeamByNameResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Team + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UpdateTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListAddonOrdersByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListAddonOrdersByTeam200Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListAddonOrdersByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListAddonOrdersByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateAddonOrderForTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *AddonOrder + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreateAddonOrderForTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateAddonOrderForTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetAddonOrderByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AddonOrder + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetAddonOrderByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetAddonOrderByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteAddonsByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DeleteAddonsByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteAddonsByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListAddonsByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListAddonsByTeam200Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListAddonsByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListAddonsByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DownloadAddonAssetByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AddonAsset + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON429 *TooManyRequests + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DownloadAddonAssetByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DownloadAddonAssetByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type AIOnboardingChatResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AIOnboardingChat200Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON405 *MethodNotAllowed + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r AIOnboardingChatResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r AIOnboardingChatResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type AIOnboardingEndConversationResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AIOnboardingEndConversation200Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON405 *MethodNotAllowed + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r AIOnboardingEndConversationResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r AIOnboardingEndConversationResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type AIOnboardingNewConversationResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AIOnboardingNewConversation200Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON405 *MethodNotAllowed + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r AIOnboardingNewConversationResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r AIOnboardingNewConversationResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListTeamAPIKeysResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListTeamAPIKeys200Response + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListTeamAPIKeysResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListTeamAPIKeysResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateTeamAPIKeyResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *APIKey + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreateTeamAPIKeyResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateTeamAPIKeyResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteTeamAPIKeyResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DeleteTeamAPIKeyResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteTeamAPIKeyResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateTeamImagesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *CreateTeamImages201Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreateTeamImagesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateTeamImagesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteTeamInvitationResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DeleteTeamInvitationResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteTeamInvitationResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListTeamInvitationsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListTeamInvitations200Response + JSON403 *Forbidden + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListTeamInvitationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListTeamInvitationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type EmailTeamInvitationResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Invitation + JSON202 *Invitation + JSON400 *BadRequest + JSON403 *Forbidden + JSON422 *UnprocessableEntity + JSON429 *TooManyRequests + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r EmailTeamInvitationResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r EmailTeamInvitationResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type AcceptTeamInvitationResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *MembershipWithTeam + JSON303 *MembershipWithTeam + JSON403 *Forbidden + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r AcceptTeamInvitationResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r AcceptTeamInvitationResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CancelTeamInvitationResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CancelTeamInvitationResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CancelTeamInvitationResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListInvoicesByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListInvoicesByTeam200Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListInvoicesByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListInvoicesByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetManagedDatabasesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *GetManagedDatabases200Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetManagedDatabasesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetManagedDatabasesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateManagedDatabaseResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *ManagedDatabase + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON409 *Conflict + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreateManagedDatabaseResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateManagedDatabaseResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteManagedDatabaseResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DeleteManagedDatabaseResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteManagedDatabaseResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetManagedDatabaseResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ManagedDatabase + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetManagedDatabaseResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetManagedDatabaseResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type RemoveTeamMembershipResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r RemoveTeamMembershipResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r RemoveTeamMembershipResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetTeamMembershipsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *GetTeamMemberships200Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetTeamMembershipsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetTeamMembershipsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteTeamMembershipResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DeleteTeamMembershipResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteTeamMembershipResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeletePluginsByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DeletePluginsByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeletePluginsByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListPluginsByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListPluginsByTeam200Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListPluginsByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListPluginsByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DownloadPluginAssetByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *PluginAsset + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON429 *TooManyRequests + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DownloadPluginAssetByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DownloadPluginAssetByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetSettingsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Settings + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetSettingsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetSettingsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateSettingsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *Settings + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UpdateSettingsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateSettingsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListSubscriptionOrdersByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListSubscriptionOrdersByTeam200Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListSubscriptionOrdersByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListSubscriptionOrdersByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateSubscriptionOrderForTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *TeamSubscriptionOrder + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreateSubscriptionOrderForTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateSubscriptionOrderForTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetSubscriptionOrderByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *TeamSubscriptionOrder + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetSubscriptionOrderByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetSubscriptionOrderByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListTeamPluginUsageResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListTeamPluginUsage200Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListTeamPluginUsageResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListTeamPluginUsageResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type IncreaseTeamPluginUsageResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError + JSON503 *ServiceUnavailable +} + +// Status returns HTTPResponse.Status +func (r IncreaseTeamPluginUsageResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r IncreaseTeamPluginUsageResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetTeamUsageSummaryResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *UsageSummary + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetTeamUsageSummaryResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetTeamUsageSummaryResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetGroupedTeamUsageSummaryResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *UsageSummary + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetGroupedTeamUsageSummaryResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetGroupedTeamUsageSummaryResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetTeamPluginUsageResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *UsageCurrent + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetTeamPluginUsageResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetTeamPluginUsageResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListUsersByTeamResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListUsersByTeam200Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListUsersByTeamResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListUsersByTeamResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UploadImageResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ImageURL + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UploadImageResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UploadImageResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetCurrentUserResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *User + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetCurrentUserResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetCurrentUserResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateCurrentUserResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *User + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON405 *MethodNotAllowed + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UpdateCurrentUserResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateCurrentUserResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type SendAnonymousEventResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON404 *NotFound + JSON429 *TooManyRequests + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r SendAnonymousEventResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r SendAnonymousEventResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CheckUserAuthStatusResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CheckUserAuthStatus200Response + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CheckUserAuthStatusResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CheckUserAuthStatusResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateCustomerResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UpdateCustomerResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateCustomerResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type SendUserEventResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON404 *NotFound + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r SendUserEventResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r SendUserEventResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ListCurrentUserInvitationsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListCurrentUserInvitations200Response + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ListCurrentUserInvitationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ListCurrentUserInvitationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type LogoutUserResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON405 *MethodNotAllowed + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r LogoutUserResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r LogoutUserResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type LoginUserResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON405 *MethodNotAllowed + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r LoginUserResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r LoginUserResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetCurrentUserMembershipsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *GetCurrentUserMemberships200Response + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r GetCurrentUserMembershipsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetCurrentUserMembershipsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type RegisterUserResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *RegisterUser201Response + JSON400 *BadRequest + JSON404 *NotFound + JSON429 *TooManyRequests + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r RegisterUserResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r RegisterUserResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type ResetUserPasswordResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON404 *NotFound + JSON429 *TooManyRequests + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r ResetUserPasswordResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r ResetUserPasswordResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeterminePlatformTenantByEmailResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *DeterminePlatformTenantByEmail200Response + JSON400 *BadRequest + JSON404 *NotFound + JSON429 *TooManyRequests + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DeterminePlatformTenantByEmailResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeterminePlatformTenantByEmailResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateUserTokenResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *CreateUserToken201Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r CreateUserTokenResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateUserTokenResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UserTOTPDeleteResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON405 *MethodNotAllowed + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UserTOTPDeleteResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UserTOTPDeleteResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UserTOTPSetupResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *UserTOTPSetup200Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON405 *MethodNotAllowed + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UserTOTPSetupResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UserTOTPSetupResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UserTOTPVerifyResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *UserTOTPVerify201Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON405 *MethodNotAllowed + JSON422 *UnprocessableEntity + JSON429 *TooManyRequests + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r UserTOTPVerifyResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UserTOTPVerifyResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type VerifyUserEmailResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON404 *NotFound + JSON429 *TooManyRequests + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r VerifyUserEmailResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r VerifyUserEmailResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteUserResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *BadRequest + JSON401 *RequiresAuthentication + JSON403 *Forbidden + JSON404 *NotFound + JSON422 *UnprocessableEntity + JSON500 *InternalError +} + +// Status returns HTTPResponse.Status +func (r DeleteUserResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteUserResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// HealthCheckWithResponse request returning *HealthCheckResponse +func (c *ClientWithResponses) HealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthCheckResponse, error) { + rsp, err := c.HealthCheck(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseHealthCheckResponse(rsp) +} + +// ListAddonsWithResponse request returning *ListAddonsResponse +func (c *ClientWithResponses) ListAddonsWithResponse(ctx context.Context, params *ListAddonsParams, reqEditors ...RequestEditorFn) (*ListAddonsResponse, error) { + rsp, err := c.ListAddons(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListAddonsResponse(rsp) +} + +// CreateAddonWithBodyWithResponse request with arbitrary body returning *CreateAddonResponse +func (c *ClientWithResponses) CreateAddonWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonResponse, error) { + rsp, err := c.CreateAddonWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateAddonResponse(rsp) +} + +func (c *ClientWithResponses) CreateAddonWithResponse(ctx context.Context, body CreateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonResponse, error) { + rsp, err := c.CreateAddon(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateAddonResponse(rsp) +} + +// DeleteAddonByTeamAndNameWithResponse request returning *DeleteAddonByTeamAndNameResponse +func (c *ClientWithResponses) DeleteAddonByTeamAndNameWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*DeleteAddonByTeamAndNameResponse, error) { + rsp, err := c.DeleteAddonByTeamAndName(ctx, teamName, addonType, addonName, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteAddonByTeamAndNameResponse(rsp) +} + +// GetAddonWithResponse request returning *GetAddonResponse +func (c *ClientWithResponses) GetAddonWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, reqEditors ...RequestEditorFn) (*GetAddonResponse, error) { + rsp, err := c.GetAddon(ctx, teamName, addonType, addonName, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetAddonResponse(rsp) +} + +// UpdateAddonWithBodyWithResponse request with arbitrary body returning *UpdateAddonResponse +func (c *ClientWithResponses) UpdateAddonWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) { + rsp, err := c.UpdateAddonWithBody(ctx, teamName, addonType, addonName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateAddonResponse(rsp) +} + +func (c *ClientWithResponses) UpdateAddonWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, body UpdateAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonResponse, error) { + rsp, err := c.UpdateAddon(ctx, teamName, addonType, addonName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateAddonResponse(rsp) +} + +// ListAddonVersionsWithResponse request returning *ListAddonVersionsResponse +func (c *ClientWithResponses) ListAddonVersionsWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, params *ListAddonVersionsParams, reqEditors ...RequestEditorFn) (*ListAddonVersionsResponse, error) { + rsp, err := c.ListAddonVersions(ctx, teamName, addonType, addonName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListAddonVersionsResponse(rsp) +} + +// GetAddonVersionWithResponse request returning *GetAddonVersionResponse +func (c *ClientWithResponses) GetAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetAddonVersionResponse, error) { + rsp, err := c.GetAddonVersion(ctx, teamName, addonType, addonName, versionName, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetAddonVersionResponse(rsp) +} + +// UpdateAddonVersionWithBodyWithResponse request with arbitrary body returning *UpdateAddonVersionResponse +func (c *ClientWithResponses) UpdateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) { + rsp, err := c.UpdateAddonVersionWithBody(ctx, teamName, addonType, addonName, versionName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateAddonVersionResponse(rsp) +} + +func (c *ClientWithResponses) UpdateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body UpdateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAddonVersionResponse, error) { + rsp, err := c.UpdateAddonVersion(ctx, teamName, addonType, addonName, versionName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateAddonVersionResponse(rsp) +} + +// CreateAddonVersionWithBodyWithResponse request with arbitrary body returning *CreateAddonVersionResponse +func (c *ClientWithResponses) CreateAddonVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) { + rsp, err := c.CreateAddonVersionWithBody(ctx, teamName, addonType, addonName, versionName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateAddonVersionResponse(rsp) +} + +func (c *ClientWithResponses) CreateAddonVersionWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, body CreateAddonVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonVersionResponse, error) { + rsp, err := c.CreateAddonVersion(ctx, teamName, addonType, addonName, versionName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateAddonVersionResponse(rsp) +} + +// DownloadAddonAssetWithResponse request returning *DownloadAddonAssetResponse +func (c *ClientWithResponses) DownloadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetParams, reqEditors ...RequestEditorFn) (*DownloadAddonAssetResponse, error) { + rsp, err := c.DownloadAddonAsset(ctx, teamName, addonType, addonName, versionName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDownloadAddonAssetResponse(rsp) +} + +// UploadAddonAssetWithResponse request returning *UploadAddonAssetResponse +func (c *ClientWithResponses) UploadAddonAssetWithResponse(ctx context.Context, teamName TeamName, addonType AddonType, addonName AddonName, versionName VersionName, reqEditors ...RequestEditorFn) (*UploadAddonAssetResponse, error) { + rsp, err := c.UploadAddonAsset(ctx, teamName, addonType, addonName, versionName, reqEditors...) + if err != nil { + return nil, err + } + return ParseUploadAddonAssetResponse(rsp) +} + +// CQHealthCheckWithResponse request returning *CQHealthCheckResponse +func (c *ClientWithResponses) CQHealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CQHealthCheckResponse, error) { + rsp, err := c.CQHealthCheck(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseCQHealthCheckResponse(rsp) +} + +// GetOpenAPIJSONWithResponse request returning *GetOpenAPIJSONResponse +func (c *ClientWithResponses) GetOpenAPIJSONWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOpenAPIJSONResponse, error) { + rsp, err := c.GetOpenAPIJSON(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOpenAPIJSONResponse(rsp) +} + +// ActivatePlatformWithBodyWithResponse request with arbitrary body returning *ActivatePlatformResponse +func (c *ClientWithResponses) ActivatePlatformWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ActivatePlatformResponse, error) { + rsp, err := c.ActivatePlatformWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseActivatePlatformResponse(rsp) +} + +func (c *ClientWithResponses) ActivatePlatformWithResponse(ctx context.Context, body ActivatePlatformJSONRequestBody, reqEditors ...RequestEditorFn) (*ActivatePlatformResponse, error) { + rsp, err := c.ActivatePlatform(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseActivatePlatformResponse(rsp) +} + +// RenewPlatformActivationWithBodyWithResponse request with arbitrary body returning *RenewPlatformActivationResponse +func (c *ClientWithResponses) RenewPlatformActivationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RenewPlatformActivationResponse, error) { + rsp, err := c.RenewPlatformActivationWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseRenewPlatformActivationResponse(rsp) +} + +func (c *ClientWithResponses) RenewPlatformActivationWithResponse(ctx context.Context, body RenewPlatformActivationJSONRequestBody, reqEditors ...RequestEditorFn) (*RenewPlatformActivationResponse, error) { + rsp, err := c.RenewPlatformActivation(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseRenewPlatformActivationResponse(rsp) +} + +// ReportPlatformDataWithBodyWithResponse request with arbitrary body returning *ReportPlatformDataResponse +func (c *ClientWithResponses) ReportPlatformDataWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReportPlatformDataResponse, error) { + rsp, err := c.ReportPlatformDataWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseReportPlatformDataResponse(rsp) +} + +func (c *ClientWithResponses) ReportPlatformDataWithResponse(ctx context.Context, body ReportPlatformDataJSONRequestBody, reqEditors ...RequestEditorFn) (*ReportPlatformDataResponse, error) { + rsp, err := c.ReportPlatformData(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseReportPlatformDataResponse(rsp) +} + +// ReportTenantPlatformDataWithBodyWithResponse request with arbitrary body returning *ReportTenantPlatformDataResponse +func (c *ClientWithResponses) ReportTenantPlatformDataWithBodyWithResponse(ctx context.Context, tenantID openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReportTenantPlatformDataResponse, error) { + rsp, err := c.ReportTenantPlatformDataWithBody(ctx, tenantID, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseReportTenantPlatformDataResponse(rsp) +} + +func (c *ClientWithResponses) ReportTenantPlatformDataWithResponse(ctx context.Context, tenantID openapi_types.UUID, body ReportTenantPlatformDataJSONRequestBody, reqEditors ...RequestEditorFn) (*ReportTenantPlatformDataResponse, error) { + rsp, err := c.ReportTenantPlatformData(ctx, tenantID, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseReportTenantPlatformDataResponse(rsp) +} + +// ListPluginNotificationRequestsWithResponse request returning *ListPluginNotificationRequestsResponse +func (c *ClientWithResponses) ListPluginNotificationRequestsWithResponse(ctx context.Context, params *ListPluginNotificationRequestsParams, reqEditors ...RequestEditorFn) (*ListPluginNotificationRequestsResponse, error) { + rsp, err := c.ListPluginNotificationRequests(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListPluginNotificationRequestsResponse(rsp) +} + +// CreatePluginNotificationRequestWithBodyWithResponse request with arbitrary body returning *CreatePluginNotificationRequestResponse +func (c *ClientWithResponses) CreatePluginNotificationRequestWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginNotificationRequestResponse, error) { + rsp, err := c.CreatePluginNotificationRequestWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreatePluginNotificationRequestResponse(rsp) +} + +func (c *ClientWithResponses) CreatePluginNotificationRequestWithResponse(ctx context.Context, body CreatePluginNotificationRequestJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginNotificationRequestResponse, error) { + rsp, err := c.CreatePluginNotificationRequest(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreatePluginNotificationRequestResponse(rsp) +} + +// DeletePluginNotificationRequestWithResponse request returning *DeletePluginNotificationRequestResponse +func (c *ClientWithResponses) DeletePluginNotificationRequestWithResponse(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginNotificationRequestResponse, error) { + rsp, err := c.DeletePluginNotificationRequest(ctx, pluginTeam, pluginKind, pluginName, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeletePluginNotificationRequestResponse(rsp) +} + +// GetPluginNotificationRequestWithResponse request returning *GetPluginNotificationRequestResponse +func (c *ClientWithResponses) GetPluginNotificationRequestWithResponse(ctx context.Context, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginNotificationRequestResponse, error) { + rsp, err := c.GetPluginNotificationRequest(ctx, pluginTeam, pluginKind, pluginName, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetPluginNotificationRequestResponse(rsp) +} + +// ListPluginsWithResponse request returning *ListPluginsResponse +func (c *ClientWithResponses) ListPluginsWithResponse(ctx context.Context, params *ListPluginsParams, reqEditors ...RequestEditorFn) (*ListPluginsResponse, error) { + rsp, err := c.ListPlugins(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListPluginsResponse(rsp) +} + +// CreatePluginWithBodyWithResponse request with arbitrary body returning *CreatePluginResponse +func (c *ClientWithResponses) CreatePluginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) { + rsp, err := c.CreatePluginWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreatePluginResponse(rsp) +} + +func (c *ClientWithResponses) CreatePluginWithResponse(ctx context.Context, body CreatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) { + rsp, err := c.CreatePlugin(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreatePluginResponse(rsp) +} + +// DeletePluginByTeamAndPluginNameWithResponse request returning *DeletePluginByTeamAndPluginNameResponse +func (c *ClientWithResponses) DeletePluginByTeamAndPluginNameWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginByTeamAndPluginNameResponse, error) { + rsp, err := c.DeletePluginByTeamAndPluginName(ctx, teamName, pluginKind, pluginName, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeletePluginByTeamAndPluginNameResponse(rsp) +} + +// GetPluginWithResponse request returning *GetPluginResponse +func (c *ClientWithResponses) GetPluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginResponse, error) { + rsp, err := c.GetPlugin(ctx, teamName, pluginKind, pluginName, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetPluginResponse(rsp) +} + +// UpdatePluginWithBodyWithResponse request with arbitrary body returning *UpdatePluginResponse +func (c *ClientWithResponses) UpdatePluginWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) { + rsp, err := c.UpdatePluginWithBody(ctx, teamName, pluginKind, pluginName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdatePluginResponse(rsp) +} + +func (c *ClientWithResponses) UpdatePluginWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body UpdatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) { + rsp, err := c.UpdatePlugin(ctx, teamName, pluginKind, pluginName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdatePluginResponse(rsp) +} + +// DeletePluginUpcomingPriceChangesWithResponse request returning *DeletePluginUpcomingPriceChangesResponse +func (c *ClientWithResponses) DeletePluginUpcomingPriceChangesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*DeletePluginUpcomingPriceChangesResponse, error) { + rsp, err := c.DeletePluginUpcomingPriceChanges(ctx, teamName, pluginKind, pluginName, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeletePluginUpcomingPriceChangesResponse(rsp) +} + +// ListPluginUpcomingPriceChangesWithResponse request returning *ListPluginUpcomingPriceChangesResponse +func (c *ClientWithResponses) ListPluginUpcomingPriceChangesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*ListPluginUpcomingPriceChangesResponse, error) { + rsp, err := c.ListPluginUpcomingPriceChanges(ctx, teamName, pluginKind, pluginName, reqEditors...) + if err != nil { + return nil, err + } + return ParseListPluginUpcomingPriceChangesResponse(rsp) +} + +// CreatePluginUpcomingPriceChangeWithBodyWithResponse request with arbitrary body returning *CreatePluginUpcomingPriceChangeResponse +func (c *ClientWithResponses) CreatePluginUpcomingPriceChangeWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginUpcomingPriceChangeResponse, error) { + rsp, err := c.CreatePluginUpcomingPriceChangeWithBody(ctx, teamName, pluginKind, pluginName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreatePluginUpcomingPriceChangeResponse(rsp) +} + +func (c *ClientWithResponses) CreatePluginUpcomingPriceChangeWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, body CreatePluginUpcomingPriceChangeJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginUpcomingPriceChangeResponse, error) { + rsp, err := c.CreatePluginUpcomingPriceChange(ctx, teamName, pluginKind, pluginName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreatePluginUpcomingPriceChangeResponse(rsp) +} + +// ListPluginVersionsWithResponse request returning *ListPluginVersionsResponse +func (c *ClientWithResponses) ListPluginVersionsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, params *ListPluginVersionsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionsResponse, error) { + rsp, err := c.ListPluginVersions(ctx, teamName, pluginKind, pluginName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListPluginVersionsResponse(rsp) +} + +// GetPluginVersionWithResponse request returning *GetPluginVersionResponse +func (c *ClientWithResponses) GetPluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetPluginVersionResponse, error) { + rsp, err := c.GetPluginVersion(ctx, teamName, pluginKind, pluginName, versionName, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetPluginVersionResponse(rsp) +} + +// UpdatePluginVersionWithBodyWithResponse request with arbitrary body returning *UpdatePluginVersionResponse +func (c *ClientWithResponses) UpdatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) { + rsp, err := c.UpdatePluginVersionWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdatePluginVersionResponse(rsp) +} + +func (c *ClientWithResponses) UpdatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) { + rsp, err := c.UpdatePluginVersion(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdatePluginVersionResponse(rsp) +} + +// CreatePluginVersionWithBodyWithResponse request with arbitrary body returning *CreatePluginVersionResponse +func (c *ClientWithResponses) CreatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) { + rsp, err := c.CreatePluginVersionWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreatePluginVersionResponse(rsp) +} + +func (c *ClientWithResponses) CreatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) { + rsp, err := c.CreatePluginVersion(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreatePluginVersionResponse(rsp) +} + +// DownloadPluginAssetWithResponse request returning *DownloadPluginAssetResponse +func (c *ClientWithResponses) DownloadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetParams, reqEditors ...RequestEditorFn) (*DownloadPluginAssetResponse, error) { + rsp, err := c.DownloadPluginAsset(ctx, teamName, pluginKind, pluginName, versionName, targetName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDownloadPluginAssetResponse(rsp) +} + +// UploadPluginAssetWithResponse request returning *UploadPluginAssetResponse +func (c *ClientWithResponses) UploadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*UploadPluginAssetResponse, error) { + rsp, err := c.UploadPluginAsset(ctx, teamName, pluginKind, pluginName, versionName, targetName, reqEditors...) + if err != nil { + return nil, err + } + return ParseUploadPluginAssetResponse(rsp) +} + +// DeletePluginVersionDocsWithBodyWithResponse request with arbitrary body returning *DeletePluginVersionDocsResponse +func (c *ClientWithResponses) DeletePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) { + rsp, err := c.DeletePluginVersionDocsWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeletePluginVersionDocsResponse(rsp) +} + +func (c *ClientWithResponses) DeletePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) { + rsp, err := c.DeletePluginVersionDocs(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeletePluginVersionDocsResponse(rsp) +} + +// ListPluginVersionDocsWithResponse request returning *ListPluginVersionDocsResponse +func (c *ClientWithResponses) ListPluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionDocsResponse, error) { + rsp, err := c.ListPluginVersionDocs(ctx, teamName, pluginKind, pluginName, versionName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListPluginVersionDocsResponse(rsp) +} + +// ReplacePluginVersionDocsWithBodyWithResponse request with arbitrary body returning *ReplacePluginVersionDocsResponse +func (c *ClientWithResponses) ReplacePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReplacePluginVersionDocsResponse, error) { + rsp, err := c.ReplacePluginVersionDocsWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseReplacePluginVersionDocsResponse(rsp) +} + +func (c *ClientWithResponses) ReplacePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body ReplacePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*ReplacePluginVersionDocsResponse, error) { + rsp, err := c.ReplacePluginVersionDocs(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseReplacePluginVersionDocsResponse(rsp) +} + +// CreatePluginVersionDocsWithBodyWithResponse request with arbitrary body returning *CreatePluginVersionDocsResponse +func (c *ClientWithResponses) CreatePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) { + rsp, err := c.CreatePluginVersionDocsWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreatePluginVersionDocsResponse(rsp) +} + +func (c *ClientWithResponses) CreatePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) { + rsp, err := c.CreatePluginVersionDocs(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreatePluginVersionDocsResponse(rsp) +} + +// DeletePluginVersionTablesWithBodyWithResponse request with arbitrary body returning *DeletePluginVersionTablesResponse +func (c *ClientWithResponses) DeletePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) { + rsp, err := c.DeletePluginVersionTablesWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeletePluginVersionTablesResponse(rsp) +} + +func (c *ClientWithResponses) DeletePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) { + rsp, err := c.DeletePluginVersionTables(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeletePluginVersionTablesResponse(rsp) +} + +// ListPluginVersionTablesWithResponse request returning *ListPluginVersionTablesResponse +func (c *ClientWithResponses) ListPluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams, reqEditors ...RequestEditorFn) (*ListPluginVersionTablesResponse, error) { + rsp, err := c.ListPluginVersionTables(ctx, teamName, pluginKind, pluginName, versionName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListPluginVersionTablesResponse(rsp) +} + +// CreatePluginVersionTablesWithBodyWithResponse request with arbitrary body returning *CreatePluginVersionTablesResponse +func (c *ClientWithResponses) CreatePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) { + rsp, err := c.CreatePluginVersionTablesWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreatePluginVersionTablesResponse(rsp) +} + +func (c *ClientWithResponses) CreatePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) { + rsp, err := c.CreatePluginVersionTables(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreatePluginVersionTablesResponse(rsp) +} + +// GetPluginVersionTableWithResponse request returning *GetPluginVersionTableResponse +func (c *ClientWithResponses) GetPluginVersionTableWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*GetPluginVersionTableResponse, error) { + rsp, err := c.GetPluginVersionTable(ctx, teamName, pluginKind, pluginName, versionName, tableName, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetPluginVersionTableResponse(rsp) +} + +// RemovePluginUIAssetsWithResponse request returning *RemovePluginUIAssetsResponse +func (c *ClientWithResponses) RemovePluginUIAssetsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*RemovePluginUIAssetsResponse, error) { + rsp, err := c.RemovePluginUIAssets(ctx, teamName, pluginKind, pluginName, versionName, reqEditors...) + if err != nil { + return nil, err + } + return ParseRemovePluginUIAssetsResponse(rsp) +} + +// UploadPluginUIAssetsWithBodyWithResponse request with arbitrary body returning *UploadPluginUIAssetsResponse +func (c *ClientWithResponses) UploadPluginUIAssetsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadPluginUIAssetsResponse, error) { + rsp, err := c.UploadPluginUIAssetsWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUploadPluginUIAssetsResponse(rsp) +} + +func (c *ClientWithResponses) UploadPluginUIAssetsWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body UploadPluginUIAssetsJSONRequestBody, reqEditors ...RequestEditorFn) (*UploadPluginUIAssetsResponse, error) { + rsp, err := c.UploadPluginUIAssets(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUploadPluginUIAssetsResponse(rsp) +} + +// FinalizePluginUIAssetUploadWithBodyWithResponse request with arbitrary body returning *FinalizePluginUIAssetUploadResponse +func (c *ClientWithResponses) FinalizePluginUIAssetUploadWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*FinalizePluginUIAssetUploadResponse, error) { + rsp, err := c.FinalizePluginUIAssetUploadWithBody(ctx, teamName, pluginKind, pluginName, versionName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseFinalizePluginUIAssetUploadResponse(rsp) +} + +func (c *ClientWithResponses) FinalizePluginUIAssetUploadWithResponse(ctx context.Context, teamName TeamName, pluginKind PluginKind, pluginName PluginName, versionName VersionName, body FinalizePluginUIAssetUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*FinalizePluginUIAssetUploadResponse, error) { + rsp, err := c.FinalizePluginUIAssetUpload(ctx, teamName, pluginKind, pluginName, versionName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseFinalizePluginUIAssetUploadResponse(rsp) +} + +// AuthRegistryRequestWithResponse request returning *AuthRegistryRequestResponse +func (c *ClientWithResponses) AuthRegistryRequestWithResponse(ctx context.Context, params *AuthRegistryRequestParams, reqEditors ...RequestEditorFn) (*AuthRegistryRequestResponse, error) { + rsp, err := c.AuthRegistryRequest(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseAuthRegistryRequestResponse(rsp) +} + +// ListTeamsWithResponse request returning *ListTeamsResponse +func (c *ClientWithResponses) ListTeamsWithResponse(ctx context.Context, params *ListTeamsParams, reqEditors ...RequestEditorFn) (*ListTeamsResponse, error) { + rsp, err := c.ListTeams(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListTeamsResponse(rsp) +} + +// CreateTeamWithBodyWithResponse request with arbitrary body returning *CreateTeamResponse +func (c *ClientWithResponses) CreateTeamWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error) { + rsp, err := c.CreateTeamWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateTeamResponse(rsp) +} + +func (c *ClientWithResponses) CreateTeamWithResponse(ctx context.Context, body CreateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error) { + rsp, err := c.CreateTeam(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateTeamResponse(rsp) +} + +// DeleteTeamWithResponse request returning *DeleteTeamResponse +func (c *ClientWithResponses) DeleteTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteTeamResponse, error) { + rsp, err := c.DeleteTeam(ctx, teamName, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteTeamResponse(rsp) +} + +// GetTeamByNameWithResponse request returning *GetTeamByNameResponse +func (c *ClientWithResponses) GetTeamByNameWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetTeamByNameResponse, error) { + rsp, err := c.GetTeamByName(ctx, teamName, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetTeamByNameResponse(rsp) +} + +// UpdateTeamWithBodyWithResponse request with arbitrary body returning *UpdateTeamResponse +func (c *ClientWithResponses) UpdateTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) { + rsp, err := c.UpdateTeamWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateTeamResponse(rsp) +} + +func (c *ClientWithResponses) UpdateTeamWithResponse(ctx context.Context, teamName TeamName, body UpdateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTeamResponse, error) { + rsp, err := c.UpdateTeam(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateTeamResponse(rsp) +} + +// ListAddonOrdersByTeamWithResponse request returning *ListAddonOrdersByTeamResponse +func (c *ClientWithResponses) ListAddonOrdersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListAddonOrdersByTeamParams, reqEditors ...RequestEditorFn) (*ListAddonOrdersByTeamResponse, error) { + rsp, err := c.ListAddonOrdersByTeam(ctx, teamName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListAddonOrdersByTeamResponse(rsp) +} + +// CreateAddonOrderForTeamWithBodyWithResponse request with arbitrary body returning *CreateAddonOrderForTeamResponse +func (c *ClientWithResponses) CreateAddonOrderForTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAddonOrderForTeamResponse, error) { + rsp, err := c.CreateAddonOrderForTeamWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateAddonOrderForTeamResponse(rsp) +} + +func (c *ClientWithResponses) CreateAddonOrderForTeamWithResponse(ctx context.Context, teamName TeamName, body CreateAddonOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAddonOrderForTeamResponse, error) { + rsp, err := c.CreateAddonOrderForTeam(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateAddonOrderForTeamResponse(rsp) +} + +// GetAddonOrderByTeamWithResponse request returning *GetAddonOrderByTeamResponse +func (c *ClientWithResponses) GetAddonOrderByTeamWithResponse(ctx context.Context, teamName TeamName, addonOrderID AddonOrderID, reqEditors ...RequestEditorFn) (*GetAddonOrderByTeamResponse, error) { + rsp, err := c.GetAddonOrderByTeam(ctx, teamName, addonOrderID, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetAddonOrderByTeamResponse(rsp) +} + +// DeleteAddonsByTeamWithResponse request returning *DeleteAddonsByTeamResponse +func (c *ClientWithResponses) DeleteAddonsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeleteAddonsByTeamResponse, error) { + rsp, err := c.DeleteAddonsByTeam(ctx, teamName, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteAddonsByTeamResponse(rsp) +} + +// ListAddonsByTeamWithResponse request returning *ListAddonsByTeamResponse +func (c *ClientWithResponses) ListAddonsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListAddonsByTeamParams, reqEditors ...RequestEditorFn) (*ListAddonsByTeamResponse, error) { + rsp, err := c.ListAddonsByTeam(ctx, teamName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListAddonsByTeamResponse(rsp) +} + +// DownloadAddonAssetByTeamWithResponse request returning *DownloadAddonAssetByTeamResponse +func (c *ClientWithResponses) DownloadAddonAssetByTeamWithResponse(ctx context.Context, teamName TeamName, addonTeam AddonTeam, addonType AddonType, addonName AddonName, versionName VersionName, params *DownloadAddonAssetByTeamParams, reqEditors ...RequestEditorFn) (*DownloadAddonAssetByTeamResponse, error) { + rsp, err := c.DownloadAddonAssetByTeam(ctx, teamName, addonTeam, addonType, addonName, versionName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDownloadAddonAssetByTeamResponse(rsp) +} + +// AIOnboardingChatWithBodyWithResponse request with arbitrary body returning *AIOnboardingChatResponse +func (c *ClientWithResponses) AIOnboardingChatWithBodyWithResponse(ctx context.Context, teamName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AIOnboardingChatResponse, error) { + rsp, err := c.AIOnboardingChatWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAIOnboardingChatResponse(rsp) +} + +func (c *ClientWithResponses) AIOnboardingChatWithResponse(ctx context.Context, teamName string, body AIOnboardingChatJSONRequestBody, reqEditors ...RequestEditorFn) (*AIOnboardingChatResponse, error) { + rsp, err := c.AIOnboardingChat(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAIOnboardingChatResponse(rsp) +} + +// AIOnboardingEndConversationWithResponse request returning *AIOnboardingEndConversationResponse +func (c *ClientWithResponses) AIOnboardingEndConversationWithResponse(ctx context.Context, teamName string, reqEditors ...RequestEditorFn) (*AIOnboardingEndConversationResponse, error) { + rsp, err := c.AIOnboardingEndConversation(ctx, teamName, reqEditors...) + if err != nil { + return nil, err + } + return ParseAIOnboardingEndConversationResponse(rsp) +} + +// AIOnboardingNewConversationWithBodyWithResponse request with arbitrary body returning *AIOnboardingNewConversationResponse +func (c *ClientWithResponses) AIOnboardingNewConversationWithBodyWithResponse(ctx context.Context, teamName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AIOnboardingNewConversationResponse, error) { + rsp, err := c.AIOnboardingNewConversationWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAIOnboardingNewConversationResponse(rsp) +} + +func (c *ClientWithResponses) AIOnboardingNewConversationWithResponse(ctx context.Context, teamName string, body AIOnboardingNewConversationJSONRequestBody, reqEditors ...RequestEditorFn) (*AIOnboardingNewConversationResponse, error) { + rsp, err := c.AIOnboardingNewConversation(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAIOnboardingNewConversationResponse(rsp) +} + +// ListTeamAPIKeysWithResponse request returning *ListTeamAPIKeysResponse +func (c *ClientWithResponses) ListTeamAPIKeysWithResponse(ctx context.Context, teamName TeamName, params *ListTeamAPIKeysParams, reqEditors ...RequestEditorFn) (*ListTeamAPIKeysResponse, error) { + rsp, err := c.ListTeamAPIKeys(ctx, teamName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListTeamAPIKeysResponse(rsp) +} + +// CreateTeamAPIKeyWithBodyWithResponse request with arbitrary body returning *CreateTeamAPIKeyResponse +func (c *ClientWithResponses) CreateTeamAPIKeyWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) { + rsp, err := c.CreateTeamAPIKeyWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateTeamAPIKeyResponse(rsp) +} + +func (c *ClientWithResponses) CreateTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, body CreateTeamAPIKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamAPIKeyResponse, error) { + rsp, err := c.CreateTeamAPIKey(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateTeamAPIKeyResponse(rsp) +} + +// DeleteTeamAPIKeyWithResponse request returning *DeleteTeamAPIKeyResponse +func (c *ClientWithResponses) DeleteTeamAPIKeyWithResponse(ctx context.Context, teamName TeamName, apiKeyID APIKeyID, reqEditors ...RequestEditorFn) (*DeleteTeamAPIKeyResponse, error) { + rsp, err := c.DeleteTeamAPIKey(ctx, teamName, apiKeyID, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteTeamAPIKeyResponse(rsp) +} + +// CreateTeamImagesWithBodyWithResponse request with arbitrary body returning *CreateTeamImagesResponse +func (c *ClientWithResponses) CreateTeamImagesWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamImagesResponse, error) { + rsp, err := c.CreateTeamImagesWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateTeamImagesResponse(rsp) +} + +func (c *ClientWithResponses) CreateTeamImagesWithResponse(ctx context.Context, teamName TeamName, body CreateTeamImagesJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamImagesResponse, error) { + rsp, err := c.CreateTeamImages(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateTeamImagesResponse(rsp) +} + +// DeleteTeamInvitationWithBodyWithResponse request with arbitrary body returning *DeleteTeamInvitationResponse +func (c *ClientWithResponses) DeleteTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteTeamInvitationResponse, error) { + rsp, err := c.DeleteTeamInvitationWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteTeamInvitationResponse(rsp) +} + +func (c *ClientWithResponses) DeleteTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body DeleteTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteTeamInvitationResponse, error) { + rsp, err := c.DeleteTeamInvitation(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteTeamInvitationResponse(rsp) +} + +// ListTeamInvitationsWithResponse request returning *ListTeamInvitationsResponse +func (c *ClientWithResponses) ListTeamInvitationsWithResponse(ctx context.Context, teamName TeamName, params *ListTeamInvitationsParams, reqEditors ...RequestEditorFn) (*ListTeamInvitationsResponse, error) { + rsp, err := c.ListTeamInvitations(ctx, teamName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListTeamInvitationsResponse(rsp) +} + +// EmailTeamInvitationWithBodyWithResponse request with arbitrary body returning *EmailTeamInvitationResponse +func (c *ClientWithResponses) EmailTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmailTeamInvitationResponse, error) { + rsp, err := c.EmailTeamInvitationWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseEmailTeamInvitationResponse(rsp) +} + +func (c *ClientWithResponses) EmailTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body EmailTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*EmailTeamInvitationResponse, error) { + rsp, err := c.EmailTeamInvitation(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseEmailTeamInvitationResponse(rsp) +} + +// AcceptTeamInvitationWithBodyWithResponse request with arbitrary body returning *AcceptTeamInvitationResponse +func (c *ClientWithResponses) AcceptTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) { + rsp, err := c.AcceptTeamInvitationWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAcceptTeamInvitationResponse(rsp) +} + +func (c *ClientWithResponses) AcceptTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body AcceptTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) { + rsp, err := c.AcceptTeamInvitation(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseAcceptTeamInvitationResponse(rsp) +} + +// CancelTeamInvitationWithResponse request returning *CancelTeamInvitationResponse +func (c *ClientWithResponses) CancelTeamInvitationWithResponse(ctx context.Context, teamName TeamName, email EmailBasic, reqEditors ...RequestEditorFn) (*CancelTeamInvitationResponse, error) { + rsp, err := c.CancelTeamInvitation(ctx, teamName, email, reqEditors...) + if err != nil { + return nil, err + } + return ParseCancelTeamInvitationResponse(rsp) +} + +// ListInvoicesByTeamWithResponse request returning *ListInvoicesByTeamResponse +func (c *ClientWithResponses) ListInvoicesByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListInvoicesByTeamParams, reqEditors ...RequestEditorFn) (*ListInvoicesByTeamResponse, error) { + rsp, err := c.ListInvoicesByTeam(ctx, teamName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListInvoicesByTeamResponse(rsp) +} + +// GetManagedDatabasesWithResponse request returning *GetManagedDatabasesResponse +func (c *ClientWithResponses) GetManagedDatabasesWithResponse(ctx context.Context, teamName TeamName, params *GetManagedDatabasesParams, reqEditors ...RequestEditorFn) (*GetManagedDatabasesResponse, error) { + rsp, err := c.GetManagedDatabases(ctx, teamName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetManagedDatabasesResponse(rsp) +} + +// CreateManagedDatabaseWithBodyWithResponse request with arbitrary body returning *CreateManagedDatabaseResponse +func (c *ClientWithResponses) CreateManagedDatabaseWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateManagedDatabaseResponse, error) { + rsp, err := c.CreateManagedDatabaseWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateManagedDatabaseResponse(rsp) +} + +func (c *ClientWithResponses) CreateManagedDatabaseWithResponse(ctx context.Context, teamName TeamName, body CreateManagedDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateManagedDatabaseResponse, error) { + rsp, err := c.CreateManagedDatabase(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateManagedDatabaseResponse(rsp) +} + +// DeleteManagedDatabaseWithResponse request returning *DeleteManagedDatabaseResponse +func (c *ClientWithResponses) DeleteManagedDatabaseWithResponse(ctx context.Context, teamName TeamName, managedDatabaseID ManagedDatabaseID, reqEditors ...RequestEditorFn) (*DeleteManagedDatabaseResponse, error) { + rsp, err := c.DeleteManagedDatabase(ctx, teamName, managedDatabaseID, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteManagedDatabaseResponse(rsp) +} + +// GetManagedDatabaseWithResponse request returning *GetManagedDatabaseResponse +func (c *ClientWithResponses) GetManagedDatabaseWithResponse(ctx context.Context, teamName TeamName, managedDatabaseID ManagedDatabaseID, reqEditors ...RequestEditorFn) (*GetManagedDatabaseResponse, error) { + rsp, err := c.GetManagedDatabase(ctx, teamName, managedDatabaseID, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetManagedDatabaseResponse(rsp) +} + +// RemoveTeamMembershipWithBodyWithResponse request with arbitrary body returning *RemoveTeamMembershipResponse +func (c *ClientWithResponses) RemoveTeamMembershipWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RemoveTeamMembershipResponse, error) { + rsp, err := c.RemoveTeamMembershipWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseRemoveTeamMembershipResponse(rsp) +} + +func (c *ClientWithResponses) RemoveTeamMembershipWithResponse(ctx context.Context, teamName TeamName, body RemoveTeamMembershipJSONRequestBody, reqEditors ...RequestEditorFn) (*RemoveTeamMembershipResponse, error) { + rsp, err := c.RemoveTeamMembership(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseRemoveTeamMembershipResponse(rsp) +} + +// GetTeamMembershipsWithResponse request returning *GetTeamMembershipsResponse +func (c *ClientWithResponses) GetTeamMembershipsWithResponse(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*GetTeamMembershipsResponse, error) { + rsp, err := c.GetTeamMemberships(ctx, teamName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetTeamMembershipsResponse(rsp) +} + +// DeleteTeamMembershipWithResponse request returning *DeleteTeamMembershipResponse +func (c *ClientWithResponses) DeleteTeamMembershipWithResponse(ctx context.Context, teamName TeamName, email EmailBasic, reqEditors ...RequestEditorFn) (*DeleteTeamMembershipResponse, error) { + rsp, err := c.DeleteTeamMembership(ctx, teamName, email, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteTeamMembershipResponse(rsp) +} + +// DeletePluginsByTeamWithResponse request returning *DeletePluginsByTeamResponse +func (c *ClientWithResponses) DeletePluginsByTeamWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*DeletePluginsByTeamResponse, error) { + rsp, err := c.DeletePluginsByTeam(ctx, teamName, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeletePluginsByTeamResponse(rsp) +} + +// ListPluginsByTeamWithResponse request returning *ListPluginsByTeamResponse +func (c *ClientWithResponses) ListPluginsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListPluginsByTeamParams, reqEditors ...RequestEditorFn) (*ListPluginsByTeamResponse, error) { + rsp, err := c.ListPluginsByTeam(ctx, teamName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListPluginsByTeamResponse(rsp) +} + +// DownloadPluginAssetByTeamWithResponse request returning *DownloadPluginAssetByTeamResponse +func (c *ClientWithResponses) DownloadPluginAssetByTeamWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, versionName VersionName, targetName TargetName, params *DownloadPluginAssetByTeamParams, reqEditors ...RequestEditorFn) (*DownloadPluginAssetByTeamResponse, error) { + rsp, err := c.DownloadPluginAssetByTeam(ctx, teamName, pluginTeam, pluginKind, pluginName, versionName, targetName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDownloadPluginAssetByTeamResponse(rsp) +} + +// GetSettingsWithResponse request returning *GetSettingsResponse +func (c *ClientWithResponses) GetSettingsWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetSettingsResponse, error) { + rsp, err := c.GetSettings(ctx, teamName, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetSettingsResponse(rsp) +} + +// UpdateSettingsWithBodyWithResponse request with arbitrary body returning *UpdateSettingsResponse +func (c *ClientWithResponses) UpdateSettingsWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSettingsResponse, error) { + rsp, err := c.UpdateSettingsWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateSettingsResponse(rsp) +} + +func (c *ClientWithResponses) UpdateSettingsWithResponse(ctx context.Context, teamName TeamName, body UpdateSettingsJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSettingsResponse, error) { + rsp, err := c.UpdateSettings(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateSettingsResponse(rsp) +} + +// ListSubscriptionOrdersByTeamWithResponse request returning *ListSubscriptionOrdersByTeamResponse +func (c *ClientWithResponses) ListSubscriptionOrdersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListSubscriptionOrdersByTeamParams, reqEditors ...RequestEditorFn) (*ListSubscriptionOrdersByTeamResponse, error) { + rsp, err := c.ListSubscriptionOrdersByTeam(ctx, teamName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListSubscriptionOrdersByTeamResponse(rsp) +} + +// CreateSubscriptionOrderForTeamWithBodyWithResponse request with arbitrary body returning *CreateSubscriptionOrderForTeamResponse +func (c *ClientWithResponses) CreateSubscriptionOrderForTeamWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSubscriptionOrderForTeamResponse, error) { + rsp, err := c.CreateSubscriptionOrderForTeamWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateSubscriptionOrderForTeamResponse(rsp) +} + +func (c *ClientWithResponses) CreateSubscriptionOrderForTeamWithResponse(ctx context.Context, teamName TeamName, body CreateSubscriptionOrderForTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSubscriptionOrderForTeamResponse, error) { + rsp, err := c.CreateSubscriptionOrderForTeam(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateSubscriptionOrderForTeamResponse(rsp) +} + +// GetSubscriptionOrderByTeamWithResponse request returning *GetSubscriptionOrderByTeamResponse +func (c *ClientWithResponses) GetSubscriptionOrderByTeamWithResponse(ctx context.Context, teamName TeamName, teamSubscriptionOrderID TeamSubscriptionOrderID, reqEditors ...RequestEditorFn) (*GetSubscriptionOrderByTeamResponse, error) { + rsp, err := c.GetSubscriptionOrderByTeam(ctx, teamName, teamSubscriptionOrderID, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetSubscriptionOrderByTeamResponse(rsp) +} + +// ListTeamPluginUsageWithResponse request returning *ListTeamPluginUsageResponse +func (c *ClientWithResponses) ListTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, params *ListTeamPluginUsageParams, reqEditors ...RequestEditorFn) (*ListTeamPluginUsageResponse, error) { + rsp, err := c.ListTeamPluginUsage(ctx, teamName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListTeamPluginUsageResponse(rsp) +} + +// IncreaseTeamPluginUsageWithBodyWithResponse request with arbitrary body returning *IncreaseTeamPluginUsageResponse +func (c *ClientWithResponses) IncreaseTeamPluginUsageWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) { + rsp, err := c.IncreaseTeamPluginUsageWithBody(ctx, teamName, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseIncreaseTeamPluginUsageResponse(rsp) +} + +func (c *ClientWithResponses) IncreaseTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, body IncreaseTeamPluginUsageJSONRequestBody, reqEditors ...RequestEditorFn) (*IncreaseTeamPluginUsageResponse, error) { + rsp, err := c.IncreaseTeamPluginUsage(ctx, teamName, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseIncreaseTeamPluginUsageResponse(rsp) +} + +// GetTeamUsageSummaryWithResponse request returning *GetTeamUsageSummaryResponse +func (c *ClientWithResponses) GetTeamUsageSummaryWithResponse(ctx context.Context, teamName TeamName, params *GetTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*GetTeamUsageSummaryResponse, error) { + rsp, err := c.GetTeamUsageSummary(ctx, teamName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetTeamUsageSummaryResponse(rsp) +} + +// GetGroupedTeamUsageSummaryWithResponse request returning *GetGroupedTeamUsageSummaryResponse +func (c *ClientWithResponses) GetGroupedTeamUsageSummaryWithResponse(ctx context.Context, teamName TeamName, groupBy GetGroupedTeamUsageSummaryParamsGroupBy, params *GetGroupedTeamUsageSummaryParams, reqEditors ...RequestEditorFn) (*GetGroupedTeamUsageSummaryResponse, error) { + rsp, err := c.GetGroupedTeamUsageSummary(ctx, teamName, groupBy, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetGroupedTeamUsageSummaryResponse(rsp) +} + +// GetTeamPluginUsageWithResponse request returning *GetTeamPluginUsageResponse +func (c *ClientWithResponses) GetTeamPluginUsageWithResponse(ctx context.Context, teamName TeamName, pluginTeam PluginTeam, pluginKind PluginKind, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetTeamPluginUsageResponse, error) { + rsp, err := c.GetTeamPluginUsage(ctx, teamName, pluginTeam, pluginKind, pluginName, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetTeamPluginUsageResponse(rsp) +} + +// ListUsersByTeamWithResponse request returning *ListUsersByTeamResponse +func (c *ClientWithResponses) ListUsersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListUsersByTeamParams, reqEditors ...RequestEditorFn) (*ListUsersByTeamResponse, error) { + rsp, err := c.ListUsersByTeam(ctx, teamName, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListUsersByTeamResponse(rsp) +} + +// UploadImageWithBodyWithResponse request with arbitrary body returning *UploadImageResponse +func (c *ClientWithResponses) UploadImageWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadImageResponse, error) { + rsp, err := c.UploadImageWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUploadImageResponse(rsp) +} + +func (c *ClientWithResponses) UploadImageWithResponse(ctx context.Context, body UploadImageJSONRequestBody, reqEditors ...RequestEditorFn) (*UploadImageResponse, error) { + rsp, err := c.UploadImage(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUploadImageResponse(rsp) +} + +// GetCurrentUserWithResponse request returning *GetCurrentUserResponse +func (c *ClientWithResponses) GetCurrentUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentUserResponse, error) { + rsp, err := c.GetCurrentUser(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetCurrentUserResponse(rsp) +} + +// UpdateCurrentUserWithBodyWithResponse request with arbitrary body returning *UpdateCurrentUserResponse +func (c *ClientWithResponses) UpdateCurrentUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) { + rsp, err := c.UpdateCurrentUserWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateCurrentUserResponse(rsp) +} + +func (c *ClientWithResponses) UpdateCurrentUserWithResponse(ctx context.Context, body UpdateCurrentUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCurrentUserResponse, error) { + rsp, err := c.UpdateCurrentUser(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateCurrentUserResponse(rsp) +} + +// SendAnonymousEventWithBodyWithResponse request with arbitrary body returning *SendAnonymousEventResponse +func (c *ClientWithResponses) SendAnonymousEventWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendAnonymousEventResponse, error) { + rsp, err := c.SendAnonymousEventWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSendAnonymousEventResponse(rsp) +} + +func (c *ClientWithResponses) SendAnonymousEventWithResponse(ctx context.Context, body SendAnonymousEventJSONRequestBody, reqEditors ...RequestEditorFn) (*SendAnonymousEventResponse, error) { + rsp, err := c.SendAnonymousEvent(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSendAnonymousEventResponse(rsp) +} + +// CheckUserAuthStatusWithResponse request returning *CheckUserAuthStatusResponse +func (c *ClientWithResponses) CheckUserAuthStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CheckUserAuthStatusResponse, error) { + rsp, err := c.CheckUserAuthStatus(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseCheckUserAuthStatusResponse(rsp) +} + +// UpdateCustomerWithBodyWithResponse request with arbitrary body returning *UpdateCustomerResponse +func (c *ClientWithResponses) UpdateCustomerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCustomerResponse, error) { + rsp, err := c.UpdateCustomerWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateCustomerResponse(rsp) +} + +func (c *ClientWithResponses) UpdateCustomerWithResponse(ctx context.Context, body UpdateCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCustomerResponse, error) { + rsp, err := c.UpdateCustomer(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateCustomerResponse(rsp) +} + +// SendUserEventWithBodyWithResponse request with arbitrary body returning *SendUserEventResponse +func (c *ClientWithResponses) SendUserEventWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendUserEventResponse, error) { + rsp, err := c.SendUserEventWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSendUserEventResponse(rsp) +} + +func (c *ClientWithResponses) SendUserEventWithResponse(ctx context.Context, body SendUserEventJSONRequestBody, reqEditors ...RequestEditorFn) (*SendUserEventResponse, error) { + rsp, err := c.SendUserEvent(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSendUserEventResponse(rsp) +} + +// ListCurrentUserInvitationsWithResponse request returning *ListCurrentUserInvitationsResponse +func (c *ClientWithResponses) ListCurrentUserInvitationsWithResponse(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*ListCurrentUserInvitationsResponse, error) { + rsp, err := c.ListCurrentUserInvitations(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListCurrentUserInvitationsResponse(rsp) +} + +// LogoutUserWithResponse request returning *LogoutUserResponse +func (c *ClientWithResponses) LogoutUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*LogoutUserResponse, error) { + rsp, err := c.LogoutUser(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseLogoutUserResponse(rsp) +} + +// LoginUserWithBodyWithResponse request with arbitrary body returning *LoginUserResponse +func (c *ClientWithResponses) LoginUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LoginUserResponse, error) { + rsp, err := c.LoginUserWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseLoginUserResponse(rsp) +} + +func (c *ClientWithResponses) LoginUserWithResponse(ctx context.Context, body LoginUserJSONRequestBody, reqEditors ...RequestEditorFn) (*LoginUserResponse, error) { + rsp, err := c.LoginUser(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseLoginUserResponse(rsp) +} + +// GetCurrentUserMembershipsWithResponse request returning *GetCurrentUserMembershipsResponse +func (c *ClientWithResponses) GetCurrentUserMembershipsWithResponse(ctx context.Context, params *GetCurrentUserMembershipsParams, reqEditors ...RequestEditorFn) (*GetCurrentUserMembershipsResponse, error) { + rsp, err := c.GetCurrentUserMemberships(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetCurrentUserMembershipsResponse(rsp) +} + +// RegisterUserWithBodyWithResponse request with arbitrary body returning *RegisterUserResponse +func (c *ClientWithResponses) RegisterUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RegisterUserResponse, error) { + rsp, err := c.RegisterUserWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseRegisterUserResponse(rsp) +} + +func (c *ClientWithResponses) RegisterUserWithResponse(ctx context.Context, body RegisterUserJSONRequestBody, reqEditors ...RequestEditorFn) (*RegisterUserResponse, error) { + rsp, err := c.RegisterUser(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseRegisterUserResponse(rsp) +} + +// ResetUserPasswordWithBodyWithResponse request with arbitrary body returning *ResetUserPasswordResponse +func (c *ClientWithResponses) ResetUserPasswordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ResetUserPasswordResponse, error) { + rsp, err := c.ResetUserPasswordWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseResetUserPasswordResponse(rsp) +} + +func (c *ClientWithResponses) ResetUserPasswordWithResponse(ctx context.Context, body ResetUserPasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*ResetUserPasswordResponse, error) { + rsp, err := c.ResetUserPassword(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseResetUserPasswordResponse(rsp) +} + +// DeterminePlatformTenantByEmailWithResponse request returning *DeterminePlatformTenantByEmailResponse +func (c *ClientWithResponses) DeterminePlatformTenantByEmailWithResponse(ctx context.Context, params *DeterminePlatformTenantByEmailParams, reqEditors ...RequestEditorFn) (*DeterminePlatformTenantByEmailResponse, error) { + rsp, err := c.DeterminePlatformTenantByEmail(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeterminePlatformTenantByEmailResponse(rsp) +} + +// CreateUserTokenWithResponse request returning *CreateUserTokenResponse +func (c *ClientWithResponses) CreateUserTokenWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*CreateUserTokenResponse, error) { + rsp, err := c.CreateUserToken(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateUserTokenResponse(rsp) +} + +// UserTOTPDeleteWithResponse request returning *UserTOTPDeleteResponse +func (c *ClientWithResponses) UserTOTPDeleteWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UserTOTPDeleteResponse, error) { + rsp, err := c.UserTOTPDelete(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseUserTOTPDeleteResponse(rsp) +} + +// UserTOTPSetupWithResponse request returning *UserTOTPSetupResponse +func (c *ClientWithResponses) UserTOTPSetupWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UserTOTPSetupResponse, error) { + rsp, err := c.UserTOTPSetup(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseUserTOTPSetupResponse(rsp) +} + +// UserTOTPVerifyWithBodyWithResponse request with arbitrary body returning *UserTOTPVerifyResponse +func (c *ClientWithResponses) UserTOTPVerifyWithBodyWithResponse(ctx context.Context, params *UserTOTPVerifyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UserTOTPVerifyResponse, error) { + rsp, err := c.UserTOTPVerifyWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUserTOTPVerifyResponse(rsp) +} + +func (c *ClientWithResponses) UserTOTPVerifyWithResponse(ctx context.Context, params *UserTOTPVerifyParams, body UserTOTPVerifyJSONRequestBody, reqEditors ...RequestEditorFn) (*UserTOTPVerifyResponse, error) { + rsp, err := c.UserTOTPVerify(ctx, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUserTOTPVerifyResponse(rsp) +} + +// VerifyUserEmailWithBodyWithResponse request with arbitrary body returning *VerifyUserEmailResponse +func (c *ClientWithResponses) VerifyUserEmailWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*VerifyUserEmailResponse, error) { + rsp, err := c.VerifyUserEmailWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseVerifyUserEmailResponse(rsp) +} + +func (c *ClientWithResponses) VerifyUserEmailWithResponse(ctx context.Context, body VerifyUserEmailJSONRequestBody, reqEditors ...RequestEditorFn) (*VerifyUserEmailResponse, error) { + rsp, err := c.VerifyUserEmail(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseVerifyUserEmailResponse(rsp) +} + +// DeleteUserWithResponse request returning *DeleteUserResponse +func (c *ClientWithResponses) DeleteUserWithResponse(ctx context.Context, userID UserID, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error) { + rsp, err := c.DeleteUser(ctx, userID, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteUserResponse(rsp) +} + +// ParseHealthCheckResponse parses an HTTP response from a HealthCheckWithResponse call +func ParseHealthCheckResponse(rsp *http.Response) (*HealthCheckResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &HealthCheckResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseListAddonsResponse parses an HTTP response from a ListAddonsWithResponse call +func ParseListAddonsResponse(rsp *http.Response) (*ListAddonsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListAddonsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListAddons200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseCreateAddonResponse parses an HTTP response from a CreateAddonWithResponse call +func ParseCreateAddonResponse(rsp *http.Response) (*CreateAddonResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateAddonResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest Addon + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeleteAddonByTeamAndNameResponse parses an HTTP response from a DeleteAddonByTeamAndNameWithResponse call +func ParseDeleteAddonByTeamAndNameResponse(rsp *http.Response) (*DeleteAddonByTeamAndNameResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteAddonByTeamAndNameResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetAddonResponse parses an HTTP response from a GetAddonWithResponse call +func ParseGetAddonResponse(rsp *http.Response) (*GetAddonResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetAddonResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListAddon + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseUpdateAddonResponse parses an HTTP response from a UpdateAddonWithResponse call +func ParseUpdateAddonResponse(rsp *http.Response) (*UpdateAddonResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateAddonResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Addon + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseListAddonVersionsResponse parses an HTTP response from a ListAddonVersionsWithResponse call +func ParseListAddonVersionsResponse(rsp *http.Response) (*ListAddonVersionsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListAddonVersionsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListAddonVersions200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetAddonVersionResponse parses an HTTP response from a GetAddonVersionWithResponse call +func ParseGetAddonVersionResponse(rsp *http.Response) (*GetAddonVersionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetAddonVersionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AddonVersion + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseUpdateAddonVersionResponse parses an HTTP response from a UpdateAddonVersionWithResponse call +func ParseUpdateAddonVersionResponse(rsp *http.Response) (*UpdateAddonVersionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateAddonVersionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AddonVersion + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseCreateAddonVersionResponse parses an HTTP response from a CreateAddonVersionWithResponse call +func ParseCreateAddonVersionResponse(rsp *http.Response) (*CreateAddonVersionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateAddonVersionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AddonVersion + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest AddonVersion + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDownloadAddonAssetResponse parses an HTTP response from a DownloadAddonAssetWithResponse call +func ParseDownloadAddonAssetResponse(rsp *http.Response) (*DownloadAddonAssetResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DownloadAddonAssetResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AddonAsset + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseUploadAddonAssetResponse parses an HTTP response from a UploadAddonAssetWithResponse call +func ParseUploadAddonAssetResponse(rsp *http.Response) (*UploadAddonAssetResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UploadAddonAssetResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest ReleaseURL + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseCQHealthCheckResponse parses an HTTP response from a CQHealthCheckWithResponse call +func ParseCQHealthCheckResponse(rsp *http.Response) (*CQHealthCheckResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CQHealthCheckResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetOpenAPIJSONResponse parses an HTTP response from a GetOpenAPIJSONWithResponse call +func ParseGetOpenAPIJSONResponse(rsp *http.Response) (*GetOpenAPIJSONResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOpenAPIJSONResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest map[string]interface{} + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseActivatePlatformResponse parses an HTTP response from a ActivatePlatformWithResponse call +func ParseActivatePlatformResponse(rsp *http.Response) (*ActivatePlatformResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ActivatePlatformResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ActivatePlatform200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 205: + var dest ActivatePlatform205Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON205 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseRenewPlatformActivationResponse parses an HTTP response from a RenewPlatformActivationWithResponse call +func ParseRenewPlatformActivationResponse(rsp *http.Response) (*RenewPlatformActivationResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &RenewPlatformActivationResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest RenewPlatformActivation200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 205: + var dest ActivatePlatform205Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON205 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseReportPlatformDataResponse parses an HTTP response from a ReportPlatformDataWithResponse call +func ParseReportPlatformDataResponse(rsp *http.Response) (*ReportPlatformDataResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ReportPlatformDataResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseReportTenantPlatformDataResponse parses an HTTP response from a ReportTenantPlatformDataWithResponse call +func ParseReportTenantPlatformDataResponse(rsp *http.Response) (*ReportTenantPlatformDataResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ReportTenantPlatformDataResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseListPluginNotificationRequestsResponse parses an HTTP response from a ListPluginNotificationRequestsWithResponse call +func ParseListPluginNotificationRequestsResponse(rsp *http.Response) (*ListPluginNotificationRequestsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListPluginNotificationRequestsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListPluginNotificationRequests200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseCreatePluginNotificationRequestResponse parses an HTTP response from a CreatePluginNotificationRequestWithResponse call +func ParseCreatePluginNotificationRequestResponse(rsp *http.Response) (*CreatePluginNotificationRequestResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreatePluginNotificationRequestResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest PluginNotificationRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeletePluginNotificationRequestResponse parses an HTTP response from a DeletePluginNotificationRequestWithResponse call +func ParseDeletePluginNotificationRequestResponse(rsp *http.Response) (*DeletePluginNotificationRequestResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeletePluginNotificationRequestResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetPluginNotificationRequestResponse parses an HTTP response from a GetPluginNotificationRequestWithResponse call +func ParseGetPluginNotificationRequestResponse(rsp *http.Response) (*GetPluginNotificationRequestResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetPluginNotificationRequestResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListPluginNotificationRequests200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseListPluginsResponse parses an HTTP response from a ListPluginsWithResponse call +func ParseListPluginsResponse(rsp *http.Response) (*ListPluginsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListPluginsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListPlugins200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseCreatePluginResponse parses an HTTP response from a CreatePluginWithResponse call +func ParseCreatePluginResponse(rsp *http.Response) (*CreatePluginResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreatePluginResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest Plugin + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeletePluginByTeamAndPluginNameResponse parses an HTTP response from a DeletePluginByTeamAndPluginNameWithResponse call +func ParseDeletePluginByTeamAndPluginNameResponse(rsp *http.Response) (*DeletePluginByTeamAndPluginNameResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeletePluginByTeamAndPluginNameResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetPluginResponse parses an HTTP response from a GetPluginWithResponse call +func ParseGetPluginResponse(rsp *http.Response) (*GetPluginResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetPluginResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListPlugin + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseUpdatePluginResponse parses an HTTP response from a UpdatePluginWithResponse call +func ParseUpdatePluginResponse(rsp *http.Response) (*UpdatePluginResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdatePluginResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Plugin + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeletePluginUpcomingPriceChangesResponse parses an HTTP response from a DeletePluginUpcomingPriceChangesWithResponse call +func ParseDeletePluginUpcomingPriceChangesResponse(rsp *http.Response) (*DeletePluginUpcomingPriceChangesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeletePluginUpcomingPriceChangesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseListPluginUpcomingPriceChangesResponse parses an HTTP response from a ListPluginUpcomingPriceChangesWithResponse call +func ParseListPluginUpcomingPriceChangesResponse(rsp *http.Response) (*ListPluginUpcomingPriceChangesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListPluginUpcomingPriceChangesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListPluginUpcomingPriceChanges200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseCreatePluginUpcomingPriceChangeResponse parses an HTTP response from a CreatePluginUpcomingPriceChangeWithResponse call +func ParseCreatePluginUpcomingPriceChangeResponse(rsp *http.Response) (*CreatePluginUpcomingPriceChangeResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreatePluginUpcomingPriceChangeResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest PluginPrice + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseListPluginVersionsResponse parses an HTTP response from a ListPluginVersionsWithResponse call +func ParseListPluginVersionsResponse(rsp *http.Response) (*ListPluginVersionsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListPluginVersionsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListPluginVersions200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetPluginVersionResponse parses an HTTP response from a GetPluginVersionWithResponse call +func ParseGetPluginVersionResponse(rsp *http.Response) (*GetPluginVersionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetPluginVersionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest PluginVersionDetails + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseUpdatePluginVersionResponse parses an HTTP response from a UpdatePluginVersionWithResponse call +func ParseUpdatePluginVersionResponse(rsp *http.Response) (*UpdatePluginVersionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdatePluginVersionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest PluginVersion + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseCreatePluginVersionResponse parses an HTTP response from a CreatePluginVersionWithResponse call +func ParseCreatePluginVersionResponse(rsp *http.Response) (*CreatePluginVersionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreatePluginVersionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest PluginVersion + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest PluginVersion + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDownloadPluginAssetResponse parses an HTTP response from a DownloadPluginAssetWithResponse call +func ParseDownloadPluginAssetResponse(rsp *http.Response) (*DownloadPluginAssetResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DownloadPluginAssetResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest PluginAsset + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseUploadPluginAssetResponse parses an HTTP response from a UploadPluginAssetWithResponse call +func ParseUploadPluginAssetResponse(rsp *http.Response) (*UploadPluginAssetResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UploadPluginAssetResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest ReleaseURL + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeletePluginVersionDocsResponse parses an HTTP response from a DeletePluginVersionDocsWithResponse call +func ParseDeletePluginVersionDocsResponse(rsp *http.Response) (*DeletePluginVersionDocsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeletePluginVersionDocsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseListPluginVersionDocsResponse parses an HTTP response from a ListPluginVersionDocsWithResponse call +func ParseListPluginVersionDocsResponse(rsp *http.Response) (*ListPluginVersionDocsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListPluginVersionDocsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListPluginVersionDocs200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseReplacePluginVersionDocsResponse parses an HTTP response from a ReplacePluginVersionDocsWithResponse call +func ParseReplacePluginVersionDocsResponse(rsp *http.Response) (*ReplacePluginVersionDocsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ReplacePluginVersionDocsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest CreatePluginVersionDocs201Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseCreatePluginVersionDocsResponse parses an HTTP response from a CreatePluginVersionDocsWithResponse call +func ParseCreatePluginVersionDocsResponse(rsp *http.Response) (*CreatePluginVersionDocsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreatePluginVersionDocsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest CreatePluginVersionDocs201Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeletePluginVersionTablesResponse parses an HTTP response from a DeletePluginVersionTablesWithResponse call +func ParseDeletePluginVersionTablesResponse(rsp *http.Response) (*DeletePluginVersionTablesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeletePluginVersionTablesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseListPluginVersionTablesResponse parses an HTTP response from a ListPluginVersionTablesWithResponse call +func ParseListPluginVersionTablesResponse(rsp *http.Response) (*ListPluginVersionTablesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListPluginVersionTablesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListPluginVersionTables200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseCreatePluginVersionTablesResponse parses an HTTP response from a CreatePluginVersionTablesWithResponse call +func ParseCreatePluginVersionTablesResponse(rsp *http.Response) (*CreatePluginVersionTablesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreatePluginVersionTablesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest CreatePluginVersionTables201Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetPluginVersionTableResponse parses an HTTP response from a GetPluginVersionTableWithResponse call +func ParseGetPluginVersionTableResponse(rsp *http.Response) (*GetPluginVersionTableResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetPluginVersionTableResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest PluginTableDetails + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseRemovePluginUIAssetsResponse parses an HTTP response from a RemovePluginUIAssetsWithResponse call +func ParseRemovePluginUIAssetsResponse(rsp *http.Response) (*RemovePluginUIAssetsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &RemovePluginUIAssetsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseUploadPluginUIAssetsResponse parses an HTTP response from a UploadPluginUIAssetsWithResponse call +func ParseUploadPluginUIAssetsResponse(rsp *http.Response) (*UploadPluginUIAssetsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UploadPluginUIAssetsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest UploadPluginUIAssets201Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseFinalizePluginUIAssetUploadResponse parses an HTTP response from a FinalizePluginUIAssetUploadWithResponse call +func ParseFinalizePluginUIAssetUploadResponse(rsp *http.Response) (*FinalizePluginUIAssetUploadResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &FinalizePluginUIAssetUploadResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseAuthRegistryRequestResponse parses an HTTP response from a AuthRegistryRequestWithResponse call +func ParseAuthRegistryRequestResponse(rsp *http.Response) (*AuthRegistryRequestResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &AuthRegistryRequestResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest RegistryAuthToken + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest DockerError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest DockerError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest DockerError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest DockerError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest DockerError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseListTeamsResponse parses an HTTP response from a ListTeamsWithResponse call +func ParseListTeamsResponse(rsp *http.Response) (*ListTeamsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListTeamsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListTeams200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseCreateTeamResponse parses an HTTP response from a CreateTeamWithResponse call +func ParseCreateTeamResponse(rsp *http.Response) (*CreateTeamResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateTeamResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest Team + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeleteTeamResponse parses an HTTP response from a DeleteTeamWithResponse call +func ParseDeleteTeamResponse(rsp *http.Response) (*DeleteTeamResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteTeamResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetTeamByNameResponse parses an HTTP response from a GetTeamByNameWithResponse call +func ParseGetTeamByNameResponse(rsp *http.Response) (*GetTeamByNameResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetTeamByNameResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Team + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseUpdateTeamResponse parses an HTTP response from a UpdateTeamWithResponse call +func ParseUpdateTeamResponse(rsp *http.Response) (*UpdateTeamResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateTeamResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Team + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseListAddonOrdersByTeamResponse parses an HTTP response from a ListAddonOrdersByTeamWithResponse call +func ParseListAddonOrdersByTeamResponse(rsp *http.Response) (*ListAddonOrdersByTeamResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListAddonOrdersByTeamResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListAddonOrdersByTeam200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseCreateAddonOrderForTeamResponse parses an HTTP response from a CreateAddonOrderForTeamWithResponse call +func ParseCreateAddonOrderForTeamResponse(rsp *http.Response) (*CreateAddonOrderForTeamResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateAddonOrderForTeamResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest AddonOrder + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetAddonOrderByTeamResponse parses an HTTP response from a GetAddonOrderByTeamWithResponse call +func ParseGetAddonOrderByTeamResponse(rsp *http.Response) (*GetAddonOrderByTeamResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetAddonOrderByTeamResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AddonOrder + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeleteAddonsByTeamResponse parses an HTTP response from a DeleteAddonsByTeamWithResponse call +func ParseDeleteAddonsByTeamResponse(rsp *http.Response) (*DeleteAddonsByTeamResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteAddonsByTeamResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseListAddonsByTeamResponse parses an HTTP response from a ListAddonsByTeamWithResponse call +func ParseListAddonsByTeamResponse(rsp *http.Response) (*ListAddonsByTeamResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListAddonsByTeamResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListAddonsByTeam200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDownloadAddonAssetByTeamResponse parses an HTTP response from a DownloadAddonAssetByTeamWithResponse call +func ParseDownloadAddonAssetByTeamResponse(rsp *http.Response) (*DownloadAddonAssetByTeamResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DownloadAddonAssetByTeamResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AddonAsset + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseAIOnboardingChatResponse parses an HTTP response from a AIOnboardingChatWithResponse call +func ParseAIOnboardingChatResponse(rsp *http.Response) (*AIOnboardingChatResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &AIOnboardingChatResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AIOnboardingChat200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 405: + var dest MethodNotAllowed + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON405 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseAIOnboardingEndConversationResponse parses an HTTP response from a AIOnboardingEndConversationWithResponse call +func ParseAIOnboardingEndConversationResponse(rsp *http.Response) (*AIOnboardingEndConversationResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &AIOnboardingEndConversationResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AIOnboardingEndConversation200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 405: + var dest MethodNotAllowed + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON405 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseAIOnboardingNewConversationResponse parses an HTTP response from a AIOnboardingNewConversationWithResponse call +func ParseAIOnboardingNewConversationResponse(rsp *http.Response) (*AIOnboardingNewConversationResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &AIOnboardingNewConversationResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AIOnboardingNewConversation200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 405: + var dest MethodNotAllowed + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON405 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseListTeamAPIKeysResponse parses an HTTP response from a ListTeamAPIKeysWithResponse call +func ParseListTeamAPIKeysResponse(rsp *http.Response) (*ListTeamAPIKeysResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListTeamAPIKeysResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListTeamAPIKeys200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseCreateTeamAPIKeyResponse parses an HTTP response from a CreateTeamAPIKeyWithResponse call +func ParseCreateTeamAPIKeyResponse(rsp *http.Response) (*CreateTeamAPIKeyResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateTeamAPIKeyResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest APIKey + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeleteTeamAPIKeyResponse parses an HTTP response from a DeleteTeamAPIKeyWithResponse call +func ParseDeleteTeamAPIKeyResponse(rsp *http.Response) (*DeleteTeamAPIKeyResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteTeamAPIKeyResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseCreateTeamImagesResponse parses an HTTP response from a CreateTeamImagesWithResponse call +func ParseCreateTeamImagesResponse(rsp *http.Response) (*CreateTeamImagesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateTeamImagesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest CreateTeamImages201Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeleteTeamInvitationResponse parses an HTTP response from a DeleteTeamInvitationWithResponse call +func ParseDeleteTeamInvitationResponse(rsp *http.Response) (*DeleteTeamInvitationResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteTeamInvitationResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseListTeamInvitationsResponse parses an HTTP response from a ListTeamInvitationsWithResponse call +func ParseListTeamInvitationsResponse(rsp *http.Response) (*ListTeamInvitationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListTeamInvitationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListTeamInvitations200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseEmailTeamInvitationResponse parses an HTTP response from a EmailTeamInvitationWithResponse call +func ParseEmailTeamInvitationResponse(rsp *http.Response) (*EmailTeamInvitationResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &EmailTeamInvitationResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Invitation + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 202: + var dest Invitation + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON202 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseAcceptTeamInvitationResponse parses an HTTP response from a AcceptTeamInvitationWithResponse call +func ParseAcceptTeamInvitationResponse(rsp *http.Response) (*AcceptTeamInvitationResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &AcceptTeamInvitationResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest MembershipWithTeam + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 303: + var dest MembershipWithTeam + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON303 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseCancelTeamInvitationResponse parses an HTTP response from a CancelTeamInvitationWithResponse call +func ParseCancelTeamInvitationResponse(rsp *http.Response) (*CancelTeamInvitationResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CancelTeamInvitationResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseListInvoicesByTeamResponse parses an HTTP response from a ListInvoicesByTeamWithResponse call +func ParseListInvoicesByTeamResponse(rsp *http.Response) (*ListInvoicesByTeamResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListInvoicesByTeamResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListInvoicesByTeam200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetManagedDatabasesResponse parses an HTTP response from a GetManagedDatabasesWithResponse call +func ParseGetManagedDatabasesResponse(rsp *http.Response) (*GetManagedDatabasesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetManagedDatabasesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest GetManagedDatabases200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + } - return ParseHealthCheckResponse(rsp) -} -// ListPluginsWithResponse request returning *ListPluginsResponse -func (c *ClientWithResponses) ListPluginsWithResponse(ctx context.Context, params *ListPluginsParams, reqEditors ...RequestEditorFn) (*ListPluginsResponse, error) { - rsp, err := c.ListPlugins(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListPluginsResponse(rsp) + return response, nil } -// CreatePluginWithBodyWithResponse request with arbitrary body returning *CreatePluginResponse -func (c *ClientWithResponses) CreatePluginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) { - rsp, err := c.CreatePluginWithBody(ctx, contentType, body, reqEditors...) +// ParseCreateManagedDatabaseResponse parses an HTTP response from a CreateManagedDatabaseWithResponse call +func ParseCreateManagedDatabaseResponse(rsp *http.Response) (*CreateManagedDatabaseResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseCreatePluginResponse(rsp) -} -func (c *ClientWithResponses) CreatePluginWithResponse(ctx context.Context, body CreatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginResponse, error) { - rsp, err := c.CreatePlugin(ctx, body, reqEditors...) - if err != nil { - return nil, err + response := &CreateManagedDatabaseResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseCreatePluginResponse(rsp) -} -// GetPluginWithResponse request returning *GetPluginResponse -func (c *ClientWithResponses) GetPluginWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, reqEditors ...RequestEditorFn) (*GetPluginResponse, error) { - rsp, err := c.GetPlugin(ctx, teamName, pluginName, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetPluginResponse(rsp) -} + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest ManagedDatabase + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest -// UpdatePluginWithBodyWithResponse request with arbitrary body returning *UpdatePluginResponse -func (c *ClientWithResponses) UpdatePluginWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) { - rsp, err := c.UpdatePluginWithBody(ctx, teamName, pluginName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdatePluginResponse(rsp) -} + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest -func (c *ClientWithResponses) UpdatePluginWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, body UpdatePluginJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginResponse, error) { - rsp, err := c.UpdatePlugin(ctx, teamName, pluginName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdatePluginResponse(rsp) -} + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest -// ListPluginVersionsWithResponse request returning *ListPluginVersionsResponse -func (c *ClientWithResponses) ListPluginVersionsWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, params *ListPluginVersionsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionsResponse, error) { - rsp, err := c.ListPluginVersions(ctx, teamName, pluginName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListPluginVersionsResponse(rsp) -} + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest -// CreatePluginVersionWithBodyWithResponse request with arbitrary body returning *CreatePluginVersionResponse -func (c *ClientWithResponses) CreatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) { - rsp, err := c.CreatePluginVersionWithBody(ctx, teamName, pluginName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreatePluginVersionResponse(rsp) -} + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest -func (c *ClientWithResponses) CreatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, body CreatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionResponse, error) { - rsp, err := c.CreatePluginVersion(ctx, teamName, pluginName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreatePluginVersionResponse(rsp) -} + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest Conflict + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON409 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest -// GetPluginVersionWithResponse request returning *GetPluginVersionResponse -func (c *ClientWithResponses) GetPluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, reqEditors ...RequestEditorFn) (*GetPluginVersionResponse, error) { - rsp, err := c.GetPluginVersion(ctx, teamName, pluginName, versionName, reqEditors...) - if err != nil { - return nil, err } - return ParseGetPluginVersionResponse(rsp) + + return response, nil } -// UpdatePluginVersionWithBodyWithResponse request with arbitrary body returning *UpdatePluginVersionResponse -func (c *ClientWithResponses) UpdatePluginVersionWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) { - rsp, err := c.UpdatePluginVersionWithBody(ctx, teamName, pluginName, versionName, contentType, body, reqEditors...) +// ParseDeleteManagedDatabaseResponse parses an HTTP response from a DeleteManagedDatabaseWithResponse call +func ParseDeleteManagedDatabaseResponse(rsp *http.Response) (*DeleteManagedDatabaseResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseUpdatePluginVersionResponse(rsp) -} -func (c *ClientWithResponses) UpdatePluginVersionWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body UpdatePluginVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePluginVersionResponse, error) { - rsp, err := c.UpdatePluginVersion(ctx, teamName, pluginName, versionName, body, reqEditors...) - if err != nil { - return nil, err + response := &DeleteManagedDatabaseResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseUpdatePluginVersionResponse(rsp) -} -// DownloadPluginAssetWithResponse request returning *DownloadPluginAssetResponse -func (c *ClientWithResponses) DownloadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*DownloadPluginAssetResponse, error) { - rsp, err := c.DownloadPluginAsset(ctx, teamName, pluginName, versionName, targetName, reqEditors...) - if err != nil { - return nil, err + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + } - return ParseDownloadPluginAssetResponse(rsp) + + return response, nil } -// UploadPluginAssetWithResponse request returning *UploadPluginAssetResponse -func (c *ClientWithResponses) UploadPluginAssetWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, targetName TargetName, reqEditors ...RequestEditorFn) (*UploadPluginAssetResponse, error) { - rsp, err := c.UploadPluginAsset(ctx, teamName, pluginName, versionName, targetName, reqEditors...) +// ParseGetManagedDatabaseResponse parses an HTTP response from a GetManagedDatabaseWithResponse call +func ParseGetManagedDatabaseResponse(rsp *http.Response) (*GetManagedDatabaseResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseUploadPluginAssetResponse(rsp) -} -// DeletePluginVersionDocsWithBodyWithResponse request with arbitrary body returning *DeletePluginVersionDocsResponse -func (c *ClientWithResponses) DeletePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) { - rsp, err := c.DeletePluginVersionDocsWithBody(ctx, teamName, pluginName, versionName, contentType, body, reqEditors...) - if err != nil { - return nil, err + response := &GetManagedDatabaseResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseDeletePluginVersionDocsResponse(rsp) -} -func (c *ClientWithResponses) DeletePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body DeletePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionDocsResponse, error) { - rsp, err := c.DeletePluginVersionDocs(ctx, teamName, pluginName, versionName, body, reqEditors...) - if err != nil { - return nil, err + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ManagedDatabase + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + } - return ParseDeletePluginVersionDocsResponse(rsp) + + return response, nil } -// ListPluginVersionDocsWithResponse request returning *ListPluginVersionDocsResponse -func (c *ClientWithResponses) ListPluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, params *ListPluginVersionDocsParams, reqEditors ...RequestEditorFn) (*ListPluginVersionDocsResponse, error) { - rsp, err := c.ListPluginVersionDocs(ctx, teamName, pluginName, versionName, params, reqEditors...) +// ParseRemoveTeamMembershipResponse parses an HTTP response from a RemoveTeamMembershipWithResponse call +func ParseRemoveTeamMembershipResponse(rsp *http.Response) (*RemoveTeamMembershipResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseListPluginVersionDocsResponse(rsp) -} -// CreatePluginVersionDocsWithBodyWithResponse request with arbitrary body returning *CreatePluginVersionDocsResponse -func (c *ClientWithResponses) CreatePluginVersionDocsWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) { - rsp, err := c.CreatePluginVersionDocsWithBody(ctx, teamName, pluginName, versionName, contentType, body, reqEditors...) - if err != nil { - return nil, err + response := &RemoveTeamMembershipResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseCreatePluginVersionDocsResponse(rsp) -} -func (c *ClientWithResponses) CreatePluginVersionDocsWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body CreatePluginVersionDocsJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionDocsResponse, error) { - rsp, err := c.CreatePluginVersionDocs(ctx, teamName, pluginName, versionName, body, reqEditors...) - if err != nil { - return nil, err + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + } - return ParseCreatePluginVersionDocsResponse(rsp) -} -// DeletePluginVersionTablesWithBodyWithResponse request with arbitrary body returning *DeletePluginVersionTablesResponse -func (c *ClientWithResponses) DeletePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) { - rsp, err := c.DeletePluginVersionTablesWithBody(ctx, teamName, pluginName, versionName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeletePluginVersionTablesResponse(rsp) + return response, nil } -func (c *ClientWithResponses) DeletePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body DeletePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*DeletePluginVersionTablesResponse, error) { - rsp, err := c.DeletePluginVersionTables(ctx, teamName, pluginName, versionName, body, reqEditors...) +// ParseGetTeamMembershipsResponse parses an HTTP response from a GetTeamMembershipsWithResponse call +func ParseGetTeamMembershipsResponse(rsp *http.Response) (*GetTeamMembershipsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseDeletePluginVersionTablesResponse(rsp) -} -// ListPluginVersionTablesWithResponse request returning *ListPluginVersionTablesResponse -func (c *ClientWithResponses) ListPluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, params *ListPluginVersionTablesParams, reqEditors ...RequestEditorFn) (*ListPluginVersionTablesResponse, error) { - rsp, err := c.ListPluginVersionTables(ctx, teamName, pluginName, versionName, params, reqEditors...) - if err != nil { - return nil, err + response := &GetTeamMembershipsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseListPluginVersionTablesResponse(rsp) -} -// CreatePluginVersionTablesWithBodyWithResponse request with arbitrary body returning *CreatePluginVersionTablesResponse -func (c *ClientWithResponses) CreatePluginVersionTablesWithBodyWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) { - rsp, err := c.CreatePluginVersionTablesWithBody(ctx, teamName, pluginName, versionName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreatePluginVersionTablesResponse(rsp) -} + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest GetTeamMemberships200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest -func (c *ClientWithResponses) CreatePluginVersionTablesWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, body CreatePluginVersionTablesJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePluginVersionTablesResponse, error) { - rsp, err := c.CreatePluginVersionTables(ctx, teamName, pluginName, versionName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreatePluginVersionTablesResponse(rsp) -} + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest -// GetPluginVersionTableWithResponse request returning *GetPluginVersionTableResponse -func (c *ClientWithResponses) GetPluginVersionTableWithResponse(ctx context.Context, teamName TeamName, pluginName PluginName, versionName VersionName, tableName string, reqEditors ...RequestEditorFn) (*GetPluginVersionTableResponse, error) { - rsp, err := c.GetPluginVersionTable(ctx, teamName, pluginName, versionName, tableName, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetPluginVersionTableResponse(rsp) -} + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest -// ListTeamsWithResponse request returning *ListTeamsResponse -func (c *ClientWithResponses) ListTeamsWithResponse(ctx context.Context, params *ListTeamsParams, reqEditors ...RequestEditorFn) (*ListTeamsResponse, error) { - rsp, err := c.ListTeams(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListTeamsResponse(rsp) -} + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest -// CreateTeamWithBodyWithResponse request with arbitrary body returning *CreateTeamResponse -func (c *ClientWithResponses) CreateTeamWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error) { - rsp, err := c.CreateTeamWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateTeamResponse(rsp) -} + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest -func (c *ClientWithResponses) CreateTeamWithResponse(ctx context.Context, body CreateTeamJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTeamResponse, error) { - rsp, err := c.CreateTeam(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCreateTeamResponse(rsp) -} + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest -// GetTeamByNameWithResponse request returning *GetTeamByNameResponse -func (c *ClientWithResponses) GetTeamByNameWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*GetTeamByNameResponse, error) { - rsp, err := c.GetTeamByName(ctx, teamName, reqEditors...) - if err != nil { - return nil, err } - return ParseGetTeamByNameResponse(rsp) -} -// ListTeamApiKeysWithResponse request returning *ListTeamApiKeysResponse -func (c *ClientWithResponses) ListTeamApiKeysWithResponse(ctx context.Context, teamName TeamName, params *ListTeamApiKeysParams, reqEditors ...RequestEditorFn) (*ListTeamApiKeysResponse, error) { - rsp, err := c.ListTeamApiKeys(ctx, teamName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListTeamApiKeysResponse(rsp) + return response, nil } -// CreateTeamApiKeyWithResponse request returning *CreateTeamApiKeyResponse -func (c *ClientWithResponses) CreateTeamApiKeyWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*CreateTeamApiKeyResponse, error) { - rsp, err := c.CreateTeamApiKey(ctx, teamName, reqEditors...) +// ParseDeleteTeamMembershipResponse parses an HTTP response from a DeleteTeamMembershipWithResponse call +func ParseDeleteTeamMembershipResponse(rsp *http.Response) (*DeleteTeamMembershipResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseCreateTeamApiKeyResponse(rsp) -} -// DeleteTeamApiKeyWithResponse request returning *DeleteTeamApiKeyResponse -func (c *ClientWithResponses) DeleteTeamApiKeyWithResponse(ctx context.Context, teamName TeamName, apiKeyName ApiKeyName, reqEditors ...RequestEditorFn) (*DeleteTeamApiKeyResponse, error) { - rsp, err := c.DeleteTeamApiKey(ctx, teamName, apiKeyName, reqEditors...) - if err != nil { - return nil, err + response := &DeleteTeamMembershipResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseDeleteTeamApiKeyResponse(rsp) -} -// ListTeamInvitationsWithResponse request returning *ListTeamInvitationsResponse -func (c *ClientWithResponses) ListTeamInvitationsWithResponse(ctx context.Context, teamName TeamName, params *ListTeamInvitationsParams, reqEditors ...RequestEditorFn) (*ListTeamInvitationsResponse, error) { - rsp, err := c.ListTeamInvitations(ctx, teamName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseListTeamInvitationsResponse(rsp) -} + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest -// EmailTeamInvitationWithBodyWithResponse request with arbitrary body returning *EmailTeamInvitationResponse -func (c *ClientWithResponses) EmailTeamInvitationWithBodyWithResponse(ctx context.Context, teamName TeamName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmailTeamInvitationResponse, error) { - rsp, err := c.EmailTeamInvitationWithBody(ctx, teamName, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseEmailTeamInvitationResponse(rsp) -} + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest -func (c *ClientWithResponses) EmailTeamInvitationWithResponse(ctx context.Context, teamName TeamName, body EmailTeamInvitationJSONRequestBody, reqEditors ...RequestEditorFn) (*EmailTeamInvitationResponse, error) { - rsp, err := c.EmailTeamInvitation(ctx, teamName, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseEmailTeamInvitationResponse(rsp) -} + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest -// AcceptTeamInvitationWithResponse request returning *AcceptTeamInvitationResponse -func (c *ClientWithResponses) AcceptTeamInvitationWithResponse(ctx context.Context, teamName TeamName, reqEditors ...RequestEditorFn) (*AcceptTeamInvitationResponse, error) { - rsp, err := c.AcceptTeamInvitation(ctx, teamName, reqEditors...) - if err != nil { - return nil, err - } - return ParseAcceptTeamInvitationResponse(rsp) -} + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest -// CancelTeamInvitationWithResponse request returning *CancelTeamInvitationResponse -func (c *ClientWithResponses) CancelTeamInvitationWithResponse(ctx context.Context, teamName TeamName, email Email, reqEditors ...RequestEditorFn) (*CancelTeamInvitationResponse, error) { - rsp, err := c.CancelTeamInvitation(ctx, teamName, email, reqEditors...) - if err != nil { - return nil, err - } - return ParseCancelTeamInvitationResponse(rsp) -} + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest -// GetTeamMembershipsWithResponse request returning *GetTeamMembershipsResponse -func (c *ClientWithResponses) GetTeamMembershipsWithResponse(ctx context.Context, teamName TeamName, params *GetTeamMembershipsParams, reqEditors ...RequestEditorFn) (*GetTeamMembershipsResponse, error) { - rsp, err := c.GetTeamMemberships(ctx, teamName, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetTeamMembershipsResponse(rsp) -} + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest -// ListPluginsByTeamWithResponse request returning *ListPluginsByTeamResponse -func (c *ClientWithResponses) ListPluginsByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListPluginsByTeamParams, reqEditors ...RequestEditorFn) (*ListPluginsByTeamResponse, error) { - rsp, err := c.ListPluginsByTeam(ctx, teamName, params, reqEditors...) - if err != nil { - return nil, err } - return ParseListPluginsByTeamResponse(rsp) + + return response, nil } -// ListUsersByTeamWithResponse request returning *ListUsersByTeamResponse -func (c *ClientWithResponses) ListUsersByTeamWithResponse(ctx context.Context, teamName TeamName, params *ListUsersByTeamParams, reqEditors ...RequestEditorFn) (*ListUsersByTeamResponse, error) { - rsp, err := c.ListUsersByTeam(ctx, teamName, params, reqEditors...) +// ParseDeletePluginsByTeamResponse parses an HTTP response from a DeletePluginsByTeamWithResponse call +func ParseDeletePluginsByTeamResponse(rsp *http.Response) (*DeletePluginsByTeamResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseListUsersByTeamResponse(rsp) -} -// UploadImageWithResponse request returning *UploadImageResponse -func (c *ClientWithResponses) UploadImageWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UploadImageResponse, error) { - rsp, err := c.UploadImage(ctx, reqEditors...) - if err != nil { - return nil, err + response := &DeletePluginsByTeamResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseUploadImageResponse(rsp) -} -// GetCurrentUserWithResponse request returning *GetCurrentUserResponse -func (c *ClientWithResponses) GetCurrentUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentUserResponse, error) { - rsp, err := c.GetCurrentUser(ctx, reqEditors...) - if err != nil { - return nil, err + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + } - return ParseGetCurrentUserResponse(rsp) + + return response, nil } -// ListCurrentUserInvitationsWithResponse request returning *ListCurrentUserInvitationsResponse -func (c *ClientWithResponses) ListCurrentUserInvitationsWithResponse(ctx context.Context, params *ListCurrentUserInvitationsParams, reqEditors ...RequestEditorFn) (*ListCurrentUserInvitationsResponse, error) { - rsp, err := c.ListCurrentUserInvitations(ctx, params, reqEditors...) +// ParseListPluginsByTeamResponse parses an HTTP response from a ListPluginsByTeamWithResponse call +func ParseListPluginsByTeamResponse(rsp *http.Response) (*ListPluginsByTeamResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseListCurrentUserInvitationsResponse(rsp) -} -// GetCurrentUserMembershipsWithResponse request returning *GetCurrentUserMembershipsResponse -func (c *ClientWithResponses) GetCurrentUserMembershipsWithResponse(ctx context.Context, params *GetCurrentUserMembershipsParams, reqEditors ...RequestEditorFn) (*GetCurrentUserMembershipsResponse, error) { - rsp, err := c.GetCurrentUserMemberships(ctx, params, reqEditors...) - if err != nil { - return nil, err + response := &ListPluginsByTeamResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseGetCurrentUserMembershipsResponse(rsp) + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListPluginsByTeam200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil } -// ParseHealthCheckResponse parses an HTTP response from a HealthCheckWithResponse call -func ParseHealthCheckResponse(rsp *http.Response) (*HealthCheckResponse, error) { +// ParseDownloadPluginAssetByTeamResponse parses an HTTP response from a DownloadPluginAssetByTeamWithResponse call +func ParseDownloadPluginAssetByTeamResponse(rsp *http.Response) (*DownloadPluginAssetByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &HealthCheckResponse{ + response := &DownloadPluginAssetByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest PluginAsset + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + return response, nil } -// ParseListPluginsResponse parses an HTTP response from a ListPluginsWithResponse call -func ParseListPluginsResponse(rsp *http.Response) (*ListPluginsResponse, error) { +// ParseGetSettingsResponse parses an HTTP response from a GetSettingsWithResponse call +func ParseGetSettingsResponse(rsp *http.Response) (*GetSettingsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListPluginsResponse{ + response := &GetSettingsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []Plugin `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest Settings if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -4231,6 +18044,20 @@ func ParseListPluginsResponse(rsp *http.Response) (*ListPluginsResponse, error) } response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -4243,26 +18070,33 @@ func ParseListPluginsResponse(rsp *http.Response) (*ListPluginsResponse, error) return response, nil } -// ParseCreatePluginResponse parses an HTTP response from a CreatePluginWithResponse call -func ParseCreatePluginResponse(rsp *http.Response) (*CreatePluginResponse, error) { +// ParseUpdateSettingsResponse parses an HTTP response from a UpdateSettingsWithResponse call +func ParseUpdateSettingsResponse(rsp *http.Response) (*UpdateSettingsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreatePluginResponse{ + response := &UpdateSettingsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest Plugin + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest Settings if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden @@ -4271,6 +18105,13 @@ func ParseCreatePluginResponse(rsp *http.Response) (*CreatePluginResponse, error } response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -4290,22 +18131,22 @@ func ParseCreatePluginResponse(rsp *http.Response) (*CreatePluginResponse, error return response, nil } -// ParseGetPluginResponse parses an HTTP response from a GetPluginWithResponse call -func ParseGetPluginResponse(rsp *http.Response) (*GetPluginResponse, error) { +// ParseListSubscriptionOrdersByTeamResponse parses an HTTP response from a ListSubscriptionOrdersByTeamWithResponse call +func ParseListSubscriptionOrdersByTeamResponse(rsp *http.Response) (*ListSubscriptionOrdersByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetPluginResponse{ + response := &ListSubscriptionOrdersByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Plugin + var dest ListSubscriptionOrdersByTeam200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -4325,6 +18166,13 @@ func ParseGetPluginResponse(rsp *http.Response) (*GetPluginResponse, error) { } response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -4337,26 +18185,40 @@ func ParseGetPluginResponse(rsp *http.Response) (*GetPluginResponse, error) { return response, nil } -// ParseUpdatePluginResponse parses an HTTP response from a UpdatePluginWithResponse call -func ParseUpdatePluginResponse(rsp *http.Response) (*UpdatePluginResponse, error) { +// ParseCreateSubscriptionOrderForTeamResponse parses an HTTP response from a CreateSubscriptionOrderForTeamWithResponse call +func ParseCreateSubscriptionOrderForTeamResponse(rsp *http.Response) (*CreateSubscriptionOrderForTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdatePluginResponse{ + response := &CreateSubscriptionOrderForTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Plugin + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest TeamSubscriptionOrder if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest Forbidden @@ -4365,6 +18227,13 @@ func ParseUpdatePluginResponse(rsp *http.Response) (*UpdatePluginResponse, error } response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -4384,25 +18253,22 @@ func ParseUpdatePluginResponse(rsp *http.Response) (*UpdatePluginResponse, error return response, nil } -// ParseListPluginVersionsResponse parses an HTTP response from a ListPluginVersionsWithResponse call -func ParseListPluginVersionsResponse(rsp *http.Response) (*ListPluginVersionsResponse, error) { +// ParseGetSubscriptionOrderByTeamResponse parses an HTTP response from a GetSubscriptionOrderByTeamWithResponse call +func ParseGetSubscriptionOrderByTeamResponse(rsp *http.Response) (*GetSubscriptionOrderByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListPluginVersionsResponse{ + response := &GetSubscriptionOrderByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []PluginVersion `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest TeamSubscriptionOrder if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -4422,6 +18288,13 @@ func ParseListPluginVersionsResponse(rsp *http.Response) (*ListPluginVersionsRes } response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -4434,26 +18307,26 @@ func ParseListPluginVersionsResponse(rsp *http.Response) (*ListPluginVersionsRes return response, nil } -// ParseCreatePluginVersionResponse parses an HTTP response from a CreatePluginVersionWithResponse call -func ParseCreatePluginVersionResponse(rsp *http.Response) (*CreatePluginVersionResponse, error) { +// ParseListTeamPluginUsageResponse parses an HTTP response from a ListTeamPluginUsageWithResponse call +func ParseListTeamPluginUsageResponse(rsp *http.Response) (*ListTeamPluginUsageResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreatePluginVersionResponse{ + response := &ListTeamPluginUsageResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest PluginVersion + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListTeamPluginUsage200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -4469,6 +18342,60 @@ func ParseCreatePluginVersionResponse(rsp *http.Response) (*CreatePluginVersionR } response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseIncreaseTeamPluginUsageResponse parses an HTTP response from a IncreaseTeamPluginUsageWithResponse call +func ParseIncreaseTeamPluginUsageResponse(rsp *http.Response) (*IncreaseTeamPluginUsageResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &IncreaseTeamPluginUsageResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -4483,31 +18410,45 @@ func ParseCreatePluginVersionResponse(rsp *http.Response) (*CreatePluginVersionR } response.JSON500 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: + var dest ServiceUnavailable + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON503 = &dest + } return response, nil } -// ParseGetPluginVersionResponse parses an HTTP response from a GetPluginVersionWithResponse call -func ParseGetPluginVersionResponse(rsp *http.Response) (*GetPluginVersionResponse, error) { +// ParseGetTeamUsageSummaryResponse parses an HTTP response from a GetTeamUsageSummaryWithResponse call +func ParseGetTeamUsageSummaryResponse(rsp *http.Response) (*GetTeamUsageSummaryResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetPluginVersionResponse{ + response := &GetTeamUsageSummaryResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PluginVersion + var dest UsageSummary + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -4530,6 +18471,13 @@ func ParseGetPluginVersionResponse(rsp *http.Response) (*GetPluginVersionRespons } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -4542,27 +18490,34 @@ func ParseGetPluginVersionResponse(rsp *http.Response) (*GetPluginVersionRespons return response, nil } -// ParseUpdatePluginVersionResponse parses an HTTP response from a UpdatePluginVersionWithResponse call -func ParseUpdatePluginVersionResponse(rsp *http.Response) (*UpdatePluginVersionResponse, error) { +// ParseGetGroupedTeamUsageSummaryResponse parses an HTTP response from a GetGroupedTeamUsageSummaryWithResponse call +func ParseGetGroupedTeamUsageSummaryResponse(rsp *http.Response) (*GetGroupedTeamUsageSummaryResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdatePluginVersionResponse{ + response := &GetGroupedTeamUsageSummaryResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PluginVersion + var dest UsageSummary if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -4603,20 +18558,27 @@ func ParseUpdatePluginVersionResponse(rsp *http.Response) (*UpdatePluginVersionR return response, nil } -// ParseDownloadPluginAssetResponse parses an HTTP response from a DownloadPluginAssetWithResponse call -func ParseDownloadPluginAssetResponse(rsp *http.Response) (*DownloadPluginAssetResponse, error) { +// ParseGetTeamPluginUsageResponse parses an HTTP response from a GetTeamPluginUsageWithResponse call +func ParseGetTeamPluginUsageResponse(rsp *http.Response) (*GetTeamPluginUsageResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DownloadPluginAssetResponse{ + response := &GetTeamPluginUsageResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest UsageCurrent + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -4650,26 +18612,33 @@ func ParseDownloadPluginAssetResponse(rsp *http.Response) (*DownloadPluginAssetR return response, nil } -// ParseUploadPluginAssetResponse parses an HTTP response from a UploadPluginAssetWithResponse call -func ParseUploadPluginAssetResponse(rsp *http.Response) (*UploadPluginAssetResponse, error) { +// ParseListUsersByTeamResponse parses an HTTP response from a ListUsersByTeamWithResponse call +func ParseListUsersByTeamResponse(rsp *http.Response) (*ListUsersByTeamResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UploadPluginAssetResponse{ + response := &ListUsersByTeamResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest ReleaseURL + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListUsersByTeam200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -4685,6 +18654,13 @@ func ParseUploadPluginAssetResponse(rsp *http.Response) (*UploadPluginAssetRespo } response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -4697,41 +18673,55 @@ func ParseUploadPluginAssetResponse(rsp *http.Response) (*UploadPluginAssetRespo return response, nil } -// ParseDeletePluginVersionDocsResponse parses an HTTP response from a DeletePluginVersionDocsWithResponse call -func ParseDeletePluginVersionDocsResponse(rsp *http.Response) (*DeletePluginVersionDocsResponse, error) { +// ParseUploadImageResponse parses an HTTP response from a UploadImageWithResponse call +func ParseUploadImageResponse(rsp *http.Response) (*UploadImageResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeletePluginVersionDocsResponse{ + response := &UploadImageResponse{ Body: bodyBytes, HTTPResponse: rsp, } + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ImageURL + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + return response, nil } -// ParseListPluginVersionDocsResponse parses an HTTP response from a ListPluginVersionDocsWithResponse call -func ParseListPluginVersionDocsResponse(rsp *http.Response) (*ListPluginVersionDocsResponse, error) { +// ParseGetCurrentUserResponse parses an HTTP response from a GetCurrentUserWithResponse call +func ParseGetCurrentUserResponse(rsp *http.Response) (*GetCurrentUserResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListPluginVersionDocsResponse{ + response := &GetCurrentUserResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []PluginDocsPage `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest User if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -4763,82 +18753,101 @@ func ParseListPluginVersionDocsResponse(rsp *http.Response) (*ListPluginVersionD return response, nil } -// ParseCreatePluginVersionDocsResponse parses an HTTP response from a CreatePluginVersionDocsWithResponse call -func ParseCreatePluginVersionDocsResponse(rsp *http.Response) (*CreatePluginVersionDocsResponse, error) { +// ParseUpdateCurrentUserResponse parses an HTTP response from a UpdateCurrentUserWithResponse call +func ParseUpdateCurrentUserResponse(rsp *http.Response) (*UpdateCurrentUserResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreatePluginVersionDocsResponse{ + response := &UpdateCurrentUserResponse{ Body: bodyBytes, HTTPResponse: rsp, } - return response, nil -} + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest User + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest -// ParseDeletePluginVersionTablesResponse parses an HTTP response from a DeletePluginVersionTablesWithResponse call -func ParseDeletePluginVersionTablesResponse(rsp *http.Response) (*DeletePluginVersionTablesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 405: + var dest MethodNotAllowed + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON405 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest - response := &DeletePluginVersionTablesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, } return response, nil } -// ParseListPluginVersionTablesResponse parses an HTTP response from a ListPluginVersionTablesWithResponse call -func ParseListPluginVersionTablesResponse(rsp *http.Response) (*ListPluginVersionTablesResponse, error) { +// ParseSendAnonymousEventResponse parses an HTTP response from a SendAnonymousEventWithResponse call +func ParseSendAnonymousEventResponse(rsp *http.Response) (*SendAnonymousEventResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListPluginVersionTablesResponse{ + response := &SendAnonymousEventResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []PluginTable `json:"items"` - Metadata ListMetadata `json:"metadata"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON429 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -4852,42 +18861,59 @@ func ParseListPluginVersionTablesResponse(rsp *http.Response) (*ListPluginVersio return response, nil } -// ParseCreatePluginVersionTablesResponse parses an HTTP response from a CreatePluginVersionTablesWithResponse call -func ParseCreatePluginVersionTablesResponse(rsp *http.Response) (*CreatePluginVersionTablesResponse, error) { +// ParseCheckUserAuthStatusResponse parses an HTTP response from a CheckUserAuthStatusWithResponse call +func ParseCheckUserAuthStatusResponse(rsp *http.Response) (*CheckUserAuthStatusResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreatePluginVersionTablesResponse{ + response := &CheckUserAuthStatusResponse{ Body: bodyBytes, HTTPResponse: rsp, } + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest CheckUserAuthStatus200Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + return response, nil } -// ParseGetPluginVersionTableResponse parses an HTTP response from a GetPluginVersionTableWithResponse call -func ParseGetPluginVersionTableResponse(rsp *http.Response) (*GetPluginVersionTableResponse, error) { +// ParseUpdateCustomerResponse parses an HTTP response from a UpdateCustomerWithResponse call +func ParseUpdateCustomerResponse(rsp *http.Response) (*UpdateCustomerResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetPluginVersionTableResponse{ + response := &UpdateCustomerResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PluginTableDetails + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -4896,13 +18922,6 @@ func ParseGetPluginVersionTableResponse(rsp *http.Response) (*GetPluginVersionTa } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -4922,29 +18941,26 @@ func ParseGetPluginVersionTableResponse(rsp *http.Response) (*GetPluginVersionTa return response, nil } -// ParseListTeamsResponse parses an HTTP response from a ListTeamsWithResponse call -func ParseListTeamsResponse(rsp *http.Response) (*ListTeamsResponse, error) { +// ParseSendUserEventResponse parses an HTTP response from a SendUserEventWithResponse call +func ParseSendUserEventResponse(rsp *http.Response) (*SendUserEventResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListTeamsResponse{ + response := &SendUserEventResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []Team `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -4953,26 +18969,45 @@ func ParseListTeamsResponse(rsp *http.Response) (*ListTeamsResponse, error) { } response.JSON401 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON500 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + } + + return response, nil +} + +// ParseListCurrentUserInvitationsResponse parses an HTTP response from a ListCurrentUserInvitationsWithResponse call +func ParseListCurrentUserInvitationsResponse(rsp *http.Response) (*ListCurrentUserInvitationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &ListCurrentUserInvitationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListCurrentUserInvitations200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -4986,33 +19021,54 @@ func ParseListTeamsResponse(rsp *http.Response) (*ListTeamsResponse, error) { return response, nil } -// ParseCreateTeamResponse parses an HTTP response from a CreateTeamWithResponse call -func ParseCreateTeamResponse(rsp *http.Response) (*CreateTeamResponse, error) { +// ParseLogoutUserResponse parses an HTTP response from a LogoutUserWithResponse call +func ParseLogoutUserResponse(rsp *http.Response) (*LogoutUserResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateTeamResponse{ + response := &LogoutUserResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest Team + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON201 = &dest + response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 405: + var dest MethodNotAllowed + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON405 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -5026,26 +19082,26 @@ func ParseCreateTeamResponse(rsp *http.Response) (*CreateTeamResponse, error) { return response, nil } -// ParseGetTeamByNameResponse parses an HTTP response from a GetTeamByNameWithResponse call -func ParseGetTeamByNameResponse(rsp *http.Response) (*GetTeamByNameResponse, error) { +// ParseLoginUserResponse parses an HTTP response from a LoginUserWithResponse call +func ParseLoginUserResponse(rsp *http.Response) (*LoginUserResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetTeamByNameResponse{ + response := &LoginUserResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Team + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -5068,12 +19124,12 @@ func ParseGetTeamByNameResponse(rsp *http.Response) (*GetTeamByNameResponse, err } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 405: + var dest MethodNotAllowed if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON405 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -5087,25 +19143,22 @@ func ParseGetTeamByNameResponse(rsp *http.Response) (*GetTeamByNameResponse, err return response, nil } -// ParseListTeamApiKeysResponse parses an HTTP response from a ListTeamApiKeysWithResponse call -func ParseListTeamApiKeysResponse(rsp *http.Response) (*ListTeamApiKeysResponse, error) { +// ParseGetCurrentUserMembershipsResponse parses an HTTP response from a GetCurrentUserMembershipsWithResponse call +func ParseGetCurrentUserMembershipsResponse(rsp *http.Response) (*GetCurrentUserMembershipsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListTeamApiKeysResponse{ + response := &GetCurrentUserMembershipsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []ApiKey `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest GetCurrentUserMemberships200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -5118,6 +19171,13 @@ func ParseListTeamApiKeysResponse(rsp *http.Response) (*ListTeamApiKeysResponse, } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5130,66 +19190,47 @@ func ParseListTeamApiKeysResponse(rsp *http.Response) (*ListTeamApiKeysResponse, return response, nil } -// ParseCreateTeamApiKeyResponse parses an HTTP response from a CreateTeamApiKeyWithResponse call -func ParseCreateTeamApiKeyResponse(rsp *http.Response) (*CreateTeamApiKeyResponse, error) { +// ParseRegisterUserResponse parses an HTTP response from a RegisterUserWithResponse call +func ParseRegisterUserResponse(rsp *http.Response) (*RegisterUserResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateTeamApiKeyResponse{ + response := &RegisterUserResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest ApiKey + var dest RegisterUser201Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseDeleteTeamApiKeyResponse parses an HTTP response from a DeleteTeamApiKeyWithResponse call -func ParseDeleteTeamApiKeyResponse(rsp *http.Response) (*DeleteTeamApiKeyResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteTeamApiKeyResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } + response.JSON404 = &dest - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON429 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -5203,36 +19244,40 @@ func ParseDeleteTeamApiKeyResponse(rsp *http.Response) (*DeleteTeamApiKeyRespons return response, nil } -// ParseListTeamInvitationsResponse parses an HTTP response from a ListTeamInvitationsWithResponse call -func ParseListTeamInvitationsResponse(rsp *http.Response) (*ListTeamInvitationsResponse, error) { +// ParseResetUserPasswordResponse parses an HTTP response from a ResetUserPasswordWithResponse call +func ParseResetUserPasswordResponse(rsp *http.Response) (*ResetUserPasswordResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListTeamInvitationsResponse{ + response := &ResetUserPasswordResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []Invitation `json:"items"` - Metadata ListMetadata `json:"metadata"` + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON429 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -5246,40 +19291,47 @@ func ParseListTeamInvitationsResponse(rsp *http.Response) (*ListTeamInvitationsR return response, nil } -// ParseEmailTeamInvitationResponse parses an HTTP response from a EmailTeamInvitationWithResponse call -func ParseEmailTeamInvitationResponse(rsp *http.Response) (*EmailTeamInvitationResponse, error) { +// ParseDeterminePlatformTenantByEmailResponse parses an HTTP response from a DeterminePlatformTenantByEmailWithResponse call +func ParseDeterminePlatformTenantByEmailResponse(rsp *http.Response) (*DeterminePlatformTenantByEmailResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &EmailTeamInvitationResponse{ + response := &DeterminePlatformTenantByEmailResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Invitation + var dest DeterminePlatformTenantByEmail200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -5293,40 +19345,40 @@ func ParseEmailTeamInvitationResponse(rsp *http.Response) (*EmailTeamInvitationR return response, nil } -// ParseAcceptTeamInvitationResponse parses an HTTP response from a AcceptTeamInvitationWithResponse call -func ParseAcceptTeamInvitationResponse(rsp *http.Response) (*AcceptTeamInvitationResponse, error) { +// ParseCreateUserTokenResponse parses an HTTP response from a CreateUserTokenWithResponse call +func ParseCreateUserTokenResponse(rsp *http.Response) (*CreateUserTokenResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &AcceptTeamInvitationResponse{ + response := &CreateUserTokenResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest Membership + var dest CreateUserToken201Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 303: - var dest Membership + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON303 = &dest + response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON401 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -5340,20 +19392,27 @@ func ParseAcceptTeamInvitationResponse(rsp *http.Response) (*AcceptTeamInvitatio return response, nil } -// ParseCancelTeamInvitationResponse parses an HTTP response from a CancelTeamInvitationWithResponse call -func ParseCancelTeamInvitationResponse(rsp *http.Response) (*CancelTeamInvitationResponse, error) { +// ParseUserTOTPDeleteResponse parses an HTTP response from a UserTOTPDeleteWithResponse call +func ParseUserTOTPDeleteResponse(rsp *http.Response) (*UserTOTPDeleteResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CancelTeamInvitationResponse{ + response := &UserTOTPDeleteResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5375,12 +19434,12 @@ func ParseCancelTeamInvitationResponse(rsp *http.Response) (*CancelTeamInvitatio } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 405: + var dest MethodNotAllowed if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON405 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -5394,30 +19453,34 @@ func ParseCancelTeamInvitationResponse(rsp *http.Response) (*CancelTeamInvitatio return response, nil } -// ParseGetTeamMembershipsResponse parses an HTTP response from a GetTeamMembershipsWithResponse call -func ParseGetTeamMembershipsResponse(rsp *http.Response) (*GetTeamMembershipsResponse, error) { +// ParseUserTOTPSetupResponse parses an HTTP response from a UserTOTPSetupWithResponse call +func ParseUserTOTPSetupResponse(rsp *http.Response) (*UserTOTPSetupResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetTeamMembershipsResponse{ + response := &UserTOTPSetupResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []Membership `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + var dest UserTOTPSetup200Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5439,6 +19502,13 @@ func ParseGetTeamMembershipsResponse(rsp *http.Response) (*GetTeamMembershipsRes } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 405: + var dest MethodNotAllowed + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON405 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5458,79 +19528,33 @@ func ParseGetTeamMembershipsResponse(rsp *http.Response) (*GetTeamMembershipsRes return response, nil } -// ParseListPluginsByTeamResponse parses an HTTP response from a ListPluginsByTeamWithResponse call -func ParseListPluginsByTeamResponse(rsp *http.Response) (*ListPluginsByTeamResponse, error) { +// ParseUserTOTPVerifyResponse parses an HTTP response from a UserTOTPVerifyWithResponse call +func ParseUserTOTPVerifyResponse(rsp *http.Response) (*UserTOTPVerifyResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListPluginsByTeamResponse{ + response := &UserTOTPVerifyResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []Plugin `json:"items"` - Metadata ListMetadata `json:"metadata"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON401 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest UserTOTPVerify201Response if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseListUsersByTeamResponse parses an HTTP response from a ListUsersByTeamWithResponse call -func ParseListUsersByTeamResponse(rsp *http.Response) (*ListUsersByTeamResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &ListUsersByTeamResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } + response.JSON201 = &dest - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []User `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest RequiresAuthentication @@ -5553,45 +19577,26 @@ func ParseListUsersByTeamResponse(rsp *http.Response) (*ListUsersByTeamResponse, } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 405: + var dest MethodNotAllowed if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON422 = &dest + response.JSON405 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseUploadImageResponse parses an HTTP response from a UploadImageWithResponse call -func ParseUploadImageResponse(rsp *http.Response) (*UploadImageResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &UploadImageResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } + response.JSON422 = &dest - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ImageURL + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON429 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -5605,40 +19610,40 @@ func ParseUploadImageResponse(rsp *http.Response) (*UploadImageResponse, error) return response, nil } -// ParseGetCurrentUserResponse parses an HTTP response from a GetCurrentUserWithResponse call -func ParseGetCurrentUserResponse(rsp *http.Response) (*GetCurrentUserResponse, error) { +// ParseVerifyUserEmailResponse parses an HTTP response from a VerifyUserEmailWithResponse call +func ParseVerifyUserEmailResponse(rsp *http.Response) (*VerifyUserEmailResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetCurrentUserResponse{ + response := &VerifyUserEmailResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest User + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest TooManyRequests if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON429 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError @@ -5652,79 +19657,54 @@ func ParseGetCurrentUserResponse(rsp *http.Response) (*GetCurrentUserResponse, e return response, nil } -// ParseListCurrentUserInvitationsResponse parses an HTTP response from a ListCurrentUserInvitationsWithResponse call -func ParseListCurrentUserInvitationsResponse(rsp *http.Response) (*ListCurrentUserInvitationsResponse, error) { +// ParseDeleteUserResponse parses an HTTP response from a DeleteUserWithResponse call +func ParseDeleteUserResponse(rsp *http.Response) (*DeleteUserResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListCurrentUserInvitationsResponse{ + response := &DeleteUserResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []Invitation `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest RequiresAuthentication if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON500 = &dest - - } - - return response, nil -} - -// ParseGetCurrentUserMembershipsResponse parses an HTTP response from a GetCurrentUserMembershipsWithResponse call -func ParseGetCurrentUserMembershipsResponse(rsp *http.Response) (*GetCurrentUserMembershipsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetCurrentUserMembershipsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } + response.JSON401 = &dest - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Items []Membership `json:"items"` - Metadata ListMetadata `json:"metadata"` - } + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Forbidden if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: - var dest RequiresAuthentication + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NotFound if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest UnprocessableEntity if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON403 = &dest + response.JSON422 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest InternalError diff --git a/client.go b/client.go index 50d8c5e..f4165f4 100644 --- a/client.go +++ b/client.go @@ -1,3 +1,3 @@ -//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen@v1.13.3 --config=./models.yaml ./spec.json -//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen@v1.13.3 --config=./client.yaml ./spec.json +//go:generate go run github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@v2.3.0 --config=./models.yaml ./spec.json +//go:generate go run github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@v2.3.0 --config=./client.yaml ./spec.json package cloudquery_api diff --git a/client.yaml b/client.yaml index 1a12bc4..d1dc280 100644 --- a/client.yaml +++ b/client.yaml @@ -2,3 +2,7 @@ package: cloudquery_api generate: client: true output: client.gen.go +output-options: + user-templates: + # Based on https://github.com/deepmap/oapi-codegen/blob/v1.15.0/pkg/codegen/templates/client.tmpl + client.tmpl: templates/client.tmpl diff --git a/config/config.go b/config/config.go new file mode 100644 index 0000000..f285ce6 --- /dev/null +++ b/config/config.go @@ -0,0 +1,176 @@ +package config + +import ( + "encoding/json" + "fmt" + "os" + "slices" + "strings" + + "github.com/adrg/xdg" +) + +const configPath = "cloudquery/config.json" + +var configKeys = []string{ + "team", + "team_internal", + "first_sync_completed", +} + +// SetConfigHome sets the configuration home directory - useful for testing +func SetConfigHome(configDir string) error { + return setXDGEnv("XDG_CONFIG_HOME", configDir) +} + +// UnsetConfigHome unsets the configuration home directory returning to the default value +func UnsetConfigHome() error { + return unsetXDGEnv("XDG_CONFIG_HOME") +} + +// GetValue reads the value of a config key from the config file +func GetValue(key string) (string, error) { + if !slices.Contains(configKeys, key) { + return "", fmt.Errorf("invalid config key %v (options are: %v)", key, strings.Join(configKeys, ", ")) + } + configFilePath, err := xdg.ConfigFile(configPath) + if err != nil { + return "", fmt.Errorf("failed to get config file path: %w", err) + } + b, err := os.ReadFile(configFilePath) + if err != nil { + return "", fmt.Errorf("failed to read config file: %w", err) + } + var config map[string]any + err = json.Unmarshal(b, &config) + if err != nil { + return "", fmt.Errorf("failed to parse config file: %w", err) + } + if _, ok := config[key]; !ok { + return "", nil + } + return config[key].(string), nil +} + +// SetValue updates the value of a config key in the config file +func SetValue(key, val string) error { + return setValue(key, &val) +} + +// UnsetValue removes the value of a config key from the config file +func UnsetValue(key string) error { + return setValue(key, nil) +} + +func setValue(key string, val *string) error { + if !slices.Contains(configKeys, key) { + return fmt.Errorf("invalid config key %v (options are: %v)", key, strings.Join(configKeys, ", ")) + } + configFilePath, err := xdg.ConfigFile(configPath) + if err != nil { + return fmt.Errorf("failed to get config file path: %w", err) + } + var config map[string]any + b, err := os.ReadFile(configFilePath) + switch { + case err == nil: + err = json.Unmarshal(b, &config) + if err != nil { + return fmt.Errorf("failed to parse config file: %w", err) + } + case os.IsNotExist(err): + config = make(map[string]any) + default: + return fmt.Errorf("failed to read config file: %w", err) + } + if val == nil { + // unset + delete(config, key) + } else { + // set + config[key] = val + } + b, err = json.Marshal(config) + if err != nil { + return fmt.Errorf("failed to marshal config: %w", err) + } + err = os.WriteFile(configFilePath, b, 0o644) + if err != nil { + return fmt.Errorf("failed to write config file: %w", err) + } + return nil +} + +// SetDataHome sets the data home directory - useful for testing +func SetDataHome(dataHome string) error { + return setXDGEnv("XDG_DATA_HOME", dataHome) +} + +// UnsetDataHome unsets the data home directory returning to the default value +func UnsetDataHome() error { + return unsetXDGEnv("XDG_DATA_HOME") +} + +// SaveDataString saves a string to a file in the data home directory +func SaveDataString(relPath string, data string) error { + filePath, err := xdg.DataFile(relPath) + if err != nil { + return fmt.Errorf("failed to get file path: %w", err) + } + file, err := os.OpenFile(filePath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644) + if err != nil { + return fmt.Errorf("failed to open file %q for writing: %w", filePath, err) + } + defer func() { + if closeErr := file.Close(); closeErr != nil { + fmt.Printf("error closing file: %v", closeErr) + } + }() + if _, err = file.WriteString(data); err != nil { + return fmt.Errorf("failed to write data to %q: %w", filePath, err) + } + return nil +} + +// ReadDataString reads a string from a file in the data home directory +func ReadDataString(relPath string) (string, error) { + filePath, err := xdg.DataFile(relPath) + if err != nil { + return "", fmt.Errorf("failed to get file path: %w", err) + } + b, err := os.ReadFile(filePath) + if err != nil { + return "", fmt.Errorf("failed to read file: %w", err) + } + return strings.TrimSpace(string(b)), nil +} + +// DeleteDataString deletes a file in the data home directory +func DeleteDataString(relPath string) error { + filePath, err := xdg.DataFile(relPath) + if err != nil { + return fmt.Errorf("failed to get file path: %w", err) + } + if err := os.RemoveAll(filePath); err != nil { + return fmt.Errorf("failed to remove file %q: %w", filePath, err) + } + return nil +} + +func setXDGEnv(key, value string) error { + err := os.Setenv(key, value) + if err != nil { + return fmt.Errorf("failed to set %s: %w", key, err) + } + xdg.Reload() + return nil +} + +func unsetXDGEnv(key string) error { + err := os.Unsetenv(key) + if err != nil { + return fmt.Errorf("failed to unset %s: %w", key, err) + } + xdg.Reload() + return nil +} diff --git a/config/config_test.go b/config/config_test.go new file mode 100644 index 0000000..d637917 --- /dev/null +++ b/config/config_test.go @@ -0,0 +1,89 @@ +package config + +import ( + "github.com/stretchr/testify/require" + "os" + "path" + "testing" + + "github.com/adrg/xdg" +) + +func TestSetGetValue(t *testing.T) { + t.Setenv("XDG_CONFIG_HOME", t.TempDir()) + xdg.Reload() + + err := SetValue("team", "my-team") + if err != nil { + t.Fatal(err) + } + + got, err := GetValue("team") + if err != nil { + t.Fatal(err) + } + if got != "my-team" { + t.Fatalf("expected %q, got %q", "my-team", got) + } + + err = UnsetValue("team") + if err != nil { + t.Fatal(err) + } + + got, err = GetValue("team") + if err != nil { + t.Fatal(err) + } + if got != "" { + t.Fatalf("expected %q, got %q", "", got) + } +} + +func TestSetConfigHome(t *testing.T) { + r := require.New(t) + configDir := t.TempDir() + + err := SetConfigHome(configDir) + r.NoError(err) + + r.Equal(configDir, xdg.ConfigHome) + + err = SetValue("team", "set-config-test-value") + r.NoError(err) + + // check that the config file was created in the temporary directory, + // not somewhere else + _, err = os.Stat(path.Join(configDir, "cloudquery", "config.json")) + r.NoError(err) + + err = UnsetConfigHome() + r.NoError(err) + + // check that we are no longer set to the temporary directory + r.NotEqual(configDir, xdg.ConfigHome) +} + +func TestSetDataHome(t *testing.T) { + r := require.New(t) + configDir := t.TempDir() + + err := SetDataHome(configDir) + r.NoError(err) + + r.Equal(configDir, xdg.DataHome) + + err = SaveDataString("cloudquery/token", "my-token") + r.NoError(err) + + // check that the config file was created in the temporary directory, + // not somewhere else + _, err = os.Stat(path.Join(configDir, "cloudquery", "token")) + r.NoError(err) + + err = UnsetDataHome() + r.NoError(err) + + // check that we are no longer set to the temporary directory + r.NotEqual(configDir, xdg.DataHome) +} diff --git a/go.mod b/go.mod index 567ffe1..87b67e8 100644 --- a/go.mod +++ b/go.mod @@ -1,73 +1,22 @@ module github.com/cloudquery/cloudquery-api-go -go 1.21.0 +go 1.26.1 + +require ( + github.com/adrg/xdg v0.5.3 + github.com/hashicorp/go-retryablehttp v0.7.8 + github.com/oapi-codegen/runtime v1.3.0 + github.com/stretchr/testify v1.11.1 +) require ( - github.com/BurntSushi/toml v1.3.2 // indirect - github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 // indirect - github.com/CloudyKit/jet/v6 v6.2.0 // indirect - github.com/Joker/jade v1.1.3 // indirect - github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 // indirect - github.com/andybalholm/brotli v1.0.5 // indirect github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect - github.com/aymerick/douceur v0.2.0 // indirect - github.com/bytedance/sonic v1.9.1 // indirect - github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect - github.com/deepmap/oapi-codegen v1.15.0 // indirect - github.com/fatih/structs v1.1.0 // indirect - github.com/flosch/pongo2/v4 v4.0.2 // indirect - github.com/gabriel-vasile/mimetype v1.4.2 // indirect - github.com/gin-contrib/sse v0.1.0 // indirect - github.com/gin-gonic/gin v1.9.1 // indirect - github.com/go-playground/locales v0.14.1 // indirect - github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.14.0 // indirect - github.com/goccy/go-json v0.10.2 // indirect - github.com/golang/snappy v0.0.4 // indirect - github.com/gomarkdown/markdown v0.0.0-20230716120725-531d2d74bc12 // indirect - github.com/google/uuid v1.3.1 // indirect - github.com/gorilla/css v1.0.0 // indirect - github.com/iris-contrib/schema v0.0.6 // indirect - github.com/josharian/intern v1.0.0 // indirect - github.com/json-iterator/go v1.1.12 // indirect - github.com/kataras/blocks v0.0.7 // indirect - github.com/kataras/golog v0.1.9 // indirect - github.com/kataras/iris/v12 v12.2.6-0.20230908161203-24ba4e8933b9 // indirect - github.com/kataras/pio v0.0.12 // indirect - github.com/kataras/sitemap v0.0.6 // indirect - github.com/kataras/tunnel v0.0.4 // indirect - github.com/klauspost/compress v1.16.7 // indirect - github.com/klauspost/cpuid/v2 v2.2.4 // indirect - github.com/labstack/echo/v4 v4.11.1 // indirect - github.com/labstack/gommon v0.4.0 // indirect - github.com/leodido/go-urn v1.2.4 // indirect - github.com/mailgun/raymond/v2 v2.0.48 // indirect - github.com/mailru/easyjson v0.7.7 // indirect - github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect - github.com/microcosm-cc/bluemonday v1.0.25 // indirect - github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/pelletier/go-toml/v2 v2.0.8 // indirect - github.com/russross/blackfriday/v2 v2.1.0 // indirect - github.com/schollz/closestmatch v2.1.0+incompatible // indirect - github.com/sirupsen/logrus v1.8.1 // indirect - github.com/tdewolff/minify/v2 v2.12.9 // indirect - github.com/tdewolff/parse/v2 v2.6.8 // indirect - github.com/twitchyliquid64/golang-asm v0.15.1 // indirect - github.com/ugorji/go/codec v1.2.11 // indirect - github.com/valyala/bytebufferpool v1.0.0 // indirect - github.com/valyala/fasttemplate v1.2.2 // indirect - github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect - github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect - github.com/yosssi/ace v0.0.5 // indirect - golang.org/x/arch v0.3.0 // indirect - golang.org/x/crypto v0.13.0 // indirect - golang.org/x/net v0.15.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/text v0.13.0 // indirect - golang.org/x/time v0.3.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect - gopkg.in/ini.v1 v1.67.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/hashicorp/go-cleanhttp v0.5.2 // indirect + github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + golang.org/x/sys v0.29.0 // indirect + gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index da96c7d..c81a257 100644 --- a/go.sum +++ b/go.sum @@ -1,210 +1,45 @@ -github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= -github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 h1:sR+/8Yb4slttB4vD+b9btVEnWgL3Q00OBTzVT8B9C0c= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= -github.com/CloudyKit/jet/v6 v6.2.0 h1:EpcZ6SR9n28BUGtNJSvlBqf90IpjeFr36Tizxhn/oME= -github.com/CloudyKit/jet/v6 v6.2.0/go.mod h1:d3ypHeIRNo2+XyqnGA8s+aphtcVpjP5hPwP/Lzo7Ro4= -github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/Joker/jade v1.1.3 h1:Qbeh12Vq6BxURXT1qZBRHsDxeURB8ztcL6f3EXSGeHk= -github.com/Joker/jade v1.1.3/go.mod h1:T+2WLyt7VH6Lp0TRxQrUYEs64nRc83wkMQrfeIQKduM= github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk= -github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 h1:KkH3I3sJuOLP3TjA/dfr4NAY8bghDwnXiU7cTKxQqo0= -github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06/go.mod h1:7erjKLwalezA0k99cWs5L11HWOAPNjdUZ6RxH1BXbbM= -github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs= -github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= +github.com/adrg/xdg v0.5.3 h1:xRnxJXne7+oWDatRhR1JLnvuccuIeCoBu2rtuLqQB78= +github.com/adrg/xdg v0.5.3/go.mod h1:nlTsY+NNiCBGCK2tpm09vRqfVzrc2fLmXGpBLF0zlTQ= github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ= github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk= -github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= -github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= -github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= -github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s= -github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= -github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= -github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= -github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/deepmap/oapi-codegen v1.15.0 h1:SQqViaeb4k2vMul8gx12oDOIadEtoRqTdLkxjzqtQ90= -github.com/deepmap/oapi-codegen v1.15.0/go.mod h1:a6KoHV7lMRwsPoEg2C6NDHiXYV3EQfiFocOlJ8dgJQE= -github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/flosch/pongo2/v4 v4.0.2 h1:gv+5Pe3vaSVmiJvh/BZa82b7/00YUGm0PIyVVLop0Hw= -github.com/flosch/pongo2/v4 v4.0.2/go.mod h1:B5ObFANs/36VwxxlgKpdchIJHMvHB562PW+BWPhwZD8= -github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= -github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= -github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= -github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= -github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= -github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= -github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= -github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= -github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js= -github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= -github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= -github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/gomarkdown/markdown v0.0.0-20230716120725-531d2d74bc12 h1:uK3X/2mt4tbSGoHvbLBHUny7CKiuwUip3MArtukol4E= -github.com/gomarkdown/markdown v0.0.0-20230716120725-531d2d74bc12/go.mod h1:JDGcbDT52eL4fju3sZ4TeHGsQwhG9nbDV21aMyhwPoA= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= -github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= -github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= -github.com/iris-contrib/schema v0.0.6 h1:CPSBLyx2e91H2yJzPuhGuifVRnZBBJ3pCOMbOvPZaTw= -github.com/iris-contrib/schema v0.0.6/go.mod h1:iYszG0IOsuIsfzjymw1kMzTL8YQcCWlm65f3wX8J5iA= -github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= -github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= +github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= +github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-retryablehttp v0.7.8 h1:ylXZWnqa7Lhqpk0L1P1LzDtGcCR0rPVUrx/c8Unxc48= +github.com/hashicorp/go-retryablehttp v0.7.8/go.mod h1:rjiScheydd+CxvumBsIrFKlx3iS0jrZ7LvzFGFmuKbw= github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE= -github.com/kataras/blocks v0.0.7 h1:cF3RDY/vxnSRezc7vLFlQFTYXG/yAr1o7WImJuZbzC4= -github.com/kataras/blocks v0.0.7/go.mod h1:UJIU97CluDo0f+zEjbnbkeMRlvYORtmc1304EeyXf4I= -github.com/kataras/golog v0.1.9 h1:vLvSDpP7kihFGKFAvBSofYo7qZNULYSHOH2D7rPTKJk= -github.com/kataras/golog v0.1.9/go.mod h1:jlpk/bOaYCyqDqH18pgDHdaJab72yBE6i0O3s30hpWY= -github.com/kataras/iris/v12 v12.2.6-0.20230908161203-24ba4e8933b9 h1:Vx8kDVhO2qepK8w44lBtp+RzN3ld743i+LYPzODJSpQ= -github.com/kataras/iris/v12 v12.2.6-0.20230908161203-24ba4e8933b9/go.mod h1:ldkoR3iXABBeqlTibQ3MYaviA1oSlPvim6f55biwBh4= -github.com/kataras/pio v0.0.12 h1:o52SfVYauS3J5X08fNjlGS5arXHjW/ItLkyLcKjoH6w= -github.com/kataras/pio v0.0.12/go.mod h1:ODK/8XBhhQ5WqrAhKy+9lTPS7sBf6O3KcLhc9klfRcY= -github.com/kataras/sitemap v0.0.6 h1:w71CRMMKYMJh6LR2wTgnk5hSgjVNB9KL60n5e2KHvLY= -github.com/kataras/sitemap v0.0.6/go.mod h1:dW4dOCNs896OR1HmG+dMLdT7JjDk7mYBzoIRwuj5jA4= -github.com/kataras/tunnel v0.0.4 h1:sCAqWuJV7nPzGrlb0os3j49lk2JhILT0rID38NHNLpA= -github.com/kataras/tunnel v0.0.4/go.mod h1:9FkU4LaeifdMWqZu7o20ojmW4B7hdhv2CMLwfnHGpYw= -github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= -github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= -github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/labstack/echo/v4 v4.11.1 h1:dEpLU2FLg4UVmvCGPuk/APjlH6GDpbEPti61srUUUs4= -github.com/labstack/echo/v4 v4.11.1/go.mod h1:YuYRTSM3CHs2ybfrL8Px48bO6BAnYIN4l8wSTMP6BDQ= -github.com/labstack/gommon v0.4.0 h1:y7cvthEAEbU0yHOf4axH8ZG2NH8knB9iNSoTO8dyIk8= -github.com/labstack/gommon v0.4.0/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM= -github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= -github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= -github.com/mailgun/raymond/v2 v2.0.48 h1:5dmlB680ZkFG2RN/0lvTAghrSxIESeu9/2aeDqACtjw= -github.com/mailgun/raymond/v2 v2.0.48/go.mod h1:lsgvL50kgt1ylcFJYZiULi5fjPBkkhNfj4KA0W54Z18= -github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= -github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/microcosm-cc/bluemonday v1.0.25 h1:4NEwSfiJ+Wva0VxN5B8OwMicaJvD8r9tlJWm9rtloEg= -github.com/microcosm-cc/bluemonday v1.0.25/go.mod h1:ZIOjCQp1OrzBBPIJmfX4qDYFuhU02nx4bn030ixfHLE= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= -github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/oapi-codegen/runtime v1.3.0 h1:vyK1zc0gDWWXgk2xoQa4+X4RNNc5SL2RbTpJS/4vMYA= +github.com/oapi-codegen/runtime v1.3.0/go.mod h1:kOdeacKy7t40Rclb1je37ZLFboFxh+YLy0zaPCMibPY= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= -github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/schollz/closestmatch v2.1.0+incompatible h1:Uel2GXEpJqOWBrlyI+oY9LTiyyjYS17cCYRqP13/SHk= -github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= -github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= -github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/tdewolff/minify/v2 v2.12.9 h1:dvn5MtmuQ/DFMwqf5j8QhEVpPX6fi3WGImhv8RUB4zA= -github.com/tdewolff/minify/v2 v2.12.9/go.mod h1:qOqdlDfL+7v0/fyymB+OP497nIxJYSvX4MQWA8OoiXU= -github.com/tdewolff/parse/v2 v2.6.8 h1:mhNZXYCx//xG7Yq2e/kVLNZw4YfYmeHbhx+Zc0OvFMA= -github.com/tdewolff/parse/v2 v2.6.8/go.mod h1:XHDhaU6IBgsryfdnpzUXBlT6leW/l25yrFBTEb4eIyM= -github.com/tdewolff/test v1.0.9/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE= -github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= -github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= -github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= -github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= -github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo= -github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= -github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= -github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= -github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= -github.com/yosssi/ace v0.0.5 h1:tUkIP/BLdKqrlrPwcmH0shwEEhTRHoGnc1wFIWmaBUA= -github.com/yosssi/ace v0.0.5/go.mod h1:ALfIzm2vT7t5ZE7uoIZqF3TQ7SAOyupFZnkrF5id+K0= -github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= -golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= -golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= -golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= -golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= -golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= +golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= -gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= diff --git a/models.gen.go b/models.gen.go index 3ef3013..68ff4f8 100644 --- a/models.gen.go +++ b/models.gen.go @@ -1,35 +1,179 @@ // Package cloudquery_api provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen version v1.13.3 DO NOT EDIT. +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT. package cloudquery_api import ( + "encoding/json" + "fmt" "time" + + openapi_types "github.com/oapi-codegen/runtime/types" ) const ( + BasicAuthScopes = "basicAuth.Scopes" BearerAuthScopes = "bearerAuth.Scopes" + CookieAuthScopes = "cookieAuth.Scopes" +) + +// Defines values for APIKeyScope. +const ( + APIKeyScopeReadAndWrite APIKeyScope = "read-and-write" + APIKeyScopeSyncsOperationsOnly APIKeyScope = "syncs-operations-only" +) + +// Defines values for AddonCategory. +const ( + AddonCategoryCloudInfrastructure AddonCategory = "cloud-infrastructure" + AddonCategoryDatabases AddonCategory = "databases" + AddonCategoryEngineeringAnalytics AddonCategory = "engineering-analytics" + AddonCategoryOther AddonCategory = "other" + AddonCategorySalesMarketing AddonCategory = "sales-marketing" +) + +// Defines values for AddonFormat. +const ( + AddonFormatZip AddonFormat = "zip" +) + +// Defines values for AddonOrderStatus. +const ( + AddonOrderStatusCancelled AddonOrderStatus = "cancelled" + AddonOrderStatusCompleted AddonOrderStatus = "completed" + AddonOrderStatusPending AddonOrderStatus = "pending" +) + +// Defines values for AddonTier. +const ( + AddonTierFree AddonTier = "free" + AddonTierPaid AddonTier = "paid" +) + +// Defines values for AddonType. +const ( + AddonTypeTransformation AddonType = "transformation" + AddonTypeVisualization AddonType = "visualization" +) + +// Defines values for ContentType. +const ( + ContentTypeImagejpeg ContentType = "image/jpeg" + ContentTypeImagepng ContentType = "image/png" + ContentTypeImagewebp ContentType = "image/webp" +) + +// Defines values for EmailTeamInvitationRequestRole. +const ( + EmailTeamInvitationRequestRoleAdmin EmailTeamInvitationRequestRole = "admin" + EmailTeamInvitationRequestRoleMember EmailTeamInvitationRequestRole = "member" +) + +// Defines values for ManagedDatabaseStatus. +const ( + ManagedDatabaseStatusExpired ManagedDatabaseStatus = "expired" + ManagedDatabaseStatusFailed ManagedDatabaseStatus = "failed" + ManagedDatabaseStatusPending ManagedDatabaseStatus = "pending" + ManagedDatabaseStatusReady ManagedDatabaseStatus = "ready" ) // Defines values for PluginCategory. const ( - CloudInfrastructure PluginCategory = "cloud-infrastructure" - Databases PluginCategory = "databases" - EngineeringAnalytics PluginCategory = "engineering-analytics" - Other PluginCategory = "other" - SalesMarketing PluginCategory = "sales-marketing" + PluginCategoryCloudFinops PluginCategory = "cloud-finops" + PluginCategoryCloudInfrastructure PluginCategory = "cloud-infrastructure" + PluginCategoryCustomerSupport PluginCategory = "customer-support" + PluginCategoryDataWarehouses PluginCategory = "data-warehouses" + PluginCategoryDatabases PluginCategory = "databases" + PluginCategoryEngineeringAnalytics PluginCategory = "engineering-analytics" + PluginCategoryFinance PluginCategory = "finance" + PluginCategoryFleetManagement PluginCategory = "fleet-management" + PluginCategoryHumanResources PluginCategory = "human-resources" + PluginCategoryMarketingAnalytics PluginCategory = "marketing-analytics" + PluginCategoryOther PluginCategory = "other" + PluginCategoryProductAnalytics PluginCategory = "product-analytics" + PluginCategoryProjectManagement PluginCategory = "project-management" + PluginCategorySalesMarketing PluginCategory = "sales-marketing" + PluginCategorySecurity PluginCategory = "security" + PluginCategoryShipmentTracking PluginCategory = "shipment-tracking" +) + +// Defines values for PluginKind. +const ( + PluginKindDestination PluginKind = "destination" + PluginKindSource PluginKind = "source" + PluginKindTransformer PluginKind = "transformer" +) + +// Defines values for PluginNotificationRequestStatus. +const ( + PluginNotificationRequestStatusPending PluginNotificationRequestStatus = "pending" + PluginNotificationRequestStatusSent PluginNotificationRequestStatus = "sent" +) + +// Defines values for PluginPackageType. +const ( + PluginPackageTypeDocker PluginPackageType = "docker" + PluginPackageTypeNative PluginPackageType = "native" +) + +// Defines values for PluginPriceCategory. +const ( + PluginPriceCategoryApi PluginPriceCategory = "api" + PluginPriceCategoryDatabase PluginPriceCategory = "database" + PluginPriceCategoryFree PluginPriceCategory = "free" +) + +// Defines values for PluginReleaseStage. +const ( + PluginReleaseStageComingSoon PluginReleaseStage = "coming-soon" + PluginReleaseStageDeprecated PluginReleaseStage = "deprecated" + PluginReleaseStageGa PluginReleaseStage = "ga" + PluginReleaseStagePreview PluginReleaseStage = "preview" +) + +// Defines values for PluginReleaseStageCreate. +const ( + PluginReleaseStageCreateComingSoon PluginReleaseStageCreate = "coming-soon" + PluginReleaseStageCreateGa PluginReleaseStageCreate = "ga" + PluginReleaseStageCreatePreview PluginReleaseStageCreate = "preview" +) + +// Defines values for PluginReleaseStageUpdate. +const ( + PluginReleaseStageUpdateComingSoon PluginReleaseStageUpdate = "coming-soon" + PluginReleaseStageUpdateDeprecated PluginReleaseStageUpdate = "deprecated" + PluginReleaseStageUpdateGa PluginReleaseStageUpdate = "ga" + PluginReleaseStageUpdatePreview PluginReleaseStageUpdate = "preview" ) // Defines values for PluginTier. const ( - Free PluginTier = "free" - Paid PluginTier = "paid" + PluginTierFree PluginTier = "free" + PluginTierOpenCore PluginTier = "open-core" + PluginTierPaid PluginTier = "paid" +) + +// Defines values for TeamPlan. +const ( + TeamPlanEnterprise TeamPlan = "enterprise" + TeamPlanFree TeamPlan = "free" + TeamPlanPaid TeamPlan = "paid" + TeamPlanTrial TeamPlan = "trial" ) -// Defines values for PluginVersionPackageType. +// Defines values for TeamSubscriptionOrderStatus. const ( - PluginVersionPackageTypeDocker PluginVersionPackageType = "docker" - PluginVersionPackageTypeNative PluginVersionPackageType = "native" + TeamSubscriptionOrderStatusCancelled TeamSubscriptionOrderStatus = "cancelled" + TeamSubscriptionOrderStatusCompleted TeamSubscriptionOrderStatus = "completed" + TeamSubscriptionOrderStatusPending TeamSubscriptionOrderStatus = "pending" +) + +// Defines values for AddonSortBy. +const ( + AddonSortByCreatedAt AddonSortBy = "created_at" + AddonSortByDownloads AddonSortBy = "downloads" + AddonSortByName AddonSortBy = "name" + AddonSortByUpdatedAt AddonSortBy = "updated_at" ) // Defines values for PluginSortBy. @@ -45,6 +189,19 @@ const ( VersionSortByCreatedAt VersionSortBy = "created_at" ) +// Defines values for ListAddonsParamsSortBy. +const ( + ListAddonsParamsSortByCreatedAt ListAddonsParamsSortBy = "created_at" + ListAddonsParamsSortByDownloads ListAddonsParamsSortBy = "downloads" + ListAddonsParamsSortByName ListAddonsParamsSortBy = "name" + ListAddonsParamsSortByUpdatedAt ListAddonsParamsSortBy = "updated_at" +) + +// Defines values for ListAddonVersionsParamsSortBy. +const ( + ListAddonVersionsParamsSortByCreatedAt ListAddonVersionsParamsSortBy = "created_at" +) + // Defines values for ListPluginsParamsSortBy. const ( ListPluginsParamsSortByCreatedAt ListPluginsParamsSortBy = "created_at" @@ -58,247 +215,359 @@ const ( ListPluginVersionsParamsSortByCreatedAt ListPluginVersionsParamsSortBy = "created_at" ) -// Defines values for CreatePluginVersionJSONBodyPackageType. +// Defines values for GetTeamUsageSummaryParamsMetrics. const ( - CreatePluginVersionJSONBodyPackageTypeDocker CreatePluginVersionJSONBodyPackageType = "docker" - CreatePluginVersionJSONBodyPackageTypeNative CreatePluginVersionJSONBodyPackageType = "native" + GetTeamUsageSummaryParamsMetricsCloudVcpuSeconds GetTeamUsageSummaryParamsMetrics = "cloud_vcpu_seconds" + GetTeamUsageSummaryParamsMetricsCloudVramByteSeconds GetTeamUsageSummaryParamsMetrics = "cloud_vram_byte_seconds" + GetTeamUsageSummaryParamsMetricsNetworkEgressBytes GetTeamUsageSummaryParamsMetrics = "network_egress_bytes" + GetTeamUsageSummaryParamsMetricsPaidRows GetTeamUsageSummaryParamsMetrics = "paid_rows" ) -// ApiKey API Key to interact with CloudQuery Cloud under specific team -type ApiKey struct { - CreatedAt *time.Time `json:"created_at,omitempty"` - CreatedBy *Email `json:"created_by,omitempty"` +// Defines values for GetTeamUsageSummaryParamsAggregationPeriod. +const ( + GetTeamUsageSummaryParamsAggregationPeriodDay GetTeamUsageSummaryParamsAggregationPeriod = "day" + GetTeamUsageSummaryParamsAggregationPeriodMonth GetTeamUsageSummaryParamsAggregationPeriod = "month" +) - // Key API key. Will be shown only in the response when creating the key. - Key *string `json:"key,omitempty"` - Name *string `json:"name,omitempty"` +// Defines values for GetGroupedTeamUsageSummaryParamsMetrics. +const ( + GetGroupedTeamUsageSummaryParamsMetricsCloudVcpuSeconds GetGroupedTeamUsageSummaryParamsMetrics = "cloud_vcpu_seconds" + GetGroupedTeamUsageSummaryParamsMetricsCloudVramByteSeconds GetGroupedTeamUsageSummaryParamsMetrics = "cloud_vram_byte_seconds" + GetGroupedTeamUsageSummaryParamsMetricsNetworkEgressBytes GetGroupedTeamUsageSummaryParamsMetrics = "network_egress_bytes" + GetGroupedTeamUsageSummaryParamsMetricsPaidRows GetGroupedTeamUsageSummaryParamsMetrics = "paid_rows" +) + +// Defines values for GetGroupedTeamUsageSummaryParamsAggregationPeriod. +const ( + GetGroupedTeamUsageSummaryParamsAggregationPeriodDay GetGroupedTeamUsageSummaryParamsAggregationPeriod = "day" + GetGroupedTeamUsageSummaryParamsAggregationPeriodMonth GetGroupedTeamUsageSummaryParamsAggregationPeriod = "month" +) + +// Defines values for GetGroupedTeamUsageSummaryParamsGroupBy. +const ( + GetGroupedTeamUsageSummaryParamsGroupByPlugin GetGroupedTeamUsageSummaryParamsGroupBy = "plugin" + GetGroupedTeamUsageSummaryParamsGroupByPriceCategory GetGroupedTeamUsageSummaryParamsGroupBy = "price_category" + GetGroupedTeamUsageSummaryParamsGroupBySyncId GetGroupedTeamUsageSummaryParamsGroupBy = "sync_id" +) + +// AIOnboardingChat200Response defines model for AIOnboardingChat_200_response. +type AIOnboardingChat200Response struct { + // FunctionCall The name of the function being called (if any) + FunctionCall *interface{} `json:"function_call,omitempty"` + + // FunctionCallArguments Arguments for the function call (if any) + FunctionCallArguments *interface{} `json:"function_call_arguments,omitempty"` + + // FunctionCallID ID of the function call (if any) + FunctionCallID *interface{} `json:"function_call_id,omitempty"` + + // Message The AI assistant's response message + Message interface{} `json:"message"` + AdditionalProperties map[string]interface{} `json:"-"` } -// BasicError Basic Error -type BasicError struct { - Message string `json:"message"` - Status int `json:"status"` +// AIOnboardingChatRequest defines model for AIOnboardingChat_request. +type AIOnboardingChatRequest struct { + // ChatMode Optional chat mode - "web" for markdown output, "terminal" for plain text output + ChatMode *interface{} `json:"chat_mode,omitempty"` + + // ConversationID Optional conversation ID to continue an existing conversation + ConversationID *interface{} `json:"conversation_id,omitempty"` + + // FunctionCallOutputs Function call outputs from previous interactions + FunctionCallOutputs *interface{} `json:"function_call_outputs,omitempty"` + + // Message The user's message to send to the AI assistant + Message *interface{} `json:"message,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` } -// Email defines model for Email. -type Email = string +// AIOnboardingEndConversation200Response defines model for AIOnboardingEndConversation_200_response. +type AIOnboardingEndConversation200Response struct { + // Success Whether the conversation was ended successfully + Success *interface{} `json:"success,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` +} -// ImageURL defines model for ImageURL. -type ImageURL struct { - DownloadUrl string `json:"download_url"` - UploadUrl string `json:"upload_url"` +// AIOnboardingNewConversation200Response defines model for AIOnboardingNewConversation_200_response. +type AIOnboardingNewConversation200Response struct { + // ConversationID The ID of the new conversation + ConversationID interface{} `json:"conversation_id"` + AdditionalProperties map[string]interface{} `json:"-"` } -// Invitation defines model for Invitation. -type Invitation struct { - CreatedAt time.Time `json:"created_at"` - Email Email `json:"email"` - Role string `json:"role"` +// AIOnboardingNewConversationRequest defines model for AIOnboardingNewConversation_request. +type AIOnboardingNewConversationRequest struct { + // TryResume If true, resume existing conversation instead of starting a new one + TryResume *interface{} `json:"try_resume,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` +} - // TeamName The unique name for the team. - TeamName TeamName `json:"team_name"` +// APIKey API Key to interact with CloudQuery Cloud under specific team +type APIKey struct { + CreatedAt *time.Time `json:"created_at,omitempty"` + + // CreatedBy email of the user that created the API key + CreatedBy *string `json:"created_by,omitempty"` + + // Expired Whether the API key has expired or not + Expired bool `json:"expired"` + + // ExpiresAt Timestamp at which API key will stop working + ExpiresAt time.Time `json:"expires_at"` + + // APIKeyID ID of the API key + APIKeyID APIKeyID `json:"id"` + + // Key API key. Will be shown only in the response when creating the key. + Key *string `json:"key,omitempty"` + + // LastAccessAt Timestamp at which API key was last used - accurate to the day only. + LastAccessAt *time.Time `json:"last_access_at,omitempty"` + + // Name Name of the API key + Name APIKeyName `json:"name"` + + // Scope Scope of permissions for the API key. API keys are used for creating new plugin versions and downloading existing plugins + Scope APIKeyScope `json:"scope"` } -// ListMetadata defines model for ListMetadata. -type ListMetadata struct { - LastPage *int `json:"last_page,omitempty"` - TotalCount *int `json:"total_count,omitempty"` +// APIKeyID ID of the API key +type APIKeyID = openapi_types.UUID + +// APIKeyName Name of the API key +type APIKeyName = string + +// APIKeyScope Scope of permissions for the API key. API keys are used for creating new plugin versions and downloading existing plugins +type APIKeyScope string + +// AcceptTeamInvitationRequest defines model for AcceptTeamInvitation_request. +type AcceptTeamInvitationRequest struct { + Token openapi_types.UUID `json:"token"` } -// Membership defines model for Membership. -type Membership struct { - Role string `json:"role"` +// ActivatePlatform200Response defines model for ActivatePlatform_200_response. +type ActivatePlatform200Response struct { + // ActivationID Activation ID for the platform + ActivationID interface{} `json:"activation_id"` - // Team CloudQuery Team - Team *Team `json:"team,omitempty"` + // NextCheckInSeconds Time in seconds until the next check in + NextCheckInSeconds interface{} `json:"next_check_in_seconds"` - // User CloudQuery User - User *User `json:"user,omitempty"` + // TeamName Name of the team that was activated + TeamName interface{} `json:"team_name"` + AdditionalProperties map[string]interface{} `json:"-"` } -// Plugin CloudQuery Plugin -type Plugin struct { - // Category Supported categories for plugins - Category PluginCategory `json:"category"` - CreatedAt time.Time `json:"created_at"` - Destination bool `json:"destination"` +// ActivatePlatform205Response defines model for ActivatePlatform_205_response. +type ActivatePlatform205Response struct { + // ButtonText Text for the button + ButtonText *interface{} `json:"button_text,omitempty"` - // DisplayName The plugin's display name - DisplayName string `json:"display_name"` - Homepage *string `json:"homepage,omitempty"` - Logo string `json:"logo"` + // ButtonURL URL for the button + ButtonURL *interface{} `json:"button_url,omitempty"` - // Name The unique name for the plugin. - Name PluginName `json:"name"` - Official bool `json:"official"` - Repository *string `json:"repository,omitempty"` - ShortDescription string `json:"short_description"` - Source bool `json:"source"` + // Error Error message + Error interface{} `json:"error"` + AdditionalProperties map[string]interface{} `json:"-"` +} - // TeamName The unique name for the team. - TeamName TeamName `json:"team_name"` +// ActivatePlatformRequest defines model for ActivatePlatform_request. +type ActivatePlatformRequest struct { + // APIKey Team API key to activate platform with + APIKey interface{} `json:"api_key"` - // Tier Supported tiers for plugins - Tier PluginTier `json:"tier"` + // InstallationID Installation ID of the platform + InstallationID interface{} `json:"installation_id"` + AdditionalProperties map[string]interface{} `json:"-"` } -// PluginCategory Supported categories for plugins -type PluginCategory string +// Addon CloudQuery Addon +type Addon struct { + // AddonFormat Supported formats for addons + AddonFormat AddonFormat `json:"addon_format"` -// PluginCreate defines model for PluginCreate. -type PluginCreate struct { - // Category Supported categories for plugins - Category PluginCategory `json:"category"` - Destination bool `json:"destination"` + // AddonType Supported types for addons + AddonType AddonType `json:"addon_type"` - // DisplayName The plugin's display name, as shown in the CloudQuery Hub. + // Category Supported categories for addons + Category AddonCategory `json:"category"` + CreatedAt time.Time `json:"created_at"` + + // DisplayName The addon's display name DisplayName string `json:"display_name"` Homepage *string `json:"homepage,omitempty"` + Logo string `json:"logo"` - // Logo URL to the plugin's logo. This will be shown in the CloudQuery Hub. This must point to https://images.cloudquery.io/... - Logo string `json:"logo"` + // Name The unique name for the addon. + Name AddonName `json:"name"` - // Name The unique name for the plugin. - Name PluginName `json:"name"` - Repository *string `json:"repository,omitempty"` + // Official True if the addon is maintained by CloudQuery, false otherwise + Official bool `json:"official"` - // ShortDescription Short description of the plugin. This will be shown in the CloudQuery Hub. - ShortDescription string `json:"short_description"` - Source bool `json:"source"` + // PriceUSD The price for 6 months + PriceUSD string `json:"price_usd"` + + // Public Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team. + Public *bool `json:"public,omitempty"` + Repository *string `json:"repository,omitempty"` + ShortDescription string `json:"short_description"` // TeamName The unique name for the team. TeamName TeamName `json:"team_name"` - // Tier Supported tiers for plugins - Tier PluginTier `json:"tier"` + // Tier Supported tiers for addons + Tier AddonTier `json:"tier"` + UpdatedAt time.Time `json:"updated_at"` } -// PluginDocsPage CloudQuery Plugin Documentation Page -type PluginDocsPage struct { - // Content The content of the documentation page. Supports markdown. - Content string `json:"content"` - - // Name The unique name for the plugin documentation page. - Name PluginDocsPageName `json:"name"` +// AddonAsset CloudQuery Addon Asset +type AddonAsset struct { + // Checksum The checksum of the addon asset + Checksum string `json:"checksum"` - // Title The title of the documentation page - Title string `json:"title"` + // Location The location to download the addon asset from + Location string `json:"location"` } -// PluginDocsPageName The unique name for the plugin documentation page. -type PluginDocsPageName = string +// AddonCategory Supported categories for addons +type AddonCategory string -// PluginName The unique name for the plugin. -type PluginName = string +// AddonCreate CloudQuery AddonCreate +type AddonCreate struct { + // AddonFormat Supported formats for addons + AddonFormat AddonFormat `json:"addon_format"` -// PluginTable CloudQuery Plugin Table -type PluginTable struct { - // Description Description of the table - Description *string `json:"description,omitempty"` + // AddonType Supported types for addons + AddonType AddonType `json:"addon_type"` - // IsIncremental Whether the table is incremental - IsIncremental *bool `json:"is_incremental,omitempty"` + // Category Supported categories for addons + Category AddonCategory `json:"category"` - // Name Name of the table - Name *PluginTableName `json:"name,omitempty"` + // DisplayName The addon's display name + DisplayName string `json:"display_name"` + Homepage *string `json:"homepage,omitempty"` + Logo *string `json:"logo,omitempty"` - // Parent Name of the parent table, if any - Parent *string `json:"parent,omitempty"` + // Name The unique name for the addon. + Name AddonName `json:"name"` - // Relations Names of the tables that depend on this table - Relations *[]string `json:"relations,omitempty"` + // PriceUSD The price for 6 months + PriceUSD *string `json:"price_usd,omitempty"` - // Title Title of the table - Title *string `json:"title,omitempty"` + // Public Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team. + Public bool `json:"public"` + Repository *string `json:"repository,omitempty"` + ShortDescription string `json:"short_description"` + + // TeamName The unique name for the team. + TeamName TeamName `json:"team_name"` + + // Tier Supported tiers for addons + Tier AddonTier `json:"tier"` } -// PluginTableColumn CloudQuery Plugin Column -type PluginTableColumn struct { - // Description Description of the column - Description *string `json:"description,omitempty"` +// AddonFormat Supported formats for addons +type AddonFormat string - // IncrementalKey Whether the column is used as an incremental key - IncrementalKey *bool `json:"incremental_key,omitempty"` +// AddonName The unique name for the addon. +type AddonName = string - // IsUnique Whether the column has a unique constraint - IsUnique *bool `json:"is_unique,omitempty"` +// AddonOrder CloudQuery Addon Order +type AddonOrder struct { + // AddonName The unique name for the addon. + AddonName AddonName `json:"addon_name"` - // Name Name of the column - Name *string `json:"name,omitempty"` + // AddonTeam The unique name for the team. + AddonTeam TeamName `json:"addon_team"` - // NotNull Whether the column is nullable - NotNull *bool `json:"not_null,omitempty"` + // AddonType Supported types for addons + AddonType AddonType `json:"addon_type"` + CompletedAt *time.Time `json:"completed_at,omitempty"` - // PrimaryKey Whether the column is part of the primary key - PrimaryKey *bool `json:"primary_key,omitempty"` + // CompletionURL Stripe URL for completing purchase. Only shown in response to POST request. + CompletionURL *string `json:"completion_url,omitempty"` + CreatedAt time.Time `json:"created_at"` - // Type Arrow Type of the column - Type *string `json:"type,omitempty"` + // AddonOrderID ID of the addon order + AddonOrderID AddonOrderID `json:"id"` + Status AddonOrderStatus `json:"status"` + + // TeamName The unique name for the team. + TeamName TeamName `json:"team_name"` + UpdatedAt time.Time `json:"updated_at"` } -// PluginTableDetails defines model for PluginTableDetails. -type PluginTableDetails struct { - // Columns List of columns - Columns *[]PluginTableColumn `json:"columns,omitempty"` +// AddonOrderCreate Create CloudQuery Addon Order +type AddonOrderCreate struct { + // AddonName The unique name for the addon. + AddonName AddonName `json:"addon_name"` - // Description Description of the table - Description *string `json:"description,omitempty"` + // AddonTeam The unique name for the team. + AddonTeam TeamName `json:"addon_team"` - // IsIncremental Whether the table is incremental - IsIncremental *bool `json:"is_incremental,omitempty"` + // AddonType Supported types for addons + AddonType AddonType `json:"addon_type"` - // Name Name of the table - Name *string `json:"name,omitempty"` + // CancelUrl URL to redirect to after order cancellation + CancelUrl string `json:"cancel_url"` - // Parent Name of the parent table, if any - Parent *string `json:"parent,omitempty"` + // SuccessUrl URL to redirect to after successful order completion + SuccessUrl string `json:"success_url"` +} - // Relations Names of the tables that depend on this table - Relations *[]string `json:"relations,omitempty"` +// AddonOrderID ID of the addon order +type AddonOrderID = openapi_types.UUID - // Title Title of the table - Title *string `json:"title,omitempty"` -} +// AddonOrderStatus defines model for AddonOrderStatus. +type AddonOrderStatus string -// PluginTableName Name of the table -type PluginTableName = string +// AddonTier Supported tiers for addons +type AddonTier string -// PluginTier Supported tiers for plugins -type PluginTier string +// AddonType Supported types for addons +type AddonType string -// PluginUpdate defines model for PluginUpdate. -type PluginUpdate struct { - // Category Supported categories for plugins - Category PluginCategory `json:"category"` - Destination bool `json:"destination"` +// AddonUpdate CloudQuery AddonUpdate +type AddonUpdate struct { + // AddonFormat Supported formats for addons + AddonFormat *AddonFormat `json:"addon_format,omitempty"` - // DisplayName The plugin's display name, as shown in the CloudQuery Hub. - DisplayName string `json:"display_name"` - Homepage *string `json:"homepage,omitempty"` + // Category Supported categories for addons + Category *AddonCategory `json:"category,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` - // Listed If plugin is not listed, it won't be visible or accessible in the registry. - Listed *bool `json:"listed,omitempty"` + // DisplayName The addon's display name + DisplayName *string `json:"display_name,omitempty"` + Homepage *string `json:"homepage,omitempty"` + Logo *string `json:"logo,omitempty"` - // Logo URL to the plugin's logo. This will be shown in the CloudQuery Hub. This must point to https://images.cloudquery.io/... - Logo string `json:"logo"` - Repository *string `json:"repository,omitempty"` + // PriceUSD The price for 6 months in USD + PriceUSD *string `json:"price_usd,omitempty"` - // ShortDescription Short description of the plugin. This will be shown in the CloudQuery Hub. - ShortDescription string `json:"short_description"` - Source bool `json:"source"` + // Public Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team. + Public *bool `json:"public,omitempty"` + Repository *string `json:"repository,omitempty"` + ShortDescription *string `json:"short_description,omitempty"` - // Tier Supported tiers for plugins - Tier PluginTier `json:"tier"` + // Tier Supported tiers for addons + Tier *AddonTier `json:"tier,omitempty"` } -// PluginVersion CloudQuery Plugin Version -type PluginVersion struct { - // Checksums The checksums of the plugin assets - Checksums []string `json:"checksums"` +// AddonVersion CloudQuery Addon Version +type AddonVersion struct { + // AddonDeps list of other addons this addon depends on in the format of team_name/type/name@version + AddonDeps *[]string `json:"addon_deps,omitempty"` + + // Checksum The checksum of the addon asset + Checksum string `json:"checksum"` // CreatedAt The date and time the plugin version was created. CreatedAt time.Time `json:"created_at"` + // Doc Main README in MD format + Doc string `json:"doc"` + // Draft If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version. Draft bool `json:"draft"` @@ -308,327 +577,4279 @@ type PluginVersion struct { // Name The version in semantic version format. Name VersionName `json:"name"` - // PackageType The package type of the plugin assets - PackageType PluginVersionPackageType `json:"package_type"` + // PluginDeps list of plugins the addon depends on in the format of team_name/kind/name@version + PluginDeps *[]string `json:"plugin_deps,omitempty"` - // Protocols The CloudQuery protocols supported by this plugin version - Protocols []int `json:"protocols"` + // PublishedAt The date and time the plugin version was set to non-draft (published). + PublishedAt *time.Time `json:"published_at,omitempty"` - // Retracted If a plugin version is retracted, assets will not be available and it will not be counted as the latest version. + // Retracted If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use. Retracted bool `json:"retracted"` - - // SupportedTargets The targets supported by this plugin version, formatted as _ - SupportedTargets []string `json:"supported_targets"` } -// PluginVersionPackageType The package type of the plugin assets -type PluginVersionPackageType string +// AddonVersionUpdate defines model for AddonVersionUpdate. +type AddonVersionUpdate struct { + // AddonDeps list of other addons this addon depends on in the format of team_name/type/name@version + AddonDeps *[]string `json:"addon_deps,omitempty"` -// PluginVersionUpdate defines model for PluginVersionUpdate. -type PluginVersionUpdate struct { - // Checksums The SHA-256 checksums of the plugin binaries, one per supported target. - Checksums *[]string `json:"checksums,omitempty"` + // Checksum The checksum of the addon asset + Checksum *string `json:"checksum,omitempty"` - // Draft If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version. Once draft is set to false, only certain fields can be updated. + // Doc Main README in MD format + Doc *string `json:"doc,omitempty"` + + // Draft If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version. Draft *bool `json:"draft,omitempty"` // Message Description of what's new or changed in this version (supports markdown) Message *string `json:"message,omitempty"` - // PackageType The package type of the plugin binaries - PackageType *string `json:"package_type,omitempty"` + // PluginDeps list of plugins the addon depends on in the format of team_name/kind/name@version + PluginDeps *[]string `json:"plugin_deps,omitempty"` - // Protocols The supported CloudQuery protocols by this plugin version - Protocols *[]int `json:"protocols,omitempty"` + // Retracted If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use. + Retracted *bool `json:"retracted,omitempty"` +} - // Retracted If a plugin version is retracted, assets will not be available and it will not be counted as the latest version. - Retracted *bool `json:"retracted,omitempty"` - SupportedTargets *[]string `json:"supported_targets,omitempty"` +// BasicError Basic Error +type BasicError struct { + Message string `json:"message"` + Status int `json:"status"` } -// ReleaseURL defines model for ReleaseURL. -type ReleaseURL struct { - Url *string `json:"url,omitempty"` +// CheckUserAuthStatus200Response defines model for CheckUserAuthStatus_200_response. +type CheckUserAuthStatus200Response struct { + // Authenticated Whether the user is authenticated + Authenticated bool `json:"authenticated"` } -// Team CloudQuery Team -type Team struct { - CreatedAt *time.Time `json:"created_at,omitempty"` +// ContentType The HTTP Content-Type of the image or asset +type ContentType string - // DisplayName The team's display name - DisplayName string `json:"display_name"` +// CreateAddonVersionRequest defines model for CreateAddonVersion_request. +type CreateAddonVersionRequest struct { + // AddonDeps addon dependencies in the format of ['team_name/type/addon_name@version'] + AddonDeps *[]string `json:"addon_deps,omitempty"` - // Name The unique name for the team. - Name TeamName `json:"name"` -} + // Checksum SHA-256 checksum for the addon asset + Checksum string `json:"checksum"` -// TeamName The unique name for the team. -type TeamName = string + // Doc Main README in MD format + Doc string `json:"doc"` -// User CloudQuery User -type User struct { - CreatedAt *time.Time `json:"created_at,omitempty"` - Email Email `json:"email"` + // Message A message describing what's new or changed in this version. + // This message will be displayed to users in the addon's changelog. + // Supports limited markdown syntax. + Message string `json:"message"` - // Name The unique name for the user. - Name *UserName `json:"name,omitempty"` - UpdatedAt *time.Time `json:"updated_at,omitempty"` + // PluginDeps plugin dependencies in the format of ['team_name/kind/plugin_name@version'] + PluginDeps *[]string `json:"plugin_deps,omitempty"` } -// UserName The unique name for the user. -type UserName = string +// CreatePluginVersionDocs201Response defines model for CreatePluginVersionDocs_201_response. +type CreatePluginVersionDocs201Response struct { + Names *[]PluginDocsPageName `json:"names,omitempty"` +} -// ValidationError defines model for ValidationError. -type ValidationError struct { +// CreatePluginVersionDocsRequest defines model for CreatePluginVersionDocs_request. +type CreatePluginVersionDocsRequest struct { + Pages []PluginDocsPageCreate `json:"pages"` +} + +// CreatePluginVersionTables201Response defines model for CreatePluginVersionTables_201_response. +type CreatePluginVersionTables201Response struct { + Names *[]PluginTableName `json:"names,omitempty"` +} + +// CreatePluginVersionTablesRequest defines model for CreatePluginVersionTables_request. +type CreatePluginVersionTablesRequest struct { + Tables []PluginTableCreate `json:"tables"` +} + +// CreatePluginVersionRequest defines model for CreatePluginVersion_request. +type CreatePluginVersionRequest struct { + // Checksums List of SHA-256 checksums for this plugin version, one for each supported target. + Checksums []string `json:"checksums"` + + // Message A message describing what's new or changed in this version. + // This message will be displayed to users in the plugin's changelog. + // Supports limited markdown syntax. + Message string `json:"message"` + + // PackageType The package type of the plugin assets + PackageType PluginPackageType `json:"package_type"` + + // Protocols The CloudQuery protocols supported by this plugin version (only protocol 3 is supported by new plugins). + Protocols PluginProtocols `json:"protocols"` + + // SpecJsonSchema The specification of the plugin. This is a JSON schema that describes the configuration of the plugin. + SpecJsonSchema *PluginSpecJSONSchema `json:"spec_json_schema,omitempty"` + + // SupportedTargets The targets supported by this plugin version, formatted as _ + SupportedTargets []string `json:"supported_targets"` +} + +// CreateTeamAPIKeyRequest defines model for CreateTeamAPIKey_request. +type CreateTeamAPIKeyRequest struct { + ExpiresAt time.Time `json:"expires_at"` + + // Name Name of the API key + Name APIKeyName `json:"name"` + + // Scope Scope of permissions for the API key. API keys are used for creating new plugin versions and downloading existing plugins + Scope *APIKeyScope `json:"scope,omitempty"` +} + +// CreateTeamImages201Response defines model for CreateTeamImages_201_response. +type CreateTeamImages201Response struct { + Items []TeamImage `json:"items"` + Metadata ListMetadata `json:"metadata"` +} + +// CreateTeamImagesRequest defines model for CreateTeamImages_request. +type CreateTeamImagesRequest struct { + Images []TeamImageCreate `json:"images"` +} + +// CreateTeamRequest defines model for CreateTeam_request. +type CreateTeamRequest struct { + // DisplayName The team's display name + DisplayName interface{} `json:"display_name"` + + // Name The unique name for the team. + Name TeamName `json:"name"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// CreateUserToken201Response defines model for CreateUserToken_201_response. +type CreateUserToken201Response struct { + // CustomToken Token to exchange for refresh token + CustomToken string `json:"custom_token"` +} + +// DeletePluginVersionDocsRequest defines model for DeletePluginVersionDocs_request. +type DeletePluginVersionDocsRequest struct { + Names []PluginDocsPageName `json:"names"` +} + +// DeletePluginVersionTablesRequest defines model for DeletePluginVersionTables_request. +type DeletePluginVersionTablesRequest struct { + Names []PluginTableName `json:"names"` +} + +// DeleteTeamInvitationRequest defines model for DeleteTeamInvitation_request. +type DeleteTeamInvitationRequest struct { + Email openapi_types.Email `json:"email"` +} + +// DeterminePlatformTenantByEmail200Response defines model for DeterminePlatformTenantByEmail_200_response. +type DeterminePlatformTenantByEmail200Response struct { + // HasCloudAccount Whether the user has a cloud account + HasCloudAccount bool `json:"has_cloud_account"` + + // Items List of tenants + Items []TenantUser `json:"items,omitempty"` +} + +// DockerError Error Returned from the Docker Authorization Handler to the Docker Registry +type DockerError struct { + Details string `json:"details"` +} + +// Email defines model for Email. +type Email = openapi_types.Email + +// EmailTeamInvitationRequest defines model for EmailTeamInvitation_request. +type EmailTeamInvitationRequest struct { + Email openapi_types.Email `json:"email"` + Role EmailTeamInvitationRequestRole `json:"role"` +} + +// EmailTeamInvitationRequestRole defines model for EmailTeamInvitationRequest.Role. +type EmailTeamInvitationRequestRole string + +// FieldError defines model for FieldError. +type FieldError struct { Errors *[]string `json:"errors,omitempty"` FieldErrors *map[string]string `json:"field_errors,omitempty"` Message string `json:"message"` Status int `json:"status"` } -// VersionName The version in semantic version format. -type VersionName = string +// FinalizePluginUIAssetUploadRequest defines model for FinalizePluginUIAssetUpload_request. +type FinalizePluginUIAssetUploadRequest struct { + // UIID ID representing the finished upload + UIID string `json:"ui_id"` +} -// ApiKeyName defines model for apikey_name. -type ApiKeyName = string +// FunctionCallOutput defines model for FunctionCallOutput. +type FunctionCallOutput struct { + // Arguments The arguments passed to the function + Arguments interface{} `json:"arguments"` -// Page defines model for page. -type Page = int64 + // CallID The unique identifier for this function call + CallID interface{} `json:"call_id"` -// PerPage defines model for per_page. -type PerPage = int64 + // Name The name of the function that was called + Name interface{} `json:"name"` -// PluginSortBy defines model for plugin_sort_by. -type PluginSortBy string + // Output The output/result from the function call + Output interface{} `json:"output"` + AdditionalProperties map[string]interface{} `json:"-"` +} -// TargetName defines model for target_name. -type TargetName = string +// GetCurrentUserMemberships200Response defines model for GetCurrentUserMemberships_200_response. +type GetCurrentUserMemberships200Response struct { + Items []MembershipWithTeam `json:"items"` + Metadata ListMetadata `json:"metadata"` +} -// VersionSortBy defines model for version_sort_by. -type VersionSortBy string +// GetManagedDatabases200Response defines model for GetManagedDatabases_200_response. +type GetManagedDatabases200Response struct { + Items []ManagedDatabase `json:"items"` + Metadata ListMetadata `json:"metadata"` +} -// Forbidden Basic Error -type Forbidden = BasicError +// GetTeamMemberships200Response defines model for GetTeamMemberships_200_response. +type GetTeamMemberships200Response struct { + Items []MembershipWithUser `json:"items"` + Metadata ListMetadata `json:"metadata"` +} -// InternalError Basic Error -type InternalError = BasicError +// ImageURL defines model for ImageURL. +type ImageURL struct { + DownloadUrl string `json:"download_url"` -// NotFound Basic Error -type NotFound = BasicError + // RequiredHeaders Required HTTP headers to include for the upload + RequiredHeaders map[string]interface{} `json:"required_headers"` + UploadUrl string `json:"upload_url"` +} -// RequiresAuthentication Basic Error -type RequiresAuthentication = BasicError +// Invitation defines model for Invitation. +type Invitation struct { + CreatedAt time.Time `json:"created_at"` + Email Email `json:"email"` + Role string `json:"role"` -// UnprocessableEntity defines model for UnprocessableEntity. -type UnprocessableEntity = ValidationError + // TeamName The unique name for the team. + TeamName TeamName `json:"team_name"` +} -// ListPluginsParams defines parameters for ListPlugins. -type ListPluginsParams struct { - // SortBy The field to sort by - SortBy *ListPluginsParamsSortBy `form:"sort_by,omitempty" json:"sort_by,omitempty"` +// InvitationWithToken defines model for InvitationWithToken. +type InvitationWithToken struct { + CreatedAt time.Time `json:"created_at"` + Email Email `json:"email"` + Role string `json:"role"` - // Page Page number of the results to fetch - Page *Page `form:"page,omitempty" json:"page,omitempty"` + // TeamName The unique name for the team. + TeamName TeamName `json:"team_name"` - // PerPage The number of results per page (max 1000). - PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` + // Token The token used to accept the invitation + Token openapi_types.UUID `json:"token"` } -// ListPluginsParamsSortBy defines parameters for ListPlugins. -type ListPluginsParamsSortBy string - -// ListPluginVersionsParams defines parameters for ListPluginVersions. -type ListPluginVersionsParams struct { - // SortBy The field to sort by - SortBy *ListPluginVersionsParamsSortBy `form:"sort_by,omitempty" json:"sort_by,omitempty"` +// Invoice Invoice details +type Invoice struct { + // AmountDue Amount due in cents. This is the amount that will be charged, unless there are pending invoice items. If the invoice’s total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the amount_due may be 0. The charge that gets generated for the invoice will be for the amount specified in amount_due. + AmountDue int64 `json:"amount_due"` + CreatedAt time.Time `json:"created_at"` + Currency string `json:"currency"` - // Page Page number of the results to fetch - Page *Page `form:"page,omitempty" json:"page,omitempty"` + // InvoicePDF The link to download the PDF for the invoice. + InvoicePDF string `json:"invoice_pdf"` - // PerPage The number of results per page (max 1000). - PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` + // Paid Whether or not payment was successfully collected for this invoice. + Paid bool `json:"paid"` } -// ListPluginVersionsParamsSortBy defines parameters for ListPluginVersions. -type ListPluginVersionsParamsSortBy string +// ListAddon defines model for ListAddon. +type ListAddon struct { + // AddonFormat Supported formats for addons + AddonFormat AddonFormat `json:"addon_format"` -// CreatePluginVersionJSONBody defines parameters for CreatePluginVersion. -type CreatePluginVersionJSONBody struct { - // Checksums List of SHA-256 checksums for this plugin version, one for each supported target. - Checksums []string `json:"checksums"` + // AddonType Supported types for addons + AddonType AddonType `json:"addon_type"` - // Message A message describing what's new or changed in this version. - // This message will be displayed to users in the plugin's changelog. - // Supports limited markdown syntax. - Message string `json:"message"` + // Category Supported categories for addons + Category AddonCategory `json:"category"` + CreatedAt time.Time `json:"created_at"` - // Name The version in semantic version format. - Name VersionName `json:"name"` + // DisplayName The addon's display name + DisplayName string `json:"display_name"` + Homepage *string `json:"homepage,omitempty"` - // PackageType The package type of the plugin assets - PackageType CreatePluginVersionJSONBodyPackageType `json:"package_type"` + // LatestVersion The version in semantic version format. + LatestVersion *VersionName `json:"latest_version,omitempty"` + Logo string `json:"logo"` - // Protocols List of protocols supported by this plugin version - Protocols []int `json:"protocols"` + // Name The unique name for the addon. + Name AddonName `json:"name"` - // SupportedTargets The targets supported by this plugin version, formatted as _ - SupportedTargets []string `json:"supported_targets"` -} + // Official True if the addon is maintained by CloudQuery, false otherwise + Official bool `json:"official"` -// CreatePluginVersionJSONBodyPackageType defines parameters for CreatePluginVersion. -type CreatePluginVersionJSONBodyPackageType string + // PriceUSD The price for 6 months + PriceUSD string `json:"price_usd"` -// DeletePluginVersionDocsJSONBody defines parameters for DeletePluginVersionDocs. -type DeletePluginVersionDocsJSONBody struct { - Names []PluginDocsPageName `json:"names"` -} + // Public Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team. + Public *bool `json:"public,omitempty"` + Repository *string `json:"repository,omitempty"` + ShortDescription string `json:"short_description"` -// ListPluginVersionDocsParams defines parameters for ListPluginVersionDocs. -type ListPluginVersionDocsParams struct { - // Page Page number of the results to fetch - Page *Page `form:"page,omitempty" json:"page,omitempty"` + // TeamName The unique name for the team. + TeamName TeamName `json:"team_name"` - // PerPage The number of results per page (max 1000). - PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` + // Tier Supported tiers for addons + Tier AddonTier `json:"tier"` + UpdatedAt time.Time `json:"updated_at"` } -// CreatePluginVersionDocsJSONBody defines parameters for CreatePluginVersionDocs. -type CreatePluginVersionDocsJSONBody struct { - Pages []PluginDocsPage `json:"pages"` +// ListAddonOrdersByTeam200Response defines model for ListAddonOrdersByTeam_200_response. +type ListAddonOrdersByTeam200Response struct { + Items []AddonOrder `json:"items"` + Metadata ListMetadata `json:"metadata"` } -// DeletePluginVersionTablesJSONBody defines parameters for DeletePluginVersionTables. -type DeletePluginVersionTablesJSONBody struct { - Names []PluginTableName `json:"names"` +// ListAddonVersions200Response defines model for ListAddonVersions_200_response. +type ListAddonVersions200Response struct { + Items []AddonVersion `json:"items"` + Metadata ListMetadata `json:"metadata"` } -// ListPluginVersionTablesParams defines parameters for ListPluginVersionTables. -type ListPluginVersionTablesParams struct { - // Page Page number of the results to fetch - Page *Page `form:"page,omitempty" json:"page,omitempty"` +// ListAddonsByTeam200Response defines model for ListAddonsByTeam_200_response. +type ListAddonsByTeam200Response struct { + Items []Addon `json:"items"` + Metadata ListMetadata `json:"metadata"` +} - // PerPage The number of results per page (max 1000). - PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` +// ListAddons200Response defines model for ListAddons_200_response. +type ListAddons200Response struct { + Items []ListAddon `json:"items"` + Metadata ListMetadata `json:"metadata"` } -// CreatePluginVersionTablesJSONBody defines parameters for CreatePluginVersionTables. -type CreatePluginVersionTablesJSONBody struct { - Tables []PluginTable `json:"tables"` +// ListCurrentUserInvitations200Response defines model for ListCurrentUserInvitations_200_response. +type ListCurrentUserInvitations200Response struct { + Items []InvitationWithToken `json:"items"` + Metadata ListMetadata `json:"metadata"` } -// ListTeamsParams defines parameters for ListTeams. -type ListTeamsParams struct { - // PerPage The number of results per page (max 1000). - PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` +// ListInvoicesByTeam200Response defines model for ListInvoicesByTeam_200_response. +type ListInvoicesByTeam200Response struct { + Items []Invoice `json:"items"` + Metadata ListMetadata `json:"metadata"` +} - // Page Page number of the results to fetch - Page *Page `form:"page,omitempty" json:"page,omitempty"` +// ListMetadata defines model for ListMetadata. +type ListMetadata struct { + LastPage *int `json:"last_page,omitempty"` + PageSize int `json:"page_size"` + TimeMs *int `json:"time_ms,omitempty"` + TotalCount *int `json:"total_count,omitempty"` } -// CreateTeamJSONBody defines parameters for CreateTeam. -type CreateTeamJSONBody struct { - // DisplayName The team's display name +// ListPlugin defines model for ListPlugin. +type ListPlugin struct { + // Category Supported categories for plugins + Category PluginCategory `json:"category"` + CreatedAt time.Time `json:"created_at"` + + // DisplayName The plugin's display name DisplayName string `json:"display_name"` - // Name The unique name for the team. - Name TeamName `json:"name"` + // FreeRowsPerMonth Deprecated. Refer to `price_category` instead. + // Deprecated: + FreeRowsPerMonth int64 `json:"free_rows_per_month"` + Homepage *string `json:"homepage,omitempty"` + + // Kind The kind of plugin, ie. source or destination. + Kind PluginKind `json:"kind"` + + // LatestVersion The version in semantic version format. + LatestVersion *VersionName `json:"latest_version,omitempty"` + Logo string `json:"logo"` + + // Name The unique name for the plugin. + Name PluginName `json:"name"` + + // Official True if the plugin is maintained by CloudQuery, false otherwise + Official bool `json:"official"` + + // PriceCategory Supported price categories for billing + PriceCategory *PluginPriceCategory `json:"price_category,omitempty"` + + // Public Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team. + Public *bool `json:"public,omitempty"` + + // ReleaseStage Official plugins can go through three release stages: Coming Soon, Preview, and GA. + // The Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready. + // Both Preview and GA plugins follow semantic versioning. The main differences between the two stages are: + // Preview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage. + ReleaseStage PluginReleaseStage `json:"release_stage"` + Repository *string `json:"repository,omitempty"` + ShortDescription string `json:"short_description"` + + // TeamName The unique name for the team. + TeamName TeamName `json:"team_name"` + + // Tier This field is deprecated, refer to `price_category` instead. + // This field is only kept for backward compatibility and may be removed in a future release. + // Supported tiers for plugins. + // - free: Free tier, with no paid tables. + // - paid: Paid tier. These plugins may have paid tables, but can also have free tables. They require login to access. + // - open-core: This option is deprecated, values will either be free or paid. + // Deprecated: + Tier PluginTier `json:"tier"` + UpdatedAt time.Time `json:"updated_at"` + + // USDPerRow Deprecated. Refer to `price_category` instead. + // Deprecated: + USDPerRow string `json:"usd_per_row"` } -// ListTeamApiKeysParams defines parameters for ListTeamApiKeys. -type ListTeamApiKeysParams struct { - // PerPage The number of results per page (max 1000). - PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` +// ListPluginNotificationRequests200Response defines model for ListPluginNotificationRequests_200_response. +type ListPluginNotificationRequests200Response struct { + Items []PluginNotificationRequest `json:"items"` + Metadata ListMetadata `json:"metadata"` +} - // Page Page number of the results to fetch - Page *Page `form:"page,omitempty" json:"page,omitempty"` +// ListPluginUpcomingPriceChanges200Response defines model for ListPluginUpcomingPriceChanges_200_response. +type ListPluginUpcomingPriceChanges200Response struct { + Items []PluginPrice `json:"items"` + Metadata ListMetadata `json:"metadata"` } -// ListTeamInvitationsParams defines parameters for ListTeamInvitations. -type ListTeamInvitationsParams struct { - // Page Page number of the results to fetch - Page *Page `form:"page,omitempty" json:"page,omitempty"` +// ListPluginVersionDocs200Response defines model for ListPluginVersionDocs_200_response. +type ListPluginVersionDocs200Response struct { + Items []PluginDocsPage `json:"items"` + Metadata ListMetadata `json:"metadata"` +} - // PerPage The number of results per page (max 1000). - PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` +// ListPluginVersionTables200Response defines model for ListPluginVersionTables_200_response. +type ListPluginVersionTables200Response struct { + Items []PluginTable `json:"items"` + Metadata ListMetadata `json:"metadata"` } -// EmailTeamInvitationJSONBody defines parameters for EmailTeamInvitation. -type EmailTeamInvitationJSONBody struct { - Email string `json:"email"` - Role string `json:"role"` +// ListPluginVersions200Response defines model for ListPluginVersions_200_response. +type ListPluginVersions200Response struct { + Items []PluginVersionList `json:"items"` + Metadata ListMetadata `json:"metadata"` } -// GetTeamMembershipsParams defines parameters for GetTeamMemberships. -type GetTeamMembershipsParams struct { - // Page Page number of the results to fetch - Page *Page `form:"page,omitempty" json:"page,omitempty"` +// ListPluginsByTeam200Response defines model for ListPluginsByTeam_200_response. +type ListPluginsByTeam200Response struct { + Items []Plugin `json:"items"` + Metadata ListMetadata `json:"metadata"` +} - // PerPage The number of results per page (max 1000). - PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` +// ListPlugins200Response defines model for ListPlugins_200_response. +type ListPlugins200Response struct { + Items []ListPlugin `json:"items"` + Metadata ListMetadata `json:"metadata"` } -// ListPluginsByTeamParams defines parameters for ListPluginsByTeam. -type ListPluginsByTeamParams struct { - // Page Page number of the results to fetch - Page *Page `form:"page,omitempty" json:"page,omitempty"` +// ListSubscriptionOrdersByTeam200Response defines model for ListSubscriptionOrdersByTeam_200_response. +type ListSubscriptionOrdersByTeam200Response struct { + Items []TeamSubscriptionOrder `json:"items"` + Metadata ListMetadata `json:"metadata"` +} - // PerPage The number of results per page (max 1000). - PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` +// ListTeamAPIKeys200Response defines model for ListTeamAPIKeys_200_response. +type ListTeamAPIKeys200Response struct { + Items []APIKey `json:"items"` + Metadata ListMetadata `json:"metadata"` } -// ListUsersByTeamParams defines parameters for ListUsersByTeam. -type ListUsersByTeamParams struct { - // PerPage The number of results per page (max 1000). - PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` +// ListTeamInvitations200Response defines model for ListTeamInvitations_200_response. +type ListTeamInvitations200Response struct { + Items []Invitation `json:"items"` + Metadata ListMetadata `json:"metadata"` +} - // Page Page number of the results to fetch - Page *Page `form:"page,omitempty" json:"page,omitempty"` +// ListTeamPluginUsage200Response defines model for ListTeamPluginUsage_200_response. +type ListTeamPluginUsage200Response struct { + Items []UsageCurrent `json:"items"` + Metadata ListMetadata `json:"metadata"` } -// ListCurrentUserInvitationsParams defines parameters for ListCurrentUserInvitations. -type ListCurrentUserInvitationsParams struct { - // Page Page number of the results to fetch - Page *Page `form:"page,omitempty" json:"page,omitempty"` +// ListTeams200Response defines model for ListTeams_200_response. +type ListTeams200Response struct { + Items []Team `json:"items"` + Metadata ListMetadata `json:"metadata"` +} - // PerPage The number of results per page (max 1000). - PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` +// ListUsersByTeam200Response defines model for ListUsersByTeam_200_response. +type ListUsersByTeam200Response struct { + Items []User `json:"items"` + Metadata ListMetadata `json:"metadata"` } -// GetCurrentUserMembershipsParams defines parameters for GetCurrentUserMemberships. -type GetCurrentUserMembershipsParams struct { - // Page Page number of the results to fetch - Page *Page `form:"page,omitempty" json:"page,omitempty"` +// LoginUserRequest defines model for LoginUser_request. +type LoginUserRequest struct { + IDToken interface{} `json:"id_token"` + AdditionalProperties map[string]interface{} `json:"-"` +} - // PerPage The number of results per page (max 1000). - PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` +// ManagedDatabase Managed Database definition +type ManagedDatabase struct { + // ConnectionString The connection string to the database + ConnectionString *string `json:"connection_string,omitempty"` + + // CreatedAt Time the managed database was created + CreatedAt time.Time `json:"created_at"` + + // Expiration Time the managed database should expire + Expiration *time.Time `json:"expiration,omitempty"` + + // ManagedDatabaseID The identifier for the managed database + ManagedDatabaseID ManagedDatabaseID `json:"id"` + + // Status The status of the managed database + Status ManagedDatabaseStatus `json:"status"` } -// CreatePluginJSONRequestBody defines body for CreatePlugin for application/json ContentType. -type CreatePluginJSONRequestBody = PluginCreate +// ManagedDatabaseCreate Managed Database creation +type ManagedDatabaseCreate = map[string]interface{} -// UpdatePluginJSONRequestBody defines body for UpdatePlugin for application/json ContentType. -type UpdatePluginJSONRequestBody = PluginUpdate +// ManagedDatabaseID The identifier for the managed database +type ManagedDatabaseID = openapi_types.UUID -// CreatePluginVersionJSONRequestBody defines body for CreatePluginVersion for application/json ContentType. -type CreatePluginVersionJSONRequestBody CreatePluginVersionJSONBody +// ManagedDatabaseStatus The status of the managed database +type ManagedDatabaseStatus string -// UpdatePluginVersionJSONRequestBody defines body for UpdatePluginVersion for application/json ContentType. -type UpdatePluginVersionJSONRequestBody = PluginVersionUpdate +// MembershipWithTeam defines model for MembershipWithTeam. +type MembershipWithTeam struct { + Role string `json:"role"` -// DeletePluginVersionDocsJSONRequestBody defines body for DeletePluginVersionDocs for application/json ContentType. -type DeletePluginVersionDocsJSONRequestBody DeletePluginVersionDocsJSONBody + // Team CloudQuery Team + Team Team `json:"team"` +} -// CreatePluginVersionDocsJSONRequestBody defines body for CreatePluginVersionDocs for application/json ContentType. -type CreatePluginVersionDocsJSONRequestBody CreatePluginVersionDocsJSONBody +// MembershipWithUser defines model for MembershipWithUser. +type MembershipWithUser struct { + Role string `json:"role"` -// DeletePluginVersionTablesJSONRequestBody defines body for DeletePluginVersionTables for application/json ContentType. -type DeletePluginVersionTablesJSONRequestBody DeletePluginVersionTablesJSONBody + // User CloudQuery User + User User `json:"user"` +} -// CreatePluginVersionTablesJSONRequestBody defines body for CreatePluginVersionTables for application/json ContentType. -type CreatePluginVersionTablesJSONRequestBody CreatePluginVersionTablesJSONBody +// Plugin CloudQuery Plugin +type Plugin struct { + // Category Supported categories for plugins + Category PluginCategory `json:"category"` + CreatedAt time.Time `json:"created_at"` -// CreateTeamJSONRequestBody defines body for CreateTeam for application/json ContentType. -type CreateTeamJSONRequestBody CreateTeamJSONBody + // DisplayName The plugin's display name + DisplayName string `json:"display_name"` -// EmailTeamInvitationJSONRequestBody defines body for EmailTeamInvitation for application/json ContentType. -type EmailTeamInvitationJSONRequestBody EmailTeamInvitationJSONBody + // FreeRowsPerMonth Deprecated. Refer to `price_category` instead. + // Deprecated: + FreeRowsPerMonth int64 `json:"free_rows_per_month"` + Homepage *string `json:"homepage,omitempty"` + + // Kind The kind of plugin, ie. source or destination. + Kind PluginKind `json:"kind"` + Logo string `json:"logo"` + + // Name The unique name for the plugin. + Name PluginName `json:"name"` + + // Official True if the plugin is maintained by CloudQuery, false otherwise + Official bool `json:"official"` + + // PriceCategory Supported price categories for billing + PriceCategory *PluginPriceCategory `json:"price_category,omitempty"` + + // Public Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team. + Public *bool `json:"public,omitempty"` + + // ReleaseStage Official plugins can go through three release stages: Coming Soon, Preview, and GA. + // The Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready. + // Both Preview and GA plugins follow semantic versioning. The main differences between the two stages are: + // Preview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage. + ReleaseStage PluginReleaseStage `json:"release_stage"` + Repository *string `json:"repository,omitempty"` + ShortDescription string `json:"short_description"` + + // TeamName The unique name for the team. + TeamName TeamName `json:"team_name"` + + // Tier This field is deprecated, refer to `price_category` instead. + // This field is only kept for backward compatibility and may be removed in a future release. + // Supported tiers for plugins. + // - free: Free tier, with no paid tables. + // - paid: Paid tier. These plugins may have paid tables, but can also have free tables. They require login to access. + // - open-core: This option is deprecated, values will either be free or paid. + // Deprecated: + Tier PluginTier `json:"tier"` + UpdatedAt time.Time `json:"updated_at"` + + // USDPerRow Deprecated. Refer to `price_category` instead. + // Deprecated: + USDPerRow string `json:"usd_per_row"` +} + +// PluginAsset CloudQuery Plugin Asset +type PluginAsset struct { + // Checksum The checksum of the plugin asset + Checksum string `json:"checksum"` + + // Location The location to download the plugin asset from + Location string `json:"location"` +} + +// PluginCategory Supported categories for plugins +type PluginCategory string + +// PluginCreate defines model for PluginCreate. +type PluginCreate struct { + // Category Supported categories for plugins + Category PluginCategory `json:"category"` + + // DisplayName The plugin's display name, as shown in the CloudQuery Hub. + DisplayName string `json:"display_name"` + + // FreeRowsPerMonth Deprecated. Use `price_category` instead. + // Deprecated: + FreeRowsPerMonth *int64 `json:"free_rows_per_month,omitempty"` + Homepage *string `json:"homepage,omitempty"` + + // Kind The kind of plugin, ie. source or destination. + Kind PluginKind `json:"kind"` + + // Logo URL to the plugin's logo. This will be shown in the CloudQuery Hub. + Logo *string `json:"logo,omitempty"` + + // Name The unique name for the plugin. + Name PluginName `json:"name"` + + // PriceCategory Supported price categories for billing + PriceCategory *PluginPriceCategory `json:"price_category,omitempty"` + + // Public Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the team. + Public bool `json:"public"` + + // ReleaseStage Official plugins can go through three release stages: Coming Soon, Preview, and GA. + // The Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready. + // Both Preview and GA plugins follow semantic versioning. The main differences between the two stages are: + // Preview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage. + ReleaseStage *PluginReleaseStageCreate `json:"release_stage,omitempty"` + Repository *string `json:"repository,omitempty"` + + // ShortDescription Short description of the plugin. This will be shown in the CloudQuery Hub. + ShortDescription string `json:"short_description"` + + // TeamName The unique name for the team. + TeamName TeamName `json:"team_name"` + + // Tier This field is deprecated, refer to `price_category` instead. + // This field is only kept for backward compatibility and may be removed in a future release. + // Supported tiers for plugins. + // - free: Free tier, with no paid tables. + // - paid: Paid tier. These plugins may have paid tables, but can also have free tables. They require login to access. + // - open-core: This option is deprecated, values will either be free or paid. + // Deprecated: + Tier *PluginTier `json:"tier,omitempty"` + + // USDPerRow Deprecated. Use `price_category` instead. + // Deprecated: + USDPerRow *string `json:"usd_per_row,omitempty"` +} + +// PluginDocsPage CloudQuery Plugin Documentation Page +type PluginDocsPage struct { + // Content The content of the documentation page. Supports markdown. + Content string `json:"content"` + + // Name The unique name for the plugin documentation page. + Name PluginDocsPageName `json:"name"` +} + +// PluginDocsPageCreate CloudQuery Plugin Documentation Page +type PluginDocsPageCreate struct { + // Content The content of the documentation page. Supports markdown. + Content string `json:"content"` + + // Name The unique name for the plugin documentation page. + Name PluginDocsPageName `json:"name"` +} + +// PluginDocsPageName The unique name for the plugin documentation page. +type PluginDocsPageName = string + +// PluginKind The kind of plugin, ie. source or destination. +type PluginKind string + +// PluginName The unique name for the plugin. +type PluginName = string + +// PluginNotificationRequest Plugin Notification Request +type PluginNotificationRequest struct { + CreatedAt time.Time `json:"created_at"` + + // PluginKind The kind of plugin, ie. source or destination. + PluginKind PluginKind `json:"plugin_kind"` + + // PluginName The unique name for the plugin. + PluginName PluginName `json:"plugin_name"` + + // PluginTeam The unique name for the team. + PluginTeam TeamName `json:"plugin_team"` + SentAt *time.Time `json:"sent_at,omitempty"` + + // Status Status of a plugin notification request + Status *PluginNotificationRequestStatus `json:"status,omitempty"` +} + +// PluginNotificationRequestCreate Create a Plugin Notification Request +type PluginNotificationRequestCreate struct { + // PluginKind The kind of plugin, ie. source or destination. + PluginKind PluginKind `json:"plugin_kind"` + + // PluginName The unique name for the plugin. + PluginName PluginName `json:"plugin_name"` + + // PluginTeam The unique name for the team. + PluginTeam TeamName `json:"plugin_team"` +} + +// PluginNotificationRequestStatus Status of a plugin notification request +type PluginNotificationRequestStatus string + +// PluginPackageType The package type of the plugin assets +type PluginPackageType string + +// PluginPrice CloudQuery Plugin Price +type PluginPrice struct { + // EffectiveFrom The date and time the price came (or will come) into effect. + EffectiveFrom time.Time `json:"effective_from"` + + // FreeRowsPerMonth The number of rows that can be synced for free each month. + FreeRowsPerMonth int64 `json:"free_rows_per_month"` + + // ID ID of the price change + ID openapi_types.UUID `json:"id"` + + // USDPerRow The price per row in USD. This is used to calculate the price of a sync. + USDPerRow string `json:"usd_per_row"` +} + +// PluginPriceCategory Supported price categories for billing +type PluginPriceCategory string + +// PluginPriceCreate CloudQuery Plugin Price Create +type PluginPriceCreate struct { + // EffectiveFrom The date and time the price came (or will come) into effect. + EffectiveFrom time.Time `json:"effective_from"` + + // FreeRowsPerMonth The number of rows that can be synced for free each month. + FreeRowsPerMonth int64 `json:"free_rows_per_month"` + + // USDPerRow The price per row in USD. This is used to calculate the price of a sync. + USDPerRow string `json:"usd_per_row"` +} + +// PluginProtocols The CloudQuery protocols supported by this plugin version (only protocol 3 is supported by new plugins). +type PluginProtocols = []int + +// PluginReleaseStage Official plugins can go through three release stages: Coming Soon, Preview, and GA. +// The Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready. +// Both Preview and GA plugins follow semantic versioning. The main differences between the two stages are: +// Preview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage. +type PluginReleaseStage string + +// PluginReleaseStageCreate Official plugins can go through three release stages: Coming Soon, Preview, and GA. +// The Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready. +// Both Preview and GA plugins follow semantic versioning. The main differences between the two stages are: +// Preview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage. +type PluginReleaseStageCreate string + +// PluginReleaseStageUpdate Official plugins can go through three release stages: Coming Soon, Preview, and GA. +// The Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready. +// Both Preview and GA plugins follow semantic versioning. The main differences between the two stages are: +// Preview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage. +type PluginReleaseStageUpdate string + +// PluginSpecJSONSchema The specification of the plugin. This is a JSON schema that describes the configuration of the plugin. +type PluginSpecJSONSchema = string + +// PluginTable CloudQuery Plugin Table +type PluginTable struct { + // Description Description of the table + Description string `json:"description"` + + // IsIncremental Whether the table is incremental + IsIncremental bool `json:"is_incremental"` + + // IsPaid Whether the table is paid + IsPaid *bool `json:"is_paid,omitempty"` + + // Name Name of the table + Name PluginTableName `json:"name"` + + // Parent Name of the parent table, if any + Parent *string `json:"parent,omitempty"` + + // Relations Names of the tables that depend on this table + Relations []string `json:"relations"` + + // Title Title of the table + Title string `json:"title"` +} + +// PluginTableColumn CloudQuery Plugin Column +type PluginTableColumn struct { + // Description Description of the column + Description string `json:"description"` + + // IncrementalKey Whether the column is used as an incremental key + IncrementalKey bool `json:"incremental_key"` + + // Name Name of the column + Name string `json:"name"` + + // NotNull Whether the column is nullable + NotNull bool `json:"not_null"` + + // PrimaryKey Whether the column is part of the primary key + PrimaryKey bool `json:"primary_key"` + + // Type Arrow Type of the column + Type string `json:"type"` + + // TypeSchema For columns of type JSON, the schema of the JSON object + TypeSchema *string `json:"type_schema,omitempty"` + + // Unique Whether the column has a unique constraint + Unique bool `json:"unique"` +} + +// PluginTableCreate CloudQuery Plugin Table +type PluginTableCreate struct { + Columns *[]PluginTableColumn `json:"columns,omitempty"` + + // Description Description of the table + Description *string `json:"description,omitempty"` + + // IsIncremental Whether the table is incremental + IsIncremental *bool `json:"is_incremental,omitempty"` + + // IsPaid Whether the table is paid + IsPaid *bool `json:"is_paid,omitempty"` + + // Name Name of the table + Name PluginTableName `json:"name"` + + // Parent Name of the parent table, if any + Parent *string `json:"parent,omitempty"` + + // PermissionsNeeded List of permissions needed to access this table, if any + PermissionsNeeded *[]string `json:"permissions_needed,omitempty"` + + // Relations Names of the tables that depend on this table + Relations *[]string `json:"relations,omitempty"` + + // SensitiveColumns List of columns within this table that can contain sensitive/secret data + SensitiveColumns *[]string `json:"sensitive_columns,omitempty"` + + // Title Title of the table + Title *string `json:"title,omitempty"` +} + +// PluginTableDetails defines model for PluginTableDetails. +type PluginTableDetails struct { + // Columns List of columns + Columns []PluginTableColumn `json:"columns"` + + // Description Description of the table + Description string `json:"description"` + + // IsIncremental Whether the table is incremental + IsIncremental bool `json:"is_incremental"` + + // IsPaid Whether the table is paid + IsPaid *bool `json:"is_paid,omitempty"` + + // Name Name of the table + Name string `json:"name"` + + // Parent Name of the parent table, if any + Parent *string `json:"parent,omitempty"` + + // PermissionsNeeded List of permissions needed to access this table, if any + PermissionsNeeded []string `json:"permissions_needed"` + + // Relations Names of the tables that depend on this table + Relations []string `json:"relations"` + + // SensitiveColumns List of columns within this table that can contain sensitive/secret data + SensitiveColumns *[]string `json:"sensitive_columns,omitempty"` + + // Title Title of the table + Title string `json:"title"` +} + +// PluginTableName Name of the table +type PluginTableName = string + +// PluginTier This field is deprecated, refer to `price_category` instead. +// This field is only kept for backward compatibility and may be removed in a future release. +// Supported tiers for plugins. +// - free: Free tier, with no paid tables. +// - paid: Paid tier. These plugins may have paid tables, but can also have free tables. They require login to access. +// - open-core: This option is deprecated, values will either be free or paid. +type PluginTier string + +// PluginUIAsset CloudQuery Plugin UI Asset +type PluginUIAsset struct { + // Name The path and name of the asset + Name string `json:"name"` + + // UploadURL URL to upload the asset to + UploadURL string `json:"upload_url"` +} + +// PluginUIAssetUploadRequest CloudQuery Plugin UI Asset Upload Request +type PluginUIAssetUploadRequest struct { + // ContentType Content-type of the asset + ContentType *string `json:"content_type,omitempty"` + + // Name The path and name of the asset + Name string `json:"name"` +} + +// PluginUpdate defines model for PluginUpdate. +type PluginUpdate struct { + // Category Supported categories for plugins + Category *PluginCategory `json:"category,omitempty"` + + // DisplayName The plugin's display name, as shown in the CloudQuery Hub. + DisplayName *string `json:"display_name,omitempty"` + + // FreeRowsPerMonth Deprecated. Update `price_category` instead. + // Deprecated: + FreeRowsPerMonth *int64 `json:"free_rows_per_month,omitempty"` + Homepage *string `json:"homepage,omitempty"` + + // Logo URL to the plugin's logo. This will be shown in the CloudQuery Hub. + Logo *string `json:"logo,omitempty"` + + // PriceCategory Supported price categories for billing + PriceCategory *PluginPriceCategory `json:"price_category,omitempty"` + + // Public If plugin is not public, it won't be visible to other teams in the CloudQuery Hub. + Public *bool `json:"public,omitempty"` + + // ReleaseStage Official plugins can go through three release stages: Coming Soon, Preview, and GA. + // The Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready. + // Both Preview and GA plugins follow semantic versioning. The main differences between the two stages are: + // Preview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage. + ReleaseStage *PluginReleaseStageUpdate `json:"release_stage,omitempty"` + Repository *string `json:"repository,omitempty"` + + // ShortDescription Short description of the plugin. This will be shown in the CloudQuery Hub. + ShortDescription *string `json:"short_description,omitempty"` + + // Tier This field is deprecated, refer to `price_category` instead. + // This field is only kept for backward compatibility and may be removed in a future release. + // Supported tiers for plugins. + // - free: Free tier, with no paid tables. + // - paid: Paid tier. These plugins may have paid tables, but can also have free tables. They require login to access. + // - open-core: This option is deprecated, values will either be free or paid. + // Deprecated: + Tier *PluginTier `json:"tier,omitempty"` + + // USDPerRow Deprecated. Update `price_category` instead. + // Deprecated: + USDPerRow *string `json:"usd_per_row,omitempty"` +} + +// PluginVersion defines model for PluginVersion. +type PluginVersion struct { + // Checksums The checksums of the plugin assets + Checksums []string `json:"checksums"` + + // ConnectorRequired Whether a connector is required for this plugin version + ConnectorRequired *bool `json:"connector_required,omitempty"` + + // ConnectorTypes List of connector types available for this plugin version + ConnectorTypes *[]string `json:"connector_types,omitempty"` + + // CreatedAt The date and time the plugin version was created. + CreatedAt time.Time `json:"created_at"` + + // Draft If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version. + Draft bool `json:"draft"` + + // Message Description of what's new or changed in this version (supports markdown) + Message string `json:"message"` + + // Name The version in semantic version format. + Name VersionName `json:"name"` + + // PackageType The package type of the plugin assets + PackageType PluginPackageType `json:"package_type"` + + // Protocols The CloudQuery protocols supported by this plugin version (only protocol 3 is supported by new plugins). + Protocols PluginProtocols `json:"protocols"` + + // PublishedAt The date and time the plugin version was set to non-draft (published). + PublishedAt *time.Time `json:"published_at,omitempty"` + + // Retracted If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use. + Retracted bool `json:"retracted"` + + // SpecJsonSchema The specification of the plugin. This is a JSON schema that describes the configuration of the plugin. + SpecJsonSchema *PluginSpecJSONSchema `json:"spec_json_schema,omitempty"` + + // SupportedTargets The targets supported by this plugin version, formatted as _ + SupportedTargets []string `json:"supported_targets"` +} + +// PluginVersionBase CloudQuery Plugin Version +type PluginVersionBase struct { + // Checksums The checksums of the plugin assets + Checksums []string `json:"checksums"` + + // CreatedAt The date and time the plugin version was created. + CreatedAt time.Time `json:"created_at"` + + // Draft If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version. + Draft bool `json:"draft"` + + // Message Description of what's new or changed in this version (supports markdown) + Message string `json:"message"` + + // Name The version in semantic version format. + Name VersionName `json:"name"` + + // PackageType The package type of the plugin assets + PackageType PluginPackageType `json:"package_type"` + + // Protocols The CloudQuery protocols supported by this plugin version (only protocol 3 is supported by new plugins). + Protocols PluginProtocols `json:"protocols"` + + // PublishedAt The date and time the plugin version was set to non-draft (published). + PublishedAt *time.Time `json:"published_at,omitempty"` + + // Retracted If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use. + Retracted bool `json:"retracted"` + + // SupportedTargets The targets supported by this plugin version, formatted as _ + SupportedTargets []string `json:"supported_targets"` +} + +// PluginVersionDetails defines model for PluginVersionDetails. +type PluginVersionDetails struct { + // Checksums The checksums of the plugin assets + Checksums []string `json:"checksums"` + + // ConnectorRequired Whether a connector is required for this plugin version + ConnectorRequired *bool `json:"connector_required,omitempty"` + + // ConnectorTypes List of connector types available for this plugin version + ConnectorTypes *[]string `json:"connector_types,omitempty"` + + // CreatedAt The date and time the plugin version was created. + CreatedAt time.Time `json:"created_at"` + + // Draft If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version. + Draft bool `json:"draft"` + + // ExampleConfig Example configuration for the plugin. This can be used in generated quickstart guides, for example. Markdown format. + ExampleConfig string `json:"example_config"` + + // Message Description of what's new or changed in this version (supports markdown) + Message string `json:"message"` + + // Name The version in semantic version format. + Name VersionName `json:"name"` + + // PackageType The package type of the plugin assets + PackageType PluginPackageType `json:"package_type"` + + // Protocols The CloudQuery protocols supported by this plugin version (only protocol 3 is supported by new plugins). + Protocols PluginProtocols `json:"protocols"` + + // PublishedAt The date and time the plugin version was set to non-draft (published). + PublishedAt *time.Time `json:"published_at,omitempty"` + + // Retracted If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use. + Retracted bool `json:"retracted"` + + // SpecJsonSchema The specification of the plugin. This is a JSON schema that describes the configuration of the plugin. + SpecJsonSchema *PluginSpecJSONSchema `json:"spec_json_schema,omitempty"` + + // SupportedTargets The targets supported by this plugin version, formatted as _ + SupportedTargets []string `json:"supported_targets"` + + // UIBaseURL Base URL for the plugin's UI. Only available for plugins with a UI and for logged in users. + UIBaseURL *string `json:"ui_base_url,omitempty"` + + // UIBaseURLv2 Base URL for the plugin's UI. Only available for plugins with a UI and for logged in users. + UIBaseURLv2 *string `json:"ui_base_url_v2,omitempty"` + + // UIID ID of the plugin's UI. + UIID *openapi_types.UUID `json:"ui_id,omitempty"` +} + +// PluginVersionList CloudQuery Plugin Version +type PluginVersionList = PluginVersionBase + +// PluginVersionUpdate defines model for PluginVersionUpdate. +type PluginVersionUpdate struct { + // Checksums The SHA-256 checksums of the plugin binaries, one per supported target. + Checksums *[]string `json:"checksums,omitempty"` + + // Draft If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version. Once draft is set to false, only certain fields can be updated. + Draft *bool `json:"draft,omitempty"` + + // Message Description of what's new or changed in this version (supports markdown) + Message *string `json:"message,omitempty"` + + // PackageType The package type of the plugin binaries + PackageType *string `json:"package_type,omitempty"` + + // Protocols The CloudQuery protocols supported by this plugin version (only protocol 3 is supported by new plugins). + Protocols *PluginProtocols `json:"protocols,omitempty"` + + // Retracted If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use. + Retracted *bool `json:"retracted,omitempty"` + + // SpecJsonSchema The specification of the plugin. This is a JSON schema that describes the configuration of the plugin. + SpecJsonSchema *PluginSpecJSONSchema `json:"spec_json_schema,omitempty"` + SupportedTargets *[]string `json:"supported_targets,omitempty"` +} + +// RegisterUser201Response defines model for RegisterUser_201_response. +type RegisterUser201Response struct { + // CustomToken Token to exchange for ID token + CustomToken string `json:"custom_token"` + + // Email Indicates successful user creation + Email string `json:"email"` +} + +// RegisterUserRequest defines model for RegisterUser_request. +type RegisterUserRequest struct { + // Email Email address + Email interface{} `json:"email"` + + // Password Password for the new user account + Password interface{} `json:"password"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// RegistryAuthToken JWT token for the image registry +type RegistryAuthToken struct { + AccessToken string `json:"access_token"` + Token string `json:"token"` +} + +// ReleaseURL defines model for ReleaseURL. +type ReleaseURL struct { + Url string `json:"url"` +} + +// RemoveTeamMembershipRequest defines model for RemoveTeamMembership_request. +type RemoveTeamMembershipRequest struct { + Email string `json:"email"` +} + +// RenewPlatformActivation200Response defines model for RenewPlatformActivation_200_response. +type RenewPlatformActivation200Response struct { + // NextCheckInSeconds Time in seconds until the next check in + NextCheckInSeconds interface{} `json:"next_check_in_seconds"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// RenewPlatformActivationRequest defines model for RenewPlatformActivation_request. +type RenewPlatformActivationRequest struct { + // ActivationID Previous activation ID + ActivationID interface{} `json:"activation_id"` + + // InstallationID Installation ID of the platform + InstallationID interface{} `json:"installation_id"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// ReportPlatformDataRequest defines model for ReportPlatformData_request. +type ReportPlatformDataRequest struct { + // InstallationID Installation ID of the platform + InstallationID interface{} `json:"installation_id"` + UserAdditions interface{} `json:"user_additions,omitempty"` + UserRemovals interface{} `json:"user_removals,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// ReportTenantPlatformDataRequest defines model for ReportTenantPlatformData_request. +type ReportTenantPlatformDataRequest struct { + Host string `json:"host"` + UserAdditions interface{} `json:"user_additions,omitempty"` + UserRemovals interface{} `json:"user_removals,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// ResetUserPasswordRequest defines model for ResetUserPassword_request. +type ResetUserPasswordRequest struct { + // Email Email address to reset + Email interface{} `json:"email"` + + // Subdomain Subdomain to use in the URL + Subdomain *interface{} `json:"subdomain,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// SendAnonymousEventRequest defines model for SendAnonymousEvent_request. +type SendAnonymousEventRequest struct { + // AnonymousID Anonymous ID identifying the user + AnonymousID interface{} `json:"anonymous_id"` + + // Name Name of event + Name interface{} `json:"name"` + + // Properties Properties of event, keys should be of string type + Properties *interface{} `json:"properties,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// SendUserEventRequest defines model for SendUserEvent_request. +type SendUserEventRequest struct { + // Name Name of event + Name interface{} `json:"name"` + + // Properties Properties of event, keys should be of string type + Properties *interface{} `json:"properties,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// Settings Platform settings definition +type Settings struct { + // EnforceMfa Whether or not to require MFA for all users + EnforceMfa bool `json:"enforce_mfa"` +} + +// SettingsUpdate Platform settings partial update +type SettingsUpdate struct { + // EnforceMfa Whether or not to require MFA for all users + EnforceMfa *bool `json:"enforce_mfa,omitempty"` +} + +// Team CloudQuery Team +type Team struct { + CreatedAt *time.Time `json:"created_at,omitempty"` + + // DisplayName The team's display name + DisplayName string `json:"display_name"` + Internal bool `json:"internal"` + IsTrialActive bool `json:"is_trial_active"` + + // Name The unique name for the team. + Name TeamName `json:"name"` + + // Plan The plan the team is on (trial is deprecated) + Plan TeamPlan `json:"plan"` + PlanEndTime *time.Time `json:"plan_end_time,omitempty"` + TrialEndTime *time.Time `json:"trial_end_time,omitempty"` +} + +// TeamImage defines model for TeamImage. +type TeamImage struct { + // Checksum SHA1 checksum of image + Checksum string `json:"checksum"` + + // Name Name of image + Name string `json:"name"` + + // RequiredHeaders Required HTTP headers to include for the upload + RequiredHeaders map[string]interface{} `json:"required_headers"` + + // UploadURL URL to upload image + UploadURL *string `json:"upload_url,omitempty"` + + // URL URL to download image + URL string `json:"url"` +} + +// TeamImageCreate defines model for TeamImageCreate. +type TeamImageCreate struct { + // Checksum SHA1 checksum of image + Checksum string `json:"checksum"` + + // ContentType The HTTP Content-Type of the image or asset + ContentType ContentType `json:"content_type"` + + // Name Name of image + Name string `json:"name"` +} + +// TeamName The unique name for the team. +type TeamName = string + +// TeamPlan The plan the team is on (trial is deprecated) +type TeamPlan string + +// TeamSubscriptionOrder Team subscription order +type TeamSubscriptionOrder struct { + CompletedAt *time.Time `json:"completed_at,omitempty"` + + // CompletionURL Stripe URL for completing purchase. Only shown in response to POST request when a paid plan is selected. + CompletionURL *string `json:"completion_url,omitempty"` + CreatedAt time.Time `json:"created_at"` + + // TeamSubscriptionOrderID ID of the team subscription order + TeamSubscriptionOrderID TeamSubscriptionOrderID `json:"id"` + + // Plan The plan the team is on (trial is deprecated) + Plan TeamPlan `json:"plan"` + Status TeamSubscriptionOrderStatus `json:"status"` + + // TeamName The unique name for the team. + TeamName TeamName `json:"team_name"` + UpdatedAt time.Time `json:"updated_at"` +} + +// TeamSubscriptionOrderCreate Create team subscription order +type TeamSubscriptionOrderCreate struct { + // CancelUrl URL to redirect to after order cancellation + CancelUrl string `json:"cancel_url"` + + // Plan The plan the team is on (trial is deprecated) + Plan TeamPlan `json:"plan"` + + // SuccessUrl URL to redirect to after successful order completion + SuccessUrl string `json:"success_url"` +} + +// TeamSubscriptionOrderID ID of the team subscription order +type TeamSubscriptionOrderID = openapi_types.UUID + +// TeamSubscriptionOrderStatus defines model for TeamSubscriptionOrderStatus. +type TeamSubscriptionOrderStatus string + +// TenantUser Tenant information of a platform user +type TenantUser struct { + // Provider Login provider of the tenant + Provider *string `json:"provider,omitempty"` + + // TenantURL URL of the tenant + TenantURL string `json:"tenant_url"` +} + +// UpdateCurrentUserRequest defines model for UpdateCurrentUser_request. +type UpdateCurrentUserRequest struct { + // Name The unique name for the user. + Name *UserName `json:"name,omitempty"` + + // Onboarded Whether the user has completed onboarding + Onboarded *UserOnboarded `json:"onboarded,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// UpdateCustomerRequest defines model for UpdateCustomer_request. +type UpdateCustomerRequest struct { + CompanyName *string `json:"company_name,omitempty"` + FirstName string `json:"first_name"` + LastName string `json:"last_name"` + LearnedAboutCqFrom *string `json:"learned_about_cq_from,omitempty"` + LearnedAboutCqFromOther *string `json:"learned_about_cq_from_other,omitempty"` + Phone *string `json:"phone,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// UpdateTeamRequest defines model for UpdateTeam_request. +type UpdateTeamRequest struct { + // DisplayName The team's display name + DisplayName *interface{} `json:"display_name,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// UploadImageRequest defines model for UploadImage_request. +type UploadImageRequest struct { + // ContentType The HTTP Content-Type of the image or asset + ContentType ContentType `json:"content_type"` +} + +// UploadPluginUIAssets201Response defines model for UploadPluginUIAssets_201_response. +type UploadPluginUIAssets201Response struct { + Assets []PluginUIAsset `json:"assets"` + + // UIID ID representing this upload + UIID string `json:"ui_id"` +} + +// UploadPluginUIAssetsRequest defines model for UploadPluginUIAssets_request. +type UploadPluginUIAssetsRequest struct { + Assets []PluginUIAssetUploadRequest `json:"assets"` +} + +// UsageCurrent The usage of a plugin within the current calendar month. +type UsageCurrent struct { + // PluginKind The kind of plugin, ie. source or destination. + PluginKind PluginKind `json:"plugin_kind"` + + // PluginName The unique name for the plugin. + PluginName PluginName `json:"plugin_name"` + + // PluginTeam The unique name for the team. + PluginTeam TeamName `json:"plugin_team"` + + // RemainingRows Deprecated - this field used to contain the estimated remaining rows but now returns 1 to indicate rows are remaining or 0 if there are no more remaining rows. + // Deprecated: + RemainingRows *int64 `json:"remaining_rows,omitempty"` + + // RemainingUSD The remaining USD amount in the plugin's quota for the calendar month. + // Deprecated: + RemainingUSD *string `json:"remaining_usd,omitempty"` + + // Rows The number of rows used by the plugin in the calendar month. + Rows int64 `json:"rows"` + + // USD The USD amount used by the plugin in the calendar month, rounded to two decimal places. + // Deprecated: + USD string `json:"usd"` +} + +// UsageIncrease Increase the usage of a plugin. This can incur billing costs and should be used only by plugins. +type UsageIncrease struct { + // InstallationID Installation ID associated with the platform, for platform syncs. + InstallationID *string `json:"installation_id,omitempty"` + + // PluginKind The kind of plugin, ie. source or destination. + PluginKind PluginKind `json:"plugin_kind"` + + // PluginName The unique name for the plugin. + PluginName PluginName `json:"plugin_name"` + + // PluginTeam The unique name for the team. + PluginTeam TeamName `json:"plugin_team"` + + // RequestId A unique ID associated with the usage increase. + RequestId openapi_types.UUID `json:"request_id"` + + // Rows The total number of additional rows used by the plugin. + Rows int `json:"rows"` + Tables *[]UsageIncreaseTablesInner `json:"tables,omitempty"` +} + +// UsageIncreaseTablesInner defines model for UsageIncrease_tables_inner. +type UsageIncreaseTablesInner struct { + // Name The name of the table. + Name string `json:"name"` + + // Rows The additional rows used by the table. + Rows int `json:"rows"` +} + +// UsageSummary A usage summary for a team, summarizing the paid rows synced and/or cloud resource usage over a given time range. +// Note that empty or all-zero values are not included in the response. +type UsageSummary struct { + // Groups The groups of the usage summary. Every group will have a corresponding value at the same index in the values array. + Groups interface{} `json:"groups"` + + // Metadata Additional metadata about the usage summary. This may include information about the time range, the aggregation period, or other details. + Metadata UsageSummaryMetadata `json:"metadata"` + Values interface{} `json:"values"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// UsageSummaryGroup A usage summary group. +type UsageSummaryGroup struct { + // Name The name of the group. + Name string `json:"name"` + + // Value The value of the group at this index. + Value string `json:"value"` +} + +// UsageSummaryValue A usage summary value. +type UsageSummaryValue struct { + // CloudEgressBytes Egress bytes consumed in this period, one per group. + CloudEgressBytes *[]int64 `json:"cloud_egress_bytes,omitempty"` + + // CloudVcpuSeconds vCPU/seconds consumed in this period, one per group. + CloudVcpuSeconds *[]int64 `json:"cloud_vcpu_seconds,omitempty"` + + // CloudVramByteSeconds vRAM/byte-seconds consumed in this period, one per group. + CloudVramByteSeconds *[]int64 `json:"cloud_vram_byte_seconds,omitempty"` + + // PaidRows The paid rows that were synced in this period, one per group. + PaidRows *[]int64 `json:"paid_rows,omitempty"` + + // Timestamp The timestamp marking the start of a period. + Timestamp time.Time `json:"timestamp"` +} + +// UsageSummaryMetadata Additional metadata about the usage summary. This may include information about the time range, the aggregation period, or other details. +type UsageSummaryMetadata struct { + // AggregationPeriod The aggregation period to sum data over. In other words, data will be returned at this granularity. + AggregationPeriod interface{} `json:"aggregation_period"` + + // End The exclusive end of the query time range. + End interface{} `json:"end"` + + // Metrics List of metrics included in the response. + Metrics interface{} `json:"metrics"` + + // Start The inclusive start of the query time range. + Start interface{} `json:"start"` +} + +// User CloudQuery User +type User struct { + CreatedAt *time.Time `json:"created_at,omitempty"` + Email string `json:"email"` + + // ID ID of the User + ID openapi_types.UUID `json:"id"` + + // Name The unique name for the user. + Name *UserName `json:"name,omitempty"` + + // Onboarded Whether the user has completed onboarding + Onboarded *UserOnboarded `json:"onboarded,omitempty"` + + // ProfileImageURL Profile image URL of user + ProfileImageURL *string `json:"profile_image_url,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` +} + +// UserID ID of the User +type UserID = openapi_types.UUID + +// UserName The unique name for the user. +type UserName = string + +// UserOnboarded Whether the user has completed onboarding +type UserOnboarded = bool + +// UserTOTPSetup200Response defines model for UserTOTPSetup_200_response. +type UserTOTPSetup200Response struct { + Secret string `json:"secret"` + Url string `json:"url"` +} + +// UserTOTPVerify201Response defines model for UserTOTPVerify_201_response. +type UserTOTPVerify201Response struct { + // CustomToken Token to exchange for ID token + CustomToken string `json:"custom_token"` +} + +// UserTOTPVerifyRequest defines model for UserTOTPVerify_request. +type UserTOTPVerifyRequest struct { + OTP interface{} `json:"otp"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// VerifyUserEmailRequest defines model for VerifyUserEmail_request. +type VerifyUserEmailRequest struct { + // Email Email address to verify + Email interface{} `json:"email"` + + // ReturnTo Return to this URL after verification + ReturnTo *interface{} `json:"return_to,omitempty"` + + // Subdomain Subdomain to use in the URL + Subdomain *interface{} `json:"subdomain,omitempty"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// VersionFilter A version filter in semantic version format with prefix ranges. +type VersionFilter = string + +// VersionName The version in semantic version format. +type VersionName = string + +// AddonSortBy defines model for addon_sort_by. +type AddonSortBy string + +// AddonTeam The unique name for the team. +type AddonTeam = TeamName + +// EmailBasic defines model for email_basic. +type EmailBasic = string + +// IncludeDrafts defines model for include_drafts. +type IncludeDrafts = bool + +// IncludeFips defines model for include_fips. +type IncludeFips = bool + +// IncludePrereleases defines model for include_prereleases. +type IncludePrereleases = bool + +// IncludePrivate defines model for include_private. +type IncludePrivate = bool + +// Page defines model for page. +type Page = int64 + +// PerPage defines model for per_page. +type PerPage = int64 + +// PluginExcludeReleaseStages defines model for plugin_exclude_release_stages. +type PluginExcludeReleaseStages = []PluginReleaseStage + +// PluginIncludeReleaseStages defines model for plugin_include_release_stages. +type PluginIncludeReleaseStages = []PluginReleaseStage + +// PluginSortBy defines model for plugin_sort_by. +type PluginSortBy string + +// PluginTeam The unique name for the team. +type PluginTeam = TeamName + +// TargetName defines model for target_name. +type TargetName = string + +// VersionSortBy defines model for version_sort_by. +type VersionSortBy string + +// BadRequest defines model for BadRequest. +type BadRequest = FieldError + +// Conflict Basic Error +type Conflict = BasicError + +// Forbidden defines model for Forbidden. +type Forbidden = FieldError + +// InternalError Basic Error +type InternalError = BasicError + +// MethodNotAllowed Basic Error +type MethodNotAllowed = BasicError + +// NotFound Basic Error +type NotFound = BasicError + +// RequiresAuthentication Basic Error +type RequiresAuthentication = BasicError + +// ServiceUnavailable Basic Error +type ServiceUnavailable = BasicError + +// TooManyRequests Basic Error +type TooManyRequests = BasicError + +// UnprocessableEntity defines model for UnprocessableEntity. +type UnprocessableEntity = FieldError + +// ListAddonsParams defines parameters for ListAddons. +type ListAddonsParams struct { + // SortBy The field to sort by + SortBy *ListAddonsParamsSortBy `form:"sort_by,omitempty" json:"sort_by,omitempty"` + + // Page Page number of the results to fetch + Page *Page `form:"page,omitempty" json:"page,omitempty"` + + // PerPage The number of results per page (max 1000). + PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// ListAddonsParamsSortBy defines parameters for ListAddons. +type ListAddonsParamsSortBy string + +// ListAddonVersionsParams defines parameters for ListAddonVersions. +type ListAddonVersionsParams struct { + // SortBy The field to sort by + SortBy *ListAddonVersionsParamsSortBy `form:"sort_by,omitempty" json:"sort_by,omitempty"` + + // Page Page number of the results to fetch + Page *Page `form:"page,omitempty" json:"page,omitempty"` + + // PerPage The number of results per page (max 1000). + PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` + + // IncludeDrafts Whether to include draft versions + IncludeDrafts *IncludeDrafts `form:"include_drafts,omitempty" json:"include_drafts,omitempty"` +} + +// ListAddonVersionsParamsSortBy defines parameters for ListAddonVersions. +type ListAddonVersionsParamsSortBy string + +// DownloadAddonAssetParams defines parameters for DownloadAddonAsset. +type DownloadAddonAssetParams struct { + Accept *string `json:"Accept,omitempty"` +} + +// ListPluginNotificationRequestsParams defines parameters for ListPluginNotificationRequests. +type ListPluginNotificationRequestsParams struct { + // Page Page number of the results to fetch + Page *Page `form:"page,omitempty" json:"page,omitempty"` + + // PerPage The number of results per page (max 1000). + PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// ListPluginsParams defines parameters for ListPlugins. +type ListPluginsParams struct { + // SortBy The field to sort by + SortBy *ListPluginsParamsSortBy `form:"sort_by,omitempty" json:"sort_by,omitempty"` + + // Page Page number of the results to fetch + Page *Page `form:"page,omitempty" json:"page,omitempty"` + + // PerPage The number of results per page (max 1000). + PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` + + // IncludeReleaseStages Include these release stages in the response + IncludeReleaseStages *PluginIncludeReleaseStages `form:"include_release_stages,omitempty" json:"include_release_stages,omitempty"` + + // ExcludeReleaseStages Exclude these release stages from the response + ExcludeReleaseStages *PluginExcludeReleaseStages `form:"exclude_release_stages,omitempty" json:"exclude_release_stages,omitempty"` +} + +// ListPluginsParamsSortBy defines parameters for ListPlugins. +type ListPluginsParamsSortBy string + +// ListPluginVersionsParams defines parameters for ListPluginVersions. +type ListPluginVersionsParams struct { + // SortBy The field to sort by + SortBy *ListPluginVersionsParamsSortBy `form:"sort_by,omitempty" json:"sort_by,omitempty"` + + // Page Page number of the results to fetch + Page *Page `form:"page,omitempty" json:"page,omitempty"` + + // PerPage The number of results per page (max 1000). + PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` + + // IncludeDrafts Whether to include draft versions + IncludeDrafts *IncludeDrafts `form:"include_drafts,omitempty" json:"include_drafts,omitempty"` + + // IncludeFips Whether to include fips versions + IncludeFips *IncludeFips `form:"include_fips,omitempty" json:"include_fips,omitempty"` + + // IncludePrereleases Whether to include prerelease versions + IncludePrereleases *IncludePrereleases `form:"include_prereleases,omitempty" json:"include_prereleases,omitempty"` + VersionFilter *VersionFilter `form:"version_filter,omitempty" json:"version_filter,omitempty"` +} + +// ListPluginVersionsParamsSortBy defines parameters for ListPluginVersions. +type ListPluginVersionsParamsSortBy string + +// DownloadPluginAssetParams defines parameters for DownloadPluginAsset. +type DownloadPluginAssetParams struct { + Accept *string `json:"Accept,omitempty"` +} + +// ListPluginVersionDocsParams defines parameters for ListPluginVersionDocs. +type ListPluginVersionDocsParams struct { + // Page Page number of the results to fetch + Page *Page `form:"page,omitempty" json:"page,omitempty"` + + // PerPage The number of results per page (max 1000). + PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// ListPluginVersionTablesParams defines parameters for ListPluginVersionTables. +type ListPluginVersionTablesParams struct { + // Page Page number of the results to fetch + Page *Page `form:"page,omitempty" json:"page,omitempty"` + + // PerPage The number of results per page (max 1000). + PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// AuthRegistryRequestParams defines parameters for AuthRegistryRequest. +type AuthRegistryRequestParams struct { + // Account Username used for `docker login` + Account *string `form:"account,omitempty" json:"account,omitempty"` + + // Service Service requesting the JWT token + Service *string `form:"service,omitempty" json:"service,omitempty"` + + // Scope Multi-value string containing the repository being access and the operation type (push/pull) + Scope *string `form:"scope,omitempty" json:"scope,omitempty"` + + // XMetaPluginVersion Plugin version name + XMetaPluginVersion *string `json:"X-Meta-Plugin-Version,omitempty"` + + // XMetaUserTeamName User's team name + XMetaUserTeamName *string `json:"X-Meta-User-Team-Name,omitempty"` +} + +// ListTeamsParams defines parameters for ListTeams. +type ListTeamsParams struct { + // PerPage The number of results per page (max 1000). + PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` + + // Page Page number of the results to fetch + Page *Page `form:"page,omitempty" json:"page,omitempty"` +} + +// ListAddonOrdersByTeamParams defines parameters for ListAddonOrdersByTeam. +type ListAddonOrdersByTeamParams struct { + // Page Page number of the results to fetch + Page *Page `form:"page,omitempty" json:"page,omitempty"` + + // PerPage The number of results per page (max 1000). + PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// ListAddonsByTeamParams defines parameters for ListAddonsByTeam. +type ListAddonsByTeamParams struct { + // Page Page number of the results to fetch + Page *Page `form:"page,omitempty" json:"page,omitempty"` + + // PerPage The number of results per page (max 1000). + PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` + + // IncludePrivate Whether to include private plugins + IncludePrivate *IncludePrivate `form:"include_private,omitempty" json:"include_private,omitempty"` +} + +// DownloadAddonAssetByTeamParams defines parameters for DownloadAddonAssetByTeam. +type DownloadAddonAssetByTeamParams struct { + Accept *string `json:"Accept,omitempty"` +} + +// ListTeamAPIKeysParams defines parameters for ListTeamAPIKeys. +type ListTeamAPIKeysParams struct { + // PerPage The number of results per page (max 1000). + PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` + + // Page Page number of the results to fetch + Page *Page `form:"page,omitempty" json:"page,omitempty"` +} + +// ListTeamInvitationsParams defines parameters for ListTeamInvitations. +type ListTeamInvitationsParams struct { + // Page Page number of the results to fetch + Page *Page `form:"page,omitempty" json:"page,omitempty"` + + // PerPage The number of results per page (max 1000). + PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// ListInvoicesByTeamParams defines parameters for ListInvoicesByTeam. +type ListInvoicesByTeamParams struct { + // Page Page number of the results to fetch + Page *Page `form:"page,omitempty" json:"page,omitempty"` + + // PerPage The number of results per page (max 1000). + PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// GetManagedDatabasesParams defines parameters for GetManagedDatabases. +type GetManagedDatabasesParams struct { + // Page Page number of the results to fetch + Page *Page `form:"page,omitempty" json:"page,omitempty"` + + // PerPage The number of results per page (max 1000). + PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// GetTeamMembershipsParams defines parameters for GetTeamMemberships. +type GetTeamMembershipsParams struct { + // Page Page number of the results to fetch + Page *Page `form:"page,omitempty" json:"page,omitempty"` + + // PerPage The number of results per page (max 1000). + PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// ListPluginsByTeamParams defines parameters for ListPluginsByTeam. +type ListPluginsByTeamParams struct { + // Page Page number of the results to fetch + Page *Page `form:"page,omitempty" json:"page,omitempty"` + + // PerPage The number of results per page (max 1000). + PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` + + // IncludePrivate Whether to include private plugins + IncludePrivate *IncludePrivate `form:"include_private,omitempty" json:"include_private,omitempty"` +} + +// DownloadPluginAssetByTeamParams defines parameters for DownloadPluginAssetByTeam. +type DownloadPluginAssetByTeamParams struct { + Accept *string `json:"Accept,omitempty"` +} + +// ListSubscriptionOrdersByTeamParams defines parameters for ListSubscriptionOrdersByTeam. +type ListSubscriptionOrdersByTeamParams struct { + // Page Page number of the results to fetch + Page *Page `form:"page,omitempty" json:"page,omitempty"` + + // PerPage The number of results per page (max 1000). + PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// ListTeamPluginUsageParams defines parameters for ListTeamPluginUsage. +type ListTeamPluginUsageParams struct { + // Page Page number of the results to fetch + Page *Page `form:"page,omitempty" json:"page,omitempty"` + + // PerPage The number of results per page (max 1000). + PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// GetTeamUsageSummaryParams defines parameters for GetTeamUsageSummary. +type GetTeamUsageSummaryParams struct { + Metrics *[]GetTeamUsageSummaryParamsMetrics `form:"metrics,omitempty" json:"metrics,omitempty"` + Start *time.Time `form:"start,omitempty" json:"start,omitempty"` + End *time.Time `form:"end,omitempty" json:"end,omitempty"` + + // AggregationPeriod An aggregation period to sum data over. In other words, data will be returned at this granularity. Currently only supports day and month. + AggregationPeriod *GetTeamUsageSummaryParamsAggregationPeriod `form:"aggregation_period,omitempty" json:"aggregation_period,omitempty"` +} + +// GetTeamUsageSummaryParamsMetrics defines parameters for GetTeamUsageSummary. +type GetTeamUsageSummaryParamsMetrics string + +// GetTeamUsageSummaryParamsAggregationPeriod defines parameters for GetTeamUsageSummary. +type GetTeamUsageSummaryParamsAggregationPeriod string + +// GetGroupedTeamUsageSummaryParams defines parameters for GetGroupedTeamUsageSummary. +type GetGroupedTeamUsageSummaryParams struct { + Metrics *[]GetGroupedTeamUsageSummaryParamsMetrics `form:"metrics,omitempty" json:"metrics,omitempty"` + Start *time.Time `form:"start,omitempty" json:"start,omitempty"` + End *time.Time `form:"end,omitempty" json:"end,omitempty"` + + // AggregationPeriod An aggregation period to sum data over. In other words, data will be returned at this granularity. Currently only supports day and month. + AggregationPeriod *GetGroupedTeamUsageSummaryParamsAggregationPeriod `form:"aggregation_period,omitempty" json:"aggregation_period,omitempty"` +} + +// GetGroupedTeamUsageSummaryParamsMetrics defines parameters for GetGroupedTeamUsageSummary. +type GetGroupedTeamUsageSummaryParamsMetrics string + +// GetGroupedTeamUsageSummaryParamsAggregationPeriod defines parameters for GetGroupedTeamUsageSummary. +type GetGroupedTeamUsageSummaryParamsAggregationPeriod string + +// GetGroupedTeamUsageSummaryParamsGroupBy defines parameters for GetGroupedTeamUsageSummary. +type GetGroupedTeamUsageSummaryParamsGroupBy string + +// ListUsersByTeamParams defines parameters for ListUsersByTeam. +type ListUsersByTeamParams struct { + // PerPage The number of results per page (max 1000). + PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` + + // Page Page number of the results to fetch + Page *Page `form:"page,omitempty" json:"page,omitempty"` +} + +// ListCurrentUserInvitationsParams defines parameters for ListCurrentUserInvitations. +type ListCurrentUserInvitationsParams struct { + // Page Page number of the results to fetch + Page *Page `form:"page,omitempty" json:"page,omitempty"` + + // PerPage The number of results per page (max 1000). + PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// GetCurrentUserMembershipsParams defines parameters for GetCurrentUserMemberships. +type GetCurrentUserMembershipsParams struct { + // Page Page number of the results to fetch + Page *Page `form:"page,omitempty" json:"page,omitempty"` + + // PerPage The number of results per page (max 1000). + PerPage *PerPage `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// DeterminePlatformTenantByEmailParams defines parameters for DeterminePlatformTenantByEmail. +type DeterminePlatformTenantByEmailParams struct { + Email string `form:"email" json:"email"` +} + +// UserTOTPVerifyParams defines parameters for UserTOTPVerify. +type UserTOTPVerifyParams struct { + Session *string `form:"__session,omitempty" json:"__session,omitempty"` +} + +// CreateAddonJSONRequestBody defines body for CreateAddon for application/json ContentType. +type CreateAddonJSONRequestBody = AddonCreate + +// UpdateAddonJSONRequestBody defines body for UpdateAddon for application/json ContentType. +type UpdateAddonJSONRequestBody = AddonUpdate + +// UpdateAddonVersionJSONRequestBody defines body for UpdateAddonVersion for application/json ContentType. +type UpdateAddonVersionJSONRequestBody = AddonVersionUpdate + +// CreateAddonVersionJSONRequestBody defines body for CreateAddonVersion for application/json ContentType. +type CreateAddonVersionJSONRequestBody = CreateAddonVersionRequest + +// ActivatePlatformJSONRequestBody defines body for ActivatePlatform for application/json ContentType. +type ActivatePlatformJSONRequestBody = ActivatePlatformRequest + +// RenewPlatformActivationJSONRequestBody defines body for RenewPlatformActivation for application/json ContentType. +type RenewPlatformActivationJSONRequestBody = RenewPlatformActivationRequest + +// ReportPlatformDataJSONRequestBody defines body for ReportPlatformData for application/json ContentType. +type ReportPlatformDataJSONRequestBody = ReportPlatformDataRequest + +// ReportTenantPlatformDataJSONRequestBody defines body for ReportTenantPlatformData for application/json ContentType. +type ReportTenantPlatformDataJSONRequestBody = ReportTenantPlatformDataRequest + +// CreatePluginNotificationRequestJSONRequestBody defines body for CreatePluginNotificationRequest for application/json ContentType. +type CreatePluginNotificationRequestJSONRequestBody = PluginNotificationRequestCreate + +// CreatePluginJSONRequestBody defines body for CreatePlugin for application/json ContentType. +type CreatePluginJSONRequestBody = PluginCreate + +// UpdatePluginJSONRequestBody defines body for UpdatePlugin for application/json ContentType. +type UpdatePluginJSONRequestBody = PluginUpdate + +// CreatePluginUpcomingPriceChangeJSONRequestBody defines body for CreatePluginUpcomingPriceChange for application/json ContentType. +type CreatePluginUpcomingPriceChangeJSONRequestBody = PluginPriceCreate + +// UpdatePluginVersionJSONRequestBody defines body for UpdatePluginVersion for application/json ContentType. +type UpdatePluginVersionJSONRequestBody = PluginVersionUpdate + +// CreatePluginVersionJSONRequestBody defines body for CreatePluginVersion for application/json ContentType. +type CreatePluginVersionJSONRequestBody = CreatePluginVersionRequest + +// DeletePluginVersionDocsJSONRequestBody defines body for DeletePluginVersionDocs for application/json ContentType. +type DeletePluginVersionDocsJSONRequestBody = DeletePluginVersionDocsRequest + +// ReplacePluginVersionDocsJSONRequestBody defines body for ReplacePluginVersionDocs for application/json ContentType. +type ReplacePluginVersionDocsJSONRequestBody = CreatePluginVersionDocsRequest + +// CreatePluginVersionDocsJSONRequestBody defines body for CreatePluginVersionDocs for application/json ContentType. +type CreatePluginVersionDocsJSONRequestBody = CreatePluginVersionDocsRequest + +// DeletePluginVersionTablesJSONRequestBody defines body for DeletePluginVersionTables for application/json ContentType. +type DeletePluginVersionTablesJSONRequestBody = DeletePluginVersionTablesRequest + +// CreatePluginVersionTablesJSONRequestBody defines body for CreatePluginVersionTables for application/json ContentType. +type CreatePluginVersionTablesJSONRequestBody = CreatePluginVersionTablesRequest + +// UploadPluginUIAssetsJSONRequestBody defines body for UploadPluginUIAssets for application/json ContentType. +type UploadPluginUIAssetsJSONRequestBody = UploadPluginUIAssetsRequest + +// FinalizePluginUIAssetUploadJSONRequestBody defines body for FinalizePluginUIAssetUpload for application/json ContentType. +type FinalizePluginUIAssetUploadJSONRequestBody = FinalizePluginUIAssetUploadRequest + +// CreateTeamJSONRequestBody defines body for CreateTeam for application/json ContentType. +type CreateTeamJSONRequestBody = CreateTeamRequest + +// UpdateTeamJSONRequestBody defines body for UpdateTeam for application/json ContentType. +type UpdateTeamJSONRequestBody = UpdateTeamRequest + +// CreateAddonOrderForTeamJSONRequestBody defines body for CreateAddonOrderForTeam for application/json ContentType. +type CreateAddonOrderForTeamJSONRequestBody = AddonOrderCreate + +// AIOnboardingChatJSONRequestBody defines body for AIOnboardingChat for application/json ContentType. +type AIOnboardingChatJSONRequestBody = AIOnboardingChatRequest + +// AIOnboardingNewConversationJSONRequestBody defines body for AIOnboardingNewConversation for application/json ContentType. +type AIOnboardingNewConversationJSONRequestBody = AIOnboardingNewConversationRequest + +// CreateTeamAPIKeyJSONRequestBody defines body for CreateTeamAPIKey for application/json ContentType. +type CreateTeamAPIKeyJSONRequestBody = CreateTeamAPIKeyRequest + +// CreateTeamImagesJSONRequestBody defines body for CreateTeamImages for application/json ContentType. +type CreateTeamImagesJSONRequestBody = CreateTeamImagesRequest + +// DeleteTeamInvitationJSONRequestBody defines body for DeleteTeamInvitation for application/json ContentType. +type DeleteTeamInvitationJSONRequestBody = DeleteTeamInvitationRequest + +// EmailTeamInvitationJSONRequestBody defines body for EmailTeamInvitation for application/json ContentType. +type EmailTeamInvitationJSONRequestBody = EmailTeamInvitationRequest + +// AcceptTeamInvitationJSONRequestBody defines body for AcceptTeamInvitation for application/json ContentType. +type AcceptTeamInvitationJSONRequestBody = AcceptTeamInvitationRequest + +// CreateManagedDatabaseJSONRequestBody defines body for CreateManagedDatabase for application/json ContentType. +type CreateManagedDatabaseJSONRequestBody = ManagedDatabaseCreate + +// RemoveTeamMembershipJSONRequestBody defines body for RemoveTeamMembership for application/json ContentType. +type RemoveTeamMembershipJSONRequestBody = RemoveTeamMembershipRequest + +// UpdateSettingsJSONRequestBody defines body for UpdateSettings for application/json ContentType. +type UpdateSettingsJSONRequestBody = SettingsUpdate + +// CreateSubscriptionOrderForTeamJSONRequestBody defines body for CreateSubscriptionOrderForTeam for application/json ContentType. +type CreateSubscriptionOrderForTeamJSONRequestBody = TeamSubscriptionOrderCreate + +// IncreaseTeamPluginUsageJSONRequestBody defines body for IncreaseTeamPluginUsage for application/json ContentType. +type IncreaseTeamPluginUsageJSONRequestBody = UsageIncrease + +// UploadImageJSONRequestBody defines body for UploadImage for application/json ContentType. +type UploadImageJSONRequestBody = UploadImageRequest + +// UpdateCurrentUserJSONRequestBody defines body for UpdateCurrentUser for application/json ContentType. +type UpdateCurrentUserJSONRequestBody = UpdateCurrentUserRequest + +// SendAnonymousEventJSONRequestBody defines body for SendAnonymousEvent for application/json ContentType. +type SendAnonymousEventJSONRequestBody = SendAnonymousEventRequest + +// UpdateCustomerJSONRequestBody defines body for UpdateCustomer for application/json ContentType. +type UpdateCustomerJSONRequestBody = UpdateCustomerRequest + +// SendUserEventJSONRequestBody defines body for SendUserEvent for application/json ContentType. +type SendUserEventJSONRequestBody = SendUserEventRequest + +// LoginUserJSONRequestBody defines body for LoginUser for application/json ContentType. +type LoginUserJSONRequestBody = LoginUserRequest + +// RegisterUserJSONRequestBody defines body for RegisterUser for application/json ContentType. +type RegisterUserJSONRequestBody = RegisterUserRequest + +// ResetUserPasswordJSONRequestBody defines body for ResetUserPassword for application/json ContentType. +type ResetUserPasswordJSONRequestBody = ResetUserPasswordRequest + +// UserTOTPVerifyJSONRequestBody defines body for UserTOTPVerify for application/json ContentType. +type UserTOTPVerifyJSONRequestBody = UserTOTPVerifyRequest + +// VerifyUserEmailJSONRequestBody defines body for VerifyUserEmail for application/json ContentType. +type VerifyUserEmailJSONRequestBody = VerifyUserEmailRequest + +// Getter for additional properties for AIOnboardingChat200Response. Returns the specified +// element and whether it was found +func (a AIOnboardingChat200Response) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for AIOnboardingChat200Response +func (a *AIOnboardingChat200Response) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for AIOnboardingChat200Response to handle AdditionalProperties +func (a *AIOnboardingChat200Response) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["function_call"]; found { + err = json.Unmarshal(raw, &a.FunctionCall) + if err != nil { + return fmt.Errorf("error reading 'function_call': %w", err) + } + delete(object, "function_call") + } + + if raw, found := object["function_call_arguments"]; found { + err = json.Unmarshal(raw, &a.FunctionCallArguments) + if err != nil { + return fmt.Errorf("error reading 'function_call_arguments': %w", err) + } + delete(object, "function_call_arguments") + } + + if raw, found := object["function_call_id"]; found { + err = json.Unmarshal(raw, &a.FunctionCallID) + if err != nil { + return fmt.Errorf("error reading 'function_call_id': %w", err) + } + delete(object, "function_call_id") + } + + if raw, found := object["message"]; found { + err = json.Unmarshal(raw, &a.Message) + if err != nil { + return fmt.Errorf("error reading 'message': %w", err) + } + delete(object, "message") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for AIOnboardingChat200Response to handle AdditionalProperties +func (a AIOnboardingChat200Response) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + if a.FunctionCall != nil { + object["function_call"], err = json.Marshal(a.FunctionCall) + if err != nil { + return nil, fmt.Errorf("error marshaling 'function_call': %w", err) + } + } + + if a.FunctionCallArguments != nil { + object["function_call_arguments"], err = json.Marshal(a.FunctionCallArguments) + if err != nil { + return nil, fmt.Errorf("error marshaling 'function_call_arguments': %w", err) + } + } + + if a.FunctionCallID != nil { + object["function_call_id"], err = json.Marshal(a.FunctionCallID) + if err != nil { + return nil, fmt.Errorf("error marshaling 'function_call_id': %w", err) + } + } + + object["message"], err = json.Marshal(a.Message) + if err != nil { + return nil, fmt.Errorf("error marshaling 'message': %w", err) + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for AIOnboardingChatRequest. Returns the specified +// element and whether it was found +func (a AIOnboardingChatRequest) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for AIOnboardingChatRequest +func (a *AIOnboardingChatRequest) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for AIOnboardingChatRequest to handle AdditionalProperties +func (a *AIOnboardingChatRequest) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["chat_mode"]; found { + err = json.Unmarshal(raw, &a.ChatMode) + if err != nil { + return fmt.Errorf("error reading 'chat_mode': %w", err) + } + delete(object, "chat_mode") + } + + if raw, found := object["conversation_id"]; found { + err = json.Unmarshal(raw, &a.ConversationID) + if err != nil { + return fmt.Errorf("error reading 'conversation_id': %w", err) + } + delete(object, "conversation_id") + } + + if raw, found := object["function_call_outputs"]; found { + err = json.Unmarshal(raw, &a.FunctionCallOutputs) + if err != nil { + return fmt.Errorf("error reading 'function_call_outputs': %w", err) + } + delete(object, "function_call_outputs") + } + + if raw, found := object["message"]; found { + err = json.Unmarshal(raw, &a.Message) + if err != nil { + return fmt.Errorf("error reading 'message': %w", err) + } + delete(object, "message") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for AIOnboardingChatRequest to handle AdditionalProperties +func (a AIOnboardingChatRequest) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + if a.ChatMode != nil { + object["chat_mode"], err = json.Marshal(a.ChatMode) + if err != nil { + return nil, fmt.Errorf("error marshaling 'chat_mode': %w", err) + } + } + + if a.ConversationID != nil { + object["conversation_id"], err = json.Marshal(a.ConversationID) + if err != nil { + return nil, fmt.Errorf("error marshaling 'conversation_id': %w", err) + } + } + + if a.FunctionCallOutputs != nil { + object["function_call_outputs"], err = json.Marshal(a.FunctionCallOutputs) + if err != nil { + return nil, fmt.Errorf("error marshaling 'function_call_outputs': %w", err) + } + } + + if a.Message != nil { + object["message"], err = json.Marshal(a.Message) + if err != nil { + return nil, fmt.Errorf("error marshaling 'message': %w", err) + } + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for AIOnboardingEndConversation200Response. Returns the specified +// element and whether it was found +func (a AIOnboardingEndConversation200Response) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for AIOnboardingEndConversation200Response +func (a *AIOnboardingEndConversation200Response) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for AIOnboardingEndConversation200Response to handle AdditionalProperties +func (a *AIOnboardingEndConversation200Response) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["success"]; found { + err = json.Unmarshal(raw, &a.Success) + if err != nil { + return fmt.Errorf("error reading 'success': %w", err) + } + delete(object, "success") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for AIOnboardingEndConversation200Response to handle AdditionalProperties +func (a AIOnboardingEndConversation200Response) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + if a.Success != nil { + object["success"], err = json.Marshal(a.Success) + if err != nil { + return nil, fmt.Errorf("error marshaling 'success': %w", err) + } + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for AIOnboardingNewConversation200Response. Returns the specified +// element and whether it was found +func (a AIOnboardingNewConversation200Response) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for AIOnboardingNewConversation200Response +func (a *AIOnboardingNewConversation200Response) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for AIOnboardingNewConversation200Response to handle AdditionalProperties +func (a *AIOnboardingNewConversation200Response) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["conversation_id"]; found { + err = json.Unmarshal(raw, &a.ConversationID) + if err != nil { + return fmt.Errorf("error reading 'conversation_id': %w", err) + } + delete(object, "conversation_id") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for AIOnboardingNewConversation200Response to handle AdditionalProperties +func (a AIOnboardingNewConversation200Response) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["conversation_id"], err = json.Marshal(a.ConversationID) + if err != nil { + return nil, fmt.Errorf("error marshaling 'conversation_id': %w", err) + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for AIOnboardingNewConversationRequest. Returns the specified +// element and whether it was found +func (a AIOnboardingNewConversationRequest) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for AIOnboardingNewConversationRequest +func (a *AIOnboardingNewConversationRequest) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for AIOnboardingNewConversationRequest to handle AdditionalProperties +func (a *AIOnboardingNewConversationRequest) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["try_resume"]; found { + err = json.Unmarshal(raw, &a.TryResume) + if err != nil { + return fmt.Errorf("error reading 'try_resume': %w", err) + } + delete(object, "try_resume") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for AIOnboardingNewConversationRequest to handle AdditionalProperties +func (a AIOnboardingNewConversationRequest) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + if a.TryResume != nil { + object["try_resume"], err = json.Marshal(a.TryResume) + if err != nil { + return nil, fmt.Errorf("error marshaling 'try_resume': %w", err) + } + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for ActivatePlatform200Response. Returns the specified +// element and whether it was found +func (a ActivatePlatform200Response) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for ActivatePlatform200Response +func (a *ActivatePlatform200Response) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for ActivatePlatform200Response to handle AdditionalProperties +func (a *ActivatePlatform200Response) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["activation_id"]; found { + err = json.Unmarshal(raw, &a.ActivationID) + if err != nil { + return fmt.Errorf("error reading 'activation_id': %w", err) + } + delete(object, "activation_id") + } + + if raw, found := object["next_check_in_seconds"]; found { + err = json.Unmarshal(raw, &a.NextCheckInSeconds) + if err != nil { + return fmt.Errorf("error reading 'next_check_in_seconds': %w", err) + } + delete(object, "next_check_in_seconds") + } + + if raw, found := object["team_name"]; found { + err = json.Unmarshal(raw, &a.TeamName) + if err != nil { + return fmt.Errorf("error reading 'team_name': %w", err) + } + delete(object, "team_name") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for ActivatePlatform200Response to handle AdditionalProperties +func (a ActivatePlatform200Response) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["activation_id"], err = json.Marshal(a.ActivationID) + if err != nil { + return nil, fmt.Errorf("error marshaling 'activation_id': %w", err) + } + + object["next_check_in_seconds"], err = json.Marshal(a.NextCheckInSeconds) + if err != nil { + return nil, fmt.Errorf("error marshaling 'next_check_in_seconds': %w", err) + } + + object["team_name"], err = json.Marshal(a.TeamName) + if err != nil { + return nil, fmt.Errorf("error marshaling 'team_name': %w", err) + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for ActivatePlatform205Response. Returns the specified +// element and whether it was found +func (a ActivatePlatform205Response) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for ActivatePlatform205Response +func (a *ActivatePlatform205Response) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for ActivatePlatform205Response to handle AdditionalProperties +func (a *ActivatePlatform205Response) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["button_text"]; found { + err = json.Unmarshal(raw, &a.ButtonText) + if err != nil { + return fmt.Errorf("error reading 'button_text': %w", err) + } + delete(object, "button_text") + } + + if raw, found := object["button_url"]; found { + err = json.Unmarshal(raw, &a.ButtonURL) + if err != nil { + return fmt.Errorf("error reading 'button_url': %w", err) + } + delete(object, "button_url") + } + + if raw, found := object["error"]; found { + err = json.Unmarshal(raw, &a.Error) + if err != nil { + return fmt.Errorf("error reading 'error': %w", err) + } + delete(object, "error") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for ActivatePlatform205Response to handle AdditionalProperties +func (a ActivatePlatform205Response) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + if a.ButtonText != nil { + object["button_text"], err = json.Marshal(a.ButtonText) + if err != nil { + return nil, fmt.Errorf("error marshaling 'button_text': %w", err) + } + } + + if a.ButtonURL != nil { + object["button_url"], err = json.Marshal(a.ButtonURL) + if err != nil { + return nil, fmt.Errorf("error marshaling 'button_url': %w", err) + } + } + + object["error"], err = json.Marshal(a.Error) + if err != nil { + return nil, fmt.Errorf("error marshaling 'error': %w", err) + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for ActivatePlatformRequest. Returns the specified +// element and whether it was found +func (a ActivatePlatformRequest) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for ActivatePlatformRequest +func (a *ActivatePlatformRequest) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for ActivatePlatformRequest to handle AdditionalProperties +func (a *ActivatePlatformRequest) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["api_key"]; found { + err = json.Unmarshal(raw, &a.APIKey) + if err != nil { + return fmt.Errorf("error reading 'api_key': %w", err) + } + delete(object, "api_key") + } + + if raw, found := object["installation_id"]; found { + err = json.Unmarshal(raw, &a.InstallationID) + if err != nil { + return fmt.Errorf("error reading 'installation_id': %w", err) + } + delete(object, "installation_id") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for ActivatePlatformRequest to handle AdditionalProperties +func (a ActivatePlatformRequest) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["api_key"], err = json.Marshal(a.APIKey) + if err != nil { + return nil, fmt.Errorf("error marshaling 'api_key': %w", err) + } + + object["installation_id"], err = json.Marshal(a.InstallationID) + if err != nil { + return nil, fmt.Errorf("error marshaling 'installation_id': %w", err) + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for CreateTeamRequest. Returns the specified +// element and whether it was found +func (a CreateTeamRequest) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for CreateTeamRequest +func (a *CreateTeamRequest) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for CreateTeamRequest to handle AdditionalProperties +func (a *CreateTeamRequest) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["display_name"]; found { + err = json.Unmarshal(raw, &a.DisplayName) + if err != nil { + return fmt.Errorf("error reading 'display_name': %w", err) + } + delete(object, "display_name") + } + + if raw, found := object["name"]; found { + err = json.Unmarshal(raw, &a.Name) + if err != nil { + return fmt.Errorf("error reading 'name': %w", err) + } + delete(object, "name") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for CreateTeamRequest to handle AdditionalProperties +func (a CreateTeamRequest) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["display_name"], err = json.Marshal(a.DisplayName) + if err != nil { + return nil, fmt.Errorf("error marshaling 'display_name': %w", err) + } + + object["name"], err = json.Marshal(a.Name) + if err != nil { + return nil, fmt.Errorf("error marshaling 'name': %w", err) + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for FunctionCallOutput. Returns the specified +// element and whether it was found +func (a FunctionCallOutput) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for FunctionCallOutput +func (a *FunctionCallOutput) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for FunctionCallOutput to handle AdditionalProperties +func (a *FunctionCallOutput) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["arguments"]; found { + err = json.Unmarshal(raw, &a.Arguments) + if err != nil { + return fmt.Errorf("error reading 'arguments': %w", err) + } + delete(object, "arguments") + } + + if raw, found := object["call_id"]; found { + err = json.Unmarshal(raw, &a.CallID) + if err != nil { + return fmt.Errorf("error reading 'call_id': %w", err) + } + delete(object, "call_id") + } + + if raw, found := object["name"]; found { + err = json.Unmarshal(raw, &a.Name) + if err != nil { + return fmt.Errorf("error reading 'name': %w", err) + } + delete(object, "name") + } + + if raw, found := object["output"]; found { + err = json.Unmarshal(raw, &a.Output) + if err != nil { + return fmt.Errorf("error reading 'output': %w", err) + } + delete(object, "output") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for FunctionCallOutput to handle AdditionalProperties +func (a FunctionCallOutput) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["arguments"], err = json.Marshal(a.Arguments) + if err != nil { + return nil, fmt.Errorf("error marshaling 'arguments': %w", err) + } + + object["call_id"], err = json.Marshal(a.CallID) + if err != nil { + return nil, fmt.Errorf("error marshaling 'call_id': %w", err) + } + + object["name"], err = json.Marshal(a.Name) + if err != nil { + return nil, fmt.Errorf("error marshaling 'name': %w", err) + } + + object["output"], err = json.Marshal(a.Output) + if err != nil { + return nil, fmt.Errorf("error marshaling 'output': %w", err) + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for LoginUserRequest. Returns the specified +// element and whether it was found +func (a LoginUserRequest) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for LoginUserRequest +func (a *LoginUserRequest) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for LoginUserRequest to handle AdditionalProperties +func (a *LoginUserRequest) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["id_token"]; found { + err = json.Unmarshal(raw, &a.IDToken) + if err != nil { + return fmt.Errorf("error reading 'id_token': %w", err) + } + delete(object, "id_token") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for LoginUserRequest to handle AdditionalProperties +func (a LoginUserRequest) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["id_token"], err = json.Marshal(a.IDToken) + if err != nil { + return nil, fmt.Errorf("error marshaling 'id_token': %w", err) + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for RegisterUserRequest. Returns the specified +// element and whether it was found +func (a RegisterUserRequest) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for RegisterUserRequest +func (a *RegisterUserRequest) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for RegisterUserRequest to handle AdditionalProperties +func (a *RegisterUserRequest) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["email"]; found { + err = json.Unmarshal(raw, &a.Email) + if err != nil { + return fmt.Errorf("error reading 'email': %w", err) + } + delete(object, "email") + } + + if raw, found := object["password"]; found { + err = json.Unmarshal(raw, &a.Password) + if err != nil { + return fmt.Errorf("error reading 'password': %w", err) + } + delete(object, "password") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for RegisterUserRequest to handle AdditionalProperties +func (a RegisterUserRequest) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["email"], err = json.Marshal(a.Email) + if err != nil { + return nil, fmt.Errorf("error marshaling 'email': %w", err) + } + + object["password"], err = json.Marshal(a.Password) + if err != nil { + return nil, fmt.Errorf("error marshaling 'password': %w", err) + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for RenewPlatformActivation200Response. Returns the specified +// element and whether it was found +func (a RenewPlatformActivation200Response) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for RenewPlatformActivation200Response +func (a *RenewPlatformActivation200Response) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for RenewPlatformActivation200Response to handle AdditionalProperties +func (a *RenewPlatformActivation200Response) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["next_check_in_seconds"]; found { + err = json.Unmarshal(raw, &a.NextCheckInSeconds) + if err != nil { + return fmt.Errorf("error reading 'next_check_in_seconds': %w", err) + } + delete(object, "next_check_in_seconds") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for RenewPlatformActivation200Response to handle AdditionalProperties +func (a RenewPlatformActivation200Response) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["next_check_in_seconds"], err = json.Marshal(a.NextCheckInSeconds) + if err != nil { + return nil, fmt.Errorf("error marshaling 'next_check_in_seconds': %w", err) + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for RenewPlatformActivationRequest. Returns the specified +// element and whether it was found +func (a RenewPlatformActivationRequest) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for RenewPlatformActivationRequest +func (a *RenewPlatformActivationRequest) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for RenewPlatformActivationRequest to handle AdditionalProperties +func (a *RenewPlatformActivationRequest) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["activation_id"]; found { + err = json.Unmarshal(raw, &a.ActivationID) + if err != nil { + return fmt.Errorf("error reading 'activation_id': %w", err) + } + delete(object, "activation_id") + } + + if raw, found := object["installation_id"]; found { + err = json.Unmarshal(raw, &a.InstallationID) + if err != nil { + return fmt.Errorf("error reading 'installation_id': %w", err) + } + delete(object, "installation_id") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for RenewPlatformActivationRequest to handle AdditionalProperties +func (a RenewPlatformActivationRequest) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["activation_id"], err = json.Marshal(a.ActivationID) + if err != nil { + return nil, fmt.Errorf("error marshaling 'activation_id': %w", err) + } + + object["installation_id"], err = json.Marshal(a.InstallationID) + if err != nil { + return nil, fmt.Errorf("error marshaling 'installation_id': %w", err) + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for ReportPlatformDataRequest. Returns the specified +// element and whether it was found +func (a ReportPlatformDataRequest) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for ReportPlatformDataRequest +func (a *ReportPlatformDataRequest) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for ReportPlatformDataRequest to handle AdditionalProperties +func (a *ReportPlatformDataRequest) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["installation_id"]; found { + err = json.Unmarshal(raw, &a.InstallationID) + if err != nil { + return fmt.Errorf("error reading 'installation_id': %w", err) + } + delete(object, "installation_id") + } + + if raw, found := object["user_additions"]; found { + err = json.Unmarshal(raw, &a.UserAdditions) + if err != nil { + return fmt.Errorf("error reading 'user_additions': %w", err) + } + delete(object, "user_additions") + } + + if raw, found := object["user_removals"]; found { + err = json.Unmarshal(raw, &a.UserRemovals) + if err != nil { + return fmt.Errorf("error reading 'user_removals': %w", err) + } + delete(object, "user_removals") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for ReportPlatformDataRequest to handle AdditionalProperties +func (a ReportPlatformDataRequest) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["installation_id"], err = json.Marshal(a.InstallationID) + if err != nil { + return nil, fmt.Errorf("error marshaling 'installation_id': %w", err) + } + + if a.UserAdditions != nil { + object["user_additions"], err = json.Marshal(a.UserAdditions) + if err != nil { + return nil, fmt.Errorf("error marshaling 'user_additions': %w", err) + } + } + + if a.UserRemovals != nil { + object["user_removals"], err = json.Marshal(a.UserRemovals) + if err != nil { + return nil, fmt.Errorf("error marshaling 'user_removals': %w", err) + } + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for ReportTenantPlatformDataRequest. Returns the specified +// element and whether it was found +func (a ReportTenantPlatformDataRequest) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for ReportTenantPlatformDataRequest +func (a *ReportTenantPlatformDataRequest) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for ReportTenantPlatformDataRequest to handle AdditionalProperties +func (a *ReportTenantPlatformDataRequest) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["host"]; found { + err = json.Unmarshal(raw, &a.Host) + if err != nil { + return fmt.Errorf("error reading 'host': %w", err) + } + delete(object, "host") + } + + if raw, found := object["user_additions"]; found { + err = json.Unmarshal(raw, &a.UserAdditions) + if err != nil { + return fmt.Errorf("error reading 'user_additions': %w", err) + } + delete(object, "user_additions") + } + + if raw, found := object["user_removals"]; found { + err = json.Unmarshal(raw, &a.UserRemovals) + if err != nil { + return fmt.Errorf("error reading 'user_removals': %w", err) + } + delete(object, "user_removals") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for ReportTenantPlatformDataRequest to handle AdditionalProperties +func (a ReportTenantPlatformDataRequest) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["host"], err = json.Marshal(a.Host) + if err != nil { + return nil, fmt.Errorf("error marshaling 'host': %w", err) + } + + if a.UserAdditions != nil { + object["user_additions"], err = json.Marshal(a.UserAdditions) + if err != nil { + return nil, fmt.Errorf("error marshaling 'user_additions': %w", err) + } + } + + if a.UserRemovals != nil { + object["user_removals"], err = json.Marshal(a.UserRemovals) + if err != nil { + return nil, fmt.Errorf("error marshaling 'user_removals': %w", err) + } + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for ResetUserPasswordRequest. Returns the specified +// element and whether it was found +func (a ResetUserPasswordRequest) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for ResetUserPasswordRequest +func (a *ResetUserPasswordRequest) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for ResetUserPasswordRequest to handle AdditionalProperties +func (a *ResetUserPasswordRequest) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["email"]; found { + err = json.Unmarshal(raw, &a.Email) + if err != nil { + return fmt.Errorf("error reading 'email': %w", err) + } + delete(object, "email") + } + + if raw, found := object["subdomain"]; found { + err = json.Unmarshal(raw, &a.Subdomain) + if err != nil { + return fmt.Errorf("error reading 'subdomain': %w", err) + } + delete(object, "subdomain") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for ResetUserPasswordRequest to handle AdditionalProperties +func (a ResetUserPasswordRequest) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["email"], err = json.Marshal(a.Email) + if err != nil { + return nil, fmt.Errorf("error marshaling 'email': %w", err) + } + + if a.Subdomain != nil { + object["subdomain"], err = json.Marshal(a.Subdomain) + if err != nil { + return nil, fmt.Errorf("error marshaling 'subdomain': %w", err) + } + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for SendAnonymousEventRequest. Returns the specified +// element and whether it was found +func (a SendAnonymousEventRequest) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for SendAnonymousEventRequest +func (a *SendAnonymousEventRequest) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for SendAnonymousEventRequest to handle AdditionalProperties +func (a *SendAnonymousEventRequest) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["anonymous_id"]; found { + err = json.Unmarshal(raw, &a.AnonymousID) + if err != nil { + return fmt.Errorf("error reading 'anonymous_id': %w", err) + } + delete(object, "anonymous_id") + } + + if raw, found := object["name"]; found { + err = json.Unmarshal(raw, &a.Name) + if err != nil { + return fmt.Errorf("error reading 'name': %w", err) + } + delete(object, "name") + } + + if raw, found := object["properties"]; found { + err = json.Unmarshal(raw, &a.Properties) + if err != nil { + return fmt.Errorf("error reading 'properties': %w", err) + } + delete(object, "properties") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for SendAnonymousEventRequest to handle AdditionalProperties +func (a SendAnonymousEventRequest) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["anonymous_id"], err = json.Marshal(a.AnonymousID) + if err != nil { + return nil, fmt.Errorf("error marshaling 'anonymous_id': %w", err) + } + + object["name"], err = json.Marshal(a.Name) + if err != nil { + return nil, fmt.Errorf("error marshaling 'name': %w", err) + } + + if a.Properties != nil { + object["properties"], err = json.Marshal(a.Properties) + if err != nil { + return nil, fmt.Errorf("error marshaling 'properties': %w", err) + } + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for SendUserEventRequest. Returns the specified +// element and whether it was found +func (a SendUserEventRequest) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for SendUserEventRequest +func (a *SendUserEventRequest) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for SendUserEventRequest to handle AdditionalProperties +func (a *SendUserEventRequest) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["name"]; found { + err = json.Unmarshal(raw, &a.Name) + if err != nil { + return fmt.Errorf("error reading 'name': %w", err) + } + delete(object, "name") + } + + if raw, found := object["properties"]; found { + err = json.Unmarshal(raw, &a.Properties) + if err != nil { + return fmt.Errorf("error reading 'properties': %w", err) + } + delete(object, "properties") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for SendUserEventRequest to handle AdditionalProperties +func (a SendUserEventRequest) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["name"], err = json.Marshal(a.Name) + if err != nil { + return nil, fmt.Errorf("error marshaling 'name': %w", err) + } + + if a.Properties != nil { + object["properties"], err = json.Marshal(a.Properties) + if err != nil { + return nil, fmt.Errorf("error marshaling 'properties': %w", err) + } + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for UpdateCurrentUserRequest. Returns the specified +// element and whether it was found +func (a UpdateCurrentUserRequest) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for UpdateCurrentUserRequest +func (a *UpdateCurrentUserRequest) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for UpdateCurrentUserRequest to handle AdditionalProperties +func (a *UpdateCurrentUserRequest) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["name"]; found { + err = json.Unmarshal(raw, &a.Name) + if err != nil { + return fmt.Errorf("error reading 'name': %w", err) + } + delete(object, "name") + } + + if raw, found := object["onboarded"]; found { + err = json.Unmarshal(raw, &a.Onboarded) + if err != nil { + return fmt.Errorf("error reading 'onboarded': %w", err) + } + delete(object, "onboarded") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for UpdateCurrentUserRequest to handle AdditionalProperties +func (a UpdateCurrentUserRequest) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + if a.Name != nil { + object["name"], err = json.Marshal(a.Name) + if err != nil { + return nil, fmt.Errorf("error marshaling 'name': %w", err) + } + } + + if a.Onboarded != nil { + object["onboarded"], err = json.Marshal(a.Onboarded) + if err != nil { + return nil, fmt.Errorf("error marshaling 'onboarded': %w", err) + } + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for UpdateCustomerRequest. Returns the specified +// element and whether it was found +func (a UpdateCustomerRequest) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for UpdateCustomerRequest +func (a *UpdateCustomerRequest) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for UpdateCustomerRequest to handle AdditionalProperties +func (a *UpdateCustomerRequest) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["company_name"]; found { + err = json.Unmarshal(raw, &a.CompanyName) + if err != nil { + return fmt.Errorf("error reading 'company_name': %w", err) + } + delete(object, "company_name") + } + + if raw, found := object["first_name"]; found { + err = json.Unmarshal(raw, &a.FirstName) + if err != nil { + return fmt.Errorf("error reading 'first_name': %w", err) + } + delete(object, "first_name") + } + + if raw, found := object["last_name"]; found { + err = json.Unmarshal(raw, &a.LastName) + if err != nil { + return fmt.Errorf("error reading 'last_name': %w", err) + } + delete(object, "last_name") + } + + if raw, found := object["learned_about_cq_from"]; found { + err = json.Unmarshal(raw, &a.LearnedAboutCqFrom) + if err != nil { + return fmt.Errorf("error reading 'learned_about_cq_from': %w", err) + } + delete(object, "learned_about_cq_from") + } + + if raw, found := object["learned_about_cq_from_other"]; found { + err = json.Unmarshal(raw, &a.LearnedAboutCqFromOther) + if err != nil { + return fmt.Errorf("error reading 'learned_about_cq_from_other': %w", err) + } + delete(object, "learned_about_cq_from_other") + } + + if raw, found := object["phone"]; found { + err = json.Unmarshal(raw, &a.Phone) + if err != nil { + return fmt.Errorf("error reading 'phone': %w", err) + } + delete(object, "phone") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for UpdateCustomerRequest to handle AdditionalProperties +func (a UpdateCustomerRequest) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + if a.CompanyName != nil { + object["company_name"], err = json.Marshal(a.CompanyName) + if err != nil { + return nil, fmt.Errorf("error marshaling 'company_name': %w", err) + } + } + + object["first_name"], err = json.Marshal(a.FirstName) + if err != nil { + return nil, fmt.Errorf("error marshaling 'first_name': %w", err) + } + + object["last_name"], err = json.Marshal(a.LastName) + if err != nil { + return nil, fmt.Errorf("error marshaling 'last_name': %w", err) + } + + if a.LearnedAboutCqFrom != nil { + object["learned_about_cq_from"], err = json.Marshal(a.LearnedAboutCqFrom) + if err != nil { + return nil, fmt.Errorf("error marshaling 'learned_about_cq_from': %w", err) + } + } + + if a.LearnedAboutCqFromOther != nil { + object["learned_about_cq_from_other"], err = json.Marshal(a.LearnedAboutCqFromOther) + if err != nil { + return nil, fmt.Errorf("error marshaling 'learned_about_cq_from_other': %w", err) + } + } + + if a.Phone != nil { + object["phone"], err = json.Marshal(a.Phone) + if err != nil { + return nil, fmt.Errorf("error marshaling 'phone': %w", err) + } + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for UpdateTeamRequest. Returns the specified +// element and whether it was found +func (a UpdateTeamRequest) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for UpdateTeamRequest +func (a *UpdateTeamRequest) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for UpdateTeamRequest to handle AdditionalProperties +func (a *UpdateTeamRequest) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["display_name"]; found { + err = json.Unmarshal(raw, &a.DisplayName) + if err != nil { + return fmt.Errorf("error reading 'display_name': %w", err) + } + delete(object, "display_name") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for UpdateTeamRequest to handle AdditionalProperties +func (a UpdateTeamRequest) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + if a.DisplayName != nil { + object["display_name"], err = json.Marshal(a.DisplayName) + if err != nil { + return nil, fmt.Errorf("error marshaling 'display_name': %w", err) + } + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for UsageSummary. Returns the specified +// element and whether it was found +func (a UsageSummary) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for UsageSummary +func (a *UsageSummary) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for UsageSummary to handle AdditionalProperties +func (a *UsageSummary) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["groups"]; found { + err = json.Unmarshal(raw, &a.Groups) + if err != nil { + return fmt.Errorf("error reading 'groups': %w", err) + } + delete(object, "groups") + } + + if raw, found := object["metadata"]; found { + err = json.Unmarshal(raw, &a.Metadata) + if err != nil { + return fmt.Errorf("error reading 'metadata': %w", err) + } + delete(object, "metadata") + } + + if raw, found := object["values"]; found { + err = json.Unmarshal(raw, &a.Values) + if err != nil { + return fmt.Errorf("error reading 'values': %w", err) + } + delete(object, "values") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for UsageSummary to handle AdditionalProperties +func (a UsageSummary) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["groups"], err = json.Marshal(a.Groups) + if err != nil { + return nil, fmt.Errorf("error marshaling 'groups': %w", err) + } + + object["metadata"], err = json.Marshal(a.Metadata) + if err != nil { + return nil, fmt.Errorf("error marshaling 'metadata': %w", err) + } + + object["values"], err = json.Marshal(a.Values) + if err != nil { + return nil, fmt.Errorf("error marshaling 'values': %w", err) + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for UserTOTPVerifyRequest. Returns the specified +// element and whether it was found +func (a UserTOTPVerifyRequest) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for UserTOTPVerifyRequest +func (a *UserTOTPVerifyRequest) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for UserTOTPVerifyRequest to handle AdditionalProperties +func (a *UserTOTPVerifyRequest) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["otp"]; found { + err = json.Unmarshal(raw, &a.OTP) + if err != nil { + return fmt.Errorf("error reading 'otp': %w", err) + } + delete(object, "otp") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for UserTOTPVerifyRequest to handle AdditionalProperties +func (a UserTOTPVerifyRequest) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["otp"], err = json.Marshal(a.OTP) + if err != nil { + return nil, fmt.Errorf("error marshaling 'otp': %w", err) + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} + +// Getter for additional properties for VerifyUserEmailRequest. Returns the specified +// element and whether it was found +func (a VerifyUserEmailRequest) Get(fieldName string) (value interface{}, found bool) { + if a.AdditionalProperties != nil { + value, found = a.AdditionalProperties[fieldName] + } + return +} + +// Setter for additional properties for VerifyUserEmailRequest +func (a *VerifyUserEmailRequest) Set(fieldName string, value interface{}) { + if a.AdditionalProperties == nil { + a.AdditionalProperties = make(map[string]interface{}) + } + a.AdditionalProperties[fieldName] = value +} + +// Override default JSON handling for VerifyUserEmailRequest to handle AdditionalProperties +func (a *VerifyUserEmailRequest) UnmarshalJSON(b []byte) error { + object := make(map[string]json.RawMessage) + err := json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["email"]; found { + err = json.Unmarshal(raw, &a.Email) + if err != nil { + return fmt.Errorf("error reading 'email': %w", err) + } + delete(object, "email") + } + + if raw, found := object["return_to"]; found { + err = json.Unmarshal(raw, &a.ReturnTo) + if err != nil { + return fmt.Errorf("error reading 'return_to': %w", err) + } + delete(object, "return_to") + } + + if raw, found := object["subdomain"]; found { + err = json.Unmarshal(raw, &a.Subdomain) + if err != nil { + return fmt.Errorf("error reading 'subdomain': %w", err) + } + delete(object, "subdomain") + } + + if len(object) != 0 { + a.AdditionalProperties = make(map[string]interface{}) + for fieldName, fieldBuf := range object { + var fieldVal interface{} + err := json.Unmarshal(fieldBuf, &fieldVal) + if err != nil { + return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err) + } + a.AdditionalProperties[fieldName] = fieldVal + } + } + return nil +} + +// Override default JSON handling for VerifyUserEmailRequest to handle AdditionalProperties +func (a VerifyUserEmailRequest) MarshalJSON() ([]byte, error) { + var err error + object := make(map[string]json.RawMessage) + + object["email"], err = json.Marshal(a.Email) + if err != nil { + return nil, fmt.Errorf("error marshaling 'email': %w", err) + } + + if a.ReturnTo != nil { + object["return_to"], err = json.Marshal(a.ReturnTo) + if err != nil { + return nil, fmt.Errorf("error marshaling 'return_to': %w", err) + } + } + + if a.Subdomain != nil { + object["subdomain"], err = json.Marshal(a.Subdomain) + if err != nil { + return nil, fmt.Errorf("error marshaling 'subdomain': %w", err) + } + } + + for fieldName, field := range a.AdditionalProperties { + object[fieldName], err = json.Marshal(field) + if err != nil { + return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) + } + } + return json.Marshal(object) +} diff --git a/models.yaml b/models.yaml index 1321987..c088ab1 100644 --- a/models.yaml +++ b/models.yaml @@ -2,3 +2,5 @@ package: cloudquery_api generate: models: true output: models.gen.go +compatibility: + always-prefix-enum-values: true diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..73cc92d --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "release-type": "go", + "pull-request-title-pattern": "chore${scope}: Release${component} v${version}", + "include-component-in-tag": false, + "packages": { + ".": {} + } +} diff --git a/spec.json b/spec.json index 89b972b..f5863e1 100644 --- a/spec.json +++ b/spec.json @@ -1,2656 +1,8567 @@ { - "openapi": "3.1.0", - "info": { - "contact": { - "email": "support@cloudquery.io", - "name": "CloudQuery Support Team", - "url": "https://cloudquery.io" - }, - "description": "API to interact with CloudQuery Cloud", - "license": { - "name": "MIT", - "url": "https://spdx.org/licenses/MIT" - }, - "termsOfService": "https://www.cloudquery.io/terms", - "title": "CloudQuery OpenAPI Spec", - "version": "1.0.0" - }, - "servers": [ - { - "url": "https://api.cloudquery.io/v1" - } - ], - "security": [ - { - "bearerAuth": [] - } - ], - "tags": [ - { - "name": "users" - }, - { - "name": "teams" + "openapi" : "3.1.0", + "info" : { + "contact" : { + "email" : "support@cloudquery.io", + "name" : "CloudQuery Support Team", + "url" : "https://cloudquery.io" }, - { - "name": "plugins" + "description" : "Welcome to the CloudQuery API documentation! This API can be used to interact with the CloudQuery platform. The API allows you to manage your teams, usage, spend limits, plugins, addons, cloud syncs, and much more.\n\nThe API is secured using bearer tokens. To get started, you can generate an API key from the CloudQuery dashboard. For a step-by-step guide, see: https://www.cloudquery.io/docs/cli/managing-cloudquery/deployments/generate-api-key.\n\nThe base URL for the API is `https://api.cloudquery.io`.\n", + "license" : { + "name" : "MIT", + "url" : "https://spdx.org/licenses/MIT" }, - { - "name": "uploads" - }, - { - "name": "images" - }, - { - "name": "healthcheck" - } - ], - "paths": { - "/": { - "get": { - "description": "Health check endpoint, returns 200", - "operationId": "HealthCheck", - "responses": { - "200": { - "description": "Response" - } - }, - "security": [], - "tags": [ - "healthcheck" - ] - } - }, - "/upload/image": { - "post": { - "description": "Get a URL to upload image that will be publicly accessible", - "operationId": "UploadImage", - "parameters": [], - "tags": [ - "uploads", - "images" - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ImageURL" - } - } - } - }, - "500": { - "$ref": "#/components/responses/InternalError" + "termsOfService" : "https://www.cloudquery.io/terms", + "title" : "CloudQuery OpenAPI Spec", + "version" : "1.0.0" + }, + "servers" : [ { + "url" : "https://api.cloudquery.io", + "x-internal" : false + } ], + "security" : [ { + "bearerAuth" : [ ] + }, { + "cookieAuth" : [ ] + } ], + "tags" : [ { + "name" : "users" + }, { + "name" : "teams" + }, { + "name" : "plugins" + }, { + "name" : "images" + }, { + "name" : "healthcheck" + }, { + "name" : "addons" + }, { + "name" : "registry" + }, { + "name" : "managed-databases" + }, { + "name" : "analytics" + }, { + "name" : "platform" + }, { + "name" : "ai-onboarding" + } ], + "paths" : { + "/" : { + "get" : { + "description" : "Health check endpoint, returns 200", + "operationId" : "HealthCheck", + "responses" : { + "200" : { + "description" : "Response", + "headers" : { + "Link" : { + "description" : "RFC 8631 compliant link relation information", + "explode" : false, + "schema" : { + "example" : "; rel=\"service-doc\"", + "type" : "string" + }, + "style" : "simple" + } + } } - } + }, + "security" : [ ], + "tags" : [ "healthcheck" ] } }, - "/plugins": { - "get": { - "description": "List all plugins", - "operationId": "ListPlugins", - "parameters": [ - { - "$ref": "#/components/parameters/plugin_sort_by" - }, - { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/per_page" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/Plugin" - }, - "type": "array", - "example": [ - { - "name": "aws-source", - "team_name": "cloudquery", - "display_name": "AWS Source Plugin", - "category": "cloud-infrastructure", - "created_at": "2017-07-14T16:53:42Z", - "homepage": "https://cloudquery.io", - "logo": "https://images.cloudquery.io/logos/aws.png", - "official": true, - "short_description": "Sync data from AWS to any destination", - "repository": "https://github.com/cloudquery/cloudquery", - "tier": "free", - "source": true, - "destination": false - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } + "/openapi.json" : { + "get" : { + "description" : "Returns the OpenAPI definition in JSON format.", + "operationId" : "GetOpenAPIJSON", + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "description" : "The OpenAPI document for this API in JSON format", + "type" : "object" } } }, - "description": "Response" - }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "500": { - "$ref": "#/components/responses/InternalError" - } - }, - "security": [], - "tags": [ - "plugins" - ] - }, - "post": { - "description": "Create a plugin owned by the specified team. User must be part of that team.", - "operationId": "CreatePlugin", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PluginCreate" + "description" : "OpenAPI specification in JSON format" + } + }, + "security" : [ ], + "summary" : "Get OpenAPI JSON" + } + }, + "/cq-healthcheck" : { + "get" : { + "description" : "Health check endpoint, returns 200", + "operationId" : "CQHealthCheck", + "responses" : { + "200" : { + "description" : "Response" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "security" : [ ], + "tags" : [ "healthcheck" ], + "x-internal" : true + } + }, + "/upload/image" : { + "post" : { + "description" : "Get a URL to upload image that will be publicly accessible", + "operationId" : "UploadImage", + "parameters" : [ ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UploadImage_request" } } - } + }, + "required" : true }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Plugin" + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ImageURL" } } }, - "description": "Created" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "description" : "Response" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "plugins" - ] + "tags" : [ "images" ] } }, - "/plugins/{team_name}/{plugin_name}": { - "get": { - "description": "Get details about a given plugin.", - "operationId": "GetPlugin", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/plugin_name" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Plugin" + "/plugin-notification-requests" : { + "get" : { + "description" : "List all plugin notification requests", + "operationId" : "ListPluginNotificationRequests", + "parameters" : [ { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListPluginNotificationRequests_200_response" } } }, - "description": "Response" + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "security": [], - "tags": [ - "plugins" - ] + "tags" : [ "plugins" ] }, - "put": { - "description": "Update a plugin", - "operationId": "UpdatePlugin", - "tags": [ - "plugins" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/plugin_name" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PluginUpdate" + "post" : { + "description" : "Create a new plugin notification request.", + "operationId" : "CreatePluginNotificationRequest", + "parameters" : [ ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PluginNotificationRequestCreate" } } - } + }, + "required" : true }, - "responses": { - "200": { - "description": "Updated", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Plugin" + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PluginNotificationRequest" } } - } + }, + "description" : "Created" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } - } + }, + "tags" : [ "plugins" ] } }, - "/plugins/{team_name}/{plugin_name}/versions": { - "get": { - "description": "List all versions for a given plugin", - "operationId": "ListPluginVersions", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/plugin_name" - }, - { - "$ref": "#/components/parameters/version_sort_by" - }, - { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/per_page" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/PluginVersion" - }, - "type": "array" - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } - } - } - }, - "description": "Response" - }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "500": { - "$ref": "#/components/responses/InternalError" - } - }, - "security": [], - "tags": [ - "plugins" - ] - }, - "post": { - "description": "Create a new plugin version", - "operationId": "CreatePluginVersion", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/plugin_name" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "name", - "message", - "protocols", - "supported_targets", - "package_type", - "checksums" - ], - "properties": { - "name": { - "$ref": "#/components/schemas/VersionName" - }, - "message": { - "type": "string", - "description": "A message describing what's new or changed in this version.\nThis message will be displayed to users in the plugin's changelog.\nSupports limited markdown syntax.\n" - }, - "protocols": { - "type": "array", - "description": "List of protocols supported by this plugin version", - "items": { - "type": "integer" - } - }, - "supported_targets": { - "type": "array", - "description": "The targets supported by this plugin version, formatted as _", - "example": [ - "linux_arm64", - "darwin_amd64", - "windows_amd64" - ], - "items": { - "type": "string" - } - }, - "checksums": { - "type": "array", - "description": "List of SHA-256 checksums for this plugin version, one for each supported target.", - "items": { - "type": "string" - } - }, - "package_type": { - "type": "string", - "description": "The package type of the plugin assets", - "enum": [ - "native", - "docker" - ] - } - } - } - } - } - }, - "responses": { - "201": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PluginVersion" + "/plugin-notification-requests/{plugin_team}/{plugin_kind}/{plugin_name}" : { + "delete" : { + "description" : "Remove plugin notification request for a given plugin.", + "operationId" : "DeletePluginNotificationRequest", + "parameters" : [ { + "$ref" : "#/components/parameters/plugin_team" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + } ], + "responses" : { + "204" : { + "description" : "Response" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "plugins" ] + }, + "get" : { + "description" : "Query plugin notification request for a given plugin.", + "operationId" : "GetPluginNotificationRequest", + "parameters" : [ { + "$ref" : "#/components/parameters/plugin_team" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListPluginNotificationRequests_200_response" } } - } - }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + }, + "description" : "Response" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "security": [], - "tags": [ - "plugins" - ] + "tags" : [ "plugins" ] } }, - "/plugins/{team_name}/{plugin_name}/versions/{version_name}": { - "get": { - "description": "Get details about a given plugin version. Use `latest` as version to get the latest version.", - "operationId": "GetPluginVersion", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" + "/plugins" : { + "get" : { + "description" : "List all plugins", + "operationId" : "ListPlugins", + "parameters" : [ { + "$ref" : "#/components/parameters/plugin_sort_by" + }, { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + }, { + "$ref" : "#/components/parameters/plugin_include_release_stages" + }, { + "$ref" : "#/components/parameters/plugin_exclude_release_stages" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListPlugins_200_response" + } + } + }, + "description" : "Response" }, - { - "$ref": "#/components/parameters/plugin_name" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - { - "$ref": "#/components/parameters/version_name" + "500" : { + "$ref" : "#/components/responses/InternalError" } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PluginVersion" + }, + "security" : [ ], + "tags" : [ "plugins" ] + }, + "post" : { + "description" : "Create a plugin owned by the specified team. User must be part of that team.", + "operationId" : "CreatePlugin", + "parameters" : [ ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PluginCreate" + } + } + }, + "required" : true + }, + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Plugin" } } }, - "description": "Response" + "description" : "Created" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "plugins" ] + } + }, + "/plugins/{team_name}/{plugin_kind}/{plugin_name}" : { + "delete" : { + "description" : "Delete plugin by team and plugin name", + "operationId" : "DeletePluginByTeamAndPluginName", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + } ], + "responses" : { + "204" : { + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "security": [], - "tags": [ - "plugins" - ] + "tags" : [ "plugins" ] }, - "patch": { - "description": "Update a given plugin version", - "operationId": "UpdatePluginVersion", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" + "get" : { + "description" : "Get details about a given plugin.", + "operationId" : "GetPlugin", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListPlugin" + } + } + }, + "description" : "Response" }, - { - "$ref": "#/components/parameters/plugin_name" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - { - "$ref": "#/components/parameters/version_name" + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PluginVersionUpdate" + }, + "security" : [ ], + "tags" : [ "plugins" ] + }, + "patch" : { + "description" : "Update a plugin", + "operationId" : "UpdatePlugin", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PluginUpdate" } } } }, - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PluginVersion" + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Plugin" } } - } + }, + "description" : "Updated" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "security": [], - "tags": [ - "plugins" - ] + "tags" : [ "plugins" ] } }, - "/plugins/{team_name}/{plugin_name}/versions/{version_name}/docs": { - "get": { - "description": "List all documentation pages for a given plugin version.", - "operationId": "ListPluginVersionDocs", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" + "/plugins/{team_name}/{plugin_kind}/{plugin_name}/upcoming-price-changes" : { + "delete" : { + "deprecated" : true, + "description" : "DEPRECATED. Plugin prices are now managed by category. This endpoint will be removed in the near future and currently returns only empty data.", + "operationId" : "DeletePluginUpcomingPriceChanges", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + } ], + "responses" : { + "204" : { + "description" : "Deleted" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "plugins" ] + }, + "get" : { + "deprecated" : true, + "description" : "DEPRECATED. Plugin prices are now managed by category. This endpoint will be removed in the near future and currently returns only empty data.", + "operationId" : "ListPluginUpcomingPriceChanges", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListPluginUpcomingPriceChanges_200_response" + } + } + }, + "description" : "Response" }, - { - "$ref": "#/components/parameters/plugin_name" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - { - "$ref": "#/components/parameters/version_name" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - { - "$ref": "#/components/parameters/page" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - { - "$ref": "#/components/parameters/per_page" + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "security" : [ ], + "tags" : [ "plugins" ] + }, + "post" : { + "deprecated" : true, + "description" : "DEPRECATED. Plugin prices are now managed by category. This endpoint will be removed in the near future and currently returns only empty data.", + "operationId" : "CreatePluginUpcomingPriceChange", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PluginPriceCreate" + } + } } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/PluginDocsPage" - }, - "type": "array" - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } + }, + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PluginPrice" } } }, - "description": "Response" + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "500": { - "$ref": "#/components/responses/InternalError" - } - }, - "security": [], - "tags": [ - "plugins" - ] - }, - "put": { - "description": "Create or update one or more plugin version docs pages.", - "operationId": "CreatePluginVersionDocs", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - { - "$ref": "#/components/parameters/plugin_name" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - { - "$ref": "#/components/parameters/version_name" + "500" : { + "$ref" : "#/components/responses/InternalError" } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "pages" - ], - "properties": { - "pages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PluginDocsPage" - } - } - } - } - } - } - }, - "tags": [ - "plugins" - ] - }, - "delete": { - "description": "Delete one or more plugin version docs pages.", - "operationId": "DeletePluginVersionDocs", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/plugin_name" - }, - { - "$ref": "#/components/parameters/version_name" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "names" - ], - "properties": { - "names": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PluginDocsPageName" - } - } - } - } - } - } - }, - "tags": [ - "plugins" - ] + }, + "tags" : [ "plugins" ] } }, - "/plugins/{team_name}/{plugin_name}/versions/{version_name}/tables": { - "get": { - "description": "List tables for a given plugin version. This only applies to source plugins.", - "operationId": "ListPluginVersionTables", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/plugin_name" - }, - { - "$ref": "#/components/parameters/version_name" - }, - { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/per_page" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/PluginTable" - }, - "type": "array" - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } + "/plugins/{team_name}/{plugin_kind}/{plugin_name}/versions" : { + "get" : { + "description" : "List all versions for a given plugin", + "operationId" : "ListPluginVersions", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + }, { + "$ref" : "#/components/parameters/version_sort_by" + }, { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + }, { + "$ref" : "#/components/parameters/include_drafts" + }, { + "$ref" : "#/components/parameters/include_fips" + }, { + "$ref" : "#/components/parameters/include_prereleases" + }, { + "$ref" : "#/components/parameters/version_filter" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListPluginVersions_200_response" } } }, - "description": "Response" + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "404": { - "$ref": "#/components/responses/NotFound" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "500": { - "$ref": "#/components/responses/InternalError" - } - }, - "security": [], - "tags": [ - "plugins" - ] - }, - "put": { - "description": "Create or update one or more plugin version tables. This only applies to source plugins, and can only be done if the plugin version is in draft.", - "operationId": "CreatePluginVersionTables", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/plugin_name" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - { - "$ref": "#/components/parameters/version_name" + "500" : { + "$ref" : "#/components/responses/InternalError" } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "tables" - ], - "properties": { - "tables": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PluginTable" - } - } + }, + "security" : [ ], + "tags" : [ "plugins" ] + } + }, + "/plugins/{team_name}/{plugin_kind}/{plugin_name}/versions/{version_name}" : { + "get" : { + "description" : "Get details about a given plugin version.", + "operationId" : "GetPluginVersion", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + }, { + "$ref" : "#/components/parameters/version_name" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PluginVersionDetails" } } - } - } - }, - "tags": [ - "plugins" - ] - }, - "delete": { - "description": "Delete one or more plugin version tables.", - "operationId": "DeletePluginVersionTables", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" + }, + "description" : "Response" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - { - "$ref": "#/components/parameters/plugin_name" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - { - "$ref": "#/components/parameters/version_name" + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "names" - ], - "properties": { - "names": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PluginTableName" - } - } - } + }, + "security" : [ ], + "tags" : [ "plugins" ] + }, + "patch" : { + "description" : "Update a given plugin version", + "operationId" : "UpdatePluginVersion", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + }, { + "$ref" : "#/components/parameters/version_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PluginVersionUpdate" } } } }, - "tags": [ - "plugins" - ] - } - }, - "/plugins/{team_name}/{plugin_name}/versions/{version_name}/tables/{table_name}": { - "get": { - "description": "Get schema for a given table and plugin version. This only applies to source plugins.", - "operationId": "GetPluginVersionTable", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PluginVersion" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - { - "$ref": "#/components/parameters/plugin_name" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - { - "$ref": "#/components/parameters/version_name" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - { - "in": "path", - "name": "table_name", - "required": true, - "schema": { - "type": "string" + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "plugins" ] + }, + "put" : { + "description" : "Create a new plugin version, or update a draft version", + "operationId" : "CreatePluginVersion", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + }, { + "$ref" : "#/components/parameters/version_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CreatePluginVersion_request" + } } } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PluginTableDetails" + }, + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PluginVersion" + } + } + }, + "description" : "Success (the plugin version was updated)" + }, + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PluginVersion" } } }, - "description": "Response" + "description" : "Success (the plugin version was created)" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "404": { - "$ref": "#/components/responses/NotFound" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "security": [], - "tags": [ - "plugins" - ] + "tags" : [ "plugins" ] } }, - "/plugins/{team_name}/{plugin_name}/versions/{version_name}/assets/{target_name}": { - "get": { - "description": "Download an asset for a given plugin version and target", - "operationId": "DownloadPluginAsset", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" + "/plugins/{team_name}/{plugin_kind}/{plugin_name}/versions/{version_name}/docs" : { + "delete" : { + "description" : "Delete one or more plugin version docs pages.", + "operationId" : "DeletePluginVersionDocs", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + }, { + "$ref" : "#/components/parameters/version_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/DeletePluginVersionDocs_request" + } + } + } + }, + "responses" : { + "204" : { + "description" : "The resource was deleted successfully." + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - { - "$ref": "#/components/parameters/plugin_name" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - { - "$ref": "#/components/parameters/version_name" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - { - "$ref": "#/components/parameters/target_name" + "500" : { + "$ref" : "#/components/responses/InternalError" } - ], - "responses": { - "302": { - "description": "Response", - "headers": { - "Location": { - "schema": { - "type": "string" + }, + "tags" : [ "plugins" ] + }, + "get" : { + "description" : "List all documentation pages for a given plugin version", + "operationId" : "ListPluginVersionDocs", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + }, { + "$ref" : "#/components/parameters/version_name" + }, { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListPluginVersionDocs_200_response" } } - } - }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + }, + "description" : "Response" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "security": [], - "tags": [ - "plugins" - ] + "security" : [ ], + "tags" : [ "plugins" ] }, - "post": { - "description": "Get a URL to upload an asset for a given plugin version and target", - "operationId": "UploadPluginAsset", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" + "post" : { + "description" : "Replace (override) multiple plugin version docs pages", + "operationId" : "ReplacePluginVersionDocs", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + }, { + "$ref" : "#/components/parameters/version_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CreatePluginVersionDocs_request" + } + } + } + }, + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CreatePluginVersionDocs_201_response" + } + } + }, + "description" : "Successfully created or updated" }, - { - "$ref": "#/components/parameters/plugin_name" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - { - "$ref": "#/components/parameters/version_name" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - { - "$ref": "#/components/parameters/target_name" + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" } - ], - "responses": { - "201": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReleaseURL" - } + }, + "tags" : [ "plugins" ] + }, + "put" : { + "description" : "Create or update one or more plugin version docs pages", + "operationId" : "CreatePluginVersionDocs", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + }, { + "$ref" : "#/components/parameters/version_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CreatePluginVersionDocs_request" } } + } + }, + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CreatePluginVersionDocs_201_response" + } + } + }, + "description" : "Successfully created or updated" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "500": { - "$ref": "#/components/responses/InternalError" + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "security": [], - "tags": [ - "plugins" - ] + "tags" : [ "plugins" ] } }, - "/teams": { - "get": { - "description": "List all teams", - "operationId": "ListTeams", - "parameters": [ - { - "$ref": "#/components/parameters/per_page" - }, - { - "$ref": "#/components/parameters/page" - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/Team" - }, - "type": "array" - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } - } + "/plugins/{team_name}/{plugin_kind}/{plugin_name}/versions/{version_name}/tables" : { + "delete" : { + "description" : "Delete one or more plugin version tables.", + "operationId" : "DeletePluginVersionTables", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + }, { + "$ref" : "#/components/parameters/version_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/DeletePluginVersionTables_request" } } + } + }, + "responses" : { + "204" : { + "description" : "The resource was deleted successfully." + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "teams", - "users" - ] + "tags" : [ "plugins" ] }, - "post": { - "description": "Create a team owned by the current user.", - "operationId": "CreateTeam", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": false, - "required": [ - "name", - "display_name" - ], - "properties": { - "name": { - "$ref": "#/components/schemas/TeamName" - }, - "display_name": { - "type": "string", - "description": "The team's display name" - } + "get" : { + "description" : "List tables for a given plugin version. This only applies to source plugins.", + "operationId" : "ListPluginVersionTables", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + }, { + "$ref" : "#/components/parameters/version_name" + }, { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListPluginVersionTables_200_response" } } + }, + "description" : "Response" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "security" : [ ], + "tags" : [ "plugins" ] + }, + "put" : { + "description" : "Create or update one or more plugin version tables. This only applies to source plugins, and can only be done if the plugin version is in draft.", + "operationId" : "CreatePluginVersionTables", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + }, { + "$ref" : "#/components/parameters/version_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CreatePluginVersionTables_request" + } } } - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Team" - } - } - }, - "description": "Created" - }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" - }, - "500": { - "$ref": "#/components/responses/InternalError" - } - }, - "tags": [ - "teams" - ] - } - }, - "/teams/{team_name}": { - "get": { - "description": "Get a team by name", - "operationId": "GetTeamByName", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Team" + }, + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CreatePluginVersionTables_201_response" } } - } + }, + "description" : "Successfully created or updated" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "404": { - "$ref": "#/components/responses/NotFound" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" - } - }, - "tags": [ - "teams" - ] - } - }, - "/teams/{team_name}/plugins": { - "get": { - "description": "List all plugins for the current team.", - "operationId": "ListPluginsByTeam", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/per_page" - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/Plugin" - }, - "type": "array", - "example": [ - { - "name": "aws-source", - "team_name": "cloudquery", - "display_name": "AWS Source Plugin", - "category": "cloud-infrastructure", - "created_at": "2017-07-14T16:53:42Z", - "homepage": "https://cloudquery.io", - "logo": "https://images.cloudquery.io/logos/aws.png", - "official": true, - "short_description": "Sync data from AWS to any destination", - "repository": "https://github.com/cloudquery/cloudquery", - "tier": "free", - "source": true, - "destination": false - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "500": { - "$ref": "#/components/responses/InternalError" - } - }, - "security": [], - "tags": [ - "plugins" - ] - } - }, - "/teams/{team_name}/memberships": { - "get": { - "description": "Get memberships to the team.", - "operationId": "GetTeamMemberships", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/per_page" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/Membership" - }, - "type": "array", - "example": [ - { - "role": "admin", - "team": { - "created_at": "2017-07-14T16:53:42Z", - "name": "cloudquery", - "display_name": "CloudQuery" - }, - "user": { - "created_at": "2017-07-14T16:53:42Z", - "email": "user@clouduery.io", - "name": "user", - "updated_at": "2017-07-14T16:53:42Z" - } - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } - } - } - }, - "description": "Response" - }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "404": { - "$ref": "#/components/responses/NotFound" - }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" - }, - "500": { - "$ref": "#/components/responses/InternalError" - } - }, - "tags": [ - "teams", - "users" - ] - } - }, - "/teams/{team_name}/invitations": { - "get": { - "operationId": "ListTeamInvitations", - "description": "List of open invitations to the team", - "tags": [ - "teams", - "users" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/per_page" - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Invitation" - } - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } - } - } - } - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } - } - }, - "post": { - "operationId": "EmailTeamInvitation", - "description": "Invite a user to join a team with their email address", - "tags": [ - "teams", - "users" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" + }, + "tags" : [ "plugins" ] + } + }, + "/plugins/{team_name}/{plugin_kind}/{plugin_name}/versions/{version_name}/tables/{table_name}" : { + "get" : { + "description" : "Get schema for a given table and plugin version. This only applies to source plugins.", + "operationId" : "GetPluginVersionTable", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + }, { + "$ref" : "#/components/parameters/version_name" + }, { + "explode" : false, + "in" : "path", + "name" : "table_name", + "required" : true, + "schema" : { + "type" : "string" + }, + "style" : "simple" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PluginTableDetails" + } + } + }, + "description" : "Response" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "email", - "role" - ], - "properties": { - "email": { - "type": "string" - }, - "role": { - "type": "string" - } + }, + "security" : [ ], + "tags" : [ "plugins" ] + } + }, + "/plugins/{team_name}/{plugin_kind}/{plugin_name}/versions/{version_name}/assets/{target_name}" : { + "get" : { + "description" : "Download an asset for a given plugin version and target", + "operationId" : "DownloadPluginAsset", + "parameters" : [ { + "explode" : false, + "in" : "header", + "name" : "Accept", + "required" : false, + "schema" : { + "type" : "string" + }, + "style" : "simple" + }, { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + }, { + "$ref" : "#/components/parameters/version_name" + }, { + "$ref" : "#/components/parameters/target_name" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PluginAsset" } } + }, + "description" : "Response" + }, + "302" : { + "description" : "Response", + "headers" : { + "Location" : { + "explode" : false, + "schema" : { + "type" : "string" + }, + "style" : "simple" + } } + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "429" : { + "$ref" : "#/components/responses/TooManyRequests" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Invitation" + "security" : [ ], + "tags" : [ "plugins" ] + }, + "post" : { + "description" : "Get a URL to upload an asset for a given plugin version and target", + "operationId" : "UploadPluginAsset", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + }, { + "$ref" : "#/components/parameters/version_name" + }, { + "$ref" : "#/components/parameters/target_name" + } ], + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ReleaseURL" } } - } + }, + "description" : "Response" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } - } + }, + "tags" : [ "plugins" ] } }, - "/teams/{team_name}/invitations/accept": { - "post": { - "operationId": "AcceptTeamInvitation", - "description": "Accept an invitation to the team, creating a user membership", - "tags": [ - "teams", - "users" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" + "/plugins/{team_name}/{plugin_kind}/{plugin_name}/versions/{version_name}/uiassets" : { + "delete" : { + "description" : "Remove UI assets for a given plugin version", + "operationId" : "RemovePluginUIAssets", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + }, { + "$ref" : "#/components/parameters/version_name" + } ], + "responses" : { + "204" : { + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" } - ], - "responses": { - "201": { - "description": "The invitation has been accepted and the authenticated user is now a member of the team.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Membership" - } + }, + "tags" : [ "plugins" ] + }, + "post" : { + "description" : "Get URLs to upload UI assets for a given plugin version", + "operationId" : "UploadPluginUIAssets", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + }, { + "$ref" : "#/components/parameters/version_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UploadPluginUIAssets_request" } } - }, - "303": { - "description": "The authenticated user is already a member of this team.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Membership" + } + }, + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UploadPluginUIAssets_201_response" } } - } + }, + "description" : "Response" }, - "403": { - "description": "You do not have an invitation to join this team.", - "$ref": "#/components/responses/Forbidden" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "500": { - "$ref": "#/components/responses/InternalError" - } - } - } - }, - "/teams/{team_name}/invitations/{email}": { - "delete": { - "operationId": "CancelTeamInvitation", - "description": "Cancel an invitation to the team, preventing the user becoming a team member", - "tags": [ - "teams", - "users" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - { - "$ref": "#/components/parameters/email" + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "plugins" ] + }, + "put" : { + "description" : "Finalize UI asset upload", + "operationId" : "FinalizePluginUIAssetUpload", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + }, { + "$ref" : "#/components/parameters/version_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/FinalizePluginUIAssetUpload_request" + } + } } - ], - "responses": { - "204": { - "description": "Response" + }, + "responses" : { + "204" : { + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "404": { - "$ref": "#/components/responses/NotFound" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } - } + }, + "tags" : [ "plugins" ] } }, - "/teams/{team_name}/users": { - "get": { - "description": "List all users in the current team.", - "operationId": "ListUsersByTeam", - "parameters": [ - { - "$ref": "#/components/parameters/team_name" + "/addons" : { + "get" : { + "description" : "List all addons", + "operationId" : "ListAddons", + "parameters" : [ { + "$ref" : "#/components/parameters/addon_sort_by" + }, { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListAddons_200_response" + } + } + }, + "description" : "Response" }, - { - "$ref": "#/components/parameters/per_page" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - { - "$ref": "#/components/parameters/page" + "500" : { + "$ref" : "#/components/responses/InternalError" } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/User" - }, - "type": "array" - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } - } + }, + "security" : [ ], + "tags" : [ "addons" ] + }, + "post" : { + "description" : "Create an addon owned by the specified team. User must be part of that team.", + "operationId" : "CreateAddon", + "parameters" : [ ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AddonCreate" } } }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "required" : true + }, + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Addon" + } + } + }, + "description" : "Created" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "404": { - "$ref": "#/components/responses/NotFound" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "422": { - "$ref": "#/components/responses/UnprocessableEntity" + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "teams", - "users" - ] + "tags" : [ "addons" ] } }, - "/user": { - "get": { - "description": "Get the current authenticated user from the OAuth token\n", - "operationId": "GetCurrentUser", - "parameters": [], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" + "/addons/{team_name}/{addon_type}/{addon_name}" : { + "delete" : { + "description" : "Delete addon by team and addon name", + "operationId" : "DeleteAddonByTeamAndName", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/addon_type" + }, { + "$ref" : "#/components/parameters/addon_name" + } ], + "responses" : { + "204" : { + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "addons" ], + "x-internal" : true + }, + "get" : { + "description" : "Get details about a given addon.", + "operationId" : "GetAddon", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/addon_type" + }, { + "$ref" : "#/components/parameters/addon_name" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListAddon" } } }, - "description": "Response" + "description" : "Response" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "403": { - "$ref": "#/components/responses/Forbidden" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } }, - "tags": [ - "users" - ] - } - }, - "/user/invitations": { - "get": { - "operationId": "ListCurrentUserInvitations", - "description": "List of the current user's unaccepted invitations", - "tags": [ - "teams", - "users" - ], - "parameters": [ - { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/per_page" + "security" : [ ], + "tags" : [ "addons" ] + }, + "patch" : { + "description" : "Update an Addon", + "operationId" : "UpdateAddon", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/addon_type" + }, { + "$ref" : "#/components/parameters/addon_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AddonUpdate" + } + } } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Invitation" - } - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } + }, + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Addon" } } - } + }, + "description" : "Updated" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" }, - "500": { - "$ref": "#/components/responses/InternalError" + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" } - } + }, + "tags" : [ "addons" ] } }, - "/user/memberships": { - "get": { - "description": "Get memberships that the user has accepted.", - "operationId": "GetCurrentUserMemberships", - "parameters": [ - { - "$ref": "#/components/parameters/page" - }, - { - "$ref": "#/components/parameters/per_page" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "required": [ - "metadata", - "items" - ], - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/Membership" - }, - "type": "array", - "example": [ - { - "role": "admin", - "team": { - "created_at": "2017-07-14T16:53:42Z", - "name": "cloudquery", - "display_name": "CloudQuery" - }, - "user": { - "created_at": "2017-07-14T16:53:42Z", - "email": "user@clouduery.io", - "name": "user", - "updated_at": "2017-07-14T16:53:42Z" - } - } - ] - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } - } - } - }, - "description": "Response" - }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" - }, - "403": { - "$ref": "#/components/responses/Forbidden" - }, - "500": { - "$ref": "#/components/responses/InternalError" - } - }, - "tags": [ - "teams", - "users" - ] - } - }, - "/teams/{team_name}/apikeys": { - "get": { - "description": "List all API Keys for the curren team", - "operationId": "ListTeamApiKeys", - "tags": [ - "teams" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - }, - { - "$ref": "#/components/parameters/per_page" - }, - { - "$ref": "#/components/parameters/page" - } - ], - "responses": { - "200": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "required": [ - "items", - "metadata" - ], - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/ApiKey" - }, - "type": "array" - }, - "metadata": { - "$ref": "#/components/schemas/ListMetadata" - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" - }, - "500": { - "$ref": "#/components/responses/InternalError" - } - } - }, - "post": { - "description": "Create new API Key for the current team. This is useful in CI", - "operationId": "CreateTeamApiKey", - "tags": [ - "teams" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" - } - ], - "responses": { - "201": { - "description": "Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiKey" + "/addons/{team_name}/{addon_type}/{addon_name}/versions" : { + "get" : { + "description" : "List all versions for a given addon", + "operationId" : "ListAddonVersions", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/addon_type" + }, { + "$ref" : "#/components/parameters/addon_name" + }, { + "$ref" : "#/components/parameters/version_sort_by" + }, { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + }, { + "$ref" : "#/components/parameters/include_drafts" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListAddonVersions_200_response" } } - } + }, + "description" : "Response" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "500": { - "$ref": "#/components/responses/InternalError" + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" } - } + }, + "security" : [ ], + "tags" : [ "addons" ] } }, - "/teams/{team_name}/apikeys/{apikey_name}": { - "delete": { - "description": "Delete API Key. This will remove any future access by this API Key.", - "operationId": "DeleteTeamApiKey", - "tags": [ - "teams" - ], - "parameters": [ - { - "$ref": "#/components/parameters/team_name" + "/addons/{team_name}/{addon_type}/{addon_name}/versions/{version_name}" : { + "get" : { + "description" : "Get details about a given addon version.", + "operationId" : "GetAddonVersion", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/addon_type" + }, { + "$ref" : "#/components/parameters/addon_name" + }, { + "$ref" : "#/components/parameters/version_name" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AddonVersion" + } + } + }, + "description" : "Response" }, - { - "$ref": "#/components/parameters/apikey_name" - } - ], - "responses": { - "204": { - "description": "Deleted" + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" }, - "401": { - "$ref": "#/components/responses/RequiresAuthentication" + "404" : { + "$ref" : "#/components/responses/NotFound" }, - "500": { - "$ref": "#/components/responses/InternalError" + "500" : { + "$ref" : "#/components/responses/InternalError" } - } - } - } - }, - "components": { - "securitySchemes": { - "bearerAuth": { - "scheme": "bearer", - "type": "http" - } - }, - "schemas": { - "ImageURL": { - "properties": { - "upload_url": { - "type": "string", - "example": "https://cloudquery.io/api/v1/upload/1234567890abcdef1234567890abcdef" - }, - "download_url": { - "type": "string", - "example": "https://cloudquery.io/api/v1/download/1234567890abcdef1234567890abcdef" - } - }, - "required": [ - "upload_url", - "download_url" - ] - }, - "BasicError": { - "additionalProperties": false, - "description": "Basic Error", - "required": [ - "message", - "status" - ], - "properties": { - "message": { - "type": "string" - }, - "status": { - "type": "integer" - } - }, - "title": "Basic Error", - "type": "object" - }, - "TeamName": { - "description": "The unique name for the team.", - "maxLength": 255, - "pattern": "^[a-z](-?[a-z0-9]+)+$", - "type": "string", - "example": "cloudquery" - }, - "PluginName": { - "description": "The unique name for the plugin.", - "maxLength": 255, - "pattern": "^[a-z](-?[a-z0-9]+)+$", - "type": "string", - "example": "aws-source" - }, - "PluginCategory": { - "description": "Supported categories for plugins", - "type": "string", - "enum": [ - "cloud-infrastructure", - "databases", - "sales-marketing", - "engineering-analytics", - "other" - ] - }, - "PluginTier": { - "description": "Supported tiers for plugins", - "type": "string", - "enum": [ - "free", - "paid" - ] - }, - "Plugin": { - "additionalProperties": false, - "description": "CloudQuery Plugin", - "properties": { - "team_name": { - "$ref": "#/components/schemas/TeamName" - }, - "name": { - "$ref": "#/components/schemas/PluginName" - }, - "category": { - "$ref": "#/components/schemas/PluginCategory" - }, - "created_at": { - "example": "2017-07-14T16:53:42Z", - "format": "date-time", - "type": "string" - }, - "homepage": { - "type": "string", - "example": "https://cloudquery.io" - }, - "logo": { - "type": "string", - "example": "https://images.cloudquery.io/logos/aws.png" - }, - "display_name": { - "description": "The plugin's display name", - "type": "string", - "example": "AWS Source Plugin" - }, - "official": { - "type": "boolean" - }, - "repository": { - "type": "string", - "example": "https://github.com/cloudquery/cloudquery" - }, - "short_description": { - "type": "string", - "example": "Sync data from AWS to any destination" - }, - "tier": { - "$ref": "#/components/schemas/PluginTier" - }, - "source": { - "type": "boolean" - }, - "destination": { - "type": "boolean" - } - }, - "required": [ - "team_name", - "name", - "category", - "created_at", - "logo", - "display_name", - "official", - "short_description", - "tier", - "source", - "destination" - ], - "title": "CloudQuery Plugin", - "type": "object" - }, - "ListMetadata": { - "properties": { - "total_count": { - "type": "integer" - }, - "last_page": { - "type": "integer" + }, + "security" : [ ], + "tags" : [ "addons" ] + }, + "patch" : { + "description" : "Update a given addon version", + "operationId" : "UpdateAddonVersion", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/addon_type" + }, { + "$ref" : "#/components/parameters/addon_name" + }, { + "$ref" : "#/components/parameters/version_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AddonVersionUpdate" + } + } + } + }, + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AddonVersion" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "addons" ] + }, + "put" : { + "description" : "Create a new addon version, or update a draft version", + "operationId" : "CreateAddonVersion", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/addon_type" + }, { + "$ref" : "#/components/parameters/addon_name" + }, { + "$ref" : "#/components/parameters/version_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CreateAddonVersion_request" + } + } + } + }, + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AddonVersion" + } + } + }, + "description" : "Response" + }, + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AddonVersion" + } + } + }, + "description" : "Success (the addon version was created)" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "addons" ] + } + }, + "/addons/{team_name}/{addon_type}/{addon_name}/versions/{version_name}/assets" : { + "get" : { + "description" : "Download an asset for a given version", + "operationId" : "DownloadAddonAsset", + "parameters" : [ { + "explode" : false, + "in" : "header", + "name" : "Accept", + "required" : false, + "schema" : { + "type" : "string" + }, + "style" : "simple" + }, { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/addon_type" + }, { + "$ref" : "#/components/parameters/addon_name" + }, { + "$ref" : "#/components/parameters/version_name" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AddonAsset" + } + } + }, + "description" : "Response" + }, + "302" : { + "description" : "Response", + "headers" : { + "Location" : { + "explode" : false, + "schema" : { + "type" : "string" + }, + "style" : "simple" + } + } + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "429" : { + "$ref" : "#/components/responses/TooManyRequests" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "addons" ] + }, + "post" : { + "description" : "Get a URL to upload an asset for a given addon version", + "operationId" : "UploadAddonAsset", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/addon_type" + }, { + "$ref" : "#/components/parameters/addon_name" + }, { + "$ref" : "#/components/parameters/version_name" + } ], + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ReleaseURL" + } + } + }, + "description" : "Response" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "addons" ] + } + }, + "/teams" : { + "get" : { + "description" : "List all teams", + "operationId" : "ListTeams", + "parameters" : [ { + "$ref" : "#/components/parameters/per_page" + }, { + "$ref" : "#/components/parameters/page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListTeams_200_response" + } + } + }, + "description" : "Response" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "teams" ] + }, + "post" : { + "description" : "Create a team owned by the current user.", + "operationId" : "CreateTeam", + "parameters" : [ ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CreateTeam_request" + } + } + } + }, + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Team" + } + } + }, + "description" : "Created" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "teams" ] + } + }, + "/teams/{team_name}" : { + "delete" : { + "description" : "Delete team", + "operationId" : "DeleteTeam", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "responses" : { + "204" : { + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "teams" ], + "x-internal" : true + }, + "get" : { + "description" : "Get a team by name", + "operationId" : "GetTeamByName", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Team" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "teams" ] + }, + "patch" : { + "description" : "Update team attributes", + "operationId" : "UpdateTeam", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateTeam_request" + } + } + } + }, + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Team" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "teams" ] + } + }, + "/teams/{team_name}/images" : { + "post" : { + "description" : "Get URLs to upload images for a given team", + "operationId" : "CreateTeamImages", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CreateTeamImages_request" + } + } + }, + "required" : true + }, + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CreateTeamImages_201_response" + } + } + }, + "description" : "Response" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "teams" ] + } + }, + "/teams/{team_name}/plugins" : { + "delete" : { + "description" : "Delete plugins by team", + "operationId" : "DeletePluginsByTeam", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "responses" : { + "204" : { + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "teams" ], + "x-internal" : true + }, + "get" : { + "description" : "List all plugins for the team.", + "operationId" : "ListPluginsByTeam", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + }, { + "$ref" : "#/components/parameters/include_private" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListPluginsByTeam_200_response" + } + } + }, + "description" : "Response" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "plugins" ] + } + }, + "/teams/{team_name}/addons" : { + "delete" : { + "description" : "Delete addons by team", + "operationId" : "DeleteAddonsByTeam", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "responses" : { + "204" : { + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "addons" ], + "x-internal" : true + }, + "get" : { + "description" : "List all addons for the team.", + "operationId" : "ListAddonsByTeam", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + }, { + "$ref" : "#/components/parameters/include_private" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListAddonsByTeam_200_response" + } + } + }, + "description" : "Response" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "addons" ] + } + }, + "/teams/{team_name}/addon-orders" : { + "get" : { + "description" : "List all addon orders for the team.", + "operationId" : "ListAddonOrdersByTeam", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListAddonOrdersByTeam_200_response" + } + } + }, + "description" : "Response" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "addons" ] + }, + "post" : { + "description" : "Start the checkout process for an addon order.", + "operationId" : "CreateAddonOrderForTeam", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AddonOrderCreate" + } + } + }, + "required" : true + }, + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AddonOrder" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "addons" ] + } + }, + "/teams/{team_name}/addon-orders/{addon_order_id}" : { + "get" : { + "description" : "Get an addon order for the team.", + "operationId" : "GetAddonOrderByTeam", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/addon_order_id" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AddonOrder" + } + } + }, + "description" : "Response" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "addons" ] + } + }, + "/teams/{team_name}/memberships" : { + "delete" : { + "description" : "Remove a user from the team", + "operationId" : "RemoveTeamMembership", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/RemoveTeamMembership_request" + } + } + } + }, + "responses" : { + "204" : { + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "teams" ] + }, + "get" : { + "description" : "Get memberships to the team.", + "operationId" : "GetTeamMemberships", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/GetTeamMemberships_200_response" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "teams" ] + } + }, + "/teams/{team_name}/memberships/{email}" : { + "delete" : { + "deprecated" : true, + "description" : "Remove a user from the team", + "operationId" : "DeleteTeamMembership", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/email_basic" + } ], + "responses" : { + "204" : { + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "teams" ] + } + }, + "/teams/{team_name}/invoices" : { + "get" : { + "description" : "List all past invoices for the team.", + "operationId" : "ListInvoicesByTeam", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListInvoicesByTeam_200_response" + } + } + }, + "description" : "Response" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "teams" ] + } + }, + "/teams/{team_name}/usage" : { + "get" : { + "description" : "List plugin usage for the current calendar month.", + "operationId" : "ListTeamPluginUsage", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListTeamPluginUsage_200_response" + } + } + }, + "description" : "List plugin usage for the current calendar month." + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "teams" ] + }, + "post" : { + "description" : "Increase the usage of a plugin. This can incur billing costs and should be used only by plugin SDKs.", + "operationId" : "IncreaseTeamPluginUsage", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UsageIncrease" + } + } + } + }, + "responses" : { + "204" : { + "description" : "Success (the plugin usage was increased). It may take some time to reflect in the usage list.", + "headers" : { + "x-cq-minimum-update-interval" : { + "explode" : false, + "schema" : { + "description" : "The minimum interval in seconds between usage updates.", + "format" : "int32", + "type" : "integer" + }, + "style" : "simple" + }, + "x-cq-maximum-update-interval" : { + "explode" : false, + "schema" : { + "description" : "The maximum interval in seconds before a usage update is forced.", + "format" : "int32", + "type" : "integer" + }, + "style" : "simple" + }, + "x-cq-batch-limit" : { + "explode" : false, + "schema" : { + "description" : "The number of rows to batch before sending a usage update.", + "format" : "int32", + "type" : "integer" + }, + "style" : "simple" + } + } + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + }, + "503" : { + "$ref" : "#/components/responses/ServiceUnavailable" + } + }, + "tags" : [ "teams" ] + } + }, + "/teams/{team_name}/usage/{plugin_team}/{plugin_kind}/{plugin_name}" : { + "get" : { + "description" : "Get plugin usage for the current calendar month.", + "operationId" : "GetTeamPluginUsage", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_team" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UsageCurrent" + } + } + }, + "description" : "Plugin usage for the current calendar month.", + "headers" : { + "x-cq-query-interval" : { + "explode" : false, + "schema" : { + "description" : "Suggested interval in seconds between usage queries.", + "format" : "int32", + "type" : "integer" + }, + "style" : "simple" + } + } + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "teams" ] + } + }, + "/teams/{team_name}/usage-summary" : { + "get" : { + "description" : "Get a summary of usage for the specified time range.", + "operationId" : "GetTeamUsageSummary", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "explode" : true, + "in" : "query", + "name" : "metrics", + "required" : false, + "schema" : { + "default" : [ "paid_rows" ], + "description" : "A list of metrics to include in the response. Each metric must be one of the predefined valid values. If not provided, only `paid-rows` will be included.", + "items" : { + "enum" : [ "paid_rows", "cloud_vcpu_seconds", "cloud_vram_byte_seconds", "network_egress_bytes" ], + "type" : "string" + }, + "type" : "array" + }, + "style" : "form" + }, { + "explode" : true, + "in" : "query", + "name" : "start", + "required" : false, + "schema" : { + "description" : "A valid ISO-8601-formatted date and time, indicating the inclusive start of the query time range. Defaults to 30 days ago.", + "format" : "date-time", + "type" : "string" + }, + "style" : "form" + }, { + "explode" : true, + "in" : "query", + "name" : "end", + "required" : false, + "schema" : { + "description" : "A valid ISO-8601-formatted date and time, indicating the exclusive end of the query time range. Defaults to the current time.", + "format" : "date-time", + "type" : "string" + }, + "style" : "form" + }, { + "description" : "An aggregation period to sum data over. In other words, data will be returned at this granularity. Currently only supports day and month.", + "explode" : true, + "in" : "query", + "name" : "aggregation_period", + "required" : false, + "schema" : { + "default" : "day", + "enum" : [ "day", "month" ], + "type" : "string" + }, + "style" : "form" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UsageSummary" + } + } + }, + "description" : "A summary of usage for the specified time range." + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "teams" ] + } + }, + "/teams/{team_name}/usage-summary/{group_by}" : { + "get" : { + "description" : "Get a grouped summary of usage for the specified time range.", + "operationId" : "GetGroupedTeamUsageSummary", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "explode" : false, + "in" : "path", + "name" : "group_by", + "required" : true, + "schema" : { + "description" : "Group by usage summary. `plugin` and `price_category` groupings are only available for `paid-rows`.", + "enum" : [ "price_category", "plugin", "sync_id" ], + "type" : "string" + }, + "style" : "simple" + }, { + "explode" : true, + "in" : "query", + "name" : "metrics", + "required" : false, + "schema" : { + "default" : [ "paid_rows" ], + "description" : "A list of metrics to include in the response. Each metric must be one of the predefined valid values. If not provided, only `paid-rows` will be included.", + "items" : { + "enum" : [ "paid_rows", "cloud_vcpu_seconds", "cloud_vram_byte_seconds", "network_egress_bytes" ], + "type" : "string" + }, + "type" : "array" + }, + "style" : "form" + }, { + "explode" : true, + "in" : "query", + "name" : "start", + "required" : false, + "schema" : { + "description" : "A valid ISO-8601-formatted date and time, indicating the inclusive start of the query time range. Defaults to 30 days ago.", + "format" : "date-time", + "type" : "string" + }, + "style" : "form" + }, { + "explode" : true, + "in" : "query", + "name" : "end", + "required" : false, + "schema" : { + "description" : "A valid ISO-8601-formatted date and time, indicating the exclusive end of the query time range. Defaults to the current time.", + "format" : "date-time", + "type" : "string" + }, + "style" : "form" + }, { + "description" : "An aggregation period to sum data over. In other words, data will be returned at this granularity. Currently only supports day and month.", + "explode" : true, + "in" : "query", + "name" : "aggregation_period", + "required" : false, + "schema" : { + "default" : "day", + "enum" : [ "day", "month" ], + "type" : "string" + }, + "style" : "form" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UsageSummary" + } + } + }, + "description" : "A summary of usage for the specified time range." + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "teams" ] + } + }, + "/teams/{team_name}/plugins/{plugin_team}/{plugin_kind}/{plugin_name}/versions/{version_name}/assets/{target_name}" : { + "get" : { + "description" : "Download an asset for a given plugin version as the current team.", + "operationId" : "DownloadPluginAssetByTeam", + "parameters" : [ { + "explode" : false, + "in" : "header", + "name" : "Accept", + "required" : false, + "schema" : { + "type" : "string" + }, + "style" : "simple" + }, { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/plugin_team" + }, { + "$ref" : "#/components/parameters/plugin_kind" + }, { + "$ref" : "#/components/parameters/plugin_name" + }, { + "$ref" : "#/components/parameters/version_name" + }, { + "$ref" : "#/components/parameters/target_name" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PluginAsset" + } + } + }, + "description" : "Response" + }, + "302" : { + "description" : "Response", + "headers" : { + "Location" : { + "explode" : false, + "schema" : { + "type" : "string" + }, + "style" : "simple" + } + } + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "429" : { + "$ref" : "#/components/responses/TooManyRequests" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "plugins" ] + } + }, + "/teams/{team_name}/addons/{addon_team}/{addon_type}/{addon_name}/versions/{version_name}/assets" : { + "get" : { + "description" : "Download an asset for a given addon version as the current team.", + "operationId" : "DownloadAddonAssetByTeam", + "parameters" : [ { + "explode" : false, + "in" : "header", + "name" : "Accept", + "required" : false, + "schema" : { + "type" : "string" + }, + "style" : "simple" + }, { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/addon_team" + }, { + "$ref" : "#/components/parameters/addon_type" + }, { + "$ref" : "#/components/parameters/addon_name" + }, { + "$ref" : "#/components/parameters/version_name" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AddonAsset" + } + } + }, + "description" : "Response" + }, + "302" : { + "description" : "Response", + "headers" : { + "Location" : { + "explode" : false, + "schema" : { + "type" : "string" + }, + "style" : "simple" + } + } + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "429" : { + "$ref" : "#/components/responses/TooManyRequests" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "addons" ] + } + }, + "/teams/{team_name}/invitations" : { + "delete" : { + "description" : "Delete an invitation to the team, preventing the user becoming a team member", + "operationId" : "DeleteTeamInvitation", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/DeleteTeamInvitation_request" + } + } + } + }, + "responses" : { + "204" : { + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "teams" ] + }, + "get" : { + "description" : "List of open invitations to the team", + "operationId" : "ListTeamInvitations", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListTeamInvitations_200_response" + } + } + }, + "description" : "Response" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "teams" ] + }, + "post" : { + "description" : "Invite a user to join a team with their email address", + "operationId" : "EmailTeamInvitation", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EmailTeamInvitation_request" + } + } + } + }, + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Invitation" + } + } + }, + "description" : "Response" + }, + "202" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Invitation" + } + } + }, + "description" : "Response, email failed to send" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "429" : { + "$ref" : "#/components/responses/TooManyRequests" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "teams" ] + } + }, + "/teams/{team_name}/invitations/accept" : { + "post" : { + "description" : "Accept an invitation to the team, creating a user membership", + "operationId" : "AcceptTeamInvitation", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AcceptTeamInvitation_request" + } + } + } + }, + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/MembershipWithTeam" + } + } + }, + "description" : "The invitation has been accepted and the authenticated user is now a member of the team." + }, + "303" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/MembershipWithTeam" + } + } + }, + "description" : "The authenticated user is already a member of this team." + }, + "403" : { + "$ref" : "#/components/responses/Forbidden", + "description" : "You do not have an invitation to join this team." + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "teams" ] + } + }, + "/teams/{team_name}/invitations/{email}" : { + "delete" : { + "deprecated" : true, + "description" : "Cancel an invitation to the team, preventing the user becoming a team member", + "operationId" : "CancelTeamInvitation", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/email_basic" + } ], + "responses" : { + "204" : { + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "teams" ] + } + }, + "/teams/{team_name}/subscription-orders" : { + "get" : { + "description" : "List all subscription orders for the team.", + "operationId" : "ListSubscriptionOrdersByTeam", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListSubscriptionOrdersByTeam_200_response" + } + } + }, + "description" : "Response" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "teams" ] + }, + "post" : { + "description" : "Start the checkout process for a subscription order.", + "operationId" : "CreateSubscriptionOrderForTeam", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/TeamSubscriptionOrderCreate" + } + } + }, + "required" : true + }, + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/TeamSubscriptionOrder" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "teams" ] + } + }, + "/teams/{team_name}/subscription-orders/{subscription_order_id}" : { + "get" : { + "description" : "Get a subscription order for the team.", + "operationId" : "GetSubscriptionOrderByTeam", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/team_subscription_order_id" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/TeamSubscriptionOrder" + } + } + }, + "description" : "Response" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "teams" ] + } + }, + "/teams/{team_name}/users" : { + "get" : { + "description" : "List all users in the current team.", + "operationId" : "ListUsersByTeam", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/per_page" + }, { + "$ref" : "#/components/parameters/page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListUsersByTeam_200_response" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "teams" ] + } + }, + "/teams/{team_name}/settings" : { + "get" : { + "description" : "Show current platform settings", + "operationId" : "GetSettings", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Settings" + } + } + }, + "description" : "Response" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "admin" ] + }, + "patch" : { + "description" : "Update platform settings", + "operationId" : "UpdateSettings", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SettingsUpdate" + } + } + } + }, + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Settings" + } + } + }, + "description" : "Response" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "admin" ] + } + }, + "/user" : { + "get" : { + "description" : "Get the current authenticated user from the OAuth token\n", + "operationId" : "GetCurrentUser", + "parameters" : [ ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/User" + } + } + }, + "description" : "Response" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "users" ] + }, + "patch" : { + "description" : "Update attributes for the current authenticated user from the OAuth token", + "operationId" : "UpdateCurrentUser", + "parameters" : [ ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateCurrentUser_request" + } + } + } + }, + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/User" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "405" : { + "$ref" : "#/components/responses/MethodNotAllowed" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "users" ] + } + }, + "/user/authenticated-status" : { + "get" : { + "description" : "Check if the current user is authenticated", + "operationId" : "CheckUserAuthStatus", + "parameters" : [ ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CheckUserAuthStatus_200_response" + } + } + }, + "description" : "Response" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "security" : [ ], + "tags" : [ "users" ] + } + }, + "/user/login" : { + "delete" : { + "description" : "Logout a session", + "operationId" : "LogoutUser", + "responses" : { + "204" : { + "description" : "Logout is complete.", + "headers" : { + "Set-Cookie" : { + "description" : "Empty session cookie", + "explode" : false, + "schema" : { + "example" : "__session=; HttpOnly; Secure; SameSite=None; Path=/; Max-Age=3600", + "type" : "string" + }, + "style" : "simple" + } + } + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "405" : { + "$ref" : "#/components/responses/MethodNotAllowed" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "users" ] + }, + "post" : { + "description" : "Start a session using ID token", + "operationId" : "LoginUser", + "parameters" : [ ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/LoginUser_request" + } + } + } + }, + "responses" : { + "204" : { + "description" : "Authentication is complete.", + "headers" : { + "Access-Control-Expose-Headers" : { + "description" : "Headers exposed to the client", + "explode" : false, + "schema" : { + "type" : "string" + }, + "style" : "simple" + }, + "X-Cq-Mfa-Configured" : { + "description" : "Indicates if MFA is configured for the user", + "explode" : false, + "schema" : { + "enum" : [ "true", "" ], + "example" : "true", + "type" : "string" + }, + "style" : "simple" + }, + "X-Cq-Mfa-Required" : { + "description" : "Indicates if MFA is enforced", + "explode" : false, + "schema" : { + "enum" : [ "true", "" ], + "example" : "true", + "type" : "string" + }, + "style" : "simple" + }, + "Set-Cookie" : { + "description" : "Session cookie", + "explode" : false, + "schema" : { + "example" : "__session=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9Cg...; HttpOnly; Secure; SameSite=None; Path=/; Max-Age=3600", + "type" : "string" + }, + "style" : "simple" + } + } + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "405" : { + "$ref" : "#/components/responses/MethodNotAllowed" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "security" : [ ], + "tags" : [ "users" ] + } + }, + "/user/token" : { + "post" : { + "description" : "Start a CLI session and create a custom token", + "operationId" : "CreateUserToken", + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CreateUserToken_201_response" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "security" : [ { + "cookieAuth" : [ ] + } ], + "tags" : [ "users" ], + "x-internal" : true + } + }, + "/user/totp/verify" : { + "post" : { + "description" : "Verify a one time password for MFA", + "operationId" : "UserTOTPVerify", + "parameters" : [ { + "explode" : true, + "in" : "cookie", + "name" : "__session", + "required" : false, + "schema" : { + "type" : "string" + }, + "style" : "form" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UserTOTPVerify_request" + } + } + } + }, + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UserTOTPVerify_201_response" + } + } + }, + "description" : "Multifactor authentication is complete." + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "405" : { + "$ref" : "#/components/responses/MethodNotAllowed" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "429" : { + "$ref" : "#/components/responses/TooManyRequests" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "users" ] + } + }, + "/user/totp" : { + "delete" : { + "description" : "Disable MFA for the current user", + "operationId" : "UserTOTPDelete", + "parameters" : [ ], + "responses" : { + "204" : { + "description" : "Success" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "405" : { + "$ref" : "#/components/responses/MethodNotAllowed" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "users" ] + }, + "post" : { + "description" : "Set up MFA for the current user", + "operationId" : "UserTOTPSetup", + "parameters" : [ ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UserTOTPSetup_200_response" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "405" : { + "$ref" : "#/components/responses/MethodNotAllowed" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "users" ] + } + }, + "/user/register" : { + "post" : { + "description" : "Register new user", + "operationId" : "RegisterUser", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/RegisterUser_request" + } + } + } + }, + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/RegisterUser_201_response" + } + } + }, + "description" : "User created but email not verified" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "429" : { + "$ref" : "#/components/responses/TooManyRequests" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "security" : [ ], + "tags" : [ "users" ], + "x-internal" : true + } + }, + "/user/reset-password" : { + "post" : { + "description" : "Reset user password from email", + "operationId" : "ResetUserPassword", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ResetUserPassword_request" + } + } + } + }, + "responses" : { + "202" : { + "description" : "Email failed to send" + }, + "204" : { + "description" : "Password reset email was sent" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "429" : { + "$ref" : "#/components/responses/TooManyRequests" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "security" : [ ], + "tags" : [ "users" ] + } + }, + "/user/verify-email" : { + "post" : { + "description" : "Verify user email", + "operationId" : "VerifyUserEmail", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/VerifyUserEmail_request" + } + } + } + }, + "responses" : { + "200" : { + "description" : "Email is already verified" + }, + "202" : { + "description" : "Email failed to send" + }, + "204" : { + "description" : "Verification email was sent" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "429" : { + "$ref" : "#/components/responses/TooManyRequests" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "security" : [ ], + "tags" : [ "users" ], + "x-internal" : true + } + }, + "/user/invitations" : { + "get" : { + "description" : "List of the current user's unaccepted invitations", + "operationId" : "ListCurrentUserInvitations", + "parameters" : [ { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListCurrentUserInvitations_200_response" + } + } + }, + "description" : "Response" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "users" ] + } + }, + "/user/memberships" : { + "get" : { + "description" : "Get memberships that the user has accepted.", + "operationId" : "GetCurrentUserMemberships", + "parameters" : [ { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/GetCurrentUserMemberships_200_response" + } + } + }, + "description" : "Response" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "users" ] + } + }, + "/user/event" : { + "post" : { + "description" : "Send a user event", + "operationId" : "SendUserEvent", + "parameters" : [ ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SendUserEvent_request" + } + } + } + }, + "responses" : { + "204" : { + "description" : "Success" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "analytics" ], + "x-internal" : true + } + }, + "/user/anon-event" : { + "post" : { + "description" : "Send an anonymous event", + "operationId" : "SendAnonymousEvent", + "parameters" : [ ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SendAnonymousEvent_request" + } + } + } + }, + "responses" : { + "204" : { + "description" : "Success" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "429" : { + "$ref" : "#/components/responses/TooManyRequests" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "security" : [ ], + "tags" : [ "analytics" ], + "x-internal" : true + } + }, + "/user/customer" : { + "patch" : { + "description" : "Update customer details", + "operationId" : "UpdateCustomer", + "parameters" : [ ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateCustomer_request" + } + } + } + }, + "responses" : { + "201" : { + "description" : "Queued for processing" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "analytics" ], + "x-internal" : true + } + }, + "/user/tenant" : { + "get" : { + "description" : "Determine platform tenant by email", + "operationId" : "DeterminePlatformTenantByEmail", + "parameters" : [ { + "explode" : true, + "in" : "query", + "name" : "email", + "required" : true, + "schema" : { + "description" : "Email address of the user", + "type" : "string" + }, + "style" : "form" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/DeterminePlatformTenantByEmail_200_response" + } + } + }, + "description" : "List of tenants" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "429" : { + "$ref" : "#/components/responses/TooManyRequests" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "security" : [ ], + "tags" : [ "platform", "users" ], + "x-internal" : true + } + }, + "/users/{user_id}" : { + "delete" : { + "description" : "Delete user", + "operationId" : "DeleteUser", + "parameters" : [ { + "$ref" : "#/components/parameters/user_id" + } ], + "responses" : { + "204" : { + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "users" ], + "x-internal" : true + } + }, + "/teams/{team_name}/apikeys" : { + "get" : { + "description" : "List all team API Keys", + "operationId" : "ListTeamAPIKeys", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/per_page" + }, { + "$ref" : "#/components/parameters/page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListTeamAPIKeys_200_response" + } + } + }, + "description" : "Response" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "teams" ] + }, + "post" : { + "description" : "Create new team API Key.", + "operationId" : "CreateTeamAPIKey", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CreateTeamAPIKey_request" + } + } + } + }, + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/APIKey" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "teams" ] + } + }, + "/teams/{team_name}/apikeys/{apikey_id}" : { + "delete" : { + "description" : "Delete API Key. This will remove any future access by this API Key.", + "operationId" : "DeleteTeamAPIKey", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/apikey_id" + } ], + "responses" : { + "204" : { + "description" : "Deleted" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "teams" ] + } + }, + "/registry/auth" : { + "get" : { + "description" : "Performs authentication and authorization for our image registry.", + "operationId" : "AuthRegistryRequest", + "parameters" : [ { + "description" : "Plugin version name", + "example" : "v1.0.0", + "explode" : false, + "in" : "header", + "name" : "X-Meta-Plugin-Version", + "required" : false, + "schema" : { + "type" : "string" + }, + "style" : "simple" + }, { + "description" : "User's team name", + "explode" : false, + "in" : "header", + "name" : "X-Meta-User-Team-Name", + "required" : false, + "schema" : { + "type" : "string" + }, + "style" : "simple" + }, { + "description" : "Username used for `docker login`", + "explode" : true, + "in" : "query", + "name" : "account", + "required" : false, + "schema" : { + "type" : "string" + }, + "style" : "form" + }, { + "description" : "Service requesting the JWT token", + "explode" : true, + "in" : "query", + "name" : "service", + "required" : false, + "schema" : { + "type" : "string" + }, + "style" : "form" + }, { + "description" : "Multi-value string containing the repository being access and the operation type (push/pull)", + "explode" : true, + "in" : "query", + "name" : "scope", + "required" : false, + "schema" : { + "type" : "string" + }, + "style" : "form" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/RegistryAuthToken" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/DockerError" + }, + "401" : { + "$ref" : "#/components/responses/DockerError" + }, + "404" : { + "$ref" : "#/components/responses/DockerError" + }, + "422" : { + "$ref" : "#/components/responses/DockerError" + }, + "500" : { + "$ref" : "#/components/responses/DockerError" + } + }, + "security" : [ { + "basicAuth" : [ ] + } ], + "tags" : [ "registry" ] + } + }, + "/teams/{team_name}/managed-databases" : { + "get" : { + "description" : "Get a paginated list of managed databases", + "operationId" : "GetManagedDatabases", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/page" + }, { + "$ref" : "#/components/parameters/per_page" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/GetManagedDatabases_200_response" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "managed-databases" ], + "x-internal" : true + }, + "post" : { + "description" : "Create a new managed database", + "operationId" : "CreateManagedDatabase", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ManagedDatabaseCreate" + } + } + }, + "required" : true + }, + "responses" : { + "201" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ManagedDatabase" + } + } + }, + "description" : "Response" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "409" : { + "$ref" : "#/components/responses/Conflict" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "managed-databases" ], + "x-internal" : true + } + }, + "/teams/{team_name}/managed-databases/{managed_database_id}" : { + "delete" : { + "description" : "Delete this managed database. Any syncs relying on this database must be deleted first.", + "operationId" : "DeleteManagedDatabase", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/managed_database_id" + } ], + "responses" : { + "204" : { + "description" : "Deleted" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "422" : { + "$ref" : "#/components/responses/UnprocessableEntity" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "managed-databases" ], + "x-internal" : true + }, + "get" : { + "description" : "Get a single managed database.", + "operationId" : "GetManagedDatabase", + "parameters" : [ { + "$ref" : "#/components/parameters/team_name" + }, { + "$ref" : "#/components/parameters/managed_database_id" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ManagedDatabase" + } + } + }, + "description" : "Response" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "managed-databases" ], + "x-internal" : true + } + }, + "/platform/activate" : { + "post" : { + "description" : "Activate platform usage by API key", + "operationId" : "ActivatePlatform", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ActivatePlatform_request" + } + } + }, + "required" : true + }, + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ActivatePlatform_200_response" + } + } + }, + "description" : "Success" + }, + "205" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ActivatePlatform_205_response" + } + } + }, + "description" : "Activation method is no longer valid" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "429" : { + "$ref" : "#/components/responses/TooManyRequests" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "security" : [ ], + "tags" : [ "platform" ], + "x-internal" : true + } + }, + "/platform/activate/renew" : { + "post" : { + "description" : "Renew platform activation", + "operationId" : "RenewPlatformActivation", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/RenewPlatformActivation_request" + } + } + }, + "required" : true + }, + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/RenewPlatformActivation_200_response" + } + } + }, + "description" : "Success" + }, + "205" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ActivatePlatform_205_response" + } + } + }, + "description" : "Activation method is no longer valid" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "429" : { + "$ref" : "#/components/responses/TooManyRequests" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "security" : [ ], + "tags" : [ "platform" ], + "x-internal" : true + } + }, + "/platform/report" : { + "post" : { + "description" : "Report platform data", + "operationId" : "ReportPlatformData", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ReportPlatformData_request" + } + } + }, + "required" : true + }, + "responses" : { + "204" : { + "description" : "Success" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "429" : { + "$ref" : "#/components/responses/TooManyRequests" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "platform" ], + "x-internal" : true + } + }, + "/platform/{tenant_id}/report" : { + "post" : { + "description" : "Report tenant platform data", + "operationId" : "ReportTenantPlatformData", + "parameters" : [ { + "explode" : false, + "in" : "path", + "name" : "tenant_id", + "required" : true, + "schema" : { + "format" : "uuid", + "type" : "string" + }, + "style" : "simple", + "x-go-name" : "TenantID" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ReportTenantPlatformData_request" + } + } + }, + "required" : true + }, + "responses" : { + "204" : { + "description" : "Success" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "429" : { + "$ref" : "#/components/responses/TooManyRequests" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "platform" ], + "x-internal" : true + } + }, + "/teams/{team_name}/ai-onboarding/chat" : { + "post" : { + "description" : "Send a chat message to the AI onboarding assistant", + "operationId" : "AIOnboardingChat", + "parameters" : [ { + "explode" : false, + "in" : "path", + "name" : "team_name", + "required" : true, + "schema" : { + "type" : "string" + }, + "style" : "simple", + "x-go-name" : "TeamName" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AIOnboardingChat_request" + } + } + } + }, + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AIOnboardingChat_200_response" + } + } + }, + "description" : "Chat response from the AI assistant" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "405" : { + "$ref" : "#/components/responses/MethodNotAllowed" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "ai-onboarding" ] + } + }, + "/teams/{team_name}/ai-onboarding/conversations" : { + "delete" : { + "description" : "End the current AI onboarding conversation", + "operationId" : "AIOnboardingEndConversation", + "parameters" : [ { + "explode" : false, + "in" : "path", + "name" : "team_name", + "required" : true, + "schema" : { + "type" : "string" + }, + "style" : "simple", + "x-go-name" : "TeamName" + } ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AIOnboardingEndConversation_200_response" + } + } + }, + "description" : "Conversation ended successfully" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "405" : { + "$ref" : "#/components/responses/MethodNotAllowed" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "ai-onboarding" ] + }, + "post" : { + "description" : "Start a new conversation with the AI onboarding assistant", + "operationId" : "AIOnboardingNewConversation", + "parameters" : [ { + "explode" : false, + "in" : "path", + "name" : "team_name", + "required" : true, + "schema" : { + "type" : "string" + }, + "style" : "simple", + "x-go-name" : "TeamName" + } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AIOnboardingNewConversation_request" + } + } + } + }, + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AIOnboardingNewConversation_200_response" + } + } + }, + "description" : "New conversation started successfully" + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "401" : { + "$ref" : "#/components/responses/RequiresAuthentication" + }, + "403" : { + "$ref" : "#/components/responses/Forbidden" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "405" : { + "$ref" : "#/components/responses/MethodNotAllowed" + }, + "500" : { + "$ref" : "#/components/responses/InternalError" + } + }, + "tags" : [ "ai-onboarding" ] + } + } + }, + "components" : { + "parameters" : { + "page" : { + "description" : "Page number of the results to fetch", + "explode" : true, + "in" : "query", + "name" : "page", + "required" : false, + "schema" : { + "default" : 1, + "format" : "int64", + "minimum" : 1, + "type" : "integer" + }, + "style" : "form" + }, + "per_page" : { + "description" : "The number of results per page (max 1000).", + "explode" : true, + "in" : "query", + "name" : "per_page", + "required" : false, + "schema" : { + "default" : 100, + "format" : "int64", + "maximum" : 1000, + "minimum" : 1, + "type" : "integer" + }, + "style" : "form" + }, + "plugin_team" : { + "explode" : false, + "in" : "path", + "name" : "plugin_team", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/TeamName" + }, + "style" : "simple" + }, + "plugin_kind" : { + "explode" : false, + "in" : "path", + "name" : "plugin_kind", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/PluginKind" + }, + "style" : "simple" + }, + "plugin_name" : { + "explode" : false, + "in" : "path", + "name" : "plugin_name", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/PluginName" + }, + "style" : "simple" + }, + "plugin_sort_by" : { + "description" : "The field to sort by", + "explode" : true, + "in" : "query", + "name" : "sort_by", + "required" : false, + "schema" : { + "enum" : [ "created_at", "updated_at", "name", "downloads" ], + "type" : "string" + }, + "style" : "form" + }, + "plugin_include_release_stages" : { + "allowEmptyValue" : true, + "description" : "Include these release stages in the response", + "explode" : true, + "in" : "query", + "name" : "include_release_stages", + "required" : false, + "schema" : { + "items" : { + "$ref" : "#/components/schemas/PluginReleaseStage" + }, + "type" : "array" + }, + "style" : "form" + }, + "plugin_exclude_release_stages" : { + "allowEmptyValue" : true, + "description" : "Exclude these release stages from the response", + "explode" : true, + "in" : "query", + "name" : "exclude_release_stages", + "required" : false, + "schema" : { + "default" : [ "deprecated" ], + "items" : { + "$ref" : "#/components/schemas/PluginReleaseStage" + }, + "type" : "array" + }, + "style" : "form" + }, + "team_name" : { + "explode" : false, + "in" : "path", + "name" : "team_name", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/TeamName" + }, + "style" : "simple" + }, + "version_sort_by" : { + "description" : "The field to sort by", + "explode" : true, + "in" : "query", + "name" : "sort_by", + "required" : false, + "schema" : { + "enum" : [ "created_at" ], + "type" : "string" + }, + "style" : "form" + }, + "include_drafts" : { + "description" : "Whether to include draft versions", + "explode" : true, + "in" : "query", + "name" : "include_drafts", + "required" : false, + "schema" : { + "type" : "boolean" + }, + "style" : "form" + }, + "include_fips" : { + "description" : "Whether to include fips versions", + "explode" : true, + "in" : "query", + "name" : "include_fips", + "required" : false, + "schema" : { + "type" : "boolean" + }, + "style" : "form" + }, + "include_prereleases" : { + "description" : "Whether to include prerelease versions", + "explode" : true, + "in" : "query", + "name" : "include_prereleases", + "required" : false, + "schema" : { + "type" : "boolean" + }, + "style" : "form" + }, + "version_filter" : { + "explode" : true, + "in" : "query", + "name" : "version_filter", + "required" : false, + "schema" : { + "$ref" : "#/components/schemas/VersionFilter" + }, + "style" : "form" + }, + "version_name" : { + "explode" : false, + "in" : "path", + "name" : "version_name", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/VersionName" + }, + "style" : "simple" + }, + "target_name" : { + "explode" : false, + "in" : "path", + "name" : "target_name", + "required" : true, + "schema" : { + "type" : "string" + }, + "style" : "simple" + }, + "addon_sort_by" : { + "description" : "The field to sort by", + "explode" : true, + "in" : "query", + "name" : "sort_by", + "required" : false, + "schema" : { + "enum" : [ "created_at", "updated_at", "name", "downloads" ], + "type" : "string" + }, + "style" : "form" + }, + "addon_type" : { + "explode" : false, + "in" : "path", + "name" : "addon_type", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/AddonType" + }, + "style" : "simple" + }, + "addon_name" : { + "explode" : false, + "in" : "path", + "name" : "addon_name", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/AddonName" + }, + "style" : "simple" + }, + "include_private" : { + "description" : "Whether to include private plugins", + "explode" : true, + "in" : "query", + "name" : "include_private", + "required" : false, + "schema" : { + "type" : "boolean" + }, + "style" : "form" + }, + "addon_order_id" : { + "explode" : false, + "in" : "path", + "name" : "addon_order_id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/AddonOrderID" + }, + "style" : "simple", + "x-go-name" : "AddonOrderID" + }, + "email_basic" : { + "explode" : false, + "in" : "path", + "name" : "email", + "required" : true, + "schema" : { + "example" : "user@example.com", + "type" : "string" + }, + "style" : "simple" + }, + "addon_team" : { + "explode" : false, + "in" : "path", + "name" : "addon_team", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/TeamName" + }, + "style" : "simple" + }, + "team_subscription_order_id" : { + "explode" : false, + "in" : "path", + "name" : "subscription_order_id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/TeamSubscriptionOrderID" + }, + "style" : "simple", + "x-go-name" : "TeamSubscriptionOrderID" + }, + "user_id" : { + "explode" : false, + "in" : "path", + "name" : "user_id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/UserID" + }, + "style" : "simple", + "x-go-name" : "UserID" + }, + "apikey_id" : { + "explode" : false, + "in" : "path", + "name" : "apikey_id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/APIKeyID" + }, + "style" : "simple", + "x-go-name" : "APIKeyID" + }, + "managed_database_id" : { + "explode" : false, + "in" : "path", + "name" : "managed_database_id", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/ManagedDatabaseID" + }, + "style" : "simple", + "x-go-name" : "ManagedDatabaseID" + } + }, + "responses" : { + "InternalError" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BasicError" + } + } + }, + "description" : "Internal Error" + }, + "RequiresAuthentication" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BasicError" + } + } + }, + "description" : "Requires authentication" + }, + "BadRequest" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/FieldError" + } + } + }, + "description" : "Bad request" + }, + "Forbidden" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/FieldError" + } + } + }, + "description" : "Forbidden" + }, + "NotFound" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BasicError" + } + } + }, + "description" : "Resource not found" + }, + "UnprocessableEntity" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/FieldError" + } + } + }, + "description" : "UnprocessableEntity" + }, + "TooManyRequests" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BasicError" + } + } + }, + "description" : "Too Many Requests" + }, + "ServiceUnavailable" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BasicError" + } + } + }, + "description" : "Service unavailable" + }, + "MethodNotAllowed" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BasicError" + } + } + }, + "description" : "Method not allowed" + }, + "DockerError" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/DockerError" + } + } + }, + "description" : "Error Returned from the Docker Authorization Handler to the Docker Registry" + }, + "Conflict" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BasicError" + } + } + }, + "description" : "Conflict" + } + }, + "schemas" : { + "BasicError" : { + "additionalProperties" : false, + "description" : "Basic Error", + "properties" : { + "message" : { + "type" : "string" + }, + "status" : { + "type" : "integer" + } + }, + "required" : [ "message", "status" ], + "title" : "Basic Error" + }, + "ContentType" : { + "description" : "The HTTP Content-Type of the image or asset", + "enum" : [ "image/jpeg", "image/png", "image/webp" ], + "example" : "image/png", + "type" : "string" + }, + "ImageURL" : { + "properties" : { + "upload_url" : { + "type" : "string" + }, + "download_url" : { + "type" : "string" + }, + "required_headers" : { + "additionalProperties" : { + "items" : { + "type" : "string" + } + }, + "description" : "Required HTTP headers to include for the upload" + } + }, + "required" : [ "download_url", "required_headers", "upload_url" ] + }, + "TeamName" : { + "description" : "The unique name for the team.", + "example" : "cloudquery", + "maxLength" : 255, + "pattern" : "^[a-z](-?[a-z0-9]+)+$", + "type" : "string" + }, + "PluginKind" : { + "description" : "The kind of plugin, ie. source or destination.", + "enum" : [ "source", "destination", "transformer" ], + "example" : "source", + "type" : "string" + }, + "PluginName" : { + "description" : "The unique name for the plugin.", + "example" : "aws-source", + "maxLength" : 255, + "pattern" : "^[a-z](-?[a-z0-9]+)+$", + "type" : "string" + }, + "PluginNotificationRequestStatus" : { + "default" : "pending", + "description" : "Status of a plugin notification request", + "enum" : [ "pending", "sent" ], + "type" : "string" + }, + "PluginNotificationRequest" : { + "additionalProperties" : false, + "description" : "Plugin Notification Request", + "properties" : { + "plugin_team" : { + "$ref" : "#/components/schemas/TeamName" + }, + "plugin_kind" : { + "$ref" : "#/components/schemas/PluginKind" + }, + "plugin_name" : { + "$ref" : "#/components/schemas/PluginName" + }, + "created_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "sent_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "status" : { + "$ref" : "#/components/schemas/PluginNotificationRequestStatus" + } + }, + "required" : [ "created_at", "plugin_kind", "plugin_name", "plugin_team" ] + }, + "ListMetadata" : { + "properties" : { + "total_count" : { + "type" : "integer" + }, + "last_page" : { + "type" : "integer" + }, + "page_size" : { + "type" : "integer" + }, + "time_ms" : { + "type" : "integer" + } + }, + "required" : [ "page_size" ] + }, + "PluginNotificationRequestCreate" : { + "additionalProperties" : false, + "description" : "Create a Plugin Notification Request", + "properties" : { + "plugin_team" : { + "$ref" : "#/components/schemas/TeamName" + }, + "plugin_kind" : { + "$ref" : "#/components/schemas/PluginKind" + }, + "plugin_name" : { + "$ref" : "#/components/schemas/PluginName" + } + }, + "required" : [ "plugin_kind", "plugin_name", "plugin_team" ] + }, + "FieldError" : { + "allOf" : [ { + "$ref" : "#/components/schemas/BasicError" + }, { + "properties" : { + "errors" : { + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "field_errors" : { + "additionalProperties" : { + "type" : "string" + } + } + } + } ] + }, + "PluginReleaseStage" : { + "description" : "Official plugins can go through three release stages: Coming Soon, Preview, and GA.\nThe Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready.\nBoth Preview and GA plugins follow semantic versioning. The main differences between the two stages are:\nPreview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage.", + "enum" : [ "coming-soon", "preview", "ga", "deprecated" ], + "type" : "string" + }, + "PluginCategory" : { + "description" : "Supported categories for plugins", + "enum" : [ "cloud-infrastructure", "databases", "sales-marketing", "engineering-analytics", "marketing-analytics", "shipment-tracking", "product-analytics", "cloud-finops", "project-management", "fleet-management", "security", "data-warehouses", "human-resources", "finance", "customer-support", "other" ], + "type" : "string" + }, + "PluginPriceCategory" : { + "description" : "Supported price categories for billing", + "enum" : [ "api", "database", "free" ], + "type" : "string" + }, + "PluginTier" : { + "deprecated" : true, + "description" : "This field is deprecated, refer to `price_category` instead.\nThis field is only kept for backward compatibility and may be removed in a future release.\nSupported tiers for plugins.\n - free: Free tier, with no paid tables.\n - paid: Paid tier. These plugins may have paid tables, but can also have free tables. They require login to access.\n - open-core: This option is deprecated, values will either be free or paid.\n", + "enum" : [ "free", "paid", "open-core" ], + "type" : "string" + }, + "Plugin" : { + "additionalProperties" : false, + "description" : "CloudQuery Plugin", + "properties" : { + "team_name" : { + "$ref" : "#/components/schemas/TeamName" + }, + "name" : { + "$ref" : "#/components/schemas/PluginName" + }, + "kind" : { + "$ref" : "#/components/schemas/PluginKind" + }, + "category" : { + "$ref" : "#/components/schemas/PluginCategory" + }, + "price_category" : { + "$ref" : "#/components/schemas/PluginPriceCategory" + }, + "created_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "updated_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "homepage" : { + "example" : "https://cloudquery.io", + "type" : "string" + }, + "logo" : { + "example" : "https://storage.googleapis.com/cq-cloud-images/9ac4cb31-e971-4879-8619-87dc22b0f98e", + "type" : "string" + }, + "display_name" : { + "description" : "The plugin's display name", + "example" : "AWS Source Plugin", + "maxLength" : 50, + "minLength" : 1, + "type" : "string" + }, + "official" : { + "description" : "True if the plugin is maintained by CloudQuery, false otherwise", + "type" : "boolean" + }, + "release_stage" : { + "$ref" : "#/components/schemas/PluginReleaseStage" + }, + "repository" : { + "example" : "https://github.com/cloudquery/cloudquery", + "type" : "string" + }, + "short_description" : { + "example" : "Sync data from AWS to any destination", + "maxLength" : 512, + "minLength" : 1, + "type" : "string" + }, + "tier" : { + "$ref" : "#/components/schemas/PluginTier" + }, + "public" : { + "description" : "Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team.", + "type" : "boolean" + }, + "usd_per_row" : { + "deprecated" : true, + "description" : "Deprecated. Refer to `price_category` instead.", + "example" : "0.0001", + "pattern" : "^\\d+(?:\\.\\d{1,10})?$", + "type" : "string", + "x-go-name" : "USDPerRow" + }, + "free_rows_per_month" : { + "deprecated" : true, + "description" : "Deprecated. Refer to `price_category` instead.", + "example" : 1000, + "format" : "int64", + "type" : "integer" + } + }, + "required" : [ "category", "created_at", "display_name", "free_rows_per_month", "kind", "logo", "name", "official", "release_stage", "short_description", "team_name", "tier", "updated_at", "usd_per_row" ], + "title" : "CloudQuery Plugin" + }, + "VersionName" : { + "description" : "The version in semantic version format.", + "pattern" : "^v[0-9]+\\.[0-9]+\\.[0-9]+(-[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$", + "type" : "string" + }, + "ListPlugin" : { + "allOf" : [ { + "$ref" : "#/components/schemas/Plugin" + }, { + "properties" : { + "latest_version" : { + "$ref" : "#/components/schemas/VersionName" + } + } + } ] + }, + "PluginReleaseStageCreate" : { + "default" : "coming-soon", + "description" : "Official plugins can go through three release stages: Coming Soon, Preview, and GA.\nThe Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready.\nBoth Preview and GA plugins follow semantic versioning. The main differences between the two stages are:\nPreview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage.", + "enum" : [ "coming-soon", "preview", "ga" ], + "type" : "string" + }, + "PluginCreate" : { + "properties" : { + "team_name" : { + "$ref" : "#/components/schemas/TeamName" + }, + "kind" : { + "$ref" : "#/components/schemas/PluginKind" + }, + "name" : { + "$ref" : "#/components/schemas/PluginName" + }, + "category" : { + "$ref" : "#/components/schemas/PluginCategory" + }, + "price_category" : { + "$ref" : "#/components/schemas/PluginPriceCategory" + }, + "tier" : { + "$ref" : "#/components/schemas/PluginTier" + }, + "display_name" : { + "description" : "The plugin's display name, as shown in the CloudQuery Hub.", + "example" : "AWS Source Plugin", + "maxLength" : 50, + "minLength" : 1, + "type" : "string" + }, + "short_description" : { + "description" : "Short description of the plugin. This will be shown in the CloudQuery Hub.", + "example" : "Sync data from AWS to any destination", + "maxLength" : 512, + "minLength" : 1, + "type" : "string" + }, + "homepage" : { + "example" : "https://cloudquery.io", + "type" : "string" + }, + "public" : { + "description" : "Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the team.", + "example" : true, + "type" : "boolean" + }, + "repository" : { + "example" : "https://github.com/cloudquery/cloudquery", + "type" : "string" + }, + "release_stage" : { + "$ref" : "#/components/schemas/PluginReleaseStageCreate" + }, + "logo" : { + "description" : "URL to the plugin's logo. This will be shown in the CloudQuery Hub.", + "example" : "https://storage.googleapis.com/cq-cloud-images/9ac4cb31-e971-4879-8619-87dc22b0f98e", + "pattern" : "^https:\\/\\/storage\\.googleapis\\.com\\/cq-cloud-images\\/[a-z0-9-]+$", + "type" : "string" + }, + "usd_per_row" : { + "deprecated" : true, + "description" : "Deprecated. Use `price_category` instead.", + "example" : "0.00001", + "pattern" : "^\\d+(?:\\.\\d{1,10})?$", + "type" : "string", + "x-go-name" : "USDPerRow" + }, + "free_rows_per_month" : { + "deprecated" : true, + "description" : "Deprecated. Use `price_category` instead.", + "example" : 10000, + "format" : "int64", + "type" : "integer" + } + }, + "required" : [ "category", "display_name", "kind", "name", "public", "short_description", "team_name" ] + }, + "PluginReleaseStageUpdate" : { + "description" : "Official plugins can go through three release stages: Coming Soon, Preview, and GA.\nThe Coming Soon stage is for plugins that are not yet ready for Preview, but users can subscribe to be notified when they are ready.\nBoth Preview and GA plugins follow semantic versioning. The main differences between the two stages are:\nPreview plugins are still experimental and may have frequent breaking changes. Preview plugins might get deprecated due to lack of usage. Long Term Support with community Discord and bug fixes is only guaranteed for GA plugins. Premium plugins are often discounted or free during the Preview stage.", + "enum" : [ "coming-soon", "preview", "ga", "deprecated" ], + "type" : "string" + }, + "PluginUpdate" : { + "properties" : { + "category" : { + "$ref" : "#/components/schemas/PluginCategory" + }, + "price_category" : { + "$ref" : "#/components/schemas/PluginPriceCategory" + }, + "tier" : { + "$ref" : "#/components/schemas/PluginTier" + }, + "display_name" : { + "description" : "The plugin's display name, as shown in the CloudQuery Hub.", + "example" : "AWS Source Plugin", + "maxLength" : 50, + "minLength" : 1, + "type" : "string" + }, + "short_description" : { + "description" : "Short description of the plugin. This will be shown in the CloudQuery Hub.", + "example" : "Sync data from AWS to any destination", + "maxLength" : 512, + "minLength" : 1, + "type" : "string" + }, + "homepage" : { + "example" : "https://cloudquery.io", + "type" : "string" + }, + "repository" : { + "example" : "https://github.com/cloudquery/cloudquery", + "type" : "string" + }, + "logo" : { + "description" : "URL to the plugin's logo. This will be shown in the CloudQuery Hub.", + "example" : "https://storage.googleapis.com/cq-cloud-images/9ac4cb31-e971-4879-8619-87dc22b0f9e8", + "pattern" : "^(https:\\/\\/storage\\.googleapis\\.com\\/cq-cloud-images\\/[a-z0-9-]+)?$", + "type" : "string" + }, + "public" : { + "description" : "If plugin is not public, it won't be visible to other teams in the CloudQuery Hub.", + "type" : "boolean" + }, + "release_stage" : { + "$ref" : "#/components/schemas/PluginReleaseStageUpdate" + }, + "usd_per_row" : { + "deprecated" : true, + "description" : "Deprecated. Update `price_category` instead.", + "example" : "0.0001", + "pattern" : "^\\d+(?:\\.\\d{1,10})?$", + "type" : "string", + "x-go-name" : "USDPerRow" + }, + "free_rows_per_month" : { + "deprecated" : true, + "description" : "Deprecated. Update `price_category` instead.", + "example" : 1000, + "format" : "int64", + "type" : "integer" + } + } + }, + "PluginPrice" : { + "additionalProperties" : false, + "description" : "CloudQuery Plugin Price", + "properties" : { + "id" : { + "description" : "ID of the price change", + "example" : "12345678-1234-1234-1234-1234567890ab", + "format" : "uuid", + "type" : "string", + "x-go-name" : "ID" + }, + "usd_per_row" : { + "description" : "The price per row in USD. This is used to calculate the price of a sync.", + "example" : "0.0001", + "pattern" : "^\\d+(?:\\.\\d{1,10})?$", + "type" : "string", + "x-go-name" : "USDPerRow" + }, + "free_rows_per_month" : { + "description" : "The number of rows that can be synced for free each month.", + "example" : 1000, + "format" : "int64", + "type" : "integer" + }, + "effective_from" : { + "description" : "The date and time the price came (or will come) into effect.", + "example" : "2024-01-02T00:00:00Z", + "format" : "date-time", + "type" : "string" + } + }, + "required" : [ "effective_from", "free_rows_per_month", "id", "usd_per_row" ], + "title" : "CloudQuery Plugin Price" + }, + "PluginPriceCreate" : { + "additionalProperties" : false, + "description" : "CloudQuery Plugin Price Create", + "properties" : { + "usd_per_row" : { + "description" : "The price per row in USD. This is used to calculate the price of a sync.", + "example" : "0.0001", + "pattern" : "^\\d+(?:\\.\\d{1,10})?$", + "type" : "string", + "x-go-name" : "USDPerRow" + }, + "free_rows_per_month" : { + "description" : "The number of rows that can be synced for free each month.", + "example" : 1000, + "format" : "int64", + "type" : "integer" + }, + "effective_from" : { + "description" : "The date and time the price came (or will come) into effect.", + "example" : "2024-01-02T00:00:00Z", + "format" : "date-time", + "type" : "string" + } + }, + "required" : [ "effective_from", "free_rows_per_month", "usd_per_row" ], + "title" : "CloudQuery Plugin Price Create" + }, + "VersionFilter" : { + "description" : "A version filter in semantic version format with prefix ranges.", + "pattern" : "^[^~]?v[0-9]+\\.[0-9]+\\.[0-9]+(-[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$", + "type" : "string" + }, + "PluginProtocols" : { + "description" : "The CloudQuery protocols supported by this plugin version (only protocol 3 is supported by new plugins).", + "items" : { + "enum" : [ 3 ], + "type" : "integer" + }, + "type" : "array" + }, + "PluginPackageType" : { + "description" : "The package type of the plugin assets", + "enum" : [ "native", "docker" ], + "type" : "string" + }, + "PluginVersionBase" : { + "additionalProperties" : false, + "description" : "CloudQuery Plugin Version", + "properties" : { + "created_at" : { + "description" : "The date and time the plugin version was created.", + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "published_at" : { + "description" : "The date and time the plugin version was set to non-draft (published).", + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "name" : { + "$ref" : "#/components/schemas/VersionName" + }, + "message" : { + "description" : "Description of what's new or changed in this version (supports markdown)", + "example" : "- Added support for AWS S3 - Added support for AWS EC2", + "type" : "string" + }, + "draft" : { + "description" : "If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version.", + "type" : "boolean" + }, + "retracted" : { + "description" : "If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use.", + "type" : "boolean" + }, + "protocols" : { + "$ref" : "#/components/schemas/PluginProtocols" + }, + "supported_targets" : { + "description" : "The targets supported by this plugin version, formatted as _", + "example" : [ "linux_arm64", "darwin_amd64", "windows_amd64" ], + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "checksums" : { + "description" : "The checksums of the plugin assets", + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "package_type" : { + "$ref" : "#/components/schemas/PluginPackageType" + } + }, + "required" : [ "checksums", "created_at", "draft", "message", "name", "package_type", "protocols", "retracted", "supported_targets" ], + "title" : "CloudQuery Plugin Version" + }, + "PluginVersionList" : { + "allOf" : [ { + "$ref" : "#/components/schemas/PluginVersionBase" + } ] + }, + "PluginSpecJSONSchema" : { + "description" : "The specification of the plugin. This is a JSON schema that describes the configuration of the plugin.", + "type" : "string" + }, + "PluginVersion" : { + "allOf" : [ { + "$ref" : "#/components/schemas/PluginVersionBase" + }, { + "properties" : { + "spec_json_schema" : { + "$ref" : "#/components/schemas/PluginSpecJSONSchema" + }, + "connector_required" : { + "description" : "Whether a connector is required for this plugin version", + "type" : "boolean" + }, + "connector_types" : { + "description" : "List of connector types available for this plugin version", + "items" : { + "type" : "string" + }, + "type" : "array" + } + } + } ] + }, + "PluginVersionDetails" : { + "allOf" : [ { + "$ref" : "#/components/schemas/PluginVersion" + }, { + "properties" : { + "example_config" : { + "description" : "Example configuration for the plugin. This can be used in generated quickstart guides, for example. Markdown format.", + "type" : "string" + }, + "ui_base_url" : { + "description" : "Base URL for the plugin's UI. Only available for plugins with a UI and for logged in users.", + "type" : "string", + "x-go-name" : "UIBaseURL" + }, + "ui_base_url_v2" : { + "description" : "Base URL for the plugin's UI. Only available for plugins with a UI and for logged in users.", + "type" : "string", + "x-go-name" : "UIBaseURLv2" + }, + "ui_id" : { + "description" : "ID of the plugin's UI.", + "format" : "uuid", + "type" : "string", + "x-go-name" : "UIID" + } + }, + "required" : [ "example_config" ] + } ] + }, + "PluginVersionUpdate" : { + "properties" : { + "message" : { + "description" : "Description of what's new or changed in this version (supports markdown)", + "example" : "- Added support for *AWS S3* - Added support for *AWS EC2*", + "type" : "string" + }, + "draft" : { + "description" : "If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version. Once draft is set to false, only certain fields can be updated.", + "type" : "boolean" + }, + "retracted" : { + "description" : "If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use.", + "type" : "boolean" + }, + "protocols" : { + "$ref" : "#/components/schemas/PluginProtocols" + }, + "supported_targets" : { + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "checksums" : { + "description" : "The SHA-256 checksums of the plugin binaries, one per supported target.", + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "package_type" : { + "description" : "The package type of the plugin binaries", + "type" : "string" + }, + "spec_json_schema" : { + "$ref" : "#/components/schemas/PluginSpecJSONSchema" + } + } + }, + "PluginDocsPageName" : { + "description" : "The unique name for the plugin documentation page.", + "example" : "overview", + "maxLength" : 255, + "pattern" : "^[\\w,\\s-]+$", + "type" : "string" + }, + "PluginDocsPage" : { + "additionalProperties" : false, + "description" : "CloudQuery Plugin Documentation Page", + "properties" : { + "name" : { + "$ref" : "#/components/schemas/PluginDocsPageName" + }, + "content" : { + "description" : "The content of the documentation page. Supports markdown.", + "example" : "# Getting Started\n\nThis is the getting started page.", + "type" : "string" + } + }, + "required" : [ "content", "name" ], + "title" : "CloudQuery Plugin Documentation Page" + }, + "PluginDocsPageCreate" : { + "additionalProperties" : false, + "description" : "CloudQuery Plugin Documentation Page", + "properties" : { + "name" : { + "$ref" : "#/components/schemas/PluginDocsPageName" + }, + "content" : { + "description" : "The content of the documentation page. Supports markdown.", + "example" : "# Getting Started\n\nThis is the getting started page.", + "minLength" : 1, + "type" : "string" + } + }, + "required" : [ "content", "name" ], + "title" : "CloudQuery Plugin Documentation Page" + }, + "PluginTableName" : { + "description" : "Name of the table", + "example" : "aws_ec2_instances", + "maxLength" : 255, + "pattern" : "^[a-z](_?[a-z0-9]+)+$", + "type" : "string" + }, + "PluginTable" : { + "additionalProperties" : false, + "description" : "CloudQuery Plugin Table", + "properties" : { + "description" : { + "description" : "Description of the table", + "example" : "AWS S3 Buckets", + "type" : "string" + }, + "is_incremental" : { + "description" : "Whether the table is incremental", + "type" : "boolean" + }, + "name" : { + "$ref" : "#/components/schemas/PluginTableName" + }, + "parent" : { + "description" : "Name of the parent table, if any", + "example" : "nil", + "type" : "string" + }, + "relations" : { + "description" : "Names of the tables that depend on this table", + "example" : [ "aws_s3_bucket_cors_rules" ], + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "title" : { + "description" : "Title of the table", + "example" : "AWS S3 Buckets", + "type" : "string" + }, + "is_paid" : { + "description" : "Whether the table is paid", + "type" : "boolean" + } + }, + "required" : [ "description", "is_incremental", "name", "relations", "title" ], + "title" : "CloudQuery Plugin Table" + }, + "PluginTableColumn" : { + "additionalProperties" : false, + "description" : "CloudQuery Plugin Column", + "properties" : { + "description" : { + "description" : "Description of the column", + "type" : "string" + }, + "incremental_key" : { + "description" : "Whether the column is used as an incremental key", + "type" : "boolean" + }, + "name" : { + "description" : "Name of the column", + "type" : "string" + }, + "not_null" : { + "description" : "Whether the column is nullable", + "type" : "boolean" + }, + "primary_key" : { + "description" : "Whether the column is part of the primary key", + "type" : "boolean" + }, + "type" : { + "description" : "Arrow Type of the column", + "type" : "string" + }, + "type_schema" : { + "description" : "For columns of type JSON, the schema of the JSON object", + "type" : "string" + }, + "unique" : { + "description" : "Whether the column has a unique constraint", + "type" : "boolean" + } + }, + "required" : [ "description", "incremental_key", "name", "not_null", "primary_key", "type", "unique" ], + "title" : "CloudQuery Plugin Table Column" + }, + "PluginTableCreate" : { + "additionalProperties" : false, + "description" : "CloudQuery Plugin Table", + "properties" : { + "description" : { + "description" : "Description of the table", + "example" : "AWS S3 Buckets", + "type" : "string" + }, + "is_incremental" : { + "description" : "Whether the table is incremental", + "type" : "boolean" + }, + "name" : { + "$ref" : "#/components/schemas/PluginTableName" + }, + "parent" : { + "description" : "Name of the parent table, if any", + "example" : "nil", + "type" : "string" + }, + "relations" : { + "description" : "Names of the tables that depend on this table", + "example" : [ "aws_s3_bucket_cors_rules" ], + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "permissions_needed" : { + "description" : "List of permissions needed to access this table, if any", + "example" : [ "storage.buckets.list" ], + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "sensitive_columns" : { + "description" : "List of columns within this table that can contain sensitive/secret data", + "example" : [ "secret_key" ], + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "title" : { + "description" : "Title of the table", + "example" : "AWS S3 Buckets", + "type" : "string" + }, + "is_paid" : { + "description" : "Whether the table is paid", + "type" : "boolean" + }, + "columns" : { + "items" : { + "$ref" : "#/components/schemas/PluginTableColumn" + }, + "type" : "array" + } + }, + "required" : [ "name" ], + "title" : "CloudQuery Plugin Table" + }, + "PluginTableDetails" : { + "additionalProperties" : false, + "properties" : { + "columns" : { + "description" : "List of columns", + "items" : { + "$ref" : "#/components/schemas/PluginTableColumn" + }, + "type" : "array" + }, + "description" : { + "description" : "Description of the table", + "type" : "string" + }, + "is_incremental" : { + "description" : "Whether the table is incremental", + "type" : "boolean" + }, + "name" : { + "description" : "Name of the table", + "type" : "string" + }, + "parent" : { + "description" : "Name of the parent table, if any", + "type" : "string" + }, + "relations" : { + "description" : "Names of the tables that depend on this table", + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "title" : { + "description" : "Title of the table", + "type" : "string" + }, + "is_paid" : { + "description" : "Whether the table is paid", + "type" : "boolean" + }, + "permissions_needed" : { + "description" : "List of permissions needed to access this table, if any", + "example" : [ "storage.buckets.list" ], + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "sensitive_columns" : { + "description" : "List of columns within this table that can contain sensitive/secret data", + "example" : [ "secret_key" ], + "items" : { + "type" : "string" + }, + "type" : "array" + } + }, + "required" : [ "columns", "description", "is_incremental", "name", "permissions_needed", "relations", "title" ] + }, + "PluginAsset" : { + "additionalProperties" : false, + "description" : "CloudQuery Plugin Asset", + "properties" : { + "checksum" : { + "description" : "The checksum of the plugin asset", + "type" : "string" + }, + "location" : { + "description" : "The location to download the plugin asset from", + "format" : "uri", + "type" : "string" + } + }, + "required" : [ "checksum", "location" ], + "title" : "CloudQuery Plugin Asset" + }, + "ReleaseURL" : { + "properties" : { + "url" : { + "type" : "string" + } + }, + "required" : [ "url" ] + }, + "PluginUIAssetUploadRequest" : { + "additionalProperties" : false, + "description" : "CloudQuery Plugin UI Asset Upload Request", + "properties" : { + "name" : { + "description" : "The path and name of the asset", + "example" : "scripts/main.js", + "type" : "string" + }, + "content_type" : { + "description" : "Content-type of the asset", + "example" : "application/json", + "type" : "string" + } + }, + "required" : [ "name" ], + "title" : "CloudQuery Plugin UI Asset Upload Request" + }, + "PluginUIAsset" : { + "additionalProperties" : false, + "description" : "CloudQuery Plugin UI Asset", + "properties" : { + "name" : { + "description" : "The path and name of the asset", + "type" : "string" + }, + "upload_url" : { + "description" : "URL to upload the asset to", + "type" : "string", + "x-go-name" : "UploadURL" + } + }, + "required" : [ "name", "upload_url" ], + "title" : "CloudQuery Plugin UI Asset" + }, + "AddonName" : { + "description" : "The unique name for the addon.", + "example" : "aws-policy", + "maxLength" : 255, + "pattern" : "^[a-z](-?[a-z0-9]+)+$", + "type" : "string" + }, + "AddonCategory" : { + "description" : "Supported categories for addons", + "enum" : [ "cloud-infrastructure", "databases", "sales-marketing", "engineering-analytics", "other" ], + "type" : "string" + }, + "AddonType" : { + "description" : "Supported types for addons", + "enum" : [ "transformation", "visualization" ], + "type" : "string" + }, + "AddonFormat" : { + "description" : "Supported formats for addons", + "enum" : [ "zip" ], + "type" : "string" + }, + "AddonTier" : { + "description" : "Supported tiers for addons", + "enum" : [ "free", "paid" ], + "type" : "string" + }, + "Addon" : { + "additionalProperties" : false, + "description" : "CloudQuery Addon", + "properties" : { + "team_name" : { + "$ref" : "#/components/schemas/TeamName" + }, + "name" : { + "$ref" : "#/components/schemas/AddonName" + }, + "official" : { + "description" : "True if the addon is maintained by CloudQuery, false otherwise", + "type" : "boolean" + }, + "category" : { + "$ref" : "#/components/schemas/AddonCategory" + }, + "addon_type" : { + "$ref" : "#/components/schemas/AddonType" + }, + "addon_format" : { + "$ref" : "#/components/schemas/AddonFormat" + }, + "tier" : { + "$ref" : "#/components/schemas/AddonTier" + }, + "price_usd" : { + "description" : "The price for 6 months", + "example" : "50", + "pattern" : "^\\d+(?:\\.\\d{1,10})?$", + "type" : "string", + "x-go-name" : "PriceUSD" + }, + "short_description" : { + "example" : "AWS Asset inventory dashboard for grafana", + "maxLength" : 512, + "minLength" : 1, + "type" : "string" + }, + "display_name" : { + "description" : "The addon's display name", + "example" : "AWS Asset inventory", + "maxLength" : 50, + "minLength" : 1, + "type" : "string" + }, + "homepage" : { + "example" : "https://cloudquery.io", + "type" : "string" + }, + "repository" : { + "example" : "https://github.com/cloudquery/cloudquery", + "type" : "string" + }, + "logo" : { + "example" : "https://storage.googleapis.com/cq-cloud-images/9ac4cb31-e971-4879-8619-87dc22b0f98e", + "type" : "string" + }, + "public" : { + "description" : "Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team.", + "type" : "boolean" + }, + "created_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "updated_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + } + }, + "required" : [ "addon_format", "addon_type", "category", "created_at", "display_name", "logo", "name", "official", "price_usd", "short_description", "team_name", "tier", "updated_at" ], + "title" : "CloudQuery Addon" + }, + "ListAddon" : { + "allOf" : [ { + "$ref" : "#/components/schemas/Addon" + }, { + "properties" : { + "latest_version" : { + "$ref" : "#/components/schemas/VersionName" + } + } + } ] + }, + "AddonCreate" : { + "additionalProperties" : false, + "description" : "CloudQuery AddonCreate", + "properties" : { + "team_name" : { + "$ref" : "#/components/schemas/TeamName" + }, + "name" : { + "$ref" : "#/components/schemas/AddonName" + }, + "category" : { + "$ref" : "#/components/schemas/AddonCategory" + }, + "addon_type" : { + "$ref" : "#/components/schemas/AddonType" + }, + "addon_format" : { + "$ref" : "#/components/schemas/AddonFormat" + }, + "tier" : { + "$ref" : "#/components/schemas/AddonTier" + }, + "price_usd" : { + "description" : "The price for 6 months", + "example" : "50", + "pattern" : "^\\d+(?:\\.\\d{1,10})?$", + "type" : "string", + "x-go-name" : "PriceUSD" + }, + "short_description" : { + "example" : "AWS Asset inventory dashboard for grafana", + "maxLength" : 512, + "minLength" : 1, + "type" : "string" + }, + "display_name" : { + "description" : "The addon's display name", + "example" : "AWS Asset inventory", + "maxLength" : 50, + "minLength" : 1, + "type" : "string" + }, + "homepage" : { + "example" : "https://cloudquery.io", + "type" : "string" + }, + "repository" : { + "example" : "https://github.com/cloudquery/cloudquery", + "type" : "string" + }, + "logo" : { + "example" : "https://storage.googleapis.com/cq-cloud-images/9ac4cb31-e971-4879-8619-87dc22b0f98e", + "pattern" : "^https:\\/\\/storage\\.googleapis\\.com\\/cq-cloud-images\\/[a-z0-9-]+$", + "type" : "string" + }, + "public" : { + "description" : "Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team.", + "type" : "boolean" + } + }, + "required" : [ "addon_format", "addon_type", "category", "display_name", "name", "public", "short_description", "team_name", "tier" ], + "title" : "CloudQuery Addon" + }, + "AddonUpdate" : { + "additionalProperties" : false, + "description" : "CloudQuery AddonUpdate", + "properties" : { + "category" : { + "$ref" : "#/components/schemas/AddonCategory" + }, + "addon_format" : { + "$ref" : "#/components/schemas/AddonFormat" + }, + "tier" : { + "$ref" : "#/components/schemas/AddonTier" + }, + "price_usd" : { + "description" : "The price for 6 months in USD", + "example" : "50", + "pattern" : "^\\d+(?:\\.\\d{1,10})?$", + "type" : "string", + "x-go-name" : "PriceUSD" + }, + "short_description" : { + "example" : "AWS Asset inventory dashboard for grafana", + "maxLength" : 512, + "minLength" : 1, + "type" : "string" + }, + "display_name" : { + "description" : "The addon's display name", + "example" : "AWS Asset inventory", + "maxLength" : 50, + "minLength" : 1, + "type" : "string" + }, + "homepage" : { + "example" : "https://cloudquery.io", + "type" : "string" + }, + "repository" : { + "example" : "https://github.com/cloudquery/cloudquery", + "type" : "string" + }, + "logo" : { + "example" : "https://storage.googleapis.com/cq-cloud-images/9ac4cb31-e971-4879-8619-87dc22b0f98e", + "pattern" : "^(https:\\/\\/storage\\.googleapis\\.com\\/cq-cloud-images\\/[a-z0-9-]+)?$", + "type" : "string" + }, + "public" : { + "description" : "Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team.", + "type" : "boolean" + }, + "created_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + } + }, + "title" : "CloudQuery Addon" + }, + "AddonVersion" : { + "additionalProperties" : false, + "description" : "CloudQuery Addon Version", + "properties" : { + "created_at" : { + "description" : "The date and time the plugin version was created.", + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "published_at" : { + "description" : "The date and time the plugin version was set to non-draft (published).", + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "name" : { + "$ref" : "#/components/schemas/VersionName" + }, + "message" : { + "description" : "Description of what's new or changed in this version (supports markdown)", + "example" : "- Added support for *AWS S3* - Added support for *AWS EC2*", + "type" : "string" + }, + "doc" : { + "description" : "Main README in MD format", + "type" : "string" + }, + "draft" : { + "description" : "If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version.", + "type" : "boolean" + }, + "plugin_deps" : { + "description" : "list of plugins the addon depends on in the format of team_name/kind/name@version", + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "addon_deps" : { + "description" : "list of other addons this addon depends on in the format of team_name/type/name@version", + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "retracted" : { + "description" : "If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use.", + "type" : "boolean" + }, + "checksum" : { + "description" : "The checksum of the addon asset", + "type" : "string" + } + }, + "required" : [ "checksum", "created_at", "doc", "draft", "message", "name", "retracted" ], + "title" : "CloudQuery Addon Version" + }, + "AddonVersionUpdate" : { + "properties" : { + "message" : { + "description" : "Description of what's new or changed in this version (supports markdown)", + "example" : "- Added support for *AWS S3* - Added support for *AWS EC2*", + "type" : "string" + }, + "doc" : { + "description" : "Main README in MD format", + "type" : "string" + }, + "draft" : { + "description" : "If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version.", + "type" : "boolean" + }, + "plugin_deps" : { + "description" : "list of plugins the addon depends on in the format of team_name/kind/name@version", + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "addon_deps" : { + "description" : "list of other addons this addon depends on in the format of team_name/type/name@version", + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "retracted" : { + "description" : "If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use.", + "type" : "boolean" + }, + "checksum" : { + "description" : "The checksum of the addon asset", + "type" : "string" + } + } + }, + "AddonAsset" : { + "additionalProperties" : false, + "description" : "CloudQuery Addon Asset", + "properties" : { + "checksum" : { + "description" : "The checksum of the addon asset", + "type" : "string" + }, + "location" : { + "description" : "The location to download the addon asset from", + "format" : "uri", + "type" : "string" + } + }, + "required" : [ "checksum", "location" ], + "title" : "CloudQuery Addon Asset" + }, + "TeamPlan" : { + "description" : "The plan the team is on (trial is deprecated)", + "enum" : [ "free", "paid", "enterprise", "trial" ], + "type" : "string" + }, + "Team" : { + "additionalProperties" : false, + "description" : "CloudQuery Team", + "properties" : { + "created_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "name" : { + "$ref" : "#/components/schemas/TeamName" + }, + "plan" : { + "$ref" : "#/components/schemas/TeamPlan" + }, + "plan_end_time" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "is_trial_active" : { + "example" : false, + "type" : "boolean" + }, + "trial_end_time" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "display_name" : { + "description" : "The team's display name", + "example" : "CloudQuery", + "maxLength" : 255, + "type" : "string" + }, + "internal" : { + "example" : false, + "type" : "boolean" + } + }, + "required" : [ "display_name", "internal", "is_trial_active", "name", "plan" ], + "title" : "Team" + }, + "TeamImageCreate" : { + "additionalProperties" : false, + "properties" : { + "name" : { + "description" : "Name of image", + "maxLength" : 64, + "minLength" : 1, + "type" : "string" + }, + "checksum" : { + "description" : "SHA1 checksum of image", + "maxLength" : 40, + "minLength" : 40, + "pattern" : "^[a-f0-9]+$", + "type" : "string" + }, + "content_type" : { + "$ref" : "#/components/schemas/ContentType" + } + }, + "required" : [ "checksum", "content_type", "name" ], + "title" : "Create Team Image Request" + }, + "TeamImage" : { + "properties" : { + "name" : { + "description" : "Name of image", + "type" : "string" + }, + "checksum" : { + "description" : "SHA1 checksum of image", + "type" : "string" + }, + "url" : { + "description" : "URL to download image", + "type" : "string", + "x-go-name" : "URL" + }, + "upload_url" : { + "description" : "URL to upload image", + "type" : "string", + "x-go-name" : "UploadURL" + }, + "required_headers" : { + "additionalProperties" : { + "items" : { + "type" : "string" + } + }, + "description" : "Required HTTP headers to include for the upload" + } + }, + "required" : [ "checksum", "name", "required_headers", "url" ] + }, + "AddonOrderID" : { + "description" : "ID of the addon order", + "example" : "12345678-1234-1234-1234-1234567890ab", + "format" : "uuid", + "type" : "string", + "x-go-name" : "AddonOrderID" + }, + "AddonOrderStatus" : { + "enum" : [ "pending", "completed", "cancelled" ], + "type" : "string" + }, + "AddonOrder" : { + "additionalProperties" : false, + "description" : "CloudQuery Addon Order", + "properties" : { + "id" : { + "$ref" : "#/components/schemas/AddonOrderID" + }, + "team_name" : { + "$ref" : "#/components/schemas/TeamName" + }, + "addon_team" : { + "$ref" : "#/components/schemas/TeamName" + }, + "addon_type" : { + "$ref" : "#/components/schemas/AddonType" + }, + "addon_name" : { + "$ref" : "#/components/schemas/AddonName" + }, + "status" : { + "$ref" : "#/components/schemas/AddonOrderStatus" + }, + "created_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "updated_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "completed_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "completion_url" : { + "description" : "Stripe URL for completing purchase. Only shown in response to POST request.", + "format" : "uri", + "type" : "string", + "x-go-name" : "CompletionURL" + } + }, + "required" : [ "addon_name", "addon_team", "addon_type", "created_at", "id", "status", "team_name", "updated_at" ], + "title" : "CloudQuery Addon" + }, + "AddonOrderCreate" : { + "additionalProperties" : false, + "description" : "Create CloudQuery Addon Order", + "properties" : { + "addon_team" : { + "$ref" : "#/components/schemas/TeamName" + }, + "addon_type" : { + "$ref" : "#/components/schemas/AddonType" + }, + "addon_name" : { + "$ref" : "#/components/schemas/AddonName" + }, + "success_url" : { + "description" : "URL to redirect to after successful order completion", + "example" : "https://cloud.cloudquery.io/order-completion", + "type" : "string" + }, + "cancel_url" : { + "description" : "URL to redirect to after order cancellation", + "example" : "https://cloud.cloudquery.io/order-cancelled", + "type" : "string" + } + }, + "required" : [ "addon_name", "addon_team", "addon_type", "cancel_url", "success_url" ], + "title" : "Create CloudQuery Addon Order" + }, + "UserName" : { + "description" : "The unique name for the user.", + "example" : "Sarah O'Connor", + "maxLength" : 255, + "minLength" : 1, + "pattern" : "^[a-zA-Z\\p{L}][a-zA-Z\\p{L} \\-']*$", + "type" : "string" + }, + "UserOnboarded" : { + "description" : "Whether the user has completed onboarding", + "type" : "boolean" + }, + "User" : { + "additionalProperties" : false, + "description" : "CloudQuery User", + "properties" : { + "created_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "id" : { + "description" : "ID of the User", + "example" : "12345678-1234-1234-1234-1234567890ab", + "format" : "uuid", + "type" : "string", + "x-go-name" : "ID" + }, + "email" : { + "example" : "user@example.com", + "type" : "string" + }, + "name" : { + "$ref" : "#/components/schemas/UserName" + }, + "onboarded" : { + "$ref" : "#/components/schemas/UserOnboarded" + }, + "updated_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "profile_image_url" : { + "description" : "Profile image URL of user", + "type" : "string", + "x-go-name" : "ProfileImageURL" + } + }, + "required" : [ "email", "id" ], + "title" : "CloudQuery User" + }, + "MembershipWithUser" : { + "additionalProperties" : false, + "properties" : { + "role" : { + "example" : "admin", + "type" : "string" + }, + "user" : { + "$ref" : "#/components/schemas/User" + } + }, + "required" : [ "role", "user" ], + "title" : "CloudQuery User Membership" + }, + "Invoice" : { + "additionalProperties" : false, + "description" : "Invoice details", + "properties" : { + "created_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "amount_due" : { + "description" : "Amount due in cents. This is the amount that will be charged, unless there are pending invoice items. If the invoice’s total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the amount_due may be 0. The charge that gets generated for the invoice will be for the amount specified in amount_due.", + "example" : 1000, + "format" : "int64", + "type" : "integer" + }, + "currency" : { + "example" : "usd", + "type" : "string" + }, + "invoice_pdf" : { + "description" : "The link to download the PDF for the invoice.", + "format" : "uri", + "type" : "string", + "x-go-name" : "InvoicePDF" + }, + "paid" : { + "description" : "Whether or not payment was successfully collected for this invoice.", + "example" : true, + "type" : "boolean" + } + }, + "required" : [ "amount_due", "created_at", "currency", "invoice_pdf", "paid" ], + "title" : "Invoice" + }, + "UsageCurrent" : { + "additionalProperties" : false, + "description" : "The usage of a plugin within the current calendar month.", + "properties" : { + "plugin_team" : { + "$ref" : "#/components/schemas/TeamName" + }, + "plugin_kind" : { + "$ref" : "#/components/schemas/PluginKind" + }, + "plugin_name" : { + "$ref" : "#/components/schemas/PluginName" + }, + "rows" : { + "description" : "The number of rows used by the plugin in the calendar month.", + "example" : 1000000, + "format" : "int64", + "minimum" : 0, + "type" : "integer" + }, + "usd" : { + "deprecated" : true, + "description" : "The USD amount used by the plugin in the calendar month, rounded to two decimal places.", + "example" : "43.95", + "type" : "string", + "x-go-name" : "USD" + }, + "remaining_usd" : { + "deprecated" : true, + "description" : "The remaining USD amount in the plugin's quota for the calendar month.", + "example" : "56.05", + "type" : "string", + "x-go-name" : "RemainingUSD" + }, + "remaining_rows" : { + "deprecated" : true, + "description" : "Deprecated - this field used to contain the estimated remaining rows but now returns 1 to indicate rows are remaining or 0 if there are no more remaining rows.", + "example" : 1, + "format" : "int64", + "minimum" : 0, + "type" : "integer" + } + }, + "required" : [ "plugin_kind", "plugin_name", "plugin_team", "rows", "usd" ], + "title" : "CloudQuery Plugin Usage" + }, + "UsageIncrease" : { + "additionalProperties" : false, + "description" : "Increase the usage of a plugin. This can incur billing costs and should be used only by plugins.", + "properties" : { + "plugin_team" : { + "$ref" : "#/components/schemas/TeamName" + }, + "plugin_kind" : { + "$ref" : "#/components/schemas/PluginKind" + }, + "plugin_name" : { + "$ref" : "#/components/schemas/PluginName" + }, + "tables" : { + "items" : { + "$ref" : "#/components/schemas/UsageIncrease_tables_inner" + }, + "type" : "array" + }, + "rows" : { + "description" : "The total number of additional rows used by the plugin.", + "example" : 1000000, + "minimum" : 0, + "type" : "integer" + }, + "request_id" : { + "description" : "A unique ID associated with the usage increase.", + "example" : "123e4567-e89b-12d3-a456-426614174000", + "format" : "uuid", + "type" : "string" + }, + "installation_id" : { + "description" : "Installation ID associated with the platform, for platform syncs.", + "pattern" : "^[a-z0-9]{64}$", + "type" : "string", + "x-go-name" : "InstallationID" + } + }, + "required" : [ "plugin_kind", "plugin_name", "plugin_team", "request_id", "rows" ], + "title" : "CloudQuery Plugin Usage Increase" + }, + "UsageSummaryGroup" : { + "description" : "A usage summary group.", + "properties" : { + "name" : { + "description" : "The name of the group.", + "example" : "plugin", + "type" : "string" + }, + "value" : { + "description" : "The value of the group at this index.", + "example" : "cloudquery/source/aws", + "type" : "string" + } + }, + "required" : [ "name", "value" ], + "title" : "CloudQuery Usage Summary Group" + }, + "UsageSummaryValue" : { + "description" : "A usage summary value.", + "properties" : { + "timestamp" : { + "description" : "The timestamp marking the start of a period.", + "format" : "date-time", + "type" : "string" + }, + "paid_rows" : { + "description" : "The paid rows that were synced in this period, one per group.", + "items" : { + "format" : "int64", + "type" : "integer" + }, + "type" : "array" + }, + "cloud_vcpu_seconds" : { + "description" : "vCPU/seconds consumed in this period, one per group.", + "items" : { + "format" : "int64", + "type" : "integer" + }, + "type" : "array" + }, + "cloud_vram_byte_seconds" : { + "description" : "vRAM/byte-seconds consumed in this period, one per group.", + "items" : { + "format" : "int64", + "type" : "integer" + }, + "type" : "array" + }, + "cloud_egress_bytes" : { + "description" : "Egress bytes consumed in this period, one per group.", + "items" : { + "format" : "int64", + "type" : "integer" + }, + "type" : "array" + } + }, + "required" : [ "timestamp" ], + "title" : "CloudQuery Usage Summary Value" + }, + "UsageSummary" : { + "additionalProperties" : { }, + "description" : "A usage summary for a team, summarizing the paid rows synced and/or cloud resource usage over a given time range.\nNote that empty or all-zero values are not included in the response.\n", + "properties" : { + "groups" : { + "description" : "The groups of the usage summary. Every group will have a corresponding value at the same index in the values array.", + "example" : [ { + "name" : "plugin", + "value" : "cloudquery/source/aws" + }, { + "name" : "plugin", + "value" : "cloudquery/source/gcp" + } ], + "items" : { + "$ref" : "#/components/schemas/UsageSummaryGroup" + } + }, + "values" : { + "example" : [ { + "timestamp" : "2021-01-01T00:00:00Z", + "paid_rows" : [ 100, 200 ] + }, { + "timestamp" : "2021-01-02T00:00:00Z", + "paid_rows" : [ 150, 300 ] + } ], + "items" : { + "$ref" : "#/components/schemas/UsageSummaryValue" + } + }, + "metadata" : { + "$ref" : "#/components/schemas/UsageSummary_metadata" + } + }, + "required" : [ "groups", "metadata", "values" ], + "title" : "CloudQuery Usage Summary" + }, + "Email" : { + "example" : "user@example.com", + "format" : "email", + "type" : "string" + }, + "Invitation" : { + "additionalProperties" : false, + "properties" : { + "team_name" : { + "$ref" : "#/components/schemas/TeamName" + }, + "email" : { + "$ref" : "#/components/schemas/Email" + }, + "role" : { + "example" : "admin", + "type" : "string" + }, + "created_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + } + }, + "required" : [ "created_at", "email", "role", "team_name" ] + }, + "MembershipWithTeam" : { + "additionalProperties" : false, + "properties" : { + "role" : { + "example" : "admin", + "type" : "string" + }, + "team" : { + "$ref" : "#/components/schemas/Team" + } + }, + "required" : [ "role", "team" ], + "title" : "CloudQuery Team Membership" + }, + "TeamSubscriptionOrderID" : { + "description" : "ID of the team subscription order", + "example" : "12345678-1234-1234-1234-1234567890ab", + "format" : "uuid", + "type" : "string", + "x-go-name" : "TeamSubscriptionOrderID" + }, + "TeamSubscriptionOrderStatus" : { + "enum" : [ "pending", "completed", "cancelled" ], + "type" : "string" + }, + "TeamSubscriptionOrder" : { + "additionalProperties" : false, + "description" : "Team subscription order", + "properties" : { + "id" : { + "$ref" : "#/components/schemas/TeamSubscriptionOrderID" + }, + "team_name" : { + "$ref" : "#/components/schemas/TeamName" + }, + "plan" : { + "$ref" : "#/components/schemas/TeamPlan" + }, + "status" : { + "$ref" : "#/components/schemas/TeamSubscriptionOrderStatus" + }, + "created_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "updated_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "completed_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "completion_url" : { + "description" : "Stripe URL for completing purchase. Only shown in response to POST request when a paid plan is selected.", + "format" : "uri", + "type" : "string", + "x-go-name" : "CompletionURL" + } + }, + "required" : [ "created_at", "id", "plan", "status", "team_name", "updated_at" ], + "title" : "Team subscription order" + }, + "TeamSubscriptionOrderCreate" : { + "additionalProperties" : false, + "description" : "Create team subscription order", + "properties" : { + "plan" : { + "$ref" : "#/components/schemas/TeamPlan" + }, + "success_url" : { + "description" : "URL to redirect to after successful order completion", + "example" : "https://cloud.cloudquery.io/order-completion", + "type" : "string" + }, + "cancel_url" : { + "description" : "URL to redirect to after order cancellation", + "example" : "https://cloud.cloudquery.io/order-cancelled", + "type" : "string" + } + }, + "required" : [ "cancel_url", "plan", "success_url" ], + "title" : "Create team subscription order" + }, + "Settings" : { + "description" : "Platform settings definition", + "properties" : { + "enforce_mfa" : { + "default" : false, + "description" : "Whether or not to require MFA for all users", + "type" : "boolean" + } + }, + "required" : [ "enforce_mfa" ] + }, + "SettingsUpdate" : { + "description" : "Platform settings partial update", + "properties" : { + "enforce_mfa" : { + "default" : false, + "description" : "Whether or not to require MFA for all users", + "type" : "boolean" + } + } + }, + "InvitationWithToken" : { + "additionalProperties" : false, + "allOf" : [ { + "$ref" : "#/components/schemas/Invitation" + }, { + "properties" : { + "token" : { + "description" : "The token used to accept the invitation", + "format" : "uuid", + "type" : "string" + } + }, + "required" : [ "token" ] + } ] + }, + "TenantUser" : { + "additionalProperties" : false, + "description" : "Tenant information of a platform user", + "properties" : { + "tenant_url" : { + "description" : "URL of the tenant", + "format" : "url", + "type" : "string", + "x-go-name" : "TenantURL" + }, + "provider" : { + "description" : "Login provider of the tenant", + "type" : "string" + } + }, + "required" : [ "tenant_url" ] + }, + "UserID" : { + "description" : "ID of the User", + "example" : "12345678-1234-1234-1234-1234567890ab", + "format" : "uuid", + "type" : "string", + "x-go-name" : "UserID" + }, + "APIKeyName" : { + "description" : "Name of the API key", + "example" : "cli-api-key", + "maxLength" : 255, + "minLength" : 1, + "pattern" : "^(?:[a-zA-Z0-9][a-zA-Z0-9- ]*)?[a-zA-Z0-9]$", + "type" : "string" + }, + "APIKeyID" : { + "description" : "ID of the API key", + "example" : "12345678-1234-1234-1234-1234567890ab", + "format" : "uuid", + "type" : "string", + "x-go-name" : "APIKeyID" + }, + "APIKeyScope" : { + "description" : "Scope of permissions for the API key. API keys are used for creating new plugin versions and downloading existing plugins", + "enum" : [ "read-and-write", "syncs-operations-only" ], + "type" : "string" + }, + "APIKey" : { + "description" : "API Key to interact with CloudQuery Cloud under specific team", + "properties" : { + "name" : { + "$ref" : "#/components/schemas/APIKeyName" + }, + "created_by" : { + "description" : "email of the user that created the API key", + "example" : "user@example.com", + "type" : "string" + }, + "id" : { + "$ref" : "#/components/schemas/APIKeyID" + }, + "key" : { + "description" : "API key. Will be shown only in the response when creating the key.", + "example" : "1234567890abcdef1234567890abcdef", + "type" : "string" + }, + "created_at" : { + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "expires_at" : { + "description" : "Timestamp at which API key will stop working", + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "last_access_at" : { + "description" : "Timestamp at which API key was last used - accurate to the day only.", + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "expired" : { + "description" : "Whether the API key has expired or not", + "example" : false, + "type" : "boolean" + }, + "scope" : { + "$ref" : "#/components/schemas/APIKeyScope" + } + }, + "required" : [ "expired", "expires_at", "id", "name", "scope" ] + }, + "RegistryAuthToken" : { + "additionalProperties" : false, + "description" : "JWT token for the image registry", + "properties" : { + "access_token" : { + "type" : "string" + }, + "token" : { + "type" : "string" + } + }, + "required" : [ "access_token", "token" ] + }, + "DockerError" : { + "additionalProperties" : false, + "description" : "Error Returned from the Docker Authorization Handler to the Docker Registry", + "properties" : { + "details" : { + "type" : "string" + } + }, + "required" : [ "details" ], + "title" : "Docker Error" + }, + "ManagedDatabaseID" : { + "description" : "The identifier for the managed database", + "example" : "12345678-1234-1234-1234-1234567890ab", + "format" : "uuid", + "type" : "string", + "x-go-name" : "ManagedDatabaseID" + }, + "ManagedDatabaseStatus" : { + "description" : "The status of the managed database", + "enum" : [ "pending", "ready", "failed", "expired" ], + "type" : "string" + }, + "ManagedDatabase" : { + "description" : "Managed Database definition", + "properties" : { + "created_at" : { + "description" : "Time the managed database was created", + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "connection_string" : { + "description" : "The connection string to the database", + "type" : "string" + }, + "expiration" : { + "description" : "Time the managed database should expire", + "example" : "2017-07-14T16:53:42Z", + "format" : "date-time", + "type" : "string" + }, + "id" : { + "$ref" : "#/components/schemas/ManagedDatabaseID" + }, + "status" : { + "$ref" : "#/components/schemas/ManagedDatabaseStatus" + } + }, + "required" : [ "created_at", "id", "status" ] + }, + "ManagedDatabaseCreate" : { + "description" : "Managed Database creation", + "type" : "object" + }, + "FunctionCallOutput" : { + "additionalProperties" : { }, + "properties" : { + "name" : { + "description" : "The name of the function that was called", + "x-go-name" : "Name" + }, + "arguments" : { + "additionalProperties" : false, + "description" : "The arguments passed to the function", + "x-go-name" : "Arguments" + }, + "call_id" : { + "description" : "The unique identifier for this function call", + "x-go-name" : "CallID" + }, + "output" : { + "description" : "The output/result from the function call", + "x-go-name" : "Output" + } + }, + "required" : [ "arguments", "call_id", "name", "output" ] + }, + "UploadImage_request" : { + "properties" : { + "content_type" : { + "$ref" : "#/components/schemas/ContentType" + } + }, + "required" : [ "content_type" ] + }, + "ListPluginNotificationRequests_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/PluginNotificationRequest" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" } - } + }, + "required" : [ "items", "metadata" ] }, - "PluginCreate": { - "type": "object", - "required": [ - "team_name", - "name", - "category", - "tier", - "display_name", - "short_description", - "source", - "destination", - "logo" - ], - "properties": { - "team_name": { - "$ref": "#/components/schemas/TeamName" - }, - "name": { - "$ref": "#/components/schemas/PluginName" - }, - "category": { - "$ref": "#/components/schemas/PluginCategory" - }, - "tier": { - "$ref": "#/components/schemas/PluginTier" - }, - "display_name": { - "type": "string", - "description": "The plugin's display name, as shown in the CloudQuery Hub.", - "example": "AWS Source Plugin" - }, - "short_description": { - "type": "string", - "description": "Short description of the plugin. This will be shown in the CloudQuery Hub.", - "example": "Sync data from AWS to any destination" - }, - "homepage": { - "type": "string", - "example": "https://cloudquery.io" - }, - "repository": { - "type": "string", - "example": "https://github.com/cloudquery/cloudquery" - }, - "source": { - "type": "boolean" - }, - "destination": { - "type": "boolean" - }, - "logo": { - "type": "string", - "description": "URL to the plugin's logo. This will be shown in the CloudQuery Hub. This must point to https://images.cloudquery.io/...", - "example": "https://images.cloudquery.io/logos/aws.png" + "ListPlugins_200_response" : { + "properties" : { + "items" : { + "example" : [ { + "name" : "aws", + "kind" : "source", + "team_name" : "cloudquery", + "display_name" : "AWS Source Plugin", + "category" : "cloud-infrastructure", + "created_at" : "2017-07-14T16:53:42Z", + "updated_at" : "2017-07-14T16:53:42Z", + "homepage" : "https://cloudquery.io", + "logo" : "https://storage.googleapis.com/cq-cloud-images/9ac4cb31-e971-4879-8619-87dc22b0f98e", + "official" : true, + "short_description" : "Sync data from AWS to any destination", + "repository" : "https://github.com/cloudquery/cloudquery", + "tier" : "paid", + "usd_per_row" : "0.00123", + "free_rows_per_month" : 10000, + "release_stage" : "preview" + } ], + "items" : { + "$ref" : "#/components/schemas/ListPlugin" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" } - } + }, + "required" : [ "items", "metadata" ] + }, + "ListPluginUpcomingPriceChanges_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/PluginPrice" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" + } + }, + "required" : [ "items", "metadata" ] + }, + "ListPluginVersions_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/PluginVersionList" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" + } + }, + "required" : [ "items", "metadata" ] + }, + "CreatePluginVersion_request" : { + "properties" : { + "message" : { + "description" : "A message describing what's new or changed in this version.\nThis message will be displayed to users in the plugin's changelog.\nSupports limited markdown syntax.\n", + "maxLength" : 30000, + "minLength" : 1, + "type" : "string" + }, + "protocols" : { + "$ref" : "#/components/schemas/PluginProtocols" + }, + "supported_targets" : { + "description" : "The targets supported by this plugin version, formatted as _", + "example" : [ "linux_arm64", "darwin_amd64", "windows_amd64" ], + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "checksums" : { + "description" : "List of SHA-256 checksums for this plugin version, one for each supported target.", + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "package_type" : { + "$ref" : "#/components/schemas/PluginPackageType" + }, + "spec_json_schema" : { + "$ref" : "#/components/schemas/PluginSpecJSONSchema" + } + }, + "required" : [ "checksums", "message", "package_type", "protocols", "supported_targets" ] + }, + "ListPluginVersionDocs_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/PluginDocsPage" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" + } + }, + "required" : [ "items", "metadata" ] + }, + "CreatePluginVersionDocs_request" : { + "properties" : { + "pages" : { + "items" : { + "$ref" : "#/components/schemas/PluginDocsPageCreate" + }, + "type" : "array" + } + }, + "required" : [ "pages" ] }, - "ValidationError": { - "additionalProperties": false, - "required": [ - "message", - "status" - ], - "properties": { - "message": { - "type": "string" - }, - "status": { - "type": "integer" - }, - "errors": { - "items": { - "type": "string" - }, - "type": "array" - }, - "field_errors": { - "additionalProperties": { - "type": "string" - }, - "type": "object" - } - }, - "type": "object" - }, - "PluginUpdate": { - "type": "object", - "required": [ - "category", - "tier", - "display_name", - "short_description", - "source", - "destination", - "logo" - ], - "properties": { - "category": { - "$ref": "#/components/schemas/PluginCategory" - }, - "tier": { - "$ref": "#/components/schemas/PluginTier" - }, - "display_name": { - "type": "string", - "description": "The plugin's display name, as shown in the CloudQuery Hub.", - "example": "AWS Source Plugin" - }, - "short_description": { - "type": "string", - "description": "Short description of the plugin. This will be shown in the CloudQuery Hub.", - "example": "Sync data from AWS to any destination" - }, - "homepage": { - "type": "string", - "example": "https://cloudquery.io" - }, - "repository": { - "type": "string", - "example": "https://github.com/cloudquery/cloudquery" - }, - "source": { - "type": "boolean" - }, - "destination": { - "type": "boolean" - }, - "logo": { - "type": "string", - "description": "URL to the plugin's logo. This will be shown in the CloudQuery Hub. This must point to https://images.cloudquery.io/...", - "example": "https://images.cloudquery.io/logos/aws.png" - }, - "listed": { - "type": "boolean", - "description": "If plugin is not listed, it won't be visible or accessible in the registry." + "CreatePluginVersionDocs_201_response" : { + "properties" : { + "names" : { + "items" : { + "$ref" : "#/components/schemas/PluginDocsPageName" + }, + "type" : "array" } } }, - "VersionName": { - "type": "string", - "description": "The version in semantic version format.", - "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+(-[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$" - }, - "PluginVersion": { - "additionalProperties": false, - "description": "CloudQuery Plugin Version", - "required": [ - "created_at", - "name", - "message", - "draft", - "retracted", - "protocols", - "supported_targets", - "checksums", - "package_type" - ], - "properties": { - "created_at": { - "example": "2017-07-14T16:53:42Z", - "format": "date-time", - "type": "string", - "description": "The date and time the plugin version was created." - }, - "name": { - "$ref": "#/components/schemas/VersionName" - }, - "message": { - "type": "string", - "description": "Description of what's new or changed in this version (supports markdown)", - "example": "- Added support for AWS S3 - Added support for AWS EC2" - }, - "draft": { - "type": "boolean", - "description": "If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version." - }, - "retracted": { - "type": "boolean", - "description": "If a plugin version is retracted, assets will not be available and it will not be counted as the latest version." - }, - "protocols": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "The CloudQuery protocols supported by this plugin version", - "example": [ - 1, - 2 - ] - }, - "supported_targets": { - "type": "array", - "description": "The targets supported by this plugin version, formatted as _", - "example": [ - "linux_arm64", - "darwin_amd64", - "windows_amd64" - ], - "items": { - "type": "string" - } - }, - "checksums": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The checksums of the plugin assets" - }, - "package_type": { - "type": "string", - "description": "The package type of the plugin assets", - "enum": [ - "native", - "docker" - ] - } - }, - "title": "CloudQuery Plugin Version", - "type": "object" - }, - "PluginVersionUpdate": { - "type": "object", - "properties": { - "message": { - "type": "string", - "description": "Description of what's new or changed in this version (supports markdown)", - "example": "- Added support for *AWS S3* - Added support for *AWS EC2*" - }, - "draft": { - "type": "boolean", - "description": "If a plugin version is in draft, it will not show to members outside the team or be counted as the latest version. Once draft is set to false, only certain fields can be updated." - }, - "retracted": { - "type": "boolean", - "description": "If a plugin version is retracted, assets will not be available and it will not be counted as the latest version." - }, - "protocols": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "The supported CloudQuery protocols by this plugin version", - "example": [ - 1, - 2 - ] - }, - "supported_targets": { - "type": "array", - "items": { - "type": "string" - } - }, - "checksums": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The SHA-256 checksums of the plugin binaries, one per supported target." - }, - "package_type": { - "type": "string", - "description": "The package type of the plugin binaries" + "DeletePluginVersionDocs_request" : { + "properties" : { + "names" : { + "items" : { + "$ref" : "#/components/schemas/PluginDocsPageName" + }, + "type" : "array" + } + }, + "required" : [ "names" ] + }, + "ListPluginVersionTables_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/PluginTable" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" + } + }, + "required" : [ "items", "metadata" ] + }, + "CreatePluginVersionTables_request" : { + "properties" : { + "tables" : { + "items" : { + "$ref" : "#/components/schemas/PluginTableCreate" + }, + "type" : "array" + } + }, + "required" : [ "tables" ] + }, + "CreatePluginVersionTables_201_response" : { + "properties" : { + "names" : { + "items" : { + "$ref" : "#/components/schemas/PluginTableName" + }, + "type" : "array" } } }, - "PluginDocsPageName": { - "description": "The unique name for the plugin documentation page.", - "maxLength": 255, - "pattern": "^[a-z](-?[a-z0-9]+)+$", - "type": "string", - "example": "overview" - }, - "PluginDocsPage": { - "additionalProperties": false, - "description": "CloudQuery Plugin Documentation Page", - "required": [ - "name", - "title", - "content" - ], - "properties": { - "name": { - "$ref": "#/components/schemas/PluginDocsPageName" - }, - "title": { - "type": "string", - "description": "The title of the documentation page", - "example": "Getting Started" - }, - "content": { - "type": "string", - "description": "The content of the documentation page. Supports markdown.", - "example": "# Getting Started\n\nThis is the getting started page." - } - }, - "title": "CloudQuery Plugin Documentation Page", - "type": "object" - }, - "PluginTableName": { - "description": "Name of the table", - "maxLength": 255, - "pattern": "^[a-z](_?[a-z0-9]+)+$", - "type": "string", - "example": "aws_ec2_instances" - }, - "PluginTable": { - "additionalProperties": false, - "description": "CloudQuery Plugin Table", - "properties": { - "description": { - "description": "Description of the table", - "type": "string", - "example": "AWS S3 Buckets" - }, - "is_incremental": { - "description": "Whether the table is incremental", - "type": "boolean" - }, - "name": { - "$ref": "#/components/schemas/PluginTableName" - }, - "parent": { - "description": "Name of the parent table, if any", - "type": "string", - "example": "nil" - }, - "relations": { - "description": "Names of the tables that depend on this table", - "items": { - "type": "string" - }, - "type": "array", - "example": [ - "aws_s3_bucket_cors_rules" - ] - }, - "title": { - "description": "Title of the table", - "type": "string", - "example": "AWS S3 Buckets" - } - }, - "title": "CloudQuery Plugin Table", - "type": "object" - }, - "PluginTableColumn": { - "additionalProperties": false, - "description": "CloudQuery Plugin Column", - "properties": { - "description": { - "description": "Description of the column", - "type": "string" - }, - "incremental_key": { - "description": "Whether the column is used as an incremental key", - "type": "boolean" - }, - "name": { - "description": "Name of the column", - "type": "string" - }, - "not_null": { - "description": "Whether the column is nullable", - "type": "boolean" - }, - "primary_key": { - "description": "Whether the column is part of the primary key", - "type": "boolean" - }, - "type": { - "description": "Arrow Type of the column", - "type": "string" - }, - "is_unique": { - "description": "Whether the column has a unique constraint", - "type": "boolean" - } - }, - "title": "CloudQuery Plugin Table Column", - "type": "object" + "DeletePluginVersionTables_request" : { + "properties" : { + "names" : { + "items" : { + "$ref" : "#/components/schemas/PluginTableName" + }, + "type" : "array" + } + }, + "required" : [ "names" ] + }, + "FinalizePluginUIAssetUpload_request" : { + "properties" : { + "ui_id" : { + "description" : "ID representing the finished upload", + "type" : "string", + "x-go-name" : "UIID" + } + }, + "required" : [ "ui_id" ] + }, + "UploadPluginUIAssets_request" : { + "properties" : { + "assets" : { + "items" : { + "$ref" : "#/components/schemas/PluginUIAssetUploadRequest" + }, + "type" : "array" + } + }, + "required" : [ "assets" ] + }, + "UploadPluginUIAssets_201_response" : { + "properties" : { + "ui_id" : { + "description" : "ID representing this upload", + "type" : "string", + "x-go-name" : "UIID" + }, + "assets" : { + "items" : { + "$ref" : "#/components/schemas/PluginUIAsset" + }, + "type" : "array" + } + }, + "required" : [ "assets", "ui_id" ] }, - "PluginTableDetails": { - "additionalProperties": false, - "properties": { - "columns": { - "description": "List of columns", - "items": { - "$ref": "#/components/schemas/PluginTableColumn" + "ListAddons_200_response" : { + "properties" : { + "items" : { + "example" : [ { + "name" : "aws-policies", + "team_name" : "cloudquery", + "display_name" : "AWS Policies", + "category" : "cloud-infrastructure", + "created_at" : "2017-07-14T16:53:42Z", + "updated_at" : "2017-07-14T16:53:42Z", + "homepage" : "https://cloudquery.io", + "logo" : "https://storage.googleapis.com/cq-cloud-images/9ac4cb31-e971-4879-8619-87dc22b0f98e", + "official" : true, + "short_description" : "Sync data from AWS to any destination", + "repository" : "https://github.com/cloudquery/cloudquery", + "tier" : "free", + "price_usd" : "50", + "addon_type" : "visualization", + "addon_format" : "zip" + } ], + "items" : { + "$ref" : "#/components/schemas/ListAddon" }, - "type": "array" + "type" : "array" }, - "description": { - "description": "Description of the table", - "type": "string" + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" + } + }, + "required" : [ "items", "metadata" ] + }, + "ListAddonVersions_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/AddonVersion" + }, + "type" : "array" }, - "is_incremental": { - "description": "Whether the table is incremental", - "type": "boolean" - }, - "name": { - "description": "Name of the table", - "type": "string" + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" + } + }, + "required" : [ "items", "metadata" ] + }, + "CreateAddonVersion_request" : { + "properties" : { + "message" : { + "description" : "A message describing what's new or changed in this version.\nThis message will be displayed to users in the addon's changelog.\nSupports limited markdown syntax.\n", + "maxLength" : 30000, + "minLength" : 1, + "type" : "string" + }, + "doc" : { + "description" : "Main README in MD format", + "type" : "string" + }, + "plugin_deps" : { + "description" : "plugin dependencies in the format of ['team_name/kind/plugin_name@version']", + "items" : { + "type" : "string" + }, + "type" : "array" }, - "parent": { - "description": "Name of the parent table, if any", - "type": "string" + "addon_deps" : { + "description" : "addon dependencies in the format of ['team_name/type/addon_name@version']", + "items" : { + "type" : "string" + }, + "type" : "array" }, - "relations": { - "description": "Names of the tables that depend on this table", - "items": { - "type": "string" + "checksum" : { + "description" : "SHA-256 checksum for the addon asset", + "type" : "string" + } + }, + "required" : [ "checksum", "doc", "message" ] + }, + "ListTeams_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/Team" }, - "type": "array" + "type" : "array" }, - "title": { - "description": "Title of the table", - "type": "string" + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" } }, - "type": "object" + "required" : [ "items", "metadata" ] }, - "ReleaseURL": { - "properties": { - "url": { - "type": "string" + "CreateTeam_request" : { + "additionalProperties" : { }, + "properties" : { + "name" : { + "$ref" : "#/components/schemas/TeamName" + }, + "display_name" : { + "description" : "The team's display name", + "maxLength" : 255, + "minLength" : 1 } - } + }, + "required" : [ "display_name", "name" ] }, - "Team": { - "additionalProperties": false, - "description": "CloudQuery Team", - "properties": { - "created_at": { - "example": "2017-07-14T16:53:42Z", - "format": "date-time", - "type": "string" - }, - "name": { - "$ref": "#/components/schemas/TeamName" - }, - "display_name": { - "description": "The team's display name", - "maxLength": 255, - "type": "string", - "example": "CloudQuery" - } - }, - "required": [ - "name", - "display_name" - ], - "title": "Team", - "type": "object" - }, - "Email": { - "type": "string", - "example": "user@cloudquery.io" - }, - "UserName": { - "description": "The unique name for the user.", - "maxLength": 255, - "pattern": "^[a-z](-?[a-z0-9]+)+$", - "type": "string", - "example": "user" - }, - "User": { - "additionalProperties": false, - "description": "CloudQuery User", - "properties": { - "created_at": { - "example": "2017-07-14T16:53:42Z", - "format": "date-time", - "type": "string" - }, - "email": { - "$ref": "#/components/schemas/Email" - }, - "name": { - "$ref": "#/components/schemas/UserName" - }, - "updated_at": { - "example": "2017-07-14T16:53:42Z", - "format": "date-time", - "type": "string" - } - }, - "required": [ - "email" - ], - "title": "CloudQuery User", - "type": "object" - }, - "Membership": { - "additionalProperties": false, - "properties": { - "role": { - "type": "string", - "example": "admin" - }, - "team": { - "$ref": "#/components/schemas/Team" - }, - "user": { - "$ref": "#/components/schemas/User" - } - }, - "required": [ - "role" - ], - "title": "CloudQuery Team Membership", - "type": "object" - }, - "Invitation": { - "additionalProperties": false, - "required": [ - "role", - "email", - "team_name", - "created_at" - ], - "properties": { - "team_name": { - "$ref": "#/components/schemas/TeamName" - }, - "email": { - "$ref": "#/components/schemas/Email" - }, - "role": { - "type": "string", - "example": "admin" - }, - "created_at": { - "example": "2017-07-14T16:53:42Z", - "format": "date-time", - "type": "string" + "UpdateTeam_request" : { + "additionalProperties" : { }, + "properties" : { + "display_name" : { + "description" : "The team's display name" } } }, - "ApiKey": { - "description": "API Key to interact with CloudQuery Cloud under specific team", - "type": "object", - "properties": { - "name": { - "type": "string", - "example": "cli-api-key" + "CreateTeamImages_request" : { + "properties" : { + "images" : { + "items" : { + "$ref" : "#/components/schemas/TeamImageCreate" + }, + "minItems" : 1, + "type" : "array" + } + }, + "required" : [ "images" ] + }, + "CreateTeamImages_201_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/TeamImage" + }, + "type" : "array" }, - "created_by": { - "$ref": "#/components/schemas/Email", - "description": "email of the user that created the API key" + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" + } + }, + "required" : [ "items", "metadata" ] + }, + "ListPluginsByTeam_200_response" : { + "properties" : { + "items" : { + "example" : [ { + "name" : "aws-source", + "kind" : "source", + "team_name" : "cloudquery", + "display_name" : "AWS Source Plugin", + "category" : "cloud-infrastructure", + "created_at" : "2017-07-14T16:53:42Z", + "updated_at" : "2017-07-14T16:53:42Z", + "homepage" : "https://cloudquery.io", + "logo" : "https://storage.googleapis.com/cq-cloud-images/9ac4cb31-e971-4879-8619-87dc22b0f98e", + "official" : true, + "short_description" : "Sync data from AWS to any destination", + "repository" : "https://github.com/cloudquery/cloudquery", + "tier" : "paid", + "usd_per_row" : "0.00123", + "free_rows_per_month" : 10000, + "release_stage" : "preview" + } ], + "items" : { + "$ref" : "#/components/schemas/Plugin" + }, + "type" : "array" }, - "key": { - "type": "string", - "description": "API key. Will be shown only in the response when creating the key.", - "example": "1234567890abcdef1234567890abcdef" + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" + } + }, + "required" : [ "items", "metadata" ] + }, + "ListAddonsByTeam_200_response" : { + "properties" : { + "items" : { + "example" : [ { + "name" : "aws-policies", + "team_name" : "cloudquery", + "display_name" : "AWS Policies", + "category" : "cloud-infrastructure", + "created_at" : "2017-07-14T16:53:42Z", + "updated_at" : "2017-07-14T16:53:42Z", + "homepage" : "https://cloudquery.io", + "logo" : "https://storage.googleapis.com/cq-cloud-images/9ac4cb31-e971-4879-8619-87dc22b0f98e", + "official" : true, + "short_description" : "AWS policies", + "repository" : "https://github.com/cloudquery/cloudquery", + "tier" : "paid", + "price_usd" : "50", + "addon_type" : "visualization", + "addon_format" : "zip" + } ], + "items" : { + "$ref" : "#/components/schemas/Addon" + }, + "type" : "array" }, - "created_at": { - "type": "string", - "format": "date-time", - "example": "2017-07-14T16:53:42Z" + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" } - } - } - }, - "responses": { - "InternalError": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BasicError" - } + }, + "required" : [ "items", "metadata" ] + }, + "ListAddonOrdersByTeam_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/AddonOrder" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" } }, - "description": "Internal Error" + "required" : [ "items", "metadata" ] }, - "RequiresAuthentication": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BasicError" - } + "GetTeamMemberships_200_response" : { + "properties" : { + "items" : { + "example" : [ { + "role" : "admin", + "user" : { + "created_at" : "2017-07-14T16:53:42Z", + "email" : "user@example.com", + "id" : "12345678-1234-1234-1234-1234567890ab", + "name" : "Sarah O'Connor", + "updated_at" : "2017-07-14T16:53:42Z" + } + } ], + "items" : { + "$ref" : "#/components/schemas/MembershipWithUser" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" } }, - "description": "Requires authentication" + "required" : [ "items", "metadata" ] }, - "Forbidden": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BasicError" - } + "RemoveTeamMembership_request" : { + "properties" : { + "email" : { + "type" : "string" } }, - "description": "Forbidden" + "required" : [ "email" ] }, - "UnprocessableEntity": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationError" - } + "ListInvoicesByTeam_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/Invoice" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" } }, - "description": "Unprocessable Entity" + "required" : [ "items", "metadata" ] }, - "NotFound": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BasicError" - } + "ListTeamPluginUsage_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/UsageCurrent" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" } }, - "description": "Resource not found" - } - }, - "parameters": { - "plugin_sort_by": { - "description": "The field to sort by", - "in": "query", - "name": "sort_by", - "required": false, - "schema": { - "enum": [ - "created_at", - "updated_at", - "name", - "downloads" - ], - "type": "string" - } + "required" : [ "items", "metadata" ] }, - "page": { - "description": "Page number of the results to fetch", - "in": "query", - "name": "page", - "required": false, - "schema": { - "default": 1, - "minimum": 1, - "type": "integer", - "format": "int64" - } + "ListTeamInvitations_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/Invitation" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" + } + }, + "required" : [ "items", "metadata" ] }, - "per_page": { - "description": "The number of results per page (max 1000).", - "in": "query", - "name": "per_page", - "required": false, - "schema": { - "default": 100, - "maximum": 1000, - "minimum": 1, - "type": "integer", - "format": "int64" - } + "EmailTeamInvitation_request" : { + "properties" : { + "email" : { + "format" : "email", + "type" : "string" + }, + "role" : { + "enum" : [ "admin", "member" ], + "type" : "string" + } + }, + "required" : [ "email", "role" ] }, - "team_name": { - "in": "path", - "name": "team_name", - "required": true, - "schema": { - "$ref": "#/components/schemas/TeamName" - } + "DeleteTeamInvitation_request" : { + "properties" : { + "email" : { + "format" : "email", + "type" : "string" + } + }, + "required" : [ "email" ] }, - "plugin_name": { - "in": "path", - "name": "plugin_name", - "required": true, - "schema": { - "$ref": "#/components/schemas/PluginName" - } + "AcceptTeamInvitation_request" : { + "properties" : { + "token" : { + "format" : "uuid", + "type" : "string" + } + }, + "required" : [ "token" ] + }, + "ListSubscriptionOrdersByTeam_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/TeamSubscriptionOrder" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" + } + }, + "required" : [ "items", "metadata" ] + }, + "ListUsersByTeam_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/User" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" + } + }, + "required" : [ "items", "metadata" ] }, - "version_sort_by": { - "description": "The field to sort by", - "in": "query", - "name": "sort_by", - "required": false, - "schema": { - "enum": [ - "created_at" - ], - "type": "string" + "UpdateCurrentUser_request" : { + "additionalProperties" : { }, + "properties" : { + "name" : { + "$ref" : "#/components/schemas/UserName" + }, + "onboarded" : { + "$ref" : "#/components/schemas/UserOnboarded" + } } }, - "version_name": { - "in": "path", - "name": "version_name", - "required": true, - "schema": { - "$ref": "#/components/schemas/VersionName" + "CheckUserAuthStatus_200_response" : { + "properties" : { + "authenticated" : { + "description" : "Whether the user is authenticated", + "type" : "boolean" + } + }, + "required" : [ "authenticated" ] + }, + "LoginUser_request" : { + "additionalProperties" : { }, + "properties" : { + "id_token" : { + "x-go-name" : "IDToken" + } + }, + "required" : [ "id_token" ] + }, + "CreateUserToken_201_response" : { + "properties" : { + "custom_token" : { + "description" : "Token to exchange for refresh token", + "type" : "string" + } + }, + "required" : [ "custom_token" ] + }, + "UserTOTPVerify_request" : { + "additionalProperties" : { }, + "properties" : { + "otp" : { + "x-go-name" : "OTP" + } + }, + "required" : [ "otp" ] + }, + "UserTOTPVerify_201_response" : { + "properties" : { + "custom_token" : { + "description" : "Token to exchange for ID token", + "type" : "string" + } + }, + "required" : [ "custom_token" ] + }, + "UserTOTPSetup_200_response" : { + "properties" : { + "url" : { + "type" : "string" + }, + "secret" : { + "type" : "string" + } + }, + "required" : [ "secret", "url" ] + }, + "RegisterUser_request" : { + "additionalProperties" : { }, + "properties" : { + "email" : { + "description" : "Email address", + "format" : "email" + }, + "password" : { + "description" : "Password for the new user account", + "minLength" : 6 + } + }, + "required" : [ "email", "password" ] + }, + "RegisterUser_201_response" : { + "properties" : { + "email" : { + "description" : "Indicates successful user creation", + "type" : "string" + }, + "custom_token" : { + "description" : "Token to exchange for ID token", + "type" : "string" + } + }, + "required" : [ "custom_token", "email" ] + }, + "ResetUserPassword_request" : { + "additionalProperties" : { }, + "properties" : { + "email" : { + "description" : "Email address to reset", + "format" : "email" + }, + "subdomain" : { + "description" : "Subdomain to use in the URL", + "pattern" : "^[a-zA-Z0-9-]+$" + } + }, + "required" : [ "email" ] + }, + "VerifyUserEmail_request" : { + "additionalProperties" : { }, + "properties" : { + "email" : { + "description" : "Email address to verify", + "format" : "email" + }, + "return_to" : { + "description" : "Return to this URL after verification", + "format" : "url", + "pattern" : "^(https:\\/\\/(.*\\.)?cloudquery\\.io(\\/.*)?|http:\\/\\/localhost(:\\d+)?\\/callback)$" + }, + "subdomain" : { + "description" : "Subdomain to use in the URL", + "pattern" : "^[a-zA-Z0-9-]+$" + } + }, + "required" : [ "email" ] + }, + "ListCurrentUserInvitations_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/InvitationWithToken" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" + } + }, + "required" : [ "items", "metadata" ] + }, + "GetCurrentUserMemberships_200_response" : { + "properties" : { + "items" : { + "example" : [ { + "role" : "admin", + "team" : { + "created_at" : "2017-07-14T16:53:42Z", + "name" : "cloudquery", + "display_name" : "CloudQuery", + "plan" : "free", + "is_trial_active" : false, + "internal" : false + } + } ], + "items" : { + "$ref" : "#/components/schemas/MembershipWithTeam" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" + } + }, + "required" : [ "items", "metadata" ] + }, + "SendUserEvent_request" : { + "additionalProperties" : { }, + "properties" : { + "name" : { + "description" : "Name of event" + }, + "properties" : { + "description" : "Properties of event, keys should be of string type" + } + }, + "required" : [ "name" ] + }, + "SendAnonymousEvent_request" : { + "additionalProperties" : { }, + "properties" : { + "name" : { + "description" : "Name of event" + }, + "anonymous_id" : { + "description" : "Anonymous ID identifying the user", + "x-go-name" : "AnonymousID" + }, + "properties" : { + "description" : "Properties of event, keys should be of string type" + } + }, + "required" : [ "anonymous_id", "name" ] + }, + "UpdateCustomer_request" : { + "additionalProperties" : { }, + "properties" : { + "first_name" : { + "type" : "string" + }, + "last_name" : { + "type" : "string" + }, + "company_name" : { + "type" : "string" + }, + "learned_about_cq_from" : { + "type" : "string" + }, + "learned_about_cq_from_other" : { + "type" : "string" + }, + "phone" : { + "type" : "string" + } + }, + "required" : [ "first_name", "last_name" ] + }, + "DeterminePlatformTenantByEmail_200_response" : { + "properties" : { + "items" : { + "description" : "List of tenants", + "items" : { + "$ref" : "#/components/schemas/TenantUser" + }, + "type" : "array", + "x-go-type-skip-optional-pointer" : true + }, + "has_cloud_account" : { + "description" : "Whether the user has a cloud account", + "type" : "boolean" + } + }, + "required" : [ "has_cloud_account" ] + }, + "ListTeamAPIKeys_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/APIKey" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" + } + }, + "required" : [ "items", "metadata" ] + }, + "CreateTeamAPIKey_request" : { + "properties" : { + "name" : { + "$ref" : "#/components/schemas/APIKeyName" + }, + "expires_at" : { + "format" : "date-time", + "type" : "string" + }, + "scope" : { + "$ref" : "#/components/schemas/APIKeyScope" + } + }, + "required" : [ "expires_at", "name" ] + }, + "GetManagedDatabases_200_response" : { + "properties" : { + "items" : { + "items" : { + "$ref" : "#/components/schemas/ManagedDatabase" + }, + "type" : "array" + }, + "metadata" : { + "$ref" : "#/components/schemas/ListMetadata" + } + }, + "required" : [ "items", "metadata" ] + }, + "ActivatePlatform_request" : { + "additionalProperties" : { }, + "properties" : { + "api_key" : { + "description" : "Team API key to activate platform with", + "x-go-name" : "APIKey" + }, + "installation_id" : { + "description" : "Installation ID of the platform", + "pattern" : "^[a-z0-9]{64}$", + "x-go-name" : "InstallationID" + } + }, + "required" : [ "api_key", "installation_id" ] + }, + "ActivatePlatform_200_response" : { + "additionalProperties" : { }, + "properties" : { + "activation_id" : { + "description" : "Activation ID for the platform", + "format" : "uuid", + "x-go-name" : "ActivationID" + }, + "team_name" : { + "description" : "Name of the team that was activated" + }, + "next_check_in_seconds" : { + "description" : "Time in seconds until the next check in" + } + }, + "required" : [ "activation_id", "next_check_in_seconds", "team_name" ] + }, + "ActivatePlatform_205_response" : { + "additionalProperties" : { }, + "properties" : { + "error" : { + "description" : "Error message" + }, + "button_text" : { + "description" : "Text for the button" + }, + "button_url" : { + "description" : "URL for the button", + "format" : "url", + "x-go-name" : "ButtonURL" + } + }, + "required" : [ "error" ] + }, + "RenewPlatformActivation_request" : { + "additionalProperties" : { }, + "properties" : { + "installation_id" : { + "description" : "Installation ID of the platform", + "pattern" : "^[a-z0-9]{64}$", + "x-go-name" : "InstallationID" + }, + "activation_id" : { + "description" : "Previous activation ID", + "format" : "uuid", + "x-go-name" : "ActivationID" + } + }, + "required" : [ "activation_id", "installation_id" ] + }, + "RenewPlatformActivation_200_response" : { + "additionalProperties" : { }, + "properties" : { + "next_check_in_seconds" : { + "description" : "Time in seconds until the next check in" + } + }, + "required" : [ "next_check_in_seconds" ] + }, + "ReportPlatformData_request" : { + "additionalProperties" : { }, + "properties" : { + "installation_id" : { + "description" : "Installation ID of the platform", + "pattern" : "^[a-z0-9]{64}$", + "x-go-name" : "InstallationID" + }, + "user_additions" : { + "items" : { + "type" : "string" + }, + "x-go-type-skip-optional-pointer" : true + }, + "user_removals" : { + "items" : { }, + "x-go-type-skip-optional-pointer" : true + } + }, + "required" : [ "installation_id" ] + }, + "ReportTenantPlatformData_request" : { + "additionalProperties" : { }, + "properties" : { + "host" : { + "type" : "string" + }, + "user_additions" : { + "items" : { }, + "x-go-type-skip-optional-pointer" : true + }, + "user_removals" : { + "items" : { }, + "x-go-type-skip-optional-pointer" : true + } + }, + "required" : [ "host" ] + }, + "AIOnboardingChat_request" : { + "additionalProperties" : { }, + "properties" : { + "message" : { + "description" : "The user's message to send to the AI assistant", + "x-go-name" : "Message" + }, + "function_call_outputs" : { + "description" : "Function call outputs from previous interactions", + "items" : { + "$ref" : "#/components/schemas/FunctionCallOutput" + }, + "x-go-name" : "FunctionCallOutputs" + }, + "conversation_id" : { + "description" : "Optional conversation ID to continue an existing conversation", + "x-go-name" : "ConversationID" + }, + "chat_mode" : { + "description" : "Optional chat mode - \"web\" for markdown output, \"terminal\" for plain text output", + "enum" : [ "web", "terminal" ], + "x-go-name" : "ChatMode" + } } }, - "target_name": { - "in": "path", - "name": "target_name", - "required": true, - "schema": { - "type": "string" + "AIOnboardingChat_200_response" : { + "additionalProperties" : { }, + "properties" : { + "message" : { + "description" : "The AI assistant's response message", + "x-go-name" : "Message" + }, + "function_call" : { + "description" : "The name of the function being called (if any)", + "x-go-name" : "FunctionCall" + }, + "function_call_arguments" : { + "description" : "Arguments for the function call (if any)", + "x-go-name" : "FunctionCallArguments" + }, + "function_call_id" : { + "description" : "ID of the function call (if any)", + "x-go-name" : "FunctionCallID" + } + }, + "required" : [ "message" ] + }, + "AIOnboardingNewConversation_request" : { + "additionalProperties" : { }, + "properties" : { + "try_resume" : { + "description" : "If true, resume existing conversation instead of starting a new one", + "x-go-name" : "TryResume" + } } }, - "email": { - "in": "path", - "name": "email", - "required": true, - "schema": { - "$ref": "#/components/schemas/Email" + "AIOnboardingNewConversation_200_response" : { + "additionalProperties" : { }, + "properties" : { + "conversation_id" : { + "description" : "The ID of the new conversation", + "x-go-name" : "ConversationID" + } + }, + "required" : [ "conversation_id" ] + }, + "AIOnboardingEndConversation_200_response" : { + "additionalProperties" : { }, + "properties" : { + "success" : { + "description" : "Whether the conversation was ended successfully", + "x-go-name" : "Success" + } } }, - "apikey_name": { - "name": "apikey_name", - "in": "path", - "required": true, - "schema": { - "type": "string", - "example": "cli-api-key" + "UsageIncrease_tables_inner" : { + "properties" : { + "name" : { + "description" : "The name of the table.", + "example" : "my_table", + "type" : "string" + }, + "rows" : { + "description" : "The additional rows used by the table.", + "example" : 100, + "minimum" : 0, + "type" : "integer" + } + }, + "required" : [ "name", "rows" ] + }, + "UsageSummary_metadata" : { + "additionalProperties" : false, + "description" : "Additional metadata about the usage summary. This may include information about the time range, the aggregation period, or other details.", + "properties" : { + "start" : { + "description" : "The inclusive start of the query time range.", + "format" : "date-time" + }, + "end" : { + "description" : "The exclusive end of the query time range.", + "format" : "date-time" + }, + "aggregation_period" : { + "description" : "The aggregation period to sum data over. In other words, data will be returned at this granularity.", + "enum" : [ "day", "month" ] + }, + "metrics" : { + "default" : [ "paid_rows" ], + "description" : "List of metrics included in the response.", + "items" : { + "enum" : [ "paid_rows", "cloud_egress_bytes", "cloud_vcpu_seconds", "cloud_vram_byte_seconds" ] + } + } }, - "x-go-name": "ApiKeyName" + "required" : [ "aggregation_period", "end", "metrics", "start" ] + } + }, + "securitySchemes" : { + "bearerAuth" : { + "scheme" : "bearer", + "type" : "http" + }, + "basicAuth" : { + "scheme" : "basic", + "type" : "http" + }, + "cookieAuth" : { + "scheme" : "cookie", + "type" : "http" } } } diff --git a/templates/client.tmpl b/templates/client.tmpl new file mode 100644 index 0000000..bfe47aa --- /dev/null +++ b/templates/client.tmpl @@ -0,0 +1,315 @@ +// RequestEditorFn is the function signature for the RequestEditor callback function +type RequestEditorFn func(ctx context.Context, req *http.Request) error + +// Doer performs HTTP requests. +// +// The standard http.Client implements this interface. +type HttpRequestDoer interface { + Do(req *http.Request) (*http.Response, error) +} + +{{$clientTypeName := opts.OutputOptions.ClientTypeName -}} + +// {{ $clientTypeName }} which conforms to the OpenAPI3 specification for this service. +type {{ $clientTypeName }} struct { + // The endpoint of the server conforming to this interface, with scheme, + // https://api.deepmap.com for example. This can contain a path relative + // to the server, such as https://api.deepmap.com/dev-test, and all the + // paths in the swagger spec will be appended to the server. + Server string + + // Doer for performing requests, typically a *http.Client with any + // customized settings, such as certificate chains. + Client HttpRequestDoer + + // A list of callbacks for modifying requests which are generated before sending over + // the network. + RequestEditors []RequestEditorFn +} + +// ClientOption allows setting custom parameters during construction +type ClientOption func(*{{ $clientTypeName }}) error + +// Creates a new {{ $clientTypeName }}, with reasonable defaults +func NewClient(server string, opts ...ClientOption) (*{{ $clientTypeName }}, error) { + retryClient := retryablehttp.NewClient() + retryClient.Logger = nil + opts = append([]ClientOption{WithHTTPClient(retryClient.StandardClient())}, opts...) + // create a client with sane default values + client := {{ $clientTypeName }}{ + Server: server, + } + // mutate client and add all optional params + for _, o := range opts { + if err := o(&client); err != nil { + return nil, err + } + } + // ensure the server URL always has a trailing slash + if !strings.HasSuffix(client.Server, "/") { + client.Server += "/" + } + // create httpClient, if not already present + if client.Client == nil { + client.Client = &http.Client{} + } + return &client, nil +} + +// WithHTTPClient allows overriding the default Doer, which is +// automatically created using http.Client. This is useful for tests. +func WithHTTPClient(doer HttpRequestDoer) ClientOption { + return func(c *{{ $clientTypeName }}) error { + c.Client = doer + return nil + } +} + +// WithRequestEditorFn allows setting up a callback function, which will be +// called right before sending the request. This can be used to mutate the request. +func WithRequestEditorFn(fn RequestEditorFn) ClientOption { + return func(c *{{ $clientTypeName }}) error { + c.RequestEditors = append(c.RequestEditors, fn) + return nil + } +} + +// The interface specification for the client above. +type ClientInterface interface { +{{range . -}} +{{$hasParams := .RequiresParamObject -}} +{{$pathParams := .PathParams -}} +{{$opid := .OperationId -}} + // {{$opid}}{{if .HasBody}}WithBody{{end}} request{{if .HasBody}} with any body{{end}} + {{$opid}}{{if .HasBody}}WithBody{{end}}(ctx context.Context{{genParamArgs $pathParams}}{{if $hasParams}}, params *{{$opid}}Params{{end}}{{if .HasBody}}, contentType string, body io.Reader{{end}}, reqEditors... RequestEditorFn) (*http.Response, error) +{{range .Bodies}} + {{if .IsSupportedByClient -}} + {{$opid}}{{.Suffix}}(ctx context.Context{{genParamArgs $pathParams}}{{if $hasParams}}, params *{{$opid}}Params{{end}}, body {{$opid}}{{.NameTag}}RequestBody, reqEditors... RequestEditorFn) (*http.Response, error) + {{end -}} +{{end}}{{/* range .Bodies */}} +{{end}}{{/* range . $opid := .OperationId */}} +} + + +{{/* Generate client methods */}} +{{range . -}} +{{$hasParams := .RequiresParamObject -}} +{{$pathParams := .PathParams -}} +{{$opid := .OperationId -}} + +func (c *{{ $clientTypeName }}) {{$opid}}{{if .HasBody}}WithBody{{end}}(ctx context.Context{{genParamArgs $pathParams}}{{if $hasParams}}, params *{{$opid}}Params{{end}}{{if .HasBody}}, contentType string, body io.Reader{{end}}, reqEditors... RequestEditorFn) (*http.Response, error) { + req, err := New{{$opid}}Request{{if .HasBody}}WithBody{{end}}(c.Server{{genParamNames .PathParams}}{{if $hasParams}}, params{{end}}{{if .HasBody}}, contentType, body{{end}}) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +{{range .Bodies}} +{{if .IsSupportedByClient -}} +func (c *{{ $clientTypeName }}) {{$opid}}{{.Suffix}}(ctx context.Context{{genParamArgs $pathParams}}{{if $hasParams}}, params *{{$opid}}Params{{end}}, body {{$opid}}{{.NameTag}}RequestBody, reqEditors... RequestEditorFn) (*http.Response, error) { + req, err := New{{$opid}}Request{{.Suffix}}(c.Server{{genParamNames $pathParams}}{{if $hasParams}}, params{{end}}, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} +{{end -}}{{/* if .IsSupported */}} +{{end}}{{/* range .Bodies */}} +{{end}} + +{{/* Generate request builders */}} +{{range .}} +{{$hasParams := .RequiresParamObject -}} +{{$pathParams := .PathParams -}} +{{$bodyRequired := .BodyRequired -}} +{{$opid := .OperationId -}} + +{{range .Bodies}} +{{if .IsSupportedByClient -}} +// New{{$opid}}Request{{.Suffix}} calls the generic {{$opid}} builder with {{.ContentType}} body +func New{{$opid}}Request{{.Suffix}}(server string{{genParamArgs $pathParams}}{{if $hasParams}}, params *{{$opid}}Params{{end}}, body {{$opid}}{{.NameTag}}RequestBody) (*http.Request, error) { + var bodyReader io.Reader + {{if .IsJSON -}} + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + {{else if eq .NameTag "Formdata" -}} + bodyStr, err := runtime.MarshalForm(body, nil) + if err != nil { + return nil, err + } + bodyReader = strings.NewReader(bodyStr.Encode()) + {{else if eq .NameTag "Text" -}} + bodyReader = strings.NewReader(string(body)) + {{end -}} + return New{{$opid}}RequestWithBody(server{{genParamNames $pathParams}}{{if $hasParams}}, params{{end}}, "{{.ContentType}}", bodyReader) +} +{{end -}} +{{end}} + +// New{{$opid}}Request{{if .HasBody}}WithBody{{end}} generates requests for {{$opid}}{{if .HasBody}} with any type of body{{end}} +func New{{$opid}}Request{{if .HasBody}}WithBody{{end}}(server string{{genParamArgs $pathParams}}{{if $hasParams}}, params *{{$opid}}Params{{end}}{{if .HasBody}}, contentType string, body io.Reader{{end}}) (*http.Request, error) { + var err error +{{range $paramIdx, $param := .PathParams}} + var pathParam{{$paramIdx}} string + {{if .IsPassThrough}} + pathParam{{$paramIdx}} = {{.GoVariableName}} + {{end}} + {{if .IsJson}} + var pathParamBuf{{$paramIdx}} []byte + pathParamBuf{{$paramIdx}}, err = json.Marshal({{.GoVariableName}}) + if err != nil { + return nil, err + } + pathParam{{$paramIdx}} = string(pathParamBuf{{$paramIdx}}) + {{end}} + {{if .IsStyled}} + pathParam{{$paramIdx}}, err = runtime.StyleParamWithLocation("{{.Style}}", {{.Explode}}, "{{.ParamName}}", runtime.ParamLocationPath, {{.GoVariableName}}) + if err != nil { + return nil, err + } + {{end}} +{{end}} + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("{{genParamFmtString .Path}}"{{range $paramIdx, $param := .PathParams}}, pathParam{{$paramIdx}}{{end}}) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + +{{if .QueryParams}} + if params != nil { + queryValues := queryURL.Query() + {{range $paramIdx, $param := .QueryParams}} + {{if not .Required}} if params.{{.GoName}} != nil { {{end}} + {{if .IsPassThrough}} + queryValues.Add("{{.ParamName}}", {{if not .Required}}*{{end}}params.{{.GoName}}) + {{end}} + {{if .IsJson}} + if queryParamBuf, err := json.Marshal({{if not .Required}}*{{end}}params.{{.GoName}}); err != nil { + return nil, err + } else { + queryValues.Add("{{.ParamName}}", string(queryParamBuf)) + } + + {{end}} + {{if .IsStyled}} + if queryFrag, err := runtime.StyleParamWithLocation("{{.Style}}", {{.Explode}}, "{{.ParamName}}", runtime.ParamLocationQuery, {{if not .Required}}*{{end}}params.{{.GoName}}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + {{end}} + {{if not .Required}}}{{end}} + {{end}} + queryURL.RawQuery = queryValues.Encode() + } +{{end}}{{/* if .QueryParams */}} + req, err := http.NewRequest("{{.Method}}", queryURL.String(), {{if .HasBody}}body{{else}}nil{{end}}) + if err != nil { + return nil, err + } + + {{if .HasBody}}req.Header.Add("Content-Type", contentType){{end}} +{{ if .HeaderParams }} + if params != nil { + {{range $paramIdx, $param := .HeaderParams}} + {{if not .Required}} if params.{{.GoName}} != nil { {{end}} + var headerParam{{$paramIdx}} string + {{if .IsPassThrough}} + headerParam{{$paramIdx}} = {{if not .Required}}*{{end}}params.{{.GoName}} + {{end}} + {{if .IsJson}} + var headerParamBuf{{$paramIdx}} []byte + headerParamBuf{{$paramIdx}}, err = json.Marshal({{if not .Required}}*{{end}}params.{{.GoName}}) + if err != nil { + return nil, err + } + headerParam{{$paramIdx}} = string(headerParamBuf{{$paramIdx}}) + {{end}} + {{if .IsStyled}} + headerParam{{$paramIdx}}, err = runtime.StyleParamWithLocation("{{.Style}}", {{.Explode}}, "{{.ParamName}}", runtime.ParamLocationHeader, {{if not .Required}}*{{end}}params.{{.GoName}}) + if err != nil { + return nil, err + } + {{end}} + req.Header.Set("{{.ParamName}}", headerParam{{$paramIdx}}) + {{if not .Required}}}{{end}} + {{end}} + } +{{- end }}{{/* if .HeaderParams */}} + +{{ if .CookieParams }} + if params != nil { + {{range $paramIdx, $param := .CookieParams}} + {{if not .Required}} if params.{{.GoName}} != nil { {{end}} + var cookieParam{{$paramIdx}} string + {{if .IsPassThrough}} + cookieParam{{$paramIdx}} = {{if not .Required}}*{{end}}params.{{.GoName}} + {{end}} + {{if .IsJson}} + var cookieParamBuf{{$paramIdx}} []byte + cookieParamBuf{{$paramIdx}}, err = json.Marshal({{if not .Required}}*{{end}}params.{{.GoName}}) + if err != nil { + return nil, err + } + cookieParam{{$paramIdx}} = url.QueryEscape(string(cookieParamBuf{{$paramIdx}})) + {{end}} + {{if .IsStyled}} + cookieParam{{$paramIdx}}, err = runtime.StyleParamWithLocation("simple", {{.Explode}}, "{{.ParamName}}", runtime.ParamLocationCookie, {{if not .Required}}*{{end}}params.{{.GoName}}) + if err != nil { + return nil, err + } + {{end}} + cookie{{$paramIdx}} := &http.Cookie{ + Name:"{{.ParamName}}", + Value:cookieParam{{$paramIdx}}, + } + req.AddCookie(cookie{{$paramIdx}}) + {{if not .Required}}}{{end}} + {{ end -}} + } +{{- end }}{{/* if .CookieParams */}} + return req, nil +} + +{{end}}{{/* Range */}} + +func (c *{{ $clientTypeName }}) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { + for _, r := range c.RequestEditors { + if err := r(ctx, req); err != nil { + return err + } + } + for _, r := range additionalEditors { + if err := r(ctx, req); err != nil { + return err + } + } + return nil +}