diff --git a/.flake8 b/.flake8 index 0c60e1e3..be4b41e7 100644 --- a/.flake8 +++ b/.flake8 @@ -1,6 +1,5 @@ [flake8] max-line-length = 120 exclude = - ./sdk/python/sdk/**, - ./build/** - + sdk/python/src/zrok_api/* + sdk/python/src/test/* diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 0aad76bc..3f7f537a 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -1,4 +1,4 @@ -name: build wheels +name: Publish Python Distributions on: release: @@ -23,83 +23,86 @@ jobs: exit 1 fi - build_wheels: + build_distributions: + name: Building Python Distributions needs: enforce_stable_semver + runs-on: ubuntu-24.04 defaults: run: - working-directory: sdk/python/sdk/zrok - strategy: - fail-fast: false - matrix: - spec: - - { name: 'linux x86_64', runner: ubuntu-20.04, target: manylinux_2_27_x86_64 } - - { name: 'macOS x86_64', runner: macos-13, target: macosx_10_14_x86_64 } - - { name: 'Windows x86_64', runner: windows-2019, target: win_amd64 } - name: building ${{ matrix.spec.name }} - runs-on: ${{ matrix.spec.runner }} + working-directory: sdk/python/src steps: - name: Checkout uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Setup Python + - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.x' + python-version: '3.13' + cache: 'pip' - - name: Install Python Tools - run: python -m pip install -U pip setuptools - - - name: Build distro + - name: Build Python distributions env: ZROK_VERSION: ${{ github.event.release.tag_name }} ZROK_PY_NAME: ${{ vars.ZROK_PY_NAME || null }} + shell: bash run: | - python setup.py sdist + + set -o pipefail + set -o xtrace + + # Install build requirements + pip install --upgrade pip + pip install -r build-requirements.txt + + # Build source distribution and wheel + python -m build + + # List built distributions + ls -lAR ./dist - uses: actions/upload-artifact@v4 - if: startsWith(matrix.spec.name, 'linux') with: - name: zrok_sdk_${{ matrix.spec.target }} - path: ${{ github.workspace }}/sdk/python/sdk/zrok/dist/* + name: zrok_sdk_distributions + path: sdk/python/src/dist/* - publish-testpypi: - runs-on: ubuntu-20.04 - needs: [ build_wheels ] + publish_testpypi: + name: Publish TestPyPI + runs-on: ubuntu-24.04 + needs: [ build_distributions ] permissions: - id-token: write + id-token: write steps: - name: Download artifacts uses: actions/download-artifact@v4 with: - path: ./dist + path: sdk/python/src/dist merge-multiple: true - pattern: zrok_sdk_* + pattern: zrok_sdk_distributions - - name: Publish wheels (TestPYPI) + - name: Publish Distributions to TestPyPI uses: pypa/gh-action-pypi-publish@release/v1 with: repository-url: https://test.pypi.org/legacy/ - packages-dir: dist + packages-dir: sdk/python/src/dist skip-existing: true verbose: true - publish-pypi: - runs-on: ubuntu-20.04 - needs: [ publish-testpypi ] + publish_pypi: + name: Publish PyPI + runs-on: ubuntu-24.04 + needs: [ publish_testpypi ] permissions: - id-token: write + id-token: write steps: - name: Download artifacts uses: actions/download-artifact@v4 with: - path: ./dist + path: sdk/python/src/dist merge-multiple: true - pattern: zrok_sdk_* + pattern: zrok_sdk_distributions - - name: Publish wheels (PyPI) + - name: Publish Distributions to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: - packages-dir: dist + packages-dir: sdk/python/src/dist verbose: true diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index d13131b3..62a75d2d 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -17,7 +17,7 @@ concurrency: jobs: ubuntu-build: name: Build Linux AMD64 CLI - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 @@ -61,19 +61,6 @@ jobs: shell: bash run: go test -v ./... - - name: setup python - uses: actions/setup-python@v3 - with: - python-version: '3.10' - - - name: python deps - shell: bash - run: python -m pip install -U pip flake8 - - - name: python lint - shell: bash - run: flake8 sdk/python/sdk/zrok - - name: solve GOBIN id: solve_go_bin shell: bash @@ -88,12 +75,61 @@ jobs: path: ${{ steps.solve_go_bin.outputs.go_bin }}/zrok if-no-files-found: error + pytest: + name: Test the Python SDK + runs-on: ubuntu-24.04 + strategy: + matrix: + python-version: ["3.10", "3.11", "3.12", "3.13"] + defaults: + run: + working-directory: sdk/python + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + shell: bash + run: | + + set -o pipefail + set -o xtrace + + python -m pip install --upgrade pip + pip install -r src/requirements.txt + pip install -r src/test-requirements.txt + pip install -r src/build-requirements.txt + pip install -e src/ + + - name: Test with pytest + shell: bash + run: | + + set -o pipefail + set -o xtrace + + pytest --cov=zrok_api --verbose src/ + + - name: Lint the Python SDK + shell: bash + run: | + + set -o pipefail + set -o xtrace + + flake8 . + # build a release candidate container image for branches named "main" or like "v*" rc-container-build: needs: ubuntu-build if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/v') name: Build Release Candidate Container Image - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Set a container image tag from the branch name id: slug diff --git a/.github/workflows/node-sdk.yml b/.github/workflows/node-sdk.yml index 8645c3bf..4d39f738 100644 --- a/.github/workflows/node-sdk.yml +++ b/.github/workflows/node-sdk.yml @@ -12,8 +12,6 @@ jobs: name: Require Stable Release Semver if: github.event.action == 'released' runs-on: ubuntu-24.04 - outputs: - version: ${{ steps.parse.outputs.version }} steps: - name: Parse Release Version id: parse @@ -32,18 +30,17 @@ jobs: if: always() name: Build for Node-${{ matrix.node_ver }} ${{ matrix.config.target }}/${{ matrix.config.arch }} runs-on: ${{ matrix.config.os }} - env: BUILD_NUMBER: ${{ github.run_number }} AWS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - + strategy: matrix: config: - - { os: ubuntu-20.04, target: "linux", arch: "x64" } + - { os: ubuntu-24.04, target: "linux", arch: "x64" } node_ver: [ 20 ] fail-fast: false - + steps: - name: Node Version @@ -55,20 +52,22 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - submodules: 'recursive' - name: Get current zrok repo tag + if: github.event.action == 'released' id: tag - run: echo "TAG=$(git describe --tags --abbrev=0)" | tee -a $GITHUB_OUTPUT + shell: bash + run: echo "TAG=$(git describe --tags --always)" | tee -a $GITHUB_OUTPUT - name: Update zrok NodeJS-SDK's package.json version based on current zrok repo git tag - if: github.ref_type == 'tag' + if: github.event.action == 'released' + shell: bash run: | - cd ${{ runner.workspace }}/${{ github.event.repository.name }}/sdk/nodejs/sdk + cd sdk/nodejs/sdk npm version ${{ steps.tag.outputs.TAG }} --no-git-tag-version --allow-same-version - name: Setup .npmrc - if: github.ref_type == 'tag' + if: github.event.action == 'released' # Setup .npmrc file to prepare for possible publish to npm uses: actions/setup-node@v4 with: @@ -76,17 +75,26 @@ jobs: registry-url: 'https://registry.npmjs.org' - name: Build the zrok NodeJS-SDK + shell: bash run: | - cd ${{ runner.workspace }}/${{ github.event.repository.name }}/sdk/nodejs/sdk + cd sdk/nodejs/sdk npm install npm run build env: BUILD_DATE: ${{ steps.date.outputs.date }} - name: NPM Publish - if: github.ref_type == 'tag' + if: github.event.action == 'released' + shell: bash run: | - cd ${{ runner.workspace }}/${{ github.event.repository.name }}/sdk/nodejs/sdk - npm publish --access public + cd sdk/nodejs/sdk + # Check if this is the official repository + if [[ "${{ github.repository_owner }}" == "openziti" ]]; then + echo "Publishing from official repository with @latest tag" + npm publish --access public + else + echo "Publishing from fork/test repository with @canary tag" + npm publish --access public --tag canary + fi env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.gitignore b/.gitignore index 3ea76101..46267f3f 100644 --- a/.gitignore +++ b/.gitignore @@ -16,8 +16,6 @@ node_modules/ .docusaurus .cache-loader -sdk/python/sdk/build/ - # Misc .DS_Store .env.local @@ -37,3 +35,9 @@ yarn-error.log* .obsidian sdk/nodejs/sdk/dist + +# py module artifacts +/sdk/python/src/**/*.egg-info/ +/sdk/python/src/**/__pycache__/ +/.coverage +/sdk/python/src/dist/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bed9e75..00191a68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,8 @@ CHANGE: Deprecated the `passwords` configuration stanza. The zrok controller and CHANGE: The protocol for determining valid client versions has been changed. Previously a zrok client would do a `GET` against the `/api/v1/version` endpoint and do a local version string comparison (as a normal precondition to any API call) to see if the controller version matched. The protocol has been amended so that any out-of-date client using the old protocol will receive a version string indicating that they need to uprade their client. New clients will do a `POST` against the `/api/v1/clientVersionCheck` endpoint, posting their client version, and the server will check for compatibility. Does not change the security posture in any significant way, but gives more flexibility on the server side for managing client compatibility. Provides a better, cleared out-of-date error message for old clients when accessing `v1.0.0`+ (https://github.com/openziti/zrok/issues/859) +CHANGE: The Python SDK is now generated by `openapi-generator` and requires a newer `urllib3` version 2.1.0. The published Python module, `zrok`, inherits the dependencies of the generated packages. + ## v0.4.49 FIX: Release artifacts now include a reproducible source archive. The archive's download URL is now used by the Homebrew formula when building from source instead of the archive generated on-demand by GitHub (https://github.com/openziti/zrok/issues/858). diff --git a/bin/generate_rest.sh b/bin/generate_rest.sh index f7881a7d..4c0b3aaf 100755 --- a/bin/generate_rest.sh +++ b/bin/generate_rest.sh @@ -2,37 +2,41 @@ set -euo pipefail -command -v swagger >/dev/null 2>&1 || { +command -v swagger &>/dev/null || { echo >&2 "command 'swagger' not installed. see: https://github.com/go-swagger/go-swagger for installation" exit 1 } -command -v swagger-codegen 2>&1 || { +command -v swagger-codegen &>/dev/null || { echo >&2 "command 'swagger-codegen' not installed. see: https://github.com/swagger-api/swagger-codegen for installation" exit 1 } -command -v openapi-generator-cli 2>&1 || { +command -v openapi-generator-cli &>/dev/null || { echo >&2 "command 'openapi-generator-cli' not installed. see: https://www.npmjs.com/package/@openapitools/openapi-generator-cli for installation" exit 1 } -command -v realpath 2>&1 || { +command -v realpath &>/dev/null || { echo >&2 "command 'realpath' not installed. see: https://www.npmjs.com/package/realpath for installation" exit 1 } -scriptPath=$(realpath $0) +scriptPath=$(realpath "$0") scriptDir=$(dirname "$scriptPath") zrokDir=$(realpath "$scriptDir/..") - zrokSpec=$(realpath "$zrokDir/specs/zrok.yml") -pythonConfig=$(realpath "$zrokDir/bin/python_config.json") +# anti-oops in case user runs this script from somewhere else +if [[ "$(realpath "$zrokDir")" != "$(realpath "$(pwd)")" ]] +then + echo "ERROR: must be run from zrok root" >&2 + exit 1 +fi echo "...clean generate zrok server/client" -rm -rf rest_* +rm -rf ./rest_* echo "...generating zrok server" swagger generate server -P rest_model_zrok.Principal -f "$zrokSpec" -s rest_server_zrok -t "$zrokDir" -m "rest_model_zrok" --exclude-main @@ -42,7 +46,7 @@ swagger generate client -P rest_model_zrok.Principal -f "$zrokSpec" -c rest_clie echo "...generating api console ts client" rm -rf ui/src/api -openapi-generator-cli generate -i specs/zrok.yml -o ui/src/api -g typescript-fetch +openapi-generator-cli generate -i "$zrokSpec" -o ui/src/api -g typescript-fetch echo "...generating agent console ts client" rm -rf agent/agentUi/src/api @@ -50,11 +54,12 @@ openapi-generator-cli generate -i agent/agentGrpc/agent.swagger.json -o agent/ag echo "...generating nodejs sdk ts client" rm -rf sdk/nodejs/sdk/src/api -openapi-generator-cli generate -i specs/zrok.yml -o sdk/nodejs/sdk/src/api -g typescript-fetch +openapi-generator-cli generate -i "$zrokSpec" -o sdk/nodejs/sdk/src/api -g typescript-fetch echo "...generating python sdk client" -swagger-codegen generate -i specs/zrok.yml -o sdk/python/sdk/zrok -c $pythonConfig -l python +pyMod="./sdk/python/src" +rm -rf "$pyMod"/{zrok_api,docs,test,.gitignore,README.md,requirements.txt} +openapi-generator-cli generate -i "$zrokSpec" -o "$pyMod" -g python \ + --package-name zrok_api --additional-properties projectName=zrok git checkout rest_server_zrok/configure_zrok.go -rm sdk/nodejs/sdk/src/zrok/api/git_push.sh -rm sdk/python/sdk/zrok/git_push.sh diff --git a/bin/python_config.json b/bin/python_config.json deleted file mode 100644 index a1829e35..00000000 --- a/bin/python_config.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "packageName":"zrok_api", - "projectName":"zrok_sdk" - } \ No newline at end of file diff --git a/docker/images/cross-build/linux-build.sh b/docker/images/cross-build/linux-build.sh index 04654f4a..269ee4a3 100755 --- a/docker/images/cross-build/linux-build.sh +++ b/docker/images/cross-build/linux-build.sh @@ -29,11 +29,15 @@ fi ( HOME=/tmp/builder # Navigate to the "ui" directory and run npm commands - npm config set cache /mnt/.npm - cd ./ui/ mkdir -p $HOME - npm install - npm run build + npm config set cache /mnt/.npm + for UI in ./ui ./agent/agentUi + do + pushd ${UI} + npm install + npm run build + popd + done ) for ARCH in "${JOBS[@]}"; do diff --git a/sdk/python/examples/http-server/requirements.txt b/sdk/python/examples/http-server/requirements.txt index 23ab2518..e4a200c6 100644 --- a/sdk/python/examples/http-server/requirements.txt +++ b/sdk/python/examples/http-server/requirements.txt @@ -1,3 +1,3 @@ -Flask==3.0.0 -waitress==2.1.2 -zrok \ No newline at end of file +zrok +flask +waitress diff --git a/sdk/python/examples/pastebin/requirements.txt b/sdk/python/examples/pastebin/requirements.txt index b927021b..3c94d273 100644 --- a/sdk/python/examples/pastebin/requirements.txt +++ b/sdk/python/examples/pastebin/requirements.txt @@ -1,3 +1,2 @@ -openziti==0.8.1 -requests==2.31.0 -zrok \ No newline at end of file +zrok +requests diff --git a/sdk/python/examples/proxy/requirements.txt b/sdk/python/examples/proxy/requirements.txt new file mode 100644 index 00000000..639cc78b --- /dev/null +++ b/sdk/python/examples/proxy/requirements.txt @@ -0,0 +1,4 @@ +zrok +flask +requests +waitress diff --git a/sdk/python/sdk/zrok/.gitignore b/sdk/python/sdk/zrok/.gitignore deleted file mode 100644 index a655050c..00000000 --- a/sdk/python/sdk/zrok/.gitignore +++ /dev/null @@ -1,64 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -*.egg-info/ -.installed.cfg -*.egg - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*,cover -.hypothesis/ -venv/ -.python-version - -# Translations -*.mo -*.pot - -# Django stuff: -*.log - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -#Ipython Notebook -.ipynb_checkpoints diff --git a/sdk/python/sdk/zrok/.swagger-codegen-ignore b/sdk/python/sdk/zrok/.swagger-codegen-ignore deleted file mode 100644 index c5fa491b..00000000 --- a/sdk/python/sdk/zrok/.swagger-codegen-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# Swagger Codegen Ignore -# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/sdk/python/sdk/zrok/.swagger-codegen/VERSION b/sdk/python/sdk/zrok/.swagger-codegen/VERSION deleted file mode 100644 index b262b4de..00000000 --- a/sdk/python/sdk/zrok/.swagger-codegen/VERSION +++ /dev/null @@ -1 +0,0 @@ -3.0.51 \ No newline at end of file diff --git a/sdk/python/sdk/zrok/.travis.yml b/sdk/python/sdk/zrok/.travis.yml deleted file mode 100644 index dd6c4450..00000000 --- a/sdk/python/sdk/zrok/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -# ref: https://docs.travis-ci.com/user/languages/python -language: python -python: - - "3.2" - - "3.3" - - "3.4" - - "3.5" - #- "3.5-dev" # 3.5 development branch - #- "nightly" # points to the latest development branch e.g. 3.6-dev -# command to install dependencies -install: "pip install -r requirements.txt" -# command to run tests -script: nosetests diff --git a/sdk/python/sdk/zrok/README.md b/sdk/python/sdk/zrok/README.md deleted file mode 100644 index eabbfa8c..00000000 --- a/sdk/python/sdk/zrok/README.md +++ /dev/null @@ -1,274 +0,0 @@ -# zrok_sdk -zrok client access - -This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: - -- API version: 1.0.0 -- Package version: 1.0.0 -- Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen - -## Requirements. - -Python 2.7 and 3.4+ - -## Installation & Usage -### pip install - -If the python package is hosted on Github, you can install directly from Github - -```sh -pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git -``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) - -Then import the package: -```python -import zrok_api -``` - -### Setuptools - -Install via [Setuptools](http://pypi.python.org/pypi/setuptools). - -```sh -python setup.py install --user -``` -(or `sudo python setup.py install` to install the package for all users) - -Then import the package: -```python -import zrok_api -``` - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) -body = zrok_api.ChangePasswordBody() # ChangePasswordBody | (optional) - -try: - api_instance.change_password(body=body) -except ApiException as e: - print("Exception when calling AccountApi->change_password: %s\n" % e) - -# create an instance of the API class -api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) -body = zrok_api.InviteBody() # InviteBody | (optional) - -try: - api_instance.invite(body=body) -except ApiException as e: - print("Exception when calling AccountApi->invite: %s\n" % e) - -# create an instance of the API class -api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) -body = zrok_api.LoginBody() # LoginBody | (optional) - -try: - api_response = api_instance.login(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AccountApi->login: %s\n" % e) - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) -body = zrok_api.RegenerateAccountTokenBody() # RegenerateAccountTokenBody | (optional) - -try: - api_response = api_instance.regenerate_account_token(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AccountApi->regenerate_account_token: %s\n" % e) - -# create an instance of the API class -api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) -body = zrok_api.RegisterBody() # RegisterBody | (optional) - -try: - api_response = api_instance.register(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AccountApi->register: %s\n" % e) - -# create an instance of the API class -api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) -body = zrok_api.ResetPasswordBody() # ResetPasswordBody | (optional) - -try: - api_instance.reset_password(body=body) -except ApiException as e: - print("Exception when calling AccountApi->reset_password: %s\n" % e) - -# create an instance of the API class -api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) -body = zrok_api.ResetPasswordRequestBody() # ResetPasswordRequestBody | (optional) - -try: - api_instance.reset_password_request(body=body) -except ApiException as e: - print("Exception when calling AccountApi->reset_password_request: %s\n" % e) - -# create an instance of the API class -api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) -body = zrok_api.VerifyBody() # VerifyBody | (optional) - -try: - api_response = api_instance.verify(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AccountApi->verify: %s\n" % e) -``` - -## Documentation for API Endpoints - -All URIs are relative to */api/v1* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AccountApi* | [**change_password**](docs/AccountApi.md#change_password) | **POST** /changePassword | -*AccountApi* | [**invite**](docs/AccountApi.md#invite) | **POST** /invite | -*AccountApi* | [**login**](docs/AccountApi.md#login) | **POST** /login | -*AccountApi* | [**regenerate_account_token**](docs/AccountApi.md#regenerate_account_token) | **POST** /regenerateAccountToken | -*AccountApi* | [**register**](docs/AccountApi.md#register) | **POST** /register | -*AccountApi* | [**reset_password**](docs/AccountApi.md#reset_password) | **POST** /resetPassword | -*AccountApi* | [**reset_password_request**](docs/AccountApi.md#reset_password_request) | **POST** /resetPasswordRequest | -*AccountApi* | [**verify**](docs/AccountApi.md#verify) | **POST** /verify | -*AdminApi* | [**add_organization_member**](docs/AdminApi.md#add_organization_member) | **POST** /organization/add | -*AdminApi* | [**create_account**](docs/AdminApi.md#create_account) | **POST** /account | -*AdminApi* | [**create_frontend**](docs/AdminApi.md#create_frontend) | **POST** /frontend | -*AdminApi* | [**create_identity**](docs/AdminApi.md#create_identity) | **POST** /identity | -*AdminApi* | [**create_organization**](docs/AdminApi.md#create_organization) | **POST** /organization | -*AdminApi* | [**delete_frontend**](docs/AdminApi.md#delete_frontend) | **DELETE** /frontend | -*AdminApi* | [**delete_organization**](docs/AdminApi.md#delete_organization) | **DELETE** /organization | -*AdminApi* | [**grants**](docs/AdminApi.md#grants) | **POST** /grants | -*AdminApi* | [**invite_token_generate**](docs/AdminApi.md#invite_token_generate) | **POST** /invite/token/generate | -*AdminApi* | [**list_frontends**](docs/AdminApi.md#list_frontends) | **GET** /frontends | -*AdminApi* | [**list_organization_members**](docs/AdminApi.md#list_organization_members) | **POST** /organization/list | -*AdminApi* | [**list_organizations**](docs/AdminApi.md#list_organizations) | **GET** /organizations | -*AdminApi* | [**remove_organization_member**](docs/AdminApi.md#remove_organization_member) | **POST** /organization/remove | -*AdminApi* | [**update_frontend**](docs/AdminApi.md#update_frontend) | **PATCH** /frontend | -*EnvironmentApi* | [**disable**](docs/EnvironmentApi.md#disable) | **POST** /disable | -*EnvironmentApi* | [**enable**](docs/EnvironmentApi.md#enable) | **POST** /enable | -*MetadataApi* | [**client_version_check**](docs/MetadataApi.md#client_version_check) | **POST** /clientVersionCheck | -*MetadataApi* | [**configuration**](docs/MetadataApi.md#configuration) | **GET** /configuration | -*MetadataApi* | [**get_account_detail**](docs/MetadataApi.md#get_account_detail) | **GET** /detail/account | -*MetadataApi* | [**get_account_metrics**](docs/MetadataApi.md#get_account_metrics) | **GET** /metrics/account | -*MetadataApi* | [**get_environment_detail**](docs/MetadataApi.md#get_environment_detail) | **GET** /detail/environment/{envZId} | -*MetadataApi* | [**get_environment_metrics**](docs/MetadataApi.md#get_environment_metrics) | **GET** /metrics/environment/{envId} | -*MetadataApi* | [**get_frontend_detail**](docs/MetadataApi.md#get_frontend_detail) | **GET** /detail/frontend/{frontendId} | -*MetadataApi* | [**get_share_detail**](docs/MetadataApi.md#get_share_detail) | **GET** /detail/share/{shareToken} | -*MetadataApi* | [**get_share_metrics**](docs/MetadataApi.md#get_share_metrics) | **GET** /metrics/share/{shareToken} | -*MetadataApi* | [**get_sparklines**](docs/MetadataApi.md#get_sparklines) | **POST** /sparklines | -*MetadataApi* | [**list_memberships**](docs/MetadataApi.md#list_memberships) | **GET** /memberships | -*MetadataApi* | [**list_org_members**](docs/MetadataApi.md#list_org_members) | **GET** /members/{organizationToken} | -*MetadataApi* | [**org_account_overview**](docs/MetadataApi.md#org_account_overview) | **GET** /overview/{organizationToken}/{accountEmail} | -*MetadataApi* | [**overview**](docs/MetadataApi.md#overview) | **GET** /overview | -*MetadataApi* | [**version**](docs/MetadataApi.md#version) | **GET** /version | -*MetadataApi* | [**version_inventory**](docs/MetadataApi.md#version_inventory) | **GET** /versions | -*ShareApi* | [**access**](docs/ShareApi.md#access) | **POST** /access | -*ShareApi* | [**share**](docs/ShareApi.md#share) | **POST** /share | -*ShareApi* | [**unaccess**](docs/ShareApi.md#unaccess) | **DELETE** /unaccess | -*ShareApi* | [**unshare**](docs/ShareApi.md#unshare) | **DELETE** /unshare | -*ShareApi* | [**update_access**](docs/ShareApi.md#update_access) | **PATCH** /access | -*ShareApi* | [**update_share**](docs/ShareApi.md#update_share) | **PATCH** /share | - -## Documentation For Models - - - [AccessBody](docs/AccessBody.md) - - [AccessBody1](docs/AccessBody1.md) - - [AccountBody](docs/AccountBody.md) - - [AuthUser](docs/AuthUser.md) - - [ChangePasswordBody](docs/ChangePasswordBody.md) - - [ClientVersionCheckBody](docs/ClientVersionCheckBody.md) - - [Configuration](docs/Configuration.md) - - [DisableBody](docs/DisableBody.md) - - [EnableBody](docs/EnableBody.md) - - [Environment](docs/Environment.md) - - [EnvironmentAndResources](docs/EnvironmentAndResources.md) - - [Environments](docs/Environments.md) - - [ErrorMessage](docs/ErrorMessage.md) - - [Frontend](docs/Frontend.md) - - [FrontendBody](docs/FrontendBody.md) - - [FrontendBody1](docs/FrontendBody1.md) - - [FrontendBody2](docs/FrontendBody2.md) - - [Frontends](docs/Frontends.md) - - [GrantsBody](docs/GrantsBody.md) - - [IdentityBody](docs/IdentityBody.md) - - [InlineResponse200](docs/InlineResponse200.md) - - [InlineResponse2001](docs/InlineResponse2001.md) - - [InlineResponse2002](docs/InlineResponse2002.md) - - [InlineResponse2003](docs/InlineResponse2003.md) - - [InlineResponse2003Members](docs/InlineResponse2003Members.md) - - [InlineResponse2004](docs/InlineResponse2004.md) - - [InlineResponse2004Organizations](docs/InlineResponse2004Organizations.md) - - [InlineResponse2005](docs/InlineResponse2005.md) - - [InlineResponse2005Memberships](docs/InlineResponse2005Memberships.md) - - [InlineResponse2006](docs/InlineResponse2006.md) - - [InlineResponse2007](docs/InlineResponse2007.md) - - [InlineResponse201](docs/InlineResponse201.md) - - [InlineResponse2011](docs/InlineResponse2011.md) - - [InlineResponse2012](docs/InlineResponse2012.md) - - [InlineResponse2013](docs/InlineResponse2013.md) - - [InviteBody](docs/InviteBody.md) - - [LoginBody](docs/LoginBody.md) - - [Metrics](docs/Metrics.md) - - [MetricsSample](docs/MetricsSample.md) - - [OrganizationAddBody](docs/OrganizationAddBody.md) - - [OrganizationBody](docs/OrganizationBody.md) - - [OrganizationBody1](docs/OrganizationBody1.md) - - [OrganizationListBody](docs/OrganizationListBody.md) - - [OrganizationRemoveBody](docs/OrganizationRemoveBody.md) - - [Overview](docs/Overview.md) - - [Principal](docs/Principal.md) - - [RegenerateAccountTokenBody](docs/RegenerateAccountTokenBody.md) - - [RegisterBody](docs/RegisterBody.md) - - [ResetPasswordBody](docs/ResetPasswordBody.md) - - [ResetPasswordRequestBody](docs/ResetPasswordRequestBody.md) - - [Share](docs/Share.md) - - [ShareBody](docs/ShareBody.md) - - [ShareRequest](docs/ShareRequest.md) - - [ShareResponse](docs/ShareResponse.md) - - [Shares](docs/Shares.md) - - [SparkData](docs/SparkData.md) - - [SparkDataSample](docs/SparkDataSample.md) - - [SparklinesBody](docs/SparklinesBody.md) - - [TokenGenerateBody](docs/TokenGenerateBody.md) - - [UnaccessBody](docs/UnaccessBody.md) - - [UnshareBody](docs/UnshareBody.md) - - [VerifyBody](docs/VerifyBody.md) - - [Version](docs/Version.md) - -## Documentation For Authorization - - -## key - -- **Type**: API key -- **API key parameter name**: x-token -- **Location**: HTTP header - - -## Author - - diff --git a/sdk/python/sdk/zrok/docs/AccessBody.md b/sdk/python/sdk/zrok/docs/AccessBody.md deleted file mode 100644 index 86e3636b..00000000 --- a/sdk/python/sdk/zrok/docs/AccessBody.md +++ /dev/null @@ -1,12 +0,0 @@ -# AccessBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**env_zid** | **str** | | [optional] -**share_token** | **str** | | [optional] -**bind_address** | **str** | | [optional] -**description** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/AccessBody1.md b/sdk/python/sdk/zrok/docs/AccessBody1.md deleted file mode 100644 index 68968950..00000000 --- a/sdk/python/sdk/zrok/docs/AccessBody1.md +++ /dev/null @@ -1,11 +0,0 @@ -# AccessBody1 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] -**bind_address** | **str** | | [optional] -**description** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/AccountApi.md b/sdk/python/sdk/zrok/docs/AccountApi.md deleted file mode 100644 index 531caa12..00000000 --- a/sdk/python/sdk/zrok/docs/AccountApi.md +++ /dev/null @@ -1,383 +0,0 @@ -# zrok_api.AccountApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**change_password**](AccountApi.md#change_password) | **POST** /changePassword | -[**invite**](AccountApi.md#invite) | **POST** /invite | -[**login**](AccountApi.md#login) | **POST** /login | -[**regenerate_account_token**](AccountApi.md#regenerate_account_token) | **POST** /regenerateAccountToken | -[**register**](AccountApi.md#register) | **POST** /register | -[**reset_password**](AccountApi.md#reset_password) | **POST** /resetPassword | -[**reset_password_request**](AccountApi.md#reset_password_request) | **POST** /resetPasswordRequest | -[**verify**](AccountApi.md#verify) | **POST** /verify | - -# **change_password** -> change_password(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) -body = zrok_api.ChangePasswordBody() # ChangePasswordBody | (optional) - -try: - api_instance.change_password(body=body) -except ApiException as e: - print("Exception when calling AccountApi->change_password: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ChangePasswordBody**](ChangePasswordBody.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **invite** -> invite(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# create an instance of the API class -api_instance = zrok_api.AccountApi() -body = zrok_api.InviteBody() # InviteBody | (optional) - -try: - api_instance.invite(body=body) -except ApiException as e: - print("Exception when calling AccountApi->invite: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**InviteBody**](InviteBody.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **login** -> str login(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# create an instance of the API class -api_instance = zrok_api.AccountApi() -body = zrok_api.LoginBody() # LoginBody | (optional) - -try: - api_response = api_instance.login(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AccountApi->login: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**LoginBody**](LoginBody.md)| | [optional] - -### Return type - -**str** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **regenerate_account_token** -> InlineResponse200 regenerate_account_token(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.AccountApi(zrok_api.ApiClient(configuration)) -body = zrok_api.RegenerateAccountTokenBody() # RegenerateAccountTokenBody | (optional) - -try: - api_response = api_instance.regenerate_account_token(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AccountApi->regenerate_account_token: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**RegenerateAccountTokenBody**](RegenerateAccountTokenBody.md)| | [optional] - -### Return type - -[**InlineResponse200**](InlineResponse200.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **register** -> InlineResponse200 register(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# create an instance of the API class -api_instance = zrok_api.AccountApi() -body = zrok_api.RegisterBody() # RegisterBody | (optional) - -try: - api_response = api_instance.register(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AccountApi->register: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**RegisterBody**](RegisterBody.md)| | [optional] - -### Return type - -[**InlineResponse200**](InlineResponse200.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **reset_password** -> reset_password(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# create an instance of the API class -api_instance = zrok_api.AccountApi() -body = zrok_api.ResetPasswordBody() # ResetPasswordBody | (optional) - -try: - api_instance.reset_password(body=body) -except ApiException as e: - print("Exception when calling AccountApi->reset_password: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ResetPasswordBody**](ResetPasswordBody.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **reset_password_request** -> reset_password_request(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# create an instance of the API class -api_instance = zrok_api.AccountApi() -body = zrok_api.ResetPasswordRequestBody() # ResetPasswordRequestBody | (optional) - -try: - api_instance.reset_password_request(body=body) -except ApiException as e: - print("Exception when calling AccountApi->reset_password_request: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ResetPasswordRequestBody**](ResetPasswordRequestBody.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **verify** -> InlineResponse2001 verify(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# create an instance of the API class -api_instance = zrok_api.AccountApi() -body = zrok_api.VerifyBody() # VerifyBody | (optional) - -try: - api_response = api_instance.verify(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AccountApi->verify: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**VerifyBody**](VerifyBody.md)| | [optional] - -### Return type - -[**InlineResponse2001**](InlineResponse2001.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/AccountBody.md b/sdk/python/sdk/zrok/docs/AccountBody.md deleted file mode 100644 index 076efa50..00000000 --- a/sdk/python/sdk/zrok/docs/AccountBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# AccountBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] -**password** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/AdminApi.md b/sdk/python/sdk/zrok/docs/AdminApi.md deleted file mode 100644 index 34977dd4..00000000 --- a/sdk/python/sdk/zrok/docs/AdminApi.md +++ /dev/null @@ -1,720 +0,0 @@ -# zrok_api.AdminApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**add_organization_member**](AdminApi.md#add_organization_member) | **POST** /organization/add | -[**create_account**](AdminApi.md#create_account) | **POST** /account | -[**create_frontend**](AdminApi.md#create_frontend) | **POST** /frontend | -[**create_identity**](AdminApi.md#create_identity) | **POST** /identity | -[**create_organization**](AdminApi.md#create_organization) | **POST** /organization | -[**delete_frontend**](AdminApi.md#delete_frontend) | **DELETE** /frontend | -[**delete_organization**](AdminApi.md#delete_organization) | **DELETE** /organization | -[**grants**](AdminApi.md#grants) | **POST** /grants | -[**invite_token_generate**](AdminApi.md#invite_token_generate) | **POST** /invite/token/generate | -[**list_frontends**](AdminApi.md#list_frontends) | **GET** /frontends | -[**list_organization_members**](AdminApi.md#list_organization_members) | **POST** /organization/list | -[**list_organizations**](AdminApi.md#list_organizations) | **GET** /organizations | -[**remove_organization_member**](AdminApi.md#remove_organization_member) | **POST** /organization/remove | -[**update_frontend**](AdminApi.md#update_frontend) | **PATCH** /frontend | - -# **add_organization_member** -> add_organization_member(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) -body = zrok_api.OrganizationAddBody() # OrganizationAddBody | (optional) - -try: - api_instance.add_organization_member(body=body) -except ApiException as e: - print("Exception when calling AdminApi->add_organization_member: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OrganizationAddBody**](OrganizationAddBody.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **create_account** -> InlineResponse200 create_account(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) -body = zrok_api.AccountBody() # AccountBody | (optional) - -try: - api_response = api_instance.create_account(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AdminApi->create_account: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**AccountBody**](AccountBody.md)| | [optional] - -### Return type - -[**InlineResponse200**](InlineResponse200.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **create_frontend** -> InlineResponse201 create_frontend(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) -body = zrok_api.FrontendBody() # FrontendBody | (optional) - -try: - api_response = api_instance.create_frontend(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AdminApi->create_frontend: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FrontendBody**](FrontendBody.md)| | [optional] - -### Return type - -[**InlineResponse201**](InlineResponse201.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **create_identity** -> InlineResponse2011 create_identity(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) -body = zrok_api.IdentityBody() # IdentityBody | (optional) - -try: - api_response = api_instance.create_identity(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AdminApi->create_identity: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**IdentityBody**](IdentityBody.md)| | [optional] - -### Return type - -[**InlineResponse2011**](InlineResponse2011.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **create_organization** -> InlineResponse2012 create_organization(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) -body = zrok_api.OrganizationBody() # OrganizationBody | (optional) - -try: - api_response = api_instance.create_organization(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AdminApi->create_organization: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OrganizationBody**](OrganizationBody.md)| | [optional] - -### Return type - -[**InlineResponse2012**](InlineResponse2012.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **delete_frontend** -> delete_frontend(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) -body = zrok_api.FrontendBody1() # FrontendBody1 | (optional) - -try: - api_instance.delete_frontend(body=body) -except ApiException as e: - print("Exception when calling AdminApi->delete_frontend: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FrontendBody1**](FrontendBody1.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **delete_organization** -> delete_organization(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) -body = zrok_api.OrganizationBody1() # OrganizationBody1 | (optional) - -try: - api_instance.delete_organization(body=body) -except ApiException as e: - print("Exception when calling AdminApi->delete_organization: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OrganizationBody1**](OrganizationBody1.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **grants** -> grants(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) -body = zrok_api.GrantsBody() # GrantsBody | (optional) - -try: - api_instance.grants(body=body) -except ApiException as e: - print("Exception when calling AdminApi->grants: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**GrantsBody**](GrantsBody.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **invite_token_generate** -> invite_token_generate(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) -body = zrok_api.TokenGenerateBody() # TokenGenerateBody | (optional) - -try: - api_instance.invite_token_generate(body=body) -except ApiException as e: - print("Exception when calling AdminApi->invite_token_generate: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**TokenGenerateBody**](TokenGenerateBody.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_frontends** -> list[InlineResponse2002] list_frontends() - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) - -try: - api_response = api_instance.list_frontends() - pprint(api_response) -except ApiException as e: - print("Exception when calling AdminApi->list_frontends: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**list[InlineResponse2002]**](InlineResponse2002.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_organization_members** -> InlineResponse2003 list_organization_members(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) -body = zrok_api.OrganizationListBody() # OrganizationListBody | (optional) - -try: - api_response = api_instance.list_organization_members(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling AdminApi->list_organization_members: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OrganizationListBody**](OrganizationListBody.md)| | [optional] - -### Return type - -[**InlineResponse2003**](InlineResponse2003.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_organizations** -> InlineResponse2004 list_organizations() - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) - -try: - api_response = api_instance.list_organizations() - pprint(api_response) -except ApiException as e: - print("Exception when calling AdminApi->list_organizations: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**InlineResponse2004**](InlineResponse2004.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **remove_organization_member** -> remove_organization_member(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) -body = zrok_api.OrganizationRemoveBody() # OrganizationRemoveBody | (optional) - -try: - api_instance.remove_organization_member(body=body) -except ApiException as e: - print("Exception when calling AdminApi->remove_organization_member: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OrganizationRemoveBody**](OrganizationRemoveBody.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **update_frontend** -> update_frontend(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.AdminApi(zrok_api.ApiClient(configuration)) -body = zrok_api.FrontendBody2() # FrontendBody2 | (optional) - -try: - api_instance.update_frontend(body=body) -except ApiException as e: - print("Exception when calling AdminApi->update_frontend: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FrontendBody2**](FrontendBody2.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/AuthUser.md b/sdk/python/sdk/zrok/docs/AuthUser.md deleted file mode 100644 index 2abe24ba..00000000 --- a/sdk/python/sdk/zrok/docs/AuthUser.md +++ /dev/null @@ -1,10 +0,0 @@ -# AuthUser - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**username** | **str** | | [optional] -**password** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/ChangePasswordBody.md b/sdk/python/sdk/zrok/docs/ChangePasswordBody.md deleted file mode 100644 index 1137de72..00000000 --- a/sdk/python/sdk/zrok/docs/ChangePasswordBody.md +++ /dev/null @@ -1,11 +0,0 @@ -# ChangePasswordBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] -**old_password** | **str** | | [optional] -**new_password** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/ClientVersionCheckBody.md b/sdk/python/sdk/zrok/docs/ClientVersionCheckBody.md deleted file mode 100644 index 4a36f24e..00000000 --- a/sdk/python/sdk/zrok/docs/ClientVersionCheckBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# ClientVersionCheckBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client_version** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/Configuration.md b/sdk/python/sdk/zrok/docs/Configuration.md deleted file mode 100644 index ee94f24b..00000000 --- a/sdk/python/sdk/zrok/docs/Configuration.md +++ /dev/null @@ -1,13 +0,0 @@ -# Configuration - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**version** | **str** | | [optional] -**tou_link** | **str** | | [optional] -**invites_open** | **bool** | | [optional] -**requires_invite_token** | **bool** | | [optional] -**invite_token_contact** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/DisableBody.md b/sdk/python/sdk/zrok/docs/DisableBody.md deleted file mode 100644 index f6ee65f2..00000000 --- a/sdk/python/sdk/zrok/docs/DisableBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# DisableBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**identity** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/EnableBody.md b/sdk/python/sdk/zrok/docs/EnableBody.md deleted file mode 100644 index 7ba7d7b3..00000000 --- a/sdk/python/sdk/zrok/docs/EnableBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# EnableBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **str** | | [optional] -**host** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/Environment.md b/sdk/python/sdk/zrok/docs/Environment.md deleted file mode 100644 index bd71fee9..00000000 --- a/sdk/python/sdk/zrok/docs/Environment.md +++ /dev/null @@ -1,16 +0,0 @@ -# Environment - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **str** | | [optional] -**host** | **str** | | [optional] -**address** | **str** | | [optional] -**z_id** | **str** | | [optional] -**activity** | [**SparkData**](SparkData.md) | | [optional] -**limited** | **bool** | | [optional] -**created_at** | **int** | | [optional] -**updated_at** | **int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/EnvironmentAndResources.md b/sdk/python/sdk/zrok/docs/EnvironmentAndResources.md deleted file mode 100644 index 7ed1a39a..00000000 --- a/sdk/python/sdk/zrok/docs/EnvironmentAndResources.md +++ /dev/null @@ -1,11 +0,0 @@ -# EnvironmentAndResources - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**environment** | [**Environment**](Environment.md) | | [optional] -**frontends** | [**Frontends**](Frontends.md) | | [optional] -**shares** | [**Shares**](Shares.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/EnvironmentApi.md b/sdk/python/sdk/zrok/docs/EnvironmentApi.md deleted file mode 100644 index f9e49447..00000000 --- a/sdk/python/sdk/zrok/docs/EnvironmentApi.md +++ /dev/null @@ -1,110 +0,0 @@ -# zrok_api.EnvironmentApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**disable**](EnvironmentApi.md#disable) | **POST** /disable | -[**enable**](EnvironmentApi.md#enable) | **POST** /enable | - -# **disable** -> disable(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.EnvironmentApi(zrok_api.ApiClient(configuration)) -body = zrok_api.DisableBody() # DisableBody | (optional) - -try: - api_instance.disable(body=body) -except ApiException as e: - print("Exception when calling EnvironmentApi->disable: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**DisableBody**](DisableBody.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **enable** -> InlineResponse2011 enable(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.EnvironmentApi(zrok_api.ApiClient(configuration)) -body = zrok_api.EnableBody() # EnableBody | (optional) - -try: - api_response = api_instance.enable(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling EnvironmentApi->enable: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**EnableBody**](EnableBody.md)| | [optional] - -### Return type - -[**InlineResponse2011**](InlineResponse2011.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/Environments.md b/sdk/python/sdk/zrok/docs/Environments.md deleted file mode 100644 index 5cdc8b26..00000000 --- a/sdk/python/sdk/zrok/docs/Environments.md +++ /dev/null @@ -1,8 +0,0 @@ -# Environments - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/ErrorMessage.md b/sdk/python/sdk/zrok/docs/ErrorMessage.md deleted file mode 100644 index 25d74334..00000000 --- a/sdk/python/sdk/zrok/docs/ErrorMessage.md +++ /dev/null @@ -1,8 +0,0 @@ -# ErrorMessage - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/Frontend.md b/sdk/python/sdk/zrok/docs/Frontend.md deleted file mode 100644 index 428eb19d..00000000 --- a/sdk/python/sdk/zrok/docs/Frontend.md +++ /dev/null @@ -1,17 +0,0 @@ -# Frontend - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**frontend_token** | **str** | | [optional] -**share_token** | **str** | | [optional] -**backend_mode** | **str** | | [optional] -**bind_address** | **str** | | [optional] -**description** | **str** | | [optional] -**z_id** | **str** | | [optional] -**created_at** | **int** | | [optional] -**updated_at** | **int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/FrontendBody.md b/sdk/python/sdk/zrok/docs/FrontendBody.md deleted file mode 100644 index 5d0a3e37..00000000 --- a/sdk/python/sdk/zrok/docs/FrontendBody.md +++ /dev/null @@ -1,12 +0,0 @@ -# FrontendBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**z_id** | **str** | | [optional] -**url_template** | **str** | | [optional] -**public_name** | **str** | | [optional] -**permission_mode** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/FrontendBody1.md b/sdk/python/sdk/zrok/docs/FrontendBody1.md deleted file mode 100644 index 7bcd3be5..00000000 --- a/sdk/python/sdk/zrok/docs/FrontendBody1.md +++ /dev/null @@ -1,9 +0,0 @@ -# FrontendBody1 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/FrontendBody2.md b/sdk/python/sdk/zrok/docs/FrontendBody2.md deleted file mode 100644 index e459d152..00000000 --- a/sdk/python/sdk/zrok/docs/FrontendBody2.md +++ /dev/null @@ -1,11 +0,0 @@ -# FrontendBody2 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] -**public_name** | **str** | | [optional] -**url_template** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/Frontends.md b/sdk/python/sdk/zrok/docs/Frontends.md deleted file mode 100644 index c308436b..00000000 --- a/sdk/python/sdk/zrok/docs/Frontends.md +++ /dev/null @@ -1,8 +0,0 @@ -# Frontends - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/GrantsBody.md b/sdk/python/sdk/zrok/docs/GrantsBody.md deleted file mode 100644 index 1e744a53..00000000 --- a/sdk/python/sdk/zrok/docs/GrantsBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# GrantsBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/IdentityBody.md b/sdk/python/sdk/zrok/docs/IdentityBody.md deleted file mode 100644 index 39125ca5..00000000 --- a/sdk/python/sdk/zrok/docs/IdentityBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# IdentityBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse200.md b/sdk/python/sdk/zrok/docs/InlineResponse200.md deleted file mode 100644 index cc5f9b8b..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse200.md +++ /dev/null @@ -1,9 +0,0 @@ -# InlineResponse200 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account_token** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2001.md b/sdk/python/sdk/zrok/docs/InlineResponse2001.md deleted file mode 100644 index 820bf042..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2001.md +++ /dev/null @@ -1,9 +0,0 @@ -# InlineResponse2001 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2002.md b/sdk/python/sdk/zrok/docs/InlineResponse2002.md deleted file mode 100644 index d50b57e3..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2002.md +++ /dev/null @@ -1,14 +0,0 @@ -# InlineResponse2002 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] -**z_id** | **str** | | [optional] -**url_template** | **str** | | [optional] -**public_name** | **str** | | [optional] -**created_at** | **int** | | [optional] -**updated_at** | **int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2003.md b/sdk/python/sdk/zrok/docs/InlineResponse2003.md deleted file mode 100644 index 39488d9e..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2003.md +++ /dev/null @@ -1,9 +0,0 @@ -# InlineResponse2003 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**members** | [**list[InlineResponse2003Members]**](InlineResponse2003Members.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2003Members.md b/sdk/python/sdk/zrok/docs/InlineResponse2003Members.md deleted file mode 100644 index ddc3c4dd..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2003Members.md +++ /dev/null @@ -1,10 +0,0 @@ -# InlineResponse2003Members - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] -**admin** | **bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2004.md b/sdk/python/sdk/zrok/docs/InlineResponse2004.md deleted file mode 100644 index 8c11d95d..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2004.md +++ /dev/null @@ -1,9 +0,0 @@ -# InlineResponse2004 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organizations** | [**list[InlineResponse2004Organizations]**](InlineResponse2004Organizations.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2004Members.md b/sdk/python/sdk/zrok/docs/InlineResponse2004Members.md deleted file mode 100644 index 9a3ba443..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2004Members.md +++ /dev/null @@ -1,10 +0,0 @@ -# InlineResponse2004Members - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] -**admin** | **bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2004Organizations.md b/sdk/python/sdk/zrok/docs/InlineResponse2004Organizations.md deleted file mode 100644 index 053d9f98..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2004Organizations.md +++ /dev/null @@ -1,10 +0,0 @@ -# InlineResponse2004Organizations - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] -**description** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2005.md b/sdk/python/sdk/zrok/docs/InlineResponse2005.md deleted file mode 100644 index 8f539747..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2005.md +++ /dev/null @@ -1,9 +0,0 @@ -# InlineResponse2005 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**memberships** | [**list[InlineResponse2005Memberships]**](InlineResponse2005Memberships.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2005Memberships.md b/sdk/python/sdk/zrok/docs/InlineResponse2005Memberships.md deleted file mode 100644 index 147189c3..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2005Memberships.md +++ /dev/null @@ -1,11 +0,0 @@ -# InlineResponse2005Memberships - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] -**description** | **str** | | [optional] -**admin** | **bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2005Organizations.md b/sdk/python/sdk/zrok/docs/InlineResponse2005Organizations.md deleted file mode 100644 index 2f4ba151..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2005Organizations.md +++ /dev/null @@ -1,10 +0,0 @@ -# InlineResponse2005Organizations - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**token** | **str** | | [optional] -**description** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2006.md b/sdk/python/sdk/zrok/docs/InlineResponse2006.md deleted file mode 100644 index 7a03d61e..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2006.md +++ /dev/null @@ -1,9 +0,0 @@ -# InlineResponse2006 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sparklines** | [**list[Metrics]**](Metrics.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2006Memberships.md b/sdk/python/sdk/zrok/docs/InlineResponse2006Memberships.md deleted file mode 100644 index 3c6e1efe..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2006Memberships.md +++ /dev/null @@ -1,11 +0,0 @@ -# InlineResponse2006Memberships - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] -**description** | **str** | | [optional] -**admin** | **bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2007.md b/sdk/python/sdk/zrok/docs/InlineResponse2007.md deleted file mode 100644 index e0914fdd..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2007.md +++ /dev/null @@ -1,9 +0,0 @@ -# InlineResponse2007 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**controller_version** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse201.md b/sdk/python/sdk/zrok/docs/InlineResponse201.md deleted file mode 100644 index bbe25b94..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse201.md +++ /dev/null @@ -1,9 +0,0 @@ -# InlineResponse201 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2011.md b/sdk/python/sdk/zrok/docs/InlineResponse2011.md deleted file mode 100644 index 8fd74494..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2011.md +++ /dev/null @@ -1,10 +0,0 @@ -# InlineResponse2011 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**identity** | **str** | | [optional] -**cfg** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2012.md b/sdk/python/sdk/zrok/docs/InlineResponse2012.md deleted file mode 100644 index a72f2065..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2012.md +++ /dev/null @@ -1,9 +0,0 @@ -# InlineResponse2012 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse2013.md b/sdk/python/sdk/zrok/docs/InlineResponse2013.md deleted file mode 100644 index 98930cb2..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse2013.md +++ /dev/null @@ -1,10 +0,0 @@ -# InlineResponse2013 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] -**backend_mode** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InlineResponse400.md b/sdk/python/sdk/zrok/docs/InlineResponse400.md deleted file mode 100644 index 29c731f6..00000000 --- a/sdk/python/sdk/zrok/docs/InlineResponse400.md +++ /dev/null @@ -1,9 +0,0 @@ -# InlineResponse400 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/InviteBody.md b/sdk/python/sdk/zrok/docs/InviteBody.md deleted file mode 100644 index 0fb2fcb0..00000000 --- a/sdk/python/sdk/zrok/docs/InviteBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# InviteBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] -**invite_token** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/LoginBody.md b/sdk/python/sdk/zrok/docs/LoginBody.md deleted file mode 100644 index b877ebb8..00000000 --- a/sdk/python/sdk/zrok/docs/LoginBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# LoginBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] -**password** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/MetadataApi.md b/sdk/python/sdk/zrok/docs/MetadataApi.md deleted file mode 100644 index 4d205435..00000000 --- a/sdk/python/sdk/zrok/docs/MetadataApi.md +++ /dev/null @@ -1,796 +0,0 @@ -# zrok_api.MetadataApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**client_version_check**](MetadataApi.md#client_version_check) | **POST** /clientVersionCheck | -[**configuration**](MetadataApi.md#configuration) | **GET** /configuration | -[**get_account_detail**](MetadataApi.md#get_account_detail) | **GET** /detail/account | -[**get_account_metrics**](MetadataApi.md#get_account_metrics) | **GET** /metrics/account | -[**get_environment_detail**](MetadataApi.md#get_environment_detail) | **GET** /detail/environment/{envZId} | -[**get_environment_metrics**](MetadataApi.md#get_environment_metrics) | **GET** /metrics/environment/{envId} | -[**get_frontend_detail**](MetadataApi.md#get_frontend_detail) | **GET** /detail/frontend/{frontendId} | -[**get_share_detail**](MetadataApi.md#get_share_detail) | **GET** /detail/share/{shareToken} | -[**get_share_metrics**](MetadataApi.md#get_share_metrics) | **GET** /metrics/share/{shareToken} | -[**get_sparklines**](MetadataApi.md#get_sparklines) | **POST** /sparklines | -[**list_memberships**](MetadataApi.md#list_memberships) | **GET** /memberships | -[**list_org_members**](MetadataApi.md#list_org_members) | **GET** /members/{organizationToken} | -[**org_account_overview**](MetadataApi.md#org_account_overview) | **GET** /overview/{organizationToken}/{accountEmail} | -[**overview**](MetadataApi.md#overview) | **GET** /overview | -[**version**](MetadataApi.md#version) | **GET** /version | -[**version_inventory**](MetadataApi.md#version_inventory) | **GET** /versions | - -# **client_version_check** -> client_version_check(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# create an instance of the API class -api_instance = zrok_api.MetadataApi() -body = zrok_api.ClientVersionCheckBody() # ClientVersionCheckBody | (optional) - -try: - api_instance.client_version_check(body=body) -except ApiException as e: - print("Exception when calling MetadataApi->client_version_check: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ClientVersionCheckBody**](ClientVersionCheckBody.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **configuration** -> Configuration configuration() - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# create an instance of the API class -api_instance = zrok_api.MetadataApi() - -try: - api_response = api_instance.configuration() - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->configuration: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**Configuration**](Configuration.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_account_detail** -> Environments get_account_detail() - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) - -try: - api_response = api_instance.get_account_detail() - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->get_account_detail: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**Environments**](Environments.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_account_metrics** -> Metrics get_account_metrics(duration=duration) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) -duration = 'duration_example' # str | (optional) - -try: - api_response = api_instance.get_account_metrics(duration=duration) - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->get_account_metrics: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **duration** | **str**| | [optional] - -### Return type - -[**Metrics**](Metrics.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_environment_detail** -> EnvironmentAndResources get_environment_detail(env_zid) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) -env_zid = 'env_zid_example' # str | - -try: - api_response = api_instance.get_environment_detail(env_zid) - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->get_environment_detail: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **env_zid** | **str**| | - -### Return type - -[**EnvironmentAndResources**](EnvironmentAndResources.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_environment_metrics** -> Metrics get_environment_metrics(env_id, duration=duration) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) -env_id = 'env_id_example' # str | -duration = 'duration_example' # str | (optional) - -try: - api_response = api_instance.get_environment_metrics(env_id, duration=duration) - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->get_environment_metrics: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **env_id** | **str**| | - **duration** | **str**| | [optional] - -### Return type - -[**Metrics**](Metrics.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_frontend_detail** -> Frontend get_frontend_detail(frontend_id) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) -frontend_id = 56 # int | - -try: - api_response = api_instance.get_frontend_detail(frontend_id) - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->get_frontend_detail: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **frontend_id** | **int**| | - -### Return type - -[**Frontend**](Frontend.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_share_detail** -> Share get_share_detail(share_token) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) -share_token = 'share_token_example' # str | - -try: - api_response = api_instance.get_share_detail(share_token) - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->get_share_detail: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **share_token** | **str**| | - -### Return type - -[**Share**](Share.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_share_metrics** -> Metrics get_share_metrics(share_token, duration=duration) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) -share_token = 'share_token_example' # str | -duration = 'duration_example' # str | (optional) - -try: - api_response = api_instance.get_share_metrics(share_token, duration=duration) - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->get_share_metrics: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **share_token** | **str**| | - **duration** | **str**| | [optional] - -### Return type - -[**Metrics**](Metrics.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_sparklines** -> InlineResponse2006 get_sparklines(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) -body = zrok_api.SparklinesBody() # SparklinesBody | (optional) - -try: - api_response = api_instance.get_sparklines(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->get_sparklines: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**SparklinesBody**](SparklinesBody.md)| | [optional] - -### Return type - -[**InlineResponse2006**](InlineResponse2006.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_memberships** -> InlineResponse2005 list_memberships() - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) - -try: - api_response = api_instance.list_memberships() - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->list_memberships: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**InlineResponse2005**](InlineResponse2005.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_org_members** -> InlineResponse2003 list_org_members(organization_token) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) -organization_token = 'organization_token_example' # str | - -try: - api_response = api_instance.list_org_members(organization_token) - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->list_org_members: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **organization_token** | **str**| | - -### Return type - -[**InlineResponse2003**](InlineResponse2003.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **org_account_overview** -> Overview org_account_overview(organization_token, account_email) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) -organization_token = 'organization_token_example' # str | -account_email = 'account_email_example' # str | - -try: - api_response = api_instance.org_account_overview(organization_token, account_email) - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->org_account_overview: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **organization_token** | **str**| | - **account_email** | **str**| | - -### Return type - -[**Overview**](Overview.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **overview** -> Overview overview() - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.MetadataApi(zrok_api.ApiClient(configuration)) - -try: - api_response = api_instance.overview() - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->overview: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**Overview**](Overview.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **version** -> Version version() - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# create an instance of the API class -api_instance = zrok_api.MetadataApi() - -try: - api_response = api_instance.version() - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->version: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**Version**](Version.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **version_inventory** -> InlineResponse2007 version_inventory() - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# create an instance of the API class -api_instance = zrok_api.MetadataApi() - -try: - api_response = api_instance.version_inventory() - pprint(api_response) -except ApiException as e: - print("Exception when calling MetadataApi->version_inventory: %s\n" % e) -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**InlineResponse2007**](InlineResponse2007.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/Metrics.md b/sdk/python/sdk/zrok/docs/Metrics.md deleted file mode 100644 index 0be4994b..00000000 --- a/sdk/python/sdk/zrok/docs/Metrics.md +++ /dev/null @@ -1,12 +0,0 @@ -# Metrics - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scope** | **str** | | [optional] -**id** | **str** | | [optional] -**period** | **float** | | [optional] -**samples** | [**list[MetricsSample]**](MetricsSample.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/MetricsSample.md b/sdk/python/sdk/zrok/docs/MetricsSample.md deleted file mode 100644 index 60863b05..00000000 --- a/sdk/python/sdk/zrok/docs/MetricsSample.md +++ /dev/null @@ -1,11 +0,0 @@ -# MetricsSample - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**rx** | **float** | | [optional] -**tx** | **float** | | [optional] -**timestamp** | **float** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/OrganizationAddBody.md b/sdk/python/sdk/zrok/docs/OrganizationAddBody.md deleted file mode 100644 index 485613d0..00000000 --- a/sdk/python/sdk/zrok/docs/OrganizationAddBody.md +++ /dev/null @@ -1,11 +0,0 @@ -# OrganizationAddBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] -**email** | **str** | | [optional] -**admin** | **bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/OrganizationBody.md b/sdk/python/sdk/zrok/docs/OrganizationBody.md deleted file mode 100644 index 014b7e7a..00000000 --- a/sdk/python/sdk/zrok/docs/OrganizationBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# OrganizationBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/OrganizationBody1.md b/sdk/python/sdk/zrok/docs/OrganizationBody1.md deleted file mode 100644 index 2fbaf697..00000000 --- a/sdk/python/sdk/zrok/docs/OrganizationBody1.md +++ /dev/null @@ -1,9 +0,0 @@ -# OrganizationBody1 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/OrganizationListBody.md b/sdk/python/sdk/zrok/docs/OrganizationListBody.md deleted file mode 100644 index 2ceb8a7d..00000000 --- a/sdk/python/sdk/zrok/docs/OrganizationListBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# OrganizationListBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/OrganizationRemoveBody.md b/sdk/python/sdk/zrok/docs/OrganizationRemoveBody.md deleted file mode 100644 index f61c0b93..00000000 --- a/sdk/python/sdk/zrok/docs/OrganizationRemoveBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# OrganizationRemoveBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_token** | **str** | | [optional] -**email** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/Overview.md b/sdk/python/sdk/zrok/docs/Overview.md deleted file mode 100644 index 4d477740..00000000 --- a/sdk/python/sdk/zrok/docs/Overview.md +++ /dev/null @@ -1,10 +0,0 @@ -# Overview - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account_limited** | **bool** | | [optional] -**environments** | [**list[EnvironmentAndResources]**](EnvironmentAndResources.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/Principal.md b/sdk/python/sdk/zrok/docs/Principal.md deleted file mode 100644 index c45a677a..00000000 --- a/sdk/python/sdk/zrok/docs/Principal.md +++ /dev/null @@ -1,13 +0,0 @@ -# Principal - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**email** | **str** | | [optional] -**token** | **str** | | [optional] -**limitless** | **bool** | | [optional] -**admin** | **bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/RegenerateAccountTokenBody.md b/sdk/python/sdk/zrok/docs/RegenerateAccountTokenBody.md deleted file mode 100644 index 930d7945..00000000 --- a/sdk/python/sdk/zrok/docs/RegenerateAccountTokenBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# RegenerateAccountTokenBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email_address** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/RegenerateTokenBody.md b/sdk/python/sdk/zrok/docs/RegenerateTokenBody.md deleted file mode 100644 index 2c863aba..00000000 --- a/sdk/python/sdk/zrok/docs/RegenerateTokenBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# RegenerateTokenBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email_address** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/RegisterBody.md b/sdk/python/sdk/zrok/docs/RegisterBody.md deleted file mode 100644 index 0adc3fc8..00000000 --- a/sdk/python/sdk/zrok/docs/RegisterBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# RegisterBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**register_token** | **str** | | [optional] -**password** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/ResetPasswordBody.md b/sdk/python/sdk/zrok/docs/ResetPasswordBody.md deleted file mode 100644 index 9f74c6d6..00000000 --- a/sdk/python/sdk/zrok/docs/ResetPasswordBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# ResetPasswordBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**reset_token** | **str** | | [optional] -**password** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/ResetPasswordRequestBody.md b/sdk/python/sdk/zrok/docs/ResetPasswordRequestBody.md deleted file mode 100644 index a59834d9..00000000 --- a/sdk/python/sdk/zrok/docs/ResetPasswordRequestBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# ResetPasswordRequestBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email_address** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/Share.md b/sdk/python/sdk/zrok/docs/Share.md deleted file mode 100644 index 8a5d67ab..00000000 --- a/sdk/python/sdk/zrok/docs/Share.md +++ /dev/null @@ -1,20 +0,0 @@ -# Share - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**share_token** | **str** | | [optional] -**z_id** | **str** | | [optional] -**share_mode** | **str** | | [optional] -**backend_mode** | **str** | | [optional] -**frontend_selection** | **str** | | [optional] -**frontend_endpoint** | **str** | | [optional] -**backend_proxy_endpoint** | **str** | | [optional] -**reserved** | **bool** | | [optional] -**activity** | [**SparkData**](SparkData.md) | | [optional] -**limited** | **bool** | | [optional] -**created_at** | **int** | | [optional] -**updated_at** | **int** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/ShareApi.md b/sdk/python/sdk/zrok/docs/ShareApi.md deleted file mode 100644 index 86a8b390..00000000 --- a/sdk/python/sdk/zrok/docs/ShareApi.md +++ /dev/null @@ -1,315 +0,0 @@ -# zrok_api.ShareApi - -All URIs are relative to */api/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**access**](ShareApi.md#access) | **POST** /access | -[**share**](ShareApi.md#share) | **POST** /share | -[**unaccess**](ShareApi.md#unaccess) | **DELETE** /unaccess | -[**unshare**](ShareApi.md#unshare) | **DELETE** /unshare | -[**update_access**](ShareApi.md#update_access) | **PATCH** /access | -[**update_share**](ShareApi.md#update_share) | **PATCH** /share | - -# **access** -> InlineResponse2013 access(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.ShareApi(zrok_api.ApiClient(configuration)) -body = zrok_api.AccessBody() # AccessBody | (optional) - -try: - api_response = api_instance.access(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling ShareApi->access: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**AccessBody**](AccessBody.md)| | [optional] - -### Return type - -[**InlineResponse2013**](InlineResponse2013.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **share** -> ShareResponse share(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.ShareApi(zrok_api.ApiClient(configuration)) -body = zrok_api.ShareRequest() # ShareRequest | (optional) - -try: - api_response = api_instance.share(body=body) - pprint(api_response) -except ApiException as e: - print("Exception when calling ShareApi->share: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ShareRequest**](ShareRequest.md)| | [optional] - -### Return type - -[**ShareResponse**](ShareResponse.md) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **unaccess** -> unaccess(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.ShareApi(zrok_api.ApiClient(configuration)) -body = zrok_api.UnaccessBody() # UnaccessBody | (optional) - -try: - api_instance.unaccess(body=body) -except ApiException as e: - print("Exception when calling ShareApi->unaccess: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**UnaccessBody**](UnaccessBody.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **unshare** -> unshare(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.ShareApi(zrok_api.ApiClient(configuration)) -body = zrok_api.UnshareBody() # UnshareBody | (optional) - -try: - api_instance.unshare(body=body) -except ApiException as e: - print("Exception when calling ShareApi->unshare: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**UnshareBody**](UnshareBody.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: application/zrok.v1+json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **update_access** -> update_access(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.ShareApi(zrok_api.ApiClient(configuration)) -body = zrok_api.AccessBody1() # AccessBody1 | (optional) - -try: - api_instance.update_access(body=body) -except ApiException as e: - print("Exception when calling ShareApi->update_access: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**AccessBody1**](AccessBody1.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **update_share** -> update_share(body=body) - - - -### Example -```python -from __future__ import print_function -import time -import zrok_api -from zrok_api.rest import ApiException -from pprint import pprint - -# Configure API key authorization: key -configuration = zrok_api.Configuration() -configuration.api_key['x-token'] = 'YOUR_API_KEY' -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['x-token'] = 'Bearer' - -# create an instance of the API class -api_instance = zrok_api.ShareApi(zrok_api.ApiClient(configuration)) -body = zrok_api.ShareBody() # ShareBody | (optional) - -try: - api_instance.update_share(body=body) -except ApiException as e: - print("Exception when calling ShareApi->update_share: %s\n" % e) -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ShareBody**](ShareBody.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[key](../README.md#key) - -### HTTP request headers - - - **Content-Type**: application/zrok.v1+json - - **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/ShareBody.md b/sdk/python/sdk/zrok/docs/ShareBody.md deleted file mode 100644 index 4c01d818..00000000 --- a/sdk/python/sdk/zrok/docs/ShareBody.md +++ /dev/null @@ -1,12 +0,0 @@ -# ShareBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**share_token** | **str** | | [optional] -**backend_proxy_endpoint** | **str** | | [optional] -**add_access_grants** | **list[str]** | | [optional] -**remove_access_grants** | **list[str]** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/ShareRequest.md b/sdk/python/sdk/zrok/docs/ShareRequest.md deleted file mode 100644 index d1054fc7..00000000 --- a/sdk/python/sdk/zrok/docs/ShareRequest.md +++ /dev/null @@ -1,22 +0,0 @@ -# ShareRequest - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**env_zid** | **str** | | [optional] -**share_mode** | **str** | | [optional] -**frontend_selection** | **list[str]** | | [optional] -**backend_mode** | **str** | | [optional] -**backend_proxy_endpoint** | **str** | | [optional] -**auth_scheme** | **str** | | [optional] -**auth_users** | [**list[AuthUser]**](AuthUser.md) | | [optional] -**oauth_provider** | **str** | | [optional] -**oauth_email_domains** | **list[str]** | | [optional] -**oauth_authorization_check_interval** | **str** | | [optional] -**reserved** | **bool** | | [optional] -**permission_mode** | **str** | | [optional] -**access_grants** | **list[str]** | | [optional] -**unique_name** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/ShareResponse.md b/sdk/python/sdk/zrok/docs/ShareResponse.md deleted file mode 100644 index f6d09e89..00000000 --- a/sdk/python/sdk/zrok/docs/ShareResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# ShareResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_proxy_endpoints** | **list[str]** | | [optional] -**share_token** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/Shares.md b/sdk/python/sdk/zrok/docs/Shares.md deleted file mode 100644 index 5e8cabd6..00000000 --- a/sdk/python/sdk/zrok/docs/Shares.md +++ /dev/null @@ -1,8 +0,0 @@ -# Shares - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/SparkData.md b/sdk/python/sdk/zrok/docs/SparkData.md deleted file mode 100644 index a0065208..00000000 --- a/sdk/python/sdk/zrok/docs/SparkData.md +++ /dev/null @@ -1,8 +0,0 @@ -# SparkData - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/SparkDataSample.md b/sdk/python/sdk/zrok/docs/SparkDataSample.md deleted file mode 100644 index 192675b6..00000000 --- a/sdk/python/sdk/zrok/docs/SparkDataSample.md +++ /dev/null @@ -1,10 +0,0 @@ -# SparkDataSample - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**rx** | **float** | | [optional] -**tx** | **float** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/SparklinesBody.md b/sdk/python/sdk/zrok/docs/SparklinesBody.md deleted file mode 100644 index 94437504..00000000 --- a/sdk/python/sdk/zrok/docs/SparklinesBody.md +++ /dev/null @@ -1,11 +0,0 @@ -# SparklinesBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account** | **bool** | | [optional] -**environments** | **list[str]** | | [optional] -**shares** | **list[str]** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/TokenGenerateBody.md b/sdk/python/sdk/zrok/docs/TokenGenerateBody.md deleted file mode 100644 index 0622eb92..00000000 --- a/sdk/python/sdk/zrok/docs/TokenGenerateBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# TokenGenerateBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**invite_tokens** | **list[str]** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/UnaccessBody.md b/sdk/python/sdk/zrok/docs/UnaccessBody.md deleted file mode 100644 index d3bcdfbe..00000000 --- a/sdk/python/sdk/zrok/docs/UnaccessBody.md +++ /dev/null @@ -1,11 +0,0 @@ -# UnaccessBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frontend_token** | **str** | | [optional] -**env_zid** | **str** | | [optional] -**share_token** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/UnshareBody.md b/sdk/python/sdk/zrok/docs/UnshareBody.md deleted file mode 100644 index ec7c4dd1..00000000 --- a/sdk/python/sdk/zrok/docs/UnshareBody.md +++ /dev/null @@ -1,11 +0,0 @@ -# UnshareBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**env_zid** | **str** | | [optional] -**share_token** | **str** | | [optional] -**reserved** | **bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/VerifyBody.md b/sdk/python/sdk/zrok/docs/VerifyBody.md deleted file mode 100644 index 993e6a34..00000000 --- a/sdk/python/sdk/zrok/docs/VerifyBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# VerifyBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**register_token** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/Version.md b/sdk/python/sdk/zrok/docs/Version.md deleted file mode 100644 index 203ff4a1..00000000 --- a/sdk/python/sdk/zrok/docs/Version.md +++ /dev/null @@ -1,8 +0,0 @@ -# Version - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/VersionBody.md b/sdk/python/sdk/zrok/docs/VersionBody.md deleted file mode 100644 index 43f385ee..00000000 --- a/sdk/python/sdk/zrok/docs/VersionBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# VersionBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client_version** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/docs/VersionCheckBody.md b/sdk/python/sdk/zrok/docs/VersionCheckBody.md deleted file mode 100644 index b00f7a3f..00000000 --- a/sdk/python/sdk/zrok/docs/VersionCheckBody.md +++ /dev/null @@ -1,9 +0,0 @@ -# VersionCheckBody - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client_version** | **str** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/sdk/python/sdk/zrok/requirements.txt b/sdk/python/sdk/zrok/requirements.txt deleted file mode 100644 index bafdc075..00000000 --- a/sdk/python/sdk/zrok/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -certifi >= 14.05.14 -six >= 1.10 -python_dateutil >= 2.5.3 -setuptools >= 21.0.0 -urllib3 >= 1.15.1 diff --git a/sdk/python/sdk/zrok/setup.py b/sdk/python/sdk/zrok/setup.py deleted file mode 100644 index 3d0fc92b..00000000 --- a/sdk/python/sdk/zrok/setup.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from setuptools import setup, find_packages # noqa: H301 - -NAME = "zrok_sdk" -VERSION = "1.0.0" -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = ["urllib3 >= 1.15", "six >= 1.10", "certifi", "python-dateutil"] - -setup( - name=NAME, - version=VERSION, - description="zrok", - author_email="", - url="", - keywords=["Swagger", "zrok"], - install_requires=REQUIRES, - packages=find_packages(), - include_package_data=True, - long_description="""\ - zrok client access # noqa: E501 - """ -) diff --git a/sdk/python/sdk/zrok/test-requirements.txt b/sdk/python/sdk/zrok/test-requirements.txt deleted file mode 100644 index 2702246c..00000000 --- a/sdk/python/sdk/zrok/test-requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -coverage>=4.0.3 -nose>=1.3.7 -pluggy>=0.3.1 -py>=1.4.31 -randomize>=0.13 diff --git a/sdk/python/sdk/zrok/test/__init__.py b/sdk/python/sdk/zrok/test/__init__.py deleted file mode 100644 index 576f56f8..00000000 --- a/sdk/python/sdk/zrok/test/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# coding: utf-8 \ No newline at end of file diff --git a/sdk/python/sdk/zrok/test/test_access_body.py b/sdk/python/sdk/zrok/test/test_access_body.py deleted file mode 100644 index 7e936247..00000000 --- a/sdk/python/sdk/zrok/test/test_access_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.access_body import AccessBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestAccessBody(unittest.TestCase): - """AccessBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAccessBody(self): - """Test AccessBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.access_body.AccessBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_access_body1.py b/sdk/python/sdk/zrok/test/test_access_body1.py deleted file mode 100644 index 53e78285..00000000 --- a/sdk/python/sdk/zrok/test/test_access_body1.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.access_body1 import AccessBody1 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestAccessBody1(unittest.TestCase): - """AccessBody1 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAccessBody1(self): - """Test AccessBody1""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.access_body1.AccessBody1() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_account_api.py b/sdk/python/sdk/zrok/test/test_account_api.py deleted file mode 100644 index 2a02a258..00000000 --- a/sdk/python/sdk/zrok/test/test_account_api.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.api.account_api import AccountApi # noqa: E501 -from zrok_api.rest import ApiException - - -class TestAccountApi(unittest.TestCase): - """AccountApi unit test stubs""" - - def setUp(self): - self.api = AccountApi() # noqa: E501 - - def tearDown(self): - pass - - def test_change_password(self): - """Test case for change_password - - """ - pass - - def test_invite(self): - """Test case for invite - - """ - pass - - def test_login(self): - """Test case for login - - """ - pass - - def test_regenerate_token(self): - """Test case for regenerate_token - - """ - pass - - def test_register(self): - """Test case for register - - """ - pass - - def test_reset_password(self): - """Test case for reset_password - - """ - pass - - def test_reset_password_request(self): - """Test case for reset_password_request - - """ - pass - - def test_verify(self): - """Test case for verify - - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_account_body.py b/sdk/python/sdk/zrok/test/test_account_body.py deleted file mode 100644 index 56a6837a..00000000 --- a/sdk/python/sdk/zrok/test/test_account_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.account_body import AccountBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestAccountBody(unittest.TestCase): - """AccountBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAccountBody(self): - """Test AccountBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.account_body.AccountBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_admin_api.py b/sdk/python/sdk/zrok/test/test_admin_api.py deleted file mode 100644 index 5b9a30b4..00000000 --- a/sdk/python/sdk/zrok/test/test_admin_api.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.api.admin_api import AdminApi # noqa: E501 -from zrok_api.rest import ApiException - - -class TestAdminApi(unittest.TestCase): - """AdminApi unit test stubs""" - - def setUp(self): - self.api = AdminApi() # noqa: E501 - - def tearDown(self): - pass - - def test_add_organization_member(self): - """Test case for add_organization_member - - """ - pass - - def test_create_account(self): - """Test case for create_account - - """ - pass - - def test_create_frontend(self): - """Test case for create_frontend - - """ - pass - - def test_create_identity(self): - """Test case for create_identity - - """ - pass - - def test_create_organization(self): - """Test case for create_organization - - """ - pass - - def test_delete_frontend(self): - """Test case for delete_frontend - - """ - pass - - def test_delete_organization(self): - """Test case for delete_organization - - """ - pass - - def test_grants(self): - """Test case for grants - - """ - pass - - def test_invite_token_generate(self): - """Test case for invite_token_generate - - """ - pass - - def test_list_frontends(self): - """Test case for list_frontends - - """ - pass - - def test_list_organization_members(self): - """Test case for list_organization_members - - """ - pass - - def test_list_organizations(self): - """Test case for list_organizations - - """ - pass - - def test_remove_organization_member(self): - """Test case for remove_organization_member - - """ - pass - - def test_update_frontend(self): - """Test case for update_frontend - - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_auth_user.py b/sdk/python/sdk/zrok/test/test_auth_user.py deleted file mode 100644 index 3e362a20..00000000 --- a/sdk/python/sdk/zrok/test/test_auth_user.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.auth_user import AuthUser # noqa: E501 -from zrok_api.rest import ApiException - - -class TestAuthUser(unittest.TestCase): - """AuthUser unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAuthUser(self): - """Test AuthUser""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.auth_user.AuthUser() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_change_password_body.py b/sdk/python/sdk/zrok/test/test_change_password_body.py deleted file mode 100644 index d1ebf600..00000000 --- a/sdk/python/sdk/zrok/test/test_change_password_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.change_password_body import ChangePasswordBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestChangePasswordBody(unittest.TestCase): - """ChangePasswordBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testChangePasswordBody(self): - """Test ChangePasswordBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.change_password_body.ChangePasswordBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_client_version_check_body.py b/sdk/python/sdk/zrok/test/test_client_version_check_body.py deleted file mode 100644 index 11fec3f4..00000000 --- a/sdk/python/sdk/zrok/test/test_client_version_check_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.client_version_check_body import ClientVersionCheckBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestClientVersionCheckBody(unittest.TestCase): - """ClientVersionCheckBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testClientVersionCheckBody(self): - """Test ClientVersionCheckBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.client_version_check_body.ClientVersionCheckBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_configuration.py b/sdk/python/sdk/zrok/test/test_configuration.py deleted file mode 100644 index 29ad044b..00000000 --- a/sdk/python/sdk/zrok/test/test_configuration.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.configuration import Configuration # noqa: E501 -from zrok_api.rest import ApiException - - -class TestConfiguration(unittest.TestCase): - """Configuration unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testConfiguration(self): - """Test Configuration""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.configuration.Configuration() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_disable_body.py b/sdk/python/sdk/zrok/test/test_disable_body.py deleted file mode 100644 index ab342d59..00000000 --- a/sdk/python/sdk/zrok/test/test_disable_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.disable_body import DisableBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestDisableBody(unittest.TestCase): - """DisableBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testDisableBody(self): - """Test DisableBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.disable_body.DisableBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_enable_body.py b/sdk/python/sdk/zrok/test/test_enable_body.py deleted file mode 100644 index d3eec4b3..00000000 --- a/sdk/python/sdk/zrok/test/test_enable_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.enable_body import EnableBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestEnableBody(unittest.TestCase): - """EnableBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEnableBody(self): - """Test EnableBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.enable_body.EnableBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_environment.py b/sdk/python/sdk/zrok/test/test_environment.py deleted file mode 100644 index 3a339b29..00000000 --- a/sdk/python/sdk/zrok/test/test_environment.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.environment import Environment # noqa: E501 -from zrok_api.rest import ApiException - - -class TestEnvironment(unittest.TestCase): - """Environment unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEnvironment(self): - """Test Environment""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.environment.Environment() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_environment_and_resources.py b/sdk/python/sdk/zrok/test/test_environment_and_resources.py deleted file mode 100644 index ab4f4501..00000000 --- a/sdk/python/sdk/zrok/test/test_environment_and_resources.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.environment_and_resources import EnvironmentAndResources # noqa: E501 -from zrok_api.rest import ApiException - - -class TestEnvironmentAndResources(unittest.TestCase): - """EnvironmentAndResources unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEnvironmentAndResources(self): - """Test EnvironmentAndResources""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.environment_and_resources.EnvironmentAndResources() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_environment_api.py b/sdk/python/sdk/zrok/test/test_environment_api.py deleted file mode 100644 index c70480e6..00000000 --- a/sdk/python/sdk/zrok/test/test_environment_api.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.api.environment_api import EnvironmentApi # noqa: E501 -from zrok_api.rest import ApiException - - -class TestEnvironmentApi(unittest.TestCase): - """EnvironmentApi unit test stubs""" - - def setUp(self): - self.api = EnvironmentApi() # noqa: E501 - - def tearDown(self): - pass - - def test_disable(self): - """Test case for disable - - """ - pass - - def test_enable(self): - """Test case for enable - - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_environments.py b/sdk/python/sdk/zrok/test/test_environments.py deleted file mode 100644 index 21972eca..00000000 --- a/sdk/python/sdk/zrok/test/test_environments.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.environments import Environments # noqa: E501 -from zrok_api.rest import ApiException - - -class TestEnvironments(unittest.TestCase): - """Environments unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testEnvironments(self): - """Test Environments""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.environments.Environments() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_error_message.py b/sdk/python/sdk/zrok/test/test_error_message.py deleted file mode 100644 index db509710..00000000 --- a/sdk/python/sdk/zrok/test/test_error_message.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.error_message import ErrorMessage # noqa: E501 -from zrok_api.rest import ApiException - - -class TestErrorMessage(unittest.TestCase): - """ErrorMessage unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testErrorMessage(self): - """Test ErrorMessage""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.error_message.ErrorMessage() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_frontend.py b/sdk/python/sdk/zrok/test/test_frontend.py deleted file mode 100644 index 7b44e3ef..00000000 --- a/sdk/python/sdk/zrok/test/test_frontend.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.frontend import Frontend # noqa: E501 -from zrok_api.rest import ApiException - - -class TestFrontend(unittest.TestCase): - """Frontend unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testFrontend(self): - """Test Frontend""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.frontend.Frontend() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_frontend_body.py b/sdk/python/sdk/zrok/test/test_frontend_body.py deleted file mode 100644 index 8519edbc..00000000 --- a/sdk/python/sdk/zrok/test/test_frontend_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.frontend_body import FrontendBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestFrontendBody(unittest.TestCase): - """FrontendBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testFrontendBody(self): - """Test FrontendBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.frontend_body.FrontendBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_frontend_body1.py b/sdk/python/sdk/zrok/test/test_frontend_body1.py deleted file mode 100644 index 5a560aff..00000000 --- a/sdk/python/sdk/zrok/test/test_frontend_body1.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.frontend_body1 import FrontendBody1 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestFrontendBody1(unittest.TestCase): - """FrontendBody1 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testFrontendBody1(self): - """Test FrontendBody1""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.frontend_body1.FrontendBody1() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_frontend_body2.py b/sdk/python/sdk/zrok/test/test_frontend_body2.py deleted file mode 100644 index c8b2016c..00000000 --- a/sdk/python/sdk/zrok/test/test_frontend_body2.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.frontend_body2 import FrontendBody2 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestFrontendBody2(unittest.TestCase): - """FrontendBody2 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testFrontendBody2(self): - """Test FrontendBody2""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.frontend_body2.FrontendBody2() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_frontends.py b/sdk/python/sdk/zrok/test/test_frontends.py deleted file mode 100644 index cb96d34b..00000000 --- a/sdk/python/sdk/zrok/test/test_frontends.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.frontends import Frontends # noqa: E501 -from zrok_api.rest import ApiException - - -class TestFrontends(unittest.TestCase): - """Frontends unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testFrontends(self): - """Test Frontends""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.frontends.Frontends() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_grants_body.py b/sdk/python/sdk/zrok/test/test_grants_body.py deleted file mode 100644 index 431fd27b..00000000 --- a/sdk/python/sdk/zrok/test/test_grants_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.grants_body import GrantsBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestGrantsBody(unittest.TestCase): - """GrantsBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testGrantsBody(self): - """Test GrantsBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.grants_body.GrantsBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_identity_body.py b/sdk/python/sdk/zrok/test/test_identity_body.py deleted file mode 100644 index b3716d87..00000000 --- a/sdk/python/sdk/zrok/test/test_identity_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.identity_body import IdentityBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestIdentityBody(unittest.TestCase): - """IdentityBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testIdentityBody(self): - """Test IdentityBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.identity_body.IdentityBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response200.py b/sdk/python/sdk/zrok/test/test_inline_response200.py deleted file mode 100644 index a447716d..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response200.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response200 import InlineResponse200 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse200(unittest.TestCase): - """InlineResponse200 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse200(self): - """Test InlineResponse200""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response200.InlineResponse200() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2001.py b/sdk/python/sdk/zrok/test/test_inline_response2001.py deleted file mode 100644 index 73fc1356..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2001.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2001 import InlineResponse2001 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2001(unittest.TestCase): - """InlineResponse2001 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2001(self): - """Test InlineResponse2001""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2001.InlineResponse2001() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2002.py b/sdk/python/sdk/zrok/test/test_inline_response2002.py deleted file mode 100644 index 0230ae38..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2002.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2002 import InlineResponse2002 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2002(unittest.TestCase): - """InlineResponse2002 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2002(self): - """Test InlineResponse2002""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2002.InlineResponse2002() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2003.py b/sdk/python/sdk/zrok/test/test_inline_response2003.py deleted file mode 100644 index dc30845e..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2003.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2003 import InlineResponse2003 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2003(unittest.TestCase): - """InlineResponse2003 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2003(self): - """Test InlineResponse2003""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2003.InlineResponse2003() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2003_members.py b/sdk/python/sdk/zrok/test/test_inline_response2003_members.py deleted file mode 100644 index 1fd04fa1..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2003_members.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2003_members import InlineResponse2003Members # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2003Members(unittest.TestCase): - """InlineResponse2003Members unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2003Members(self): - """Test InlineResponse2003Members""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2003_members.InlineResponse2003Members() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2004.py b/sdk/python/sdk/zrok/test/test_inline_response2004.py deleted file mode 100644 index 264bc094..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2004.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2004 import InlineResponse2004 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2004(unittest.TestCase): - """InlineResponse2004 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2004(self): - """Test InlineResponse2004""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2004.InlineResponse2004() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2004_members.py b/sdk/python/sdk/zrok/test/test_inline_response2004_members.py deleted file mode 100644 index 7376a0b9..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2004_members.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2004_members import InlineResponse2004Members # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2004Members(unittest.TestCase): - """InlineResponse2004Members unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2004Members(self): - """Test InlineResponse2004Members""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2004_members.InlineResponse2004Members() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2004_organizations.py b/sdk/python/sdk/zrok/test/test_inline_response2004_organizations.py deleted file mode 100644 index 598471e6..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2004_organizations.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2004_organizations import InlineResponse2004Organizations # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2004Organizations(unittest.TestCase): - """InlineResponse2004Organizations unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2004Organizations(self): - """Test InlineResponse2004Organizations""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2004_organizations.InlineResponse2004Organizations() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2005.py b/sdk/python/sdk/zrok/test/test_inline_response2005.py deleted file mode 100644 index cf3b41ac..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2005.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2005 import InlineResponse2005 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2005(unittest.TestCase): - """InlineResponse2005 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2005(self): - """Test InlineResponse2005""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2005.InlineResponse2005() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2005_memberships.py b/sdk/python/sdk/zrok/test/test_inline_response2005_memberships.py deleted file mode 100644 index 230a6ac2..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2005_memberships.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2005_memberships import InlineResponse2005Memberships # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2005Memberships(unittest.TestCase): - """InlineResponse2005Memberships unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2005Memberships(self): - """Test InlineResponse2005Memberships""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2005_memberships.InlineResponse2005Memberships() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2005_organizations.py b/sdk/python/sdk/zrok/test/test_inline_response2005_organizations.py deleted file mode 100644 index 6c3e995e..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2005_organizations.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2005_organizations import InlineResponse2005Organizations # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2005Organizations(unittest.TestCase): - """InlineResponse2005Organizations unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2005Organizations(self): - """Test InlineResponse2005Organizations""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2005_organizations.InlineResponse2005Organizations() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2006.py b/sdk/python/sdk/zrok/test/test_inline_response2006.py deleted file mode 100644 index fd19aa10..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2006.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2006 import InlineResponse2006 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2006(unittest.TestCase): - """InlineResponse2006 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2006(self): - """Test InlineResponse2006""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2006.InlineResponse2006() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2006_memberships.py b/sdk/python/sdk/zrok/test/test_inline_response2006_memberships.py deleted file mode 100644 index 1a779c3e..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2006_memberships.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2006_memberships import InlineResponse2006Memberships # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2006Memberships(unittest.TestCase): - """InlineResponse2006Memberships unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2006Memberships(self): - """Test InlineResponse2006Memberships""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2006_memberships.InlineResponse2006Memberships() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2007.py b/sdk/python/sdk/zrok/test/test_inline_response2007.py deleted file mode 100644 index 52ae67ba..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2007.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2007 import InlineResponse2007 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2007(unittest.TestCase): - """InlineResponse2007 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2007(self): - """Test InlineResponse2007""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2007.InlineResponse2007() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response201.py b/sdk/python/sdk/zrok/test/test_inline_response201.py deleted file mode 100644 index 3c719ebd..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response201.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response201 import InlineResponse201 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse201(unittest.TestCase): - """InlineResponse201 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse201(self): - """Test InlineResponse201""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response201.InlineResponse201() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2011.py b/sdk/python/sdk/zrok/test/test_inline_response2011.py deleted file mode 100644 index 3594d34c..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2011.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2011 import InlineResponse2011 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2011(unittest.TestCase): - """InlineResponse2011 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2011(self): - """Test InlineResponse2011""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2011.InlineResponse2011() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2012.py b/sdk/python/sdk/zrok/test/test_inline_response2012.py deleted file mode 100644 index cc69a570..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2012.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2012 import InlineResponse2012 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2012(unittest.TestCase): - """InlineResponse2012 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2012(self): - """Test InlineResponse2012""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2012.InlineResponse2012() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response2013.py b/sdk/python/sdk/zrok/test/test_inline_response2013.py deleted file mode 100644 index 3b028a6c..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response2013.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response2013 import InlineResponse2013 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse2013(unittest.TestCase): - """InlineResponse2013 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse2013(self): - """Test InlineResponse2013""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response2013.InlineResponse2013() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_inline_response400.py b/sdk/python/sdk/zrok/test/test_inline_response400.py deleted file mode 100644 index 13e6f8c6..00000000 --- a/sdk/python/sdk/zrok/test/test_inline_response400.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.inline_response400 import InlineResponse400 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInlineResponse400(unittest.TestCase): - """InlineResponse400 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInlineResponse400(self): - """Test InlineResponse400""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.inline_response400.InlineResponse400() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_invite_body.py b/sdk/python/sdk/zrok/test/test_invite_body.py deleted file mode 100644 index 8228bdc0..00000000 --- a/sdk/python/sdk/zrok/test/test_invite_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.invite_body import InviteBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestInviteBody(unittest.TestCase): - """InviteBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testInviteBody(self): - """Test InviteBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.invite_body.InviteBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_login_body.py b/sdk/python/sdk/zrok/test/test_login_body.py deleted file mode 100644 index 3dd5df4d..00000000 --- a/sdk/python/sdk/zrok/test/test_login_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.login_body import LoginBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestLoginBody(unittest.TestCase): - """LoginBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testLoginBody(self): - """Test LoginBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.login_body.LoginBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_metadata_api.py b/sdk/python/sdk/zrok/test/test_metadata_api.py deleted file mode 100644 index 4d75a9a4..00000000 --- a/sdk/python/sdk/zrok/test/test_metadata_api.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.api.metadata_api import MetadataApi # noqa: E501 -from zrok_api.rest import ApiException - - -class TestMetadataApi(unittest.TestCase): - """MetadataApi unit test stubs""" - - def setUp(self): - self.api = MetadataApi() # noqa: E501 - - def tearDown(self): - pass - - def test_configuration(self): - """Test case for configuration - - """ - pass - - def test_get_account_detail(self): - """Test case for get_account_detail - - """ - pass - - def test_get_account_metrics(self): - """Test case for get_account_metrics - - """ - pass - - def test_get_environment_detail(self): - """Test case for get_environment_detail - - """ - pass - - def test_get_environment_metrics(self): - """Test case for get_environment_metrics - - """ - pass - - def test_get_frontend_detail(self): - """Test case for get_frontend_detail - - """ - pass - - def test_get_share_detail(self): - """Test case for get_share_detail - - """ - pass - - def test_get_share_metrics(self): - """Test case for get_share_metrics - - """ - pass - - def test_get_sparklines(self): - """Test case for get_sparklines - - """ - pass - - def test_list_memberships(self): - """Test case for list_memberships - - """ - pass - - def test_list_org_members(self): - """Test case for list_org_members - - """ - pass - - def test_org_account_overview(self): - """Test case for org_account_overview - - """ - pass - - def test_overview(self): - """Test case for overview - - """ - pass - - def test_version(self): - """Test case for version - - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_metrics.py b/sdk/python/sdk/zrok/test/test_metrics.py deleted file mode 100644 index 71ae9c2a..00000000 --- a/sdk/python/sdk/zrok/test/test_metrics.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.metrics import Metrics # noqa: E501 -from zrok_api.rest import ApiException - - -class TestMetrics(unittest.TestCase): - """Metrics unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testMetrics(self): - """Test Metrics""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.metrics.Metrics() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_metrics_sample.py b/sdk/python/sdk/zrok/test/test_metrics_sample.py deleted file mode 100644 index 19e956f0..00000000 --- a/sdk/python/sdk/zrok/test/test_metrics_sample.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.metrics_sample import MetricsSample # noqa: E501 -from zrok_api.rest import ApiException - - -class TestMetricsSample(unittest.TestCase): - """MetricsSample unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testMetricsSample(self): - """Test MetricsSample""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.metrics_sample.MetricsSample() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_organization_add_body.py b/sdk/python/sdk/zrok/test/test_organization_add_body.py deleted file mode 100644 index 13274497..00000000 --- a/sdk/python/sdk/zrok/test/test_organization_add_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.organization_add_body import OrganizationAddBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestOrganizationAddBody(unittest.TestCase): - """OrganizationAddBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testOrganizationAddBody(self): - """Test OrganizationAddBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.organization_add_body.OrganizationAddBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_organization_body.py b/sdk/python/sdk/zrok/test/test_organization_body.py deleted file mode 100644 index 05e57436..00000000 --- a/sdk/python/sdk/zrok/test/test_organization_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.organization_body import OrganizationBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestOrganizationBody(unittest.TestCase): - """OrganizationBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testOrganizationBody(self): - """Test OrganizationBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.organization_body.OrganizationBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_organization_body1.py b/sdk/python/sdk/zrok/test/test_organization_body1.py deleted file mode 100644 index 930378cb..00000000 --- a/sdk/python/sdk/zrok/test/test_organization_body1.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.organization_body1 import OrganizationBody1 # noqa: E501 -from zrok_api.rest import ApiException - - -class TestOrganizationBody1(unittest.TestCase): - """OrganizationBody1 unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testOrganizationBody1(self): - """Test OrganizationBody1""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.organization_body1.OrganizationBody1() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_organization_list_body.py b/sdk/python/sdk/zrok/test/test_organization_list_body.py deleted file mode 100644 index b43c57e4..00000000 --- a/sdk/python/sdk/zrok/test/test_organization_list_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.organization_list_body import OrganizationListBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestOrganizationListBody(unittest.TestCase): - """OrganizationListBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testOrganizationListBody(self): - """Test OrganizationListBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.organization_list_body.OrganizationListBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_organization_remove_body.py b/sdk/python/sdk/zrok/test/test_organization_remove_body.py deleted file mode 100644 index 07128ed8..00000000 --- a/sdk/python/sdk/zrok/test/test_organization_remove_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.organization_remove_body import OrganizationRemoveBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestOrganizationRemoveBody(unittest.TestCase): - """OrganizationRemoveBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testOrganizationRemoveBody(self): - """Test OrganizationRemoveBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.organization_remove_body.OrganizationRemoveBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_overview.py b/sdk/python/sdk/zrok/test/test_overview.py deleted file mode 100644 index 8a92ad55..00000000 --- a/sdk/python/sdk/zrok/test/test_overview.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.overview import Overview # noqa: E501 -from zrok_api.rest import ApiException - - -class TestOverview(unittest.TestCase): - """Overview unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testOverview(self): - """Test Overview""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.overview.Overview() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_principal.py b/sdk/python/sdk/zrok/test/test_principal.py deleted file mode 100644 index f38cb221..00000000 --- a/sdk/python/sdk/zrok/test/test_principal.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.principal import Principal # noqa: E501 -from zrok_api.rest import ApiException - - -class TestPrincipal(unittest.TestCase): - """Principal unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testPrincipal(self): - """Test Principal""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.principal.Principal() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_regenerate_account_token_body.py b/sdk/python/sdk/zrok/test/test_regenerate_account_token_body.py deleted file mode 100644 index 405b07c4..00000000 --- a/sdk/python/sdk/zrok/test/test_regenerate_account_token_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.regenerate_account_token_body import RegenerateAccountTokenBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestRegenerateAccountTokenBody(unittest.TestCase): - """RegenerateAccountTokenBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testRegenerateAccountTokenBody(self): - """Test RegenerateAccountTokenBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.regenerate_account_token_body.RegenerateAccountTokenBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_regenerate_token_body.py b/sdk/python/sdk/zrok/test/test_regenerate_token_body.py deleted file mode 100644 index adfd771e..00000000 --- a/sdk/python/sdk/zrok/test/test_regenerate_token_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.regenerate_token_body import RegenerateTokenBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestRegenerateTokenBody(unittest.TestCase): - """RegenerateTokenBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testRegenerateTokenBody(self): - """Test RegenerateTokenBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.regenerate_token_body.RegenerateTokenBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_register_body.py b/sdk/python/sdk/zrok/test/test_register_body.py deleted file mode 100644 index fe72be1e..00000000 --- a/sdk/python/sdk/zrok/test/test_register_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.register_body import RegisterBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestRegisterBody(unittest.TestCase): - """RegisterBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testRegisterBody(self): - """Test RegisterBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.register_body.RegisterBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_reset_password_body.py b/sdk/python/sdk/zrok/test/test_reset_password_body.py deleted file mode 100644 index f4c4561d..00000000 --- a/sdk/python/sdk/zrok/test/test_reset_password_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.reset_password_body import ResetPasswordBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestResetPasswordBody(unittest.TestCase): - """ResetPasswordBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testResetPasswordBody(self): - """Test ResetPasswordBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.reset_password_body.ResetPasswordBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_reset_password_request_body.py b/sdk/python/sdk/zrok/test/test_reset_password_request_body.py deleted file mode 100644 index d9a3360b..00000000 --- a/sdk/python/sdk/zrok/test/test_reset_password_request_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.reset_password_request_body import ResetPasswordRequestBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestResetPasswordRequestBody(unittest.TestCase): - """ResetPasswordRequestBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testResetPasswordRequestBody(self): - """Test ResetPasswordRequestBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.reset_password_request_body.ResetPasswordRequestBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_share.py b/sdk/python/sdk/zrok/test/test_share.py deleted file mode 100644 index 80a16c16..00000000 --- a/sdk/python/sdk/zrok/test/test_share.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.share import Share # noqa: E501 -from zrok_api.rest import ApiException - - -class TestShare(unittest.TestCase): - """Share unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testShare(self): - """Test Share""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.share.Share() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_share_api.py b/sdk/python/sdk/zrok/test/test_share_api.py deleted file mode 100644 index e799f3c8..00000000 --- a/sdk/python/sdk/zrok/test/test_share_api.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.api.share_api import ShareApi # noqa: E501 -from zrok_api.rest import ApiException - - -class TestShareApi(unittest.TestCase): - """ShareApi unit test stubs""" - - def setUp(self): - self.api = ShareApi() # noqa: E501 - - def tearDown(self): - pass - - def test_access(self): - """Test case for access - - """ - pass - - def test_share(self): - """Test case for share - - """ - pass - - def test_unaccess(self): - """Test case for unaccess - - """ - pass - - def test_unshare(self): - """Test case for unshare - - """ - pass - - def test_update_share(self): - """Test case for update_share - - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_share_body.py b/sdk/python/sdk/zrok/test/test_share_body.py deleted file mode 100644 index fcbdb3a2..00000000 --- a/sdk/python/sdk/zrok/test/test_share_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.share_body import ShareBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestShareBody(unittest.TestCase): - """ShareBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testShareBody(self): - """Test ShareBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.share_body.ShareBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_share_request.py b/sdk/python/sdk/zrok/test/test_share_request.py deleted file mode 100644 index 79abd431..00000000 --- a/sdk/python/sdk/zrok/test/test_share_request.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.share_request import ShareRequest # noqa: E501 -from zrok_api.rest import ApiException - - -class TestShareRequest(unittest.TestCase): - """ShareRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testShareRequest(self): - """Test ShareRequest""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.share_request.ShareRequest() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_share_response.py b/sdk/python/sdk/zrok/test/test_share_response.py deleted file mode 100644 index e2ef3f94..00000000 --- a/sdk/python/sdk/zrok/test/test_share_response.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.share_response import ShareResponse # noqa: E501 -from zrok_api.rest import ApiException - - -class TestShareResponse(unittest.TestCase): - """ShareResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testShareResponse(self): - """Test ShareResponse""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.share_response.ShareResponse() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_shares.py b/sdk/python/sdk/zrok/test/test_shares.py deleted file mode 100644 index f225a196..00000000 --- a/sdk/python/sdk/zrok/test/test_shares.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.shares import Shares # noqa: E501 -from zrok_api.rest import ApiException - - -class TestShares(unittest.TestCase): - """Shares unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testShares(self): - """Test Shares""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.shares.Shares() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_spark_data.py b/sdk/python/sdk/zrok/test/test_spark_data.py deleted file mode 100644 index 0543758e..00000000 --- a/sdk/python/sdk/zrok/test/test_spark_data.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.spark_data import SparkData # noqa: E501 -from zrok_api.rest import ApiException - - -class TestSparkData(unittest.TestCase): - """SparkData unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testSparkData(self): - """Test SparkData""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.spark_data.SparkData() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_spark_data_sample.py b/sdk/python/sdk/zrok/test/test_spark_data_sample.py deleted file mode 100644 index 993babe2..00000000 --- a/sdk/python/sdk/zrok/test/test_spark_data_sample.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.spark_data_sample import SparkDataSample # noqa: E501 -from zrok_api.rest import ApiException - - -class TestSparkDataSample(unittest.TestCase): - """SparkDataSample unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testSparkDataSample(self): - """Test SparkDataSample""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.spark_data_sample.SparkDataSample() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_sparklines_body.py b/sdk/python/sdk/zrok/test/test_sparklines_body.py deleted file mode 100644 index 00165b62..00000000 --- a/sdk/python/sdk/zrok/test/test_sparklines_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.sparklines_body import SparklinesBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestSparklinesBody(unittest.TestCase): - """SparklinesBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testSparklinesBody(self): - """Test SparklinesBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.sparklines_body.SparklinesBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_token_generate_body.py b/sdk/python/sdk/zrok/test/test_token_generate_body.py deleted file mode 100644 index 990712d1..00000000 --- a/sdk/python/sdk/zrok/test/test_token_generate_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.token_generate_body import TokenGenerateBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestTokenGenerateBody(unittest.TestCase): - """TokenGenerateBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTokenGenerateBody(self): - """Test TokenGenerateBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.token_generate_body.TokenGenerateBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_unaccess_body.py b/sdk/python/sdk/zrok/test/test_unaccess_body.py deleted file mode 100644 index 23e63156..00000000 --- a/sdk/python/sdk/zrok/test/test_unaccess_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.unaccess_body import UnaccessBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestUnaccessBody(unittest.TestCase): - """UnaccessBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testUnaccessBody(self): - """Test UnaccessBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.unaccess_body.UnaccessBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_unshare_body.py b/sdk/python/sdk/zrok/test/test_unshare_body.py deleted file mode 100644 index 23236afe..00000000 --- a/sdk/python/sdk/zrok/test/test_unshare_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.unshare_body import UnshareBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestUnshareBody(unittest.TestCase): - """UnshareBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testUnshareBody(self): - """Test UnshareBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.unshare_body.UnshareBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_verify_body.py b/sdk/python/sdk/zrok/test/test_verify_body.py deleted file mode 100644 index 9148441b..00000000 --- a/sdk/python/sdk/zrok/test/test_verify_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.verify_body import VerifyBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestVerifyBody(unittest.TestCase): - """VerifyBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testVerifyBody(self): - """Test VerifyBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.verify_body.VerifyBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_version.py b/sdk/python/sdk/zrok/test/test_version.py deleted file mode 100644 index cad9c632..00000000 --- a/sdk/python/sdk/zrok/test/test_version.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.version import Version # noqa: E501 -from zrok_api.rest import ApiException - - -class TestVersion(unittest.TestCase): - """Version unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testVersion(self): - """Test Version""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.version.Version() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_version_body.py b/sdk/python/sdk/zrok/test/test_version_body.py deleted file mode 100644 index 1c0a1898..00000000 --- a/sdk/python/sdk/zrok/test/test_version_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.version_body import VersionBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestVersionBody(unittest.TestCase): - """VersionBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testVersionBody(self): - """Test VersionBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.version_body.VersionBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/test/test_version_check_body.py b/sdk/python/sdk/zrok/test/test_version_check_body.py deleted file mode 100644 index 5ba46b33..00000000 --- a/sdk/python/sdk/zrok/test/test_version_check_body.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import unittest - -import zrok_api -from zrok_api.models.version_check_body import VersionCheckBody # noqa: E501 -from zrok_api.rest import ApiException - - -class TestVersionCheckBody(unittest.TestCase): - """VersionCheckBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testVersionCheckBody(self): - """Test VersionCheckBody""" - # FIXME: construct object with mandatory attributes with example values - # model = zrok_api.models.version_check_body.VersionCheckBody() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/sdk/zrok/tox.ini b/sdk/python/sdk/zrok/tox.ini deleted file mode 100644 index a310bec9..00000000 --- a/sdk/python/sdk/zrok/tox.ini +++ /dev/null @@ -1,10 +0,0 @@ -[tox] -envlist = py3 - -[testenv] -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - nosetests \ - [] diff --git a/sdk/python/sdk/zrok/zrok_api/__init__.py b/sdk/python/sdk/zrok/zrok_api/__init__.py deleted file mode 100644 index a231330e..00000000 --- a/sdk/python/sdk/zrok/zrok_api/__init__.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -# import apis into sdk package -from zrok_api.api.account_api import AccountApi -from zrok_api.api.admin_api import AdminApi -from zrok_api.api.environment_api import EnvironmentApi -from zrok_api.api.metadata_api import MetadataApi -from zrok_api.api.share_api import ShareApi -# import ApiClient -from zrok_api.api_client import ApiClient -from zrok_api.configuration import Configuration -# import models into sdk package -from zrok_api.models.access_body import AccessBody -from zrok_api.models.access_body1 import AccessBody1 -from zrok_api.models.account_body import AccountBody -from zrok_api.models.auth_user import AuthUser -from zrok_api.models.change_password_body import ChangePasswordBody -from zrok_api.models.client_version_check_body import ClientVersionCheckBody -from zrok_api.models.configuration import Configuration -from zrok_api.models.disable_body import DisableBody -from zrok_api.models.enable_body import EnableBody -from zrok_api.models.environment import Environment -from zrok_api.models.environment_and_resources import EnvironmentAndResources -from zrok_api.models.environments import Environments -from zrok_api.models.error_message import ErrorMessage -from zrok_api.models.frontend import Frontend -from zrok_api.models.frontend_body import FrontendBody -from zrok_api.models.frontend_body1 import FrontendBody1 -from zrok_api.models.frontend_body2 import FrontendBody2 -from zrok_api.models.frontends import Frontends -from zrok_api.models.grants_body import GrantsBody -from zrok_api.models.identity_body import IdentityBody -from zrok_api.models.inline_response200 import InlineResponse200 -from zrok_api.models.inline_response2001 import InlineResponse2001 -from zrok_api.models.inline_response2002 import InlineResponse2002 -from zrok_api.models.inline_response2003 import InlineResponse2003 -from zrok_api.models.inline_response2003_members import InlineResponse2003Members -from zrok_api.models.inline_response2004 import InlineResponse2004 -from zrok_api.models.inline_response2004_organizations import InlineResponse2004Organizations -from zrok_api.models.inline_response2005 import InlineResponse2005 -from zrok_api.models.inline_response2005_memberships import InlineResponse2005Memberships -from zrok_api.models.inline_response2006 import InlineResponse2006 -from zrok_api.models.inline_response2007 import InlineResponse2007 -from zrok_api.models.inline_response201 import InlineResponse201 -from zrok_api.models.inline_response2011 import InlineResponse2011 -from zrok_api.models.inline_response2012 import InlineResponse2012 -from zrok_api.models.inline_response2013 import InlineResponse2013 -from zrok_api.models.invite_body import InviteBody -from zrok_api.models.login_body import LoginBody -from zrok_api.models.metrics import Metrics -from zrok_api.models.metrics_sample import MetricsSample -from zrok_api.models.organization_add_body import OrganizationAddBody -from zrok_api.models.organization_body import OrganizationBody -from zrok_api.models.organization_body1 import OrganizationBody1 -from zrok_api.models.organization_list_body import OrganizationListBody -from zrok_api.models.organization_remove_body import OrganizationRemoveBody -from zrok_api.models.overview import Overview -from zrok_api.models.principal import Principal -from zrok_api.models.regenerate_account_token_body import RegenerateAccountTokenBody -from zrok_api.models.register_body import RegisterBody -from zrok_api.models.reset_password_body import ResetPasswordBody -from zrok_api.models.reset_password_request_body import ResetPasswordRequestBody -from zrok_api.models.share import Share -from zrok_api.models.share_body import ShareBody -from zrok_api.models.share_request import ShareRequest -from zrok_api.models.share_response import ShareResponse -from zrok_api.models.shares import Shares -from zrok_api.models.spark_data import SparkData -from zrok_api.models.spark_data_sample import SparkDataSample -from zrok_api.models.sparklines_body import SparklinesBody -from zrok_api.models.token_generate_body import TokenGenerateBody -from zrok_api.models.unaccess_body import UnaccessBody -from zrok_api.models.unshare_body import UnshareBody -from zrok_api.models.verify_body import VerifyBody -from zrok_api.models.version import Version diff --git a/sdk/python/sdk/zrok/zrok_api/api/__init__.py b/sdk/python/sdk/zrok/zrok_api/api/__init__.py deleted file mode 100644 index d07ab757..00000000 --- a/sdk/python/sdk/zrok/zrok_api/api/__init__.py +++ /dev/null @@ -1,10 +0,0 @@ -from __future__ import absolute_import - -# flake8: noqa - -# import apis into api package -from zrok_api.api.account_api import AccountApi -from zrok_api.api.admin_api import AdminApi -from zrok_api.api.environment_api import EnvironmentApi -from zrok_api.api.metadata_api import MetadataApi -from zrok_api.api.share_api import ShareApi diff --git a/sdk/python/sdk/zrok/zrok_api/api/account_api.py b/sdk/python/sdk/zrok/zrok_api/api/account_api.py deleted file mode 100644 index 8a85d9e1..00000000 --- a/sdk/python/sdk/zrok/zrok_api/api/account_api.py +++ /dev/null @@ -1,773 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from zrok_api.api_client import ApiClient - - -class AccountApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def change_password(self, **kwargs): # noqa: E501 - """change_password # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.change_password(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ChangePasswordBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.change_password_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.change_password_with_http_info(**kwargs) # noqa: E501 - return data - - def change_password_with_http_info(self, **kwargs): # noqa: E501 - """change_password # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.change_password_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ChangePasswordBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method change_password" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/changePassword', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def invite(self, **kwargs): # noqa: E501 - """invite # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.invite(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param InviteBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.invite_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.invite_with_http_info(**kwargs) # noqa: E501 - return data - - def invite_with_http_info(self, **kwargs): # noqa: E501 - """invite # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.invite_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param InviteBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method invite" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/invite', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def login(self, **kwargs): # noqa: E501 - """login # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.login(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param LoginBody body: - :return: str - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.login_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.login_with_http_info(**kwargs) # noqa: E501 - return data - - def login_with_http_info(self, **kwargs): # noqa: E501 - """login # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.login_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param LoginBody body: - :return: str - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method login" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/login', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='str', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def regenerate_account_token(self, **kwargs): # noqa: E501 - """regenerate_account_token # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.regenerate_account_token(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param RegenerateAccountTokenBody body: - :return: InlineResponse200 - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.regenerate_account_token_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.regenerate_account_token_with_http_info(**kwargs) # noqa: E501 - return data - - def regenerate_account_token_with_http_info(self, **kwargs): # noqa: E501 - """regenerate_account_token # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.regenerate_account_token_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param RegenerateAccountTokenBody body: - :return: InlineResponse200 - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method regenerate_account_token" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/regenerateAccountToken', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='InlineResponse200', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def register(self, **kwargs): # noqa: E501 - """register # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.register(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param RegisterBody body: - :return: InlineResponse200 - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.register_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.register_with_http_info(**kwargs) # noqa: E501 - return data - - def register_with_http_info(self, **kwargs): # noqa: E501 - """register # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.register_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param RegisterBody body: - :return: InlineResponse200 - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method register" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/register', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='InlineResponse200', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def reset_password(self, **kwargs): # noqa: E501 - """reset_password # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.reset_password(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ResetPasswordBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.reset_password_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.reset_password_with_http_info(**kwargs) # noqa: E501 - return data - - def reset_password_with_http_info(self, **kwargs): # noqa: E501 - """reset_password # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.reset_password_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ResetPasswordBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method reset_password" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/resetPassword', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def reset_password_request(self, **kwargs): # noqa: E501 - """reset_password_request # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.reset_password_request(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ResetPasswordRequestBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.reset_password_request_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.reset_password_request_with_http_info(**kwargs) # noqa: E501 - return data - - def reset_password_request_with_http_info(self, **kwargs): # noqa: E501 - """reset_password_request # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.reset_password_request_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ResetPasswordRequestBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method reset_password_request" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/resetPasswordRequest', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def verify(self, **kwargs): # noqa: E501 - """verify # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.verify(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param VerifyBody body: - :return: InlineResponse2001 - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.verify_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.verify_with_http_info(**kwargs) # noqa: E501 - return data - - def verify_with_http_info(self, **kwargs): # noqa: E501 - """verify # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.verify_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param VerifyBody body: - :return: InlineResponse2001 - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method verify" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/verify', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='InlineResponse2001', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/sdk/python/sdk/zrok/zrok_api/api/admin_api.py b/sdk/python/sdk/zrok/zrok_api/api/admin_api.py deleted file mode 100644 index 081dbe65..00000000 --- a/sdk/python/sdk/zrok/zrok_api/api/admin_api.py +++ /dev/null @@ -1,1291 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from zrok_api.api_client import ApiClient - - -class AdminApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def add_organization_member(self, **kwargs): # noqa: E501 - """add_organization_member # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_organization_member(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param OrganizationAddBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.add_organization_member_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.add_organization_member_with_http_info(**kwargs) # noqa: E501 - return data - - def add_organization_member_with_http_info(self, **kwargs): # noqa: E501 - """add_organization_member # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_organization_member_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param OrganizationAddBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method add_organization_member" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/organization/add', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def create_account(self, **kwargs): # noqa: E501 - """create_account # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_account(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param AccountBody body: - :return: InlineResponse200 - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_account_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.create_account_with_http_info(**kwargs) # noqa: E501 - return data - - def create_account_with_http_info(self, **kwargs): # noqa: E501 - """create_account # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_account_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param AccountBody body: - :return: InlineResponse200 - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method create_account" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/account', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='InlineResponse200', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def create_frontend(self, **kwargs): # noqa: E501 - """create_frontend # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_frontend(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param FrontendBody body: - :return: InlineResponse201 - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_frontend_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.create_frontend_with_http_info(**kwargs) # noqa: E501 - return data - - def create_frontend_with_http_info(self, **kwargs): # noqa: E501 - """create_frontend # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_frontend_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param FrontendBody body: - :return: InlineResponse201 - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method create_frontend" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/frontend', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='InlineResponse201', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def create_identity(self, **kwargs): # noqa: E501 - """create_identity # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_identity(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param IdentityBody body: - :return: InlineResponse2011 - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_identity_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.create_identity_with_http_info(**kwargs) # noqa: E501 - return data - - def create_identity_with_http_info(self, **kwargs): # noqa: E501 - """create_identity # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_identity_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param IdentityBody body: - :return: InlineResponse2011 - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method create_identity" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/identity', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='InlineResponse2011', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def create_organization(self, **kwargs): # noqa: E501 - """create_organization # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_organization(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param OrganizationBody body: - :return: InlineResponse2012 - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_organization_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.create_organization_with_http_info(**kwargs) # noqa: E501 - return data - - def create_organization_with_http_info(self, **kwargs): # noqa: E501 - """create_organization # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_organization_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param OrganizationBody body: - :return: InlineResponse2012 - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method create_organization" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/organization', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='InlineResponse2012', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_frontend(self, **kwargs): # noqa: E501 - """delete_frontend # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_frontend(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param FrontendBody1 body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_frontend_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.delete_frontend_with_http_info(**kwargs) # noqa: E501 - return data - - def delete_frontend_with_http_info(self, **kwargs): # noqa: E501 - """delete_frontend # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_frontend_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param FrontendBody1 body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_frontend" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/frontend', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_organization(self, **kwargs): # noqa: E501 - """delete_organization # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_organization(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param OrganizationBody1 body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_organization_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.delete_organization_with_http_info(**kwargs) # noqa: E501 - return data - - def delete_organization_with_http_info(self, **kwargs): # noqa: E501 - """delete_organization # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_organization_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param OrganizationBody1 body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_organization" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/organization', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def grants(self, **kwargs): # noqa: E501 - """grants # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.grants(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param GrantsBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.grants_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.grants_with_http_info(**kwargs) # noqa: E501 - return data - - def grants_with_http_info(self, **kwargs): # noqa: E501 - """grants # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.grants_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param GrantsBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method grants" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/grants', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def invite_token_generate(self, **kwargs): # noqa: E501 - """invite_token_generate # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.invite_token_generate(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param TokenGenerateBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.invite_token_generate_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.invite_token_generate_with_http_info(**kwargs) # noqa: E501 - return data - - def invite_token_generate_with_http_info(self, **kwargs): # noqa: E501 - """invite_token_generate # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.invite_token_generate_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param TokenGenerateBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method invite_token_generate" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/invite/token/generate', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_frontends(self, **kwargs): # noqa: E501 - """list_frontends # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_frontends(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: list[InlineResponse2002] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.list_frontends_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.list_frontends_with_http_info(**kwargs) # noqa: E501 - return data - - def list_frontends_with_http_info(self, **kwargs): # noqa: E501 - """list_frontends # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_frontends_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: list[InlineResponse2002] - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method list_frontends" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/frontends', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[InlineResponse2002]', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_organization_members(self, **kwargs): # noqa: E501 - """list_organization_members # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_organization_members(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param OrganizationListBody body: - :return: InlineResponse2003 - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.list_organization_members_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.list_organization_members_with_http_info(**kwargs) # noqa: E501 - return data - - def list_organization_members_with_http_info(self, **kwargs): # noqa: E501 - """list_organization_members # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_organization_members_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param OrganizationListBody body: - :return: InlineResponse2003 - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method list_organization_members" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/organization/list', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='InlineResponse2003', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_organizations(self, **kwargs): # noqa: E501 - """list_organizations # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_organizations(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: InlineResponse2004 - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.list_organizations_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.list_organizations_with_http_info(**kwargs) # noqa: E501 - return data - - def list_organizations_with_http_info(self, **kwargs): # noqa: E501 - """list_organizations # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_organizations_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: InlineResponse2004 - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method list_organizations" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/organizations', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='InlineResponse2004', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def remove_organization_member(self, **kwargs): # noqa: E501 - """remove_organization_member # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.remove_organization_member(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param OrganizationRemoveBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.remove_organization_member_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.remove_organization_member_with_http_info(**kwargs) # noqa: E501 - return data - - def remove_organization_member_with_http_info(self, **kwargs): # noqa: E501 - """remove_organization_member # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.remove_organization_member_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param OrganizationRemoveBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method remove_organization_member" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/organization/remove', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def update_frontend(self, **kwargs): # noqa: E501 - """update_frontend # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_frontend(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param FrontendBody2 body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.update_frontend_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.update_frontend_with_http_info(**kwargs) # noqa: E501 - return data - - def update_frontend_with_http_info(self, **kwargs): # noqa: E501 - """update_frontend # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_frontend_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param FrontendBody2 body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method update_frontend" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/frontend', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/sdk/python/sdk/zrok/zrok_api/api/environment_api.py b/sdk/python/sdk/zrok/zrok_api/api/environment_api.py deleted file mode 100644 index 16bc987e..00000000 --- a/sdk/python/sdk/zrok/zrok_api/api/environment_api.py +++ /dev/null @@ -1,215 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from zrok_api.api_client import ApiClient - - -class EnvironmentApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def disable(self, **kwargs): # noqa: E501 - """disable # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.disable(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param DisableBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.disable_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.disable_with_http_info(**kwargs) # noqa: E501 - return data - - def disable_with_http_info(self, **kwargs): # noqa: E501 - """disable # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.disable_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param DisableBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method disable" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/disable', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def enable(self, **kwargs): # noqa: E501 - """enable # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.enable(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param EnableBody body: - :return: InlineResponse2011 - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.enable_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.enable_with_http_info(**kwargs) # noqa: E501 - return data - - def enable_with_http_info(self, **kwargs): # noqa: E501 - """enable # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.enable_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param EnableBody body: - :return: InlineResponse2011 - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method enable" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/enable', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='InlineResponse2011', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/sdk/python/sdk/zrok/zrok_api/api/metadata_api.py b/sdk/python/sdk/zrok/zrok_api/api/metadata_api.py deleted file mode 100644 index 1afe9e25..00000000 --- a/sdk/python/sdk/zrok/zrok_api/api/metadata_api.py +++ /dev/null @@ -1,1485 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from zrok_api.api_client import ApiClient - - -class MetadataApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def client_version_check(self, **kwargs): # noqa: E501 - """client_version_check # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.client_version_check(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ClientVersionCheckBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.client_version_check_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.client_version_check_with_http_info(**kwargs) # noqa: E501 - return data - - def client_version_check_with_http_info(self, **kwargs): # noqa: E501 - """client_version_check # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.client_version_check_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ClientVersionCheckBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method client_version_check" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/clientVersionCheck', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def configuration(self, **kwargs): # noqa: E501 - """configuration # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.configuration(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: Configuration - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.configuration_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.configuration_with_http_info(**kwargs) # noqa: E501 - return data - - def configuration_with_http_info(self, **kwargs): # noqa: E501 - """configuration # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.configuration_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: Configuration - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method configuration" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/configuration', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Configuration', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_account_detail(self, **kwargs): # noqa: E501 - """get_account_detail # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_account_detail(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: Environments - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_account_detail_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_account_detail_with_http_info(**kwargs) # noqa: E501 - return data - - def get_account_detail_with_http_info(self, **kwargs): # noqa: E501 - """get_account_detail # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_account_detail_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: Environments - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_account_detail" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/detail/account', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Environments', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_account_metrics(self, **kwargs): # noqa: E501 - """get_account_metrics # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_account_metrics(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str duration: - :return: Metrics - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_account_metrics_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_account_metrics_with_http_info(**kwargs) # noqa: E501 - return data - - def get_account_metrics_with_http_info(self, **kwargs): # noqa: E501 - """get_account_metrics # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_account_metrics_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str duration: - :return: Metrics - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['duration'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_account_metrics" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'duration' in params: - query_params.append(('duration', params['duration'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/metrics/account', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Metrics', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_environment_detail(self, env_zid, **kwargs): # noqa: E501 - """get_environment_detail # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_environment_detail(env_zid, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str env_zid: (required) - :return: EnvironmentAndResources - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_environment_detail_with_http_info(env_zid, **kwargs) # noqa: E501 - else: - (data) = self.get_environment_detail_with_http_info(env_zid, **kwargs) # noqa: E501 - return data - - def get_environment_detail_with_http_info(self, env_zid, **kwargs): # noqa: E501 - """get_environment_detail # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_environment_detail_with_http_info(env_zid, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str env_zid: (required) - :return: EnvironmentAndResources - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['env_zid'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_environment_detail" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'env_zid' is set - if ('env_zid' not in params or - params['env_zid'] is None): - raise ValueError("Missing the required parameter `env_zid` when calling `get_environment_detail`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'env_zid' in params: - path_params['envZId'] = params['env_zid'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/detail/environment/{envZId}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='EnvironmentAndResources', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_environment_metrics(self, env_id, **kwargs): # noqa: E501 - """get_environment_metrics # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_environment_metrics(env_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str env_id: (required) - :param str duration: - :return: Metrics - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_environment_metrics_with_http_info(env_id, **kwargs) # noqa: E501 - else: - (data) = self.get_environment_metrics_with_http_info(env_id, **kwargs) # noqa: E501 - return data - - def get_environment_metrics_with_http_info(self, env_id, **kwargs): # noqa: E501 - """get_environment_metrics # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_environment_metrics_with_http_info(env_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str env_id: (required) - :param str duration: - :return: Metrics - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['env_id', 'duration'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_environment_metrics" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'env_id' is set - if ('env_id' not in params or - params['env_id'] is None): - raise ValueError("Missing the required parameter `env_id` when calling `get_environment_metrics`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'env_id' in params: - path_params['envId'] = params['env_id'] # noqa: E501 - - query_params = [] - if 'duration' in params: - query_params.append(('duration', params['duration'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/metrics/environment/{envId}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Metrics', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_frontend_detail(self, frontend_id, **kwargs): # noqa: E501 - """get_frontend_detail # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_frontend_detail(frontend_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int frontend_id: (required) - :return: Frontend - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_frontend_detail_with_http_info(frontend_id, **kwargs) # noqa: E501 - else: - (data) = self.get_frontend_detail_with_http_info(frontend_id, **kwargs) # noqa: E501 - return data - - def get_frontend_detail_with_http_info(self, frontend_id, **kwargs): # noqa: E501 - """get_frontend_detail # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_frontend_detail_with_http_info(frontend_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int frontend_id: (required) - :return: Frontend - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['frontend_id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_frontend_detail" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'frontend_id' is set - if ('frontend_id' not in params or - params['frontend_id'] is None): - raise ValueError("Missing the required parameter `frontend_id` when calling `get_frontend_detail`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'frontend_id' in params: - path_params['frontendId'] = params['frontend_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/detail/frontend/{frontendId}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Frontend', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_share_detail(self, share_token, **kwargs): # noqa: E501 - """get_share_detail # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_share_detail(share_token, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str share_token: (required) - :return: Share - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_share_detail_with_http_info(share_token, **kwargs) # noqa: E501 - else: - (data) = self.get_share_detail_with_http_info(share_token, **kwargs) # noqa: E501 - return data - - def get_share_detail_with_http_info(self, share_token, **kwargs): # noqa: E501 - """get_share_detail # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_share_detail_with_http_info(share_token, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str share_token: (required) - :return: Share - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['share_token'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_share_detail" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'share_token' is set - if ('share_token' not in params or - params['share_token'] is None): - raise ValueError("Missing the required parameter `share_token` when calling `get_share_detail`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'share_token' in params: - path_params['shareToken'] = params['share_token'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/detail/share/{shareToken}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Share', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_share_metrics(self, share_token, **kwargs): # noqa: E501 - """get_share_metrics # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_share_metrics(share_token, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str share_token: (required) - :param str duration: - :return: Metrics - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_share_metrics_with_http_info(share_token, **kwargs) # noqa: E501 - else: - (data) = self.get_share_metrics_with_http_info(share_token, **kwargs) # noqa: E501 - return data - - def get_share_metrics_with_http_info(self, share_token, **kwargs): # noqa: E501 - """get_share_metrics # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_share_metrics_with_http_info(share_token, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str share_token: (required) - :param str duration: - :return: Metrics - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['share_token', 'duration'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_share_metrics" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'share_token' is set - if ('share_token' not in params or - params['share_token'] is None): - raise ValueError("Missing the required parameter `share_token` when calling `get_share_metrics`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'share_token' in params: - path_params['shareToken'] = params['share_token'] # noqa: E501 - - query_params = [] - if 'duration' in params: - query_params.append(('duration', params['duration'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/metrics/share/{shareToken}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Metrics', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_sparklines(self, **kwargs): # noqa: E501 - """get_sparklines # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_sparklines(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param SparklinesBody body: - :return: InlineResponse2006 - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_sparklines_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_sparklines_with_http_info(**kwargs) # noqa: E501 - return data - - def get_sparklines_with_http_info(self, **kwargs): # noqa: E501 - """get_sparklines # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_sparklines_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param SparklinesBody body: - :return: InlineResponse2006 - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_sparklines" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/sparklines', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='InlineResponse2006', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_memberships(self, **kwargs): # noqa: E501 - """list_memberships # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_memberships(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: InlineResponse2005 - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.list_memberships_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.list_memberships_with_http_info(**kwargs) # noqa: E501 - return data - - def list_memberships_with_http_info(self, **kwargs): # noqa: E501 - """list_memberships # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_memberships_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: InlineResponse2005 - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method list_memberships" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/memberships', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='InlineResponse2005', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_org_members(self, organization_token, **kwargs): # noqa: E501 - """list_org_members # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_org_members(organization_token, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str organization_token: (required) - :return: InlineResponse2003 - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.list_org_members_with_http_info(organization_token, **kwargs) # noqa: E501 - else: - (data) = self.list_org_members_with_http_info(organization_token, **kwargs) # noqa: E501 - return data - - def list_org_members_with_http_info(self, organization_token, **kwargs): # noqa: E501 - """list_org_members # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_org_members_with_http_info(organization_token, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str organization_token: (required) - :return: InlineResponse2003 - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['organization_token'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method list_org_members" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'organization_token' is set - if ('organization_token' not in params or - params['organization_token'] is None): - raise ValueError("Missing the required parameter `organization_token` when calling `list_org_members`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'organization_token' in params: - path_params['organizationToken'] = params['organization_token'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/members/{organizationToken}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='InlineResponse2003', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def org_account_overview(self, organization_token, account_email, **kwargs): # noqa: E501 - """org_account_overview # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.org_account_overview(organization_token, account_email, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str organization_token: (required) - :param str account_email: (required) - :return: Overview - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.org_account_overview_with_http_info(organization_token, account_email, **kwargs) # noqa: E501 - else: - (data) = self.org_account_overview_with_http_info(organization_token, account_email, **kwargs) # noqa: E501 - return data - - def org_account_overview_with_http_info(self, organization_token, account_email, **kwargs): # noqa: E501 - """org_account_overview # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.org_account_overview_with_http_info(organization_token, account_email, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str organization_token: (required) - :param str account_email: (required) - :return: Overview - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['organization_token', 'account_email'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method org_account_overview" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'organization_token' is set - if ('organization_token' not in params or - params['organization_token'] is None): - raise ValueError("Missing the required parameter `organization_token` when calling `org_account_overview`") # noqa: E501 - # verify the required parameter 'account_email' is set - if ('account_email' not in params or - params['account_email'] is None): - raise ValueError("Missing the required parameter `account_email` when calling `org_account_overview`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'organization_token' in params: - path_params['organizationToken'] = params['organization_token'] # noqa: E501 - if 'account_email' in params: - path_params['accountEmail'] = params['account_email'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/overview/{organizationToken}/{accountEmail}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Overview', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def overview(self, **kwargs): # noqa: E501 - """overview # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.overview(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: Overview - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.overview_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.overview_with_http_info(**kwargs) # noqa: E501 - return data - - def overview_with_http_info(self, **kwargs): # noqa: E501 - """overview # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.overview_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: Overview - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method overview" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/overview', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Overview', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def version(self, **kwargs): # noqa: E501 - """version # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.version(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: Version - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.version_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.version_with_http_info(**kwargs) # noqa: E501 - return data - - def version_with_http_info(self, **kwargs): # noqa: E501 - """version # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.version_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: Version - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method version" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/version', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Version', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def version_inventory(self, **kwargs): # noqa: E501 - """version_inventory # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.version_inventory(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: InlineResponse2007 - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.version_inventory_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.version_inventory_with_http_info(**kwargs) # noqa: E501 - return data - - def version_inventory_with_http_info(self, **kwargs): # noqa: E501 - """version_inventory # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.version_inventory_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: InlineResponse2007 - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method version_inventory" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/versions', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='InlineResponse2007', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/sdk/python/sdk/zrok/zrok_api/api/share_api.py b/sdk/python/sdk/zrok/zrok_api/api/share_api.py deleted file mode 100644 index 49362e17..00000000 --- a/sdk/python/sdk/zrok/zrok_api/api/share_api.py +++ /dev/null @@ -1,579 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from zrok_api.api_client import ApiClient - - -class ShareApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def access(self, **kwargs): # noqa: E501 - """access # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.access(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param AccessBody body: - :return: InlineResponse2013 - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.access_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.access_with_http_info(**kwargs) # noqa: E501 - return data - - def access_with_http_info(self, **kwargs): # noqa: E501 - """access # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.access_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param AccessBody body: - :return: InlineResponse2013 - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method access" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/access', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='InlineResponse2013', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def share(self, **kwargs): # noqa: E501 - """share # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.share(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ShareRequest body: - :return: ShareResponse - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.share_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.share_with_http_info(**kwargs) # noqa: E501 - return data - - def share_with_http_info(self, **kwargs): # noqa: E501 - """share # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.share_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ShareRequest body: - :return: ShareResponse - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method share" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/share', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ShareResponse', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def unaccess(self, **kwargs): # noqa: E501 - """unaccess # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.unaccess(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param UnaccessBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.unaccess_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.unaccess_with_http_info(**kwargs) # noqa: E501 - return data - - def unaccess_with_http_info(self, **kwargs): # noqa: E501 - """unaccess # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.unaccess_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param UnaccessBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method unaccess" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/unaccess', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def unshare(self, **kwargs): # noqa: E501 - """unshare # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.unshare(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param UnshareBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.unshare_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.unshare_with_http_info(**kwargs) # noqa: E501 - return data - - def unshare_with_http_info(self, **kwargs): # noqa: E501 - """unshare # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.unshare_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param UnshareBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method unshare" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/zrok.v1+json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/unshare', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def update_access(self, **kwargs): # noqa: E501 - """update_access # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_access(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param AccessBody1 body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.update_access_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.update_access_with_http_info(**kwargs) # noqa: E501 - return data - - def update_access_with_http_info(self, **kwargs): # noqa: E501 - """update_access # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_access_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param AccessBody1 body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method update_access" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/access', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def update_share(self, **kwargs): # noqa: E501 - """update_share # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_share(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ShareBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.update_share_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.update_share_with_http_info(**kwargs) # noqa: E501 - return data - - def update_share_with_http_info(self, **kwargs): # noqa: E501 - """update_share # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_share_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ShareBody body: - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method update_share" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/zrok.v1+json']) # noqa: E501 - - # Authentication setting - auth_settings = ['key'] # noqa: E501 - - return self.api_client.call_api( - '/share', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/sdk/python/sdk/zrok/zrok_api/api_client.py b/sdk/python/sdk/zrok/zrok_api/api_client.py deleted file mode 100644 index f917a79b..00000000 --- a/sdk/python/sdk/zrok/zrok_api/api_client.py +++ /dev/null @@ -1,632 +0,0 @@ -# coding: utf-8 -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" -from __future__ import absolute_import - -import datetime -import json -import mimetypes -from multiprocessing.pool import ThreadPool -import os -import re -import tempfile - -# python 2 and python 3 compatibility library -import six -from six.moves.urllib.parse import quote - -from zrok_api.configuration import Configuration -import zrok_api.models -from zrok_api import rest - - -class ApiClient(object): - """Generic API client for Swagger client library builds. - - Swagger generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the Swagger - templates. - - NOTE: This class is auto generated by the swagger code generator program. - Ref: https://github.com/swagger-api/swagger-codegen - Do not edit the class manually. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int if six.PY3 else long, # noqa: F821 - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - - def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None): - if configuration is None: - configuration = Configuration() - self.configuration = configuration - - self.pool = ThreadPool() - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'Swagger-Codegen/1.0.0/python' - - def __del__(self): - self.pool.close() - self.pool.join() - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - def __call_api( - self, resource_path, method, path_params=None, - query_params=None, header_params=None, body=None, post_params=None, - files=None, response_type=None, auth_settings=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None): - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict(self.parameters_to_tuples(header_params, - collection_formats)) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples(path_params, - collection_formats) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - query_params = self.parameters_to_tuples(query_params, - collection_formats) - - # post parameters - if post_params or files: - post_params = self.prepare_post_parameters(post_params, files) - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples(post_params, - collection_formats) - - # auth setting - self.update_params_for_auth(header_params, query_params, auth_settings) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - url = self.configuration.host + resource_path - - # perform request and return response - response_data = self.request( - method, url, query_params=query_params, headers=header_params, - post_params=post_params, body=body, - _preload_content=_preload_content, - _request_timeout=_request_timeout) - - self.last_response = response_data - - return_data = response_data - if _preload_content: - # deserialize response data - if response_type: - return_data = self.deserialize(response_data, response_type) - else: - return_data = None - - if _return_http_data_only: - return (return_data) - else: - return (return_data, response_data.status, - response_data.getheaders()) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is swagger model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [self.sanitize_for_serialization(sub_obj) - for sub_obj in obj] - elif isinstance(obj, tuple): - return tuple(self.sanitize_for_serialization(sub_obj) - for sub_obj in obj) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - if isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `swagger_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) - for attr, _ in six.iteritems(obj.swagger_types) - if getattr(obj, attr) is not None} - - return {key: self.sanitize_for_serialization(val) - for key, val in six.iteritems(obj_dict)} - - def deserialize(self, response, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - # handle file downloading - # save response body into a tmp file and return the instance - if response_type == "file": - return self.__deserialize_file(response) - - # fetch data from response object - try: - data = json.loads(response.data) - except ValueError: - data = response.data - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if type(klass) == str: - if klass.startswith('list['): - sub_kls = re.match(r'list\[(.*)\]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('dict('): - sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in six.iteritems(data)} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(zrok_api.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datatime(data) - else: - return self.__deserialize_model(data, klass) - - def call_api(self, resource_path, method, - path_params=None, query_params=None, header_params=None, - body=None, post_params=None, files=None, - response_type=None, auth_settings=None, async_req=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None): - """Makes the HTTP request (synchronous) and returns deserialized data. - - To make an async request, set the async_req parameter. - - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param response: Response data type. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: - If async_req parameter is True, - the request will be called asynchronously. - The method will return the request thread. - If parameter async_req is False or missing, - then the method will return the response directly. - """ - if not async_req: - return self.__call_api(resource_path, method, - path_params, query_params, header_params, - body, post_params, files, - response_type, auth_settings, - _return_http_data_only, collection_formats, - _preload_content, _request_timeout) - else: - thread = self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, query_params, - header_params, body, - post_params, files, - response_type, auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, _request_timeout)) - return thread - - def request(self, method, url, query_params=None, headers=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): - """Makes the HTTP request using RESTClient.""" - if method == "GET": - return self.rest_client.GET(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "HEAD": - return self.rest_client.HEAD(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "OPTIONS": - return self.rest_client.OPTIONS(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "POST": - return self.rest_client.POST(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PUT": - return self.rest_client.PUT(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PATCH": - return self.rest_client.PATCH(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "DELETE": - return self.rest_client.DELETE(url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - else: - raise ValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501 - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def prepare_post_parameters(self, post_params=None, files=None): - """Builds form parameters. - - :param post_params: Normal form parameters. - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if post_params: - params = post_params - - if files: - for k, v in six.iteritems(files): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = (mimetypes.guess_type(filename)[0] or - 'application/octet-stream') - params.append( - tuple([k, tuple([filename, filedata, mimetype])])) - - return params - - def select_header_accept(self, accepts): - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return - - accepts = [x.lower() for x in accepts] - - if 'application/json' in accepts: - return 'application/json' - else: - return ', '.join(accepts) - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return 'application/json' - - content_types = [x.lower() for x in content_types] - - if 'application/json' in content_types or '*/*' in content_types: - return 'application/json' - else: - return content_types[0] - - def update_params_for_auth(self, headers, querys, auth_settings): - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param querys: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - """ - if not auth_settings: - return - - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - if not auth_setting['value']: - continue - elif auth_setting['in'] == 'header': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - querys.append((auth_setting['key'], auth_setting['value'])) - else: - raise ValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) - path = os.path.join(os.path.dirname(path), filename) - response_data = response.data - with open(path, "wb") as f: - if isinstance(response_data, str): - # change str to bytes so we can write it - response_data = response_data.encode('utf-8') - f.write(response_data) - else: - f.write(response_data) - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return six.text_type(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return a original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - from dateutil.parser import parse - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datatime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - from dateutil.parser import parse - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __hasattr(self, object, name): - return name in object.__class__.__dict__ - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - if not klass.swagger_types and not self.__hasattr(klass, 'get_real_child_model'): - return data - - kwargs = {} - if klass.swagger_types is not None: - for attr, attr_type in six.iteritems(klass.swagger_types): - if (data is not None and - klass.attribute_map[attr] in data and - isinstance(data, (list, dict))): - value = data[klass.attribute_map[attr]] - kwargs[attr] = self.__deserialize(value, attr_type) - - instance = klass(**kwargs) - - if (isinstance(instance, dict) and - klass.swagger_types is not None and - isinstance(data, dict)): - for key, value in data.items(): - if key not in klass.swagger_types: - instance[key] = value - if self.__hasattr(instance, 'get_real_child_model'): - klass_name = instance.get_real_child_model(data) - if klass_name: - instance = self.__deserialize(data, klass_name) - return instance diff --git a/sdk/python/sdk/zrok/zrok_api/configuration.py b/sdk/python/sdk/zrok/zrok_api/configuration.py deleted file mode 100644 index 331c27b7..00000000 --- a/sdk/python/sdk/zrok/zrok_api/configuration.py +++ /dev/null @@ -1,251 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import copy -import logging -import multiprocessing -import sys -import urllib3 - -import six -from six.moves import http_client as httplib - - -class TypeWithDefault(type): - def __init__(cls, name, bases, dct): - super(TypeWithDefault, cls).__init__(name, bases, dct) - cls._default = None - - def __call__(cls): - if cls._default is None: - cls._default = type.__call__(cls) - return copy.copy(cls._default) - - def set_default(cls, default): - cls._default = copy.copy(default) - - -class Configuration(six.with_metaclass(TypeWithDefault, object)): - """NOTE: This class is auto generated by the swagger code generator program. - - Ref: https://github.com/swagger-api/swagger-codegen - Do not edit the class manually. - """ - - def __init__(self): - """Constructor""" - # Default Base url - self.host = "/api/v1" - # Temp file folder for downloading files - self.temp_folder_path = None - - # Authentication Settings - # dict to store API key(s) - self.api_key = {} - # dict to store API prefix (e.g. Bearer) - self.api_key_prefix = {} - # function to refresh API key if expired - self.refresh_api_key_hook = None - # Username for HTTP basic authentication - self.username = "" - # Password for HTTP basic authentication - self.password = "" - # Logging Settings - self.logger = {} - self.logger["package_logger"] = logging.getLogger("zrok_api") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - # Log format - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - # Log stream handler - self.logger_stream_handler = None - # Log file handler - self.logger_file_handler = None - # Debug file location - self.logger_file = None - # Debug switch - self.debug = False - - # SSL/TLS verification - # Set this to false to skip verifying SSL certificate when calling API - # from https server. - self.verify_ssl = True - # Set this to customize the certificate file to verify the peer. - self.ssl_ca_cert = None - # client certificate file - self.cert_file = None - # client key file - self.key_file = None - # Set this to True/False to enable/disable SSL hostname verification. - self.assert_hostname = None - - # urllib3 connection pool's maximum number of connections saved - # per pool. urllib3 uses 1 connection as default value, but this is - # not the best value when you are making a lot of possibly parallel - # requests to the same host, which is often the case here. - # cpu_count * 5 is used as default value to increase performance. - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - - # Proxy URL - self.proxy = None - # Safe chars for path_param - self.safe_chars_for_path_param = '' - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in six.iteritems(self.logger): - logger.addHandler(self.logger_file_handler) - if self.logger_stream_handler: - logger.removeHandler(self.logger_stream_handler) - else: - # If not set logging file, - # then add stream handler and remove file handler. - self.logger_stream_handler = logging.StreamHandler() - self.logger_stream_handler.setFormatter(self.logger_formatter) - for _, logger in six.iteritems(self.logger): - logger.addHandler(self.logger_stream_handler) - if self.logger_file_handler: - logger.removeHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in six.iteritems(self.logger): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in six.iteritems(self.logger): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook: - self.refresh_api_key_hook(self) - - key = self.api_key.get(identifier) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - return urllib3.util.make_headers( - basic_auth=self.username + ':' + self.password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - return { - 'key': - { - 'type': 'api_key', - 'in': 'header', - 'key': 'x-token', - 'value': self.get_api_key_with_prefix('x-token') - }, - } - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 1.0.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) diff --git a/sdk/python/sdk/zrok/zrok_api/models/__init__.py b/sdk/python/sdk/zrok/zrok_api/models/__init__.py deleted file mode 100644 index c59710d3..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/__init__.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -# import models into model package -from zrok_api.models.access_body import AccessBody -from zrok_api.models.access_body1 import AccessBody1 -from zrok_api.models.account_body import AccountBody -from zrok_api.models.auth_user import AuthUser -from zrok_api.models.change_password_body import ChangePasswordBody -from zrok_api.models.client_version_check_body import ClientVersionCheckBody -from zrok_api.models.configuration import Configuration -from zrok_api.models.disable_body import DisableBody -from zrok_api.models.enable_body import EnableBody -from zrok_api.models.environment import Environment -from zrok_api.models.environment_and_resources import EnvironmentAndResources -from zrok_api.models.environments import Environments -from zrok_api.models.error_message import ErrorMessage -from zrok_api.models.frontend import Frontend -from zrok_api.models.frontend_body import FrontendBody -from zrok_api.models.frontend_body1 import FrontendBody1 -from zrok_api.models.frontend_body2 import FrontendBody2 -from zrok_api.models.frontends import Frontends -from zrok_api.models.grants_body import GrantsBody -from zrok_api.models.identity_body import IdentityBody -from zrok_api.models.inline_response200 import InlineResponse200 -from zrok_api.models.inline_response2001 import InlineResponse2001 -from zrok_api.models.inline_response2002 import InlineResponse2002 -from zrok_api.models.inline_response2003 import InlineResponse2003 -from zrok_api.models.inline_response2003_members import InlineResponse2003Members -from zrok_api.models.inline_response2004 import InlineResponse2004 -from zrok_api.models.inline_response2004_organizations import InlineResponse2004Organizations -from zrok_api.models.inline_response2005 import InlineResponse2005 -from zrok_api.models.inline_response2005_memberships import InlineResponse2005Memberships -from zrok_api.models.inline_response2006 import InlineResponse2006 -from zrok_api.models.inline_response2007 import InlineResponse2007 -from zrok_api.models.inline_response201 import InlineResponse201 -from zrok_api.models.inline_response2011 import InlineResponse2011 -from zrok_api.models.inline_response2012 import InlineResponse2012 -from zrok_api.models.inline_response2013 import InlineResponse2013 -from zrok_api.models.invite_body import InviteBody -from zrok_api.models.login_body import LoginBody -from zrok_api.models.metrics import Metrics -from zrok_api.models.metrics_sample import MetricsSample -from zrok_api.models.organization_add_body import OrganizationAddBody -from zrok_api.models.organization_body import OrganizationBody -from zrok_api.models.organization_body1 import OrganizationBody1 -from zrok_api.models.organization_list_body import OrganizationListBody -from zrok_api.models.organization_remove_body import OrganizationRemoveBody -from zrok_api.models.overview import Overview -from zrok_api.models.principal import Principal -from zrok_api.models.regenerate_account_token_body import RegenerateAccountTokenBody -from zrok_api.models.register_body import RegisterBody -from zrok_api.models.reset_password_body import ResetPasswordBody -from zrok_api.models.reset_password_request_body import ResetPasswordRequestBody -from zrok_api.models.share import Share -from zrok_api.models.share_body import ShareBody -from zrok_api.models.share_request import ShareRequest -from zrok_api.models.share_response import ShareResponse -from zrok_api.models.shares import Shares -from zrok_api.models.spark_data import SparkData -from zrok_api.models.spark_data_sample import SparkDataSample -from zrok_api.models.sparklines_body import SparklinesBody -from zrok_api.models.token_generate_body import TokenGenerateBody -from zrok_api.models.unaccess_body import UnaccessBody -from zrok_api.models.unshare_body import UnshareBody -from zrok_api.models.verify_body import VerifyBody -from zrok_api.models.version import Version diff --git a/sdk/python/sdk/zrok/zrok_api/models/access_body.py b/sdk/python/sdk/zrok/zrok_api/models/access_body.py deleted file mode 100644 index ca0ded7f..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/access_body.py +++ /dev/null @@ -1,188 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class AccessBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'env_zid': 'str', - 'share_token': 'str', - 'bind_address': 'str', - 'description': 'str' - } - - attribute_map = { - 'env_zid': 'envZId', - 'share_token': 'shareToken', - 'bind_address': 'bindAddress', - 'description': 'description' - } - - def __init__(self, env_zid=None, share_token=None, bind_address=None, description=None): # noqa: E501 - """AccessBody - a model defined in Swagger""" # noqa: E501 - self._env_zid = None - self._share_token = None - self._bind_address = None - self._description = None - self.discriminator = None - if env_zid is not None: - self.env_zid = env_zid - if share_token is not None: - self.share_token = share_token - if bind_address is not None: - self.bind_address = bind_address - if description is not None: - self.description = description - - @property - def env_zid(self): - """Gets the env_zid of this AccessBody. # noqa: E501 - - - :return: The env_zid of this AccessBody. # noqa: E501 - :rtype: str - """ - return self._env_zid - - @env_zid.setter - def env_zid(self, env_zid): - """Sets the env_zid of this AccessBody. - - - :param env_zid: The env_zid of this AccessBody. # noqa: E501 - :type: str - """ - - self._env_zid = env_zid - - @property - def share_token(self): - """Gets the share_token of this AccessBody. # noqa: E501 - - - :return: The share_token of this AccessBody. # noqa: E501 - :rtype: str - """ - return self._share_token - - @share_token.setter - def share_token(self, share_token): - """Sets the share_token of this AccessBody. - - - :param share_token: The share_token of this AccessBody. # noqa: E501 - :type: str - """ - - self._share_token = share_token - - @property - def bind_address(self): - """Gets the bind_address of this AccessBody. # noqa: E501 - - - :return: The bind_address of this AccessBody. # noqa: E501 - :rtype: str - """ - return self._bind_address - - @bind_address.setter - def bind_address(self, bind_address): - """Sets the bind_address of this AccessBody. - - - :param bind_address: The bind_address of this AccessBody. # noqa: E501 - :type: str - """ - - self._bind_address = bind_address - - @property - def description(self): - """Gets the description of this AccessBody. # noqa: E501 - - - :return: The description of this AccessBody. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this AccessBody. - - - :param description: The description of this AccessBody. # noqa: E501 - :type: str - """ - - self._description = description - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(AccessBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AccessBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/access_body1.py b/sdk/python/sdk/zrok/zrok_api/models/access_body1.py deleted file mode 100644 index 97855ec4..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/access_body1.py +++ /dev/null @@ -1,162 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class AccessBody1(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'frontend_token': 'str', - 'bind_address': 'str', - 'description': 'str' - } - - attribute_map = { - 'frontend_token': 'frontendToken', - 'bind_address': 'bindAddress', - 'description': 'description' - } - - def __init__(self, frontend_token=None, bind_address=None, description=None): # noqa: E501 - """AccessBody1 - a model defined in Swagger""" # noqa: E501 - self._frontend_token = None - self._bind_address = None - self._description = None - self.discriminator = None - if frontend_token is not None: - self.frontend_token = frontend_token - if bind_address is not None: - self.bind_address = bind_address - if description is not None: - self.description = description - - @property - def frontend_token(self): - """Gets the frontend_token of this AccessBody1. # noqa: E501 - - - :return: The frontend_token of this AccessBody1. # noqa: E501 - :rtype: str - """ - return self._frontend_token - - @frontend_token.setter - def frontend_token(self, frontend_token): - """Sets the frontend_token of this AccessBody1. - - - :param frontend_token: The frontend_token of this AccessBody1. # noqa: E501 - :type: str - """ - - self._frontend_token = frontend_token - - @property - def bind_address(self): - """Gets the bind_address of this AccessBody1. # noqa: E501 - - - :return: The bind_address of this AccessBody1. # noqa: E501 - :rtype: str - """ - return self._bind_address - - @bind_address.setter - def bind_address(self, bind_address): - """Sets the bind_address of this AccessBody1. - - - :param bind_address: The bind_address of this AccessBody1. # noqa: E501 - :type: str - """ - - self._bind_address = bind_address - - @property - def description(self): - """Gets the description of this AccessBody1. # noqa: E501 - - - :return: The description of this AccessBody1. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this AccessBody1. - - - :param description: The description of this AccessBody1. # noqa: E501 - :type: str - """ - - self._description = description - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(AccessBody1, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AccessBody1): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/account_body.py b/sdk/python/sdk/zrok/zrok_api/models/account_body.py deleted file mode 100644 index ea261eb0..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/account_body.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class AccountBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'email': 'str', - 'password': 'str' - } - - attribute_map = { - 'email': 'email', - 'password': 'password' - } - - def __init__(self, email=None, password=None): # noqa: E501 - """AccountBody - a model defined in Swagger""" # noqa: E501 - self._email = None - self._password = None - self.discriminator = None - if email is not None: - self.email = email - if password is not None: - self.password = password - - @property - def email(self): - """Gets the email of this AccountBody. # noqa: E501 - - - :return: The email of this AccountBody. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this AccountBody. - - - :param email: The email of this AccountBody. # noqa: E501 - :type: str - """ - - self._email = email - - @property - def password(self): - """Gets the password of this AccountBody. # noqa: E501 - - - :return: The password of this AccountBody. # noqa: E501 - :rtype: str - """ - return self._password - - @password.setter - def password(self, password): - """Sets the password of this AccountBody. - - - :param password: The password of this AccountBody. # noqa: E501 - :type: str - """ - - self._password = password - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(AccountBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AccountBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/auth_user.py b/sdk/python/sdk/zrok/zrok_api/models/auth_user.py deleted file mode 100644 index 0a04dc10..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/auth_user.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class AuthUser(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'username': 'str', - 'password': 'str' - } - - attribute_map = { - 'username': 'username', - 'password': 'password' - } - - def __init__(self, username=None, password=None): # noqa: E501 - """AuthUser - a model defined in Swagger""" # noqa: E501 - self._username = None - self._password = None - self.discriminator = None - if username is not None: - self.username = username - if password is not None: - self.password = password - - @property - def username(self): - """Gets the username of this AuthUser. # noqa: E501 - - - :return: The username of this AuthUser. # noqa: E501 - :rtype: str - """ - return self._username - - @username.setter - def username(self, username): - """Sets the username of this AuthUser. - - - :param username: The username of this AuthUser. # noqa: E501 - :type: str - """ - - self._username = username - - @property - def password(self): - """Gets the password of this AuthUser. # noqa: E501 - - - :return: The password of this AuthUser. # noqa: E501 - :rtype: str - """ - return self._password - - @password.setter - def password(self, password): - """Sets the password of this AuthUser. - - - :param password: The password of this AuthUser. # noqa: E501 - :type: str - """ - - self._password = password - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(AuthUser, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AuthUser): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/change_password_body.py b/sdk/python/sdk/zrok/zrok_api/models/change_password_body.py deleted file mode 100644 index 8c12afb1..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/change_password_body.py +++ /dev/null @@ -1,162 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ChangePasswordBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'email': 'str', - 'old_password': 'str', - 'new_password': 'str' - } - - attribute_map = { - 'email': 'email', - 'old_password': 'oldPassword', - 'new_password': 'newPassword' - } - - def __init__(self, email=None, old_password=None, new_password=None): # noqa: E501 - """ChangePasswordBody - a model defined in Swagger""" # noqa: E501 - self._email = None - self._old_password = None - self._new_password = None - self.discriminator = None - if email is not None: - self.email = email - if old_password is not None: - self.old_password = old_password - if new_password is not None: - self.new_password = new_password - - @property - def email(self): - """Gets the email of this ChangePasswordBody. # noqa: E501 - - - :return: The email of this ChangePasswordBody. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this ChangePasswordBody. - - - :param email: The email of this ChangePasswordBody. # noqa: E501 - :type: str - """ - - self._email = email - - @property - def old_password(self): - """Gets the old_password of this ChangePasswordBody. # noqa: E501 - - - :return: The old_password of this ChangePasswordBody. # noqa: E501 - :rtype: str - """ - return self._old_password - - @old_password.setter - def old_password(self, old_password): - """Sets the old_password of this ChangePasswordBody. - - - :param old_password: The old_password of this ChangePasswordBody. # noqa: E501 - :type: str - """ - - self._old_password = old_password - - @property - def new_password(self): - """Gets the new_password of this ChangePasswordBody. # noqa: E501 - - - :return: The new_password of this ChangePasswordBody. # noqa: E501 - :rtype: str - """ - return self._new_password - - @new_password.setter - def new_password(self, new_password): - """Sets the new_password of this ChangePasswordBody. - - - :param new_password: The new_password of this ChangePasswordBody. # noqa: E501 - :type: str - """ - - self._new_password = new_password - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ChangePasswordBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ChangePasswordBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/client_version_check_body.py b/sdk/python/sdk/zrok/zrok_api/models/client_version_check_body.py deleted file mode 100644 index 9aae0f54..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/client_version_check_body.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ClientVersionCheckBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'client_version': 'str' - } - - attribute_map = { - 'client_version': 'clientVersion' - } - - def __init__(self, client_version=None): # noqa: E501 - """ClientVersionCheckBody - a model defined in Swagger""" # noqa: E501 - self._client_version = None - self.discriminator = None - if client_version is not None: - self.client_version = client_version - - @property - def client_version(self): - """Gets the client_version of this ClientVersionCheckBody. # noqa: E501 - - - :return: The client_version of this ClientVersionCheckBody. # noqa: E501 - :rtype: str - """ - return self._client_version - - @client_version.setter - def client_version(self, client_version): - """Sets the client_version of this ClientVersionCheckBody. - - - :param client_version: The client_version of this ClientVersionCheckBody. # noqa: E501 - :type: str - """ - - self._client_version = client_version - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ClientVersionCheckBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ClientVersionCheckBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/configuration.py b/sdk/python/sdk/zrok/zrok_api/models/configuration.py deleted file mode 100644 index 6f1f70b5..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/configuration.py +++ /dev/null @@ -1,214 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class Configuration(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'version': 'str', - 'tou_link': 'str', - 'invites_open': 'bool', - 'requires_invite_token': 'bool', - 'invite_token_contact': 'str' - } - - attribute_map = { - 'version': 'version', - 'tou_link': 'touLink', - 'invites_open': 'invitesOpen', - 'requires_invite_token': 'requiresInviteToken', - 'invite_token_contact': 'inviteTokenContact' - } - - def __init__(self, version=None, tou_link=None, invites_open=None, requires_invite_token=None, invite_token_contact=None): # noqa: E501 - """Configuration - a model defined in Swagger""" # noqa: E501 - self._version = None - self._tou_link = None - self._invites_open = None - self._requires_invite_token = None - self._invite_token_contact = None - self.discriminator = None - if version is not None: - self.version = version - if tou_link is not None: - self.tou_link = tou_link - if invites_open is not None: - self.invites_open = invites_open - if requires_invite_token is not None: - self.requires_invite_token = requires_invite_token - if invite_token_contact is not None: - self.invite_token_contact = invite_token_contact - - @property - def version(self): - """Gets the version of this Configuration. # noqa: E501 - - - :return: The version of this Configuration. # noqa: E501 - :rtype: str - """ - return self._version - - @version.setter - def version(self, version): - """Sets the version of this Configuration. - - - :param version: The version of this Configuration. # noqa: E501 - :type: str - """ - - self._version = version - - @property - def tou_link(self): - """Gets the tou_link of this Configuration. # noqa: E501 - - - :return: The tou_link of this Configuration. # noqa: E501 - :rtype: str - """ - return self._tou_link - - @tou_link.setter - def tou_link(self, tou_link): - """Sets the tou_link of this Configuration. - - - :param tou_link: The tou_link of this Configuration. # noqa: E501 - :type: str - """ - - self._tou_link = tou_link - - @property - def invites_open(self): - """Gets the invites_open of this Configuration. # noqa: E501 - - - :return: The invites_open of this Configuration. # noqa: E501 - :rtype: bool - """ - return self._invites_open - - @invites_open.setter - def invites_open(self, invites_open): - """Sets the invites_open of this Configuration. - - - :param invites_open: The invites_open of this Configuration. # noqa: E501 - :type: bool - """ - - self._invites_open = invites_open - - @property - def requires_invite_token(self): - """Gets the requires_invite_token of this Configuration. # noqa: E501 - - - :return: The requires_invite_token of this Configuration. # noqa: E501 - :rtype: bool - """ - return self._requires_invite_token - - @requires_invite_token.setter - def requires_invite_token(self, requires_invite_token): - """Sets the requires_invite_token of this Configuration. - - - :param requires_invite_token: The requires_invite_token of this Configuration. # noqa: E501 - :type: bool - """ - - self._requires_invite_token = requires_invite_token - - @property - def invite_token_contact(self): - """Gets the invite_token_contact of this Configuration. # noqa: E501 - - - :return: The invite_token_contact of this Configuration. # noqa: E501 - :rtype: str - """ - return self._invite_token_contact - - @invite_token_contact.setter - def invite_token_contact(self, invite_token_contact): - """Sets the invite_token_contact of this Configuration. - - - :param invite_token_contact: The invite_token_contact of this Configuration. # noqa: E501 - :type: str - """ - - self._invite_token_contact = invite_token_contact - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Configuration, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Configuration): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/disable_body.py b/sdk/python/sdk/zrok/zrok_api/models/disable_body.py deleted file mode 100644 index bfb40a4a..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/disable_body.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class DisableBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'identity': 'str' - } - - attribute_map = { - 'identity': 'identity' - } - - def __init__(self, identity=None): # noqa: E501 - """DisableBody - a model defined in Swagger""" # noqa: E501 - self._identity = None - self.discriminator = None - if identity is not None: - self.identity = identity - - @property - def identity(self): - """Gets the identity of this DisableBody. # noqa: E501 - - - :return: The identity of this DisableBody. # noqa: E501 - :rtype: str - """ - return self._identity - - @identity.setter - def identity(self, identity): - """Sets the identity of this DisableBody. - - - :param identity: The identity of this DisableBody. # noqa: E501 - :type: str - """ - - self._identity = identity - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(DisableBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, DisableBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/enable_body.py b/sdk/python/sdk/zrok/zrok_api/models/enable_body.py deleted file mode 100644 index 49ac0279..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/enable_body.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class EnableBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'description': 'str', - 'host': 'str' - } - - attribute_map = { - 'description': 'description', - 'host': 'host' - } - - def __init__(self, description=None, host=None): # noqa: E501 - """EnableBody - a model defined in Swagger""" # noqa: E501 - self._description = None - self._host = None - self.discriminator = None - if description is not None: - self.description = description - if host is not None: - self.host = host - - @property - def description(self): - """Gets the description of this EnableBody. # noqa: E501 - - - :return: The description of this EnableBody. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this EnableBody. - - - :param description: The description of this EnableBody. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def host(self): - """Gets the host of this EnableBody. # noqa: E501 - - - :return: The host of this EnableBody. # noqa: E501 - :rtype: str - """ - return self._host - - @host.setter - def host(self, host): - """Sets the host of this EnableBody. - - - :param host: The host of this EnableBody. # noqa: E501 - :type: str - """ - - self._host = host - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(EnableBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, EnableBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/environment.py b/sdk/python/sdk/zrok/zrok_api/models/environment.py deleted file mode 100644 index 53c85559..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/environment.py +++ /dev/null @@ -1,292 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class Environment(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'description': 'str', - 'host': 'str', - 'address': 'str', - 'z_id': 'str', - 'activity': 'SparkData', - 'limited': 'bool', - 'created_at': 'int', - 'updated_at': 'int' - } - - attribute_map = { - 'description': 'description', - 'host': 'host', - 'address': 'address', - 'z_id': 'zId', - 'activity': 'activity', - 'limited': 'limited', - 'created_at': 'createdAt', - 'updated_at': 'updatedAt' - } - - def __init__(self, description=None, host=None, address=None, z_id=None, activity=None, limited=None, created_at=None, updated_at=None): # noqa: E501 - """Environment - a model defined in Swagger""" # noqa: E501 - self._description = None - self._host = None - self._address = None - self._z_id = None - self._activity = None - self._limited = None - self._created_at = None - self._updated_at = None - self.discriminator = None - if description is not None: - self.description = description - if host is not None: - self.host = host - if address is not None: - self.address = address - if z_id is not None: - self.z_id = z_id - if activity is not None: - self.activity = activity - if limited is not None: - self.limited = limited - if created_at is not None: - self.created_at = created_at - if updated_at is not None: - self.updated_at = updated_at - - @property - def description(self): - """Gets the description of this Environment. # noqa: E501 - - - :return: The description of this Environment. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this Environment. - - - :param description: The description of this Environment. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def host(self): - """Gets the host of this Environment. # noqa: E501 - - - :return: The host of this Environment. # noqa: E501 - :rtype: str - """ - return self._host - - @host.setter - def host(self, host): - """Sets the host of this Environment. - - - :param host: The host of this Environment. # noqa: E501 - :type: str - """ - - self._host = host - - @property - def address(self): - """Gets the address of this Environment. # noqa: E501 - - - :return: The address of this Environment. # noqa: E501 - :rtype: str - """ - return self._address - - @address.setter - def address(self, address): - """Sets the address of this Environment. - - - :param address: The address of this Environment. # noqa: E501 - :type: str - """ - - self._address = address - - @property - def z_id(self): - """Gets the z_id of this Environment. # noqa: E501 - - - :return: The z_id of this Environment. # noqa: E501 - :rtype: str - """ - return self._z_id - - @z_id.setter - def z_id(self, z_id): - """Sets the z_id of this Environment. - - - :param z_id: The z_id of this Environment. # noqa: E501 - :type: str - """ - - self._z_id = z_id - - @property - def activity(self): - """Gets the activity of this Environment. # noqa: E501 - - - :return: The activity of this Environment. # noqa: E501 - :rtype: SparkData - """ - return self._activity - - @activity.setter - def activity(self, activity): - """Sets the activity of this Environment. - - - :param activity: The activity of this Environment. # noqa: E501 - :type: SparkData - """ - - self._activity = activity - - @property - def limited(self): - """Gets the limited of this Environment. # noqa: E501 - - - :return: The limited of this Environment. # noqa: E501 - :rtype: bool - """ - return self._limited - - @limited.setter - def limited(self, limited): - """Sets the limited of this Environment. - - - :param limited: The limited of this Environment. # noqa: E501 - :type: bool - """ - - self._limited = limited - - @property - def created_at(self): - """Gets the created_at of this Environment. # noqa: E501 - - - :return: The created_at of this Environment. # noqa: E501 - :rtype: int - """ - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Sets the created_at of this Environment. - - - :param created_at: The created_at of this Environment. # noqa: E501 - :type: int - """ - - self._created_at = created_at - - @property - def updated_at(self): - """Gets the updated_at of this Environment. # noqa: E501 - - - :return: The updated_at of this Environment. # noqa: E501 - :rtype: int - """ - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Sets the updated_at of this Environment. - - - :param updated_at: The updated_at of this Environment. # noqa: E501 - :type: int - """ - - self._updated_at = updated_at - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Environment, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Environment): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/environment_and_resources.py b/sdk/python/sdk/zrok/zrok_api/models/environment_and_resources.py deleted file mode 100644 index 12c466bb..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/environment_and_resources.py +++ /dev/null @@ -1,162 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class EnvironmentAndResources(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'environment': 'Environment', - 'frontends': 'Frontends', - 'shares': 'Shares' - } - - attribute_map = { - 'environment': 'environment', - 'frontends': 'frontends', - 'shares': 'shares' - } - - def __init__(self, environment=None, frontends=None, shares=None): # noqa: E501 - """EnvironmentAndResources - a model defined in Swagger""" # noqa: E501 - self._environment = None - self._frontends = None - self._shares = None - self.discriminator = None - if environment is not None: - self.environment = environment - if frontends is not None: - self.frontends = frontends - if shares is not None: - self.shares = shares - - @property - def environment(self): - """Gets the environment of this EnvironmentAndResources. # noqa: E501 - - - :return: The environment of this EnvironmentAndResources. # noqa: E501 - :rtype: Environment - """ - return self._environment - - @environment.setter - def environment(self, environment): - """Sets the environment of this EnvironmentAndResources. - - - :param environment: The environment of this EnvironmentAndResources. # noqa: E501 - :type: Environment - """ - - self._environment = environment - - @property - def frontends(self): - """Gets the frontends of this EnvironmentAndResources. # noqa: E501 - - - :return: The frontends of this EnvironmentAndResources. # noqa: E501 - :rtype: Frontends - """ - return self._frontends - - @frontends.setter - def frontends(self, frontends): - """Sets the frontends of this EnvironmentAndResources. - - - :param frontends: The frontends of this EnvironmentAndResources. # noqa: E501 - :type: Frontends - """ - - self._frontends = frontends - - @property - def shares(self): - """Gets the shares of this EnvironmentAndResources. # noqa: E501 - - - :return: The shares of this EnvironmentAndResources. # noqa: E501 - :rtype: Shares - """ - return self._shares - - @shares.setter - def shares(self, shares): - """Sets the shares of this EnvironmentAndResources. - - - :param shares: The shares of this EnvironmentAndResources. # noqa: E501 - :type: Shares - """ - - self._shares = shares - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(EnvironmentAndResources, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, EnvironmentAndResources): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/environments.py b/sdk/python/sdk/zrok/zrok_api/models/environments.py deleted file mode 100644 index e6d72d56..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/environments.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class Environments(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - } - - attribute_map = { - } - - def __init__(self): # noqa: E501 - """Environments - a model defined in Swagger""" # noqa: E501 - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Environments, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Environments): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/error_message.py b/sdk/python/sdk/zrok/zrok_api/models/error_message.py deleted file mode 100644 index 19325187..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/error_message.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ErrorMessage(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - } - - attribute_map = { - } - - def __init__(self): # noqa: E501 - """ErrorMessage - a model defined in Swagger""" # noqa: E501 - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ErrorMessage, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ErrorMessage): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/frontend.py b/sdk/python/sdk/zrok/zrok_api/models/frontend.py deleted file mode 100644 index 46cf93eb..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/frontend.py +++ /dev/null @@ -1,318 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class Frontend(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'int', - 'frontend_token': 'str', - 'share_token': 'str', - 'backend_mode': 'str', - 'bind_address': 'str', - 'description': 'str', - 'z_id': 'str', - 'created_at': 'int', - 'updated_at': 'int' - } - - attribute_map = { - 'id': 'id', - 'frontend_token': 'frontendToken', - 'share_token': 'shareToken', - 'backend_mode': 'backendMode', - 'bind_address': 'bindAddress', - 'description': 'description', - 'z_id': 'zId', - 'created_at': 'createdAt', - 'updated_at': 'updatedAt' - } - - def __init__(self, id=None, frontend_token=None, share_token=None, backend_mode=None, bind_address=None, description=None, z_id=None, created_at=None, updated_at=None): # noqa: E501 - """Frontend - a model defined in Swagger""" # noqa: E501 - self._id = None - self._frontend_token = None - self._share_token = None - self._backend_mode = None - self._bind_address = None - self._description = None - self._z_id = None - self._created_at = None - self._updated_at = None - self.discriminator = None - if id is not None: - self.id = id - if frontend_token is not None: - self.frontend_token = frontend_token - if share_token is not None: - self.share_token = share_token - if backend_mode is not None: - self.backend_mode = backend_mode - if bind_address is not None: - self.bind_address = bind_address - if description is not None: - self.description = description - if z_id is not None: - self.z_id = z_id - if created_at is not None: - self.created_at = created_at - if updated_at is not None: - self.updated_at = updated_at - - @property - def id(self): - """Gets the id of this Frontend. # noqa: E501 - - - :return: The id of this Frontend. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this Frontend. - - - :param id: The id of this Frontend. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def frontend_token(self): - """Gets the frontend_token of this Frontend. # noqa: E501 - - - :return: The frontend_token of this Frontend. # noqa: E501 - :rtype: str - """ - return self._frontend_token - - @frontend_token.setter - def frontend_token(self, frontend_token): - """Sets the frontend_token of this Frontend. - - - :param frontend_token: The frontend_token of this Frontend. # noqa: E501 - :type: str - """ - - self._frontend_token = frontend_token - - @property - def share_token(self): - """Gets the share_token of this Frontend. # noqa: E501 - - - :return: The share_token of this Frontend. # noqa: E501 - :rtype: str - """ - return self._share_token - - @share_token.setter - def share_token(self, share_token): - """Sets the share_token of this Frontend. - - - :param share_token: The share_token of this Frontend. # noqa: E501 - :type: str - """ - - self._share_token = share_token - - @property - def backend_mode(self): - """Gets the backend_mode of this Frontend. # noqa: E501 - - - :return: The backend_mode of this Frontend. # noqa: E501 - :rtype: str - """ - return self._backend_mode - - @backend_mode.setter - def backend_mode(self, backend_mode): - """Sets the backend_mode of this Frontend. - - - :param backend_mode: The backend_mode of this Frontend. # noqa: E501 - :type: str - """ - - self._backend_mode = backend_mode - - @property - def bind_address(self): - """Gets the bind_address of this Frontend. # noqa: E501 - - - :return: The bind_address of this Frontend. # noqa: E501 - :rtype: str - """ - return self._bind_address - - @bind_address.setter - def bind_address(self, bind_address): - """Sets the bind_address of this Frontend. - - - :param bind_address: The bind_address of this Frontend. # noqa: E501 - :type: str - """ - - self._bind_address = bind_address - - @property - def description(self): - """Gets the description of this Frontend. # noqa: E501 - - - :return: The description of this Frontend. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this Frontend. - - - :param description: The description of this Frontend. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def z_id(self): - """Gets the z_id of this Frontend. # noqa: E501 - - - :return: The z_id of this Frontend. # noqa: E501 - :rtype: str - """ - return self._z_id - - @z_id.setter - def z_id(self, z_id): - """Sets the z_id of this Frontend. - - - :param z_id: The z_id of this Frontend. # noqa: E501 - :type: str - """ - - self._z_id = z_id - - @property - def created_at(self): - """Gets the created_at of this Frontend. # noqa: E501 - - - :return: The created_at of this Frontend. # noqa: E501 - :rtype: int - """ - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Sets the created_at of this Frontend. - - - :param created_at: The created_at of this Frontend. # noqa: E501 - :type: int - """ - - self._created_at = created_at - - @property - def updated_at(self): - """Gets the updated_at of this Frontend. # noqa: E501 - - - :return: The updated_at of this Frontend. # noqa: E501 - :rtype: int - """ - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Sets the updated_at of this Frontend. - - - :param updated_at: The updated_at of this Frontend. # noqa: E501 - :type: int - """ - - self._updated_at = updated_at - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Frontend, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Frontend): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/frontend_body.py b/sdk/python/sdk/zrok/zrok_api/models/frontend_body.py deleted file mode 100644 index 22f06aac..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/frontend_body.py +++ /dev/null @@ -1,194 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class FrontendBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'z_id': 'str', - 'url_template': 'str', - 'public_name': 'str', - 'permission_mode': 'str' - } - - attribute_map = { - 'z_id': 'zId', - 'url_template': 'url_template', - 'public_name': 'public_name', - 'permission_mode': 'permissionMode' - } - - def __init__(self, z_id=None, url_template=None, public_name=None, permission_mode=None): # noqa: E501 - """FrontendBody - a model defined in Swagger""" # noqa: E501 - self._z_id = None - self._url_template = None - self._public_name = None - self._permission_mode = None - self.discriminator = None - if z_id is not None: - self.z_id = z_id - if url_template is not None: - self.url_template = url_template - if public_name is not None: - self.public_name = public_name - if permission_mode is not None: - self.permission_mode = permission_mode - - @property - def z_id(self): - """Gets the z_id of this FrontendBody. # noqa: E501 - - - :return: The z_id of this FrontendBody. # noqa: E501 - :rtype: str - """ - return self._z_id - - @z_id.setter - def z_id(self, z_id): - """Sets the z_id of this FrontendBody. - - - :param z_id: The z_id of this FrontendBody. # noqa: E501 - :type: str - """ - - self._z_id = z_id - - @property - def url_template(self): - """Gets the url_template of this FrontendBody. # noqa: E501 - - - :return: The url_template of this FrontendBody. # noqa: E501 - :rtype: str - """ - return self._url_template - - @url_template.setter - def url_template(self, url_template): - """Sets the url_template of this FrontendBody. - - - :param url_template: The url_template of this FrontendBody. # noqa: E501 - :type: str - """ - - self._url_template = url_template - - @property - def public_name(self): - """Gets the public_name of this FrontendBody. # noqa: E501 - - - :return: The public_name of this FrontendBody. # noqa: E501 - :rtype: str - """ - return self._public_name - - @public_name.setter - def public_name(self, public_name): - """Sets the public_name of this FrontendBody. - - - :param public_name: The public_name of this FrontendBody. # noqa: E501 - :type: str - """ - - self._public_name = public_name - - @property - def permission_mode(self): - """Gets the permission_mode of this FrontendBody. # noqa: E501 - - - :return: The permission_mode of this FrontendBody. # noqa: E501 - :rtype: str - """ - return self._permission_mode - - @permission_mode.setter - def permission_mode(self, permission_mode): - """Sets the permission_mode of this FrontendBody. - - - :param permission_mode: The permission_mode of this FrontendBody. # noqa: E501 - :type: str - """ - allowed_values = ["open", "closed"] # noqa: E501 - if permission_mode not in allowed_values: - raise ValueError( - "Invalid value for `permission_mode` ({0}), must be one of {1}" # noqa: E501 - .format(permission_mode, allowed_values) - ) - - self._permission_mode = permission_mode - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(FrontendBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FrontendBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/frontend_body1.py b/sdk/python/sdk/zrok/zrok_api/models/frontend_body1.py deleted file mode 100644 index 192f6785..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/frontend_body1.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class FrontendBody1(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'frontend_token': 'str' - } - - attribute_map = { - 'frontend_token': 'frontendToken' - } - - def __init__(self, frontend_token=None): # noqa: E501 - """FrontendBody1 - a model defined in Swagger""" # noqa: E501 - self._frontend_token = None - self.discriminator = None - if frontend_token is not None: - self.frontend_token = frontend_token - - @property - def frontend_token(self): - """Gets the frontend_token of this FrontendBody1. # noqa: E501 - - - :return: The frontend_token of this FrontendBody1. # noqa: E501 - :rtype: str - """ - return self._frontend_token - - @frontend_token.setter - def frontend_token(self, frontend_token): - """Sets the frontend_token of this FrontendBody1. - - - :param frontend_token: The frontend_token of this FrontendBody1. # noqa: E501 - :type: str - """ - - self._frontend_token = frontend_token - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(FrontendBody1, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FrontendBody1): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/frontend_body2.py b/sdk/python/sdk/zrok/zrok_api/models/frontend_body2.py deleted file mode 100644 index aed451e3..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/frontend_body2.py +++ /dev/null @@ -1,162 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class FrontendBody2(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'frontend_token': 'str', - 'public_name': 'str', - 'url_template': 'str' - } - - attribute_map = { - 'frontend_token': 'frontendToken', - 'public_name': 'publicName', - 'url_template': 'urlTemplate' - } - - def __init__(self, frontend_token=None, public_name=None, url_template=None): # noqa: E501 - """FrontendBody2 - a model defined in Swagger""" # noqa: E501 - self._frontend_token = None - self._public_name = None - self._url_template = None - self.discriminator = None - if frontend_token is not None: - self.frontend_token = frontend_token - if public_name is not None: - self.public_name = public_name - if url_template is not None: - self.url_template = url_template - - @property - def frontend_token(self): - """Gets the frontend_token of this FrontendBody2. # noqa: E501 - - - :return: The frontend_token of this FrontendBody2. # noqa: E501 - :rtype: str - """ - return self._frontend_token - - @frontend_token.setter - def frontend_token(self, frontend_token): - """Sets the frontend_token of this FrontendBody2. - - - :param frontend_token: The frontend_token of this FrontendBody2. # noqa: E501 - :type: str - """ - - self._frontend_token = frontend_token - - @property - def public_name(self): - """Gets the public_name of this FrontendBody2. # noqa: E501 - - - :return: The public_name of this FrontendBody2. # noqa: E501 - :rtype: str - """ - return self._public_name - - @public_name.setter - def public_name(self, public_name): - """Sets the public_name of this FrontendBody2. - - - :param public_name: The public_name of this FrontendBody2. # noqa: E501 - :type: str - """ - - self._public_name = public_name - - @property - def url_template(self): - """Gets the url_template of this FrontendBody2. # noqa: E501 - - - :return: The url_template of this FrontendBody2. # noqa: E501 - :rtype: str - """ - return self._url_template - - @url_template.setter - def url_template(self, url_template): - """Sets the url_template of this FrontendBody2. - - - :param url_template: The url_template of this FrontendBody2. # noqa: E501 - :type: str - """ - - self._url_template = url_template - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(FrontendBody2, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FrontendBody2): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/frontends.py b/sdk/python/sdk/zrok/zrok_api/models/frontends.py deleted file mode 100644 index 3c00604a..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/frontends.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class Frontends(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - } - - attribute_map = { - } - - def __init__(self): # noqa: E501 - """Frontends - a model defined in Swagger""" # noqa: E501 - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Frontends, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Frontends): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/grants_body.py b/sdk/python/sdk/zrok/zrok_api/models/grants_body.py deleted file mode 100644 index 78e7d53a..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/grants_body.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class GrantsBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'email': 'str' - } - - attribute_map = { - 'email': 'email' - } - - def __init__(self, email=None): # noqa: E501 - """GrantsBody - a model defined in Swagger""" # noqa: E501 - self._email = None - self.discriminator = None - if email is not None: - self.email = email - - @property - def email(self): - """Gets the email of this GrantsBody. # noqa: E501 - - - :return: The email of this GrantsBody. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this GrantsBody. - - - :param email: The email of this GrantsBody. # noqa: E501 - :type: str - """ - - self._email = email - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(GrantsBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, GrantsBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/identity_body.py b/sdk/python/sdk/zrok/zrok_api/models/identity_body.py deleted file mode 100644 index 4be3f8e5..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/identity_body.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class IdentityBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'name': 'str' - } - - attribute_map = { - 'name': 'name' - } - - def __init__(self, name=None): # noqa: E501 - """IdentityBody - a model defined in Swagger""" # noqa: E501 - self._name = None - self.discriminator = None - if name is not None: - self.name = name - - @property - def name(self): - """Gets the name of this IdentityBody. # noqa: E501 - - - :return: The name of this IdentityBody. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this IdentityBody. - - - :param name: The name of this IdentityBody. # noqa: E501 - :type: str - """ - - self._name = name - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(IdentityBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, IdentityBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response200.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response200.py deleted file mode 100644 index edb95aa5..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response200.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InlineResponse200(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'account_token': 'str' - } - - attribute_map = { - 'account_token': 'accountToken' - } - - def __init__(self, account_token=None): # noqa: E501 - """InlineResponse200 - a model defined in Swagger""" # noqa: E501 - self._account_token = None - self.discriminator = None - if account_token is not None: - self.account_token = account_token - - @property - def account_token(self): - """Gets the account_token of this InlineResponse200. # noqa: E501 - - - :return: The account_token of this InlineResponse200. # noqa: E501 - :rtype: str - """ - return self._account_token - - @account_token.setter - def account_token(self, account_token): - """Sets the account_token of this InlineResponse200. - - - :param account_token: The account_token of this InlineResponse200. # noqa: E501 - :type: str - """ - - self._account_token = account_token - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InlineResponse200, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse200): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2001.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2001.py deleted file mode 100644 index 32a1818a..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2001.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InlineResponse2001(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'email': 'str' - } - - attribute_map = { - 'email': 'email' - } - - def __init__(self, email=None): # noqa: E501 - """InlineResponse2001 - a model defined in Swagger""" # noqa: E501 - self._email = None - self.discriminator = None - if email is not None: - self.email = email - - @property - def email(self): - """Gets the email of this InlineResponse2001. # noqa: E501 - - - :return: The email of this InlineResponse2001. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this InlineResponse2001. - - - :param email: The email of this InlineResponse2001. # noqa: E501 - :type: str - """ - - self._email = email - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InlineResponse2001, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2001): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2002.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2002.py deleted file mode 100644 index a162bfdc..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2002.py +++ /dev/null @@ -1,240 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InlineResponse2002(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'frontend_token': 'str', - 'z_id': 'str', - 'url_template': 'str', - 'public_name': 'str', - 'created_at': 'int', - 'updated_at': 'int' - } - - attribute_map = { - 'frontend_token': 'frontendToken', - 'z_id': 'zId', - 'url_template': 'urlTemplate', - 'public_name': 'publicName', - 'created_at': 'createdAt', - 'updated_at': 'updatedAt' - } - - def __init__(self, frontend_token=None, z_id=None, url_template=None, public_name=None, created_at=None, updated_at=None): # noqa: E501 - """InlineResponse2002 - a model defined in Swagger""" # noqa: E501 - self._frontend_token = None - self._z_id = None - self._url_template = None - self._public_name = None - self._created_at = None - self._updated_at = None - self.discriminator = None - if frontend_token is not None: - self.frontend_token = frontend_token - if z_id is not None: - self.z_id = z_id - if url_template is not None: - self.url_template = url_template - if public_name is not None: - self.public_name = public_name - if created_at is not None: - self.created_at = created_at - if updated_at is not None: - self.updated_at = updated_at - - @property - def frontend_token(self): - """Gets the frontend_token of this InlineResponse2002. # noqa: E501 - - - :return: The frontend_token of this InlineResponse2002. # noqa: E501 - :rtype: str - """ - return self._frontend_token - - @frontend_token.setter - def frontend_token(self, frontend_token): - """Sets the frontend_token of this InlineResponse2002. - - - :param frontend_token: The frontend_token of this InlineResponse2002. # noqa: E501 - :type: str - """ - - self._frontend_token = frontend_token - - @property - def z_id(self): - """Gets the z_id of this InlineResponse2002. # noqa: E501 - - - :return: The z_id of this InlineResponse2002. # noqa: E501 - :rtype: str - """ - return self._z_id - - @z_id.setter - def z_id(self, z_id): - """Sets the z_id of this InlineResponse2002. - - - :param z_id: The z_id of this InlineResponse2002. # noqa: E501 - :type: str - """ - - self._z_id = z_id - - @property - def url_template(self): - """Gets the url_template of this InlineResponse2002. # noqa: E501 - - - :return: The url_template of this InlineResponse2002. # noqa: E501 - :rtype: str - """ - return self._url_template - - @url_template.setter - def url_template(self, url_template): - """Sets the url_template of this InlineResponse2002. - - - :param url_template: The url_template of this InlineResponse2002. # noqa: E501 - :type: str - """ - - self._url_template = url_template - - @property - def public_name(self): - """Gets the public_name of this InlineResponse2002. # noqa: E501 - - - :return: The public_name of this InlineResponse2002. # noqa: E501 - :rtype: str - """ - return self._public_name - - @public_name.setter - def public_name(self, public_name): - """Sets the public_name of this InlineResponse2002. - - - :param public_name: The public_name of this InlineResponse2002. # noqa: E501 - :type: str - """ - - self._public_name = public_name - - @property - def created_at(self): - """Gets the created_at of this InlineResponse2002. # noqa: E501 - - - :return: The created_at of this InlineResponse2002. # noqa: E501 - :rtype: int - """ - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Sets the created_at of this InlineResponse2002. - - - :param created_at: The created_at of this InlineResponse2002. # noqa: E501 - :type: int - """ - - self._created_at = created_at - - @property - def updated_at(self): - """Gets the updated_at of this InlineResponse2002. # noqa: E501 - - - :return: The updated_at of this InlineResponse2002. # noqa: E501 - :rtype: int - """ - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Sets the updated_at of this InlineResponse2002. - - - :param updated_at: The updated_at of this InlineResponse2002. # noqa: E501 - :type: int - """ - - self._updated_at = updated_at - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InlineResponse2002, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2002): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2003.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2003.py deleted file mode 100644 index 93926054..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2003.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InlineResponse2003(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'members': 'list[InlineResponse2003Members]' - } - - attribute_map = { - 'members': 'members' - } - - def __init__(self, members=None): # noqa: E501 - """InlineResponse2003 - a model defined in Swagger""" # noqa: E501 - self._members = None - self.discriminator = None - if members is not None: - self.members = members - - @property - def members(self): - """Gets the members of this InlineResponse2003. # noqa: E501 - - - :return: The members of this InlineResponse2003. # noqa: E501 - :rtype: list[InlineResponse2003Members] - """ - return self._members - - @members.setter - def members(self, members): - """Sets the members of this InlineResponse2003. - - - :param members: The members of this InlineResponse2003. # noqa: E501 - :type: list[InlineResponse2003Members] - """ - - self._members = members - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InlineResponse2003, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2003): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2003_members.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2003_members.py deleted file mode 100644 index 359fb898..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2003_members.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InlineResponse2003Members(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'email': 'str', - 'admin': 'bool' - } - - attribute_map = { - 'email': 'email', - 'admin': 'admin' - } - - def __init__(self, email=None, admin=None): # noqa: E501 - """InlineResponse2003Members - a model defined in Swagger""" # noqa: E501 - self._email = None - self._admin = None - self.discriminator = None - if email is not None: - self.email = email - if admin is not None: - self.admin = admin - - @property - def email(self): - """Gets the email of this InlineResponse2003Members. # noqa: E501 - - - :return: The email of this InlineResponse2003Members. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this InlineResponse2003Members. - - - :param email: The email of this InlineResponse2003Members. # noqa: E501 - :type: str - """ - - self._email = email - - @property - def admin(self): - """Gets the admin of this InlineResponse2003Members. # noqa: E501 - - - :return: The admin of this InlineResponse2003Members. # noqa: E501 - :rtype: bool - """ - return self._admin - - @admin.setter - def admin(self, admin): - """Sets the admin of this InlineResponse2003Members. - - - :param admin: The admin of this InlineResponse2003Members. # noqa: E501 - :type: bool - """ - - self._admin = admin - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InlineResponse2003Members, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2003Members): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2004.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2004.py deleted file mode 100644 index d0a55eb0..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2004.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InlineResponse2004(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'organizations': 'list[InlineResponse2004Organizations]' - } - - attribute_map = { - 'organizations': 'organizations' - } - - def __init__(self, organizations=None): # noqa: E501 - """InlineResponse2004 - a model defined in Swagger""" # noqa: E501 - self._organizations = None - self.discriminator = None - if organizations is not None: - self.organizations = organizations - - @property - def organizations(self): - """Gets the organizations of this InlineResponse2004. # noqa: E501 - - - :return: The organizations of this InlineResponse2004. # noqa: E501 - :rtype: list[InlineResponse2004Organizations] - """ - return self._organizations - - @organizations.setter - def organizations(self, organizations): - """Sets the organizations of this InlineResponse2004. - - - :param organizations: The organizations of this InlineResponse2004. # noqa: E501 - :type: list[InlineResponse2004Organizations] - """ - - self._organizations = organizations - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InlineResponse2004, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2004): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2004_organizations.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2004_organizations.py deleted file mode 100644 index 1996b554..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2004_organizations.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InlineResponse2004Organizations(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'organization_token': 'str', - 'description': 'str' - } - - attribute_map = { - 'organization_token': 'organizationToken', - 'description': 'description' - } - - def __init__(self, organization_token=None, description=None): # noqa: E501 - """InlineResponse2004Organizations - a model defined in Swagger""" # noqa: E501 - self._organization_token = None - self._description = None - self.discriminator = None - if organization_token is not None: - self.organization_token = organization_token - if description is not None: - self.description = description - - @property - def organization_token(self): - """Gets the organization_token of this InlineResponse2004Organizations. # noqa: E501 - - - :return: The organization_token of this InlineResponse2004Organizations. # noqa: E501 - :rtype: str - """ - return self._organization_token - - @organization_token.setter - def organization_token(self, organization_token): - """Sets the organization_token of this InlineResponse2004Organizations. - - - :param organization_token: The organization_token of this InlineResponse2004Organizations. # noqa: E501 - :type: str - """ - - self._organization_token = organization_token - - @property - def description(self): - """Gets the description of this InlineResponse2004Organizations. # noqa: E501 - - - :return: The description of this InlineResponse2004Organizations. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this InlineResponse2004Organizations. - - - :param description: The description of this InlineResponse2004Organizations. # noqa: E501 - :type: str - """ - - self._description = description - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InlineResponse2004Organizations, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2004Organizations): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2005.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2005.py deleted file mode 100644 index 3fa22e9d..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2005.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InlineResponse2005(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'memberships': 'list[InlineResponse2005Memberships]' - } - - attribute_map = { - 'memberships': 'memberships' - } - - def __init__(self, memberships=None): # noqa: E501 - """InlineResponse2005 - a model defined in Swagger""" # noqa: E501 - self._memberships = None - self.discriminator = None - if memberships is not None: - self.memberships = memberships - - @property - def memberships(self): - """Gets the memberships of this InlineResponse2005. # noqa: E501 - - - :return: The memberships of this InlineResponse2005. # noqa: E501 - :rtype: list[InlineResponse2005Memberships] - """ - return self._memberships - - @memberships.setter - def memberships(self, memberships): - """Sets the memberships of this InlineResponse2005. - - - :param memberships: The memberships of this InlineResponse2005. # noqa: E501 - :type: list[InlineResponse2005Memberships] - """ - - self._memberships = memberships - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InlineResponse2005, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2005): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2005_memberships.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2005_memberships.py deleted file mode 100644 index 915fa44e..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2005_memberships.py +++ /dev/null @@ -1,162 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InlineResponse2005Memberships(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'organization_token': 'str', - 'description': 'str', - 'admin': 'bool' - } - - attribute_map = { - 'organization_token': 'organizationToken', - 'description': 'description', - 'admin': 'admin' - } - - def __init__(self, organization_token=None, description=None, admin=None): # noqa: E501 - """InlineResponse2005Memberships - a model defined in Swagger""" # noqa: E501 - self._organization_token = None - self._description = None - self._admin = None - self.discriminator = None - if organization_token is not None: - self.organization_token = organization_token - if description is not None: - self.description = description - if admin is not None: - self.admin = admin - - @property - def organization_token(self): - """Gets the organization_token of this InlineResponse2005Memberships. # noqa: E501 - - - :return: The organization_token of this InlineResponse2005Memberships. # noqa: E501 - :rtype: str - """ - return self._organization_token - - @organization_token.setter - def organization_token(self, organization_token): - """Sets the organization_token of this InlineResponse2005Memberships. - - - :param organization_token: The organization_token of this InlineResponse2005Memberships. # noqa: E501 - :type: str - """ - - self._organization_token = organization_token - - @property - def description(self): - """Gets the description of this InlineResponse2005Memberships. # noqa: E501 - - - :return: The description of this InlineResponse2005Memberships. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this InlineResponse2005Memberships. - - - :param description: The description of this InlineResponse2005Memberships. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def admin(self): - """Gets the admin of this InlineResponse2005Memberships. # noqa: E501 - - - :return: The admin of this InlineResponse2005Memberships. # noqa: E501 - :rtype: bool - """ - return self._admin - - @admin.setter - def admin(self, admin): - """Sets the admin of this InlineResponse2005Memberships. - - - :param admin: The admin of this InlineResponse2005Memberships. # noqa: E501 - :type: bool - """ - - self._admin = admin - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InlineResponse2005Memberships, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2005Memberships): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2006.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2006.py deleted file mode 100644 index 5757905a..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2006.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InlineResponse2006(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'sparklines': 'list[Metrics]' - } - - attribute_map = { - 'sparklines': 'sparklines' - } - - def __init__(self, sparklines=None): # noqa: E501 - """InlineResponse2006 - a model defined in Swagger""" # noqa: E501 - self._sparklines = None - self.discriminator = None - if sparklines is not None: - self.sparklines = sparklines - - @property - def sparklines(self): - """Gets the sparklines of this InlineResponse2006. # noqa: E501 - - - :return: The sparklines of this InlineResponse2006. # noqa: E501 - :rtype: list[Metrics] - """ - return self._sparklines - - @sparklines.setter - def sparklines(self, sparklines): - """Sets the sparklines of this InlineResponse2006. - - - :param sparklines: The sparklines of this InlineResponse2006. # noqa: E501 - :type: list[Metrics] - """ - - self._sparklines = sparklines - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InlineResponse2006, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2006): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2007.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2007.py deleted file mode 100644 index 356d155a..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2007.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InlineResponse2007(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'controller_version': 'str' - } - - attribute_map = { - 'controller_version': 'controllerVersion' - } - - def __init__(self, controller_version=None): # noqa: E501 - """InlineResponse2007 - a model defined in Swagger""" # noqa: E501 - self._controller_version = None - self.discriminator = None - if controller_version is not None: - self.controller_version = controller_version - - @property - def controller_version(self): - """Gets the controller_version of this InlineResponse2007. # noqa: E501 - - - :return: The controller_version of this InlineResponse2007. # noqa: E501 - :rtype: str - """ - return self._controller_version - - @controller_version.setter - def controller_version(self, controller_version): - """Sets the controller_version of this InlineResponse2007. - - - :param controller_version: The controller_version of this InlineResponse2007. # noqa: E501 - :type: str - """ - - self._controller_version = controller_version - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InlineResponse2007, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2007): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response201.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response201.py deleted file mode 100644 index 2cc96e64..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response201.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InlineResponse201(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'frontend_token': 'str' - } - - attribute_map = { - 'frontend_token': 'frontendToken' - } - - def __init__(self, frontend_token=None): # noqa: E501 - """InlineResponse201 - a model defined in Swagger""" # noqa: E501 - self._frontend_token = None - self.discriminator = None - if frontend_token is not None: - self.frontend_token = frontend_token - - @property - def frontend_token(self): - """Gets the frontend_token of this InlineResponse201. # noqa: E501 - - - :return: The frontend_token of this InlineResponse201. # noqa: E501 - :rtype: str - """ - return self._frontend_token - - @frontend_token.setter - def frontend_token(self, frontend_token): - """Sets the frontend_token of this InlineResponse201. - - - :param frontend_token: The frontend_token of this InlineResponse201. # noqa: E501 - :type: str - """ - - self._frontend_token = frontend_token - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InlineResponse201, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse201): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2011.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2011.py deleted file mode 100644 index 9d80730a..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2011.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InlineResponse2011(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'identity': 'str', - 'cfg': 'str' - } - - attribute_map = { - 'identity': 'identity', - 'cfg': 'cfg' - } - - def __init__(self, identity=None, cfg=None): # noqa: E501 - """InlineResponse2011 - a model defined in Swagger""" # noqa: E501 - self._identity = None - self._cfg = None - self.discriminator = None - if identity is not None: - self.identity = identity - if cfg is not None: - self.cfg = cfg - - @property - def identity(self): - """Gets the identity of this InlineResponse2011. # noqa: E501 - - - :return: The identity of this InlineResponse2011. # noqa: E501 - :rtype: str - """ - return self._identity - - @identity.setter - def identity(self, identity): - """Sets the identity of this InlineResponse2011. - - - :param identity: The identity of this InlineResponse2011. # noqa: E501 - :type: str - """ - - self._identity = identity - - @property - def cfg(self): - """Gets the cfg of this InlineResponse2011. # noqa: E501 - - - :return: The cfg of this InlineResponse2011. # noqa: E501 - :rtype: str - """ - return self._cfg - - @cfg.setter - def cfg(self, cfg): - """Sets the cfg of this InlineResponse2011. - - - :param cfg: The cfg of this InlineResponse2011. # noqa: E501 - :type: str - """ - - self._cfg = cfg - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InlineResponse2011, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2011): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2012.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2012.py deleted file mode 100644 index dee97a61..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2012.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InlineResponse2012(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'organization_token': 'str' - } - - attribute_map = { - 'organization_token': 'organizationToken' - } - - def __init__(self, organization_token=None): # noqa: E501 - """InlineResponse2012 - a model defined in Swagger""" # noqa: E501 - self._organization_token = None - self.discriminator = None - if organization_token is not None: - self.organization_token = organization_token - - @property - def organization_token(self): - """Gets the organization_token of this InlineResponse2012. # noqa: E501 - - - :return: The organization_token of this InlineResponse2012. # noqa: E501 - :rtype: str - """ - return self._organization_token - - @organization_token.setter - def organization_token(self, organization_token): - """Sets the organization_token of this InlineResponse2012. - - - :param organization_token: The organization_token of this InlineResponse2012. # noqa: E501 - :type: str - """ - - self._organization_token = organization_token - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InlineResponse2012, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2012): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/inline_response2013.py b/sdk/python/sdk/zrok/zrok_api/models/inline_response2013.py deleted file mode 100644 index 34a37b49..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/inline_response2013.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InlineResponse2013(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'frontend_token': 'str', - 'backend_mode': 'str' - } - - attribute_map = { - 'frontend_token': 'frontendToken', - 'backend_mode': 'backendMode' - } - - def __init__(self, frontend_token=None, backend_mode=None): # noqa: E501 - """InlineResponse2013 - a model defined in Swagger""" # noqa: E501 - self._frontend_token = None - self._backend_mode = None - self.discriminator = None - if frontend_token is not None: - self.frontend_token = frontend_token - if backend_mode is not None: - self.backend_mode = backend_mode - - @property - def frontend_token(self): - """Gets the frontend_token of this InlineResponse2013. # noqa: E501 - - - :return: The frontend_token of this InlineResponse2013. # noqa: E501 - :rtype: str - """ - return self._frontend_token - - @frontend_token.setter - def frontend_token(self, frontend_token): - """Sets the frontend_token of this InlineResponse2013. - - - :param frontend_token: The frontend_token of this InlineResponse2013. # noqa: E501 - :type: str - """ - - self._frontend_token = frontend_token - - @property - def backend_mode(self): - """Gets the backend_mode of this InlineResponse2013. # noqa: E501 - - - :return: The backend_mode of this InlineResponse2013. # noqa: E501 - :rtype: str - """ - return self._backend_mode - - @backend_mode.setter - def backend_mode(self, backend_mode): - """Sets the backend_mode of this InlineResponse2013. - - - :param backend_mode: The backend_mode of this InlineResponse2013. # noqa: E501 - :type: str - """ - - self._backend_mode = backend_mode - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InlineResponse2013, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InlineResponse2013): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/invite_body.py b/sdk/python/sdk/zrok/zrok_api/models/invite_body.py deleted file mode 100644 index bb4840d5..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/invite_body.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class InviteBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'email': 'str', - 'invite_token': 'str' - } - - attribute_map = { - 'email': 'email', - 'invite_token': 'inviteToken' - } - - def __init__(self, email=None, invite_token=None): # noqa: E501 - """InviteBody - a model defined in Swagger""" # noqa: E501 - self._email = None - self._invite_token = None - self.discriminator = None - if email is not None: - self.email = email - if invite_token is not None: - self.invite_token = invite_token - - @property - def email(self): - """Gets the email of this InviteBody. # noqa: E501 - - - :return: The email of this InviteBody. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this InviteBody. - - - :param email: The email of this InviteBody. # noqa: E501 - :type: str - """ - - self._email = email - - @property - def invite_token(self): - """Gets the invite_token of this InviteBody. # noqa: E501 - - - :return: The invite_token of this InviteBody. # noqa: E501 - :rtype: str - """ - return self._invite_token - - @invite_token.setter - def invite_token(self, invite_token): - """Sets the invite_token of this InviteBody. - - - :param invite_token: The invite_token of this InviteBody. # noqa: E501 - :type: str - """ - - self._invite_token = invite_token - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(InviteBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, InviteBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/login_body.py b/sdk/python/sdk/zrok/zrok_api/models/login_body.py deleted file mode 100644 index 127672ca..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/login_body.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class LoginBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'email': 'str', - 'password': 'str' - } - - attribute_map = { - 'email': 'email', - 'password': 'password' - } - - def __init__(self, email=None, password=None): # noqa: E501 - """LoginBody - a model defined in Swagger""" # noqa: E501 - self._email = None - self._password = None - self.discriminator = None - if email is not None: - self.email = email - if password is not None: - self.password = password - - @property - def email(self): - """Gets the email of this LoginBody. # noqa: E501 - - - :return: The email of this LoginBody. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this LoginBody. - - - :param email: The email of this LoginBody. # noqa: E501 - :type: str - """ - - self._email = email - - @property - def password(self): - """Gets the password of this LoginBody. # noqa: E501 - - - :return: The password of this LoginBody. # noqa: E501 - :rtype: str - """ - return self._password - - @password.setter - def password(self, password): - """Sets the password of this LoginBody. - - - :param password: The password of this LoginBody. # noqa: E501 - :type: str - """ - - self._password = password - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(LoginBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, LoginBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/metrics.py b/sdk/python/sdk/zrok/zrok_api/models/metrics.py deleted file mode 100644 index d7dd52f8..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/metrics.py +++ /dev/null @@ -1,188 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class Metrics(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'scope': 'str', - 'id': 'str', - 'period': 'float', - 'samples': 'list[MetricsSample]' - } - - attribute_map = { - 'scope': 'scope', - 'id': 'id', - 'period': 'period', - 'samples': 'samples' - } - - def __init__(self, scope=None, id=None, period=None, samples=None): # noqa: E501 - """Metrics - a model defined in Swagger""" # noqa: E501 - self._scope = None - self._id = None - self._period = None - self._samples = None - self.discriminator = None - if scope is not None: - self.scope = scope - if id is not None: - self.id = id - if period is not None: - self.period = period - if samples is not None: - self.samples = samples - - @property - def scope(self): - """Gets the scope of this Metrics. # noqa: E501 - - - :return: The scope of this Metrics. # noqa: E501 - :rtype: str - """ - return self._scope - - @scope.setter - def scope(self, scope): - """Sets the scope of this Metrics. - - - :param scope: The scope of this Metrics. # noqa: E501 - :type: str - """ - - self._scope = scope - - @property - def id(self): - """Gets the id of this Metrics. # noqa: E501 - - - :return: The id of this Metrics. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this Metrics. - - - :param id: The id of this Metrics. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def period(self): - """Gets the period of this Metrics. # noqa: E501 - - - :return: The period of this Metrics. # noqa: E501 - :rtype: float - """ - return self._period - - @period.setter - def period(self, period): - """Sets the period of this Metrics. - - - :param period: The period of this Metrics. # noqa: E501 - :type: float - """ - - self._period = period - - @property - def samples(self): - """Gets the samples of this Metrics. # noqa: E501 - - - :return: The samples of this Metrics. # noqa: E501 - :rtype: list[MetricsSample] - """ - return self._samples - - @samples.setter - def samples(self, samples): - """Sets the samples of this Metrics. - - - :param samples: The samples of this Metrics. # noqa: E501 - :type: list[MetricsSample] - """ - - self._samples = samples - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Metrics, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Metrics): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/metrics_sample.py b/sdk/python/sdk/zrok/zrok_api/models/metrics_sample.py deleted file mode 100644 index 8e297c43..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/metrics_sample.py +++ /dev/null @@ -1,162 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class MetricsSample(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'rx': 'float', - 'tx': 'float', - 'timestamp': 'float' - } - - attribute_map = { - 'rx': 'rx', - 'tx': 'tx', - 'timestamp': 'timestamp' - } - - def __init__(self, rx=None, tx=None, timestamp=None): # noqa: E501 - """MetricsSample - a model defined in Swagger""" # noqa: E501 - self._rx = None - self._tx = None - self._timestamp = None - self.discriminator = None - if rx is not None: - self.rx = rx - if tx is not None: - self.tx = tx - if timestamp is not None: - self.timestamp = timestamp - - @property - def rx(self): - """Gets the rx of this MetricsSample. # noqa: E501 - - - :return: The rx of this MetricsSample. # noqa: E501 - :rtype: float - """ - return self._rx - - @rx.setter - def rx(self, rx): - """Sets the rx of this MetricsSample. - - - :param rx: The rx of this MetricsSample. # noqa: E501 - :type: float - """ - - self._rx = rx - - @property - def tx(self): - """Gets the tx of this MetricsSample. # noqa: E501 - - - :return: The tx of this MetricsSample. # noqa: E501 - :rtype: float - """ - return self._tx - - @tx.setter - def tx(self, tx): - """Sets the tx of this MetricsSample. - - - :param tx: The tx of this MetricsSample. # noqa: E501 - :type: float - """ - - self._tx = tx - - @property - def timestamp(self): - """Gets the timestamp of this MetricsSample. # noqa: E501 - - - :return: The timestamp of this MetricsSample. # noqa: E501 - :rtype: float - """ - return self._timestamp - - @timestamp.setter - def timestamp(self, timestamp): - """Sets the timestamp of this MetricsSample. - - - :param timestamp: The timestamp of this MetricsSample. # noqa: E501 - :type: float - """ - - self._timestamp = timestamp - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(MetricsSample, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MetricsSample): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/organization_add_body.py b/sdk/python/sdk/zrok/zrok_api/models/organization_add_body.py deleted file mode 100644 index 48fd06da..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/organization_add_body.py +++ /dev/null @@ -1,162 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class OrganizationAddBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'organization_token': 'str', - 'email': 'str', - 'admin': 'bool' - } - - attribute_map = { - 'organization_token': 'organizationToken', - 'email': 'email', - 'admin': 'admin' - } - - def __init__(self, organization_token=None, email=None, admin=None): # noqa: E501 - """OrganizationAddBody - a model defined in Swagger""" # noqa: E501 - self._organization_token = None - self._email = None - self._admin = None - self.discriminator = None - if organization_token is not None: - self.organization_token = organization_token - if email is not None: - self.email = email - if admin is not None: - self.admin = admin - - @property - def organization_token(self): - """Gets the organization_token of this OrganizationAddBody. # noqa: E501 - - - :return: The organization_token of this OrganizationAddBody. # noqa: E501 - :rtype: str - """ - return self._organization_token - - @organization_token.setter - def organization_token(self, organization_token): - """Sets the organization_token of this OrganizationAddBody. - - - :param organization_token: The organization_token of this OrganizationAddBody. # noqa: E501 - :type: str - """ - - self._organization_token = organization_token - - @property - def email(self): - """Gets the email of this OrganizationAddBody. # noqa: E501 - - - :return: The email of this OrganizationAddBody. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this OrganizationAddBody. - - - :param email: The email of this OrganizationAddBody. # noqa: E501 - :type: str - """ - - self._email = email - - @property - def admin(self): - """Gets the admin of this OrganizationAddBody. # noqa: E501 - - - :return: The admin of this OrganizationAddBody. # noqa: E501 - :rtype: bool - """ - return self._admin - - @admin.setter - def admin(self, admin): - """Sets the admin of this OrganizationAddBody. - - - :param admin: The admin of this OrganizationAddBody. # noqa: E501 - :type: bool - """ - - self._admin = admin - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(OrganizationAddBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OrganizationAddBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/organization_body.py b/sdk/python/sdk/zrok/zrok_api/models/organization_body.py deleted file mode 100644 index 8133f0ff..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/organization_body.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class OrganizationBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'description': 'str' - } - - attribute_map = { - 'description': 'description' - } - - def __init__(self, description=None): # noqa: E501 - """OrganizationBody - a model defined in Swagger""" # noqa: E501 - self._description = None - self.discriminator = None - if description is not None: - self.description = description - - @property - def description(self): - """Gets the description of this OrganizationBody. # noqa: E501 - - - :return: The description of this OrganizationBody. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this OrganizationBody. - - - :param description: The description of this OrganizationBody. # noqa: E501 - :type: str - """ - - self._description = description - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(OrganizationBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OrganizationBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/organization_body1.py b/sdk/python/sdk/zrok/zrok_api/models/organization_body1.py deleted file mode 100644 index 45a5afde..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/organization_body1.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class OrganizationBody1(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'organization_token': 'str' - } - - attribute_map = { - 'organization_token': 'organizationToken' - } - - def __init__(self, organization_token=None): # noqa: E501 - """OrganizationBody1 - a model defined in Swagger""" # noqa: E501 - self._organization_token = None - self.discriminator = None - if organization_token is not None: - self.organization_token = organization_token - - @property - def organization_token(self): - """Gets the organization_token of this OrganizationBody1. # noqa: E501 - - - :return: The organization_token of this OrganizationBody1. # noqa: E501 - :rtype: str - """ - return self._organization_token - - @organization_token.setter - def organization_token(self, organization_token): - """Sets the organization_token of this OrganizationBody1. - - - :param organization_token: The organization_token of this OrganizationBody1. # noqa: E501 - :type: str - """ - - self._organization_token = organization_token - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(OrganizationBody1, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OrganizationBody1): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/organization_list_body.py b/sdk/python/sdk/zrok/zrok_api/models/organization_list_body.py deleted file mode 100644 index 167a9fe9..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/organization_list_body.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class OrganizationListBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'organization_token': 'str' - } - - attribute_map = { - 'organization_token': 'organizationToken' - } - - def __init__(self, organization_token=None): # noqa: E501 - """OrganizationListBody - a model defined in Swagger""" # noqa: E501 - self._organization_token = None - self.discriminator = None - if organization_token is not None: - self.organization_token = organization_token - - @property - def organization_token(self): - """Gets the organization_token of this OrganizationListBody. # noqa: E501 - - - :return: The organization_token of this OrganizationListBody. # noqa: E501 - :rtype: str - """ - return self._organization_token - - @organization_token.setter - def organization_token(self, organization_token): - """Sets the organization_token of this OrganizationListBody. - - - :param organization_token: The organization_token of this OrganizationListBody. # noqa: E501 - :type: str - """ - - self._organization_token = organization_token - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(OrganizationListBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OrganizationListBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/organization_remove_body.py b/sdk/python/sdk/zrok/zrok_api/models/organization_remove_body.py deleted file mode 100644 index c4a9374d..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/organization_remove_body.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class OrganizationRemoveBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'organization_token': 'str', - 'email': 'str' - } - - attribute_map = { - 'organization_token': 'organizationToken', - 'email': 'email' - } - - def __init__(self, organization_token=None, email=None): # noqa: E501 - """OrganizationRemoveBody - a model defined in Swagger""" # noqa: E501 - self._organization_token = None - self._email = None - self.discriminator = None - if organization_token is not None: - self.organization_token = organization_token - if email is not None: - self.email = email - - @property - def organization_token(self): - """Gets the organization_token of this OrganizationRemoveBody. # noqa: E501 - - - :return: The organization_token of this OrganizationRemoveBody. # noqa: E501 - :rtype: str - """ - return self._organization_token - - @organization_token.setter - def organization_token(self, organization_token): - """Sets the organization_token of this OrganizationRemoveBody. - - - :param organization_token: The organization_token of this OrganizationRemoveBody. # noqa: E501 - :type: str - """ - - self._organization_token = organization_token - - @property - def email(self): - """Gets the email of this OrganizationRemoveBody. # noqa: E501 - - - :return: The email of this OrganizationRemoveBody. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this OrganizationRemoveBody. - - - :param email: The email of this OrganizationRemoveBody. # noqa: E501 - :type: str - """ - - self._email = email - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(OrganizationRemoveBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OrganizationRemoveBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/overview.py b/sdk/python/sdk/zrok/zrok_api/models/overview.py deleted file mode 100644 index 7ef8aac4..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/overview.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class Overview(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'account_limited': 'bool', - 'environments': 'list[EnvironmentAndResources]' - } - - attribute_map = { - 'account_limited': 'accountLimited', - 'environments': 'environments' - } - - def __init__(self, account_limited=None, environments=None): # noqa: E501 - """Overview - a model defined in Swagger""" # noqa: E501 - self._account_limited = None - self._environments = None - self.discriminator = None - if account_limited is not None: - self.account_limited = account_limited - if environments is not None: - self.environments = environments - - @property - def account_limited(self): - """Gets the account_limited of this Overview. # noqa: E501 - - - :return: The account_limited of this Overview. # noqa: E501 - :rtype: bool - """ - return self._account_limited - - @account_limited.setter - def account_limited(self, account_limited): - """Sets the account_limited of this Overview. - - - :param account_limited: The account_limited of this Overview. # noqa: E501 - :type: bool - """ - - self._account_limited = account_limited - - @property - def environments(self): - """Gets the environments of this Overview. # noqa: E501 - - - :return: The environments of this Overview. # noqa: E501 - :rtype: list[EnvironmentAndResources] - """ - return self._environments - - @environments.setter - def environments(self, environments): - """Sets the environments of this Overview. - - - :param environments: The environments of this Overview. # noqa: E501 - :type: list[EnvironmentAndResources] - """ - - self._environments = environments - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Overview, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Overview): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/principal.py b/sdk/python/sdk/zrok/zrok_api/models/principal.py deleted file mode 100644 index 0f1c6ff4..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/principal.py +++ /dev/null @@ -1,214 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class Principal(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'int', - 'email': 'str', - 'token': 'str', - 'limitless': 'bool', - 'admin': 'bool' - } - - attribute_map = { - 'id': 'id', - 'email': 'email', - 'token': 'token', - 'limitless': 'limitless', - 'admin': 'admin' - } - - def __init__(self, id=None, email=None, token=None, limitless=None, admin=None): # noqa: E501 - """Principal - a model defined in Swagger""" # noqa: E501 - self._id = None - self._email = None - self._token = None - self._limitless = None - self._admin = None - self.discriminator = None - if id is not None: - self.id = id - if email is not None: - self.email = email - if token is not None: - self.token = token - if limitless is not None: - self.limitless = limitless - if admin is not None: - self.admin = admin - - @property - def id(self): - """Gets the id of this Principal. # noqa: E501 - - - :return: The id of this Principal. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this Principal. - - - :param id: The id of this Principal. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def email(self): - """Gets the email of this Principal. # noqa: E501 - - - :return: The email of this Principal. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this Principal. - - - :param email: The email of this Principal. # noqa: E501 - :type: str - """ - - self._email = email - - @property - def token(self): - """Gets the token of this Principal. # noqa: E501 - - - :return: The token of this Principal. # noqa: E501 - :rtype: str - """ - return self._token - - @token.setter - def token(self, token): - """Sets the token of this Principal. - - - :param token: The token of this Principal. # noqa: E501 - :type: str - """ - - self._token = token - - @property - def limitless(self): - """Gets the limitless of this Principal. # noqa: E501 - - - :return: The limitless of this Principal. # noqa: E501 - :rtype: bool - """ - return self._limitless - - @limitless.setter - def limitless(self, limitless): - """Sets the limitless of this Principal. - - - :param limitless: The limitless of this Principal. # noqa: E501 - :type: bool - """ - - self._limitless = limitless - - @property - def admin(self): - """Gets the admin of this Principal. # noqa: E501 - - - :return: The admin of this Principal. # noqa: E501 - :rtype: bool - """ - return self._admin - - @admin.setter - def admin(self, admin): - """Sets the admin of this Principal. - - - :param admin: The admin of this Principal. # noqa: E501 - :type: bool - """ - - self._admin = admin - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Principal, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Principal): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/regenerate_account_token_body.py b/sdk/python/sdk/zrok/zrok_api/models/regenerate_account_token_body.py deleted file mode 100644 index 61513276..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/regenerate_account_token_body.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class RegenerateAccountTokenBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'email_address': 'str' - } - - attribute_map = { - 'email_address': 'emailAddress' - } - - def __init__(self, email_address=None): # noqa: E501 - """RegenerateAccountTokenBody - a model defined in Swagger""" # noqa: E501 - self._email_address = None - self.discriminator = None - if email_address is not None: - self.email_address = email_address - - @property - def email_address(self): - """Gets the email_address of this RegenerateAccountTokenBody. # noqa: E501 - - - :return: The email_address of this RegenerateAccountTokenBody. # noqa: E501 - :rtype: str - """ - return self._email_address - - @email_address.setter - def email_address(self, email_address): - """Sets the email_address of this RegenerateAccountTokenBody. - - - :param email_address: The email_address of this RegenerateAccountTokenBody. # noqa: E501 - :type: str - """ - - self._email_address = email_address - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(RegenerateAccountTokenBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RegenerateAccountTokenBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/register_body.py b/sdk/python/sdk/zrok/zrok_api/models/register_body.py deleted file mode 100644 index 80549446..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/register_body.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class RegisterBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'register_token': 'str', - 'password': 'str' - } - - attribute_map = { - 'register_token': 'registerToken', - 'password': 'password' - } - - def __init__(self, register_token=None, password=None): # noqa: E501 - """RegisterBody - a model defined in Swagger""" # noqa: E501 - self._register_token = None - self._password = None - self.discriminator = None - if register_token is not None: - self.register_token = register_token - if password is not None: - self.password = password - - @property - def register_token(self): - """Gets the register_token of this RegisterBody. # noqa: E501 - - - :return: The register_token of this RegisterBody. # noqa: E501 - :rtype: str - """ - return self._register_token - - @register_token.setter - def register_token(self, register_token): - """Sets the register_token of this RegisterBody. - - - :param register_token: The register_token of this RegisterBody. # noqa: E501 - :type: str - """ - - self._register_token = register_token - - @property - def password(self): - """Gets the password of this RegisterBody. # noqa: E501 - - - :return: The password of this RegisterBody. # noqa: E501 - :rtype: str - """ - return self._password - - @password.setter - def password(self, password): - """Sets the password of this RegisterBody. - - - :param password: The password of this RegisterBody. # noqa: E501 - :type: str - """ - - self._password = password - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(RegisterBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RegisterBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/reset_password_body.py b/sdk/python/sdk/zrok/zrok_api/models/reset_password_body.py deleted file mode 100644 index 0dbc086a..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/reset_password_body.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ResetPasswordBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'reset_token': 'str', - 'password': 'str' - } - - attribute_map = { - 'reset_token': 'resetToken', - 'password': 'password' - } - - def __init__(self, reset_token=None, password=None): # noqa: E501 - """ResetPasswordBody - a model defined in Swagger""" # noqa: E501 - self._reset_token = None - self._password = None - self.discriminator = None - if reset_token is not None: - self.reset_token = reset_token - if password is not None: - self.password = password - - @property - def reset_token(self): - """Gets the reset_token of this ResetPasswordBody. # noqa: E501 - - - :return: The reset_token of this ResetPasswordBody. # noqa: E501 - :rtype: str - """ - return self._reset_token - - @reset_token.setter - def reset_token(self, reset_token): - """Sets the reset_token of this ResetPasswordBody. - - - :param reset_token: The reset_token of this ResetPasswordBody. # noqa: E501 - :type: str - """ - - self._reset_token = reset_token - - @property - def password(self): - """Gets the password of this ResetPasswordBody. # noqa: E501 - - - :return: The password of this ResetPasswordBody. # noqa: E501 - :rtype: str - """ - return self._password - - @password.setter - def password(self, password): - """Sets the password of this ResetPasswordBody. - - - :param password: The password of this ResetPasswordBody. # noqa: E501 - :type: str - """ - - self._password = password - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ResetPasswordBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ResetPasswordBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/reset_password_request_body.py b/sdk/python/sdk/zrok/zrok_api/models/reset_password_request_body.py deleted file mode 100644 index 2d0bd614..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/reset_password_request_body.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ResetPasswordRequestBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'email_address': 'str' - } - - attribute_map = { - 'email_address': 'emailAddress' - } - - def __init__(self, email_address=None): # noqa: E501 - """ResetPasswordRequestBody - a model defined in Swagger""" # noqa: E501 - self._email_address = None - self.discriminator = None - if email_address is not None: - self.email_address = email_address - - @property - def email_address(self): - """Gets the email_address of this ResetPasswordRequestBody. # noqa: E501 - - - :return: The email_address of this ResetPasswordRequestBody. # noqa: E501 - :rtype: str - """ - return self._email_address - - @email_address.setter - def email_address(self, email_address): - """Sets the email_address of this ResetPasswordRequestBody. - - - :param email_address: The email_address of this ResetPasswordRequestBody. # noqa: E501 - :type: str - """ - - self._email_address = email_address - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ResetPasswordRequestBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ResetPasswordRequestBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/share.py b/sdk/python/sdk/zrok/zrok_api/models/share.py deleted file mode 100644 index abdb66af..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/share.py +++ /dev/null @@ -1,396 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class Share(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'share_token': 'str', - 'z_id': 'str', - 'share_mode': 'str', - 'backend_mode': 'str', - 'frontend_selection': 'str', - 'frontend_endpoint': 'str', - 'backend_proxy_endpoint': 'str', - 'reserved': 'bool', - 'activity': 'SparkData', - 'limited': 'bool', - 'created_at': 'int', - 'updated_at': 'int' - } - - attribute_map = { - 'share_token': 'shareToken', - 'z_id': 'zId', - 'share_mode': 'shareMode', - 'backend_mode': 'backendMode', - 'frontend_selection': 'frontendSelection', - 'frontend_endpoint': 'frontendEndpoint', - 'backend_proxy_endpoint': 'backendProxyEndpoint', - 'reserved': 'reserved', - 'activity': 'activity', - 'limited': 'limited', - 'created_at': 'createdAt', - 'updated_at': 'updatedAt' - } - - def __init__(self, share_token=None, z_id=None, share_mode=None, backend_mode=None, frontend_selection=None, frontend_endpoint=None, backend_proxy_endpoint=None, reserved=None, activity=None, limited=None, created_at=None, updated_at=None): # noqa: E501 - """Share - a model defined in Swagger""" # noqa: E501 - self._share_token = None - self._z_id = None - self._share_mode = None - self._backend_mode = None - self._frontend_selection = None - self._frontend_endpoint = None - self._backend_proxy_endpoint = None - self._reserved = None - self._activity = None - self._limited = None - self._created_at = None - self._updated_at = None - self.discriminator = None - if share_token is not None: - self.share_token = share_token - if z_id is not None: - self.z_id = z_id - if share_mode is not None: - self.share_mode = share_mode - if backend_mode is not None: - self.backend_mode = backend_mode - if frontend_selection is not None: - self.frontend_selection = frontend_selection - if frontend_endpoint is not None: - self.frontend_endpoint = frontend_endpoint - if backend_proxy_endpoint is not None: - self.backend_proxy_endpoint = backend_proxy_endpoint - if reserved is not None: - self.reserved = reserved - if activity is not None: - self.activity = activity - if limited is not None: - self.limited = limited - if created_at is not None: - self.created_at = created_at - if updated_at is not None: - self.updated_at = updated_at - - @property - def share_token(self): - """Gets the share_token of this Share. # noqa: E501 - - - :return: The share_token of this Share. # noqa: E501 - :rtype: str - """ - return self._share_token - - @share_token.setter - def share_token(self, share_token): - """Sets the share_token of this Share. - - - :param share_token: The share_token of this Share. # noqa: E501 - :type: str - """ - - self._share_token = share_token - - @property - def z_id(self): - """Gets the z_id of this Share. # noqa: E501 - - - :return: The z_id of this Share. # noqa: E501 - :rtype: str - """ - return self._z_id - - @z_id.setter - def z_id(self, z_id): - """Sets the z_id of this Share. - - - :param z_id: The z_id of this Share. # noqa: E501 - :type: str - """ - - self._z_id = z_id - - @property - def share_mode(self): - """Gets the share_mode of this Share. # noqa: E501 - - - :return: The share_mode of this Share. # noqa: E501 - :rtype: str - """ - return self._share_mode - - @share_mode.setter - def share_mode(self, share_mode): - """Sets the share_mode of this Share. - - - :param share_mode: The share_mode of this Share. # noqa: E501 - :type: str - """ - - self._share_mode = share_mode - - @property - def backend_mode(self): - """Gets the backend_mode of this Share. # noqa: E501 - - - :return: The backend_mode of this Share. # noqa: E501 - :rtype: str - """ - return self._backend_mode - - @backend_mode.setter - def backend_mode(self, backend_mode): - """Sets the backend_mode of this Share. - - - :param backend_mode: The backend_mode of this Share. # noqa: E501 - :type: str - """ - - self._backend_mode = backend_mode - - @property - def frontend_selection(self): - """Gets the frontend_selection of this Share. # noqa: E501 - - - :return: The frontend_selection of this Share. # noqa: E501 - :rtype: str - """ - return self._frontend_selection - - @frontend_selection.setter - def frontend_selection(self, frontend_selection): - """Sets the frontend_selection of this Share. - - - :param frontend_selection: The frontend_selection of this Share. # noqa: E501 - :type: str - """ - - self._frontend_selection = frontend_selection - - @property - def frontend_endpoint(self): - """Gets the frontend_endpoint of this Share. # noqa: E501 - - - :return: The frontend_endpoint of this Share. # noqa: E501 - :rtype: str - """ - return self._frontend_endpoint - - @frontend_endpoint.setter - def frontend_endpoint(self, frontend_endpoint): - """Sets the frontend_endpoint of this Share. - - - :param frontend_endpoint: The frontend_endpoint of this Share. # noqa: E501 - :type: str - """ - - self._frontend_endpoint = frontend_endpoint - - @property - def backend_proxy_endpoint(self): - """Gets the backend_proxy_endpoint of this Share. # noqa: E501 - - - :return: The backend_proxy_endpoint of this Share. # noqa: E501 - :rtype: str - """ - return self._backend_proxy_endpoint - - @backend_proxy_endpoint.setter - def backend_proxy_endpoint(self, backend_proxy_endpoint): - """Sets the backend_proxy_endpoint of this Share. - - - :param backend_proxy_endpoint: The backend_proxy_endpoint of this Share. # noqa: E501 - :type: str - """ - - self._backend_proxy_endpoint = backend_proxy_endpoint - - @property - def reserved(self): - """Gets the reserved of this Share. # noqa: E501 - - - :return: The reserved of this Share. # noqa: E501 - :rtype: bool - """ - return self._reserved - - @reserved.setter - def reserved(self, reserved): - """Sets the reserved of this Share. - - - :param reserved: The reserved of this Share. # noqa: E501 - :type: bool - """ - - self._reserved = reserved - - @property - def activity(self): - """Gets the activity of this Share. # noqa: E501 - - - :return: The activity of this Share. # noqa: E501 - :rtype: SparkData - """ - return self._activity - - @activity.setter - def activity(self, activity): - """Sets the activity of this Share. - - - :param activity: The activity of this Share. # noqa: E501 - :type: SparkData - """ - - self._activity = activity - - @property - def limited(self): - """Gets the limited of this Share. # noqa: E501 - - - :return: The limited of this Share. # noqa: E501 - :rtype: bool - """ - return self._limited - - @limited.setter - def limited(self, limited): - """Sets the limited of this Share. - - - :param limited: The limited of this Share. # noqa: E501 - :type: bool - """ - - self._limited = limited - - @property - def created_at(self): - """Gets the created_at of this Share. # noqa: E501 - - - :return: The created_at of this Share. # noqa: E501 - :rtype: int - """ - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Sets the created_at of this Share. - - - :param created_at: The created_at of this Share. # noqa: E501 - :type: int - """ - - self._created_at = created_at - - @property - def updated_at(self): - """Gets the updated_at of this Share. # noqa: E501 - - - :return: The updated_at of this Share. # noqa: E501 - :rtype: int - """ - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Sets the updated_at of this Share. - - - :param updated_at: The updated_at of this Share. # noqa: E501 - :type: int - """ - - self._updated_at = updated_at - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Share, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Share): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/share_body.py b/sdk/python/sdk/zrok/zrok_api/models/share_body.py deleted file mode 100644 index f8398b70..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/share_body.py +++ /dev/null @@ -1,188 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ShareBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'share_token': 'str', - 'backend_proxy_endpoint': 'str', - 'add_access_grants': 'list[str]', - 'remove_access_grants': 'list[str]' - } - - attribute_map = { - 'share_token': 'shareToken', - 'backend_proxy_endpoint': 'backendProxyEndpoint', - 'add_access_grants': 'addAccessGrants', - 'remove_access_grants': 'removeAccessGrants' - } - - def __init__(self, share_token=None, backend_proxy_endpoint=None, add_access_grants=None, remove_access_grants=None): # noqa: E501 - """ShareBody - a model defined in Swagger""" # noqa: E501 - self._share_token = None - self._backend_proxy_endpoint = None - self._add_access_grants = None - self._remove_access_grants = None - self.discriminator = None - if share_token is not None: - self.share_token = share_token - if backend_proxy_endpoint is not None: - self.backend_proxy_endpoint = backend_proxy_endpoint - if add_access_grants is not None: - self.add_access_grants = add_access_grants - if remove_access_grants is not None: - self.remove_access_grants = remove_access_grants - - @property - def share_token(self): - """Gets the share_token of this ShareBody. # noqa: E501 - - - :return: The share_token of this ShareBody. # noqa: E501 - :rtype: str - """ - return self._share_token - - @share_token.setter - def share_token(self, share_token): - """Sets the share_token of this ShareBody. - - - :param share_token: The share_token of this ShareBody. # noqa: E501 - :type: str - """ - - self._share_token = share_token - - @property - def backend_proxy_endpoint(self): - """Gets the backend_proxy_endpoint of this ShareBody. # noqa: E501 - - - :return: The backend_proxy_endpoint of this ShareBody. # noqa: E501 - :rtype: str - """ - return self._backend_proxy_endpoint - - @backend_proxy_endpoint.setter - def backend_proxy_endpoint(self, backend_proxy_endpoint): - """Sets the backend_proxy_endpoint of this ShareBody. - - - :param backend_proxy_endpoint: The backend_proxy_endpoint of this ShareBody. # noqa: E501 - :type: str - """ - - self._backend_proxy_endpoint = backend_proxy_endpoint - - @property - def add_access_grants(self): - """Gets the add_access_grants of this ShareBody. # noqa: E501 - - - :return: The add_access_grants of this ShareBody. # noqa: E501 - :rtype: list[str] - """ - return self._add_access_grants - - @add_access_grants.setter - def add_access_grants(self, add_access_grants): - """Sets the add_access_grants of this ShareBody. - - - :param add_access_grants: The add_access_grants of this ShareBody. # noqa: E501 - :type: list[str] - """ - - self._add_access_grants = add_access_grants - - @property - def remove_access_grants(self): - """Gets the remove_access_grants of this ShareBody. # noqa: E501 - - - :return: The remove_access_grants of this ShareBody. # noqa: E501 - :rtype: list[str] - """ - return self._remove_access_grants - - @remove_access_grants.setter - def remove_access_grants(self, remove_access_grants): - """Sets the remove_access_grants of this ShareBody. - - - :param remove_access_grants: The remove_access_grants of this ShareBody. # noqa: E501 - :type: list[str] - """ - - self._remove_access_grants = remove_access_grants - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ShareBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ShareBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/share_request.py b/sdk/python/sdk/zrok/zrok_api/models/share_request.py deleted file mode 100644 index ee9a08b1..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/share_request.py +++ /dev/null @@ -1,472 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ShareRequest(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'env_zid': 'str', - 'share_mode': 'str', - 'frontend_selection': 'list[str]', - 'backend_mode': 'str', - 'backend_proxy_endpoint': 'str', - 'auth_scheme': 'str', - 'auth_users': 'list[AuthUser]', - 'oauth_provider': 'str', - 'oauth_email_domains': 'list[str]', - 'oauth_authorization_check_interval': 'str', - 'reserved': 'bool', - 'permission_mode': 'str', - 'access_grants': 'list[str]', - 'unique_name': 'str' - } - - attribute_map = { - 'env_zid': 'envZId', - 'share_mode': 'shareMode', - 'frontend_selection': 'frontendSelection', - 'backend_mode': 'backendMode', - 'backend_proxy_endpoint': 'backendProxyEndpoint', - 'auth_scheme': 'authScheme', - 'auth_users': 'authUsers', - 'oauth_provider': 'oauthProvider', - 'oauth_email_domains': 'oauthEmailDomains', - 'oauth_authorization_check_interval': 'oauthAuthorizationCheckInterval', - 'reserved': 'reserved', - 'permission_mode': 'permissionMode', - 'access_grants': 'accessGrants', - 'unique_name': 'uniqueName' - } - - def __init__(self, env_zid=None, share_mode=None, frontend_selection=None, backend_mode=None, backend_proxy_endpoint=None, auth_scheme=None, auth_users=None, oauth_provider=None, oauth_email_domains=None, oauth_authorization_check_interval=None, reserved=None, permission_mode=None, access_grants=None, unique_name=None): # noqa: E501 - """ShareRequest - a model defined in Swagger""" # noqa: E501 - self._env_zid = None - self._share_mode = None - self._frontend_selection = None - self._backend_mode = None - self._backend_proxy_endpoint = None - self._auth_scheme = None - self._auth_users = None - self._oauth_provider = None - self._oauth_email_domains = None - self._oauth_authorization_check_interval = None - self._reserved = None - self._permission_mode = None - self._access_grants = None - self._unique_name = None - self.discriminator = None - if env_zid is not None: - self.env_zid = env_zid - if share_mode is not None: - self.share_mode = share_mode - if frontend_selection is not None: - self.frontend_selection = frontend_selection - if backend_mode is not None: - self.backend_mode = backend_mode - if backend_proxy_endpoint is not None: - self.backend_proxy_endpoint = backend_proxy_endpoint - if auth_scheme is not None: - self.auth_scheme = auth_scheme - if auth_users is not None: - self.auth_users = auth_users - if oauth_provider is not None: - self.oauth_provider = oauth_provider - if oauth_email_domains is not None: - self.oauth_email_domains = oauth_email_domains - if oauth_authorization_check_interval is not None: - self.oauth_authorization_check_interval = oauth_authorization_check_interval - if reserved is not None: - self.reserved = reserved - if permission_mode is not None: - self.permission_mode = permission_mode - if access_grants is not None: - self.access_grants = access_grants - if unique_name is not None: - self.unique_name = unique_name - - @property - def env_zid(self): - """Gets the env_zid of this ShareRequest. # noqa: E501 - - - :return: The env_zid of this ShareRequest. # noqa: E501 - :rtype: str - """ - return self._env_zid - - @env_zid.setter - def env_zid(self, env_zid): - """Sets the env_zid of this ShareRequest. - - - :param env_zid: The env_zid of this ShareRequest. # noqa: E501 - :type: str - """ - - self._env_zid = env_zid - - @property - def share_mode(self): - """Gets the share_mode of this ShareRequest. # noqa: E501 - - - :return: The share_mode of this ShareRequest. # noqa: E501 - :rtype: str - """ - return self._share_mode - - @share_mode.setter - def share_mode(self, share_mode): - """Sets the share_mode of this ShareRequest. - - - :param share_mode: The share_mode of this ShareRequest. # noqa: E501 - :type: str - """ - allowed_values = ["public", "private"] # noqa: E501 - if share_mode not in allowed_values: - raise ValueError( - "Invalid value for `share_mode` ({0}), must be one of {1}" # noqa: E501 - .format(share_mode, allowed_values) - ) - - self._share_mode = share_mode - - @property - def frontend_selection(self): - """Gets the frontend_selection of this ShareRequest. # noqa: E501 - - - :return: The frontend_selection of this ShareRequest. # noqa: E501 - :rtype: list[str] - """ - return self._frontend_selection - - @frontend_selection.setter - def frontend_selection(self, frontend_selection): - """Sets the frontend_selection of this ShareRequest. - - - :param frontend_selection: The frontend_selection of this ShareRequest. # noqa: E501 - :type: list[str] - """ - - self._frontend_selection = frontend_selection - - @property - def backend_mode(self): - """Gets the backend_mode of this ShareRequest. # noqa: E501 - - - :return: The backend_mode of this ShareRequest. # noqa: E501 - :rtype: str - """ - return self._backend_mode - - @backend_mode.setter - def backend_mode(self, backend_mode): - """Sets the backend_mode of this ShareRequest. - - - :param backend_mode: The backend_mode of this ShareRequest. # noqa: E501 - :type: str - """ - allowed_values = ["proxy", "web", "tcpTunnel", "udpTunnel", "caddy", "drive", "socks", "vpn"] # noqa: E501 - if backend_mode not in allowed_values: - raise ValueError( - "Invalid value for `backend_mode` ({0}), must be one of {1}" # noqa: E501 - .format(backend_mode, allowed_values) - ) - - self._backend_mode = backend_mode - - @property - def backend_proxy_endpoint(self): - """Gets the backend_proxy_endpoint of this ShareRequest. # noqa: E501 - - - :return: The backend_proxy_endpoint of this ShareRequest. # noqa: E501 - :rtype: str - """ - return self._backend_proxy_endpoint - - @backend_proxy_endpoint.setter - def backend_proxy_endpoint(self, backend_proxy_endpoint): - """Sets the backend_proxy_endpoint of this ShareRequest. - - - :param backend_proxy_endpoint: The backend_proxy_endpoint of this ShareRequest. # noqa: E501 - :type: str - """ - - self._backend_proxy_endpoint = backend_proxy_endpoint - - @property - def auth_scheme(self): - """Gets the auth_scheme of this ShareRequest. # noqa: E501 - - - :return: The auth_scheme of this ShareRequest. # noqa: E501 - :rtype: str - """ - return self._auth_scheme - - @auth_scheme.setter - def auth_scheme(self, auth_scheme): - """Sets the auth_scheme of this ShareRequest. - - - :param auth_scheme: The auth_scheme of this ShareRequest. # noqa: E501 - :type: str - """ - - self._auth_scheme = auth_scheme - - @property - def auth_users(self): - """Gets the auth_users of this ShareRequest. # noqa: E501 - - - :return: The auth_users of this ShareRequest. # noqa: E501 - :rtype: list[AuthUser] - """ - return self._auth_users - - @auth_users.setter - def auth_users(self, auth_users): - """Sets the auth_users of this ShareRequest. - - - :param auth_users: The auth_users of this ShareRequest. # noqa: E501 - :type: list[AuthUser] - """ - - self._auth_users = auth_users - - @property - def oauth_provider(self): - """Gets the oauth_provider of this ShareRequest. # noqa: E501 - - - :return: The oauth_provider of this ShareRequest. # noqa: E501 - :rtype: str - """ - return self._oauth_provider - - @oauth_provider.setter - def oauth_provider(self, oauth_provider): - """Sets the oauth_provider of this ShareRequest. - - - :param oauth_provider: The oauth_provider of this ShareRequest. # noqa: E501 - :type: str - """ - allowed_values = ["github", "google"] # noqa: E501 - if oauth_provider not in allowed_values: - raise ValueError( - "Invalid value for `oauth_provider` ({0}), must be one of {1}" # noqa: E501 - .format(oauth_provider, allowed_values) - ) - - self._oauth_provider = oauth_provider - - @property - def oauth_email_domains(self): - """Gets the oauth_email_domains of this ShareRequest. # noqa: E501 - - - :return: The oauth_email_domains of this ShareRequest. # noqa: E501 - :rtype: list[str] - """ - return self._oauth_email_domains - - @oauth_email_domains.setter - def oauth_email_domains(self, oauth_email_domains): - """Sets the oauth_email_domains of this ShareRequest. - - - :param oauth_email_domains: The oauth_email_domains of this ShareRequest. # noqa: E501 - :type: list[str] - """ - - self._oauth_email_domains = oauth_email_domains - - @property - def oauth_authorization_check_interval(self): - """Gets the oauth_authorization_check_interval of this ShareRequest. # noqa: E501 - - - :return: The oauth_authorization_check_interval of this ShareRequest. # noqa: E501 - :rtype: str - """ - return self._oauth_authorization_check_interval - - @oauth_authorization_check_interval.setter - def oauth_authorization_check_interval(self, oauth_authorization_check_interval): - """Sets the oauth_authorization_check_interval of this ShareRequest. - - - :param oauth_authorization_check_interval: The oauth_authorization_check_interval of this ShareRequest. # noqa: E501 - :type: str - """ - - self._oauth_authorization_check_interval = oauth_authorization_check_interval - - @property - def reserved(self): - """Gets the reserved of this ShareRequest. # noqa: E501 - - - :return: The reserved of this ShareRequest. # noqa: E501 - :rtype: bool - """ - return self._reserved - - @reserved.setter - def reserved(self, reserved): - """Sets the reserved of this ShareRequest. - - - :param reserved: The reserved of this ShareRequest. # noqa: E501 - :type: bool - """ - - self._reserved = reserved - - @property - def permission_mode(self): - """Gets the permission_mode of this ShareRequest. # noqa: E501 - - - :return: The permission_mode of this ShareRequest. # noqa: E501 - :rtype: str - """ - return self._permission_mode - - @permission_mode.setter - def permission_mode(self, permission_mode): - """Sets the permission_mode of this ShareRequest. - - - :param permission_mode: The permission_mode of this ShareRequest. # noqa: E501 - :type: str - """ - allowed_values = ["open", "closed"] # noqa: E501 - if permission_mode not in allowed_values: - raise ValueError( - "Invalid value for `permission_mode` ({0}), must be one of {1}" # noqa: E501 - .format(permission_mode, allowed_values) - ) - - self._permission_mode = permission_mode - - @property - def access_grants(self): - """Gets the access_grants of this ShareRequest. # noqa: E501 - - - :return: The access_grants of this ShareRequest. # noqa: E501 - :rtype: list[str] - """ - return self._access_grants - - @access_grants.setter - def access_grants(self, access_grants): - """Sets the access_grants of this ShareRequest. - - - :param access_grants: The access_grants of this ShareRequest. # noqa: E501 - :type: list[str] - """ - - self._access_grants = access_grants - - @property - def unique_name(self): - """Gets the unique_name of this ShareRequest. # noqa: E501 - - - :return: The unique_name of this ShareRequest. # noqa: E501 - :rtype: str - """ - return self._unique_name - - @unique_name.setter - def unique_name(self, unique_name): - """Sets the unique_name of this ShareRequest. - - - :param unique_name: The unique_name of this ShareRequest. # noqa: E501 - :type: str - """ - - self._unique_name = unique_name - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ShareRequest, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ShareRequest): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/share_response.py b/sdk/python/sdk/zrok/zrok_api/models/share_response.py deleted file mode 100644 index dcb30e38..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/share_response.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ShareResponse(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'frontend_proxy_endpoints': 'list[str]', - 'share_token': 'str' - } - - attribute_map = { - 'frontend_proxy_endpoints': 'frontendProxyEndpoints', - 'share_token': 'shareToken' - } - - def __init__(self, frontend_proxy_endpoints=None, share_token=None): # noqa: E501 - """ShareResponse - a model defined in Swagger""" # noqa: E501 - self._frontend_proxy_endpoints = None - self._share_token = None - self.discriminator = None - if frontend_proxy_endpoints is not None: - self.frontend_proxy_endpoints = frontend_proxy_endpoints - if share_token is not None: - self.share_token = share_token - - @property - def frontend_proxy_endpoints(self): - """Gets the frontend_proxy_endpoints of this ShareResponse. # noqa: E501 - - - :return: The frontend_proxy_endpoints of this ShareResponse. # noqa: E501 - :rtype: list[str] - """ - return self._frontend_proxy_endpoints - - @frontend_proxy_endpoints.setter - def frontend_proxy_endpoints(self, frontend_proxy_endpoints): - """Sets the frontend_proxy_endpoints of this ShareResponse. - - - :param frontend_proxy_endpoints: The frontend_proxy_endpoints of this ShareResponse. # noqa: E501 - :type: list[str] - """ - - self._frontend_proxy_endpoints = frontend_proxy_endpoints - - @property - def share_token(self): - """Gets the share_token of this ShareResponse. # noqa: E501 - - - :return: The share_token of this ShareResponse. # noqa: E501 - :rtype: str - """ - return self._share_token - - @share_token.setter - def share_token(self, share_token): - """Sets the share_token of this ShareResponse. - - - :param share_token: The share_token of this ShareResponse. # noqa: E501 - :type: str - """ - - self._share_token = share_token - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ShareResponse, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ShareResponse): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/shares.py b/sdk/python/sdk/zrok/zrok_api/models/shares.py deleted file mode 100644 index c1ce3f4d..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/shares.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class Shares(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - } - - attribute_map = { - } - - def __init__(self): # noqa: E501 - """Shares - a model defined in Swagger""" # noqa: E501 - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Shares, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Shares): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/spark_data.py b/sdk/python/sdk/zrok/zrok_api/models/spark_data.py deleted file mode 100644 index 9ed04dfe..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/spark_data.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class SparkData(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - } - - attribute_map = { - } - - def __init__(self): # noqa: E501 - """SparkData - a model defined in Swagger""" # noqa: E501 - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(SparkData, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SparkData): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/spark_data_sample.py b/sdk/python/sdk/zrok/zrok_api/models/spark_data_sample.py deleted file mode 100644 index 52a1c1fd..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/spark_data_sample.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class SparkDataSample(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'rx': 'float', - 'tx': 'float' - } - - attribute_map = { - 'rx': 'rx', - 'tx': 'tx' - } - - def __init__(self, rx=None, tx=None): # noqa: E501 - """SparkDataSample - a model defined in Swagger""" # noqa: E501 - self._rx = None - self._tx = None - self.discriminator = None - if rx is not None: - self.rx = rx - if tx is not None: - self.tx = tx - - @property - def rx(self): - """Gets the rx of this SparkDataSample. # noqa: E501 - - - :return: The rx of this SparkDataSample. # noqa: E501 - :rtype: float - """ - return self._rx - - @rx.setter - def rx(self, rx): - """Sets the rx of this SparkDataSample. - - - :param rx: The rx of this SparkDataSample. # noqa: E501 - :type: float - """ - - self._rx = rx - - @property - def tx(self): - """Gets the tx of this SparkDataSample. # noqa: E501 - - - :return: The tx of this SparkDataSample. # noqa: E501 - :rtype: float - """ - return self._tx - - @tx.setter - def tx(self, tx): - """Sets the tx of this SparkDataSample. - - - :param tx: The tx of this SparkDataSample. # noqa: E501 - :type: float - """ - - self._tx = tx - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(SparkDataSample, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SparkDataSample): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/sparklines_body.py b/sdk/python/sdk/zrok/zrok_api/models/sparklines_body.py deleted file mode 100644 index fd84ff20..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/sparklines_body.py +++ /dev/null @@ -1,162 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class SparklinesBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'account': 'bool', - 'environments': 'list[str]', - 'shares': 'list[str]' - } - - attribute_map = { - 'account': 'account', - 'environments': 'environments', - 'shares': 'shares' - } - - def __init__(self, account=None, environments=None, shares=None): # noqa: E501 - """SparklinesBody - a model defined in Swagger""" # noqa: E501 - self._account = None - self._environments = None - self._shares = None - self.discriminator = None - if account is not None: - self.account = account - if environments is not None: - self.environments = environments - if shares is not None: - self.shares = shares - - @property - def account(self): - """Gets the account of this SparklinesBody. # noqa: E501 - - - :return: The account of this SparklinesBody. # noqa: E501 - :rtype: bool - """ - return self._account - - @account.setter - def account(self, account): - """Sets the account of this SparklinesBody. - - - :param account: The account of this SparklinesBody. # noqa: E501 - :type: bool - """ - - self._account = account - - @property - def environments(self): - """Gets the environments of this SparklinesBody. # noqa: E501 - - - :return: The environments of this SparklinesBody. # noqa: E501 - :rtype: list[str] - """ - return self._environments - - @environments.setter - def environments(self, environments): - """Sets the environments of this SparklinesBody. - - - :param environments: The environments of this SparklinesBody. # noqa: E501 - :type: list[str] - """ - - self._environments = environments - - @property - def shares(self): - """Gets the shares of this SparklinesBody. # noqa: E501 - - - :return: The shares of this SparklinesBody. # noqa: E501 - :rtype: list[str] - """ - return self._shares - - @shares.setter - def shares(self, shares): - """Sets the shares of this SparklinesBody. - - - :param shares: The shares of this SparklinesBody. # noqa: E501 - :type: list[str] - """ - - self._shares = shares - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(SparklinesBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SparklinesBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/token_generate_body.py b/sdk/python/sdk/zrok/zrok_api/models/token_generate_body.py deleted file mode 100644 index 0aaa2468..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/token_generate_body.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class TokenGenerateBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'invite_tokens': 'list[str]' - } - - attribute_map = { - 'invite_tokens': 'inviteTokens' - } - - def __init__(self, invite_tokens=None): # noqa: E501 - """TokenGenerateBody - a model defined in Swagger""" # noqa: E501 - self._invite_tokens = None - self.discriminator = None - if invite_tokens is not None: - self.invite_tokens = invite_tokens - - @property - def invite_tokens(self): - """Gets the invite_tokens of this TokenGenerateBody. # noqa: E501 - - - :return: The invite_tokens of this TokenGenerateBody. # noqa: E501 - :rtype: list[str] - """ - return self._invite_tokens - - @invite_tokens.setter - def invite_tokens(self, invite_tokens): - """Sets the invite_tokens of this TokenGenerateBody. - - - :param invite_tokens: The invite_tokens of this TokenGenerateBody. # noqa: E501 - :type: list[str] - """ - - self._invite_tokens = invite_tokens - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(TokenGenerateBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, TokenGenerateBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/unaccess_body.py b/sdk/python/sdk/zrok/zrok_api/models/unaccess_body.py deleted file mode 100644 index 77321334..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/unaccess_body.py +++ /dev/null @@ -1,162 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class UnaccessBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'frontend_token': 'str', - 'env_zid': 'str', - 'share_token': 'str' - } - - attribute_map = { - 'frontend_token': 'frontendToken', - 'env_zid': 'envZId', - 'share_token': 'shareToken' - } - - def __init__(self, frontend_token=None, env_zid=None, share_token=None): # noqa: E501 - """UnaccessBody - a model defined in Swagger""" # noqa: E501 - self._frontend_token = None - self._env_zid = None - self._share_token = None - self.discriminator = None - if frontend_token is not None: - self.frontend_token = frontend_token - if env_zid is not None: - self.env_zid = env_zid - if share_token is not None: - self.share_token = share_token - - @property - def frontend_token(self): - """Gets the frontend_token of this UnaccessBody. # noqa: E501 - - - :return: The frontend_token of this UnaccessBody. # noqa: E501 - :rtype: str - """ - return self._frontend_token - - @frontend_token.setter - def frontend_token(self, frontend_token): - """Sets the frontend_token of this UnaccessBody. - - - :param frontend_token: The frontend_token of this UnaccessBody. # noqa: E501 - :type: str - """ - - self._frontend_token = frontend_token - - @property - def env_zid(self): - """Gets the env_zid of this UnaccessBody. # noqa: E501 - - - :return: The env_zid of this UnaccessBody. # noqa: E501 - :rtype: str - """ - return self._env_zid - - @env_zid.setter - def env_zid(self, env_zid): - """Sets the env_zid of this UnaccessBody. - - - :param env_zid: The env_zid of this UnaccessBody. # noqa: E501 - :type: str - """ - - self._env_zid = env_zid - - @property - def share_token(self): - """Gets the share_token of this UnaccessBody. # noqa: E501 - - - :return: The share_token of this UnaccessBody. # noqa: E501 - :rtype: str - """ - return self._share_token - - @share_token.setter - def share_token(self, share_token): - """Sets the share_token of this UnaccessBody. - - - :param share_token: The share_token of this UnaccessBody. # noqa: E501 - :type: str - """ - - self._share_token = share_token - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(UnaccessBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UnaccessBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/unshare_body.py b/sdk/python/sdk/zrok/zrok_api/models/unshare_body.py deleted file mode 100644 index e6463475..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/unshare_body.py +++ /dev/null @@ -1,162 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class UnshareBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'env_zid': 'str', - 'share_token': 'str', - 'reserved': 'bool' - } - - attribute_map = { - 'env_zid': 'envZId', - 'share_token': 'shareToken', - 'reserved': 'reserved' - } - - def __init__(self, env_zid=None, share_token=None, reserved=None): # noqa: E501 - """UnshareBody - a model defined in Swagger""" # noqa: E501 - self._env_zid = None - self._share_token = None - self._reserved = None - self.discriminator = None - if env_zid is not None: - self.env_zid = env_zid - if share_token is not None: - self.share_token = share_token - if reserved is not None: - self.reserved = reserved - - @property - def env_zid(self): - """Gets the env_zid of this UnshareBody. # noqa: E501 - - - :return: The env_zid of this UnshareBody. # noqa: E501 - :rtype: str - """ - return self._env_zid - - @env_zid.setter - def env_zid(self, env_zid): - """Sets the env_zid of this UnshareBody. - - - :param env_zid: The env_zid of this UnshareBody. # noqa: E501 - :type: str - """ - - self._env_zid = env_zid - - @property - def share_token(self): - """Gets the share_token of this UnshareBody. # noqa: E501 - - - :return: The share_token of this UnshareBody. # noqa: E501 - :rtype: str - """ - return self._share_token - - @share_token.setter - def share_token(self, share_token): - """Sets the share_token of this UnshareBody. - - - :param share_token: The share_token of this UnshareBody. # noqa: E501 - :type: str - """ - - self._share_token = share_token - - @property - def reserved(self): - """Gets the reserved of this UnshareBody. # noqa: E501 - - - :return: The reserved of this UnshareBody. # noqa: E501 - :rtype: bool - """ - return self._reserved - - @reserved.setter - def reserved(self, reserved): - """Sets the reserved of this UnshareBody. - - - :param reserved: The reserved of this UnshareBody. # noqa: E501 - :type: bool - """ - - self._reserved = reserved - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(UnshareBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UnshareBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/verify_body.py b/sdk/python/sdk/zrok/zrok_api/models/verify_body.py deleted file mode 100644 index 26acf208..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/verify_body.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class VerifyBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'register_token': 'str' - } - - attribute_map = { - 'register_token': 'registerToken' - } - - def __init__(self, register_token=None): # noqa: E501 - """VerifyBody - a model defined in Swagger""" # noqa: E501 - self._register_token = None - self.discriminator = None - if register_token is not None: - self.register_token = register_token - - @property - def register_token(self): - """Gets the register_token of this VerifyBody. # noqa: E501 - - - :return: The register_token of this VerifyBody. # noqa: E501 - :rtype: str - """ - return self._register_token - - @register_token.setter - def register_token(self, register_token): - """Sets the register_token of this VerifyBody. - - - :param register_token: The register_token of this VerifyBody. # noqa: E501 - :type: str - """ - - self._register_token = register_token - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(VerifyBody, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, VerifyBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/models/version.py b/sdk/python/sdk/zrok/zrok_api/models/version.py deleted file mode 100644 index 98e90760..00000000 --- a/sdk/python/sdk/zrok/zrok_api/models/version.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class Version(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - } - - attribute_map = { - } - - def __init__(self): # noqa: E501 - """Version - a model defined in Swagger""" # noqa: E501 - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Version, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Version): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/sdk/python/sdk/zrok/zrok_api/rest.py b/sdk/python/sdk/zrok/zrok_api/rest.py deleted file mode 100644 index a2c54065..00000000 --- a/sdk/python/sdk/zrok/zrok_api/rest.py +++ /dev/null @@ -1,317 +0,0 @@ -# coding: utf-8 - -""" - zrok - - zrok client access # noqa: E501 - - OpenAPI spec version: 1.0.0 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import io -import json -import logging -import re -import ssl - -import certifi -# python 2 and python 3 compatibility library -import six -from six.moves.urllib.parse import urlencode - -try: - import urllib3 -except ImportError: - raise ImportError('Swagger python client requires urllib3.') - - -logger = logging.getLogger(__name__) - - -class RESTResponse(io.IOBase): - - def __init__(self, resp): - self.urllib3_response = resp - self.status = resp.status - self.reason = resp.reason - self.data = resp.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.urllib3_response.getheaders() - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.urllib3_response.getheader(name, default) - - -class RESTClientObject(object): - - def __init__(self, configuration, pools_size=4, maxsize=None): - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - # ca_certs - if configuration.ssl_ca_cert: - ca_certs = configuration.ssl_ca_cert - else: - # if not set certificate file, use Mozilla's root certificates. - ca_certs = certifi.where() - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 - - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize - else: - maxsize = 4 - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request(self, method, url, query_params=None, headers=None, - body=None, post_params=None, _preload_content=True, - _request_timeout=None): - """Perform requests. - - :param method: http request method - :param url: http request url - :param query_params: query parameters in the url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - """ - method = method.upper() - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] - - if post_params and body: - raise ValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 - timeout = urllib3.Timeout(total=_request_timeout) - elif (isinstance(_request_timeout, tuple) and - len(_request_timeout) == 2): - timeout = urllib3.Timeout( - connect=_request_timeout[0], read=_request_timeout[1]) - - if 'Content-Type' not in headers: - headers['Content-Type'] = 'application/json' - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - if query_params: - url += '?' + urlencode(query_params) - if re.search('json', headers['Content-Type'], re.IGNORECASE): - request_body = '{}' - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=False, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=True, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str): - request_body = body - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request(method, url, - fields=query_params, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - except urllib3.exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) - raise ApiException(status=0, reason=msg) - - if _preload_content: - r = RESTResponse(r) - - # log response body - logger.debug("response body: %s", r.data) - - if not 200 <= r.status <= 299: - raise ApiException(http_resp=r) - - return r - - def GET(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("GET", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def HEAD(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("HEAD", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def OPTIONS(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("OPTIONS", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def DELETE(self, url, headers=None, query_params=None, body=None, - _preload_content=True, _request_timeout=None): - return self.request("DELETE", url, - headers=headers, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def POST(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("POST", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PUT(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PUT", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PATCH(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PATCH", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - -class ApiException(Exception): - - def __init__(self, status=None, reason=None, http_resp=None): - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message diff --git a/sdk/python/src/.gitattributes b/sdk/python/src/.gitattributes new file mode 100644 index 00000000..4abb03b2 --- /dev/null +++ b/sdk/python/src/.gitattributes @@ -0,0 +1 @@ +zrok/_version.py export-subst diff --git a/sdk/python/src/.openapi-generator-ignore b/sdk/python/src/.openapi-generator-ignore new file mode 100644 index 00000000..db707341 --- /dev/null +++ b/sdk/python/src/.openapi-generator-ignore @@ -0,0 +1,17 @@ +# +## unwanted files should not be generated +# + +git_push.sh +.gitlab-ci.yml +.travis.yml +pyproject.toml +.github/workflows/python.yml +tox.ini + +# +## custom files that must not be overwritten +# + +setup.py +setup.cfg diff --git a/sdk/python/src/.openapi-generator/FILES b/sdk/python/src/.openapi-generator/FILES new file mode 100644 index 00000000..5294bfba --- /dev/null +++ b/sdk/python/src/.openapi-generator/FILES @@ -0,0 +1,182 @@ +.gitignore +README.md +docs/Access201Response.md +docs/AccessRequest.md +docs/AccountApi.md +docs/AddOrganizationMemberRequest.md +docs/AdminApi.md +docs/AuthUser.md +docs/ChangePasswordRequest.md +docs/ClientVersionCheckRequest.md +docs/Configuration.md +docs/CreateFrontend201Response.md +docs/CreateFrontendRequest.md +docs/CreateIdentity201Response.md +docs/CreateIdentityRequest.md +docs/CreateOrganization201Response.md +docs/CreateOrganizationRequest.md +docs/DisableRequest.md +docs/EnableRequest.md +docs/Environment.md +docs/EnvironmentAndResources.md +docs/EnvironmentApi.md +docs/Frontend.md +docs/GetSparklines200Response.md +docs/GetSparklinesRequest.md +docs/InviteRequest.md +docs/InviteTokenGenerateRequest.md +docs/ListFrontends200ResponseInner.md +docs/ListMemberships200Response.md +docs/ListMemberships200ResponseMembershipsInner.md +docs/ListOrganizationMembers200Response.md +docs/ListOrganizationMembers200ResponseMembersInner.md +docs/ListOrganizations200Response.md +docs/ListOrganizations200ResponseOrganizationsInner.md +docs/LoginRequest.md +docs/MetadataApi.md +docs/Metrics.md +docs/MetricsSample.md +docs/Overview.md +docs/Principal.md +docs/RegenerateAccountToken200Response.md +docs/RegenerateAccountTokenRequest.md +docs/RegisterRequest.md +docs/RemoveOrganizationMemberRequest.md +docs/ResetPasswordRequest.md +docs/Share.md +docs/ShareApi.md +docs/ShareRequest.md +docs/ShareResponse.md +docs/SparkDataSample.md +docs/UnaccessRequest.md +docs/UnshareRequest.md +docs/UpdateAccessRequest.md +docs/UpdateFrontendRequest.md +docs/UpdateShareRequest.md +docs/Verify200Response.md +docs/VerifyRequest.md +docs/VersionInventory200Response.md +requirements.txt +test-requirements.txt +test/__init__.py +test/test_access201_response.py +test/test_access_request.py +test/test_account_api.py +test/test_add_organization_member_request.py +test/test_admin_api.py +test/test_auth_user.py +test/test_change_password_request.py +test/test_client_version_check_request.py +test/test_configuration.py +test/test_create_frontend201_response.py +test/test_create_frontend_request.py +test/test_create_identity201_response.py +test/test_create_identity_request.py +test/test_create_organization201_response.py +test/test_create_organization_request.py +test/test_disable_request.py +test/test_enable_request.py +test/test_environment.py +test/test_environment_and_resources.py +test/test_environment_api.py +test/test_frontend.py +test/test_get_sparklines200_response.py +test/test_get_sparklines_request.py +test/test_invite_request.py +test/test_invite_token_generate_request.py +test/test_list_frontends200_response_inner.py +test/test_list_memberships200_response.py +test/test_list_memberships200_response_memberships_inner.py +test/test_list_organization_members200_response.py +test/test_list_organization_members200_response_members_inner.py +test/test_list_organizations200_response.py +test/test_list_organizations200_response_organizations_inner.py +test/test_login_request.py +test/test_metadata_api.py +test/test_metrics.py +test/test_metrics_sample.py +test/test_overview.py +test/test_principal.py +test/test_regenerate_account_token200_response.py +test/test_regenerate_account_token_request.py +test/test_register_request.py +test/test_remove_organization_member_request.py +test/test_reset_password_request.py +test/test_share.py +test/test_share_api.py +test/test_share_request.py +test/test_share_response.py +test/test_spark_data_sample.py +test/test_unaccess_request.py +test/test_unshare_request.py +test/test_update_access_request.py +test/test_update_frontend_request.py +test/test_update_share_request.py +test/test_verify200_response.py +test/test_verify_request.py +test/test_version_inventory200_response.py +zrok_api/__init__.py +zrok_api/api/__init__.py +zrok_api/api/account_api.py +zrok_api/api/admin_api.py +zrok_api/api/environment_api.py +zrok_api/api/metadata_api.py +zrok_api/api/share_api.py +zrok_api/api_client.py +zrok_api/api_response.py +zrok_api/configuration.py +zrok_api/exceptions.py +zrok_api/models/__init__.py +zrok_api/models/access201_response.py +zrok_api/models/access_request.py +zrok_api/models/add_organization_member_request.py +zrok_api/models/auth_user.py +zrok_api/models/change_password_request.py +zrok_api/models/client_version_check_request.py +zrok_api/models/configuration.py +zrok_api/models/create_frontend201_response.py +zrok_api/models/create_frontend_request.py +zrok_api/models/create_identity201_response.py +zrok_api/models/create_identity_request.py +zrok_api/models/create_organization201_response.py +zrok_api/models/create_organization_request.py +zrok_api/models/disable_request.py +zrok_api/models/enable_request.py +zrok_api/models/environment.py +zrok_api/models/environment_and_resources.py +zrok_api/models/frontend.py +zrok_api/models/get_sparklines200_response.py +zrok_api/models/get_sparklines_request.py +zrok_api/models/invite_request.py +zrok_api/models/invite_token_generate_request.py +zrok_api/models/list_frontends200_response_inner.py +zrok_api/models/list_memberships200_response.py +zrok_api/models/list_memberships200_response_memberships_inner.py +zrok_api/models/list_organization_members200_response.py +zrok_api/models/list_organization_members200_response_members_inner.py +zrok_api/models/list_organizations200_response.py +zrok_api/models/list_organizations200_response_organizations_inner.py +zrok_api/models/login_request.py +zrok_api/models/metrics.py +zrok_api/models/metrics_sample.py +zrok_api/models/overview.py +zrok_api/models/principal.py +zrok_api/models/regenerate_account_token200_response.py +zrok_api/models/regenerate_account_token_request.py +zrok_api/models/register_request.py +zrok_api/models/remove_organization_member_request.py +zrok_api/models/reset_password_request.py +zrok_api/models/share.py +zrok_api/models/share_request.py +zrok_api/models/share_response.py +zrok_api/models/spark_data_sample.py +zrok_api/models/unaccess_request.py +zrok_api/models/unshare_request.py +zrok_api/models/update_access_request.py +zrok_api/models/update_frontend_request.py +zrok_api/models/update_share_request.py +zrok_api/models/verify200_response.py +zrok_api/models/verify_request.py +zrok_api/models/version_inventory200_response.py +zrok_api/py.typed +zrok_api/rest.py diff --git a/sdk/python/src/.openapi-generator/VERSION b/sdk/python/src/.openapi-generator/VERSION new file mode 100644 index 00000000..5f84a81d --- /dev/null +++ b/sdk/python/src/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.12.0 diff --git a/sdk/python/src/__init__.py b/sdk/python/src/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/sdk/python/src/build-requirements.txt b/sdk/python/src/build-requirements.txt new file mode 100644 index 00000000..9ae847b6 --- /dev/null +++ b/sdk/python/src/build-requirements.txt @@ -0,0 +1,3 @@ +build +wheel +versioneer diff --git a/sdk/python/src/pyproject.toml b/sdk/python/src/pyproject.toml new file mode 100644 index 00000000..28c36983 --- /dev/null +++ b/sdk/python/src/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools>=42", "wheel", "versioneer>=0.28"] +build-backend = "setuptools.build_meta" diff --git a/sdk/python/src/requirements.txt b/sdk/python/src/requirements.txt new file mode 100644 index 00000000..67f7f68d --- /dev/null +++ b/sdk/python/src/requirements.txt @@ -0,0 +1,4 @@ +urllib3 >= 1.25.3, < 3.0.0 +python_dateutil >= 2.8.2 +pydantic >= 2 +typing-extensions >= 4.7.1 diff --git a/sdk/python/src/setup.cfg b/sdk/python/src/setup.cfg new file mode 100644 index 00000000..94902a7d --- /dev/null +++ b/sdk/python/src/setup.cfg @@ -0,0 +1,35 @@ +[metadata] +# "name" property is determined by setup.py based on environment variable +author = NetFoundry +author_email = developers@openziti.org +description = zrok Python SDK +long_description = file: README.md +long_description_content_type = text/markdown +url = https://github.com/openziti/zrok +license = Apache 2.0 +project_urls = + Source = https://github.com/openziti/zrok + Tracker = https://github.com/openziti/zrok/issues + Discussion = https://openziti.discourse.group/ + +[options] +# Find packages in the current directory with no special mapping +package_dir = + = . +packages = find: + +[options.packages.find] +# exclude none +where = . + +[flake8] +exclude = zrok_api, build +max-line-length = 120 + +[versioneer] +VCS = git +style = pep440-pre +versionfile_source = zrok/_version.py +versionfile_build = zrok/_version.py +tag_prefix = v +parentdir_prefix = zrok- diff --git a/sdk/python/src/setup.py b/sdk/python/src/setup.py new file mode 100644 index 00000000..10542ecc --- /dev/null +++ b/sdk/python/src/setup.py @@ -0,0 +1,64 @@ +from setuptools import setup, find_packages # noqa: H301 +import os +import versioneer +from pathlib import Path +import re + +NAME = os.getenv('ZROK_PY_NAME', "zrok") +VERSION = "1.0.0" + +OVERRIDES = { + # Override specific packages with version constraints different from the generated requirements.txt + "openziti": "openziti >= 1.0.0", + # urllib3 2.1.0 introduced breaking changes that are implemented by openapi-generator 7.12.0 + "urllib3": "urllib3 >= 2.1.0", +} + + +# Parse the generated requirements.txt +def parse_requirements(filename): + requirements = [] + if not Path(filename).exists(): + return requirements + + with open(filename, 'r') as f: + for line in f: + line = line.strip() + if not line or line.startswith('#'): + continue + + # Extract package name (everything before any version specifier) + package_name = re.split(r'[<>=~]', line)[0].strip() + + # If we have an override for this package, skip it + if package_name in OVERRIDES: + continue + + requirements.append(line) + + return requirements + + +# Combine requirements from requirements.txt and overrides +requirements_file = Path(__file__).parent / "requirements.txt" +REQUIRES = parse_requirements(requirements_file) + list(OVERRIDES.values()) + +setup( + name=NAME, + cmdclass=versioneer.get_cmdclass(dict()), + version=versioneer.get_version(), + description="zrok", + author_email="", + url="", + keywords=["zrok"], + install_requires=REQUIRES, + python_requires='>3.10.0', + packages=find_packages(), + include_package_data=True, + package_data={ + '': ['requirements.txt'], # Include the generated requirements.txt in the package + }, + long_description="""\ + Geo-scale, next-generation peer-to-peer sharing platform built on top of OpenZiti. + """ +) diff --git a/sdk/python/src/test-requirements.txt b/sdk/python/src/test-requirements.txt new file mode 100644 index 00000000..e98555c1 --- /dev/null +++ b/sdk/python/src/test-requirements.txt @@ -0,0 +1,6 @@ +pytest >= 7.2.1 +pytest-cov >= 2.8.1 +tox >= 3.9.0 +flake8 >= 4.0.0 +types-python-dateutil >= 2.8.19.14 +mypy >= 1.5 diff --git a/sdk/python/src/versioneer.py b/sdk/python/src/versioneer.py new file mode 100644 index 00000000..1e3753e6 --- /dev/null +++ b/sdk/python/src/versioneer.py @@ -0,0 +1,2277 @@ + +# Version: 0.29 + +"""The Versioneer - like a rocketeer, but for versions. + +The Versioneer +============== + +* like a rocketeer, but for versions! +* https://github.com/python-versioneer/python-versioneer +* Brian Warner +* License: Public Domain (Unlicense) +* Compatible with: Python 3.7, 3.8, 3.9, 3.10, 3.11 and pypy3 +* [![Latest Version][pypi-image]][pypi-url] +* [![Build Status][travis-image]][travis-url] + +This is a tool for managing a recorded version number in setuptools-based +python projects. The goal is to remove the tedious and error-prone "update +the embedded version string" step from your release process. Making a new +release should be as easy as recording a new tag in your version-control +system, and maybe making new tarballs. + + +## Quick Install + +Versioneer provides two installation modes. The "classic" vendored mode installs +a copy of versioneer into your repository. The experimental build-time dependency mode +is intended to allow you to skip this step and simplify the process of upgrading. + +### Vendored mode + +* `pip install versioneer` to somewhere in your $PATH + * A [conda-forge recipe](https://github.com/conda-forge/versioneer-feedstock) is + available, so you can also use `conda install -c conda-forge versioneer` +* add a `[tool.versioneer]` section to your `pyproject.toml` or a + `[versioneer]` section to your `setup.cfg` (see [Install](INSTALL.md)) + * Note that you will need to add `tomli; python_version < "3.11"` to your + build-time dependencies if you use `pyproject.toml` +* run `versioneer install --vendor` in your source tree, commit the results +* verify version information with `python setup.py version` + +### Build-time dependency mode + +* `pip install versioneer` to somewhere in your $PATH + * A [conda-forge recipe](https://github.com/conda-forge/versioneer-feedstock) is + available, so you can also use `conda install -c conda-forge versioneer` +* add a `[tool.versioneer]` section to your `pyproject.toml` or a + `[versioneer]` section to your `setup.cfg` (see [Install](INSTALL.md)) +* add `versioneer` (with `[toml]` extra, if configuring in `pyproject.toml`) + to the `requires` key of the `build-system` table in `pyproject.toml`: + ```toml + [build-system] + requires = ["setuptools", "versioneer[toml]"] + build-backend = "setuptools.build_meta" + ``` +* run `versioneer install --no-vendor` in your source tree, commit the results +* verify version information with `python setup.py version` + +## Version Identifiers + +Source trees come from a variety of places: + +* a version-control system checkout (mostly used by developers) +* a nightly tarball, produced by build automation +* a snapshot tarball, produced by a web-based VCS browser, like github's + "tarball from tag" feature +* a release tarball, produced by "setup.py sdist", distributed through PyPI + +Within each source tree, the version identifier (either a string or a number, +this tool is format-agnostic) can come from a variety of places: + +* ask the VCS tool itself, e.g. "git describe" (for checkouts), which knows + about recent "tags" and an absolute revision-id +* the name of the directory into which the tarball was unpacked +* an expanded VCS keyword ($Id$, etc) +* a `_version.py` created by some earlier build step + +For released software, the version identifier is closely related to a VCS +tag. Some projects use tag names that include more than just the version +string (e.g. "myproject-1.2" instead of just "1.2"), in which case the tool +needs to strip the tag prefix to extract the version identifier. For +unreleased software (between tags), the version identifier should provide +enough information to help developers recreate the same tree, while also +giving them an idea of roughly how old the tree is (after version 1.2, before +version 1.3). Many VCS systems can report a description that captures this, +for example `git describe --tags --dirty --always` reports things like +"0.7-1-g574ab98-dirty" to indicate that the checkout is one revision past the +0.7 tag, has a unique revision id of "574ab98", and is "dirty" (it has +uncommitted changes). + +The version identifier is used for multiple purposes: + +* to allow the module to self-identify its version: `myproject.__version__` +* to choose a name and prefix for a 'setup.py sdist' tarball + +## Theory of Operation + +Versioneer works by adding a special `_version.py` file into your source +tree, where your `__init__.py` can import it. This `_version.py` knows how to +dynamically ask the VCS tool for version information at import time. + +`_version.py` also contains `$Revision$` markers, and the installation +process marks `_version.py` to have this marker rewritten with a tag name +during the `git archive` command. As a result, generated tarballs will +contain enough information to get the proper version. + +To allow `setup.py` to compute a version too, a `versioneer.py` is added to +the top level of your source tree, next to `setup.py` and the `setup.cfg` +that configures it. This overrides several distutils/setuptools commands to +compute the version when invoked, and changes `setup.py build` and `setup.py +sdist` to replace `_version.py` with a small static file that contains just +the generated version data. + +## Installation + +See [INSTALL.md](./INSTALL.md) for detailed installation instructions. + +## Version-String Flavors + +Code which uses Versioneer can learn about its version string at runtime by +importing `_version` from your main `__init__.py` file and running the +`get_versions()` function. From the "outside" (e.g. in `setup.py`), you can +import the top-level `versioneer.py` and run `get_versions()`. + +Both functions return a dictionary with different flavors of version +information: + +* `['version']`: A condensed version string, rendered using the selected + style. This is the most commonly used value for the project's version + string. The default "pep440" style yields strings like `0.11`, + `0.11+2.g1076c97`, or `0.11+2.g1076c97.dirty`. See the "Styles" section + below for alternative styles. + +* `['full-revisionid']`: detailed revision identifier. For Git, this is the + full SHA1 commit id, e.g. "1076c978a8d3cfc70f408fe5974aa6c092c949ac". + +* `['date']`: Date and time of the latest `HEAD` commit. For Git, it is the + commit date in ISO 8601 format. This will be None if the date is not + available. + +* `['dirty']`: a boolean, True if the tree has uncommitted changes. Note that + this is only accurate if run in a VCS checkout, otherwise it is likely to + be False or None + +* `['error']`: if the version string could not be computed, this will be set + to a string describing the problem, otherwise it will be None. It may be + useful to throw an exception in setup.py if this is set, to avoid e.g. + creating tarballs with a version string of "unknown". + +Some variants are more useful than others. Including `full-revisionid` in a +bug report should allow developers to reconstruct the exact code being tested +(or indicate the presence of local changes that should be shared with the +developers). `version` is suitable for display in an "about" box or a CLI +`--version` output: it can be easily compared against release notes and lists +of bugs fixed in various releases. + +The installer adds the following text to your `__init__.py` to place a basic +version in `YOURPROJECT.__version__`: + + from ._version import get_versions + __version__ = get_versions()['version'] + del get_versions + +## Styles + +The setup.cfg `style=` configuration controls how the VCS information is +rendered into a version string. + +The default style, "pep440", produces a PEP440-compliant string, equal to the +un-prefixed tag name for actual releases, and containing an additional "local +version" section with more detail for in-between builds. For Git, this is +TAG[+DISTANCE.gHEX[.dirty]] , using information from `git describe --tags +--dirty --always`. For example "0.11+2.g1076c97.dirty" indicates that the +tree is like the "1076c97" commit but has uncommitted changes (".dirty"), and +that this commit is two revisions ("+2") beyond the "0.11" tag. For released +software (exactly equal to a known tag), the identifier will only contain the +stripped tag, e.g. "0.11". + +Other styles are available. See [details.md](details.md) in the Versioneer +source tree for descriptions. + +## Debugging + +Versioneer tries to avoid fatal errors: if something goes wrong, it will tend +to return a version of "0+unknown". To investigate the problem, run `setup.py +version`, which will run the version-lookup code in a verbose mode, and will +display the full contents of `get_versions()` (including the `error` string, +which may help identify what went wrong). + +## Known Limitations + +Some situations are known to cause problems for Versioneer. This details the +most significant ones. More can be found on Github +[issues page](https://github.com/python-versioneer/python-versioneer/issues). + +### Subprojects + +Versioneer has limited support for source trees in which `setup.py` is not in +the root directory (e.g. `setup.py` and `.git/` are *not* siblings). The are +two common reasons why `setup.py` might not be in the root: + +* Source trees which contain multiple subprojects, such as + [Buildbot](https://github.com/buildbot/buildbot), which contains both + "master" and "slave" subprojects, each with their own `setup.py`, + `setup.cfg`, and `tox.ini`. Projects like these produce multiple PyPI + distributions (and upload multiple independently-installable tarballs). +* Source trees whose main purpose is to contain a C library, but which also + provide bindings to Python (and perhaps other languages) in subdirectories. + +Versioneer will look for `.git` in parent directories, and most operations +should get the right version string. However `pip` and `setuptools` have bugs +and implementation details which frequently cause `pip install .` from a +subproject directory to fail to find a correct version string (so it usually +defaults to `0+unknown`). + +`pip install --editable .` should work correctly. `setup.py install` might +work too. + +Pip-8.1.1 is known to have this problem, but hopefully it will get fixed in +some later version. + +[Bug #38](https://github.com/python-versioneer/python-versioneer/issues/38) is tracking +this issue. The discussion in +[PR #61](https://github.com/python-versioneer/python-versioneer/pull/61) describes the +issue from the Versioneer side in more detail. +[pip PR#3176](https://github.com/pypa/pip/pull/3176) and +[pip PR#3615](https://github.com/pypa/pip/pull/3615) contain work to improve +pip to let Versioneer work correctly. + +Versioneer-0.16 and earlier only looked for a `.git` directory next to the +`setup.cfg`, so subprojects were completely unsupported with those releases. + +### Editable installs with setuptools <= 18.5 + +`setup.py develop` and `pip install --editable .` allow you to install a +project into a virtualenv once, then continue editing the source code (and +test) without re-installing after every change. + +"Entry-point scripts" (`setup(entry_points={"console_scripts": ..})`) are a +convenient way to specify executable scripts that should be installed along +with the python package. + +These both work as expected when using modern setuptools. When using +setuptools-18.5 or earlier, however, certain operations will cause +`pkg_resources.DistributionNotFound` errors when running the entrypoint +script, which must be resolved by re-installing the package. This happens +when the install happens with one version, then the egg_info data is +regenerated while a different version is checked out. Many setup.py commands +cause egg_info to be rebuilt (including `sdist`, `wheel`, and installing into +a different virtualenv), so this can be surprising. + +[Bug #83](https://github.com/python-versioneer/python-versioneer/issues/83) describes +this one, but upgrading to a newer version of setuptools should probably +resolve it. + + +## Updating Versioneer + +To upgrade your project to a new release of Versioneer, do the following: + +* install the new Versioneer (`pip install -U versioneer` or equivalent) +* edit `setup.cfg` and `pyproject.toml`, if necessary, + to include any new configuration settings indicated by the release notes. + See [UPGRADING](./UPGRADING.md) for details. +* re-run `versioneer install --[no-]vendor` in your source tree, to replace + `SRC/_version.py` +* commit any changed files + +## Future Directions + +This tool is designed to make it easily extended to other version-control +systems: all VCS-specific components are in separate directories like +src/git/ . The top-level `versioneer.py` script is assembled from these +components by running make-versioneer.py . In the future, make-versioneer.py +will take a VCS name as an argument, and will construct a version of +`versioneer.py` that is specific to the given VCS. It might also take the +configuration arguments that are currently provided manually during +installation by editing setup.py . Alternatively, it might go the other +direction and include code from all supported VCS systems, reducing the +number of intermediate scripts. + +## Similar projects + +* [setuptools_scm](https://github.com/pypa/setuptools_scm/) - a non-vendored build-time + dependency +* [minver](https://github.com/jbweston/miniver) - a lightweight reimplementation of + versioneer +* [versioningit](https://github.com/jwodder/versioningit) - a PEP 518-based setuptools + plugin + +## License + +To make Versioneer easier to embed, all its code is dedicated to the public +domain. The `_version.py` that it creates is also in the public domain. +Specifically, both are released under the "Unlicense", as described in +https://unlicense.org/. + +[pypi-image]: https://img.shields.io/pypi/v/versioneer.svg +[pypi-url]: https://pypi.python.org/pypi/versioneer/ +[travis-image]: +https://img.shields.io/travis/com/python-versioneer/python-versioneer.svg +[travis-url]: https://travis-ci.com/github/python-versioneer/python-versioneer + +""" +# pylint:disable=invalid-name,import-outside-toplevel,missing-function-docstring +# pylint:disable=missing-class-docstring,too-many-branches,too-many-statements +# pylint:disable=raise-missing-from,too-many-lines,too-many-locals,import-error +# pylint:disable=too-few-public-methods,redefined-outer-name,consider-using-with +# pylint:disable=attribute-defined-outside-init,too-many-arguments + +import configparser +import errno +import json +import os +import re +import subprocess +import sys +from pathlib import Path +from typing import Any, Callable, cast, Dict, List, Optional, Tuple, Union +from typing import NoReturn +import functools + +have_tomllib = True +if sys.version_info >= (3, 11): + import tomllib +else: + try: + import tomli as tomllib + except ImportError: + have_tomllib = False + + +class VersioneerConfig: + """Container for Versioneer configuration parameters.""" + + VCS: str + style: str + tag_prefix: str + versionfile_source: str + versionfile_build: Optional[str] + parentdir_prefix: Optional[str] + verbose: Optional[bool] + + +def get_root() -> str: + """Get the project root directory. + + We require that all commands are run from the project root, i.e. the + directory that contains setup.py, setup.cfg, and versioneer.py . + """ + root = os.path.realpath(os.path.abspath(os.getcwd())) + setup_py = os.path.join(root, "setup.py") + pyproject_toml = os.path.join(root, "pyproject.toml") + versioneer_py = os.path.join(root, "versioneer.py") + if not ( + os.path.exists(setup_py) + or os.path.exists(pyproject_toml) + or os.path.exists(versioneer_py) + ): + # allow 'python path/to/setup.py COMMAND' + root = os.path.dirname(os.path.realpath(os.path.abspath(sys.argv[0]))) + setup_py = os.path.join(root, "setup.py") + pyproject_toml = os.path.join(root, "pyproject.toml") + versioneer_py = os.path.join(root, "versioneer.py") + if not ( + os.path.exists(setup_py) + or os.path.exists(pyproject_toml) + or os.path.exists(versioneer_py) + ): + err = ("Versioneer was unable to run the project root directory. " + "Versioneer requires setup.py to be executed from " + "its immediate directory (like 'python setup.py COMMAND'), " + "or in a way that lets it use sys.argv[0] to find the root " + "(like 'python path/to/setup.py COMMAND').") + raise VersioneerBadRootError(err) + try: + # Certain runtime workflows (setup.py install/develop in a setuptools + # tree) execute all dependencies in a single python process, so + # "versioneer" may be imported multiple times, and python's shared + # module-import table will cache the first one. So we can't use + # os.path.dirname(__file__), as that will find whichever + # versioneer.py was first imported, even in later projects. + my_path = os.path.realpath(os.path.abspath(__file__)) + me_dir = os.path.normcase(os.path.splitext(my_path)[0]) + vsr_dir = os.path.normcase(os.path.splitext(versioneer_py)[0]) + if me_dir != vsr_dir and "VERSIONEER_PEP518" not in globals(): + print("Warning: build in %s is using versioneer.py from %s" + % (os.path.dirname(my_path), versioneer_py)) + except NameError: + pass + return root + + +def get_config_from_root(root: str) -> VersioneerConfig: + """Read the project setup.cfg file to determine Versioneer config.""" + # This might raise OSError (if setup.cfg is missing), or + # configparser.NoSectionError (if it lacks a [versioneer] section), or + # configparser.NoOptionError (if it lacks "VCS="). See the docstring at + # the top of versioneer.py for instructions on writing your setup.cfg . + root_pth = Path(root) + pyproject_toml = root_pth / "pyproject.toml" + setup_cfg = root_pth / "setup.cfg" + section: Union[Dict[str, Any], configparser.SectionProxy, None] = None + if pyproject_toml.exists() and have_tomllib: + try: + with open(pyproject_toml, 'rb') as fobj: + pp = tomllib.load(fobj) + section = pp['tool']['versioneer'] + except (tomllib.TOMLDecodeError, KeyError) as e: + print(f"Failed to load config from {pyproject_toml}: {e}") + print("Try to load it from setup.cfg") + if not section: + parser = configparser.ConfigParser() + with open(setup_cfg) as cfg_file: + parser.read_file(cfg_file) + parser.get("versioneer", "VCS") # raise error if missing + + section = parser["versioneer"] + + # `cast`` really shouldn't be used, but its simplest for the + # common VersioneerConfig users at the moment. We verify against + # `None` values elsewhere where it matters + + cfg = VersioneerConfig() + cfg.VCS = section['VCS'] + cfg.style = section.get("style", "") + cfg.versionfile_source = cast(str, section.get("versionfile_source")) + cfg.versionfile_build = section.get("versionfile_build") + cfg.tag_prefix = cast(str, section.get("tag_prefix")) + if cfg.tag_prefix in ("''", '""', None): + cfg.tag_prefix = "" + cfg.parentdir_prefix = section.get("parentdir_prefix") + if isinstance(section, configparser.SectionProxy): + # Make sure configparser translates to bool + cfg.verbose = section.getboolean("verbose") + else: + cfg.verbose = section.get("verbose") + + return cfg + + +class NotThisMethod(Exception): + """Exception raised if a method is not valid for the current scenario.""" + + +# these dictionaries contain VCS-specific tools +LONG_VERSION_PY: Dict[str, str] = {} +HANDLERS: Dict[str, Dict[str, Callable]] = {} + + +def register_vcs_handler(vcs: str, method: str) -> Callable: # decorator + """Create decorator to mark a method as the handler of a VCS.""" + def decorate(f: Callable) -> Callable: + """Store f in HANDLERS[vcs][method].""" + HANDLERS.setdefault(vcs, {})[method] = f + return f + return decorate + + +def run_command( + commands: List[str], + args: List[str], + cwd: Optional[str] = None, + verbose: bool = False, + hide_stderr: bool = False, + env: Optional[Dict[str, str]] = None, +) -> Tuple[Optional[str], Optional[int]]: + """Call the given command(s).""" + assert isinstance(commands, list) + process = None + + popen_kwargs: Dict[str, Any] = {} + if sys.platform == "win32": + # This hides the console window if pythonw.exe is used + startupinfo = subprocess.STARTUPINFO() + startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW + popen_kwargs["startupinfo"] = startupinfo + + for command in commands: + try: + dispcmd = str([command] + args) + # remember shell=False, so use git.cmd on windows, not just git + process = subprocess.Popen([command] + args, cwd=cwd, env=env, + stdout=subprocess.PIPE, + stderr=(subprocess.PIPE if hide_stderr + else None), **popen_kwargs) + break + except OSError as e: + if e.errno == errno.ENOENT: + continue + if verbose: + print("unable to run %s" % dispcmd) + print(e) + return None, None + else: + if verbose: + print("unable to find command, tried %s" % (commands,)) + return None, None + stdout = process.communicate()[0].strip().decode() + if process.returncode != 0: + if verbose: + print("unable to run %s (error)" % dispcmd) + print("stdout was %s" % stdout) + return None, process.returncode + return stdout, process.returncode + + +LONG_VERSION_PY['git'] = r''' +# This file helps to compute a version number in source trees obtained from +# git-archive tarball (such as those provided by githubs download-from-tag +# feature). Distribution tarballs (built by setup.py sdist) and build +# directories (produced by setup.py build) will contain a much shorter file +# that just contains the computed version number. + +# This file is released into the public domain. +# Generated by versioneer-0.29 +# https://github.com/python-versioneer/python-versioneer + +"""Git implementation of _version.py.""" + +import errno +import os +import re +import subprocess +import sys +from typing import Any, Callable, Dict, List, Optional, Tuple +import functools + + +def get_keywords() -> Dict[str, str]: + """Get the keywords needed to look up the version information.""" + # these strings will be replaced by git during git-archive. + # setup.py/versioneer.py will grep for the variable names, so they must + # each be defined on a line of their own. _version.py will just call + # get_keywords(). + git_refnames = "%(DOLLAR)sFormat:%%d%(DOLLAR)s" + git_full = "%(DOLLAR)sFormat:%%H%(DOLLAR)s" + git_date = "%(DOLLAR)sFormat:%%ci%(DOLLAR)s" + keywords = {"refnames": git_refnames, "full": git_full, "date": git_date} + return keywords + + +class VersioneerConfig: + """Container for Versioneer configuration parameters.""" + + VCS: str + style: str + tag_prefix: str + parentdir_prefix: str + versionfile_source: str + verbose: bool + + +def get_config() -> VersioneerConfig: + """Create, populate and return the VersioneerConfig() object.""" + # these strings are filled in when 'setup.py versioneer' creates + # _version.py + cfg = VersioneerConfig() + cfg.VCS = "git" + cfg.style = "%(STYLE)s" + cfg.tag_prefix = "%(TAG_PREFIX)s" + cfg.parentdir_prefix = "%(PARENTDIR_PREFIX)s" + cfg.versionfile_source = "%(VERSIONFILE_SOURCE)s" + cfg.verbose = False + return cfg + + +class NotThisMethod(Exception): + """Exception raised if a method is not valid for the current scenario.""" + + +LONG_VERSION_PY: Dict[str, str] = {} +HANDLERS: Dict[str, Dict[str, Callable]] = {} + + +def register_vcs_handler(vcs: str, method: str) -> Callable: # decorator + """Create decorator to mark a method as the handler of a VCS.""" + def decorate(f: Callable) -> Callable: + """Store f in HANDLERS[vcs][method].""" + if vcs not in HANDLERS: + HANDLERS[vcs] = {} + HANDLERS[vcs][method] = f + return f + return decorate + + +def run_command( + commands: List[str], + args: List[str], + cwd: Optional[str] = None, + verbose: bool = False, + hide_stderr: bool = False, + env: Optional[Dict[str, str]] = None, +) -> Tuple[Optional[str], Optional[int]]: + """Call the given command(s).""" + assert isinstance(commands, list) + process = None + + popen_kwargs: Dict[str, Any] = {} + if sys.platform == "win32": + # This hides the console window if pythonw.exe is used + startupinfo = subprocess.STARTUPINFO() + startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW + popen_kwargs["startupinfo"] = startupinfo + + for command in commands: + try: + dispcmd = str([command] + args) + # remember shell=False, so use git.cmd on windows, not just git + process = subprocess.Popen([command] + args, cwd=cwd, env=env, + stdout=subprocess.PIPE, + stderr=(subprocess.PIPE if hide_stderr + else None), **popen_kwargs) + break + except OSError as e: + if e.errno == errno.ENOENT: + continue + if verbose: + print("unable to run %%s" %% dispcmd) + print(e) + return None, None + else: + if verbose: + print("unable to find command, tried %%s" %% (commands,)) + return None, None + stdout = process.communicate()[0].strip().decode() + if process.returncode != 0: + if verbose: + print("unable to run %%s (error)" %% dispcmd) + print("stdout was %%s" %% stdout) + return None, process.returncode + return stdout, process.returncode + + +def versions_from_parentdir( + parentdir_prefix: str, + root: str, + verbose: bool, +) -> Dict[str, Any]: + """Try to determine the version from the parent directory name. + + Source tarballs conventionally unpack into a directory that includes both + the project name and a version string. We will also support searching up + two directory levels for an appropriately named parent directory + """ + rootdirs = [] + + for _ in range(3): + dirname = os.path.basename(root) + if dirname.startswith(parentdir_prefix): + return {"version": dirname[len(parentdir_prefix):], + "full-revisionid": None, + "dirty": False, "error": None, "date": None} + rootdirs.append(root) + root = os.path.dirname(root) # up a level + + if verbose: + print("Tried directories %%s but none started with prefix %%s" %% + (str(rootdirs), parentdir_prefix)) + raise NotThisMethod("rootdir doesn't start with parentdir_prefix") + + +@register_vcs_handler("git", "get_keywords") +def git_get_keywords(versionfile_abs: str) -> Dict[str, str]: + """Extract version information from the given file.""" + # the code embedded in _version.py can just fetch the value of these + # keywords. When used from setup.py, we don't want to import _version.py, + # so we do it with a regexp instead. This function is not used from + # _version.py. + keywords: Dict[str, str] = {} + try: + with open(versionfile_abs, "r") as fobj: + for line in fobj: + if line.strip().startswith("git_refnames ="): + mo = re.search(r'=\s*"(.*)"', line) + if mo: + keywords["refnames"] = mo.group(1) + if line.strip().startswith("git_full ="): + mo = re.search(r'=\s*"(.*)"', line) + if mo: + keywords["full"] = mo.group(1) + if line.strip().startswith("git_date ="): + mo = re.search(r'=\s*"(.*)"', line) + if mo: + keywords["date"] = mo.group(1) + except OSError: + pass + return keywords + + +@register_vcs_handler("git", "keywords") +def git_versions_from_keywords( + keywords: Dict[str, str], + tag_prefix: str, + verbose: bool, +) -> Dict[str, Any]: + """Get version information from git keywords.""" + if "refnames" not in keywords: + raise NotThisMethod("Short version file found") + date = keywords.get("date") + if date is not None: + # Use only the last line. Previous lines may contain GPG signature + # information. + date = date.splitlines()[-1] + + # git-2.2.0 added "%%cI", which expands to an ISO-8601 -compliant + # datestamp. However we prefer "%%ci" (which expands to an "ISO-8601 + # -like" string, which we must then edit to make compliant), because + # it's been around since git-1.5.3, and it's too difficult to + # discover which version we're using, or to work around using an + # older one. + date = date.strip().replace(" ", "T", 1).replace(" ", "", 1) + refnames = keywords["refnames"].strip() + if refnames.startswith("$Format"): + if verbose: + print("keywords are unexpanded, not using") + raise NotThisMethod("unexpanded keywords, not a git-archive tarball") + refs = {r.strip() for r in refnames.strip("()").split(",")} + # starting in git-1.8.3, tags are listed as "tag: foo-1.0" instead of + # just "foo-1.0". If we see a "tag: " prefix, prefer those. + TAG = "tag: " + tags = {r[len(TAG):] for r in refs if r.startswith(TAG)} + if not tags: + # Either we're using git < 1.8.3, or there really are no tags. We use + # a heuristic: assume all version tags have a digit. The old git %%d + # expansion behaves like git log --decorate=short and strips out the + # refs/heads/ and refs/tags/ prefixes that would let us distinguish + # between branches and tags. By ignoring refnames without digits, we + # filter out many common branch names like "release" and + # "stabilization", as well as "HEAD" and "master". + tags = {r for r in refs if re.search(r'\d', r)} + if verbose: + print("discarding '%%s', no digits" %% ",".join(refs - tags)) + if verbose: + print("likely tags: %%s" %% ",".join(sorted(tags))) + for ref in sorted(tags): + # sorting will prefer e.g. "2.0" over "2.0rc1" + if ref.startswith(tag_prefix): + r = ref[len(tag_prefix):] + # Filter out refs that exactly match prefix or that don't start + # with a number once the prefix is stripped (mostly a concern + # when prefix is '') + if not re.match(r'\d', r): + continue + if verbose: + print("picking %%s" %% r) + return {"version": r, + "full-revisionid": keywords["full"].strip(), + "dirty": False, "error": None, + "date": date} + # no suitable tags, so version is "0+unknown", but full hex is still there + if verbose: + print("no suitable tags, using unknown + full revision id") + return {"version": "0+unknown", + "full-revisionid": keywords["full"].strip(), + "dirty": False, "error": "no suitable tags", "date": None} + + +@register_vcs_handler("git", "pieces_from_vcs") +def git_pieces_from_vcs( + tag_prefix: str, + root: str, + verbose: bool, + runner: Callable = run_command +) -> Dict[str, Any]: + """Get version from 'git describe' in the root of the source tree. + + This only gets called if the git-archive 'subst' keywords were *not* + expanded, and _version.py hasn't already been rewritten with a short + version string, meaning we're inside a checked out source tree. + """ + GITS = ["git"] + if sys.platform == "win32": + GITS = ["git.cmd", "git.exe"] + + # GIT_DIR can interfere with correct operation of Versioneer. + # It may be intended to be passed to the Versioneer-versioned project, + # but that should not change where we get our version from. + env = os.environ.copy() + env.pop("GIT_DIR", None) + runner = functools.partial(runner, env=env) + + _, rc = runner(GITS, ["rev-parse", "--git-dir"], cwd=root, + hide_stderr=not verbose) + if rc != 0: + if verbose: + print("Directory %%s not under git control" %% root) + raise NotThisMethod("'git rev-parse --git-dir' returned error") + + # if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty] + # if there isn't one, this yields HEX[-dirty] (no NUM) + describe_out, rc = runner(GITS, [ + "describe", "--tags", "--dirty", "--always", "--long", + "--match", f"{tag_prefix}[[:digit:]]*" + ], cwd=root) + # --long was added in git-1.5.5 + if describe_out is None: + raise NotThisMethod("'git describe' failed") + describe_out = describe_out.strip() + full_out, rc = runner(GITS, ["rev-parse", "HEAD"], cwd=root) + if full_out is None: + raise NotThisMethod("'git rev-parse' failed") + full_out = full_out.strip() + + pieces: Dict[str, Any] = {} + pieces["long"] = full_out + pieces["short"] = full_out[:7] # maybe improved later + pieces["error"] = None + + branch_name, rc = runner(GITS, ["rev-parse", "--abbrev-ref", "HEAD"], + cwd=root) + # --abbrev-ref was added in git-1.6.3 + if rc != 0 or branch_name is None: + raise NotThisMethod("'git rev-parse --abbrev-ref' returned error") + branch_name = branch_name.strip() + + if branch_name == "HEAD": + # If we aren't exactly on a branch, pick a branch which represents + # the current commit. If all else fails, we are on a branchless + # commit. + branches, rc = runner(GITS, ["branch", "--contains"], cwd=root) + # --contains was added in git-1.5.4 + if rc != 0 or branches is None: + raise NotThisMethod("'git branch --contains' returned error") + branches = branches.split("\n") + + # Remove the first line if we're running detached + if "(" in branches[0]: + branches.pop(0) + + # Strip off the leading "* " from the list of branches. + branches = [branch[2:] for branch in branches] + if "master" in branches: + branch_name = "master" + elif not branches: + branch_name = None + else: + # Pick the first branch that is returned. Good or bad. + branch_name = branches[0] + + pieces["branch"] = branch_name + + # parse describe_out. It will be like TAG-NUM-gHEX[-dirty] or HEX[-dirty] + # TAG might have hyphens. + git_describe = describe_out + + # look for -dirty suffix + dirty = git_describe.endswith("-dirty") + pieces["dirty"] = dirty + if dirty: + git_describe = git_describe[:git_describe.rindex("-dirty")] + + # now we have TAG-NUM-gHEX or HEX + + if "-" in git_describe: + # TAG-NUM-gHEX + mo = re.search(r'^(.+)-(\d+)-g([0-9a-f]+)$', git_describe) + if not mo: + # unparsable. Maybe git-describe is misbehaving? + pieces["error"] = ("unable to parse git-describe output: '%%s'" + %% describe_out) + return pieces + + # tag + full_tag = mo.group(1) + if not full_tag.startswith(tag_prefix): + if verbose: + fmt = "tag '%%s' doesn't start with prefix '%%s'" + print(fmt %% (full_tag, tag_prefix)) + pieces["error"] = ("tag '%%s' doesn't start with prefix '%%s'" + %% (full_tag, tag_prefix)) + return pieces + pieces["closest-tag"] = full_tag[len(tag_prefix):] + + # distance: number of commits since tag + pieces["distance"] = int(mo.group(2)) + + # commit: short hex revision ID + pieces["short"] = mo.group(3) + + else: + # HEX: no tags + pieces["closest-tag"] = None + out, rc = runner(GITS, ["rev-list", "HEAD", "--left-right"], cwd=root) + pieces["distance"] = len(out.split()) # total number of commits + + # commit date: see ISO-8601 comment in git_versions_from_keywords() + date = runner(GITS, ["show", "-s", "--format=%%ci", "HEAD"], cwd=root)[0].strip() + # Use only the last line. Previous lines may contain GPG signature + # information. + date = date.splitlines()[-1] + pieces["date"] = date.strip().replace(" ", "T", 1).replace(" ", "", 1) + + return pieces + + +def plus_or_dot(pieces: Dict[str, Any]) -> str: + """Return a + if we don't already have one, else return a .""" + if "+" in pieces.get("closest-tag", ""): + return "." + return "+" + + +def render_pep440(pieces: Dict[str, Any]) -> str: + """Build up version string, with post-release "local version identifier". + + Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you + get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty + + Exceptions: + 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += plus_or_dot(pieces) + rendered += "%%d.g%%s" %% (pieces["distance"], pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + else: + # exception #1 + rendered = "0+untagged.%%d.g%%s" %% (pieces["distance"], + pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + return rendered + + +def render_pep440_branch(pieces: Dict[str, Any]) -> str: + """TAG[[.dev0]+DISTANCE.gHEX[.dirty]] . + + The ".dev0" means not master branch. Note that .dev0 sorts backwards + (a feature branch will appear "older" than the master branch). + + Exceptions: + 1: no tags. 0[.dev0]+untagged.DISTANCE.gHEX[.dirty] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + if pieces["branch"] != "master": + rendered += ".dev0" + rendered += plus_or_dot(pieces) + rendered += "%%d.g%%s" %% (pieces["distance"], pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + else: + # exception #1 + rendered = "0" + if pieces["branch"] != "master": + rendered += ".dev0" + rendered += "+untagged.%%d.g%%s" %% (pieces["distance"], + pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + return rendered + + +def pep440_split_post(ver: str) -> Tuple[str, Optional[int]]: + """Split pep440 version string at the post-release segment. + + Returns the release segments before the post-release and the + post-release version number (or -1 if no post-release segment is present). + """ + vc = str.split(ver, ".post") + return vc[0], int(vc[1] or 0) if len(vc) == 2 else None + + +def render_pep440_pre(pieces: Dict[str, Any]) -> str: + """TAG[.postN.devDISTANCE] -- No -dirty. + + Exceptions: + 1: no tags. 0.post0.devDISTANCE + """ + if pieces["closest-tag"]: + if pieces["distance"]: + # update the post release segment + tag_version, post_version = pep440_split_post(pieces["closest-tag"]) + rendered = tag_version + if post_version is not None: + rendered += ".post%%d.dev%%d" %% (post_version + 1, pieces["distance"]) + else: + rendered += ".post0.dev%%d" %% (pieces["distance"]) + else: + # no commits, use the tag as the version + rendered = pieces["closest-tag"] + else: + # exception #1 + rendered = "0.post0.dev%%d" %% pieces["distance"] + return rendered + + +def render_pep440_post(pieces: Dict[str, Any]) -> str: + """TAG[.postDISTANCE[.dev0]+gHEX] . + + The ".dev0" means dirty. Note that .dev0 sorts backwards + (a dirty tree will appear "older" than the corresponding clean one), + but you shouldn't be releasing software with -dirty anyways. + + Exceptions: + 1: no tags. 0.postDISTANCE[.dev0] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += ".post%%d" %% pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + rendered += plus_or_dot(pieces) + rendered += "g%%s" %% pieces["short"] + else: + # exception #1 + rendered = "0.post%%d" %% pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + rendered += "+g%%s" %% pieces["short"] + return rendered + + +def render_pep440_post_branch(pieces: Dict[str, Any]) -> str: + """TAG[.postDISTANCE[.dev0]+gHEX[.dirty]] . + + The ".dev0" means not master branch. + + Exceptions: + 1: no tags. 0.postDISTANCE[.dev0]+gHEX[.dirty] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += ".post%%d" %% pieces["distance"] + if pieces["branch"] != "master": + rendered += ".dev0" + rendered += plus_or_dot(pieces) + rendered += "g%%s" %% pieces["short"] + if pieces["dirty"]: + rendered += ".dirty" + else: + # exception #1 + rendered = "0.post%%d" %% pieces["distance"] + if pieces["branch"] != "master": + rendered += ".dev0" + rendered += "+g%%s" %% pieces["short"] + if pieces["dirty"]: + rendered += ".dirty" + return rendered + + +def render_pep440_old(pieces: Dict[str, Any]) -> str: + """TAG[.postDISTANCE[.dev0]] . + + The ".dev0" means dirty. + + Exceptions: + 1: no tags. 0.postDISTANCE[.dev0] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += ".post%%d" %% pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + else: + # exception #1 + rendered = "0.post%%d" %% pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + return rendered + + +def render_git_describe(pieces: Dict[str, Any]) -> str: + """TAG[-DISTANCE-gHEX][-dirty]. + + Like 'git describe --tags --dirty --always'. + + Exceptions: + 1: no tags. HEX[-dirty] (note: no 'g' prefix) + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"]: + rendered += "-%%d-g%%s" %% (pieces["distance"], pieces["short"]) + else: + # exception #1 + rendered = pieces["short"] + if pieces["dirty"]: + rendered += "-dirty" + return rendered + + +def render_git_describe_long(pieces: Dict[str, Any]) -> str: + """TAG-DISTANCE-gHEX[-dirty]. + + Like 'git describe --tags --dirty --always -long'. + The distance/hash is unconditional. + + Exceptions: + 1: no tags. HEX[-dirty] (note: no 'g' prefix) + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + rendered += "-%%d-g%%s" %% (pieces["distance"], pieces["short"]) + else: + # exception #1 + rendered = pieces["short"] + if pieces["dirty"]: + rendered += "-dirty" + return rendered + + +def render(pieces: Dict[str, Any], style: str) -> Dict[str, Any]: + """Render the given version pieces into the requested style.""" + if pieces["error"]: + return {"version": "unknown", + "full-revisionid": pieces.get("long"), + "dirty": None, + "error": pieces["error"], + "date": None} + + if not style or style == "default": + style = "pep440" # the default + + if style == "pep440": + rendered = render_pep440(pieces) + elif style == "pep440-branch": + rendered = render_pep440_branch(pieces) + elif style == "pep440-pre": + rendered = render_pep440_pre(pieces) + elif style == "pep440-post": + rendered = render_pep440_post(pieces) + elif style == "pep440-post-branch": + rendered = render_pep440_post_branch(pieces) + elif style == "pep440-old": + rendered = render_pep440_old(pieces) + elif style == "git-describe": + rendered = render_git_describe(pieces) + elif style == "git-describe-long": + rendered = render_git_describe_long(pieces) + else: + raise ValueError("unknown style '%%s'" %% style) + + return {"version": rendered, "full-revisionid": pieces["long"], + "dirty": pieces["dirty"], "error": None, + "date": pieces.get("date")} + + +def get_versions() -> Dict[str, Any]: + """Get version information or return default if unable to do so.""" + # I am in _version.py, which lives at ROOT/VERSIONFILE_SOURCE. If we have + # __file__, we can work backwards from there to the root. Some + # py2exe/bbfreeze/non-CPython implementations don't do __file__, in which + # case we can only use expanded keywords. + + cfg = get_config() + verbose = cfg.verbose + + try: + return git_versions_from_keywords(get_keywords(), cfg.tag_prefix, + verbose) + except NotThisMethod: + pass + + try: + root = os.path.realpath(__file__) + # versionfile_source is the relative path from the top of the source + # tree (where the .git directory might live) to this file. Invert + # this to find the root from __file__. + for _ in cfg.versionfile_source.split('/'): + root = os.path.dirname(root) + except NameError: + return {"version": "0+unknown", "full-revisionid": None, + "dirty": None, + "error": "unable to find root of source tree", + "date": None} + + try: + pieces = git_pieces_from_vcs(cfg.tag_prefix, root, verbose) + return render(pieces, cfg.style) + except NotThisMethod: + pass + + try: + if cfg.parentdir_prefix: + return versions_from_parentdir(cfg.parentdir_prefix, root, verbose) + except NotThisMethod: + pass + + return {"version": "0+unknown", "full-revisionid": None, + "dirty": None, + "error": "unable to compute version", "date": None} +''' + + +@register_vcs_handler("git", "get_keywords") +def git_get_keywords(versionfile_abs: str) -> Dict[str, str]: + """Extract version information from the given file.""" + # the code embedded in _version.py can just fetch the value of these + # keywords. When used from setup.py, we don't want to import _version.py, + # so we do it with a regexp instead. This function is not used from + # _version.py. + keywords: Dict[str, str] = {} + try: + with open(versionfile_abs, "r") as fobj: + for line in fobj: + if line.strip().startswith("git_refnames ="): + mo = re.search(r'=\s*"(.*)"', line) + if mo: + keywords["refnames"] = mo.group(1) + if line.strip().startswith("git_full ="): + mo = re.search(r'=\s*"(.*)"', line) + if mo: + keywords["full"] = mo.group(1) + if line.strip().startswith("git_date ="): + mo = re.search(r'=\s*"(.*)"', line) + if mo: + keywords["date"] = mo.group(1) + except OSError: + pass + return keywords + + +@register_vcs_handler("git", "keywords") +def git_versions_from_keywords( + keywords: Dict[str, str], + tag_prefix: str, + verbose: bool, +) -> Dict[str, Any]: + """Get version information from git keywords.""" + if "refnames" not in keywords: + raise NotThisMethod("Short version file found") + date = keywords.get("date") + if date is not None: + # Use only the last line. Previous lines may contain GPG signature + # information. + date = date.splitlines()[-1] + + # git-2.2.0 added "%cI", which expands to an ISO-8601 -compliant + # datestamp. However we prefer "%ci" (which expands to an "ISO-8601 + # -like" string, which we must then edit to make compliant), because + # it's been around since git-1.5.3, and it's too difficult to + # discover which version we're using, or to work around using an + # older one. + date = date.strip().replace(" ", "T", 1).replace(" ", "", 1) + refnames = keywords["refnames"].strip() + if refnames.startswith("$Format"): + if verbose: + print("keywords are unexpanded, not using") + raise NotThisMethod("unexpanded keywords, not a git-archive tarball") + refs = {r.strip() for r in refnames.strip("()").split(",")} + # starting in git-1.8.3, tags are listed as "tag: foo-1.0" instead of + # just "foo-1.0". If we see a "tag: " prefix, prefer those. + TAG = "tag: " + tags = {r[len(TAG):] for r in refs if r.startswith(TAG)} + if not tags: + # Either we're using git < 1.8.3, or there really are no tags. We use + # a heuristic: assume all version tags have a digit. The old git %d + # expansion behaves like git log --decorate=short and strips out the + # refs/heads/ and refs/tags/ prefixes that would let us distinguish + # between branches and tags. By ignoring refnames without digits, we + # filter out many common branch names like "release" and + # "stabilization", as well as "HEAD" and "master". + tags = {r for r in refs if re.search(r'\d', r)} + if verbose: + print("discarding '%s', no digits" % ",".join(refs - tags)) + if verbose: + print("likely tags: %s" % ",".join(sorted(tags))) + for ref in sorted(tags): + # sorting will prefer e.g. "2.0" over "2.0rc1" + if ref.startswith(tag_prefix): + r = ref[len(tag_prefix):] + # Filter out refs that exactly match prefix or that don't start + # with a number once the prefix is stripped (mostly a concern + # when prefix is '') + if not re.match(r'\d', r): + continue + if verbose: + print("picking %s" % r) + return {"version": r, + "full-revisionid": keywords["full"].strip(), + "dirty": False, "error": None, + "date": date} + # no suitable tags, so version is "0+unknown", but full hex is still there + if verbose: + print("no suitable tags, using unknown + full revision id") + return {"version": "0+unknown", + "full-revisionid": keywords["full"].strip(), + "dirty": False, "error": "no suitable tags", "date": None} + + +@register_vcs_handler("git", "pieces_from_vcs") +def git_pieces_from_vcs( + tag_prefix: str, + root: str, + verbose: bool, + runner: Callable = run_command +) -> Dict[str, Any]: + """Get version from 'git describe' in the root of the source tree. + + This only gets called if the git-archive 'subst' keywords were *not* + expanded, and _version.py hasn't already been rewritten with a short + version string, meaning we're inside a checked out source tree. + """ + GITS = ["git"] + if sys.platform == "win32": + GITS = ["git.cmd", "git.exe"] + + # GIT_DIR can interfere with correct operation of Versioneer. + # It may be intended to be passed to the Versioneer-versioned project, + # but that should not change where we get our version from. + env = os.environ.copy() + env.pop("GIT_DIR", None) + runner = functools.partial(runner, env=env) + + _, rc = runner(GITS, ["rev-parse", "--git-dir"], cwd=root, + hide_stderr=not verbose) + if rc != 0: + if verbose: + print("Directory %s not under git control" % root) + raise NotThisMethod("'git rev-parse --git-dir' returned error") + + # if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty] + # if there isn't one, this yields HEX[-dirty] (no NUM) + describe_out, rc = runner(GITS, [ + "describe", "--tags", "--dirty", "--always", "--long", + "--match", f"{tag_prefix}[[:digit:]]*" + ], cwd=root) + # --long was added in git-1.5.5 + if describe_out is None: + raise NotThisMethod("'git describe' failed") + describe_out = describe_out.strip() + full_out, rc = runner(GITS, ["rev-parse", "HEAD"], cwd=root) + if full_out is None: + raise NotThisMethod("'git rev-parse' failed") + full_out = full_out.strip() + + pieces: Dict[str, Any] = {} + pieces["long"] = full_out + pieces["short"] = full_out[:7] # maybe improved later + pieces["error"] = None + + branch_name, rc = runner(GITS, ["rev-parse", "--abbrev-ref", "HEAD"], + cwd=root) + # --abbrev-ref was added in git-1.6.3 + if rc != 0 or branch_name is None: + raise NotThisMethod("'git rev-parse --abbrev-ref' returned error") + branch_name = branch_name.strip() + + if branch_name == "HEAD": + # If we aren't exactly on a branch, pick a branch which represents + # the current commit. If all else fails, we are on a branchless + # commit. + branches, rc = runner(GITS, ["branch", "--contains"], cwd=root) + # --contains was added in git-1.5.4 + if rc != 0 or branches is None: + raise NotThisMethod("'git branch --contains' returned error") + branches = branches.split("\n") + + # Remove the first line if we're running detached + if "(" in branches[0]: + branches.pop(0) + + # Strip off the leading "* " from the list of branches. + branches = [branch[2:] for branch in branches] + if "master" in branches: + branch_name = "master" + elif not branches: + branch_name = None + else: + # Pick the first branch that is returned. Good or bad. + branch_name = branches[0] + + pieces["branch"] = branch_name + + # parse describe_out. It will be like TAG-NUM-gHEX[-dirty] or HEX[-dirty] + # TAG might have hyphens. + git_describe = describe_out + + # look for -dirty suffix + dirty = git_describe.endswith("-dirty") + pieces["dirty"] = dirty + if dirty: + git_describe = git_describe[:git_describe.rindex("-dirty")] + + # now we have TAG-NUM-gHEX or HEX + + if "-" in git_describe: + # TAG-NUM-gHEX + mo = re.search(r'^(.+)-(\d+)-g([0-9a-f]+)$', git_describe) + if not mo: + # unparsable. Maybe git-describe is misbehaving? + pieces["error"] = ("unable to parse git-describe output: '%s'" + % describe_out) + return pieces + + # tag + full_tag = mo.group(1) + if not full_tag.startswith(tag_prefix): + if verbose: + fmt = "tag '%s' doesn't start with prefix '%s'" + print(fmt % (full_tag, tag_prefix)) + pieces["error"] = ("tag '%s' doesn't start with prefix '%s'" + % (full_tag, tag_prefix)) + return pieces + pieces["closest-tag"] = full_tag[len(tag_prefix):] + + # distance: number of commits since tag + pieces["distance"] = int(mo.group(2)) + + # commit: short hex revision ID + pieces["short"] = mo.group(3) + + else: + # HEX: no tags + pieces["closest-tag"] = None + out, rc = runner(GITS, ["rev-list", "HEAD", "--left-right"], cwd=root) + pieces["distance"] = len(out.split()) # total number of commits + + # commit date: see ISO-8601 comment in git_versions_from_keywords() + date = runner(GITS, ["show", "-s", "--format=%ci", "HEAD"], cwd=root)[0].strip() + # Use only the last line. Previous lines may contain GPG signature + # information. + date = date.splitlines()[-1] + pieces["date"] = date.strip().replace(" ", "T", 1).replace(" ", "", 1) + + return pieces + + +def do_vcs_install(versionfile_source: str, ipy: Optional[str]) -> None: + """Git-specific installation logic for Versioneer. + + For Git, this means creating/changing .gitattributes to mark _version.py + for export-subst keyword substitution. + """ + GITS = ["git"] + if sys.platform == "win32": + GITS = ["git.cmd", "git.exe"] + files = [versionfile_source] + if ipy: + files.append(ipy) + if "VERSIONEER_PEP518" not in globals(): + try: + my_path = __file__ + if my_path.endswith((".pyc", ".pyo")): + my_path = os.path.splitext(my_path)[0] + ".py" + versioneer_file = os.path.relpath(my_path) + except NameError: + versioneer_file = "versioneer.py" + files.append(versioneer_file) + present = False + try: + with open(".gitattributes", "r") as fobj: + for line in fobj: + if line.strip().startswith(versionfile_source): + if "export-subst" in line.strip().split()[1:]: + present = True + break + except OSError: + pass + if not present: + with open(".gitattributes", "a+") as fobj: + fobj.write(f"{versionfile_source} export-subst\n") + files.append(".gitattributes") + run_command(GITS, ["add", "--"] + files) + + +def versions_from_parentdir( + parentdir_prefix: str, + root: str, + verbose: bool, +) -> Dict[str, Any]: + """Try to determine the version from the parent directory name. + + Source tarballs conventionally unpack into a directory that includes both + the project name and a version string. We will also support searching up + two directory levels for an appropriately named parent directory + """ + rootdirs = [] + + for _ in range(3): + dirname = os.path.basename(root) + if dirname.startswith(parentdir_prefix): + return {"version": dirname[len(parentdir_prefix):], + "full-revisionid": None, + "dirty": False, "error": None, "date": None} + rootdirs.append(root) + root = os.path.dirname(root) # up a level + + if verbose: + print("Tried directories %s but none started with prefix %s" % + (str(rootdirs), parentdir_prefix)) + raise NotThisMethod("rootdir doesn't start with parentdir_prefix") + + +SHORT_VERSION_PY = """ +# This file was generated by 'versioneer.py' (0.29) from +# revision-control system data, or from the parent directory name of an +# unpacked source archive. Distribution tarballs contain a pre-generated copy +# of this file. + +import json + +version_json = ''' +%s +''' # END VERSION_JSON + + +def get_versions(): + return json.loads(version_json) +""" + + +def versions_from_file(filename: str) -> Dict[str, Any]: + """Try to determine the version from _version.py if present.""" + try: + with open(filename) as f: + contents = f.read() + except OSError: + raise NotThisMethod("unable to read _version.py") + mo = re.search(r"version_json = '''\n(.*)''' # END VERSION_JSON", + contents, re.M | re.S) + if not mo: + mo = re.search(r"version_json = '''\r\n(.*)''' # END VERSION_JSON", + contents, re.M | re.S) + if not mo: + raise NotThisMethod("no version_json in _version.py") + return json.loads(mo.group(1)) + + +def write_to_version_file(filename: str, versions: Dict[str, Any]) -> None: + """Write the given version number to the given _version.py file.""" + contents = json.dumps(versions, sort_keys=True, + indent=1, separators=(",", ": ")) + with open(filename, "w") as f: + f.write(SHORT_VERSION_PY % contents) + + print("set %s to '%s'" % (filename, versions["version"])) + + +def plus_or_dot(pieces: Dict[str, Any]) -> str: + """Return a + if we don't already have one, else return a .""" + if "+" in pieces.get("closest-tag", ""): + return "." + return "+" + + +def render_pep440(pieces: Dict[str, Any]) -> str: + """Build up version string, with post-release "local version identifier". + + Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you + get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty + + Exceptions: + 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += plus_or_dot(pieces) + rendered += "%d.g%s" % (pieces["distance"], pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + else: + # exception #1 + rendered = "0+untagged.%d.g%s" % (pieces["distance"], + pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + return rendered + + +def render_pep440_branch(pieces: Dict[str, Any]) -> str: + """TAG[[.dev0]+DISTANCE.gHEX[.dirty]] . + + The ".dev0" means not master branch. Note that .dev0 sorts backwards + (a feature branch will appear "older" than the master branch). + + Exceptions: + 1: no tags. 0[.dev0]+untagged.DISTANCE.gHEX[.dirty] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + if pieces["branch"] != "master": + rendered += ".dev0" + rendered += plus_or_dot(pieces) + rendered += "%d.g%s" % (pieces["distance"], pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + else: + # exception #1 + rendered = "0" + if pieces["branch"] != "master": + rendered += ".dev0" + rendered += "+untagged.%d.g%s" % (pieces["distance"], + pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + return rendered + + +def pep440_split_post(ver: str) -> Tuple[str, Optional[int]]: + """Split pep440 version string at the post-release segment. + + Returns the release segments before the post-release and the + post-release version number (or -1 if no post-release segment is present). + """ + vc = str.split(ver, ".post") + return vc[0], int(vc[1] or 0) if len(vc) == 2 else None + + +def render_pep440_pre(pieces: Dict[str, Any]) -> str: + """TAG[.postN.devDISTANCE] -- No -dirty. + + Exceptions: + 1: no tags. 0.post0.devDISTANCE + """ + if pieces["closest-tag"]: + if pieces["distance"]: + # update the post release segment + tag_version, post_version = pep440_split_post(pieces["closest-tag"]) + rendered = tag_version + if post_version is not None: + rendered += ".post%d.dev%d" % (post_version + 1, pieces["distance"]) + else: + rendered += ".post0.dev%d" % (pieces["distance"]) + else: + # no commits, use the tag as the version + rendered = pieces["closest-tag"] + else: + # exception #1 + rendered = "0.post0.dev%d" % pieces["distance"] + return rendered + + +def render_pep440_post(pieces: Dict[str, Any]) -> str: + """TAG[.postDISTANCE[.dev0]+gHEX] . + + The ".dev0" means dirty. Note that .dev0 sorts backwards + (a dirty tree will appear "older" than the corresponding clean one), + but you shouldn't be releasing software with -dirty anyways. + + Exceptions: + 1: no tags. 0.postDISTANCE[.dev0] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += ".post%d" % pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + rendered += plus_or_dot(pieces) + rendered += "g%s" % pieces["short"] + else: + # exception #1 + rendered = "0.post%d" % pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + rendered += "+g%s" % pieces["short"] + return rendered + + +def render_pep440_post_branch(pieces: Dict[str, Any]) -> str: + """TAG[.postDISTANCE[.dev0]+gHEX[.dirty]] . + + The ".dev0" means not master branch. + + Exceptions: + 1: no tags. 0.postDISTANCE[.dev0]+gHEX[.dirty] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += ".post%d" % pieces["distance"] + if pieces["branch"] != "master": + rendered += ".dev0" + rendered += plus_or_dot(pieces) + rendered += "g%s" % pieces["short"] + if pieces["dirty"]: + rendered += ".dirty" + else: + # exception #1 + rendered = "0.post%d" % pieces["distance"] + if pieces["branch"] != "master": + rendered += ".dev0" + rendered += "+g%s" % pieces["short"] + if pieces["dirty"]: + rendered += ".dirty" + return rendered + + +def render_pep440_old(pieces: Dict[str, Any]) -> str: + """TAG[.postDISTANCE[.dev0]] . + + The ".dev0" means dirty. + + Exceptions: + 1: no tags. 0.postDISTANCE[.dev0] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += ".post%d" % pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + else: + # exception #1 + rendered = "0.post%d" % pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + return rendered + + +def render_git_describe(pieces: Dict[str, Any]) -> str: + """TAG[-DISTANCE-gHEX][-dirty]. + + Like 'git describe --tags --dirty --always'. + + Exceptions: + 1: no tags. HEX[-dirty] (note: no 'g' prefix) + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"]: + rendered += "-%d-g%s" % (pieces["distance"], pieces["short"]) + else: + # exception #1 + rendered = pieces["short"] + if pieces["dirty"]: + rendered += "-dirty" + return rendered + + +def render_git_describe_long(pieces: Dict[str, Any]) -> str: + """TAG-DISTANCE-gHEX[-dirty]. + + Like 'git describe --tags --dirty --always -long'. + The distance/hash is unconditional. + + Exceptions: + 1: no tags. HEX[-dirty] (note: no 'g' prefix) + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + rendered += "-%d-g%s" % (pieces["distance"], pieces["short"]) + else: + # exception #1 + rendered = pieces["short"] + if pieces["dirty"]: + rendered += "-dirty" + return rendered + + +def render(pieces: Dict[str, Any], style: str) -> Dict[str, Any]: + """Render the given version pieces into the requested style.""" + if pieces["error"]: + return {"version": "unknown", + "full-revisionid": pieces.get("long"), + "dirty": None, + "error": pieces["error"], + "date": None} + + if not style or style == "default": + style = "pep440" # the default + + if style == "pep440": + rendered = render_pep440(pieces) + elif style == "pep440-branch": + rendered = render_pep440_branch(pieces) + elif style == "pep440-pre": + rendered = render_pep440_pre(pieces) + elif style == "pep440-post": + rendered = render_pep440_post(pieces) + elif style == "pep440-post-branch": + rendered = render_pep440_post_branch(pieces) + elif style == "pep440-old": + rendered = render_pep440_old(pieces) + elif style == "git-describe": + rendered = render_git_describe(pieces) + elif style == "git-describe-long": + rendered = render_git_describe_long(pieces) + else: + raise ValueError("unknown style '%s'" % style) + + return {"version": rendered, "full-revisionid": pieces["long"], + "dirty": pieces["dirty"], "error": None, + "date": pieces.get("date")} + + +class VersioneerBadRootError(Exception): + """The project root directory is unknown or missing key files.""" + + +def get_versions(verbose: bool = False) -> Dict[str, Any]: + """Get the project version from whatever source is available. + + Returns dict with two keys: 'version' and 'full'. + """ + if "versioneer" in sys.modules: + # see the discussion in cmdclass.py:get_cmdclass() + del sys.modules["versioneer"] + + root = get_root() + cfg = get_config_from_root(root) + + assert cfg.VCS is not None, "please set [versioneer]VCS= in setup.cfg" + handlers = HANDLERS.get(cfg.VCS) + assert handlers, "unrecognized VCS '%s'" % cfg.VCS + verbose = verbose or bool(cfg.verbose) # `bool()` used to avoid `None` + assert cfg.versionfile_source is not None, \ + "please set versioneer.versionfile_source" + assert cfg.tag_prefix is not None, "please set versioneer.tag_prefix" + + versionfile_abs = os.path.join(root, cfg.versionfile_source) + + # extract version from first of: _version.py, VCS command (e.g. 'git + # describe'), parentdir. This is meant to work for developers using a + # source checkout, for users of a tarball created by 'setup.py sdist', + # and for users of a tarball/zipball created by 'git archive' or github's + # download-from-tag feature or the equivalent in other VCSes. + + get_keywords_f = handlers.get("get_keywords") + from_keywords_f = handlers.get("keywords") + if get_keywords_f and from_keywords_f: + try: + keywords = get_keywords_f(versionfile_abs) + ver = from_keywords_f(keywords, cfg.tag_prefix, verbose) + if verbose: + print("got version from expanded keyword %s" % ver) + return ver + except NotThisMethod: + pass + + try: + ver = versions_from_file(versionfile_abs) + if verbose: + print("got version from file %s %s" % (versionfile_abs, ver)) + return ver + except NotThisMethod: + pass + + from_vcs_f = handlers.get("pieces_from_vcs") + if from_vcs_f: + try: + pieces = from_vcs_f(cfg.tag_prefix, root, verbose) + ver = render(pieces, cfg.style) + if verbose: + print("got version from VCS %s" % ver) + return ver + except NotThisMethod: + pass + + try: + if cfg.parentdir_prefix: + ver = versions_from_parentdir(cfg.parentdir_prefix, root, verbose) + if verbose: + print("got version from parentdir %s" % ver) + return ver + except NotThisMethod: + pass + + if verbose: + print("unable to compute version") + + return {"version": "0+unknown", "full-revisionid": None, + "dirty": None, "error": "unable to compute version", + "date": None} + + +def get_version() -> str: + """Get the short version string for this project.""" + return get_versions()["version"] + + +def get_cmdclass(cmdclass: Optional[Dict[str, Any]] = None): + """Get the custom setuptools subclasses used by Versioneer. + + If the package uses a different cmdclass (e.g. one from numpy), it + should be provide as an argument. + """ + if "versioneer" in sys.modules: + del sys.modules["versioneer"] + # this fixes the "python setup.py develop" case (also 'install' and + # 'easy_install .'), in which subdependencies of the main project are + # built (using setup.py bdist_egg) in the same python process. Assume + # a main project A and a dependency B, which use different versions + # of Versioneer. A's setup.py imports A's Versioneer, leaving it in + # sys.modules by the time B's setup.py is executed, causing B to run + # with the wrong versioneer. Setuptools wraps the sub-dep builds in a + # sandbox that restores sys.modules to it's pre-build state, so the + # parent is protected against the child's "import versioneer". By + # removing ourselves from sys.modules here, before the child build + # happens, we protect the child from the parent's versioneer too. + # Also see https://github.com/python-versioneer/python-versioneer/issues/52 + + cmds = {} if cmdclass is None else cmdclass.copy() + + # we add "version" to setuptools + from setuptools import Command + + class cmd_version(Command): + description = "report generated version string" + user_options: List[Tuple[str, str, str]] = [] + boolean_options: List[str] = [] + + def initialize_options(self) -> None: + pass + + def finalize_options(self) -> None: + pass + + def run(self) -> None: + vers = get_versions(verbose=True) + print("Version: %s" % vers["version"]) + print(" full-revisionid: %s" % vers.get("full-revisionid")) + print(" dirty: %s" % vers.get("dirty")) + print(" date: %s" % vers.get("date")) + if vers["error"]: + print(" error: %s" % vers["error"]) + cmds["version"] = cmd_version + + # we override "build_py" in setuptools + # + # most invocation pathways end up running build_py: + # distutils/build -> build_py + # distutils/install -> distutils/build ->.. + # setuptools/bdist_wheel -> distutils/install ->.. + # setuptools/bdist_egg -> distutils/install_lib -> build_py + # setuptools/install -> bdist_egg ->.. + # setuptools/develop -> ? + # pip install: + # copies source tree to a tempdir before running egg_info/etc + # if .git isn't copied too, 'git describe' will fail + # then does setup.py bdist_wheel, or sometimes setup.py install + # setup.py egg_info -> ? + + # pip install -e . and setuptool/editable_wheel will invoke build_py + # but the build_py command is not expected to copy any files. + + # we override different "build_py" commands for both environments + if 'build_py' in cmds: + _build_py: Any = cmds['build_py'] + else: + from setuptools.command.build_py import build_py as _build_py + + class cmd_build_py(_build_py): + def run(self) -> None: + root = get_root() + cfg = get_config_from_root(root) + versions = get_versions() + _build_py.run(self) + if getattr(self, "editable_mode", False): + # During editable installs `.py` and data files are + # not copied to build_lib + return + # now locate _version.py in the new build/ directory and replace + # it with an updated value + if cfg.versionfile_build: + target_versionfile = os.path.join(self.build_lib, + cfg.versionfile_build) + print("UPDATING %s" % target_versionfile) + write_to_version_file(target_versionfile, versions) + cmds["build_py"] = cmd_build_py + + if 'build_ext' in cmds: + _build_ext: Any = cmds['build_ext'] + else: + from setuptools.command.build_ext import build_ext as _build_ext + + class cmd_build_ext(_build_ext): + def run(self) -> None: + root = get_root() + cfg = get_config_from_root(root) + versions = get_versions() + _build_ext.run(self) + if self.inplace: + # build_ext --inplace will only build extensions in + # build/lib<..> dir with no _version.py to write to. + # As in place builds will already have a _version.py + # in the module dir, we do not need to write one. + return + # now locate _version.py in the new build/ directory and replace + # it with an updated value + if not cfg.versionfile_build: + return + target_versionfile = os.path.join(self.build_lib, + cfg.versionfile_build) + if not os.path.exists(target_versionfile): + print(f"Warning: {target_versionfile} does not exist, skipping " + "version update. This can happen if you are running build_ext " + "without first running build_py.") + return + print("UPDATING %s" % target_versionfile) + write_to_version_file(target_versionfile, versions) + cmds["build_ext"] = cmd_build_ext + + if "cx_Freeze" in sys.modules: # cx_freeze enabled? + from cx_Freeze.dist import build_exe as _build_exe # type: ignore + # nczeczulin reports that py2exe won't like the pep440-style string + # as FILEVERSION, but it can be used for PRODUCTVERSION, e.g. + # setup(console=[{ + # "version": versioneer.get_version().split("+", 1)[0], # FILEVERSION + # "product_version": versioneer.get_version(), + # ... + + class cmd_build_exe(_build_exe): + def run(self) -> None: + root = get_root() + cfg = get_config_from_root(root) + versions = get_versions() + target_versionfile = cfg.versionfile_source + print("UPDATING %s" % target_versionfile) + write_to_version_file(target_versionfile, versions) + + _build_exe.run(self) + os.unlink(target_versionfile) + with open(cfg.versionfile_source, "w") as f: + LONG = LONG_VERSION_PY[cfg.VCS] + f.write(LONG % + {"DOLLAR": "$", + "STYLE": cfg.style, + "TAG_PREFIX": cfg.tag_prefix, + "PARENTDIR_PREFIX": cfg.parentdir_prefix, + "VERSIONFILE_SOURCE": cfg.versionfile_source, + }) + cmds["build_exe"] = cmd_build_exe + del cmds["build_py"] + + if 'py2exe' in sys.modules: # py2exe enabled? + try: + from py2exe.setuptools_buildexe import py2exe as _py2exe # type: ignore + except ImportError: + from py2exe.distutils_buildexe import py2exe as _py2exe # type: ignore + + class cmd_py2exe(_py2exe): + def run(self) -> None: + root = get_root() + cfg = get_config_from_root(root) + versions = get_versions() + target_versionfile = cfg.versionfile_source + print("UPDATING %s" % target_versionfile) + write_to_version_file(target_versionfile, versions) + + _py2exe.run(self) + os.unlink(target_versionfile) + with open(cfg.versionfile_source, "w") as f: + LONG = LONG_VERSION_PY[cfg.VCS] + f.write(LONG % + {"DOLLAR": "$", + "STYLE": cfg.style, + "TAG_PREFIX": cfg.tag_prefix, + "PARENTDIR_PREFIX": cfg.parentdir_prefix, + "VERSIONFILE_SOURCE": cfg.versionfile_source, + }) + cmds["py2exe"] = cmd_py2exe + + # sdist farms its file list building out to egg_info + if 'egg_info' in cmds: + _egg_info: Any = cmds['egg_info'] + else: + from setuptools.command.egg_info import egg_info as _egg_info + + class cmd_egg_info(_egg_info): + def find_sources(self) -> None: + # egg_info.find_sources builds the manifest list and writes it + # in one shot + super().find_sources() + + # Modify the filelist and normalize it + root = get_root() + cfg = get_config_from_root(root) + self.filelist.append('versioneer.py') + if cfg.versionfile_source: + # There are rare cases where versionfile_source might not be + # included by default, so we must be explicit + self.filelist.append(cfg.versionfile_source) + self.filelist.sort() + self.filelist.remove_duplicates() + + # The write method is hidden in the manifest_maker instance that + # generated the filelist and was thrown away + # We will instead replicate their final normalization (to unicode, + # and POSIX-style paths) + from setuptools import unicode_utils + normalized = [unicode_utils.filesys_decode(f).replace(os.sep, '/') + for f in self.filelist.files] + + manifest_filename = os.path.join(self.egg_info, 'SOURCES.txt') + with open(manifest_filename, 'w') as fobj: + fobj.write('\n'.join(normalized)) + + cmds['egg_info'] = cmd_egg_info + + # we override different "sdist" commands for both environments + if 'sdist' in cmds: + _sdist: Any = cmds['sdist'] + else: + from setuptools.command.sdist import sdist as _sdist + + class cmd_sdist(_sdist): + def run(self) -> None: + versions = get_versions() + self._versioneer_generated_versions = versions + # unless we update this, the command will keep using the old + # version + self.distribution.metadata.version = versions["version"] + return _sdist.run(self) + + def make_release_tree(self, base_dir: str, files: List[str]) -> None: + root = get_root() + cfg = get_config_from_root(root) + _sdist.make_release_tree(self, base_dir, files) + # now locate _version.py in the new base_dir directory + # (remembering that it may be a hardlink) and replace it with an + # updated value + target_versionfile = os.path.join(base_dir, cfg.versionfile_source) + print("UPDATING %s" % target_versionfile) + write_to_version_file(target_versionfile, + self._versioneer_generated_versions) + cmds["sdist"] = cmd_sdist + + return cmds + + +CONFIG_ERROR = """ +setup.cfg is missing the necessary Versioneer configuration. You need +a section like: + + [versioneer] + VCS = git + style = pep440 + versionfile_source = src/myproject/_version.py + versionfile_build = myproject/_version.py + tag_prefix = + parentdir_prefix = myproject- + +You will also need to edit your setup.py to use the results: + + import versioneer + setup(version=versioneer.get_version(), + cmdclass=versioneer.get_cmdclass(), ...) + +Please read the docstring in ./versioneer.py for configuration instructions, +edit setup.cfg, and re-run the installer or 'python versioneer.py setup'. +""" + +SAMPLE_CONFIG = """ +# See the docstring in versioneer.py for instructions. Note that you must +# re-run 'versioneer.py setup' after changing this section, and commit the +# resulting files. + +[versioneer] +#VCS = git +#style = pep440 +#versionfile_source = +#versionfile_build = +#tag_prefix = +#parentdir_prefix = + +""" + +OLD_SNIPPET = """ +from ._version import get_versions +__version__ = get_versions()['version'] +del get_versions +""" + +INIT_PY_SNIPPET = """ +from . import {0} +__version__ = {0}.get_versions()['version'] +""" + + +def do_setup() -> int: + """Do main VCS-independent setup function for installing Versioneer.""" + root = get_root() + try: + cfg = get_config_from_root(root) + except (OSError, configparser.NoSectionError, + configparser.NoOptionError) as e: + if isinstance(e, (OSError, configparser.NoSectionError)): + print("Adding sample versioneer config to setup.cfg", + file=sys.stderr) + with open(os.path.join(root, "setup.cfg"), "a") as f: + f.write(SAMPLE_CONFIG) + print(CONFIG_ERROR, file=sys.stderr) + return 1 + + print(" creating %s" % cfg.versionfile_source) + with open(cfg.versionfile_source, "w") as f: + LONG = LONG_VERSION_PY[cfg.VCS] + f.write(LONG % {"DOLLAR": "$", + "STYLE": cfg.style, + "TAG_PREFIX": cfg.tag_prefix, + "PARENTDIR_PREFIX": cfg.parentdir_prefix, + "VERSIONFILE_SOURCE": cfg.versionfile_source, + }) + + ipy = os.path.join(os.path.dirname(cfg.versionfile_source), + "__init__.py") + maybe_ipy: Optional[str] = ipy + if os.path.exists(ipy): + try: + with open(ipy, "r") as f: + old = f.read() + except OSError: + old = "" + module = os.path.splitext(os.path.basename(cfg.versionfile_source))[0] + snippet = INIT_PY_SNIPPET.format(module) + if OLD_SNIPPET in old: + print(" replacing boilerplate in %s" % ipy) + with open(ipy, "w") as f: + f.write(old.replace(OLD_SNIPPET, snippet)) + elif snippet not in old: + print(" appending to %s" % ipy) + with open(ipy, "a") as f: + f.write(snippet) + else: + print(" %s unmodified" % ipy) + else: + print(" %s doesn't exist, ok" % ipy) + maybe_ipy = None + + # Make VCS-specific changes. For git, this means creating/changing + # .gitattributes to mark _version.py for export-subst keyword + # substitution. + do_vcs_install(cfg.versionfile_source, maybe_ipy) + return 0 + + +def scan_setup_py() -> int: + """Validate the contents of setup.py against Versioneer's expectations.""" + found = set() + setters = False + errors = 0 + with open("setup.py", "r") as f: + for line in f.readlines(): + if "import versioneer" in line: + found.add("import") + if "versioneer.get_cmdclass()" in line: + found.add("cmdclass") + if "versioneer.get_version()" in line: + found.add("get_version") + if "versioneer.VCS" in line: + setters = True + if "versioneer.versionfile_source" in line: + setters = True + if len(found) != 3: + print("") + print("Your setup.py appears to be missing some important items") + print("(but I might be wrong). Please make sure it has something") + print("roughly like the following:") + print("") + print(" import versioneer") + print(" setup( version=versioneer.get_version(),") + print(" cmdclass=versioneer.get_cmdclass(), ...)") + print("") + errors += 1 + if setters: + print("You should remove lines like 'versioneer.VCS = ' and") + print("'versioneer.versionfile_source = ' . This configuration") + print("now lives in setup.cfg, and should be removed from setup.py") + print("") + errors += 1 + return errors + + +def setup_command() -> NoReturn: + """Set up Versioneer and exit with appropriate error code.""" + errors = do_setup() + errors += scan_setup_py() + sys.exit(1 if errors else 0) + + +if __name__ == "__main__": + cmd = sys.argv[1] + if cmd == "setup": + setup_command() diff --git a/sdk/python/src/zrok/__init__.py b/sdk/python/src/zrok/__init__.py new file mode 100644 index 00000000..3ae70bb1 --- /dev/null +++ b/sdk/python/src/zrok/__init__.py @@ -0,0 +1,4 @@ +from . import environment # noqa +from . import access, decor, model, share, overview # noqa +from . import _version +__version__ = _version.get_versions()['version'] diff --git a/sdk/python/src/zrok/_version.py b/sdk/python/src/zrok/_version.py new file mode 100644 index 00000000..b5a79645 --- /dev/null +++ b/sdk/python/src/zrok/_version.py @@ -0,0 +1,683 @@ + +# This file helps to compute a version number in source trees obtained from +# git-archive tarball (such as those provided by githubs download-from-tag +# feature). Distribution tarballs (built by setup.py sdist) and build +# directories (produced by setup.py build) will contain a much shorter file +# that just contains the computed version number. + +# This file is released into the public domain. +# Generated by versioneer-0.29 +# https://github.com/python-versioneer/python-versioneer + +"""Git implementation of _version.py.""" + +import errno +import os +import re +import subprocess +import sys +from typing import Any, Callable, Dict, List, Optional, Tuple +import functools + + +def get_keywords() -> Dict[str, str]: + """Get the keywords needed to look up the version information.""" + # these strings will be replaced by git during git-archive. + # setup.py/versioneer.py will grep for the variable names, so they must + # each be defined on a line of their own. _version.py will just call + # get_keywords(). + git_refnames = "$Format:%d$" + git_full = "$Format:%H$" + git_date = "$Format:%ci$" + keywords = {"refnames": git_refnames, "full": git_full, "date": git_date} + return keywords + + +class VersioneerConfig: + """Container for Versioneer configuration parameters.""" + + VCS: str + style: str + tag_prefix: str + parentdir_prefix: str + versionfile_source: str + verbose: bool + + +def get_config() -> VersioneerConfig: + """Create, populate and return the VersioneerConfig() object.""" + # these strings are filled in when 'setup.py versioneer' creates + # _version.py + cfg = VersioneerConfig() + cfg.VCS = "git" + cfg.style = "pep440-pre" + cfg.tag_prefix = "v" + cfg.parentdir_prefix = "zrok-" + cfg.versionfile_source = "zrok/_version.py" + cfg.verbose = False + return cfg + + +class NotThisMethod(Exception): + """Exception raised if a method is not valid for the current scenario.""" + + +LONG_VERSION_PY: Dict[str, str] = {} +HANDLERS: Dict[str, Dict[str, Callable]] = {} + + +def register_vcs_handler(vcs: str, method: str) -> Callable: # decorator + """Create decorator to mark a method as the handler of a VCS.""" + def decorate(f: Callable) -> Callable: + """Store f in HANDLERS[vcs][method].""" + if vcs not in HANDLERS: + HANDLERS[vcs] = {} + HANDLERS[vcs][method] = f + return f + return decorate + + +def run_command( + commands: List[str], + args: List[str], + cwd: Optional[str] = None, + verbose: bool = False, + hide_stderr: bool = False, + env: Optional[Dict[str, str]] = None, +) -> Tuple[Optional[str], Optional[int]]: + """Call the given command(s).""" + assert isinstance(commands, list) + process = None + + popen_kwargs: Dict[str, Any] = {} + if sys.platform == "win32": + # This hides the console window if pythonw.exe is used + startupinfo = subprocess.STARTUPINFO() + startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW + popen_kwargs["startupinfo"] = startupinfo + + for command in commands: + try: + dispcmd = str([command] + args) + # remember shell=False, so use git.cmd on windows, not just git + process = subprocess.Popen([command] + args, cwd=cwd, env=env, + stdout=subprocess.PIPE, + stderr=(subprocess.PIPE if hide_stderr + else None), **popen_kwargs) + break + except OSError as e: + if e.errno == errno.ENOENT: + continue + if verbose: + print("unable to run %s" % dispcmd) + print(e) + return None, None + else: + if verbose: + print("unable to find command, tried %s" % (commands,)) + return None, None + stdout = process.communicate()[0].strip().decode() + if process.returncode != 0: + if verbose: + print("unable to run %s (error)" % dispcmd) + print("stdout was %s" % stdout) + return None, process.returncode + return stdout, process.returncode + + +def versions_from_parentdir( + parentdir_prefix: str, + root: str, + verbose: bool, +) -> Dict[str, Any]: + """Try to determine the version from the parent directory name. + + Source tarballs conventionally unpack into a directory that includes both + the project name and a version string. We will also support searching up + two directory levels for an appropriately named parent directory + """ + rootdirs = [] + + for _ in range(3): + dirname = os.path.basename(root) + if dirname.startswith(parentdir_prefix): + return {"version": dirname[len(parentdir_prefix):], + "full-revisionid": None, + "dirty": False, "error": None, "date": None} + rootdirs.append(root) + root = os.path.dirname(root) # up a level + + if verbose: + print("Tried directories %s but none started with prefix %s" % + (str(rootdirs), parentdir_prefix)) + raise NotThisMethod("rootdir doesn't start with parentdir_prefix") + + +@register_vcs_handler("git", "get_keywords") +def git_get_keywords(versionfile_abs: str) -> Dict[str, str]: + """Extract version information from the given file.""" + # the code embedded in _version.py can just fetch the value of these + # keywords. When used from setup.py, we don't want to import _version.py, + # so we do it with a regexp instead. This function is not used from + # _version.py. + keywords: Dict[str, str] = {} + try: + with open(versionfile_abs, "r") as fobj: + for line in fobj: + if line.strip().startswith("git_refnames ="): + mo = re.search(r'=\s*"(.*)"', line) + if mo: + keywords["refnames"] = mo.group(1) + if line.strip().startswith("git_full ="): + mo = re.search(r'=\s*"(.*)"', line) + if mo: + keywords["full"] = mo.group(1) + if line.strip().startswith("git_date ="): + mo = re.search(r'=\s*"(.*)"', line) + if mo: + keywords["date"] = mo.group(1) + except OSError: + pass + return keywords + + +@register_vcs_handler("git", "keywords") +def git_versions_from_keywords( + keywords: Dict[str, str], + tag_prefix: str, + verbose: bool, +) -> Dict[str, Any]: + """Get version information from git keywords.""" + if "refnames" not in keywords: + raise NotThisMethod("Short version file found") + date = keywords.get("date") + if date is not None: + # Use only the last line. Previous lines may contain GPG signature + # information. + date = date.splitlines()[-1] + + # git-2.2.0 added "%cI", which expands to an ISO-8601 -compliant + # datestamp. However we prefer "%ci" (which expands to an "ISO-8601 + # -like" string, which we must then edit to make compliant), because + # it's been around since git-1.5.3, and it's too difficult to + # discover which version we're using, or to work around using an + # older one. + date = date.strip().replace(" ", "T", 1).replace(" ", "", 1) + refnames = keywords["refnames"].strip() + if refnames.startswith("$Format"): + if verbose: + print("keywords are unexpanded, not using") + raise NotThisMethod("unexpanded keywords, not a git-archive tarball") + refs = {r.strip() for r in refnames.strip("()").split(",")} + # starting in git-1.8.3, tags are listed as "tag: foo-1.0" instead of + # just "foo-1.0". If we see a "tag: " prefix, prefer those. + TAG = "tag: " + tags = {r[len(TAG):] for r in refs if r.startswith(TAG)} + if not tags: + # Either we're using git < 1.8.3, or there really are no tags. We use + # a heuristic: assume all version tags have a digit. The old git %d + # expansion behaves like git log --decorate=short and strips out the + # refs/heads/ and refs/tags/ prefixes that would let us distinguish + # between branches and tags. By ignoring refnames without digits, we + # filter out many common branch names like "release" and + # "stabilization", as well as "HEAD" and "master". + tags = {r for r in refs if re.search(r'\d', r)} + if verbose: + print("discarding '%s', no digits" % ",".join(refs - tags)) + if verbose: + print("likely tags: %s" % ",".join(sorted(tags))) + for ref in sorted(tags): + # sorting will prefer e.g. "2.0" over "2.0rc1" + if ref.startswith(tag_prefix): + r = ref[len(tag_prefix):] + # Filter out refs that exactly match prefix or that don't start + # with a number once the prefix is stripped (mostly a concern + # when prefix is '') + if not re.match(r'\d', r): + continue + if verbose: + print("picking %s" % r) + return {"version": r, + "full-revisionid": keywords["full"].strip(), + "dirty": False, "error": None, + "date": date} + # no suitable tags, so version is "0+unknown", but full hex is still there + if verbose: + print("no suitable tags, using unknown + full revision id") + return {"version": "0+unknown", + "full-revisionid": keywords["full"].strip(), + "dirty": False, "error": "no suitable tags", "date": None} + + +@register_vcs_handler("git", "pieces_from_vcs") +def git_pieces_from_vcs( + tag_prefix: str, + root: str, + verbose: bool, + runner: Callable = run_command +) -> Dict[str, Any]: + """Get version from 'git describe' in the root of the source tree. + + This only gets called if the git-archive 'subst' keywords were *not* + expanded, and _version.py hasn't already been rewritten with a short + version string, meaning we're inside a checked out source tree. + """ + GITS = ["git"] + if sys.platform == "win32": + GITS = ["git.cmd", "git.exe"] + + # GIT_DIR can interfere with correct operation of Versioneer. + # It may be intended to be passed to the Versioneer-versioned project, + # but that should not change where we get our version from. + env = os.environ.copy() + env.pop("GIT_DIR", None) + runner = functools.partial(runner, env=env) + + _, rc = runner(GITS, ["rev-parse", "--git-dir"], cwd=root, + hide_stderr=not verbose) + if rc != 0: + if verbose: + print("Directory %s not under git control" % root) + raise NotThisMethod("'git rev-parse --git-dir' returned error") + + # if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty] + # if there isn't one, this yields HEX[-dirty] (no NUM) + describe_out, rc = runner(GITS, [ + "describe", "--tags", "--dirty", "--always", "--long", + "--match", f"{tag_prefix}[[:digit:]]*" + ], cwd=root) + # --long was added in git-1.5.5 + if describe_out is None: + raise NotThisMethod("'git describe' failed") + describe_out = describe_out.strip() + full_out, rc = runner(GITS, ["rev-parse", "HEAD"], cwd=root) + if full_out is None: + raise NotThisMethod("'git rev-parse' failed") + full_out = full_out.strip() + + pieces: Dict[str, Any] = {} + pieces["long"] = full_out + pieces["short"] = full_out[:7] # maybe improved later + pieces["error"] = None + + branch_name, rc = runner(GITS, ["rev-parse", "--abbrev-ref", "HEAD"], + cwd=root) + # --abbrev-ref was added in git-1.6.3 + if rc != 0 or branch_name is None: + raise NotThisMethod("'git rev-parse --abbrev-ref' returned error") + branch_name = branch_name.strip() + + if branch_name == "HEAD": + # If we aren't exactly on a branch, pick a branch which represents + # the current commit. If all else fails, we are on a branchless + # commit. + branches, rc = runner(GITS, ["branch", "--contains"], cwd=root) + # --contains was added in git-1.5.4 + if rc != 0 or branches is None: + raise NotThisMethod("'git branch --contains' returned error") + branches = branches.split("\n") + + # Remove the first line if we're running detached + if "(" in branches[0]: + branches.pop(0) + + # Strip off the leading "* " from the list of branches. + branches = [branch[2:] for branch in branches] + if "master" in branches: + branch_name = "master" + elif not branches: + branch_name = None + else: + # Pick the first branch that is returned. Good or bad. + branch_name = branches[0] + + pieces["branch"] = branch_name + + # parse describe_out. It will be like TAG-NUM-gHEX[-dirty] or HEX[-dirty] + # TAG might have hyphens. + git_describe = describe_out + + # look for -dirty suffix + dirty = git_describe.endswith("-dirty") + pieces["dirty"] = dirty + if dirty: + git_describe = git_describe[:git_describe.rindex("-dirty")] + + # now we have TAG-NUM-gHEX or HEX + + if "-" in git_describe: + # TAG-NUM-gHEX + mo = re.search(r'^(.+)-(\d+)-g([0-9a-f]+)$', git_describe) + if not mo: + # unparsable. Maybe git-describe is misbehaving? + pieces["error"] = ("unable to parse git-describe output: '%s'" + % describe_out) + return pieces + + # tag + full_tag = mo.group(1) + if not full_tag.startswith(tag_prefix): + if verbose: + fmt = "tag '%s' doesn't start with prefix '%s'" + print(fmt % (full_tag, tag_prefix)) + pieces["error"] = ("tag '%s' doesn't start with prefix '%s'" + % (full_tag, tag_prefix)) + return pieces + pieces["closest-tag"] = full_tag[len(tag_prefix):] + + # distance: number of commits since tag + pieces["distance"] = int(mo.group(2)) + + # commit: short hex revision ID + pieces["short"] = mo.group(3) + + else: + # HEX: no tags + pieces["closest-tag"] = None + out, rc = runner(GITS, ["rev-list", "HEAD", "--left-right"], cwd=root) + pieces["distance"] = len(out.split()) # total number of commits + + # commit date: see ISO-8601 comment in git_versions_from_keywords() + date = runner(GITS, ["show", "-s", "--format=%ci", "HEAD"], cwd=root)[0].strip() + # Use only the last line. Previous lines may contain GPG signature + # information. + date = date.splitlines()[-1] + pieces["date"] = date.strip().replace(" ", "T", 1).replace(" ", "", 1) + + return pieces + + +def plus_or_dot(pieces: Dict[str, Any]) -> str: + """Return a + if we don't already have one, else return a .""" + if "+" in pieces.get("closest-tag", ""): + return "." + return "+" + + +def render_pep440(pieces: Dict[str, Any]) -> str: + """Build up version string, with post-release "local version identifier". + + Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you + get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty + + Exceptions: + 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += plus_or_dot(pieces) + rendered += "%d.g%s" % (pieces["distance"], pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + else: + # exception #1 + rendered = "0+untagged.%d.g%s" % (pieces["distance"], + pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + return rendered + + +def render_pep440_branch(pieces: Dict[str, Any]) -> str: + """TAG[[.dev0]+DISTANCE.gHEX[.dirty]] . + + The ".dev0" means not master branch. Note that .dev0 sorts backwards + (a feature branch will appear "older" than the master branch). + + Exceptions: + 1: no tags. 0[.dev0]+untagged.DISTANCE.gHEX[.dirty] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + if pieces["branch"] != "master": + rendered += ".dev0" + rendered += plus_or_dot(pieces) + rendered += "%d.g%s" % (pieces["distance"], pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + else: + # exception #1 + rendered = "0" + if pieces["branch"] != "master": + rendered += ".dev0" + rendered += "+untagged.%d.g%s" % (pieces["distance"], + pieces["short"]) + if pieces["dirty"]: + rendered += ".dirty" + return rendered + + +def pep440_split_post(ver: str) -> Tuple[str, Optional[int]]: + """Split pep440 version string at the post-release segment. + + Returns the release segments before the post-release and the + post-release version number (or -1 if no post-release segment is present). + """ + vc = str.split(ver, ".post") + return vc[0], int(vc[1] or 0) if len(vc) == 2 else None + + +def render_pep440_pre(pieces: Dict[str, Any]) -> str: + """TAG[.postN.devDISTANCE] -- No -dirty. + + Exceptions: + 1: no tags. 0.post0.devDISTANCE + """ + if pieces["closest-tag"]: + if pieces["distance"]: + # update the post release segment + tag_version, post_version = pep440_split_post(pieces["closest-tag"]) + rendered = tag_version + if post_version is not None: + rendered += ".post%d.dev%d" % (post_version + 1, pieces["distance"]) + else: + rendered += ".post0.dev%d" % (pieces["distance"]) + else: + # no commits, use the tag as the version + rendered = pieces["closest-tag"] + else: + # exception #1 + rendered = "0.post0.dev%d" % pieces["distance"] + return rendered + + +def render_pep440_post(pieces: Dict[str, Any]) -> str: + """TAG[.postDISTANCE[.dev0]+gHEX] . + + The ".dev0" means dirty. Note that .dev0 sorts backwards + (a dirty tree will appear "older" than the corresponding clean one), + but you shouldn't be releasing software with -dirty anyways. + + Exceptions: + 1: no tags. 0.postDISTANCE[.dev0] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += ".post%d" % pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + rendered += plus_or_dot(pieces) + rendered += "g%s" % pieces["short"] + else: + # exception #1 + rendered = "0.post%d" % pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + rendered += "+g%s" % pieces["short"] + return rendered + + +def render_pep440_post_branch(pieces: Dict[str, Any]) -> str: + """TAG[.postDISTANCE[.dev0]+gHEX[.dirty]] . + + The ".dev0" means not master branch. + + Exceptions: + 1: no tags. 0.postDISTANCE[.dev0]+gHEX[.dirty] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += ".post%d" % pieces["distance"] + if pieces["branch"] != "master": + rendered += ".dev0" + rendered += plus_or_dot(pieces) + rendered += "g%s" % pieces["short"] + if pieces["dirty"]: + rendered += ".dirty" + else: + # exception #1 + rendered = "0.post%d" % pieces["distance"] + if pieces["branch"] != "master": + rendered += ".dev0" + rendered += "+g%s" % pieces["short"] + if pieces["dirty"]: + rendered += ".dirty" + return rendered + + +def render_pep440_old(pieces: Dict[str, Any]) -> str: + """TAG[.postDISTANCE[.dev0]] . + + The ".dev0" means dirty. + + Exceptions: + 1: no tags. 0.postDISTANCE[.dev0] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"] or pieces["dirty"]: + rendered += ".post%d" % pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + else: + # exception #1 + rendered = "0.post%d" % pieces["distance"] + if pieces["dirty"]: + rendered += ".dev0" + return rendered + + +def render_git_describe(pieces: Dict[str, Any]) -> str: + """TAG[-DISTANCE-gHEX][-dirty]. + + Like 'git describe --tags --dirty --always'. + + Exceptions: + 1: no tags. HEX[-dirty] (note: no 'g' prefix) + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + if pieces["distance"]: + rendered += "-%d-g%s" % (pieces["distance"], pieces["short"]) + else: + # exception #1 + rendered = pieces["short"] + if pieces["dirty"]: + rendered += "-dirty" + return rendered + + +def render_git_describe_long(pieces: Dict[str, Any]) -> str: + """TAG-DISTANCE-gHEX[-dirty]. + + Like 'git describe --tags --dirty --always -long'. + The distance/hash is unconditional. + + Exceptions: + 1: no tags. HEX[-dirty] (note: no 'g' prefix) + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] + rendered += "-%d-g%s" % (pieces["distance"], pieces["short"]) + else: + # exception #1 + rendered = pieces["short"] + if pieces["dirty"]: + rendered += "-dirty" + return rendered + + +def render(pieces: Dict[str, Any], style: str) -> Dict[str, Any]: + """Render the given version pieces into the requested style.""" + if pieces["error"]: + return {"version": "unknown", + "full-revisionid": pieces.get("long"), + "dirty": None, + "error": pieces["error"], + "date": None} + + if not style or style == "default": + style = "pep440" # the default + + if style == "pep440": + rendered = render_pep440(pieces) + elif style == "pep440-branch": + rendered = render_pep440_branch(pieces) + elif style == "pep440-pre": + rendered = render_pep440_pre(pieces) + elif style == "pep440-post": + rendered = render_pep440_post(pieces) + elif style == "pep440-post-branch": + rendered = render_pep440_post_branch(pieces) + elif style == "pep440-old": + rendered = render_pep440_old(pieces) + elif style == "git-describe": + rendered = render_git_describe(pieces) + elif style == "git-describe-long": + rendered = render_git_describe_long(pieces) + else: + raise ValueError("unknown style '%s'" % style) + + return {"version": rendered, "full-revisionid": pieces["long"], + "dirty": pieces["dirty"], "error": None, + "date": pieces.get("date")} + + +def get_versions() -> Dict[str, Any]: + """Get version information or return default if unable to do so.""" + # I am in _version.py, which lives at ROOT/VERSIONFILE_SOURCE. If we have + # __file__, we can work backwards from there to the root. Some + # py2exe/bbfreeze/non-CPython implementations don't do __file__, in which + # case we can only use expanded keywords. + + cfg = get_config() + verbose = cfg.verbose + + try: + return git_versions_from_keywords(get_keywords(), cfg.tag_prefix, + verbose) + except NotThisMethod: + pass + + try: + root = os.path.realpath(__file__) + # versionfile_source is the relative path from the top of the source + # tree (where the .git directory might live) to this file. Invert + # this to find the root from __file__. + for _ in cfg.versionfile_source.split('/'): + root = os.path.dirname(root) + except NameError: + return {"version": "0+unknown", "full-revisionid": None, + "dirty": None, + "error": "unable to find root of source tree", + "date": None} + + try: + pieces = git_pieces_from_vcs(cfg.tag_prefix, root, verbose) + return render(pieces, cfg.style) + except NotThisMethod: + pass + + try: + if cfg.parentdir_prefix: + return versions_from_parentdir(cfg.parentdir_prefix, root, verbose) + except NotThisMethod: + pass + + return {"version": "0+unknown", "full-revisionid": None, + "dirty": None, + "error": "unable to compute version", "date": None} diff --git a/sdk/python/src/zrok/access.py b/sdk/python/src/zrok/access.py new file mode 100644 index 00000000..60f2dfd2 --- /dev/null +++ b/sdk/python/src/zrok/access.py @@ -0,0 +1,58 @@ +from zrok.environment.root import Root +from zrok_api.models.access_request import AccessRequest +from zrok_api.models.unaccess_request import UnaccessRequest +from zrok_api.api import ShareApi +from zrok import model + + +class Access(): + root: Root + request: model.AccessRequest + access: model.Access + + def __init__(self, root: Root, request: model.AccessRequest): + self.root = root + self.request = request + + def __enter__(self) -> model.Access: + self.access = CreateAccess(root=self.root, request=self.request) + return self.access + + def __exit__(self, exception_type, exception_value, exception_traceback): + DeleteAccess(root=self.root, acc=self.access) + + +def CreateAccess(root: Root, request: model.AccessRequest) -> model.Access: + if not root.IsEnabled(): + raise Exception("environment is not enabled; enable with 'zrok enable' first!") + + out = AccessRequest(share_token=request.ShareToken, + env_zid=root.env.ZitiIdentity) + + try: + zrok = root.Client() + except Exception as e: + raise Exception("error getting zrok client", e) + try: + res = ShareApi(zrok).access(body=out) + except Exception as e: + raise Exception("unable to create access", e) + return model.Access(Token=res.frontend_token, + ShareToken=request.ShareToken, + BackendMode=res.backend_mode) + + +def DeleteAccess(root: Root, acc: model.Access): + req = UnaccessRequest(frontend_token=acc.Token, + share_token=acc.ShareToken, + env_zid=root.env.ZitiIdentity) + + try: + zrok = root.Client() + except Exception as e: + raise Exception("error getting zrok client", e) + + try: + ShareApi(zrok).unaccess(body=req) + except Exception as e: + raise Exception("error deleting access", e) diff --git a/sdk/python/src/zrok/decor.py b/sdk/python/src/zrok/decor.py new file mode 100644 index 00000000..afaca880 --- /dev/null +++ b/sdk/python/src/zrok/decor.py @@ -0,0 +1,33 @@ +from dataclasses import dataclass +import openziti +from zrok.environment.root import Root + + +@dataclass +class Opts: + root: Root + shrToken: str + bindPort: int + bindHost: str = "" + + +class MonkeyPatch(openziti.monkeypatch): + def __init__(self, opts: {}, *args, **kwargs): + zif = opts['cfg'].root.ZitiIdentityNamed(opts['cfg'].root.EnvironmentIdentityName()) + cfg = dict(ztx=openziti.load(zif), service=opts['cfg'].shrToken) + super(MonkeyPatch, self).__init__(bindings={(opts['cfg'].bindHost, opts['cfg'].bindPort): cfg}, *args, **kwargs) + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_val, exc_tb): + super(MonkeyPatch, self).__exit__(exc_type, exc_val, exc_tb) + + +def zrok(opts: {}, *zargs, **zkwargs): + def zrockify_func(func): + def zrockified(*args, **kwargs): + with MonkeyPatch(opts=opts, *zargs, **zkwargs): + func(*args, **kwargs) + return zrockified + return zrockify_func diff --git a/sdk/python/src/zrok/dialer.py b/sdk/python/src/zrok/dialer.py new file mode 100644 index 00000000..adf3c632 --- /dev/null +++ b/sdk/python/src/zrok/dialer.py @@ -0,0 +1,10 @@ +from zrok.environment.root import Root +import openziti +from socket import SOCK_STREAM + + +def Dialer(shrToken: str, root: Root) -> openziti.zitisock.ZitiSocket: + openziti.load(root.ZitiIdentityNamed(root.EnvironmentIdentityName())) + client = openziti.socket(type=SOCK_STREAM) + client.connect((shrToken, 1)) + return client diff --git a/sdk/python/src/zrok/environment/__init__.py b/sdk/python/src/zrok/environment/__init__.py new file mode 100644 index 00000000..c8f5e5a1 --- /dev/null +++ b/sdk/python/src/zrok/environment/__init__.py @@ -0,0 +1 @@ +from . import dirs, root # noqa diff --git a/sdk/python/src/zrok/environment/dirs.py b/sdk/python/src/zrok/environment/dirs.py new file mode 100644 index 00000000..4b53d292 --- /dev/null +++ b/sdk/python/src/zrok/environment/dirs.py @@ -0,0 +1,32 @@ +from pathlib import Path +import os + + +def rootDir() -> str: + home = str(Path.home()) + return os.path.join(home, ".zrok") + + +def metadataFile() -> str: + zrd = rootDir() + return os.path.join(zrd, "metadata.json") + + +def configFile() -> str: + zrd = rootDir() + return os.path.join(zrd, "config.json") + + +def environmentFile() -> str: + zrd = rootDir() + return os.path.join(zrd, "environment.json") + + +def identitiesDir() -> str: + zrd = rootDir() + return os.path.join(zrd, "identities") + + +def identityFile(name: str) -> str: + idd = identitiesDir() + return os.path.join(idd, name + ".json") diff --git a/sdk/python/sdk/zrok/zrok/environment/root.py b/sdk/python/src/zrok/environment/root.py similarity index 70% rename from sdk/python/sdk/zrok/zrok/environment/root.py rename to sdk/python/src/zrok/environment/root.py index 94c176d6..6db7d2f6 100644 --- a/sdk/python/sdk/zrok/zrok/environment/root.py +++ b/sdk/python/src/zrok/environment/root.py @@ -5,9 +5,9 @@ import os import json import zrok_api as zrok from zrok_api.configuration import Configuration -import re +from zrok_api.models.client_version_check_request import ClientVersionCheckRequest -V = "v0.4" +V = "v1.0" @dataclass @@ -48,17 +48,17 @@ class Root: cfg = Configuration() cfg.host = apiEndpoint[0] + "/api/v1" - cfg.api_key["x-token"] = self.env.Token - cfg.api_key_prefix['Authorization'] = 'Bearer' - zrock_client = zrok.ApiClient(configuration=cfg) - v = zrok.MetadataApi(zrock_client).version() - # allow reported version string to be optionally prefixed with - # "refs/heads/" or "refs/tags/" - rxp = re.compile("^(refs/(heads|tags)/)?" + V) - if not rxp.match(v): - raise Exception("expected a '" + V + "' version, received: '" + v + "'") - return zrock_client + # Update: Configure authentication token + # The token needs to be set with 'key' instead of 'x-token' + # This matches the securityDefinitions in the OpenAPI spec + cfg.api_key["key"] = self.env.Token + + # Create the API client with the configured authentication + auth_client = zrok.ApiClient(configuration=cfg) + self.client_version_check(auth_client) + + return auth_client def ApiEndpoint(self) -> ApiEndpoint: apiEndpoint = "https://api-v1.zrok.io" @@ -91,6 +91,26 @@ class Root: def ZitiIdentityNamed(self, name: str) -> str: return identityFile(name) + def client_version_check(self, zrock_client): + """Check if the client version is compatible with the API.""" + metadata_api = zrok.MetadataApi(zrock_client) + try: + # Perform version check using the client_version_check method + request = ClientVersionCheckRequest(client_version=V) + response = metadata_api.client_version_check_with_http_info( + body=request, + ) + + # Check if the response status code is 200 OK + if response.status_code != 200: + raise Exception(f"Client version check failed: Unexpected status code {response.status_code}") + + # Success case - status code is 200 and empty response body is expected + return + + except Exception as e: + raise Exception(f"Client version check failed: {str(e)}") + def Default() -> Root: r = Root() diff --git a/sdk/python/src/zrok/listener.py b/sdk/python/src/zrok/listener.py new file mode 100644 index 00000000..5f85f58d --- /dev/null +++ b/sdk/python/src/zrok/listener.py @@ -0,0 +1,29 @@ +import openziti +from zrok.environment.root import Root + + +class Listener(): + shrToken: str + root: Root + __server: openziti.zitisock.ZitiSocket + + def __init__(self, shrToken: str, root: Root): + self.shrToken = shrToken + self.root = root + ztx = openziti.load( + self.root.ZitiIdentityNamed( + self.root.EnvironmentIdentityName())) + self.__server = ztx.bind(self.shrToken) + + def __enter__(self) -> openziti.zitisock.ZitiSocket: + self.listen() + return self.__server + + def __exit__(self, exception_type, exception_value, exception_traceback): + self.close() + + def listen(self): + self.__server.listen() + + def close(self): + self.__server.close() diff --git a/sdk/python/src/zrok/model.py b/sdk/python/src/zrok/model.py new file mode 100644 index 00000000..90f51342 --- /dev/null +++ b/sdk/python/src/zrok/model.py @@ -0,0 +1,76 @@ +from dataclasses import dataclass, field + +BackendMode = str + +PROXY_BACKEND_MODE: BackendMode = "proxy" +WEB_BACKEND_MODE: BackendMode = "web" +TCP_TUNNEL_BACKEND_MODE: BackendMode = "tcpTunnel" +UDP_TUNNEL_BACKEND_MODE: BackendMode = "udpTunnel" +CADDY_BACKEND_MODE: BackendMode = "caddy" +DRIVE_BACKEND_MODE: BackendMode = "drive" +SOCKS_BACKEND_MODE: BackendMode = "socks" +VPN_BACKEND_MODE: BackendMode = "vpn" + +ShareMode = str + +PRIVATE_SHARE_MODE: ShareMode = "private" +PUBLIC_SHARE_MODE: ShareMode = "public" + +PermissionMode = str + +OPEN_PERMISSION_MODE: PermissionMode = "open" +CLOSED_PERMISSION_MODE: PermissionMode = "closed" + + +@dataclass +class ShareRequest: + BackendMode: BackendMode + ShareMode: ShareMode + Target: str + Frontends: list[str] = field(default_factory=list[str]) + BasicAuth: list[str] = field(default_factory=list[str]) + OauthProvider: str = "" + OauthEmailAddressPatterns: list[str] = field(default_factory=list[str]) + OauthAuthorizationCheckInterval: str = "" + Reserved: bool = False + UniqueName: str = "" + PermissionMode: PermissionMode = OPEN_PERMISSION_MODE + AccessGrants: list[str] = field(default_factory=list[str]) + + +@dataclass +class Share: + Token: str + FrontendEndpoints: list[str] + + +@dataclass +class AccessRequest: + ShareToken: str + + +@dataclass +class Access: + Token: str + ShareToken: str + BackendMode: BackendMode + + +@dataclass +class SessionMetrics: + BytesRead: int + BytesWritten: int + LastUpdate: int + + +@dataclass +class Metrics: + Namespace: str + Sessions: dict[str, SessionMetrics] + + +AuthScheme = str + +AUTH_SCHEME_NONE: AuthScheme = "none" +AUTH_SCHEME_BASIC: AuthScheme = "basic" +AUTH_SCHEME_OAUTH: AuthScheme = "oauth" diff --git a/sdk/python/src/zrok/overview.py b/sdk/python/src/zrok/overview.py new file mode 100644 index 00000000..ccacfd35 --- /dev/null +++ b/sdk/python/src/zrok/overview.py @@ -0,0 +1,78 @@ +import json +from dataclasses import dataclass, field +from typing import List + +import urllib3 +from zrok.environment.root import Root +from zrok_api.models.environment import Environment +from zrok_api.models.environment_and_resources import EnvironmentAndResources +from zrok_api.models.list_frontends200_response_inner import ListFrontends200ResponseInner +from zrok_api.models.share import Share + + +@dataclass +class Overview: + environments: List[EnvironmentAndResources] = field(default_factory=list) + + @classmethod + def create(cls, root: Root) -> 'Overview': + if not root.IsEnabled(): + raise Exception("environment is not enabled; enable with 'zrok enable' first!") + + http = urllib3.PoolManager() + apiEndpoint = root.ApiEndpoint().endpoint + try: + response = http.request( + 'GET', + apiEndpoint + "/api/v1/overview", + headers={ + "X-TOKEN": root.env.Token + }) + except Exception as e: + raise Exception("unable to get account overview", e) + + json_data = json.loads(response.data.decode('utf-8')) + overview = cls() + + for env_data in json_data.get('environments', []): + env_dict = env_data['environment'] + # Map the JSON keys to the Environment class parameters + environment = Environment( + description=env_dict.get('description'), + host=env_dict.get('host'), + address=env_dict.get('address'), + z_id=env_dict.get('zId'), + activity=env_dict.get('activity'), + limited=env_dict.get('limited'), + created_at=env_dict.get('createdAt'), + updated_at=env_dict.get('updatedAt') + ) + + # Create Shares object from share data + share_list = [] + for share_data in env_data.get('shares', []): + share = Share( + token=share_data.get('token'), + z_id=share_data.get('zId'), + share_mode=share_data.get('shareMode'), + backend_mode=share_data.get('backendMode'), + frontend_selection=share_data.get('frontendSelection'), + frontend_endpoint=share_data.get('frontendEndpoint'), + backend_proxy_endpoint=share_data.get('backendProxyEndpoint'), + reserved=share_data.get('reserved'), + activity=share_data.get('activity'), + limited=share_data.get('limited'), + created_at=share_data.get('createdAt'), + updated_at=share_data.get('updatedAt') + ) + share_list.append(share) + + # Create EnvironmentAndResources object + env_resources = EnvironmentAndResources( + environment=environment, + shares=share_list, + frontends=ListFrontends200ResponseInner() # Empty frontends for now as it's not in the input data + ) + overview.environments.append(env_resources) + + return overview diff --git a/sdk/python/src/zrok/proxy.py b/sdk/python/src/zrok/proxy.py new file mode 100644 index 00000000..a1244ca3 --- /dev/null +++ b/sdk/python/src/zrok/proxy.py @@ -0,0 +1,203 @@ +""" +Proxy share management functionality for the zrok SDK. +""" + +import atexit +import logging +import urllib.parse +from dataclasses import dataclass +from typing import Any, Dict, List, Optional + +import requests +from flask import Flask, Response, request +from waitress import serve +from zrok.environment.root import Root +from zrok.model import (PROXY_BACKEND_MODE, PUBLIC_SHARE_MODE, PRIVATE_SHARE_MODE, Share, + ShareRequest) +from zrok.overview import Overview +from zrok.share import CreateShare, ReleaseReservedShare + +import zrok + +logger = logging.getLogger(__name__) + +# List of hop-by-hop headers that should not be returned to the viewer +HOP_BY_HOP_HEADERS = { + 'connection', + 'keep-alive', + 'proxy-authenticate', + 'proxy-authorization', + 'te', + 'trailers', + 'transfer-encoding', + 'upgrade' +} + +# The proxy only listens on the zrok socket, the port used to initialize the Waitress server is not actually bound or +# listening +DUMMY_PORT = 18081 + + +@dataclass +class ProxyShare: + """Represents a proxy share with its configuration and state.""" + root: Root + share: Share + target: str + unique_name: Optional[str] = None + _cleanup_registered: bool = False + _app: Optional[Flask] = None + verify_ssl: bool = True + + @classmethod + def create(cls, root: Root, target: str, share_mode: str = PUBLIC_SHARE_MODE, unique_name: Optional[str] = None, + frontends: Optional[List[str]] = None, verify_ssl: bool = True) -> 'ProxyShare': + """ + Create a new proxy share, handling reservation and cleanup logic based on unique_name. + + Args: + root: The zrok root environment + target: Target URL or service to proxy to + unique_name: Optional unique name for a reserved share + frontends: Optional list of frontends to use, takes precedence over root's default_frontend + verify_ssl: Whether to verify SSL certificates when forwarding requests. + + Returns: + ProxyShare instance configured with the created share + """ + # First check if we have an existing reserved share with this name + if unique_name: + existing_share = cls._find_existing_share(root, unique_name) + if existing_share: + logger.debug(f"Found existing share with token: {existing_share.Token}") + return cls( + root=root, + share=existing_share, + target=target, + unique_name=unique_name, + verify_ssl=verify_ssl + ) + + # Compose the share request + share_frontends = [] + if share_mode == PUBLIC_SHARE_MODE: + if frontends: + share_frontends = frontends + elif root.cfg and root.cfg.DefaultFrontend: + share_frontends = [root.cfg.DefaultFrontend] + else: + share_frontends = ['public'] + + share_request = ShareRequest( + BackendMode=PROXY_BACKEND_MODE, + ShareMode=share_mode, + Target=target, + Frontends=share_frontends, + Reserved=True + ) + if unique_name: + share_request.UniqueName = unique_name + + # Create the share + share = CreateShare(root=root, request=share_request) + if share_mode == PUBLIC_SHARE_MODE: + logger.debug(f"Created new proxy share with endpoints: {', '.join(share.FrontendEndpoints)}") + elif share_mode == PRIVATE_SHARE_MODE: + logger.debug(f"Created new private share with token: {share.Token}") + + # Create class instance and setup cleanup-at-exit if we reserved a random share token + instance = cls( + root=root, + share=share, + target=target, + unique_name=unique_name, + verify_ssl=verify_ssl + ) + if not unique_name: + instance.register_cleanup() + return instance + + @staticmethod + def _find_existing_share(root: Root, unique_name: str) -> Optional[Share]: + """Find an existing share with the given unique name.""" + overview = Overview.create(root=root) + for env in overview.environments: + if env.environment.z_id == root.env.ZitiIdentity: + for share in env.shares: + if share.token == unique_name: + return Share(Token=share.token, FrontendEndpoints=[share.frontend_endpoint]) + return None + + def register_cleanup(self): + """Register cleanup handler to release randomly generated shares on exit.""" + if not self._cleanup_registered: + def cleanup(): + try: + ReleaseReservedShare(root=self.root, shr=self.share) + logger.info(f"Share {self.share.Token} released") + except Exception as e: + logger.error(f"Error during cleanup: {e}") + + # Register for normal exit only + atexit.register(cleanup) + self._cleanup_registered = True + return cleanup # Return the cleanup function for reuse + + def _create_app(self) -> Flask: + """Create and configure the Flask app for proxying.""" + app = Flask(__name__) + + @app.route('/', defaults={'path': ''}, methods=['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'OPTIONS']) + @app.route('/', methods=['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'OPTIONS']) + def proxy(path): + # Construct the target URL + url = urllib.parse.urljoin(self.target, path) + + # Forward the request + resp = requests.request( + method=request.method, + url=url, + headers={key: value for (key, value) in request.headers + if key.lower() not in HOP_BY_HOP_HEADERS}, + data=request.get_data(), + cookies=request.cookies, + allow_redirects=False, + stream=True, + verify=self.verify_ssl + ) + + # Create the response + excluded_headers = HOP_BY_HOP_HEADERS.union({'host'}) + headers = [(name, value) for (name, value) in resp.raw.headers.items() + if name.lower() not in excluded_headers] + + return Response( + resp.iter_content(chunk_size=10*1024), + status=resp.status_code, + headers=headers + ) + return app + + def run(self): + """Run the proxy server.""" + if not self._app: + self._app = self._create_app() + + zrok_opts: Dict[str, Any] = {} + zrok_opts['cfg'] = zrok.decor.Opts(root=self.root, shrToken=self.token, bindPort=DUMMY_PORT) + + @zrok.decor.zrok(opts=zrok_opts) + def run_server(): + serve(self._app, port=DUMMY_PORT, _quiet=True) + + run_server() + + @property + def endpoints(self) -> List[str]: + """Get the frontend endpoints for this share.""" + return self.share.FrontendEndpoints + + @property + def token(self) -> str: + """Get the share token.""" + return self.share.Token diff --git a/sdk/python/src/zrok/share.py b/sdk/python/src/zrok/share.py new file mode 100644 index 00000000..f3c4a915 --- /dev/null +++ b/sdk/python/src/zrok/share.py @@ -0,0 +1,199 @@ +from zrok_api.api import ShareApi +from zrok.environment.root import Root +from zrok_api.models.auth_user import AuthUser +from zrok_api.models.share_request import ShareRequest +from zrok_api.models.unshare_request import UnshareRequest +import json +from zrok_api.exceptions import ApiException +import zrok.model as model + + +class Share(): + root: Root + request: model.ShareRequest + share: model.Share + + def __init__(self, root: Root, request: model.ShareRequest): + self.root = root + self.request = request + + def __enter__(self) -> model.Share: + self.share = CreateShare(root=self.root, request=self.request) + return self.share + + def __exit__(self, exception_type, exception_value, exception_traceback): + if not self.request.Reserved: + DeleteShare(root=self.root, shr=self.share) + + +def CreateShare(root: Root, request: model.ShareRequest) -> model.Share: + if not root.IsEnabled(): + raise Exception("environment is not enabled; enable with 'zrok enable' first!") + + match request.ShareMode: + case model.PRIVATE_SHARE_MODE: + out = __newPrivateShare(root, request) + case model.PUBLIC_SHARE_MODE: + out = __newPublicShare(root, request) + case _: + raise Exception("unknown share mode " + request.ShareMode) + out.reserved = request.Reserved + if request.Reserved: + out.unique_name = request.UniqueName + + if len(request.BasicAuth) > 0: + out.auth_scheme = model.AUTH_SCHEME_BASIC + for pair in request.BasicAuth: + tokens = pair.split(":") + if len(tokens) == 2: + out.auth_users.append(AuthUser(username=tokens[0].strip(), password=tokens[1].strip())) + else: + raise Exception("invalid username:password pair: " + pair) + + if request.OauthProvider != "": + out.auth_scheme = model.AUTH_SCHEME_OAUTH + + try: + zrok = root.Client() + except Exception as e: + raise Exception("error getting zrok client", e) + + try: + # Use share_with_http_info to get access to the HTTP info and handle custom response format + share_api = ShareApi(zrok) + # Add Accept header to handle the custom content type + custom_headers = { + 'Accept': 'application/json, application/zrok.v1+json' + } + + response_data = share_api.share_with_http_info( + body=out, + _headers=custom_headers + ) + + # Parse response + if hasattr(response_data, 'data') and response_data.data is not None: + res = response_data.data + else: + raise Exception("invalid response from server") + + except ApiException as e: + # If it's a content type error, try to parse the raw JSON + if "Unsupported content type: application/zrok.v1+json" in str(e) and hasattr(e, 'body'): + try: + # Parse the response body directly + res_dict = json.loads(e.body) + # Create a response object with the expected fields + + class ShareResponse: + def __init__(self, share_token, frontend_proxy_endpoints): + self.share_token = share_token + self.frontend_proxy_endpoints = frontend_proxy_endpoints + + res = ShareResponse( + share_token=res_dict.get('shareToken', ''), + frontend_proxy_endpoints=res_dict.get('frontendProxyEndpoints', []) + ) + except (json.JSONDecodeError, ValueError, AttributeError) as json_err: + raise Exception(f"unable to parse API response: {str(json_err)}") from e + else: + raise Exception("unable to create share", e) + except Exception as e: + raise Exception("unable to create share", e) + + return model.Share(Token=res.share_token, + FrontendEndpoints=res.frontend_proxy_endpoints) + + +def __newPrivateShare(root: Root, request: model.ShareRequest) -> ShareRequest: + return ShareRequest(env_zid=root.env.ZitiIdentity, + share_mode=request.ShareMode, + backend_mode=request.BackendMode, + backend_proxy_endpoint=request.Target, + auth_scheme=model.AUTH_SCHEME_NONE, + permission_mode=request.PermissionMode, + access_grants=request.AccessGrants + ) + + +def __newPublicShare(root: Root, request: model.ShareRequest) -> ShareRequest: + ret = ShareRequest(env_zid=root.env.ZitiIdentity, + share_mode=request.ShareMode, + frontend_selection=request.Frontends, + backend_mode=request.BackendMode, + backend_proxy_endpoint=request.Target, + auth_scheme=model.AUTH_SCHEME_NONE, + oauth_email_domains=request.OauthEmailAddressPatterns, + oauth_authorization_check_interval=request.OauthAuthorizationCheckInterval, + permission_mode=request.PermissionMode, + access_grants=request.AccessGrants + ) + if request.OauthProvider != "": + ret.oauth_provider = request.OauthProvider + + return ret + + +def DeleteShare(root: Root, shr: model.Share): + req = UnshareRequest(env_zid=root.env.ZitiIdentity, + share_token=shr.Token) + + try: + zrok = root.Client() + except Exception as e: + raise Exception("error getting zrok client", e) + + try: + # Add Accept header to handle the custom content type + share_api = ShareApi(zrok) + custom_headers = { + 'Accept': 'application/json, application/zrok.v1+json' + } + + # Use unshare_with_http_info to get access to the HTTP info + share_api.unshare_with_http_info( + body=req, + _headers=custom_headers + ) + except ApiException as e: + # If it's a content type error but the operation was likely successful, don't propagate the error + if "Unsupported content type: application/zrok.v1+json" in str(e) and (200 <= e.status <= 299): + # The operation was likely successful despite the content type error + pass + else: + raise Exception("error deleting share", e) + except Exception as e: + raise Exception("error deleting share", e) + + +def ReleaseReservedShare(root: Root, shr: model.Share): + req = UnshareRequest(env_zid=root.env.ZitiIdentity, + share_token=shr.Token, + reserved=True) + + try: + zrok = root.Client() + except Exception as e: + raise Exception("error getting zrok client", e) + + try: + # Add Accept header to handle the custom content type + share_api = ShareApi(zrok) + custom_headers = { + 'Accept': 'application/json, application/zrok.v1+json' + } + + # Use unshare_with_http_info to get access to the HTTP info + share_api.unshare_with_http_info( + body=req, + _headers=custom_headers + ) + except ApiException as e: + # If it's a content type error but the operation was likely successful, don't propagate the error + if "Unsupported content type: application/zrok.v1+json" in str(e) and (200 <= e.status <= 299): + # The operation was likely successful despite the content type error + pass + else: + raise Exception("error releasing share", e) + except Exception as e: + raise Exception("error releasing share", e)